From 6a73cb023670f7be835b3d78197e93f22157a177 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 4 Feb 2020 08:35:43 -0800 Subject: [PATCH 001/239] Squashed 'third_party/upb/' changes from d8f3d6f9d4..ce1a399a19 ce1a399a19 Text format serializer for upb_msg (#242) 888f35cae6 Merge pull request #241 from haberman/conformance-fixes 46b93f8cea A bit more cleanup in the decoder. ad2eb65a4b Refactored conformance_upb to use reflection, and fixed a decoder bug. a202c5f84d Merge pull request #234 from haberman/parser 4c974cf72d Fixed generated files. 9a870d957f Removed upb_decframe and made ptr an explicit parameter and return. a6c54729df Added UPB_ASSUME(), to work around warnings when optimization is enabled: 9e1f89ef2c Merge pull request #224 from haberman/maps ce0496eb86 Merge branch 'master' into maps e911aae5f6 Factored upb_map_entry into a shared place. 4c1a97ae9c Merge branch 'master' into maps 59fe620fa0 Merge branch 'maps' of github.com:haberman/upb into maps 744f8588da Cleanup to remove END_GROUP from descriptortype -> type tables. f9efbcd5d6 Added missing append fallback. c4b64e6a20 Slight simplification: NULL arena will avoid creating a new sub-object. d541566a7b Moved upb_array_new() to upb/reflection.h where it belongs. 059f226d41 Unit tests for maps generated code. 520ddc1f11 c89 fixes. 806c8c9c6e Removed obsolete testing files. 2a85bef825 Generated code interface for maps is complete, though not yet tested. 7f5fe52dfa Fixes for non-C89 code. 6c2d732082 Fixed upb's map parsing to overwrite existing elements. 090a0c33a4 Fixed VLA error and rewrote the map parsing code to be clearer. 0fbae939d2 Removed stray fprintf(). 572ba75d1c Removed comma after final enumerator. c9135e5276 Fixed the build. d040aa1302 Merge branch 'master' into maps e18541a9dd Added some missing files. 92509cc3b2 Rename lua_test. 382f92a87f Maps encode and decode successfully! 4c57b1fefd More progress on Lua extension. d6c3152c0b Added more Lua tests that are passing. ae66e571d4 Fixed some bugs and added a few more tests. bfc86d3577 Fixed many bugs, basic Lua test passes! b518b06d75 Lua test program is loaded successfully. 6ae4a2694c Merge branch 'maps' of github.com:haberman/upb into maps cc6db9fb0b Fixed crash bug. 88d996132e Added Lua main.c test driver program. 626ec4bfcf Everything builds, test pass except test_decoder. 5239655b99 WIP. 23825332e1 WIP. 27b95c969a WIP. 9a360ad43d Moved legacy_msg_reflection.{c,h} -> reflection.{c.h}. dc58b657ee New reflection API doesn't need types as parameters for map/array. c486da3970 WIP. b76040cfcc Merge branch 'maps' of github.com:haberman/upb into maps cc8e894b63 Merge branch 'master' into maps 946880c105 Merge branch 'master' into maps 1461da5056 WIP. 0a07f2714b Merge branch 'master' into maps 18de110b00 Merge branch 'master' into maps 283857f308 WIP. 5dea3f8486 Merge branch 'master' into maps 07ac6f0e8e Merge branch 'master' into maps 0c64c4b594 WIP. git-subtree-dir: third_party/upb git-subtree-split: ce1a399a19f11683d58ba4c2569ec3fdd5a67621 --- BUILD | 166 ++- CMakeLists.txt | 18 +- bazel/build_defs.bzl | 91 +- bazel/upb_proto_library.bzl | 73 +- .../google/protobuf/descriptor.upb.h | 237 ++- generated_for_cmake/upb/json/parser.c | 6 +- tests/bindings/googlepb/test_vs_proto2.cc | 165 --- tests/bindings/lua/main.c | 56 + tests/bindings/lua/test_upb.lua | 946 ++++-------- tests/bindings/lua/test_upb.pb.lua | 80 - tests/bindings/ruby/upb.rb | 62 - tests/conformance_upb.c | 201 ++- tests/google_message1.dat | Bin 228 -> 0 bytes tests/google_message2.dat | Bin 84570 -> 0 bytes tests/google_messages.proto | 149 -- tests/pb/test_varint.c | 33 +- tests/test.proto.pb | Bin 652 -> 0 bytes tests/test_generated_code.c | 329 +++++ tests/test_table.cc | 3 +- tools/make_cmakelists.py | 13 +- upb/bindings/lua/def.c | 501 ++++--- upb/bindings/lua/lua_proto_library.bzl | 109 ++ upb/bindings/lua/msg.c | 1298 ++++++++--------- upb/bindings/lua/upb.c | 170 +-- upb/bindings/lua/upb.h | 119 +- upb/bindings/lua/upb.lua | 182 +-- upb/bindings/lua/upb/pb.c | 56 - upb/bindings/lua/upb/pb.lua | 3 - upb/bindings/lua/upbc.cc | 112 ++ upb/decode.c | 487 ++++--- upb/def.c | 281 +++- upb/def.h | 8 +- upb/encode.c | 211 +-- upb/generated_util.h | 105 -- upb/json/parser.rl | 6 +- upb/json/printer.c | 19 +- upb/legacy_msg_reflection.c | 399 ----- upb/legacy_msg_reflection.h | 191 --- upb/msg.c | 149 +- upb/msg.h | 353 ++++- upb/msgfactory.c | 248 ---- upb/msgfactory.h | 48 - upb/pb/compile_decoder.c | 4 +- upb/pb/varint.int.h | 20 +- upb/port_def.inc | 17 + upb/port_undef.inc | 2 + upb/reflection.c | 289 ++++ upb/reflection.h | 153 ++ upb/table.c | 94 +- upb/table.int.h | 54 +- upb/textencode.c | 393 +++++ upb/textencode.h | 27 + upb/upb.h | 17 +- upbc/generator.cc | 174 ++- upbc/message_layout.cc | 11 +- 55 files changed, 4642 insertions(+), 4296 deletions(-) delete mode 100644 tests/bindings/googlepb/test_vs_proto2.cc create mode 100644 tests/bindings/lua/main.c delete mode 100644 tests/bindings/lua/test_upb.pb.lua delete mode 100644 tests/bindings/ruby/upb.rb delete mode 100644 tests/google_message1.dat delete mode 100644 tests/google_message2.dat delete mode 100644 tests/google_messages.proto delete mode 100644 tests/test.proto.pb create mode 100644 tests/test_generated_code.c create mode 100644 upb/bindings/lua/lua_proto_library.bzl delete mode 100644 upb/bindings/lua/upb/pb.c delete mode 100644 upb/bindings/lua/upb/pb.lua create mode 100644 upb/bindings/lua/upbc.cc delete mode 100644 upb/generated_util.h delete mode 100644 upb/legacy_msg_reflection.c delete mode 100644 upb/legacy_msg_reflection.h delete mode 100644 upb/msgfactory.c delete mode 100644 upb/msgfactory.h create mode 100644 upb/reflection.c create mode 100644 upb/reflection.h create mode 100644 upb/textencode.c create mode 100644 upb/textencode.h diff --git a/BUILD b/BUILD index 0166b14c98f..ef2fcd23a2c 100644 --- a/BUILD +++ b/BUILD @@ -2,10 +2,6 @@ load( "//bazel:build_defs.bzl", "generated_file_staleness_test", "licenses", # copybara:strip_for_google3 - "lua_binary", - "lua_cclibrary", - "lua_library", - "lua_test", "make_shell_script", "upb_amalgamation", ) @@ -14,6 +10,10 @@ load( "upb_proto_library", "upb_proto_reflection_library", ) +load( + "//:upb/bindings/lua/lua_proto_library.bzl", + "lua_proto_library", +) licenses(["notice"]) # BSD (Google-authored w/ possible external contributions) @@ -32,6 +32,7 @@ CPPOPTS = [ COPTS = CPPOPTS + [ # copybara:strip_for_google3_begin "-pedantic", + "-Werror=pedantic", "-Wstrict-prototypes", # copybara:strip_end ] @@ -70,7 +71,6 @@ cc_library( srcs = [ "upb/decode.c", "upb/encode.c", - "upb/generated_util.h", "upb/msg.c", "upb/msg.h", "upb/table.c", @@ -99,7 +99,6 @@ cc_library( cc_library( name = "generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", hdrs = [ - "upb/generated_util.h", "upb/msg.h", "upb/port_def.inc", "upb/port_undef.inc", @@ -124,11 +123,11 @@ cc_library( name = "reflection", srcs = [ "upb/def.c", - "upb/msgfactory.c", + "upb/reflection.c", ], hdrs = [ "upb/def.h", - "upb/msgfactory.h", + "upb/reflection.h", ], copts = select({ ":windows": [], @@ -143,37 +142,33 @@ cc_library( ], ) -# Internal C/C++ libraries ##################################################### - cc_library( - name = "table", - hdrs = ["upb/table.int.h"], + name = "textformat", + srcs = [ + "upb/textencode.c", + ], + hdrs = [ + "upb/textencode.h", + ], + visibility = ["//visibility:public"], deps = [ - ":port", - ":upb", + ":reflection", ], ) -# Legacy C/C++ Libraries (not recommended for new code) ######################## +# Internal C/C++ libraries ##################################################### cc_library( - name = "legacy_msg_reflection", - srcs = [ - "upb/msg.h", - "upb/legacy_msg_reflection.c", - ], - hdrs = ["upb/legacy_msg_reflection.h"], - copts = select({ - ":windows": [], - "//conditions:default": COPTS - }), + name = "table", + hdrs = ["upb/table.int.h"], deps = [ ":port", - ":table", ":upb", ], ) +# Legacy C/C++ Libraries (not recommended for new code) ######################## + cc_library( name = "handlers", srcs = [ @@ -359,6 +354,21 @@ cc_test( ], ) +cc_test( + name = "test_generated_code", + srcs = ["tests/test_generated_code.c"], + deps = [ + ":test_messages_proto3_proto_upb", + ":upb_test", + ], +) + +upb_proto_reflection_library( + name = "test_messages_proto3_proto_upb", + testonly = 1, + deps = ["@com_google_protobuf//:test_messages_proto3_proto"], +) + proto_library( name = "test_decoder_proto", srcs = [ @@ -526,8 +536,20 @@ upb_proto_library( deps = ["@com_google_protobuf//:conformance_proto"], ) -upb_proto_library( - name = "test_messages_proto3_proto_upb", +upb_proto_reflection_library( + name = "conformance_proto_upbdefs", + testonly = 1, + deps = ["@com_google_protobuf//:conformance_proto"], +) + +upb_proto_reflection_library( + name = "test_messages_proto2_upbdefs", + testonly = 1, + deps = ["@com_google_protobuf//:test_messages_proto2_proto"], +) + +upb_proto_reflection_library( + name = "test_messages_proto3_upbdefs", testonly = 1, deps = ["@com_google_protobuf//:test_messages_proto3_proto"], ) @@ -544,7 +566,11 @@ cc_binary( }) + ["-Ibazel-out/k8-fastbuild/bin"], deps = [ ":conformance_proto_upb", - ":test_messages_proto3_proto_upb", + ":conformance_proto_upbdefs", + ":test_messages_proto2_upbdefs", + ":test_messages_proto3_upbdefs", + ":reflection", + ":textformat", ":upb", ], ) @@ -552,7 +578,7 @@ cc_binary( make_shell_script( name = "gen_test_conformance_upb", out = "test_conformance_upb.sh", - contents = "external/com_google_protobuf/conformance_test_runner ./conformance_upb", + contents = "external/com_google_protobuf/conformance_test_runner --enforce_recommended ./conformance_upb", ) sh_test( @@ -563,6 +589,7 @@ sh_test( ":conformance_upb", "@com_google_protobuf//:conformance_test_runner", ], + deps = ["@bazel_tools//tools/bash/runfiles"], ) # copybara:strip_for_google3_begin @@ -602,10 +629,10 @@ cc_library( }), ) -# Lua libraries. ############################################################### +# Lua ########################################################################## -lua_cclibrary( - name = "lua/upb_c", +cc_library( + name = "lupb", srcs = [ "upb/bindings/lua/def.c", "upb/bindings/lua/msg.c", @@ -615,48 +642,56 @@ lua_cclibrary( "upb/bindings/lua/upb.h", ], deps = [ - "legacy_msg_reflection", - "upb", - "upb_pb", + ":reflection", + ":upb", + "@lua//:liblua", ], ) -lua_library( - name = "lua/upb", - srcs = ["upb/bindings/lua/upb.lua"], - luadeps = ["lua/upb_c"], - strip_prefix = "upb/bindings/lua", -) - -lua_cclibrary( - name = "lua/upb/pb_c", - srcs = ["upb/bindings/lua/upb/pb.c"], - luadeps = ["lua/upb_c"], - deps = ["upb_pb"], +cc_test( + name = "test_lua", + linkstatic = 1, + srcs = ["tests/bindings/lua/main.c"], + data = [ + "@com_google_protobuf//:conformance_proto", + "@com_google_protobuf//:descriptor_proto", + ":descriptor_proto_lua", + ":test_messages_proto3_proto_lua", + "tests/bindings/lua/test_upb.lua", + "third_party/lunit/console.lua", + "third_party/lunit/lunit.lua", + "upb/bindings/lua/upb.lua", + ], + deps = [ + ":lupb", + "@lua//:liblua", + ] ) -lua_library( - name = "lua/upb/pb", - srcs = ["upb/bindings/lua/upb/pb.lua"], - luadeps = [ - "lua/upb", - "lua/upb/pb_c", +cc_binary( + name = "protoc-gen-lua", + srcs = ["upb/bindings/lua/upbc.cc"], + copts = select({ + ":windows": [], + "//conditions:default": CPPOPTS + }), + visibility = ["//visibility:public"], + deps = [ + "@com_google_absl//absl/strings", + "@com_google_protobuf//:protoc_lib" ], - strip_prefix = "upb/bindings/lua", ) -# Lua tests. ################################################################### - -lua_test( - name = "lua/test_upb", - luadeps = ["lua/upb"], - luamain = "tests/bindings/lua/test_upb.lua", +lua_proto_library( + name = "descriptor_proto_lua", + visibility = ["//visibility:public"], + deps = ["@com_google_protobuf//:descriptor_proto"], ) -lua_test( - name = "lua/test_upb_pb", - luadeps = ["lua/upb/pb"], - luamain = "tests/bindings/lua/test_upb.pb.lua", +lua_proto_library( + name = "test_messages_proto3_proto_lua", + testonly = 1, + deps = ["@com_google_protobuf//:test_messages_proto3_proto"], ) # Test the CMake build ######################################################### @@ -683,6 +718,7 @@ sh_test( name = "cmake_build", srcs = ["run_cmake_build.sh"], data = [":cmake_files"], + deps = ["@bazel_tools//tools/bash/runfiles"], ) # Generated files ############################################################## diff --git a/CMakeLists.txt b/CMakeLists.txt index 96b265dd3a7..6ec61d69cba 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,6 @@ add_library(port add_library(upb upb/decode.c upb/encode.c - upb/generated_util.h upb/msg.c upb/msg.h upb/table.c @@ -81,26 +80,23 @@ target_link_libraries(generated_code_support__only_for_generated_code_do_not_use upb) add_library(reflection upb/def.c - upb/msgfactory.c + upb/reflection.c upb/def.h - upb/msgfactory.h) + upb/reflection.h) target_link_libraries(reflection descriptor_upbproto port table upb) +add_library(textformat + upb/textencode.c + upb/textencode.h) +target_link_libraries(textformat + reflection) add_library(table INTERFACE) target_link_libraries(table INTERFACE port upb) -add_library(legacy_msg_reflection - upb/msg.h - upb/legacy_msg_reflection.c - upb/legacy_msg_reflection.h) -target_link_libraries(legacy_msg_reflection - port - table - upb) add_library(handlers upb/handlers.c upb/handlers-inl.h diff --git a/bazel/build_defs.bzl b/bazel/build_defs.bzl index 08bb44ee3f7..7544e125175 100644 --- a/bazel/build_defs.bzl +++ b/bazel/build_defs.bzl @@ -5,6 +5,19 @@ load(":upb_proto_library.bzl", "GeneratedSrcsInfo") def _librule(name): return name + "_lib" +runfiles_init = """\ +# --- begin runfiles.bash initialization v2 --- +# Copy-pasted from the Bazel Bash runfiles library v2. +set -uo pipefail; f=bazel_tools/tools/bash/runfiles/runfiles.bash +source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ + source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \ + source "$0.runfiles/$f" 2>/dev/null || \ + source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ + source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \ + { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e +# --- end runfiles.bash initialization v2 --- +""" + def _get_real_short_path(file): # For some reason, files from other archives have short paths that look like: # ../com_google_protobuf/google/protobuf/descriptor.proto @@ -26,42 +39,6 @@ def _get_real_roots(files): roots[real_root] = True return roots.keys() -def lua_cclibrary(name, srcs, hdrs = [], deps = [], luadeps = []): - lib_rule = name + "_lib" - so_rule = "lib" + name + ".so" - so_file = _remove_prefix(name, "lua/") + ".so" - - native.cc_library( - name = _librule(name), - hdrs = hdrs, - srcs = srcs, - deps = deps + [_librule(dep) for dep in luadeps] + ["@lua//:liblua_headers"], - ) - - native.cc_binary( - name = so_rule, - linkshared = True, - deps = [_librule(name)], - linkopts = select({ - ":darwin": [ - "-undefined dynamic_lookup", - ], - "//conditions:default": [], - }), - ) - - native.genrule( - name = name + "_copy", - srcs = [":" + so_rule], - outs = [so_file], - cmd = "cp $< $@", - ) - - native.filegroup( - name = name, - data = [so_file], - ) - def _remove_prefix(str, prefix): if not str.startswith(prefix): fail("%s doesn't start with %s" % (str, prefix)) @@ -72,54 +49,14 @@ def _remove_suffix(str, suffix): fail("%s doesn't end with %s" % (str, suffix)) return str[:-len(suffix)] -def lua_library(name, srcs, strip_prefix, luadeps = []): - outs = [_remove_prefix(src, strip_prefix + "/") for src in srcs] - native.genrule( - name = name + "_copy", - srcs = srcs, - outs = outs, - cmd = "cp $(SRCS) $(@D)", - ) - - native.filegroup( - name = name, - data = outs + luadeps, - ) - def make_shell_script(name, contents, out): - contents = contents.replace("$", "$$") + contents = (runfiles_init + contents).replace("$", "$$") native.genrule( name = "gen_" + name, outs = [out], cmd = "(cat <<'HEREDOC'\n%s\nHEREDOC\n) > $@" % contents, ) -def _lua_binary_or_test(name, luamain, luadeps, rule): - script = name + ".sh" - - make_shell_script( - name = "gen_" + name, - out = script, - contents = """ -BASE=$(dirname $(rlocation upb/upb_c.so)) -export LUA_CPATH="$BASE/?.so" -export LUA_PATH="$BASE/?.lua" -$(rlocation lua/lua) $(rlocation upb/tools/upbc.lua) "$@" -""", - ) - - rule( - name = name, - srcs = [script], - data = ["@lua//:lua", luamain] + luadeps, - ) - -def lua_binary(name, luamain, luadeps = []): - _lua_binary_or_test(name, luamain, luadeps, native.sh_binary) - -def lua_test(name, luamain, luadeps = []): - _lua_binary_or_test(name, luamain, luadeps, native.sh_test) - def generated_file_staleness_test(name, outs, generated_pattern): """Tests that checked-in file(s) match the contents of generated file(s). diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index bea611776c4..9ad578f96f6 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -146,8 +146,10 @@ GeneratedSrcsInfo = provider( }, ) -_WrappedCcInfo = provider(fields = ["cc_info"]) +_UpbWrappedCcInfo = provider(fields = ["cc_info"]) +_UpbDefsWrappedCcInfo = provider(fields = ["cc_info"]) _WrappedGeneratedSrcsInfo = provider(fields = ["srcs"]) +_WrappedDefsGeneratedSrcsInfo = provider(fields = ["srcs"]) def _compile_upb_protos(ctx, proto_info, proto_sources, ext): srcs = [_generate_output_file(ctx, name, ext + ".c") for name in proto_sources] @@ -175,11 +177,23 @@ def _upb_proto_rule_impl(ctx): if len(ctx.attr.deps) != 1: fail("only one deps dependency allowed.") dep = ctx.attr.deps[0] - if _WrappedCcInfo not in dep or _WrappedGeneratedSrcsInfo not in dep: - fail("proto_library rule must generate _WrappedCcInfo and " + - "_WrappedGeneratedSrcsInfo (aspect should have handled this).") - cc_info = dep[_WrappedCcInfo].cc_info - srcs = dep[_WrappedGeneratedSrcsInfo].srcs + + if _WrappedDefsGeneratedSrcsInfo in dep: + srcs = dep[_WrappedDefsGeneratedSrcsInfo].srcs + elif _WrappedGeneratedSrcsInfo in dep: + srcs = dep[_WrappedGeneratedSrcsInfo].srcs + else: + fail("proto_library rule must generate _WrappedGeneratedSrcsInfo or " + + "_WrappedDefsGeneratedSrcsInfo (aspect should have handled this).") + + if _UpbDefsWrappedCcInfo in dep: + cc_info = dep[_UpbDefsWrappedCcInfo].cc_info + elif _UpbWrappedCcInfo in dep: + cc_info = dep[_UpbWrappedCcInfo].cc_info + else: + fail("proto_library rule must generate _UpbWrappedCcInfo or " + + "_UpbDefsWrappedCcInfo (aspect should have handled this).") + if type(cc_info.linking_context.libraries_to_link) == "list": lib = cc_info.linking_context.libraries_to_link[0] else: @@ -195,12 +209,19 @@ def _upb_proto_rule_impl(ctx): cc_info, ] -def _upb_proto_aspect_impl(target, ctx): +def _upb_proto_aspect_impl(target, ctx, cc_provider, file_provider): proto_info = target[ProtoInfo] files = _compile_upb_protos(ctx, proto_info, proto_info.direct_sources, ctx.attr._ext) deps = ctx.rule.attr.deps + ctx.attr._upb + if cc_provider == _UpbDefsWrappedCcInfo: + deps += ctx.attr._upb_reflection dep_ccinfos = [dep[CcInfo] for dep in deps if CcInfo in dep] - dep_ccinfos += [dep[_WrappedCcInfo].cc_info for dep in deps if _WrappedCcInfo in dep] + dep_ccinfos += [dep[_UpbWrappedCcInfo].cc_info for dep in deps if _UpbWrappedCcInfo in dep] + dep_ccinfos += [dep[_UpbDefsWrappedCcInfo].cc_info for dep in deps if _UpbDefsWrappedCcInfo in dep] + if cc_provider == _UpbDefsWrappedCcInfo: + if _UpbWrappedCcInfo not in target: + fail("Target should have _UpbDefsWrappedCcInfo provider") + dep_ccinfos += [target[_UpbWrappedCcInfo].cc_info] cc_info = _cc_library_func( ctx = ctx, name = ctx.rule.attr.name + ctx.attr._ext, @@ -208,7 +229,13 @@ def _upb_proto_aspect_impl(target, ctx): srcs = files.srcs, dep_ccinfos = dep_ccinfos, ) - return [_WrappedCcInfo(cc_info = cc_info), _WrappedGeneratedSrcsInfo(srcs = files)] + return [cc_provider(cc_info = cc_info), file_provider(srcs = files)] + +def _upb_proto_library_aspect_impl(target, ctx): + return _upb_proto_aspect_impl(target, ctx, _UpbWrappedCcInfo, _WrappedGeneratedSrcsInfo) + +def _upb_proto_reflection_library_aspect_impl(target, ctx): + return _upb_proto_aspect_impl(target, ctx, _UpbDefsWrappedCcInfo, _WrappedDefsGeneratedSrcsInfo) def _maybe_add(d): if not _is_bazel: @@ -242,7 +269,11 @@ _upb_proto_library_aspect = aspect( ]), "_ext": attr.string(default = ".upb"), }), - implementation = _upb_proto_aspect_impl, + implementation = _upb_proto_library_aspect_impl, + provides = [ + _UpbWrappedCcInfo, + _WrappedGeneratedSrcsInfo, + ], attr_aspects = ["deps"], fragments = ["cpp"], toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], @@ -277,6 +308,7 @@ _upb_proto_reflection_library_aspect = aspect( "_cc_toolchain": attr.label( default = "@bazel_tools//tools/cpp:current_cc_toolchain", ), + # For unknown reasons, this gets overwritten. "_upb": attr.label_list( default = [ "//:generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me", @@ -284,9 +316,23 @@ _upb_proto_reflection_library_aspect = aspect( "//:reflection", ], ), + "_upb_reflection": attr.label_list( + default = [ + "//:upb", + "//:reflection", + ], + ), "_ext": attr.string(default = ".upbdefs"), }), - implementation = _upb_proto_aspect_impl, + implementation = _upb_proto_reflection_library_aspect_impl, + provides = [ + _UpbDefsWrappedCcInfo, + _WrappedDefsGeneratedSrcsInfo, + ], + required_aspect_providers = [ + _UpbWrappedCcInfo, + _WrappedGeneratedSrcsInfo, + ], attr_aspects = ["deps"], fragments = ["cpp"], toolchains = ["@bazel_tools//tools/cpp:toolchain_type"], @@ -297,7 +343,10 @@ upb_proto_reflection_library = rule( implementation = _upb_proto_rule_impl, attrs = { "deps": attr.label_list( - aspects = [_upb_proto_reflection_library_aspect], + aspects = [ + _upb_proto_library_aspect, + _upb_proto_reflection_library_aspect, + ], allow_rules = ["proto_library"], providers = [ProtoInfo], ), diff --git a/generated_for_cmake/google/protobuf/descriptor.upb.h b/generated_for_cmake/google/protobuf/descriptor.upb.h index 681614910e0..5baad088109 100644 --- a/generated_for_cmake/google/protobuf/descriptor.upb.h +++ b/generated_for_cmake/google/protobuf/descriptor.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ #define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -157,7 +156,7 @@ typedef enum { /* google.protobuf.FileDescriptorSet */ UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_arena *arena) { - return (google_protobuf_FileDescriptorSet *)upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena); + return (google_protobuf_FileDescriptorSet *)_upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena); } UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse(const char *buf, size_t size, upb_arena *arena) { @@ -174,10 +173,10 @@ UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorS return (google_protobuf_FileDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet *msg, size_t len, upb_arena *arena) { - return (google_protobuf_FileDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_FileDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet *msg, upb_arena *arena) { - struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); + struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -187,7 +186,7 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr /* google.protobuf.FileDescriptorProto */ UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_FileDescriptorProto *)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); + return (google_protobuf_FileDescriptorProto *)_upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -228,20 +227,20 @@ UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_mutable_dependency(g return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto *msg, size_t *len) { return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -251,10 +250,10 @@ UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorP return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); } UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(44, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -264,10 +263,10 @@ UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescript return (google_protobuf_ServiceDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len); } UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_ServiceDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_ServiceDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); + struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -277,10 +276,10 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptor return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 104), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 104), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 104), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(52, 104), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -293,7 +292,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FileOptions*)upb_msg_new(&google_protobuf_FileOptions_msginit, arena); + sub = (struct google_protobuf_FileOptions*)_upb_msg_new(&google_protobuf_FileOptions_msginit, arena); if (!sub) return NULL; google_protobuf_FileDescriptorProto_set_options(msg, sub); } @@ -306,7 +305,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_ UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); if (sub == NULL) { - sub = (struct google_protobuf_SourceCodeInfo*)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); + sub = (struct google_protobuf_SourceCodeInfo*)_upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); if (!sub) return NULL; google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub); } @@ -316,21 +315,21 @@ UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependenc return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 112), len); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 112), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 112), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(56, 112), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(56, 112), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 120), len); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(60, 120), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(60, 120), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(60, 120), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(60, 120), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 3); @@ -340,7 +339,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_F /* google.protobuf.DescriptorProto */ UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_arena *arena) { - return (google_protobuf_DescriptorProto *)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); + return (google_protobuf_DescriptorProto *)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -372,10 +371,10 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProt return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -385,10 +384,10 @@ UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mut return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -398,10 +397,10 @@ UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -411,10 +410,10 @@ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_Desc return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); + struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -424,10 +423,10 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProt return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -440,7 +439,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_Desc UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto *msg, upb_arena *arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MessageOptions*)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); + sub = (struct google_protobuf_MessageOptions*)_upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); if (!sub) return NULL; google_protobuf_DescriptorProto_set_options(msg, sub); } @@ -450,10 +449,10 @@ UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProt return (google_protobuf_OneofDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_OneofDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_OneofDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); + struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -463,10 +462,10 @@ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_Descr return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); + struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -476,17 +475,17 @@ UPB_INLINE upb_strview* google_protobuf_DescriptorProto_mutable_reserved_name(go return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); } UPB_INLINE upb_strview* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* google.protobuf.DescriptorProto.ExtensionRange */ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena) { - return (google_protobuf_DescriptorProto_ExtensionRange *)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); + return (google_protobuf_DescriptorProto_ExtensionRange *)_upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse(const char *buf, size_t size, upb_arena *arena) { @@ -519,7 +518,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(googl UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ExtensionRangeOptions*)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); + sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); if (!sub) return NULL; google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub); } @@ -529,7 +528,7 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_Descrip /* google.protobuf.DescriptorProto.ReservedRange */ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena) { - return (google_protobuf_DescriptorProto_ReservedRange *)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); + return (google_protobuf_DescriptorProto_ReservedRange *)_upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse(const char *buf, size_t size, upb_arena *arena) { @@ -557,7 +556,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_pro /* google.protobuf.ExtensionRangeOptions */ UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_arena *arena) { - return (google_protobuf_ExtensionRangeOptions *)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); + return (google_protobuf_ExtensionRangeOptions *)_upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); } UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -574,10 +573,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeO return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -587,7 +586,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension /* google.protobuf.FieldDescriptorProto */ UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_FieldDescriptorProto *)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); + return (google_protobuf_FieldDescriptorProto *)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -654,7 +653,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FieldOptions*)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); + sub = (struct google_protobuf_FieldOptions*)_upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); if (!sub) return NULL; google_protobuf_FieldDescriptorProto_set_options(msg, sub); } @@ -672,7 +671,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protob /* google.protobuf.OneofDescriptorProto */ UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_OneofDescriptorProto *)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); + return (google_protobuf_OneofDescriptorProto *)_upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -699,7 +698,7 @@ UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_OneofOptions*)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); + sub = (struct google_protobuf_OneofOptions*)_upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); if (!sub) return NULL; google_protobuf_OneofDescriptorProto_set_options(msg, sub); } @@ -709,7 +708,7 @@ UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorP /* google.protobuf.EnumDescriptorProto */ UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto *)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); + return (google_protobuf_EnumDescriptorProto *)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -736,10 +735,10 @@ UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescri return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_EnumValueDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_EnumValueDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); + struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -752,7 +751,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumOptions*)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); + sub = (struct google_protobuf_EnumOptions*)_upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); if (!sub) return NULL; google_protobuf_EnumDescriptorProto_set_options(msg, sub); } @@ -762,10 +761,10 @@ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protob return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); + struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -775,17 +774,17 @@ UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_mutable_reserved_nam return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* google.protobuf.EnumDescriptorProto.EnumReservedRange */ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)_upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char *buf, size_t size, upb_arena *arena) { @@ -813,7 +812,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(go /* google.protobuf.EnumValueDescriptorProto */ UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_EnumValueDescriptorProto *)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); + return (google_protobuf_EnumValueDescriptorProto *)_upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -846,7 +845,7 @@ UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_prot UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumValueOptions*)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); + sub = (struct google_protobuf_EnumValueOptions*)_upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); if (!sub) return NULL; google_protobuf_EnumValueDescriptorProto_set_options(msg, sub); } @@ -856,7 +855,7 @@ UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDes /* google.protobuf.ServiceDescriptorProto */ UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_ServiceDescriptorProto *)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); + return (google_protobuf_ServiceDescriptorProto *)_upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -881,10 +880,10 @@ UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescri return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_MethodDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_MethodDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); + struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -897,7 +896,7 @@ UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protob UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ServiceOptions*)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); + sub = (struct google_protobuf_ServiceOptions*)_upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); if (!sub) return NULL; google_protobuf_ServiceDescriptorProto_set_options(msg, sub); } @@ -907,7 +906,7 @@ UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescrip /* google.protobuf.MethodDescriptorProto */ UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_MethodDescriptorProto *)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); + return (google_protobuf_MethodDescriptorProto *)_upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -950,7 +949,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobu UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MethodOptions*)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); + sub = (struct google_protobuf_MethodOptions*)_upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); if (!sub) return NULL; google_protobuf_MethodDescriptorProto_set_options(msg, sub); } @@ -968,7 +967,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(googl /* google.protobuf.FileOptions */ UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_arena *arena) { - return (google_protobuf_FileOptions *)upb_msg_new(&google_protobuf_FileOptions_msginit, arena); + return (google_protobuf_FileOptions *)_upb_msg_new(&google_protobuf_FileOptions_msginit, arena); } UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1105,10 +1104,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mut return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 192), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(108, 192), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(108, 192), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(108, 192), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1118,7 +1117,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio /* google.protobuf.MessageOptions */ UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_arena *arena) { - return (google_protobuf_MessageOptions *)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); + return (google_protobuf_MessageOptions *)_upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); } UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1159,10 +1158,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_ return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(8, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1172,7 +1171,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp /* google.protobuf.FieldOptions */ UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_arena *arena) { - return (google_protobuf_FieldOptions *)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); + return (google_protobuf_FieldOptions *)_upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); } UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1225,10 +1224,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mu return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1238,7 +1237,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti /* google.protobuf.OneofOptions */ UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_arena *arena) { - return (google_protobuf_OneofOptions *)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); + return (google_protobuf_OneofOptions *)_upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); } UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1255,10 +1254,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mu return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1268,7 +1267,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti /* google.protobuf.EnumOptions */ UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_arena *arena) { - return (google_protobuf_EnumOptions *)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); + return (google_protobuf_EnumOptions *)_upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); } UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1297,10 +1296,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mut return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1310,7 +1309,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio /* google.protobuf.EnumValueOptions */ UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_arena *arena) { - return (google_protobuf_EnumValueOptions *)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); + return (google_protobuf_EnumValueOptions *)_upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); } UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1333,10 +1332,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOption return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1346,7 +1345,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue /* google.protobuf.ServiceOptions */ UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_arena *arena) { - return (google_protobuf_ServiceOptions *)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); + return (google_protobuf_ServiceOptions *)_upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); } UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1369,10 +1368,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_ return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1382,7 +1381,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp /* google.protobuf.MethodOptions */ UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_arena *arena) { - return (google_protobuf_MethodOptions *)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); + return (google_protobuf_MethodOptions *)_upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); } UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1411,10 +1410,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_m return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1424,7 +1423,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt /* google.protobuf.UninterpretedOption */ UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_arena *arena) { - return (google_protobuf_UninterpretedOption *)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + return (google_protobuf_UninterpretedOption *)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); } UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1453,10 +1452,10 @@ UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_Uninte return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 80), len); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_resize_accessor(msg, UPB_SIZE(56, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_resize_accessor(msg, UPB_SIZE(56, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); + struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(56, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1490,7 +1489,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_p /* google.protobuf.UninterpretedOption.NamePart */ UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena) { - return (google_protobuf_UninterpretedOption_NamePart *)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); + return (google_protobuf_UninterpretedOption_NamePart *)_upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1518,7 +1517,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(go /* google.protobuf.SourceCodeInfo */ UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_arena *arena) { - return (google_protobuf_SourceCodeInfo *)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); + return (google_protobuf_SourceCodeInfo *)_upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); } UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1535,10 +1534,10 @@ UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeI return (google_protobuf_SourceCodeInfo_Location**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo *msg, size_t len, upb_arena *arena) { - return (google_protobuf_SourceCodeInfo_Location**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_SourceCodeInfo_Location**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo *msg, upb_arena *arena) { - struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); + struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1548,7 +1547,7 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc /* google.protobuf.SourceCodeInfo.Location */ UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena) { - return (google_protobuf_SourceCodeInfo_Location *)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); + return (google_protobuf_SourceCodeInfo_Location *)_upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); } UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1571,21 +1570,21 @@ UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_ return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(20, 40), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(20, 40), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) { _upb_sethas(msg, 1); @@ -1599,17 +1598,17 @@ UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_mutable_leading_ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* google.protobuf.GeneratedCodeInfo */ UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_arena *arena) { - return (google_protobuf_GeneratedCodeInfo *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena); + return (google_protobuf_GeneratedCodeInfo *)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1626,10 +1625,10 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_Genera return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t len, upb_arena *arena) { - return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena) { - struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); + struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1639,7 +1638,7 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_ /* google.protobuf.GeneratedCodeInfo.Annotation */ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena) { - return (google_protobuf_GeneratedCodeInfo_Annotation *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); + return (google_protobuf_GeneratedCodeInfo_Annotation *)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1662,11 +1661,11 @@ UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(go return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(20, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(20, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value) { _upb_sethas(msg, 3); diff --git a/generated_for_cmake/upb/json/parser.c b/generated_for_cmake/upb/json/parser.c index 9955a024aa9..0efc7301d17 100644 --- a/generated_for_cmake/upb/json/parser.c +++ b/generated_for_cmake/upb/json/parser.c @@ -391,7 +391,7 @@ static upb_selector_t getsel_for_handlertype(upb_json_parser *p, upb_handlertype_t type) { upb_selector_t sel; bool ok = upb_handlers_getselector(p->top->f, type, &sel); - UPB_ASSERT(ok); + UPB_ASSUME(ok); return sel; } @@ -416,7 +416,7 @@ static void set_name_table(upb_json_parser *p, upb_jsonparser_frame *frame) { const upb_json_parsermethod *method; ok = upb_inttable_lookupptr(&cache->methods, frame->m, &v); - UPB_ASSERT(ok); + UPB_ASSUME(ok); method = upb_value_getconstptr(v); frame->name_table = &method->name_table; @@ -2021,7 +2021,7 @@ static void end_member(upb_json_parser *p) { /* send ENDSUBMSG in repeated-field-of-mapentries frame. */ p->top--; ok = upb_handlers_getselector(mapfield, UPB_HANDLER_ENDSUBMSG, &sel); - UPB_ASSERT(ok); + UPB_ASSUME(ok); upb_sink_endsubmsg(p->top->sink, (p->top + 1)->sink, sel); } diff --git a/tests/bindings/googlepb/test_vs_proto2.cc b/tests/bindings/googlepb/test_vs_proto2.cc deleted file mode 100644 index ac447e1b0cb..00000000000 --- a/tests/bindings/googlepb/test_vs_proto2.cc +++ /dev/null @@ -1,165 +0,0 @@ -/* - * - * A test that verifies that our results are identical to proto2 for a - * given proto type and input protobuf. - */ - -#define __STDC_LIMIT_MACROS // So we get UINT32_MAX -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "tests/google_messages.pb.h" -#include "tests/upb_test.h" -#include "upb/bindings/googlepb/bridge.h" -#include "upb/def.h" -#include "upb/handlers.h" -#include "upb/pb/decoder.h" -#include "upb/pb/glue.h" -#include "upb/pb/varint.int.h" - -// Pull in string data from tests/google_message{1,2}.dat -// (the .h files are generated with xxd). -const unsigned char message1_data[] = { -#include "tests/google_message1.h" -}; - -const unsigned char message2_data[] = { -#include "tests/google_message2.h" -}; - -void compare_metadata(const google::protobuf::Descriptor* d, - const upb::MessageDef *upb_md) { - ASSERT(d->field_count() == upb_md->field_count()); - for (upb::MessageDef::const_field_iterator i = upb_md->field_begin(); - i != upb_md->field_end(); ++i) { - const upb::FieldDef* upb_f = *i; - const google::protobuf::FieldDescriptor *proto2_f = - d->FindFieldByNumber(upb_f->number()); - ASSERT(upb_f); - ASSERT(proto2_f); - ASSERT(upb_f->number() == (uint32_t)proto2_f->number()); - ASSERT(std::string(upb_f->name()) == proto2_f->name()); - ASSERT(upb_f->descriptor_type() == - static_cast(proto2_f->type())); - ASSERT(upb_f->IsSequence() == proto2_f->is_repeated()); - } -} - -void print_diff(const google::protobuf::Message& msg1, - const google::protobuf::Message& msg2) { - std::string text_str1; - std::string text_str2; - google::protobuf::TextFormat::PrintToString(msg1, &text_str1); - google::protobuf::TextFormat::PrintToString(msg2, &text_str2); - fprintf(stderr, "str1: %s, str2: %s\n", text_str1.c_str(), text_str2.c_str()); -} - -void parse_and_compare(google::protobuf::Message *msg1, - google::protobuf::Message *msg2, - const upb::Handlers *protomsg_handlers, - const char *str, size_t len, bool allow_jit) { - // Parse to both proto2 and upb. - ASSERT(msg1->ParseFromArray(str, len)); - - upb::pb::CodeCache cache; - ASSERT(cache.set_allow_jit(allow_jit)); - upb::reffed_ptr decoder_method( - cache.GetDecoderMethod(upb::pb::DecoderMethodOptions(protomsg_handlers))); - - upb::Status status; - upb::Environment env; - env.ReportErrorsTo(&status); - upb::Sink protomsg_sink(protomsg_handlers, msg2); - upb::pb::Decoder* decoder = - upb::pb::Decoder::Create(&env, decoder_method.get(), &protomsg_sink); - - msg2->Clear(); - bool ok = upb::BufferSource::PutBuffer(str, len, decoder->input()); - if (!ok) { - fprintf(stderr, "error parsing: %s\n", status.error_message()); - print_diff(*msg1, *msg2); - } - ASSERT(ok); - ASSERT(status.ok()); - - // Would like to just compare the message objects themselves, but - // unfortunately MessageDifferencer is not part of the open-source release of - // proto2, so we compare their serialized strings, which we expect will be - // equivalent. - std::string str1; - std::string str2; - msg1->SerializeToString(&str1); - msg2->SerializeToString(&str2); - if (str1 != str2) { - print_diff(*msg1, *msg2); - } - ASSERT(str1 == str2); - ASSERT(std::string(str, len) == str2); -} - -void test_zig_zag() { - for (uint64_t num = 5; num * 1.5 < UINT64_MAX; num *= 1.5) { - ASSERT(upb_zzenc_64(num) == - google::protobuf::internal::WireFormatLite::ZigZagEncode64(num)); - if (num < UINT32_MAX) { - ASSERT(upb_zzenc_32(num) == - google::protobuf::internal::WireFormatLite::ZigZagEncode32(num)); - } - } - -} - -extern "C" { - -int run_tests(int argc, char *argv[]) { - UPB_UNUSED(argc); - UPB_UNUSED(argv); - UPB_UNUSED(message1_data); - UPB_UNUSED(message2_data); - size_t len = sizeof(MESSAGE_DATA_IDENT); - const char *str = (const char*)MESSAGE_DATA_IDENT; - - MESSAGE_CIDENT msg1; - MESSAGE_CIDENT msg2; - - upb::reffed_ptr h( - upb::googlepb::WriteHandlers::New(msg1)); - - compare_metadata(msg1.GetDescriptor(), h->message_def()); - - // Run twice to test proper object reuse. - parse_and_compare(&msg1, &msg2, h.get(), str, len, false); - parse_and_compare(&msg1, &msg2, h.get(), str, len, true); - parse_and_compare(&msg1, &msg2, h.get(), str, len, false); - parse_and_compare(&msg1, &msg2, h.get(), str, len, true); - - // Test with DynamicMessage. - google::protobuf::DynamicMessageFactory* factory = - new google::protobuf::DynamicMessageFactory; - const google::protobuf::Message* prototype = - factory->GetPrototype(msg1.descriptor()); - google::protobuf::Message* dyn_msg1 = prototype->New(); - google::protobuf::Message* dyn_msg2 = prototype->New(); - h = upb::googlepb::WriteHandlers::New(*dyn_msg1); - parse_and_compare(dyn_msg1, dyn_msg2, h.get(), str, len, false); - parse_and_compare(dyn_msg1, dyn_msg2, h.get(), str, len, true); - delete dyn_msg1; - delete dyn_msg2; - delete factory; - - test_zig_zag(); - - printf("All tests passed, %d assertions.\n", num_assertions); - - google::protobuf::ShutdownProtobufLibrary(); - return 0; -} - -} diff --git a/tests/bindings/lua/main.c b/tests/bindings/lua/main.c new file mode 100644 index 00000000000..5b501738c15 --- /dev/null +++ b/tests/bindings/lua/main.c @@ -0,0 +1,56 @@ + +#include +#include +#include +#include + +#include "upb/bindings/lua/upb.h" + +lua_State *L; + +static void interrupt(lua_State *L, lua_Debug *ar) { + (void)ar; + lua_sethook(L, NULL, 0, 0); + luaL_error(L, "SIGINT"); +} + +static void sighandler(int i) { + fprintf(stderr, "Signal!\n"); + signal(i, SIG_DFL); + lua_sethook(L, interrupt, LUA_MASKCALL | LUA_MASKRET | LUA_MASKCOUNT, 1); +} + +const char *init = + "package.preload['lupb'] = ... " + "package.path = '" + "./?.lua;" + "./third_party/lunit/?.lua;" + "external/com_google_protobuf/?.lua;" + "external/com_google_protobuf/src/?.lua;" + "bazel-bin/external/com_google_protobuf/src/?.lua;" + "bazel-bin/external/com_google_protobuf/?.lua;" + "upb/bindings/lua/?.lua" + "'"; + +int main() { + int ret = 0; + L = luaL_newstate(); + luaL_openlibs(L); + lua_pushcfunction(L, luaopen_lupb); + ret = luaL_loadstring(L, init); + lua_pushcfunction(L, luaopen_lupb); + + signal(SIGINT, sighandler); + ret = ret || + lua_pcall(L, 1, LUA_MULTRET, 0) || + luaL_dofile(L, "tests/bindings/lua/test_upb.lua"); + signal(SIGINT, SIG_DFL); + + if (ret) { + fprintf(stderr, "error testing Lua: %s\n", lua_tostring(L, -1)); + ret = 1; + } + + lua_close(L); + return ret; +} diff --git a/tests/bindings/lua/test_upb.lua b/tests/bindings/lua/test_upb.lua index e4edda40032..25ec0c17218 100644 --- a/tests/bindings/lua/test_upb.lua +++ b/tests/bindings/lua/test_upb.lua @@ -1,6 +1,8 @@ -local upb = require "upb" +local upb = require "lupb" local lunit = require "lunit" +local test_messages_proto3 = require "google.protobuf.test_messages_proto3_pb" +local descriptor = require "google.protobuf.descriptor_pb" if _VERSION >= 'Lua 5.2' then _ENV = lunit.module("testupb", "seeall") @@ -16,460 +18,259 @@ function iter_to_array(iter) return arr end -function test_msgdef() - local f2 = upb.FieldDef{name = "field2", number = 1, type = upb.TYPE_INT32} - local o = upb.OneofDef{name = "field1", fields = {f2}} - local f = upb.FieldDef{name = "field3", number = 2, type = upb.TYPE_INT32} - - local m = upb.MessageDef{fields = {o, f}} - - assert_equal(f, m:lookup_name("field3")) - assert_equal(o, m:lookup_name("field1")) - assert_equal(f2, m:lookup_name("field2")) -end - -function test_fielddef() - local f = upb.FieldDef() - assert_false(f:is_frozen()) - assert_nil(f:number()) - assert_nil(f:name()) - assert_nil(f:type()) +function test_def_readers() + local m = test_messages_proto3.TestAllTypesProto3 + assert_equal("TestAllTypesProto3", m:name()) + assert_equal("protobuf_test_messages.proto3.TestAllTypesProto3", m:full_name()) + + -- field + local f = m:field("optional_int32") + local f2 = m:field(1) + assert_equal(f, f2) + assert_equal(1, f:number()) + assert_equal("optional_int32", f:name()) assert_equal(upb.LABEL_OPTIONAL, f:label()) + assert_equal(upb.DESCRIPTOR_TYPE_INT32, f:descriptor_type()) + assert_equal(upb.TYPE_INT32, f:type()) + assert_nil(f:containing_oneof()) + assert_equal(m, f:containing_type()) + assert_equal(0, f:default()) + + -- enum + local e = test_messages_proto3['TestAllTypesProto3.NestedEnum'] + assert_true(#e > 3 and #e < 10) + assert_equal(2, e:value("BAZ")) +end - f:set_name("foo_field") - f:set_number(3) - f:set_label(upb.LABEL_REPEATED) - f:set_type(upb.TYPE_FLOAT) - - assert_equal("foo_field", f:name()) - assert_equal(3, f:number()) - assert_equal(upb.LABEL_REPEATED, f:label()) - assert_equal(upb.TYPE_FLOAT, f:type()) - - local f2 = upb.FieldDef{ - name = "foo", number = 5, type = upb.TYPE_DOUBLE, label = upb.LABEL_REQUIRED - } - - assert_equal("foo", f2:name()) - assert_equal(5, f2:number()) - assert_equal(upb.TYPE_DOUBLE, f2:type()) - assert_equal(upb.LABEL_REQUIRED, f2:label()) +function test_msg_map() + msg = test_messages_proto3.TestAllTypesProto3() + msg.map_int32_int32[5] = 10 + msg.map_int32_int32[6] = 12 + assert_equal(10, msg.map_int32_int32[5]) + assert_equal(12, msg.map_int32_int32[6]) + + -- Test overwrite. + msg.map_int32_int32[5] = 20 + assert_equal(20, msg.map_int32_int32[5]) + assert_equal(12, msg.map_int32_int32[6]) + msg.map_int32_int32[5] = 10 + + -- Test delete. + msg.map_int32_int32[5] = nil + assert_nil(msg.map_int32_int32[5]) + assert_equal(12, msg.map_int32_int32[6]) + msg.map_int32_int32[5] = 10 + + local serialized = upb.encode(msg) + assert_true(#serialized > 0) + local msg2 = upb.decode(test_messages_proto3.TestAllTypesProto3, serialized) + assert_equal(10, msg2.map_int32_int32[5]) + assert_equal(12, msg2.map_int32_int32[6]) end -function test_enumdef() - local e = upb.EnumDef() - assert_equal(0, #e) - assert_nil(e:value(5)) - assert_nil(e:value("NONEXISTENT_NAME")) +function test_msg_string_map() + msg = test_messages_proto3.TestAllTypesProto3() + msg.map_string_string["foo"] = "bar" + msg.map_string_string["baz"] = "quux" + assert_nil(msg.map_string_string["abc"]) + assert_equal("bar", msg.map_string_string["foo"]) + assert_equal("quux", msg.map_string_string["baz"]) + + -- Test overwrite. + msg.map_string_string["foo"] = "123" + assert_equal("123", msg.map_string_string["foo"]) + assert_equal("quux", msg.map_string_string["baz"]) + msg.map_string_string["foo"] = "bar" + + -- Test delete + msg.map_string_string["foo"] = nil + assert_nil(msg.map_string_string["foo"]) + assert_equal("quux", msg.map_string_string["baz"]) + msg.map_string_string["foo"] = "bar" + + local serialized = upb.encode(msg) + assert_true(#serialized > 0) + local msg2 = upb.decode(test_messages_proto3.TestAllTypesProto3, serialized) + assert_equal("bar", msg2.map_string_string["foo"]) + assert_equal("quux", msg2.map_string_string["baz"]) +end - for name, value in e:values() do - fail() - end +function test_msg_array() + msg = test_messages_proto3.TestAllTypesProto3() - e:add("VAL1", 1) - e:add("VAL2", 2) + assert_not_nil(msg.repeated_int32) + assert_equal(msg.repeated_int32, msg.repeated_int32) + assert_equal(0, #msg.repeated_int32) - local values = {} - for name, value in e:values() do - values[name] = value - end + msg.repeated_int32[1] = 2 + assert_equal(1, #msg.repeated_int32); + assert_equal(2, msg.repeated_int32[1]); - assert_equal(1, values["VAL1"]) - assert_equal(2, values["VAL2"]) + -- Can't assign a scalar; array is expected. + assert_error_match("lupb.array expected", function() msg.repeated_int32 = 5 end) - local e2 = upb.EnumDef{ - values = { - {"FOO", 1}, - {"BAR", 77}, - } - } + -- Can't assign array of the wrong type. + local function assign_int64() + msg.repeated_int32 = upb.Array(upb.TYPE_INT64) + end + assert_error_match("array type mismatch", assign_int64) - assert_equal(1, e2:value("FOO")) - assert_equal(77, e2:value("BAR")) - assert_equal("FOO", e2:value(1)) - assert_equal("BAR", e2:value(77)) - - e2:freeze() - - local f = upb.FieldDef{type = upb.TYPE_ENUM} - - -- No default set and no EnumDef to get a default from. - assert_equal(f:default(), nil) - - f:set_subdef(upb.EnumDef()) - -- No default to pull in from the EnumDef. - assert_equal(f:default(), nil) - - f:set_subdef(e2) - -- First member added to e2. - assert_equal(f:default(), "FOO") - - f:set_subdef(nil) - assert_equal(f:default(), nil) - - f:set_default(1) - assert_equal(f:default(), 1) - - f:set_default("YOYOYO") - assert_equal(f:default(), "YOYOYO") - - f:set_subdef(e2) - f:set_default(1) - -- It prefers to return a string, and could resolve the explicit "1" we set - -- it to to the string value. - assert_equal(f:default(), "FOO") - - -- FieldDef can specify default value by name or number, but the value must - -- exist at freeze time. - local m1 = upb.build_defs{ - upb.MessageDef{ - full_name = "A", - fields = { - upb.FieldDef{ - name = "f1", - number = 1, - type = upb.TYPE_ENUM, - subdef = e2, - default = "BAR" - }, - upb.FieldDef{ - name = "f2", - number = 2, - type = upb.TYPE_ENUM, - subdef = e2, - default = 77 - } - } - } - } + local arr = upb.Array(upb.TYPE_INT32) + arr[1] = 6 + assert_equal(1, #arr) + msg.repeated_int32 = arr + assert_equal(msg.repeated_int32, msg.repeated_int32) + assert_equal(arr, msg.repeated_int32) + assert_equal(1, #msg.repeated_int32) + assert_equal(6, msg.repeated_int32[1]) - assert_equal(m1:field("f1"):default(), "BAR") - assert_equal(m1:field("f1"):default(), "BAR") - - assert_error_match( - "enum default for field A.f1 .DOESNT_EXIST. is not in the enum", - function() - local m1 = upb.build_defs{ - upb.MessageDef{ - full_name = "A", - fields = { - upb.FieldDef{ - name = "f1", - number = 1, - type = upb.TYPE_ENUM, - subdef = e2, - default = "DOESNT_EXIST" - } - } - } - } - end - ) - - assert_error_match( - "enum default for field A.f1 .142. is not in the enum", - function() - local m1 = upb.build_defs{ - upb.MessageDef{ - full_name = "A", - fields = { - upb.FieldDef{ - name = "f1", - number = 1, - type = upb.TYPE_ENUM, - subdef = e2, - default = 142 - } - } - } - } - end - ) + -- Can't assign other Lua types. + assert_error_match("array expected", function() msg.repeated_int32 = "abc" end) + assert_error_match("array expected", function() msg.repeated_int32 = true end) + assert_error_match("array expected", function() msg.repeated_int32 = false end) + assert_error_match("array expected", function() msg.repeated_int32 = nil end) + assert_error_match("array expected", function() msg.repeated_int32 = {} end) + assert_error_match("array expected", function() msg.repeated_int32 = print end) end -function test_empty_msgdef() - local md = upb.MessageDef() - assert_nil(md:full_name()) -- Def without name is anonymous. - assert_false(md:is_frozen()) - assert_equal(0, #md) - assert_nil(md:field("nonexistent_field")) - assert_nil(md:field(3)) - for field in md:fields() do - fail() - end +function test_msg_submsg() + --msg = test_messages_proto3.TestAllTypesProto3() + msg = test_messages_proto3['TestAllTypesProto3']() - upb.freeze(md) - assert_true(md:is_frozen()) - assert_equal(0, #md) - assert_nil(md:field("nonexistent_field")) - assert_nil(md:field(3)) - for field in md:fields() do - fail() - end -end + assert_nil(msg.optional_nested_message) -function test_msgdef_constructor() - local f1 = upb.FieldDef{name = "field1", number = 7, type = upb.TYPE_INT32} - local f2 = upb.FieldDef{name = "field2", number = 8, type = upb.TYPE_INT32} - local md = upb.MessageDef{ - full_name = "TestMessage", - fields = {f1, f2} - } - assert_equal("TestMessage", md:full_name()) - assert_false(md:is_frozen()) - assert_equal(2, #md) - assert_equal(f1, md:field("field1")) - assert_equal(f2, md:field("field2")) - assert_equal(f1, md:field(7)) - assert_equal(f2, md:field(8)) - local count = 0 - local found = {} - for field in md:fields() do - count = count + 1 - found[field] = true + -- Can't assign message of the wrong type. + local function assign_int64() + msg.optional_nested_message = test_messages_proto3.TestAllTypesProto3() end - assert_equal(2, count) - assert_true(found[f1]) - assert_true(found[f2]) + assert_error_match("message type mismatch", assign_int64) - upb.freeze(md) -end + local nested = test_messages_proto3['TestAllTypesProto3.NestedMessage']() + msg.optional_nested_message = nested + assert_equal(nested, msg.optional_nested_message) -function test_iteration() - -- Test that we cannot crash the process even if we modify the set of fields - -- during iteration. - local md = upb.MessageDef{full_name = "TestMessage"} - - for i=1,10 do - md:add(upb.FieldDef{ - name = "field" .. tostring(i), - number = 1000 - i, - type = upb.TYPE_INT32 - }) - end + -- Can't assign other Lua types. + assert_error_match("msg expected", function() msg.optional_nested_message = "abc" end) + assert_error_match("msg expected", function() msg.optional_nested_message = true end) + assert_error_match("msg expected", function() msg.optional_nested_message = false end) + assert_error_match("msg expected", function() msg.optional_nested_message = nil end) + assert_error_match("msg expected", function() msg.optional_nested_message = {} end) + assert_error_match("msg expected", function() msg.optional_nested_message = print end) +end - local add = #md - for f in md:fields() do - if add > 0 then - add = add - 1 - for i=10000,11000 do - local field_name = "field" .. tostring(i) - -- We want to add fields to the table to trigger a table resize, - -- but we must skip it if the field name or number already exists - -- otherwise it will raise an error. - if md:field(field_name) == nil and - md:field(i) == nil then - md:add(upb.FieldDef{ - name = field_name, - number = i, - type = upb.TYPE_INT32 - }) - end - end - end +-- Lua 5.1 and 5.2 have slightly different semantics for how a finalizer +-- can be defined in Lua. +if _VERSION >= 'Lua 5.2' then + function defer(fn) + setmetatable({}, { __gc = fn }) end - - -- Test that iterators don't crash the process even if the MessageDef goes - -- out of scope. - -- - -- Note: have previously verified that this can indeed crash the process if - -- we do not explicitly add a reference from the iterator to the underlying - -- MessageDef. - local iter = md:fields() - md = nil - collectgarbage() - while iter() do +else + function defer(fn) + getmetatable(newproxy(true)).__gc = fn end +end - local ed = upb.EnumDef{ - values = { - {"FOO", 1}, - {"BAR", 77}, +function test_finalizer() + -- Tests that we correctly handle a call into an already-finalized object. + -- Collectible objects are finalized in the opposite order of creation. + do + local t = {} + defer(function() + assert_error_match("called into dead object", function() + -- Generic def call. + t[1]:lookup_msg("abc") + end) + end) + t = { + upb.SymbolTable(), } - } - iter = ed:values() - ed = nil - collectgarbage() - while iter() do end + collectgarbage() end -function test_msgdef_setters() - local md = upb.MessageDef() - md:set_full_name("Message1") - assert_equal("Message1", md:full_name()) - local f = upb.FieldDef{name = "field1", number = 3, type = upb.TYPE_DOUBLE} - md:add(f) - assert_equal(1, #md) - assert_equal(f, md:field("field1")) -end - -function test_msgdef_errors() - assert_error(function() upb.MessageDef{bad_initializer_key = 5} end) - local md = upb.MessageDef() - assert_error(function() - -- Duplicate field number. - upb.MessageDef{ - fields = { - upb.FieldDef{name = "field1", number = 1, type = upb.TYPE_INT32}, - upb.FieldDef{name = "field2", number = 1, type = upb.TYPE_INT32} - } - } - end) - assert_error(function() - -- Duplicate field name. - upb.MessageDef{ - fields = { - upb.FieldDef{name = "field1", number = 1, type = upb.TYPE_INT32}, - upb.FieldDef{name = "field1", number = 2, type = upb.TYPE_INT32} - } - } - end) - - assert_error(function() - -- Duplicate field name. - upb.MessageDef{ - fields = { - upb.OneofDef{name = "field1", fields = { - upb.FieldDef{name = "field2", number = 1, type = upb.TYPE_INT32}, - }}, - upb.FieldDef{name = "field2", number = 2, type = upb.TYPE_INT32} - } - } - end) - - -- attempt to set a name with embedded NULLs. - assert_error_match("names cannot have embedded NULLs", function() - md:set_full_name("abc\0def") - end) - - upb.freeze(md) - -- Attempt to mutate frozen MessageDef. - assert_error_match("frozen", function() - md:add(upb.FieldDef{name = "field1", number = 1, type = upb.TYPE_INT32}) - end) - assert_error_match("frozen", function() - md:set_full_name("abc") - end) - - -- Attempt to freeze a msgdef without freezing its subdef. - assert_error_match("is not frozen or being frozen", function() - m1 = upb.MessageDef() - upb.freeze( - upb.MessageDef{ - fields = { - upb.FieldDef{name = "f1", number = 1, type = upb.TYPE_MESSAGE, - subdef = m1} - } - } - ) - end) -end +-- in-range of 64-bit types but not exactly representable as double +local bad64 = 2^68 - 1 + +local numeric_types = { + [upb.TYPE_UINT32] = { + valid_val = 2^32 - 1, + too_big = 2^32, + too_small = -1, + other_bad = 5.1 + }, + [upb.TYPE_UINT64] = { + valid_val = 2^63, + too_big = 2^64, + too_small = -1, + other_bad = bad64 + }, + [upb.TYPE_INT32] = { + valid_val = 2^31 - 1, + too_big = 2^31, + too_small = -2^31 - 1, + other_bad = 5.1 + }, + -- Enums don't exist at a language level in Lua, so we just represent enum + -- values as int32s. + [upb.TYPE_ENUM] = { + valid_val = 2^31 - 1, + too_big = 2^31, + too_small = -2^31 - 1, + other_bad = 5.1 + }, + [upb.TYPE_INT64] = { + valid_val = 2^62, + too_big = 2^63, + too_small = -2^64, + other_bad = bad64 + }, + [upb.TYPE_FLOAT] = { + valid_val = 340282306073709652508363335590014353408 + }, + [upb.TYPE_DOUBLE] = { + valid_val = 10^101 + }, +} -function test_symtab() - local empty = upb.SymbolTable() - assert_equal(0, #iter_to_array(empty:defs(upb.DEF_ANY))) - assert_equal(0, #iter_to_array(empty:defs(upb.DEF_MSG))) - assert_equal(0, #iter_to_array(empty:defs(upb.DEF_ENUM))) - - local symtab = upb.SymbolTable{ - upb.MessageDef{full_name = "TestMessage"}, - upb.MessageDef{full_name = "ContainingMessage", fields = { - upb.FieldDef{name = "field1", number = 1, type = upb.TYPE_INT32}, - upb.FieldDef{name = "field2", number = 2, type = upb.TYPE_MESSAGE, - subdef_name = ".TestMessage"} - } - } +function test_msg_primitives() + local msg = test_messages_proto3.TestAllTypesProto3{ + optional_int32 = 10, + optional_uint32 = 20, + optional_int64 = 30, + optional_uint64 = 40, + optional_double = 50, + optional_float = 60, + optional_sint32 = 70, + optional_sint64 = 80, + optional_fixed32 = 90, + optional_fixed64 = 100, + optional_sfixed32 = 110, + optional_sfixed64 = 120, + optional_bool = true, + optional_string = "abc", + optional_nested_message = test_messages_proto3['TestAllTypesProto3.NestedMessage']{a = 123}, } - local msgdef1 = symtab:lookup("TestMessage") - local msgdef2 = symtab:lookup("ContainingMessage") - assert_not_nil(msgdef1) - assert_not_nil(msgdef2) - assert_equal(msgdef1, msgdef2:field("field2"):subdef()) - assert_true(msgdef1:is_frozen()) - assert_true(msgdef2:is_frozen()) - - symtab:add{ - upb.MessageDef{full_name = "ContainingMessage2", fields = { - upb.FieldDef{name = "field5", number = 5, type = upb.TYPE_MESSAGE, - subdef = msgdef2} - } - } - } + -- Attempts to access non-existent fields fail. + assert_error_match("no such field", function() msg.no_such = 1 end) - local msgdef3 = symtab:lookup("ContainingMessage2") - assert_not_nil(msgdef3) - assert_equal(msgdef3:field("field5"):subdef(), msgdef2) + assert_equal(10, msg.optional_int32) + assert_equal(20, msg.optional_uint32) + assert_equal(30, msg.optional_int64) + assert_equal(40, msg.optional_uint64) + assert_equal(50, msg.optional_double) + assert_equal(60, msg.optional_float) + assert_equal(70, msg.optional_sint32) + assert_equal(80, msg.optional_sint64) + assert_equal(90, msg.optional_fixed32) + assert_equal(100, msg.optional_fixed64) + assert_equal(110, msg.optional_sfixed32) + assert_equal(120, msg.optional_sfixed64) + assert_equal(true, msg.optional_bool) + assert_equal("abc", msg.optional_string) + assert_equal(123, msg.optional_nested_message.a) end -function test_numeric_array() - local function test_for_numeric_type(upb_type, val, too_big, too_small, bad3) - local array = upb.Array(upb_type) - assert_equal(0, #array) - - -- 0 is never a valid index in Lua. - assert_error_match("array index", function() return array[0] end) - -- Past the end of the array. - assert_error_match("array index", function() return array[1] end) - - array[1] = val - assert_equal(val, array[1]) - assert_equal(1, #array) - assert_equal(val, array[1]) - -- Past the end of the array. - assert_error_match("array index", function() return array[2] end) - - array[2] = 10 - assert_equal(val, array[1]) - assert_equal(10, array[2]) - assert_equal(2, #array) - -- Past the end of the array. - assert_error_match("array index", function() return array[3] end) - - local n = 1 - for i, val in upb.ipairs(array) do - assert_equal(n, i) - n = n + 1 - assert_equal(array[i], val) - end - - -- Values that are out of range. - local errmsg = "not an integer or out of range" - if too_small then - assert_error_match(errmsg, function() array[3] = too_small end) - end - if too_big then - assert_error_match(errmsg, function() array[3] = too_big end) - end - if bad3 then - assert_error_match(errmsg, function() array[3] = bad3 end) - end - - -- Can't assign other Lua types. - errmsg = "bad argument #3" - assert_error_match(errmsg, function() array[3] = "abc" end) - assert_error_match(errmsg, function() array[3] = true end) - assert_error_match(errmsg, function() array[3] = false end) - assert_error_match(errmsg, function() array[3] = nil end) - assert_error_match(errmsg, function() array[3] = {} end) - assert_error_match(errmsg, function() array[3] = print end) - assert_error_match(errmsg, function() array[3] = array end) - end - - -- in-range of 64-bit types but not exactly representable as double - local bad64 = 2^68 - 1 - - test_for_numeric_type(upb.TYPE_UINT32, 2^32 - 1, 2^32, -1, 5.1) - test_for_numeric_type(upb.TYPE_UINT64, 2^63, 2^64, -1, bad64) - test_for_numeric_type(upb.TYPE_INT32, 2^31 - 1, 2^31, -2^31 - 1, 5.1) - -- Enums don't exist at a language level in Lua, so we just represent enum - -- values as int32s. - test_for_numeric_type(upb.TYPE_ENUM, 2^31 - 1, 2^31, -2^31 - 1, 5.1) - test_for_numeric_type(upb.TYPE_INT64, 2^62, 2^63, -2^64, bad64) - test_for_numeric_type(upb.TYPE_FLOAT, 340282306073709652508363335590014353408) - test_for_numeric_type(upb.TYPE_DOUBLE, 10^101) -end function test_string_array() local function test_for_string_type(upb_type) @@ -497,14 +298,6 @@ function test_string_array() -- Past the end of the array. assert_error_match("array index", function() return array[3] end) - local n = 1 - for i, val in upb.ipairs(array) do - assert_equal(n, i) - n = n + 1 - assert_equal(array[i], val) - end - assert_equal(3, n) - -- Can't assign other Lua types. assert_error_match("Expected string", function() array[3] = 123 end) assert_error_match("Expected string", function() array[3] = true end) @@ -519,228 +312,127 @@ function test_string_array() test_for_string_type(upb.TYPE_BYTES) end -function test_msg_primitives() - local function test_for_numeric_type(upb_type, val, too_big, too_small, bad3) - local symtab = upb.SymbolTable{ - upb.MessageDef{full_name = "TestMessage", fields = { - upb.FieldDef{name = "f", number = 1, type = upb_type}, - } - } - } - - factory = upb.MessageFactory(symtab) - TestMessage = factory:get_message_class("TestMessage") - msg = TestMessage() +function test_numeric_array() + local function test_for_numeric_type(upb_type) + local array = upb.Array(upb_type) + local vals = numeric_types[upb_type] + assert_equal(0, #array) - -- Defaults to zero - assert_equal(0, msg.f) + -- 0 is never a valid index in Lua. + assert_error_match("array index", function() return array[0] end) + -- Past the end of the array. + assert_error_match("array index", function() return array[1] end) - msg.f = 0 - assert_equal(0, msg.f) + array[1] = vals.valid_val + assert_equal(vals.valid_val, array[1]) + assert_equal(1, #array) + assert_equal(vals.valid_val, array[1]) + -- Past the end of the array. + assert_error_match("array index", function() return array[2] end) - msg.f = val - assert_equal(val, msg.f) + array[2] = 10 + assert_equal(vals.valid_val, array[1]) + assert_equal(10, array[2]) + assert_equal(2, #array) + -- Past the end of the array. + assert_error_match("array index", function() return array[3] end) + -- Values that are out of range. local errmsg = "not an integer or out of range" - if too_small then - assert_error_match(errmsg, function() msg.f = too_small end) + if vals.too_small then + assert_error_match(errmsg, function() array[3] = vals.too_small end) end - if too_big then - assert_error_match(errmsg, function() msg.f = too_big end) + if vals.too_big then + assert_error_match(errmsg, function() array[3] = vals.too_big end) end - if bad3 then - assert_error_match(errmsg, function() msg.f = bad3 end) + if vals.other_bad then + assert_error_match(errmsg, function() array[3] = vals.other_bad end) end -- Can't assign other Lua types. errmsg = "bad argument #3" - assert_error_match(errmsg, function() msg.f = "abc" end) - assert_error_match(errmsg, function() msg.f = true end) - assert_error_match(errmsg, function() msg.f = false end) - assert_error_match(errmsg, function() msg.f = nil end) - assert_error_match(errmsg, function() msg.f = {} end) - assert_error_match(errmsg, function() msg.f = print end) - assert_error_match(errmsg, function() msg.f = array end) + assert_error_match(errmsg, function() array[3] = "abc" end) + assert_error_match(errmsg, function() array[3] = true end) + assert_error_match(errmsg, function() array[3] = false end) + assert_error_match(errmsg, function() array[3] = nil end) + assert_error_match(errmsg, function() array[3] = {} end) + assert_error_match(errmsg, function() array[3] = print end) + assert_error_match(errmsg, function() array[3] = array end) end - local symtab = upb.SymbolTable{ - upb.MessageDef{full_name = "TestMessage", fields = { - upb.FieldDef{ - name = "i32", number = 1, type = upb.TYPE_INT32, default = 1}, - upb.FieldDef{ - name = "u32", number = 2, type = upb.TYPE_UINT32, default = 2}, - upb.FieldDef{ - name = "i64", number = 3, type = upb.TYPE_INT64, default = 3}, - upb.FieldDef{ - name = "u64", number = 4, type = upb.TYPE_UINT64, default = 4}, - upb.FieldDef{ - name = "dbl", number = 5, type = upb.TYPE_DOUBLE, default = 5}, - upb.FieldDef{ - name = "flt", number = 6, type = upb.TYPE_FLOAT, default = 6}, - upb.FieldDef{ - name = "bool", number = 7, type = upb.TYPE_BOOL, default = true}, - } - } - } - - factory = upb.MessageFactory(symtab) - TestMessage = factory:get_message_class("TestMessage") - msg = TestMessage() - - -- Unset member returns default value. - -- TODO(haberman): re-enable these when we have descriptor-based reflection. - -- assert_equal(1, msg.i32) - -- assert_equal(2, msg.u32) - -- assert_equal(3, msg.i64) - -- assert_equal(4, msg.u64) - -- assert_equal(5, msg.dbl) - -- assert_equal(6, msg.flt) - -- assert_equal(true, msg.bool) - - -- Attempts to access non-existent fields fail. - assert_error_match("no such field", function() msg.no_such = 1 end) - - msg.i32 = 10 - msg.u32 = 20 - msg.i64 = 30 - msg.u64 = 40 - msg.dbl = 50 - msg.flt = 60 - msg.bool = true - - assert_equal(10, msg.i32) - assert_equal(20, msg.u32) - assert_equal(30, msg.i64) - assert_equal(40, msg.u64) - assert_equal(50, msg.dbl) - assert_equal(60, msg.flt) - assert_equal(true, msg.bool) - - test_for_numeric_type(upb.TYPE_UINT32, 2^32 - 1, 2^32, -1, 5.1) - test_for_numeric_type(upb.TYPE_UINT64, 2^62, 2^64, -1, bad64) - test_for_numeric_type(upb.TYPE_INT32, 2^31 - 1, 2^31, -2^31 - 1, 5.1) - test_for_numeric_type(upb.TYPE_INT64, 2^61, 2^63, -2^64, bad64) - test_for_numeric_type(upb.TYPE_FLOAT, 2^20) - test_for_numeric_type(upb.TYPE_DOUBLE, 10^101) -end - -function test_msg_array() - local symtab = upb.SymbolTable{ - upb.MessageDef{full_name = "TestMessage", fields = { - upb.FieldDef{name = "i32_array", number = 1, type = upb.TYPE_INT32, - label = upb.LABEL_REPEATED}, - } - } - } - - factory = upb.MessageFactory(symtab) - TestMessage = factory:get_message_class("TestMessage") - msg = TestMessage() - - assert_nil(msg.i32_array) - - -- Can't assign a scalar; array is expected. - assert_error_match("lupb.array expected", function() msg.i32_array = 5 end) - - -- Can't assign array of the wrong type. - local function assign_int64() - msg.i32_array = upb.Array(upb.TYPE_INT64) + for k in pairs(numeric_types) do + test_for_numeric_type(k) end - assert_error_match("Array had incorrect type", assign_int64) - - local arr = upb.Array(upb.TYPE_INT32) - msg.i32_array = arr - assert_equal(arr, msg.i32_array) - - -- Can't assign other Lua types. - assert_error_match("array expected", function() msg.i32_array = "abc" end) - assert_error_match("array expected", function() msg.i32_array = true end) - assert_error_match("array expected", function() msg.i32_array = false end) - assert_error_match("array expected", function() msg.i32_array = nil end) - assert_error_match("array expected", function() msg.i32_array = {} end) - assert_error_match("array expected", function() msg.i32_array = print end) end -function test_msg_submsg() - local symtab = upb.SymbolTable{ - upb.MessageDef{full_name = "TestMessage", fields = { - upb.FieldDef{name = "submsg", number = 1, type = upb.TYPE_MESSAGE, - subdef_name = ".SubMessage"}, - } - }, - upb.MessageDef{full_name = "SubMessage"} - } +function test_numeric_map() + local function test_for_numeric_types(key_type, val_type) + local map = upb.Map(key_type, val_type) + local key_vals = numeric_types[key_type] + local val_vals = numeric_types[val_type] - factory = upb.MessageFactory(symtab) - TestMessage = factory:get_message_class("TestMessage") - SubMessage = factory:get_message_class("SubMessage") - msg = TestMessage() + assert_equal(0, #map) - assert_nil(msg.submsg) + -- Unset keys return nil + assert_nil(map[key_vals.valid_val]) - -- Can't assign message of the wrong type. - local function assign_int64() - msg.submsg = TestMessage() - end - assert_error_match("Message had incorrect type", assign_int64) + map[key_vals.valid_val] = val_vals.valid_val + assert_equal(1, #map) + assert_equal(val_vals.valid_val, map[key_vals.valid_val]) - local sub = SubMessage() - msg.submsg = sub - assert_equal(sub, msg.submsg) + i = 0 + for k, v in pairs(map) do + assert_equal(key_vals.valid_val, k) + assert_equal(val_vals.valid_val, v) + end - -- Can't assign other Lua types. - assert_error_match("msg expected", function() msg.submsg = "abc" end) - assert_error_match("msg expected", function() msg.submsg = true end) - assert_error_match("msg expected", function() msg.submsg = false end) - assert_error_match("msg expected", function() msg.submsg = nil end) - assert_error_match("msg expected", function() msg.submsg = {} end) - assert_error_match("msg expected", function() msg.submsg = print end) -end + -- Out of range key/val + local errmsg = "not an integer or out of range" + if key_vals.too_small then + assert_error_match(errmsg, function() map[key_vals.too_small] = 1 end) + end + if key_vals.too_big then + assert_error_match(errmsg, function() map[key_vals.too_big] = 1 end) + end + if key_vals.other_bad then + assert_error_match(errmsg, function() map[key_vals.other_bad] = 1 end) + end --- Lua 5.1 and 5.2 have slightly different semantics for how a finalizer --- can be defined in Lua. -if _VERSION >= 'Lua 5.2' then - function defer(fn) - setmetatable({}, { __gc = fn }) + if val_vals.too_small then + assert_error_match(errmsg, function() map[1] = val_vals.too_small end) + end + if val_vals.too_big then + assert_error_match(errmsg, function() map[1] = val_vals.too_big end) + end + if val_vals.other_bad then + assert_error_match(errmsg, function() map[1] = val_vals.other_bad end) + end end -else - function defer(fn) - getmetatable(newproxy(true)).__gc = fn + + for k in pairs(numeric_types) do + for v in pairs(numeric_types) do + test_for_numeric_types(k, v) + end end end -function test_finalizer() - -- Tests that we correctly handle a call into an already-finalized object. - -- Collectible objects are finalized in the opposite order of creation. - do - local t = {} - defer(function() - assert_error_match("called into dead object", function() - -- Generic def call. - t[1]:full_name() - end) - assert_error_match("called into dead object", function() - -- Specific msgdef call. - t[1]:add() - end) - assert_error_match("called into dead object", function() - t[2]:values() - end) - assert_error_match("called into dead object", function() - t[3]:number() - end) - assert_error_match("called into dead object", function() - t[4]:lookup() - end) - end) - t = { - upb.MessageDef(), - upb.EnumDef(), - upb.FieldDef(), - upb.SymbolTable(), - } - end - collectgarbage() +function test_foo() + local symtab = upb.SymbolTable() + local filename = "external/com_google_protobuf/descriptor_proto-descriptor-set.proto.bin" + local file = io.open(filename, "rb") or io.open("bazel-bin/" .. filename, "rb") + assert_not_nil(file) + local descriptor = file:read("*a") + assert_true(#descriptor > 0) + symtab:add_set(descriptor) + local FileDescriptorSet = symtab:lookup_msg("google.protobuf.FileDescriptorSet") + assert_not_nil(FileDescriptorSet) + set = FileDescriptorSet() + assert_equal(#set.file, 0) + assert_error_match("lupb.array expected", function () set.file = 1 end) + + set = upb.decode(FileDescriptorSet, descriptor) + assert_equal(#set.file, 1) + assert_equal(set.file[1].name, "google/protobuf/descriptor.proto") end local stats = lunit.main() diff --git a/tests/bindings/lua/test_upb.pb.lua b/tests/bindings/lua/test_upb.pb.lua deleted file mode 100644 index ea6de099895..00000000000 --- a/tests/bindings/lua/test_upb.pb.lua +++ /dev/null @@ -1,80 +0,0 @@ - --- Require "pb" first to ensure that the transitive require of "upb" is --- handled properly by the "pb" module. -local pb = require "upb.pb" -local upb = require "upb" -local lunit = require "lunit" - -if _VERSION >= 'Lua 5.2' then - _ENV = lunit.module("testupb_pb", "seeall") -else - module("testupb_pb", lunit.testcase, package.seeall) -end - -local symtab = upb.SymbolTable{ - upb.MessageDef{full_name = "TestMessage", fields = { - upb.FieldDef{name = "i32", number = 1, type = upb.TYPE_INT32}, - upb.FieldDef{name = "u32", number = 2, type = upb.TYPE_UINT32}, - upb.FieldDef{name = "i64", number = 3, type = upb.TYPE_INT64}, - upb.FieldDef{name = "u64", number = 4, type = upb.TYPE_UINT64}, - upb.FieldDef{name = "dbl", number = 5, type = upb.TYPE_DOUBLE}, - upb.FieldDef{name = "flt", number = 6, type = upb.TYPE_FLOAT}, - upb.FieldDef{name = "bool", number = 7, type = upb.TYPE_BOOL}, - } - } -} - -local factory = upb.MessageFactory(symtab); -local TestMessage = factory:get_message_class("TestMessage") - -function test_parse_primitive() - local binary_pb = - "\008\128\128\128\128\002\016\128\128\128\128\004\024\128\128" - .. "\128\128\128\128\128\002\032\128\128\128\128\128\128\128\001\041\000" - .. "\000\000\000\000\000\248\063\053\000\000\096\064\056\001" - local msg = TestMessage() - pb.decode(msg, binary_pb) - assert_equal(536870912, msg.i32) - assert_equal(1073741824, msg.u32) - assert_equal(1125899906842624, msg.i64) - assert_equal(562949953421312, msg.u64) - assert_equal(1.5, msg.dbl) - assert_equal(3.5, msg.flt) - assert_equal(true, msg.bool) - - local encoded = pb.encode(msg) - local msg2 = TestMessage() - pb.decode(msg2, encoded) - assert_equal(536870912, msg.i32) - assert_equal(1073741824, msg.u32) - assert_equal(1125899906842624, msg.i64) - assert_equal(562949953421312, msg.u64) - assert_equal(1.5, msg.dbl) - assert_equal(3.5, msg.flt) - assert_equal(true, msg.bool) -end - -function test_parse_string() - local symtab = upb.SymbolTable{ - upb.MessageDef{full_name = "TestMessage", fields = { - upb.FieldDef{name = "str", number = 1, type = upb.TYPE_STRING}, - } - } - } - - local factory = upb.MessageFactory(symtab); - local TestMessage = factory:get_message_class("TestMessage") - - local binary_pb = "\010\005Hello" - msg = TestMessage() - pb.decode(msg, binary_pb) - -- TODO(haberman): re-enable when this stuff works better. - -- assert_equal("Hello", msg.str) -end - - -local stats = lunit.main() - -if stats.failed > 0 or stats.errors > 0 then - error("One or more errors in test suite") -end diff --git a/tests/bindings/ruby/upb.rb b/tests/bindings/ruby/upb.rb deleted file mode 100644 index 3e06c1798c6..00000000000 --- a/tests/bindings/ruby/upb.rb +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/ruby -# -# Tests for Ruby upb extension. - -require 'test/unit' -require 'set' -require 'upb' - -def get_descriptor - File.open("upb/descriptor/descriptor.pb").read -end - -def load_descriptor - symtab = Upb::SymbolTable.new - symtab.load_descriptor(get_descriptor()) - return symtab -end - -def get_message_class(name) - return Upb.get_message_class(load_descriptor().lookup(name)) -end - -class TestRubyExtension < Test::Unit::TestCase - def test_parsedescriptor - msgdef = load_descriptor.lookup("google.protobuf.FileDescriptorSet") - assert_instance_of(Upb::MessageDef, msgdef) - - file_descriptor_set = Upb.get_message_class(msgdef) - msg = file_descriptor_set.parse(get_descriptor()) - - # A couple message types we know should exist. - names = Set.new(["DescriptorProto", "FieldDescriptorProto"]) - - msg.file.each { |file| - file.message_type.each { |message_type| - names.delete(message_type.name) - } - } - - assert_equal(0, names.size) - end - - def test_parseserialize - field_descriptor_proto = get_message_class("google.protobuf.FieldDescriptorProto") - field_options = get_message_class("google.protobuf.FieldOptions") - - field = field_descriptor_proto.new - - field.name = "MyName" - field.number = 5 - field.options = field_options.new - field.options.packed = true - - serialized = Upb::Message.serialize(field) - - field2 = field_descriptor_proto.parse(serialized) - - assert_equal("MyName", field2.name) - assert_equal(5, field2.number) - assert_equal(true, field2.options.packed) - end -end diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index 6063c9941ed..39614b03e44 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -9,9 +9,16 @@ #include #include "conformance/conformance.upb.h" -#include "src/google/protobuf/test_messages_proto3.upb.h" +#include "conformance/conformance.upbdefs.h" +#include "src/google/protobuf/test_messages_proto2.upbdefs.h" +#include "src/google/protobuf/test_messages_proto3.upbdefs.h" +#include "upb/decode.h" +#include "upb/encode.h" +#include "upb/reflection.h" +#include "upb/textencode.h" int test_count = 0; +bool verbose = false; /* Set to true to get req/resp printed on stderr. */ bool CheckedRead(int fd, void *buf, size_t len) { size_t ofs = 0; @@ -39,138 +46,178 @@ void CheckedWrite(int fd, const void *buf, size_t len) { } } -bool strview_eql(upb_strview view, const char *str) { - return view.size == strlen(str) && memcmp(view.data, str, view.size) == 0; +typedef struct { + const conformance_ConformanceRequest *request; + conformance_ConformanceResponse *response; + upb_arena *arena; + const upb_symtab *symtab; +} ctx; + +bool parse_proto(upb_msg *msg, const upb_msgdef *m, const ctx* c) { + upb_strview proto = + conformance_ConformanceRequest_protobuf_payload(c->request); + if (upb_decode(proto.data, proto.size, msg, upb_msgdef_layout(m), c->arena)) { + return true; + } else { + static const char msg[] = "Parse error"; + conformance_ConformanceResponse_set_parse_error( + c->response, upb_strview_make(msg, strlen(msg))); + return false; + } } -static const char *proto3_msg = - "protobuf_test_messages.proto3.TestAllTypesProto3"; - -void DoTest( - const conformance_ConformanceRequest* request, - conformance_ConformanceResponse *response, - upb_arena *arena) { - protobuf_test_messages_proto3_TestAllTypesProto3 *test_message; - - if (!strview_eql(conformance_ConformanceRequest_message_type(request), - proto3_msg)) { - static const char msg[] = "Only proto3 for now."; - conformance_ConformanceResponse_set_skipped( - response, upb_strview_make(msg, sizeof(msg))); - return; +void serialize_proto(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { + size_t len; + char *data = upb_encode(msg, upb_msgdef_layout(m), c->arena, &len); + if (data) { + conformance_ConformanceResponse_set_protobuf_payload( + c->response, upb_strview_make(data, len)); + } else { + static const char msg[] = "Error serializing."; + conformance_ConformanceResponse_set_serialize_error( + c->response, upb_strview_make(msg, strlen(msg))); } +} - switch (conformance_ConformanceRequest_payload_case(request)) { - case conformance_ConformanceRequest_payload_protobuf_payload: { - upb_strview payload = conformance_ConformanceRequest_protobuf_payload(request); - test_message = protobuf_test_messages_proto3_TestAllTypesProto3_parse( - payload.data, payload.size, arena); - - if (!test_message) { - static const char msg[] = "Parse error"; - conformance_ConformanceResponse_set_parse_error( - response, upb_strview_make(msg, sizeof(msg))); - return; - } - break; - } +void serialize_text(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { + size_t len; + size_t len2; + int opts = 0; + char *data; + if (!conformance_ConformanceRequest_print_unknown_fields(c->request)) { + opts |= UPB_TXTENC_SKIPUNKNOWN; + } + len = upb_textencode(msg, m, c->symtab, opts, NULL, 0); + data = upb_arena_malloc(c->arena, len + 1); + len2 = upb_textencode(msg, m, c->symtab, opts, data, len + 1); + assert(len == len2); + conformance_ConformanceResponse_set_text_payload( + c->response, upb_strview_make(data, len)); +} +bool parse_input(upb_msg *msg, const upb_msgdef *m, const ctx* c) { + switch (conformance_ConformanceRequest_payload_case(c->request)) { + case conformance_ConformanceRequest_payload_protobuf_payload: + return parse_proto(msg, m, c); case conformance_ConformanceRequest_payload_NOT_SET: fprintf(stderr, "conformance_upb: Request didn't have payload.\n"); - return; - + return false; default: { static const char msg[] = "Unsupported input format."; conformance_ConformanceResponse_set_skipped( - response, upb_strview_make(msg, sizeof(msg))); - return; + c->response, upb_strview_make(msg, strlen(msg))); + return false; } } +} - switch (conformance_ConformanceRequest_requested_output_format(request)) { +void write_output(const upb_msg *msg, const upb_msgdef *m, const ctx* c) { + switch (conformance_ConformanceRequest_requested_output_format(c->request)) { case conformance_UNSPECIFIED: fprintf(stderr, "conformance_upb: Unspecified output format.\n"); exit(1); - - case conformance_PROTOBUF: { - size_t serialized_len; - char *serialized = - protobuf_test_messages_proto3_TestAllTypesProto3_serialize( - test_message, arena, &serialized_len); - if (!serialized) { - static const char msg[] = "Error serializing."; - conformance_ConformanceResponse_set_serialize_error( - response, upb_strview_make(msg, sizeof(msg))); - return; - } - conformance_ConformanceResponse_set_protobuf_payload( - response, upb_strview_make(serialized, serialized_len)); + case conformance_PROTOBUF: + serialize_proto(msg, m, c); + break; + case conformance_TEXT_FORMAT: + serialize_text(msg, m, c); break; - } - default: { static const char msg[] = "Unsupported output format."; conformance_ConformanceResponse_set_skipped( - response, upb_strview_make(msg, sizeof(msg))); - return; + c->response, upb_strview_make(msg, strlen(msg))); + break; } } +} + +void DoTest(const ctx* c) { + upb_msg *msg; + upb_strview name = conformance_ConformanceRequest_message_type(c->request); + const upb_msgdef *m = upb_symtab_lookupmsg2(c->symtab, name.data, name.size); + + if (!m) { + static const char msg[] = "Unknown message type."; + conformance_ConformanceResponse_set_skipped( + c->response, upb_strview_make(msg, strlen(msg))); + return; + } + + msg = upb_msg_new(m, c->arena); - return; + if (parse_input(msg, m, c)) { + write_output(msg, m, c); + } } -bool DoTestIo(void) { - upb_arena *arena; - upb_alloc *alloc; +void debug_print(const char *label, const upb_msg *msg, const upb_msgdef *m, + const ctx *c) { + char buf[512]; + upb_textencode(msg, m, c->symtab, UPB_TXTENC_SINGLELINE, buf, sizeof(buf)); + fprintf(stderr, "%s: %s\n", label, buf); +} + +bool DoTestIo(upb_symtab *symtab) { upb_status status; - char *serialized_input; - char *serialized_output; + char *input; + char *output; uint32_t input_size; size_t output_size; - conformance_ConformanceRequest *request; - conformance_ConformanceResponse *response; + ctx c; if (!CheckedRead(STDIN_FILENO, &input_size, sizeof(uint32_t))) { /* EOF. */ return false; } - arena = upb_arena_new(); - alloc = upb_arena_alloc(arena); - serialized_input = upb_malloc(alloc, input_size); + c.symtab = symtab; + c.arena = upb_arena_new(); + input = upb_arena_malloc(c.arena, input_size); - if (!CheckedRead(STDIN_FILENO, serialized_input, input_size)) { + if (!CheckedRead(STDIN_FILENO, input, input_size)) { fprintf(stderr, "conformance_upb: unexpected EOF on stdin.\n"); exit(1); } - request = - conformance_ConformanceRequest_parse(serialized_input, input_size, arena); - response = conformance_ConformanceResponse_new(arena); + c.request = conformance_ConformanceRequest_parse(input, input_size, c.arena); + c.response = conformance_ConformanceResponse_new(c.arena); - if (request) { - DoTest(request, response, arena); + if (c.request) { + DoTest(&c); } else { fprintf(stderr, "conformance_upb: parse of ConformanceRequest failed: %s\n", upb_status_errmsg(&status)); } - serialized_output = conformance_ConformanceResponse_serialize( - response, arena, &output_size); + output = conformance_ConformanceResponse_serialize(c.response, c.arena, + &output_size); CheckedWrite(STDOUT_FILENO, &output_size, sizeof(uint32_t)); - CheckedWrite(STDOUT_FILENO, serialized_output, output_size); + CheckedWrite(STDOUT_FILENO, output, output_size); test_count++; - upb_arena_free(arena); + if (verbose) { + debug_print("Request", c.request, + conformance_ConformanceRequest_getmsgdef(symtab), &c); + debug_print("Response", c.response, + conformance_ConformanceResponse_getmsgdef(symtab), &c); + fprintf(stderr, "\n"); + } + + upb_arena_free(c.arena); return true; } int main(void) { + upb_symtab *symtab = upb_symtab_new(); + + protobuf_test_messages_proto2_TestAllTypesProto2_getmsgdef(symtab); + protobuf_test_messages_proto3_TestAllTypesProto3_getmsgdef(symtab); + while (1) { - if (!DoTestIo()) { + if (!DoTestIo(symtab)) { fprintf(stderr, "conformance_upb: received EOF from test runner " "after %d tests, exiting\n", test_count); return 0; diff --git a/tests/google_message1.dat b/tests/google_message1.dat deleted file mode 100644 index bc0f064cc2ebd108e4a8ee14d94c59d2207f0f19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 228 zcmd;L5a5tF-Cw7~X6&tPrm5@|X=tEnRGJxFnjhg~7^hiQo0;t9U>Bf~WmBSDS5g&| zlWuPxtfpa;QDp8KR;->=t!|p&o}ZB%uVGuFkQ%H|TpjOepXpql=pO5%t`$&fs-adM zZ)H+l7nQ)6!BD_h70Dqfpi_4tW~D( zryZr6A6c3h9#v%GY;BsERHIew5ajHXR9aRPXq>K*t>d?nG3389$2}=7^$m<_I~W-| c7#Supa#h;~mZzoGDd$zsVCk5cxPVO_0C9jt)c^nh diff --git a/tests/google_message2.dat b/tests/google_message2.dat deleted file mode 100644 index 06c09441b9e1a3fc8577f6c36dbb583d85481b2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 84570 zcmXtfhhtOq`nLlviu7K`bsJ66W;A;?J148zZDzAil4kF{N3G%jT(}o1AS$v&MO09> zC@Q!RaG|0CqM}?y5#jxw^!NS&-{(Age4giA`oKlAo=Sao;L*0|hu0~a?)zb@m}!O`=VpYwL~nlsbYCoB5lzUr4+*9MBDHos1J{owC6zP3?s$qfGY zJ`{|7u=u}kV-GypE_5D>aub)_b?w{*&kHZO^$sEFuYHGtM$)NAAKrD-ii;nu;}7iJ#3 z`n-=%JKn2&wEoA|l~>#|cYd32*@ek-cHr;Ok3N5FGw#Ta=x^DlFC3cj?^UZ$KK^Iy z)i2i4u7C2}+Et=eg^O<7^~1^S^DQqtaota)6SMhh=J>T8={`?nkxEr<}F6|#C zy|!C~;XLU)BV6tNQL^`@7c)l_ubxcIh%Y+ykz{`M zInRen_kOYR#oWP%7JFtB9$K*ET;tZSQ6JwjUw`nt_ywk|uNBW;{opxErmyeJ=^yKx z4PB(6iIvZ97yr{geE)lE{Y338U!c$4vFMK*_Fs16#ml!`TYUWz z{*3DC&uiJ@6?e<#eR=w+;B&?ko8KkB_QP3L;GS4){K3P=csG+_g(qRjPqU&a!HGa z^q&dYE1!Pwlg~U(rSbjr-?yDzA>8y!^zr-G&O7$Qf9@E0xJKT7XT2Mx@zgqyWYQW#ooowe*3~{>xug6O7P8#En^g}V-NkDJ*Ect0{Ii3 z3YJOO_3-h%g938ppXKLDzdHJsZSzBQL1*s=j#T@^#bYRumHx2m)u`j5>z;Y-Jlv?z zaeYhw=$Fe*F8_V|W9gOZYpy?7Sp9F!vwc6M=6N63^3jSJblfKo&YTTD$2(^F->#$n zz4I1eUw(@6??x7;+f3oZn5*v--(I-oGWgONd%cdUFgH?exe)il$@uwK!o-#K3tbjCdC?|NJG z*S~jPsM>hLj*Gv>UBf^6;!#iQ2AZq%*1M{C^BXsR{ncN~?3Y$p=ia~T<0meMLZ>;8 z5sD93MaECHH{7-TRm!tU+Ii&sx1UPayMM5|UxRN?YQ}!ITrzUk8~)Ba_9f!|Ptx4q zOL%u$wjO>}l=|TW>gXf=-N?`w>+5Rvl33r-%TWJ*nH;R?Sg%iGC0v(a_oe~|H{A3_ zC9#h%ZRb0!qc5L%=6Wx4=Z5m=uUi7=|8!uF^`U2HP^kC$A04p@N;f5B*K|^Af7|iQ z;>DTlJ*O{^{5Zm{vOoT2?w-pwZTYr3``q{D-lV$iX2O?u96vw0Y14V3TaLt!NoR2~ z{1cBp$(pvAdP8dAzgl~~NZ`hfDE4%BUVI5GJ=OQn*3I_IXWe&r?uy&#dxst9zkhh~ zqBA>=V1Ir5b@JRhKi=`y4RfCR>V@c5!;K4;hAunBD;>YQHt(1J>^|^hxM_*|Pw(5D zShr!7On>t)n{Fh@Hhr;Z_WDO_e(|RluYXrI`eW%^^iz8lEmyX-uHJRxG1~lR9{cjv zeebQ>erxlV`Oi-K=A6GD>VEFOBYy+Sf8p;(m!}pzKY1BzeCK6LxZbNB*Im1y_VudW zFv`Nbn)If%we{5l2d+B1=d1<&-O_0`;x+IK^Oj0Omov&~qQ&U7YX+-wCr3O~3Zy8u z#^lb$@4b2Cfuprk=l-Yfiiaj3)XIl1hK9r6)gil$=zza@GXsTC6o#=asPX80SWmSn zxF)5_X-Gx*h7J#(8fr`~eCUDa=dWE2%#c@zyEZ* zG;~Fa>ea~x`dwNpFDcP_nJO+-Q$sf<4<7jG%{hC2I&KLtO5Mow&%Ca zt0o`3r$_LL*WZ<*)?Fo>BG`f763v1_c&x2UA}d_uu8h)6pxe0~>}Z`6SEK7i-{>e> z#%a4916538a_O!ub3QxpfErU!V55Q z_RplKT}Pyno@r;mmpp$36yi0so@h7&DMlKQHx$Df3j&5WpX|>VwOviYj~(m^gDrm5 z%^Xwm;AnQlGpuza2efg(*ZdRj?6~F8|01MUU$j$-qBTrY>K%Y@*ldA9)Vd{G9fCDD z0;d(|;tf_6!QWJ1v;^LO-C`Nj`y@(VQ5!eWads)&+nBs({^1Y)n%sOh(B1UDPV)XqA0CA+c48!GYc)1VfP>t z*naQbe=c16`=*}59SCigqJFyBHKmd1aO&zEfI^&?C*;fFSRNwMDM6UTO_~)Y4Wo^% zGq{|_6=m$!@D;A=GTa%&EZE!0+K&AVrvA0(02qqvD+EcEBr-cS=;WCk`v} zqwql4A|A96$VLiqn>$zE{@l-hzP7%nwEH#tkx+HO%fH$x4KeciU{$B|@LGYeU6DXX zWVM!yZxcy0E_2x<(?+D+8Y|cs5a@gkpK2m3Z%nR#W5vTSocQ*&oYl=a-w*xn{6`F>PtMZ0Oo_>j*Jq$eJqhCJx z_OXB5h*>@g+z6pUclR8M1#@k0BktfZ!^%=1T_1(adR#j!(b;4%bpKE?((!|2GJpO0 zw|?KW_4OVv|9F8zGF%sk0WWA+^1ua9XdobglQ|YwFY$=1B^56?Jf^|HajT&0uVT!G zl9XRl!9dkt?^w0tu5}llI(J6j1JnLb%M>^ReJ=^oMdRAmP|>M&6YwrprJhn%7-Dv_ z7;6h!6K+qTg=@<3B#AFA@l;jmD6X;apEq7Uc=Y7***$f?zwsADH(B_+xpXLWHLSx` z<+)(DU3I0qT#}V%Ed=mgb_dp;_u*R_5Ml;9Q6xT>DVqpaB9yFgxS7Zz|P$pMBG>)=hg{I$$ZJ00;zBCgHdvXOG za~M;^CzDPxp_Bs3Sath5kDq*PPmd*;%>tobfG%6b@<3TzxPNjRSkJkrXvVB24k&mz}lERw&1thzx)1PCL-V94X;R1!DVcO z#Ch;v%Px_Is4S+p4f27O%@uRnfwo41(dQv_DQO7_2%2JIHDl>6RLa2J*_DV?S>{bLfvt z5jVT~@u8{on}=_DaT*k2cP30^;hs}G*|<*%D{Ncvp- z0~tb5lKd5G zfV1g+-BSicyJq+g^K$Ss6K%U1?zGrIiIG@C7J>pZ(pD33s(Qh!=7W5)XxB@d?mDmp zJe}3I>yC#csHZLuP37(Y+&H%hg|1O%JQ1HBpALqE&OxWbPml)ck$^Ku90XZy_tTHu z{?`KFCA0eOa$F-pbt4REuO-RCZ>cYYLf7d8G(k+9H$!6OILz1Ns@{pQT8}n5$E2vkE2xO*e%L+Y0vW7Ea;h?6E-^8b8-{9`lBI%o*hsc) zw=wzkp-11H`|SI`4`%f-e*Rd3GClX}R4e6yu`k^x4P6r(!;vFIx-6e(mlP~qxLVNG z)ozA3JqAkqPtU%&?dNr2#4kTv_uf?c8-XwH`$Q5#R|i^zyf8&f%I!ljh{yCcWNbkq zRi>)q5M7dRg3x;R^xr>!e+Y$qeC07AgyIUHoT9;jCB3 z3f&Gd5{=0<%XZv->ql#=$X9nS$3v*ni?*qVnt<l#K$gtP~<}r#%h!HS5fl3${asAtyzuvs-&YmHjJwTPBW~vt< zfpH-`^ZB?mq+>`j))Gw0*W;Zsx|@nog0`rNE)AxQ=zdc_kDbz^*)fW*j`7R+Vo7Iw zu+te$$n)q4a#ZajKoxU>Xzw~ECI%XlfBtXwsh!U~g=ER;eV6R%wI@D!XKNG+$#Kfj zQE9`9i|cgm364k26*i@YxQ(L?TRUAn)kk7CV!XPPn#skb{^o>2<;=Wg4*k)qa5yKTxpAh`I_ZJ-q366Tg)sIzeg zC^c6$uEE+>G*BIh=yp;XXs~p4Y%V<>RdT`Lw0g&$hflAyA?mtX*Bc@I@TZ-*k`PLW z=0cA0P*^Kh%9xr~$V@7U3*&OfL@Oc!9q`QyzIp$ygZEyJaPimdb0O5BmskIPF7$^? zATgk0`dB(NiebZ}Zb2##u?F=VCk)HHbdb6qUA^weyMHy1*bLA57la})=OW5X!JA*4 zE(uALL3gW-QxIJ8Agy7R=}l%`CtwwE<-|dP=_g_mxyiz^M#^J^E4nArcS6eJvtO!r8n6({z zxf*E6X`NhW!WJ)Tn}c?aMTW8XMh2Q12x$lw?|k#NhqjysW}De}-N{d+sB`wLMHoZD zOSZS65S=+}!iF8zqSn$4GD>8uOjPsX6ar>V9rKyd4wj`fWOrLk%?yo5HYt*zBiOob z-mOo)1m@+Ledk^5l@8BxJb(~1!_O+uk%pprcRfpykR|zwT-!|3#9oIsn{MZ7LfW{^ z$I^0@hIp-|(TLS7QY{@|gxSVAT*^WtDYUKYaRhuu%D`wpPtK-M)UHB}?CEqNx)7u- zvVhVoYlAtu!!h4=P+jHgfk31qp^@pCCst?oPk6o8Qp({lms>;X5HMRXt z3@KhAi>t+mG6B;2zSB=X@!oe&9qoPgi~ESkXVLJTM$igft80d(Wn)@Rmv_kpnM$ml z!1KfQ(uCRs;^)3EZ+&|1uPYw`4`=jUZkaxnbN@D8ZX6khana4?Y9J|GF~EiXVV* z?S5f}ttjAk-^kS0ZwYV9zQr`d#T{ z47Kp`+<3QT0ZG+2%BY8!0VYt^f;Gp_?7wL?5ee2){C`8JF9aD-8g@<_04h3le4dY{tPsR?wfP(|b&t~7?J*5R>XTMok??LdxFgrSVW4NR*>A0Lin zC?aiw%c%o{E`0xoS0DLp!}~oBuf&NV)V&5jQnY8mBs#!?_?EC%H0a6GNj(41go@=I zDotcDl{TI|sAvktd_kLPls8gxB`YwtKVjkKA~|IVC$a*F=kW2j)_#23n*l`aJ5}ou zwaTU3RB+fWwk;$X?j)iaY`ez9O8r(9-qd_< zvIsL7_~9j9fGg#y_VJ+*yTBo9v_z9`(56$@@MVccEB6YGep!d-wr9q4X1l@DvNuR^ zBFKktuQ+k!okNcSlGFQ|6Sp8f_iy-#TmJ!Yi=~-rx~PIOp{}y0^o-G_*EU!$8uazV z2#A*XTX!Eh{>W(rOF3DD)y8x>QZ3Gq3$rG8tvEw z>D-7@73a#EL9r@p!n<+|IYB70lTG=cy-8EFjX`EVD~3^q8#-Q{+L%1>>E7jEY<&4j z#JfZ0KL7;z#dA}oNCUtB_)}n@@ff>ift+Z^2Q(?EtWK3;hY9qqLSB%t<$e~I?P^S( z`FhdHU+%dZgy!_Vd(K&j*zFwn#1Sy+VuFc0Y!vrf;JSl@rHf@FG~b{v(56MJpsKTk zXaLH5{M_;%9@%&RffA+d@nlP~Dmw$uFT{}K5&9R5Q6mNgMM5=_U1DH&(KBjd^ z4X{J(u=J;J1`s+2=kNaJrrZANS$)Gc4TQSmd=o-O2w(FT$b{EgU4pztMpTJ0YOkSe zrU)YDcnp`vnahO6rUeIIx$V$RZ}b}0?gW@upZ`WarQGY`1w$b6BttZ*$VuoZ1Og$w z;;h-AAWj_4jU+fyAHTn8tI`Ra2rD0iZNRhb6_1!<9wgwJd3C@};Dg9M{QbTSJJ#(0 zsMGYm+_TRj>KTOpng>#*R5g)NFy*ERO#+gSbD*${Xe}7?TwWI76B>37N5j!8*~SFj zO@NuEfi4uc4|>xhe0y@tP6@?86*v-~l~~GBi}a7P)q%XW!B^^?89X^9wQwYs z`~=1?HiOFj)BfGFe||rUh(7JM7D9alevw{-LXfBo$p%beJbkdjY_jy40)J4;7rR;P z5G$sD94()Q9x_GS760h9c*Prvo#+Q+&GE2GPL zSQ;7~wx|HYsTz`o$NULa$f&O&J4;0h`Lv5Lcn(pR<<^Djx#>EFfr@46HosU0w^EZIZjJ}&r zo&?JhK!XZ@$~Yekk&b4NA#&J;T_#mH!OHS7FwTMIjS>f}9D7FyUcdFp%G)=tfDsj0 zMhp<@Iu~Qxv3HcOPHY^6utl56}#X6?odzDE1td@Lfv!& z9jV$b*s~j8mkfNT%??JDIZP)m!;cW~gXnH`RLl%D!d_K|=@pZ$YPGvI~W&$`3~1bS;?@2s)%LHYd|_Y=nT3l~5;?jdF50 zQRewgjma(Zx9qw5mU|J`oZfe-YH}*wT)*fBkZ!zQ$R`+~5p3-dsX8zcFy;OI)_iTW z%pQs&CE}0VDK?;sVg(!3Z+s(7KYm#juxue zf_dPq`*tk*{H>Qi1`N;YlllGwp$3k=K7|-u3XqO8$ln8;fH20Obq0J5fgl>~O1*HN zV@&cy5g7n0K0JB)*?Tws(0ea5d88=%n*CFq@OAJXq7--!cGkcUBiSK(TI~@u2ZKXK zrzGUmX}ef3$89+L;l6LTrjXAYK3@f(`Ky#ue#(HyBpfKjmCI_x3?F7-I${tX`r(k3 znew^0L+m)A2^&Z3nh?K%#gw{PwJ0hyI3-Spdg86)Q}ut#XE!2l5r7{) z^NS?J3YKwS6+FHLu#xZo z`0l+I)~&t)Vf4VVeh5|n!#b67Oz_DHm%uJ;56Z4+E7*qg>>@( zGdGrSj2FxbYpqQHA+vGe%3FV&JvBerZ<&r{mVS8NvOXw82qmixg0X{9DVRA$G+B!% zI9igEPbrL-Gu5zHPK-EJZW6$^K7am&cRqP<9u1M^+7*{WsGo@cS9S;CzjqNpZ#q5! zfKItlQqYksNy4y;K?+23F_@|nd-%n?Vz@CvA1C+=3fjPs$XLqvhZ7o~*_CU`{fT&t zqelZyCl|bQ$FE;4`m7h8GrtDQP1D!+BW_!PLpXqt^2}y|*qJgZ0v3bQKB$dUWPXlJ zTP1p%ZZ10^w3E^Ns)CK_*G+VX#5BL$DbMkI2A5%!H@oENJ-YO45o}^6YPZ@Okg z1W>U>Osld;FAye%Lu4}!O{-&S7=LS+EeCzz!6)X;`}3y{5QJt{pVs=g6eYi+HRS=+HzMm8{AaKM zX1*@3JT^ASoUqcpap#zU=NlO>=8~cQyttZ#^1Xh{{FMCu0b3%c;kywRBc{w z?#IIZB}{-RtIEZ)KL|8pS* z62fW!r(noc4~f*JxF_Q>Q!D9iM-db2b3q#$XR?9Xa&XzYSD)Csc2`f!*I&qlP~Gni zP4&bPc#C5-=-zXBBA;U%04m3x zT=L0*KNc+m^k(#(`_!dVxg`z%oI5KGG1a1yqOJ-PoOrB+R_40#gW*8}M;jgE=O7;K=Bk%czD%tVbaTayD9)u+E0wHv5u}pCuidtP!`>HrM*t@_ zb|BQ35A-0TG<>}WxU-z-^;_c_VT9xu!D}M?R8X7N`fPb3q3y#POt1o%aCXL$SxKra z$X6w)A-C5(25T+0ltZ6RaRhEKAN=&t=?{*q`}*Gq+ve1dBEYs4{+`_jf!lpvnHe%uw^-T@3!U7+`R}u|1jHFZ{CgwjM{%Chn4=j&qkH-dKkp@|8hML~6x> zK!c%W=R+x9&P>dWM*?P}jU`veCklL4GZgh(36R_B%ep6sHCq?7@jFkid4AEM+j}<& zOW>3gwRY|m2tyon zIn2rXUz@w(DLf+7d-JLY4FUX)wFE_m{4&_x5ngtj#M1t9j zE}fL<2P4gnvj=~D>9h(_64nwyXjR|^ukZoNWtQ2nX@XtXX_rSVtYMnI5GEDdahj<@ zCi;q9W*D%t;;|Kg`Bk1u=s*pGYP={0TKo7fPl^MVm!Km^aYm<87AgYAN3Adk;yv@|7FAVODL zMaY%yRv|Pd>}`N8)tnzbz4?vxZ#>v@QHg#+iu!!f7gNRKhKvxbeWB58*kX?wGlXOz zI9`f3sZLS1*&WEr*=2v1>`IRX)D&u_pJ*oXxpZs;hXGrVdAHrX?fo_L|AVOH-M`%k zM_0i!c1xiUOJz=07_ve(*J9#G7=tGR*;pgRXx1+kWPJ%t%#{^Z6g*#OXj~v3Al2$_ za0>G7TVJpHY{Q-FdKSM`panxc*!lPJD;AzVA6#>wQ>~!_zMp|_>J6gU7~ei#Xs2A- zq)jbn^PnNEyRm-flMlbR^?#tw&FI_l00c3R*^mt{eEm9c2%Gk@EG)ST_A&>kC8Du^ zv?*tf>%#d)G>j?6x`rZHoi07PYSnum{_$Hc98qtLBT5>FA6txg@i2i=O)=<$MrzxE z&&0V>MNQ!}!p?M=hp;YL)BbA>x0dcP>8lfdq5zLRyw8-~G_96G(ubIBJJbpZ;W?N;-B})d7_G-4ag6 z@tFF9R|DjA&07!t zaPR9Y!0prYzF&qZ2)qAKN-t_1rf6v*u`Fwy-Gw{uIyJfWm=yUwsoblXQh4K{H>4q%uG{aT2L@GCak$2-azg?)WrSFk zj#OE}mJwT*bj9I{I9X}gjE-QN01xum)UpjD9P^KbI$dfFAk~vM&)xgmJv-O*d~9K4 z7b0B^cFrq-vkfLRJQ`s%y%L`}XLp7K<$i!6(YT;=K7VNI)~$=51l`BrHpv^Sa zuCdzDW6Ezlkz}(ixrG&7l6)0nx6QQI>1!~2jjjz2n z_h@e%sJ+$;Ee8Bg+6o+)uhW+$iUI~t>W)N*t zIHeZfVF18j>3s{1EWYn+W>X4x7xS1UElSk+wMjhgEiQX@U0^)p-zP#^X@@XpEIOFr-;(zUMv^e)acT$X;m{*fIJc6mI_6sf>CxY+mFBbq5{6G4La{kp$7;R%QCT_N*6c z$K*mrC79E1IkD>ddmlNuwx{zyCx4fsUN^slaCJVs^dLBU#6v_Zn;-91ZQ5W-HJJCBROTzzs6I34Y2n8xhJ@h(U z=$8%A(*5FUzsNGI6;v3`y1HI77la{(A3HE;HH^}fkq*fewd4{u4l#`HQX7*SwyfFn z)%~|1r*<>?&Ro!)5)Ov_vx~s1ET)#hs}dHQ30w^jWRGY9!-SX^?=d(Bsstfu>6dmP$MT`$=R?C zgK10p`<0YJJR&l)V#Pp5O;L3xWLQij+-~5}xfI9~XV$#)>o2!|gj|4t?SZU!7kMo_ zyb$1=SE*r1LnU8J~=(;(E6`;i;3ozq~z z+6C}S6dYKtR1AaYQKBnlEon`IF=yS)^AN#&Ss3h+jTYi~f!>BHjmhV>et!Jb#}3`v z(@yc0_ob*G-&l`Gcp+^3@hbpL4-qx4%$OERkhtWI!*1o*%xwx^&u~Cg&3Ktjv-}dG)h-J&kMBQ>S?ZOZ= zqD(2xHTI9OA+t*BY*~2Nh$J=y*)5ug8d404Vtx^4)Ms)TlH|hJ$jESm2P*rTFMd1n z-O&fZygI#a#ny+B2n)d{PLsgWa$rOv$i}=wg$CD`5QBNmLMe1eqZ9p2sgaP$bvqM7 zF{X07kh2MDP(BQTcFpUnPT%#}2>_f-?|WY!K#0|0RgxzOiNRvK*_Cq3S~_ijG!#hU zx`m;<5Th+P!8VU8D3wy#0kJqyqGmJ!6*oP|X!diIA$FxE7(@`@_clCs;P4@2!8*Nf z=<{%OGGO%g)}-bI;yvqk`pC(tT`qrk7la_gO1^vBNK^|Noh6!k2sS(Trnwo2fNcDJRUW%&HX@`dzDxW4~B_x|A zwn5Y{C-p~T;(~mnzaqeihrw;Y!kd5i`-tf<0DvwF69kMwwEvS>7mT#6s4E#Nc9a!{bk_+x*#ILWJZ< zdljPJ0XUy}5P&pAVJ%8DDIy&Y)q`UV6})I=sFUVS2zVThO4iks8|kP4Y$o&7xEreC zhYWfSI4=i|f9JEeZvJA;vN=7Y{dQvr@!2x`<*6T~0BaLcWnOPIN>-axj&Pue@An22 zjBcVqu_ncyXwdEg3)asUKXmGg2iNitrWg$tqB9M=_P_-oW;!lLGuOhyv2KKi)$s-c zVwHN7*w&eYxqOEQzCGvg{a16Q6Lvb*V!gv;!mMM*-(hfz4Co!cd zQkt*qi|POhw`ShH`%iti=@P_N4k;Mue$o1R?BJ5lR=qS|Lf_!AKdZ7D58Y-x7>sX!hr+l zE&>P)KdM(!!}&r;J0|Z>CUs(I!|d{Ma_J%koGRQmYE#Y3mGHJn&{Was9cN%rYY%wv zBj6UgmN5>>#2A*<+0Wx;3OH(LqLbBiLUDmY2u>?WKvVlx-2KtY?|uW-XL{c`SFD!q zoR$Xcl;Qu*nNEpD4+ls=Rx{kKwZKK7I zt_z85b-baHad$DC2A$T0YDy&+@>1)imb0Uz>*PfbPa2y5W9*-^mmYonsZAgDTxB~d zi0ID&|7!yh%EKYNA~;5CO7ZatzZ%UpOLE+-qlCBB{LVTx!hlmTZrWMZa5!Wk$>XfY z(h-QOZybE$gXi}BGo~u)WAp#x^I>s%xev& z>sg&v!RxQ+>EUX;<)e~g!ycNjDp#BRI@mK>iF!xK38|eLFOLH>_|LCy`DM%5XZ{2d z&+Pk~`mhxBQbmP0bqBtT6#;`A#c3K#!oE5ITXedI@_`(KY&5GfEPheovTI1vpv{8q zg7eipJ17p>slH;6Ovam4U`knY@8-{s&6|r@YI@&i)ZU;#fVbWUR&jFWfHF|G)^L%` z_$Y_s6NgNuP{bE2i@Q8JJ;@7V`#tGAT1EE}>jPbHtyw1Y3o~w3Ofsr$2;fFKbOV(pS9UmlV943!GA zW9rbN8i4mPjJ7eX#~mtmKz=*CZr;Yd>pnW%qiD98!0hPnh3F;l=-P3xR*}I93eK-* z=wqy!Sytg2httC)0r8fcJ$y$C;l?;rC%vc3kq#b9P32a#=4H||&-hX-jx|5)x z2d6{V2oWAHge@9?2eM4VWV|&_XbTCNHpw|b5-H8JG2K9%kmq9CcYu-kg!k({#2ll2Up)r}F8?xdi=p7SGQCFM! za)rbbX}i{U8w65R`VP~A~2fDb`y1_K3^Y>+Ic*_N<^n92^mUF zk`DW@Dz>Q!{#4wy>+=myetrmCMo;hi>iA_y(2c`u$JQaM5G}e*ce=I1Sf8OG@`*Iv zAYM-nWHUA<*Mm+4-3?htN%Gkw6@czM^6poQw|srtiO{)t#*GLaEiB|70hm|4hg{-VEW@0j;!5oV&nf4O2jdK~3au^CjNEeA zFUr{iZXvza2|x^=%H%*){m$wmPkem3htb?OpND))34gb*41oIV1cxn>mi&tF62r!9Nx4df$E`0vDOa4Btd+LQwGaU;g{9?aPqm^7Otr_rHjccEf({%K#=! z5jncgBom6p&tskts*;4nWgH;tw;mLih_+zuRi_2!gn8E zjHI>ceVhN(AgZpz8*lFi7if@4pQS3z5h2%<7-mW`9ciuQXhxNGie43E$OB@m5Sx$I z&=L*3VrW^7k&*CtX#%fG;`zvl-KPtleBrh4e(iy@->mBWA~Xvw>;jlGI%ibYgqn?XEz&H9c;&z3f7^x9hI>6U2XE*Ko`^@bt zTk@K_LG!Dd`iPf{WvDS2cEXg`MIt#dS*IC_O(?++azZe={dxD6*B?GP--Jl`*}E1* zLI}QYC+G@ph=;W)mn3e}NWv*{ja3;e*xFW3*H>V0<*{+F$NF>gGrzxl&k8UC%;>w} z^9cxz?A)C24Wk5c=qk}bC=)DYbs|@^zog7ODYq?A}jv5pChi!7co;fNv=KKaCO*lFz3=8qZh&dz422%{L z4QZC%K6J;sJD2pjtRtKLgIN43_zdolG&DTkt=9E|3JH?otE5&5i*`z~c|Ap$afn%D zHU&)_(1C*b4vG6!AdH1LR|_Qm&F5+>d$BA%-#OVmYqFqSJs7) zPgvju&sLz2cC@SOGJMz?LFaBIm|-2mAmk+q6pbt%?6?9fky`@|Gx)&@u~p$Knfmge zPf2PHv)}^Or)dvJH9V3w(1-j00azp&*l@T-ThUGAre z)1|hUAmeby?NkrH(eE>2a0L=Jr7+0GhE&1M#3+f*l#}TlGMSzri_HcyW3<$fu#yB< zA(raoF-{tVmMDTFu=R5{{<>w?;U3%<`J=alp9wqv0-C?7Tfz>}a)V?Ja}dL*4TBC> z%cO~DAYaY@V8`y?=Da+0@BhnImK62R(caav3*LV4RscCvsF;e2UB$`A>*GaFZiLbr zQp7C;ZFMXZDF`|SbrBjMQk?8M1DA)*%w=S7T`O+-h4d;D}q`9KgkmipCobiz~-rpv(VJKZGW@O-w=kUH; zp8RmfGsk<6zh?E^(F||9D+qvXW(O|h+|{^eETqZVGZ8b$V8>7FeC*pN-L#gu1#=W0 z8pYDEl`)GuH>Pu_6>>k$3-Z{8vuD0J^mhtzhIy49Fh_)^t&&PZxWbTun=fd&g`#e_ z(ogF|M_tyMDjH|S2Ri9WrBIhJ>kgofvv2;q>+iE*`#P)7Rue%e-KU^2LDnut_;W9~ zOuEWJL61ny#EOia78pz+EHQ1+wcD-{;PAVjeeR>PFM<8stiDUCpsN?m$b$J}=d=sK z^C0X$0J=tsToR;vn1ZMwjJEs8{ZUQH3zwsexW{I#8inIor%2aM$_Rxlej)~lZ9efrGi6tIMkaDTIwJ0{;HkDZsO_+tLlOsTSZH-iDwXJE+fU%9M@VcM@v~?+= zu6|Gqs^X?OpRYT*^&kKhX7nw3c80Wf+8Bqgh|UN9m{;3`bOoQ*g#t959u_AWG z2fm=q`iC{@03}B%hvi+q*yhRw$l3~y%4vI}qW{OzS1{aJTwC|{HlPnHLn8Pknazn`d72_{y|kbl3?nm)GpuxSxuVhfX|Nm37t~9spGxj#6tDfO?{3 zSu-}~i8Xv~Nzh`m2V?QP8f*lqQO82LRJUlrBD&zkEl+*&#s_;}0~B!c8s#DoLwxrBik#m>uG)OH zDl1KhDd~#TW*i`r{+yJ~dm$dM{0x@4qDl7?Hw>g=i z)Zp#+oc+fA$8PLNx+$yl+V~)j~nF#z( zl$LpR|Vk#DH)a6MIy@s#JxG_{c`_Rif{{6^-4_1ZF&-$yBrH5GG z1i}hksZk-Juyi1s2&`7H<%qIP5?zI~%wi(aSdLllFSSw$Ta-0QA@Dwa;Ke()U-Qfd zt95&!!;h|8CUX3b;bLztEmO%+2r>Gl>S+i#F2TAjU?piB)^V;&83{NVc3V0j3V7mZ z12YyRbH;_7sIQyS2v4x=0y;)yMa|3tf= z;}=So4qAd;^Ou0=))J^3O5UUr6$evD)j@ZMEXw2(IGWr=Uq?zVXi!xB=%%w?`}S&- zfwpOF^BXH!7#q2JS5uuew7f)PIfk{=9i427z%8mMEw_zL7r?5Cgo8vHg_k7ghJ8cU z=FT&CS)5Z;bGN##w6U$xku5E;sT74x_b>a-eeRss4qUhT2Q2odXgG0@kDZ_Z)9~!I zWy(b9`eZaQ~J4;_e=%+^d z1R)CzthYZq`@}o1Hli{6_20ng$8z6Z<=!9Jp$!Z2FG&*)rGT|btyE1xX);kK;*%qH zJD!fx_2pcqjV+PFw-mZ7NEt$ISz)){&ojS~XWIJ#|*73r1nU z=HfAocyJ`KNi^P24`TL)y;~nT_r4A4b^Op(Z6ko>PR7Don@}VRT{Z5)WkT^Wc!T7O z8V%JL4rzr@(ux-K%6Y9ZS8ext3+Yn2#=)!Q2p|Qci;cgo!_je zTCd;z19V2%h~$+8++YW@=Lz}pY+jAvX{*Ca;7?xp z=KW9nX6Hhk$i+(AY-EtM zlqMKhqEPhMf8?JZ-gVXX4FbpalPgv0KR-u@UW0yzT;R_`M1laj?^m06)`-<*9VKG? zxrZ+FRcbkYK;|bW1Z->@4_V^{_kDNU7iWEHL1X*SH%h>}zEO=%1r~Ysr#LhtX1P7| zBBpBAdB{t;2G3Df7>I5L@Z^oRU4Hu2k36!$A-y^J+$upr*F+XMXAeQ0{a;e48}Y{# zd~#h{PD*oRTp?RChUSb#oGazzl4eXrQ4$zKx#CPR>-4i3uh^&^EX1yAAvUt&aC%m! z)Spkgan^!pQDLN%k-IonD!n*wedeqnvfQNCz%U#6prOngj+&f`-M1XesKmA=uVXI_ zK-Jp${lf=#fAzcu9qIaVrTe8Lu9M)BNU-vx6IzuU2+*R`Y=VmwCpFe~bDp%=0-@zF z%L{9Ykfm?G^v@UHb=}#hwsh0leS*~{+D5h?g#lAAYQR%0#FD$XDT+wc&vkYB` zEEv0%UA2m;i1U3@GB>1=FVoo`uRYcTLhuujBoq+0m9{}N=Q0K;no5$UYw7!XO))|A zR*I5DXD%~%$9WtOSr^8dqK&DJ3W{+@2c@cAH($2rzUyy?d}Y(xk3ab#I=_EFKDiqz z<$oO0JHRgr)n}4|LA{hW43mjk;8`}j>Jc5*&E8jE`TqWIP-_vO;61Ri1R)`3-}HRyYUYbopexMiiaApR6?2Xy`)v2-PE$ubop%7#oF>g>W@6~E z3?YR$;-V)GoVfJ}P=jw?yYK<0dj0E7D_~TKh@X27c$E?(QG??T3fUQ5VKHzPx`Cft zYIc{pL@Q|#MrCDR&fXX`V0zDd=;(WIdk8eBo7ZrEgx&aggpH2PPY}TqV%Q(OQ8J<6 z><#dWq{T;E81*8hL)Y>R(s_=RT(^+Q8D}Y28%?!Yk-aM$mnIgyS08DlAz|M4(UFh7 z@y*r0MaM0T+<|`P50MYkSEH^{ zB_pX4C!yUiy9aV1DlD|6*9fUi*kK#*z?KB+izIS?00AR(HZ#663hwyyWBY zOzjmydEEQwe)Ys_|5&wsPHY7j3J`(uLx{I<+hjL|_^M1mg(1}OS{&b3OS5%yQ+)_! zsn>3N?!z}OxdDwgF!?wG>Qcv^_9JvktO%m`0n|MlE;rIahz*gPFW|AF4MH!QsIWI38nblvhA+RZaa0uqygM0&^CXHoZmV}k)`_XK>gmsp*`TrPxMGiLJ@`}*O<1+aIX^xZG85g@W6@6>dV&g%gcU|IB2MWPxtcl0 z)JzDkJ^kLBFTDl~<~FVUzh9q={#JrqdVE5i%|pWFvcT3hN*3lOOQgs&urNs$ zB@YL1kIJ@%m{uISRDv>}uUlSlrrtgu%Ntqw{02wTVwcEeKC3k|S{Fv9OT&<>i^Mo~ z(PxQ~tf;98yG)*;jTV3_=r@-?x#iWzk7J-6@ce8AYX1V6?0N^{QvgCw3Tf!F@C2+f zFE;Zq3PFl#P@F?Cq5`DazAxqF@uTcvhb8A~Sz>oY$rlH8jl9YZIoAmamEKJwkcRUp=X*g(%msGyz0gjR-(AidHuObDPK;!KE1*&qc76c>gye=BhrxvKH)CX_vlEwki-eV6wu2fX(e^pWQR3@WSs`qv@iNa8_Yv?SAI@pOV4XrwF*T0K<;ZZTmoA2B+&rHaD7Ca| zQW2>~eWWmelP7Gu^QpgYJ$UMBEoDg|(4D`dL6>{P|n5D6>&^sH_0`U z5j)3cd!_s-4LY$Gh?P=$;16(_o)}0`Pn&#udbxK zPf4T8;AhDBr|k!gs=qCxh3Hegk5Mtma@f9@7|=vaV>pPOIPRM7PJH$Yl*M}JT3WhW zvHpiYytYv{EF)L`H{ev9yr>qp#=2NOUEg6^cvutB)THE8#U^7&76dY+fXM8RBxOdN zux*_eq@M8wA6$LLYX?8SexvsG!ueVC`pcjE5$z8f`S|V6U>{!!FhfF3k*n5|7Nv5C zNm@!(Y`xR%Rj6GfNi|W1gE&*%-&tft79J*L(R#FwPQ<~3isbv>Z`t+wcSnQpanst@ zntz}HghPgBaiFwoQRba_dcM?;;(CL+DrimjXlYMB*CFTV`jjLpm~EfmcEi@|(6jK+wfd_#_4;|7CpX4{gBWj0qqHGQEH9oCT>J$a zgJ0-n^x?c%tl6mS1TegS;=KRtC$2@|L#W~%dNGuGU{JjEEqkWOYQyG`Br^=_e;1ym8yA!PZSTp&|Y!Op-(*zO$C^P2Q+G7u(E+g{VJB*CgcT?bbB4Op+0&-@8l79KiPHkH)G$N= z4EezIul)P+GybJOH|P^s&neeWe*Sy3<8V#;Ep!||EHTAg3s=WeFQ&3_CT}X$6&wS_ z-*0N-c8z|akOH>(@(r*5<<%X>LuGOETJQ)5Aibx2gm#vU9P$Qe57;cpNEpv05=K5r zn~@H^$%sx%4h}j~41(o|ymDKQIdpVJTwYcrk>cQ{bM%MzUU1vTXKdWTUKFgDitC8Z z1NKp8%+;_h#n+RtdD($y!6PDHY3TYm#hQHT2X19)S`YH~EsqWJO+;6$FZCX*M^`?E`rOMF7rz z@8)-(eF3&Xa2=bj@Od8c&JX_=a$&@3b4nz9cfL5D4M~{!%#Kr(V2il%rI(M|`4WJ* zhpyfDEx2&}4<*qD4e<8L=o`ELr%b z+l}-0L4%>N1ANXSo4r>U|6Q#@;p=y^+lJF}#B>l}P4 z9MDGCiS&$OU?;1kF{5iGv<$HsA+~JbEx0^;H~{?cwzr=@{Gr>)XqOmAtJUj&J$+R^ zDj}vvfzERnv6PTCn!((dxLoQPJlQ;=Sg@N3KPkB^^=wd6*nZ!EFK;?)C!`ZV)%q%q z#@H0O@da=X5|c}6mVhAdEi5<{dd$RzF`fGJ9TIHfIU=^;07WuFc!Ozx9(_zkG1x2#MVX9<*CNTY2EIkRN=$6E3U|Z=LtKgw^2Hp@POGSAnQ#*mUHHd#eu|0+#adU|-Ukp3$7%bW zz`c3;#+&as{gN9t)UH1`^+`196-Z$R)ClY`@0>M4NK}5+Kc0|1_VUc4v}LW9daGxs#7E`43BI4@vmRRm6 z-yZSo`GFX2+y@`L@6Qk41xE^4Ev8|`KI&YcZT1mM0noJHX$=xSKkOD&C>__5hmnNK ziS9J6YXE%o#TO?&ck_cEp#=Ry*M55VeKx^WWgVAE7GLUT9A+m^FlXDtVLr%gCjjTa_2T`{?mOpR)ZF3F zwY`7Ysamf{0vpwqJaR?ma(R{@WjRbm$tW?M%tF1Ig6d1UrbN6_$iTK`VSn0Z=b(vXsIQ_e)b`KqoE=4$vGgKV^1rQ(5&4O*Eo~bMA#Nf3nnC&sNjtG zQKZvb5J2+ej|T}DYudA1Y6Q@^Jv$!0{f76SgfO2qfE;I7C&&Ym3Vnji3xJW zW3h3_9n@JYWh|RE@$rlbp5T@hI&K0M9#!y>3^fu@7HLp?Bv-(Ymc%JOt`P1~&pdM4 z5xf4r^Au=&(;7*jL5I#Xji#Nei&G57 zXrwkd-F$-;Bhc}Aqg4ti#j^+B{>!dM?^<;MY2S}7CmLc6$$(H9G50EM3$AJn;aj0t zr2+oHDLh+h7@3SyAFvLNdF=at-TU!3=&WsC`|#ucQm;RaS$Q*7kT+GZPB;r8QEkiO z^LVV>L5;^V0cDD5VY)gtJV~NcL8+=y4f~?;ImRZ`$H#I=FSnj>)V4EUzZQ^EaEy@L zhxR6dJoM5Lu+?MI`gVcWGsUagyq}Smw+QS>Cd*tvs{X;#kL-Tyyubef{ng<=Yofo> zAn#KEp=TAfi@1PEvQFCSyig;gdYUc)#?=v)gG#?~9G&TtJ&TT_UL@NCUK66`n6oZ? zw5+30Q2tsksewhBdXU5sw|&8ijO1042x0kPwkySpTU~fg@sV6 zrC0fTL%(y(lp?JzlULJPwb|S_%_qTefB#e4&pGY12UfM~-wc0_MwLdG6E;zPfeC;Xrl;)4V5Fc)tW0?exG<1`IWRhc(9axq}8B*NR%P zb&Ab`X%&SsrfRxWc^5fLDlAZ^n3a+Y?s8k+diU;6FMAGkso%VI=WjnztzR2o5tDy| zgnvMSg+l9Sb#(pA9`Dw&V_sO!RGKCourXI6k|0S`k1>^fJ3AI30)T$>6~}*j*Zz$> z;I+nQ%Js+p^jmZkWXO&ypm3+Owu4zi2Moz-3d5M-pqq>a5+@i_&>7ymR#@O;{Jnan zlQASbeNUJq3ev~QJl~k>3MC;4gx!`8-ro1s+jmLPuhw6&@~8PBa_5dEfs?ZM zb4yDqP0bVg)2MlbS;kt}kVS4K@`^nh%+EWgeE;s=lfHa@HTBQYBkJ|t&PO&%gBk=U zGeBt!E12PVbiYTZZ)+$-YB|87V#HFQs6O}H!Sims>Cr!-QB!;tY#5FmJ2r{~>&OKX zka)QXLDrD9s3NtdtydwZwWg}kFp`TkZf{Xqpc@@Zrm~T-j7ds*NsZ7QJW0=sm9%Un zRl}SRdxvSuJeVkhrlYMU*Zso`V7UK${IM&K|DJ<>?v|~5G*K`j(=&gj$YMJYy}+3X zxO-T6v&JV6(t(!MCJCLLF)*5@8G+76ifLjrrWCtQRx$%?{n zEX=Vs3QXg^Pe1zX)t#sl;pVlEcipU7e~hv!k8_c2-$Hp@TEw|xGV!uQ&Z_u9VVE_N zh4lPDJDPJdQc|U_-fVR`MZLn78VcJauc_9VkV!n8nG0Fl$1k3J^(oIky8$I#b4U@5 zz8rGVWuJm%OBE@zy@rCWU_y)Ma`n>BqiX7Ekv&>7r&Dc*SEW(e(|%?OSU?{f`PKt( zUA=3yS5+@P1Z_r-{QR)HAuT4U7;UaLm#KOsz8o0KWr#tNy{?`2luLqT2z3gb-zjfG zxSjjA?N=Xo^1c->$1>)S1kj&Zht~M#@HXTiko;Ke7 z=kHH{_?$1U`A;;|etrk&uQ;Fna^sXGAul`v1>E0By~C+S=OS_AO;JJSX0&5WS_s_s zP$9=D58UzPahH40A0Hw(T(vI#`#&~999)3^2^Vhukd0Z|#aQ2x!_Dv#kr*Y~$Iga4 zLfEV9#r}q38NpRMLxO= zSb?rYik`Ax)CjVgs0KkPxOxuol4_GDa?l{W<8I(0PW4$O5UZD=QWVop1lJJGb^$f(i4 zq|Hv)3%7oE(TDGSd?pH8Y+n1~q`#@wA5SIGzWoY0j|*ost6M5)ED?;YX<}kaq7dk1 zZ5}mNM>a74tm9bU4ZWp?M42wNNk&2G zrg*7+s1Cey+LrxKU3&NiqH$jRwT<)k+*?84%nT3eI0=$qEJpN%Pi#$c*&Q`~;q4~e zONlGXO539*tAv=<Q z=*NaqQlF4jtejCBW2DBOww9);VOEq2x`|3VtJzHjf+G6(xp=K`Pc-TbYlkhz^(7p5usm>BT%5 z^_cTM9{~D+B-`Si%m948^59=j`PakGt+xJ8dk>-m^m8P2Z5GrJ>PRflNiTg?H53fNW=!6}OY^;6@j@&P zrqk7uXVxiD=3=QWy&QHBf*Y4^(6w-L-+s(xXWVnotsB7m>l9#$9Dmp!g0ax&iy74XqJP;*8lxd1$w5$;Y!PR{%n0Y^NYz!f+Id*>ZhOWlZSJc}SNhs+H#BYy|^Bwg0|d zXFj^){=Y#m9J=<=C+q5U@`npG1(HS$G*m&(|EnMBmU>}AQBdlz;=x$Rkr+t>X}et} zF9h`{Uo7QTEP`}oKHh!88K+!(;M!w15Yfx8gnayJ-%46PKyKUw`ba`CkE;Y)OOl^j zNG_~$k=aeB(TXIx8{Dg04l*#is#$$~;^#XC- zH^Lb!sY!-vU5Gjs7cWC3@?#V2ASkM5%sd+lZoi~HhQCB7`QlG@{QazLDEn#C+9j8- zjCOp;;g3O$-c@9gr7JEkLIO-amZg+5RBgl?2?ixRva$jXRX}a?w9gKnu=DcAS8(3e zn@(1(AH8PC~*if>d!aaJOV4i$o)dE6e7LuAOL8M5R=BKu+iYzE%Y} zQaPYzdoMn4?&IfPw4zv)e*Z1H#x2NU#Gfj&6of`jQcWcZ(GC?ymPnWw^CHCNvZO3V zSf-kuDJ6yzVL=_T_ggR#0 z(T;>HWVeISgqiNm&TQ0}nG&RHI?cA6Qua!^wvJp(Zww1{yTt;x=a>Ke@^c67eEX)= zxIOe+3%ZknS>zdJMOLE6y6XT~ruiv{A^tGjl2XiCl+aOiGUi}2>L$jP z(IU4gvT3^dh9EGpR{Fih(A$m8D9H3*YK(v0d-)J$cU?OLTSqDGSeG z4ZmFFx=ZBaOCc3dc4bq^*y~gaGX$Z^;$}9h*7&%P))?9gS&VKq&1OE#Os8^--A=R6 zo1~e#?6^a(V@9G~GF+11f9tZXFJFBZ5CJ!>o%PhJM!beRs{u?)NWl9rJgzE`=_ow@yiu#|Noxys@89bpT1Ed`xElL z8niMhd`CA-f>f`7S4L`qVK^@po2RY7NS~=T+;qK<*&p}Va%`A3v`lS5@bxV@andG( zr?C3wxgKn`_rLJwB^U17v9bH?`vbcB1d+d-4tbo=K8)kdR&i2EFh?B?9;sAJXe7!~ zA(Sr>y25lrmZpX&I1PNchg`|b^A&`F%DH!*c)?AVyt@S@MSR~v zzCD}f*U0*)x|)m53&wB|sikNAB2Frxa$8gO)XEPc`e4JFW$U}?>lMqFY-4<(3$!H^4AXo>a1TkuXzJlY9LFof%IZ7TW0cc zk21 z^VPp7o?21<8_3gN;Z<30$Y;jL(kU885SYrO1*j4w^uXtM-RokzjdgM$3Pwnpd)DuA$BQ%Y7!LyimAMuZs95{3Q|Dt19 zKzPPOlvx6=OTlo<28OLl1sgX5f;Z@`3SvUUYYaRwxhYaq3=-old+ylz=Jf|IJ{!7w z$XZ(klz3G8BShX=0;tT_n~OrDh!PL${asywDQY)#ot~Gi_tew3L^6Ayxnij5x z$2i5Fs)a^ZlfxLJg=Fx``Iz{kZ*A2*Whu!k&v}V@OlQKelLN#))@v)$8i7XDj14zZ z^O3eA4Js5}UDlA&;QfApBlg~V!<|>1cJ6zt@z0&OhW>pSIcC!~xb+dSEb-hiq7te+ z?p#6>$lc+561Y(;0hqab_v*Vl-~Iksuz&@o#!ph{?`((~knk+Ls+xw;z=oTKvTDe6 z>MB+>Q!}H+=W`3SoJou9__0QAta_vX-R^qf>?>b<_}SN2|KI;+MGEgAd&mGJ(HQoDETV9>J0moMCK@FBFczG)5n#j0Fm zL(VdGV2Afw#5zhmq3erfzDk^x4=*SSRnnt(4(-iWR}u@fI>L}!6Qb+Xk?4>~%+Jk< zKxEh%b^9Dn-G_r@=!>iG+~@|!Py$cg^+enJNwry+9OkG#+?d9|Tl;tNyXlBzOQGO3V0 zip7>=HoKD+pyQOyc#x(h(BgQ(+@Xvr%JDe6AkvI@5Kvw3h}#0Iysc+^``53pJ&59t zo7Vi_9ES#U7*Smw0xf?^7q=Hfb-Y~JV&`4sshsS}>BH=lh(^ORW^qkyG?Vyct}=}! z?D%svi=-!rR_6{fZz@RG%L7%$1$VnI&VKoud!BzCMI1J-J^B$ioBz)zH1r$zh!+79 zGkqi<5o(ompE6UG6tRJXy+@1?J4&s1z$UOUgRp~-CFw=^KCH;{0tu%kLk+lqO$#RR z+{Ps7lr-KMO zC)nCm>hnXS7&}v$MUpa8j2BEK1m%UY*0E{j`iX(1 zf3gn^Wis;4Iky9;+1+mp%dMshS9CBq>QQ&b9(T2s7NVC@T&Xlx5EwE9a2-N|tiiVD zT6lP+Ki+cbyC;2k+f$!I4P^7$5!>JyhU&>HGyX%7H$>o8_lAP_IE?pcQ*@9g~uWIA@aHbqq{D)QUCYpxT4GC*{gd*ySNzPDT>zi67 zePz*#XVOH{XW)yG@j-Fn=GPaO5+F{?dcBS#5z4h>wwO1Jc~c%t zz@b1ma24CL`;mKZ_zPglo7VXM^`Ge8*FeYvD;)Q9R&0?~H7MA$pxY{|JX{x*>X?Lz z9ZzPM=LM4{_%u7$-=q3GOF1K#TQDKacV2h+vpbJFenYSMf%aK+xKhY(ixNJ%2KL~Yzcy1PZ{&rCXrdAQq1N_o(|E;>k|egVU&}cMfnC2 z*4)B+v>auT`#@(&}A<^`{-&8&Ty}YKtbfMN)|jD ztPr}ixh9j|n6U&3hl)~{lM)2h$VIp5D~zs6ppKhp1{>ccZ`-H9%6;t2vu}IrjwgSO zcJj1etk}&Zr1aY%$RYhfl@gy|DV9R1O}CsN<6fF5$m+;pEiW^tPTPS-M2Q(F7LtZh zFu{*H04D4{{M3s-KYlypPlv7@dB{6ZWxVIqjSE8x`OULX19r4{qC(ncR}W<7e!!GS z;KG@@Ny%jTt!hpRNsjBp60OXM`D;$s#LLv#dnrp+IMwWOz?AU3Z(`0Eh7H~YYfcgRDYK76|}tLw>^!fCdX6M}?FZ}Bw5Dm<}U z*VRG=K%a6gSCu1Lrm@MYsA{nZx{-p58tjKOe9{OWnT-!*9w8+A*Z%vor;oh-va?pB zoxR15M#*oG(yumw0+lIDN*WaXFq~s(?P}(9WSfC!p5Dq*yN5zT%H*HTG(we^p20++ zytwV-XLf8o{IWyQgmuelTQ@2;6Xc5j1@$CTCN7CEwq!?0bw%tMKfX|R!5b6Naoa`e zSv1|g-#>+v+UHd`mjW=Iz2K!IUq1ZBtMur^W!AvJ1%2PM{oWDEEN7r~PQ$?f(lmGt zRZCA4A&!bgdQdtisSAd_T2gHImd43+VPa9M7={<%ijOY-6zBfr7Ya+O+v=xxSDSN^0eP^6>#DN=EKmP60E0nX2 z+;RXsE0t_lna`bDi{U;yUvvjpLPk}m7Z-|{F=I9rv>kkv)4|9j(WWwhkc<|i2uDWA2zo|>D>h%xLy&e73O~^-oaFG z6Nt=P!CI~u$kAP8rKIK^<1WH#=Xw__@ozS}_+le+%wDv?DG9J++cUL`j?WZ511+YzPhSti7 zFp0di_BK2UrxyrXc)m5|M8ry=!ndeaBA%gc8A?aGJns0)?=E@#^-r$hqif`bhp5W+ z_{(RZT^b`hHzz?~6m-&?B^+y{NU{ZZS#UC=OGJE(0D)ZazJDEc#98P53XNCuf4sR7 zuZJNIF5&ri6*)H1X^X_}6dTelNE(wP5RQwjBSJ0}lsHn#%+Mwv2s#8##kzPp$I{TXY;l8V zVHwK>A+1WV)aTL#BfK6$2@}ZJyoVs{`RZc7nWd1;*ecniYXn$f@7BM6_1IqyZlFLU z^QwrgM$R`u$Y9MObJ<_x4NUwhN9(AXicN*rLT^d5jRYsnBv2vKzV*4Azj*kDo9%HM>rY3A;rGaq zLbx{ImSeAEnj(anks8l0h_wB!;|Jb0<$UA_dokmlsq%qAAYPf$?n^a`aH%%KeEEAD^s;r$nFXu7o^UsGnE z-+0T%i5zZZ!RsxGHjN`8a{P|0UKh?;>MA2h1%#bRY&J&JYP}t{WF<~t6_2C{fM#|+gF{N9CbKy= ze_~f~oa1JakTHeoVWY0gei9{l#Q=kO;^C@me~S*16;a<21g1h~;Te1IJjS5Qba1j=ud&^acbFwV z)hB@5HP++$CVpo^nyW}MSdy?wVG|@E?z;D$r(Zhlgq0{jY5$*%?JR#YXf*_R(HxAe zL2@jS%8{~~P!4lDQG3DJ%`wJ$qoW|=3Y6};yr1%0%C!kc-NLwokfC4p`i>9pJZ^^0 z;+cZ$(GDh&Z)|Yu<+$B5X@;ZeR{aErALpOResCe_ zXRDBgU%U0e=ePg)HaG+}t-bTcPtXa*BKdtV!R&rooFAVH)sDc7Ol%`R{!FD$1jQM*u!s;T^w2{O|t~PS>Gn8R9l8 z0VC8_tE8APm5_C32Gz2ni1)e^JgbpgPLse6oa8EXy*wO*^+C* zkk)Qq+ZUv&*MpVS%LKnc-uk@~O2Y)KsvS3jD}*XtBN}z1px(tVEOTnvA~=uK24;P< zFOq?qHbWmlti3Fy7*NPXa|}Vb3?S|ITY*B zj4X{=FI2j7>MmxZlj_Bu1F!RnoEx_PkJ%Q0LeLnEF!mZetCh#k>I{Z4Qr4da%4ySu(fj`WOM= z{%5{<#HDwibq2%^Ja2l^d8+lVt{94ftxi?!M#r$G>`Wqa60(X;-7uQ$Q|iybiqJF3!)= z;R+2LEh(n=xe|DCsjODb#W);SUYl~LW@6JkuRHNrhdY1?qBM?=Kl$@LN1eGqKUhcq z1sZ{MWb=!Eh5HvVgr@}v3WmCE!;vS!CXrN@2RMadw_y=ED*XH;M)&F`Qhhqj;)Sf{ zsI9;o)`HbuTOlsQh)FobuYL6H8$NjV8-O4-t-ULipp9=vGS7p(sk8|^+?p}k#rfD4 zW3yTaD@OXJC{51#OEGLD(9zDSW*M1gnvOb3cqz0d9nCehTs#7IuPcxE=Ex7Xy>`uN zOrJj#igHrxswD44o+LwgQ_!}|l_V=(Z})J$mZ4rZ=?i8WN?brh)I7p4)hW+N7EQC% zFZCUEmQl>GYJXc@wznrZ zIzz>`#o45qJ~k&hnGLd184ril)nRZHYq}d<>0DvRJ9!KwV<)(}GE&x)Vfs{nZ`^vz z(NFKa{dRZ*VbhuvvjX@H$Zu3j$BbG*5@sYD&i~u)jY=}>LK+$w1BA+d5i}3= zV%IvW`8(9vY*;|%(S@2k9_AxXZziU;AdadtDU3O2j(pYx8^9B%e);XmJ03!51Dn^% zTPW)FPvGG>Xf27n8wRTffsGlWP?jDF(=e2B1Xi1iYayAnjBZye^au-0c!{qsCmS*@ zCc{bQ@dC~nK@X?nF(2-_`@xU**wK&w$62e5w1mtLfihMTlNA)pn65c!QdQL~J=HZC z%X)-Vs$TMg=?^dyYjQnjnr8s0U+b2cjkIim6n*?D&OgRFGDLxsAnt#MdM6HcubEz;!p=<`CKxML8r(UR1Uhv5iXMB9h(HlecE84Hop-LjBe-3D< z##H1j+I$at;zJZ(H{Dtnh32khrBN8S!am-J-v?J0Bi2S$8d4TKemHKD!`x8WXqxLK zBi$%bgz@{}rOVI%;1v`e*u3_i(>GP?%~PI3|AL2@_L~92;}NP=N0O@6Rx{XP*%mFv z>4m`*TlN(VrBNds^AzKF$k1Q@;LTmHd~n|C;&A4VUIcRKCoiG92N4OJ4q976EF2uz z**s>qp-3rUk&6pbt=Y#TyE#l#L*vC*ni|Nmb{&1;#Si}N7_>|S@7=z&vfCvfszDi8 z?ZN7_qH0?W*a}nMnk2~vmr;g;w?g4Wa16q*KYVuTj%Tkve?vWb#jjS>6bW+LuY}61 zq?QO<%E>~>fafzgF33~!Vhq1xw>WXpxzjrJjcY8ddzvoqOR)GBTmS2FvdSIb-7DEJ!k2iS~8(!qeS@>!* z6$5YhLc;j*p8HQe>z19UkJ+JXKmPFt09qV=58SQx{zw8H(IfC?G$abHqQZlBH57Wb zE8{m$nIa{>;Z%XrXkH+M#mQ38>v!|{#=MtSXsPEAQ>VT5#nBfXzUS`MSN*(sIJ#gc zi1e&q0&%w^%G)?`3Di)_dAg@a$MtMu{Lm@aM`T$|NQ9HnYMwSp-Ip4y5wCx- zoY3GR{L1@BANcoMsF-2%+RGQ1RO_c6x0*jW@>3E3@cL!DWLeg{23Es{8--)KkcGB1 zQM95yC2X?kltXC**KxL|c|xRHA$f@=RcTo9I2=Q_$3NiHCN+;AZpG*R^U_P+KK2&0 z*t>ZxaQQF5K;Wh(b^TFKY(Q-nG7yY=i@SbIq*jJUVG8S_x}Y|i$NuD2M;~-4ny|5`ZU~|8cmwmMr4-& zV4zFOcv%Tx*&3-#!E1t?=wfDBcOL%83Lg+s=khKo@4l~m+Fg3)d81Rsjj$N<_dAvr2 z)MykDqnRSm#$+Xd!OYI^|36D_;W$@ybq&|j_D%b13r|~~mp1LVySux)-*I>MnKvb* zI0Og~q$GH7C>EqZAh^2~4-kTr0zv!jJNf>AIdksOeb!!kEvs9TaX{ki#aI4)@-wf# z^TlcoZ$1-PAs=7;6SO@6V(;Cn%(8-REXCfbDaylmXebOhfNh2$dX@%hfuR-VGlMi8 zxUI>uH`X1=8?eESz2onnU;f4o@P1jpwqpkf0e|$TJlfvRkk^Dz)6XxnOn9O@(JT~f zWV|pxs9EiTDYs?dg+VG;k+kzHqoR~jh{js@DyP~bQE`d!-Ittm+<~i}eh4n;^=n)? z)ZslA@u7_}kPWXN4z|K7T-#A2IW6QxFQ%9$a@kIV&LZ+nxr9TNisAGmEo68q{vT7zXx!+J!V_$9%RC6iA2U+BaE>Rd>ngs zSeqzh5)qE$)@8AVX=-Gog>v*NwMZ-vWroq*NCW{BKD_=mf3^9Uox9KgXWiPl)Rk%b z82RKzw3DPF4qN9DYYQf+$F5;pL7`h+s)dZoDMMAyVJ-0i0S~5X!H&~dg?ae?mOG!= zch`YcOTWOb=Cp$tKKl>|EpaTu;>L+mc0AiA6&F%^LLx2B%gx!?AvM-$eNZ)m zf~(jlw$7-^TEMC;%NU}7b%OW76S_?px>bxgm8=|^yBJ znRJ}ddJb4ZZ+yJ<%71@xDLg6HuU)zSCe?=DU$SzgP$0L*ft82^fzw*2NWGMzi?7ud zw835?&2Lyb{fW)#i*DN|lHzHQ@js^!TCom-4d}!_JGmd74p~^$jZ;+#-StIXF|dHzM`$h~cuZ zt(37Oy=1r?Z%#Q(reZL(O)Neae;9~NeQsU3+a%ga-F#lR%m(NIt&J{_Ga1dAszDa# z;FR3;&6_vA_{=GBbb&{%6QLmu4!Ld*9q&N$7{X<*28O7g8$2VHMCEDqyEqJ%7ye zPyX{?Xoc(gwK3hH-thjX0kp*>^5_t#C^|nBfDCLzC6yktifqaG}75cFb3Y z5;K4OV70`#$Oq~70G-CE2b~5VKSf+VVlf!ixTH#Our7ck0K@Gy`)wJyGfW6`@}VV8 zRTzQ!gJTa z#Fa8QWali(>!|b#;xLF1LNx;ti1kb*e>>HIwesEGtKWO&vX56J%lprwy6vS~-rn=jYKMkTxD{<#gZ!R$qAGiYPqc8^xhh3?UQOfa3PIOaBPq!-cpB_} z_mfXfyzx*S;PbnHc7KugA#?*AhS-k=iz=5f1w=G{g6Si*15vSu=faL%4(x&+w9f3Y zWm-pY4MrX#v*~1|>k+Yo6f(POY(!_sXqr?p*XuX9JTy%>L+#SAN;RZxKmGpR3y%I| zy8)f(Kfinl+Q}*MXt)S@hdv)1#*GZGkR2q16bXizR?y}bAR4pnt_#k*`s)+Gd;QmI z*F9`iZrHdHd#E((=g2A7{1o0u4L3uhP!T+G+M=oT`kKCcnpd(!Vw{14JY$u~j=YvM z5@D2-VI!^^#QEU5JJhwy#-W!3LgRi0L`wT^zi{iG*MQ}{ZtXm6<t8NFaMQmjE2}4`znk%oa+pqKat}6LXo8v}t*ft}Qg+IYmX7+KFValn@h= zP6l6OWr_Hph!LAsM)GhTR?2lJZTj%&54No)?(62S(TQ^+nV)+>dt}Or=88EtGvdq) z3|8-@ z!;$Out3hG@<9#vRrrssQEp(?g|MUulpA zp#41|(6tbcY&_}Nt;g)!v6|5@f4e#@e}v?9;043h>$w$7p%t;^CsbLI*Afq9OogIY zY6W~Ec~e~SjFmnHqQ}pjwy2E+c>Z({P&9SUV{{AfkAjUo>p2F0Cp zStm(KSjIM9L=kuJB3f-K7xjzS4RF3G_gSh6J>f)T;z2eyf|G3HiTn1P@&-DT>(>6e zTZGOj)SsLM`tN3mQ;C-}sANK>#dp&=;GOAnw{jB_t%4cEj8z1;B*;T_(i9i4POW%T z*srV65S7C36OEh=z8x9zxNZ`<{B~aT{%iNV_3)RgIo|TK5c(%pbyX$e2CahB%&LW8KM&V6~NG|p|6BSOfMU3|*R zH(&e>svrsSBbO7<*44;6x+f@##Chd1K2VieU3Yh%AnL?)PY`AnrJxUS!+NaO<3S+<71FeejLd zcS_DU9PN=2`R=Q?!A;E;tIo|%#<%FDO(rkQcrxecclxd?itzmOU zxIxpxYt-6ODTiJ#rWkw?y*Z;UgLQaX{p+T$uitm&DhYGnKR~1pYH87a%aK37nS>LS z+g*gBR(e!oRDi;|mlT#26b>35j)8$Brf!c7M2dpRs)+y%dvVJv$33+9r9%iup}*pO zz#Z~7*eExq@f4vb%P=@#KogIpeci<0`F^oXn)Ux~GQ{j?l2 zPUJFGd~37O;U|Cz?yJT0iX^RT44Y}flBuV!F+oo@lcLrPMBbF8wvfj8QPJ%3a^b=F z;&I1azT>e6A6$*j5x-j17tI|1^LADH-7rnjhCRh=IhsxC+|~i*kd_})<6Z2>nu<| zsf?4bLd4v43k^~Xsob$~r!E!`Y?TvqGst5NTTM;~Ft%XO6l^ETN{gB#Y>~WPr-nj` z_yD83`--E#|K^zsS2^daKiY_X**fI44?yw=YvJ^Hu4ddgD#ooEs8=JCaoV;D%!=gx zIWCx1!s6Ng&^u4R@c30|T4>$chnHS~{`@c`@D>y&$(Ugy6fjoW!(w0B8X>|=jMnAN z_;N(2C8^@@gV&q3|@e2BFu?M`=~ZA-F9 z(-@Y}8EdfGY`2XME7clIBizy$<8hfYWjFf)vAS-{^~apO>9|!r%~M-fX)6tK`j1Gx43YtCwxDpa(B-Od#B7zxAq`S; z0oBDG^#sGBVJyJJQgc!#+l2}mQiSSe)suK5uHKw=QbH@C$*39Y1Tu|76Yy$4TeSom z1|pTL^>I<|_qP2PoqN$!=cCdd>(*-beT*)8E+V6VBB?;y^n@(w8o^9R1R8u%M@g~J zOvGiLVC%%&auXpR9?z{4Td7i>VI4l7da7|i6uIT>|J--fLl;EQ6|rY=s%pc1{grpg zkw|$Bo*TTHZ_!}$>4|VlD3zM^NLrnsF2tUpH|1{BbXHxSnK0SM(ICj|W)#HCm zZ)%;@n4AI}OAzsmi2R{7IOqgmdYylA#c=(7AM}iP8-fU0~k(3LF2lTiXJ() zSX7fWR;^;_$*}gSug`&+o`0Wk^k)yex`U05^}0t^$j}gBy)RQ{*|&9{ zjoZ&#<)L@(_MjJw5INy&$V30R>{(R1ew+i7?*ypCLCc??dZl$zP23Cs9DnyC?>_kE zD>u5)=`MXI17WR8S9K6U1rUyE9;IG#-gY`P$5Y5lRPzUO`V^ zCZ>U;tX!1I!vb-_%ft{<@+ANa|JnWB$CsV*J9LUJdy|a*p$vKX$RC5LYmtJ@rj?q2 zKEv}iq=7%rl*@UF?~3^M8$8Ka>F#(1-Pc%1cMPV zSp&3GBQa?*+TEJPE*6X;hB(Pu72^arct>1y>4CdH`sX<`wB!HxkO-3&k(y3{9KD|& zaWWAj*WRnPqACGCH_Q8qbIr2SL87s;djPscicWHSXeg_d=5XYXmasSQN{cV-{H{Z0%*|?GWet#Tf=X)d~4^T7@XKFBvx>W9H zqSc0s5v8Y5N~tpB(O|*N^93nlP%KG{vxAhrTfm#787Jg;_nrI58#lc6QVQ+trR%up zj2(s?@el-rvJltRbGXJC{URq-)KttNu|A|IY*PYwzU9OYc)u=4m0CqGUo88$GR>jW z1k-&%NLuj2fxlPN<&ROk#C-UoiUV~&^ zF<>T9$4r(}9Hm-$WHHy>G>HvryspHGnMFv#Xidmt%pj+sfR%L22{)bmuNPNEbiYmI z&;vV&e0lG!;5_AB_>@L|kI&T#3|URZR}e*JSxlf7$4`*()FIPhgd8%pZ7cJ{GLpzD zFv){ydoJm<6w_L%C?@Jpuvxg&cRc^d*?X^l_0iQ@UB3Aax>nuD34TyAWU}~B=ax4{ z@*=sR+DK}0MUBPH^+GWmLr|dA+hc{&%__67@)E!S@CG~h$^&QJ^LiaU9iA~gtK9Gh z^;c+*S%~sSyI|f;Z5qEn2f2q{gwu&xZFZN3#hXS{%wobTVaqWceRf(Xm^2L`MrNk< z$HA^K78P*pzz2Kq){{;;{m~Ed=mfoU#{zBja3nAQB8iZliiE=|*U**Elfj{2q8#8m z*_ol7HX?j+W|ER(l0kE}Su^2Ctd!r{=X<6-C^Nh9)F=OQ_6dKxWcA(ONLDPp|3!)~ z!XDB#hrF~bS*sB1?3BqDBa3Y5zL3h8l`zF3DKXbOWZ`Op#?Z+Ou>v4I3r)S+nkoo| zifAMo5y8R@2zi zc*rZ)6X9r)yLld8uHWayYA#$X(P>nrK~Y>l$5dunbpZl>!nCLD`t0R^o)q-;92_n^ z6Kjr=a+0T9;sxy?0;GrTe&p#VPX71S?^l1oWv&X)(g^V+kOn7D#f^GK%nUmEZXYYA zW7uI&$h4Jg2!ugBssRWvajbP5JbbsEx_isD#~mj`JNfioe?UK8gHSKP0;!-YNt)XH zQK_S63nEUMFsFv{g=LoJw2oDle$Q4>4uDi}_ouDfd6XQfQ_hMy)b0Py{H z&;kzeZoU$%gY4m{w1e%=6ES^#thC^}x`c~e=%9X2=hln{enGDpabeu+bjD;rE~cG3$L z@Od-f8hbuG_Sx-w@87W+h;_POqV0x}-&Ib9L?DBn?p7=9*?8gWGRQ%FbT-unb1*k8 zib-S9Oz6=V!BFzy<-`g&T}5YXyg|;<gEpA*4L_j$j3e*A3m6-Tud;=k^SC%$v2+3gaw=+uDx!$k!*_c!c^7}wZ6LHJ z@LG0)GUd7Vytg{+4nH_LbRGZ5yBQck6B%upBQhFLYZn?vLGe*#pZNG8_p%t8w>$1} zTAQ4k_%&N#SdFUXJv^?jivZmAuM>A2^YPnvuR8Uor&k1E2<>(Q5rmqJVrDM(yhBY5 z!c&@$SC#X4)$Ovi`{;Y<_!Dow@)^{d zY~9*TKdjVJevAAr0ssn>KW8+=WJB-oN$ISv2q|~7I@7|U!L{9*G;K1BXadZ5#$uRF zEG3UY6N-t8w>j0qL_UHp2-TLMotGX`?emlB$euezXbe$rLA=y+$ zM=;e)ct!=QuETHP{5hFkAaseBO;*Pzh4|%|+a7%At|#wZO|t8-Jo@V(@~=27V~bJO zv6VgPtgt91k=U7PSzpWwDFZ>MovtpDJV8cSce1I|O2&&RVMe7TyXa=Q<|c(5=?+`{ zT*!~tx3q#dy!f}h@bTXtzx9ioSO0RvA6HtgKSo$2(1Z|BSOSESiHTT*LcZa_dWHCL zt#0AZ0>i|F-pqSuS%JbTXfS0?vs;Pa+I*_jIKKOeFE^d}>_4{y;Q(X|9*Cmd?jis4 zB7`yijL1VgQ&Cx=Jkz(Uw?n~{ZB+u(&K%%Zaq}MesmBCEYp4(^5 zs%MIWRkMHF-g}<7|AJL^1@|m)-|n@qkTD7(c&!C2XIIbQp$>8~oE#&pj+keOW0$JUfp){mkp{*>?S^^*HN2boGpoUmpNdASQ`wWpONIFUegH3kNMz zEh~=ZsGKH-*9%TU1#iL$s- zbRpgD^C14+`OiCFyXCY4hbSidPhM%*@R8eo{yUH?pbhZTFcUK}PNh`EJeJ4kl6Y*t z!7NL<7$_RXw{Y~4Mm`O;Alf^)>Et(G-~Q<;G^Nb|H$VS>o&zX_LEA=)%Uc3HkSJce`d<(2|7icJ zxKd15(FA^t{O0A06G-bpf|g2-FMZskKB96^X29rR;2vj zBS!^5{7r%IT|>K(s%^WOf?%%Z&pWI+Vj7&^z@DwDUlKLb35jh;2(mH5qKI9N%6O7m zZY#{`M6wdj_mkf~Wz&IetF+Wn=L^uY#ESg}EpT9PORvG!kXfDd zWe)LlOtoSHU?;?qqy_RIgkxpbO|1bTw(`7N+O zQdgVfB|dyqpRX8+v(7ALVZd3v>wzo&dE4#JcF<-{dh9&ahC3c!rG;h4i?_mM#K*bi zIRdvAp#)u`Xw^Trr?VraMoJcN^ZhuDi1Da|xZ*(NAJpe2T^@^sr4Vj!d+qFtZ~p8t z4|*5Nu9Og~yqf1w6ulmW}o3yE!+9q|l`;quIz`^#cBS z-KOi``{A5p(KDW6^>fMWsF%wmigJm5ypJNWl zw3KnybX(>^RgJx{j^FtB@r!qS`Q^n&t=f9v#R@u10_3X~u2EzKmP%THTIGrK6s@|T zZ<|FUQ`#l9IAoqtNTsPN(|LxmZ^^MBiO}yYiB$#;_RbrduQ~Rst3M^9oxAoGGRmE$ zBLxGT^mMnRG-D4+Bb)+{V8u3XoiE`E1^$TK#<0qRPKBl#XEGfDNl^pIlxTPfG1mQ4i( zJJ{;mcr=!xZ}QjO<1LRr@%Ilu{qDw}pdYpUgO!oG7rCipfTuPxh-3`u$++qi3sWJI zU)}8|RfBOd=E_qOl5ENzDmQZuE^Fd3Cx%dU<&?0Q(nYrj+v>$#M_>QyeHV?;R%<^y z7oEor^3WQjk)>_9uM(Rj~OUIlM~d8t42AGD(rPMat2mxQP})Y zB$MX);v^yDTu%Jx@AvQ9ce502^>j%BozXuafBbA4p!3F>f#85=b~t7=Ntj*zv`T~A zQkfI!CK+9&6=5$6LV#EZ7{r+nSAe7O!KSl5f9ZTY+Ejf1*JxA!izHuz`|7W=BvnZ% z=>4c`lPJl%pHQ+^X=jHF5w(pTE(A3B;)_xjlAEKQwkY5%+k&5K+ z4CdVANT`es`3{F4L-y+oIfC661sVh$dtTplGTbd3;^~wzPa<3Q;xm=w$&Eg=BS}7m5UrxfYh~s zUnCEk0V)QmH)L#Ybv* zxULV^KwAL@<+!iU-2C8!x2y(b{gz*#L+?Vqyy}mTl+Z}ahL(aS2n~mGOgL7hG|fX5 zE@&i+v%%KFT3aLnHI?5&mf=XazA+?VX{*tER;tYDmEmYYA9m0ddVCWuik)w~y6c}u zeSF{QPc~li5c(%{Wcvu-Gd9J{?@6a!CMT~+mgz*4sj%%p5NDub;&at~kw8zHYuO!; zX%_ZD?JkF@72V1}cZs-`1*tIwpSDQJo727`MenX4KfgXW019$8Y=U zlmkJu51)&lN4EhVdFb;!%B+K__4i0NCu63tm4y*q#+DT}20R1_C!1Ck64i*xk`5u9 z^A$#T{yg3BS)I07FT$H<`wCMGUsq1 z>P0h^jE%!|?Y)2h6Bpk6>}tBsJ7<*+IUKp<1PF7bp24)A4X0Q!n^5Lrg|t|?iLTYD z%t?-5I&m8Hg@DiIOD}l&T+ovhQBZAo_po1} zdys{AND}aGBW*}w{0*oS|)}y~r&gIYK%CKcBE~unbIc8!IlVfQ) zCIEujsjgo*ml2foDU^FpTDE$zr%|Qm0QkRn+xM^C_1p(vt!AxXkD<*ok)zya0Y2a7 zo4TZ0iIQ_`m&AF0QP#53tv0XWAJ~`urMv`mhGC%8WN_h7+jrZJ_b-2b(<&cvfA~DK z84g16gT?_~rl~HfVPe`&z=qWvO_`SyL`llv+=}tx++=FsnuKHa!OQnOwfoU~PG0pR zpIe~-U1UcJw126&tXQre%q&UZa^on~#=P1HR0%k)e!^g;0z$vS?HM$&JQ7?CFK*oN z&{LZ?KD^qF#lK}Bk$LaxV)#GE&SRmJg-fm_TZr1IwIox-p{3F&QG-3HH{4s!B1JNv z4L5FA?P?AOtO>a-EK@5G{_gwlyIXJn;g$e80f+x>RSS_rB0m7TLBW><1eJECkdz7C z{V6yzt4F+4US%sH!cNm>HW+Bbh?1UL2-)sbTdQf{1zq(ZjB$>s4hB$0-@f6w7tcQ* zl8Ecp{`0LLUDZA0l`G(r*_}46LU4#wvB}IMM50Eexe*IfoHeQ?DL}${qgdWpih||P z+@G7q+`!+u`16PNo^#p@7q7+-7yBv-Ushs9##=A>y)Wj9T4?UNIGdnS;eF{ zf!BMvQLa80EOQK#Bq2WTvnqh{?L6m%*Y17#B~$1xlEG=#c001HER&({jhcycJSHcms`X}G6R(;UogpqY%8BrbnJtrB zW&$3UBT@d_OR*~IMWsvl8mek%B4@S1IN*!B} z>r8fwp==1`5Jz5j`sa@xJm=K+R^2?J`Wv*H2=YHahDb^&kg)qCW1t|+Ng@FzSDcM9 zs4*y4nGl`hc^IGJ#D!{>%^&uWhW3!ZoWcW5)tpFcknRKvG1_(Ke{tCtpQEk=>(*W$ ztZKr%$bmE+l=p&`@u)+U5Cb9qjGYJDxc=DGlKLjSw9M@Tcx=lZSM2@Uo6q#n)8o6) z1*#24e{dZ7Q90zLt-n`fmGoALI~g&%M25l13goGUrno8ZFYug3+1E=6GlrbZPRuP_ zS(CF4XWO(M;<#|roT#10(jjKr_4p0DPCsy-3+>s7l_mPk90Umg4b}}h)lvxo+bT2q zCa!OmY2=meV#>0_M>W}wnqs018njG0;AJJH&1N&jC0I56OrMQQ*@Q?=HMiiMN?E>x zVREV(iZKd|<~M%0@uIK4xa{230NajSsR;fL5;_bhffmb>pXV2=K#LzVTIp6*<2Bm3 z7G7@PC&x)LY%Y)lm+~^zKe3cE(z(YJY&5fhjB{CYHB(8JZf4<0I1JMa&iCtHzVx%N zp1x_7Avx?|6#XI{(h)!@FgfYAjqoXw#HM0(xB)~nw)U!|x|9qh_Uw*GmSyKPasp~E zwe!l)Ucchy;}5X{WLs`Uug^8)mRo+R&U$Hh&<-fYkomlr>4~N^VxppVIYM4mG?uRFFUQq%a#@vXX z>ogk;<-+U4gt#(%x#XMFN{-CbmM_WSNxbK@dk(x6zxr*;50bgOryRSq@WLxTkFvpEuwNA{H%N z4m+QE;i~J8|JOUKel32nvURH=i}@Gu=xGorUByh^0jnaHkBjm6XpX@$(T3{JTBQL= z(hyh{rD*(RK+Xt+vH)P+zU!=Auipzqn{{j1J690A2ze$8d?}VN-JUo({Bl3Y_TsrI zWC*?=E%VT!&3WXI^D}7YDS0!Y%9jR$L<`bYkN)@Ay)S+Dz@e1V+x#xN_FBjX4?@O3 zTbP)_dE~Qazj+NM)qtSI!{4E^aU{a~`Nztv)9T?-kd9u|@!E(HX4ooW40B6g zp*N6#e!pOTaA6AuILo4Y_gs4WE9baZ?rSk%SOgsL0 z;|Xt{deI@Rf{TeG^shR|?O342(2~IsYf)kAs%72KSSMA9R)1_Tpp%C&rO!wvk>m^x zHRuYfg^+kUc-3pS?Rf8V^j)=XO>SMCTwLU58Nj}IQ^#OZk%Fdk+1e88?TL8~irXad zxggjP7+J!0CY5Z(ZHk&6TQw*1VnG)+_s)~HpK$yBgITn>TXZWrfd$$BG1NM8V%hdM z&o{ezJYR$r%Ehr>(_kERLJff`p=}tXvIubolEM^2j}h*ZLU6QR_r?BaH(q(jV*Tl# zkI`?mAje;^ga{#!r3%so#7eA;Wffy$8`w_!R7$;4n7}vFfegcmm5LR#k;2T# zx(05eYY7|-hzvHqd(OVC*FC>`HC*rf=oPd}KSv(FkPC4?cQMO}C?rxZUC=IB3_+95 zjrC0hvA?w-@msU7AV7l<;KA*?{`2H_yMckZZjCJbBf0|rh`jgJ;owsmH{+T~=F+c~ zI-tC-UKQuqCfc$?$g>zWJVq>if#9SFCf(x1(6L4#=LOaC{ z%W&g;w|;rt&PQ*6POe{juXl}V1M{%=(GxO*?EVY9Q2vmVjZ&GDy~j#NjCL=1qWyAS;1oDa_Z>+=j3dF7$8)UtBqsQtJ#)-tDwe`dEbgqu!%OUG7$De%32=@>QHan{pJmipK#*&tB*h9-Fs9UHXVLCI!#Gr{sGXuIC%}2 z8;IumCRrs^$t*KFWOfD~gW1odFTzfCcFL#XRTVy6%_&=CejG$v2fw|3|81|I^2};n zj%9y@ww6T_$rqK`%|B*_T7s#iNTDrjnqf>z=Nb|j60VgmPMH`QJma&(ph4fK3~+R; z+F9yRXaDikQx|@;GXK0RyI#G4@z+12Ls3WGAp#{+53XQxYHrzHMmx10 z)}j{+W>rbKlATR8w#GojoXwg2Jjg##Yi^6Z(;o39c{PueUIeG0OA)|P^m#bfu6ujW z4?mo9=^^&R=_jVp4>2IWdX)$vhzSFixKtyeQq7_uXE+_mS?aQv$ncj<#3Ft|NJUku zqF#^}&S%aSHk^emjTF?~!Yw%sLsJYLgU0Drmags(S0`|^W_N|%out{|iY z(h=t27PPx1q3OimpO9gfxWmf@{WC&o2b>VnQiJmhb&s7pXE zc3yM#`Hz48FlyVee(k0cexly+df^WA1J@xx+6}Olu9{ZsorpKCC)dPXPrXWy%KVaa zspuFAQ_IZE(;N%yAiFu5X(jGbL>A%F%0r4niDm3K*qxpytI#NhnoimTG1RA9095_^*}GPYq4Nt5`WZ50@4KhUvL0ih zxU4B-6g-14wA6ZbQKLpx$E~EMh0jTo3Zp0s!^m@p!G2827cYmT`V|sVwB@b;1U0)ayPz@7VJXynE;dIrq=MLjR40Y}q6Q<|UEl5j%w~!ZKsG z^A!zxCLtvXCmk+pY9@8mojEBzl*Nd(;4n=hRZ1SBIm_yGlpt8GrogfK<=xv(z44em ztIs(6%9UAg7P;W}DqzkhTTT$n^m*d#9Lo<1ye6wQ$>uI-C17vLW|AV@OIu#p`@=W8 zF43TaZU5kLv|AexEeEP%>AFR_$Mxb^?5W5x%1|71tfQ@uYa(u8Dl)?o903NwmaZ&P z(s5b1%Ux@aph+O?5V2%MJuHh})l(l3i z;dQ3043|6WBibkqted3)pG#GfKgBNeNVqPN$x8#iieUz`0-0|z)_SChc?hJ_v$DLI zNo&&z4R$?8lQ#uGTz>wvi(a|zjI$v%zHaR+(C>jigxuRfSkNj^l1g+9Ampu;TlwQ? zP8#ZZ0{IFfVVpZlr7kPRjONrHv7n(6J^$D5l04f zxd7L%N?l8z$cUfl`t(3l(DPtp0Dbc#IcZDpq3H#4ZJEMqH%y&gT1Z^>5_+6M78!Fa z#DPo#;qzA~z54zgpR81KWR*>d4M%NVA#+valZU`kiI!sW+KhaPFA%lT3t!&I!?+sM z7=f$CiGu-5OVbt`+Uc4|k$|Xd->&l?zxw_I9CSSP9J8XcQjy7BAhY%-vOdt|V+pt( zk&5xqoK&!cbhV1iZq5W^K^MhOkz2NnA@J39BGVo=Q)?=k zI&~=}XEb~kw!AgefDvk4+-Y~}CDxD~p-drZ_r}o|e*MuUTMpqy!z;9q7vCL2lVfaT z;{-|^!Sk9H*CSCf5u1r7RsLnjHurd!Uj1BXa};w(e`XHRGBGDlT*xqlfl1kH#uV{g z86Dz#?RZuq?6+QJouh zC`?;qI@4h2Morl=%wZNZLPZjDH5d^QTmW0Pp8Vh`7kqYz(DlwWThVy#N63Fp0osGq zJ_%41ZQU|nffsf>?+K;Jf+REQOeXBQg2PQPLP54JmSvWROs9+7_H^^|=CZm_!9(*@gB_m^{Y7uKXpE#mR`XW@Fx-i@nF`ApRWL$iy zSY7ZtjgT5`8C;T9U$QP|C^bgZq$Qm#SZ=D6j*Ctr5k zw};@z2lrag`6DBjJ^>qns1o@w5q%2Z3}l1DZaAovyLFi)0+k(jnjp(e*=rq_e7xhp zmZKj%=a>st$-l%Im!mBliBxq^bRlI=l?B;=o~vjOcq6C6xo%ApXwpqM8XZfK!K>5f z%V{W`!O&#YxfdQSZx~|wyD|+N%n#nM`}|wZI{}S6)~_8nU#Q;jAM;AxGly*Y&t7HL z7IT9Nr+G9J#jyh`(@+`^BIO1*%eGj=+@4jRq1S3-RU=Hbh*DE}!pfYIG06~CVX60| zb9Mog|5cTQ)^4RZ+;9tQJ^G~&FT8+(t`J{w#qrc4hrJ7L5<0%Rq={;l9G&XcF|2{; zIK%2@Yu#Gaoftv5lphh>&IQ3O*ZcS|nmhje!P`f@6++uNwY$1Z7D(;)m#MNxF8$pg zVn*xYd%Ofo#YT#dVyHagwzH1E|LR+x0@lN?*A&0{UbVsTE7l<~>m!g*h6*I0 z8VAvcqkf> zn_)lz&iLqD5VZhBbEXIH}I*Q`5}&_kn5FgPca3z&9)~`{qmN-opgu{ zkoQY5Bb=~X{(0fS_qLpVXk-8A^#{2e0mSM_hDuq z8vvRzEKq1EiZF#Wd6^Nur$!+zEprb}w_u7Gn4zoP038!NvQ!%}iEbSdxL<92a^ua% zY}~v$oPKlBo#;0lhTwl$13*!rr!u9+T%PXhP?NM_THVtq!O}j3n|E2k0JVdmWa-7U z-QiYx?GA<3H>1r`X-zCsRaNj8_ znk^k!3mQSQ$!Z(7IOB0$8Dvi;%n8oPuhQ9Edy$3BHgh6limS^r-0V>tqE4!0+*K~Z zd2dUAlPq~@HoO4HAio{9G`#TK-F5oCZ$5PH*+leDl0U(sALK(0ye= zqFP)Wq#4YZNuSe|ExCSPrmB%TOP&ain4wCy=xw*A4P0Q>a19}f-MRDGYhJqN!Y@`$ zUDR1+jl{@lU)%xLzYLKm6Rwm~;!h#YJT0u9wTIynDO1obLer8A9|AN>Pam+2~(|X<7Pd@FVx1}4odOOe$w9SH$ zSW`E9eO|n)&X9>w1%}!5P?}t9u@iJdRUgGyl{qR{XtKpf_ z0CLfvo^jdTr(b(3lpd~MtGx3k^@hNXDLR?INB*{HE3EV?(_1lE`rL7VQtxNId_{#Q zVDutOq(%{S!njN&O=+1$)TqS)S#Tgr+_C+dv)=mlv(?qM=j)X~TLU>c2G;}w+u}`F z!+?(w(I6_V*M#TCGBr}#R!fR>goHTM3^_y2 z5Hf(u&?z|xqQD>nd~2WI{R7T>_S@@y*7H2;ne|tknq1cD$HtokE$_ z60Sj2WNWiTt{ycxQ&X1#KHcgWr+ChpgrIN)yyZBUG*K#ZRZ-6&@&*(qBhc?cBI=Ga z{&LE*pK-BOv2pYkY|6~YAsnD|f>^~BXH4+gXkXXH@m)4x`-eR&C50R2ju6D?9=C*Q zr9sfpwVcY3*g2s93E<%F0~hRh>=>-3&X$e+!?gh^7wK$(1JO?^PM5_VtT3_@Z+FC7 za@f`JOq|KC{Fp7@Z}z_V&nHg0a})Xb?2L$Z8~%>sh#G_g!}TeQ*8xNx(j~ zY@DK8!(b>oLe{S<1E$5_|`{U);e!k>EQvJd}fO;ek$I@BMg$wRt=%b=;my)9gJnrBWS-3<`*zPH}^@T&W7T{9tW=Nyf#9|v-G z7Py_v!3ejMXd1|z7+v!1_{BiTmvEt6i>_-f;q`Gy{rbCi9RC(Z z%-FK=gVWaw@xKtxRwJg6bLqNHias%_4pYVnC7G}*#o%3@rnhmzrd+xZ(wp*(hb^{f zG8rp-C7l=O&d$(Z7~~+Fzw3dM9(@1W9MJdI^yt^tzdv=Y2vQ?li3HY8p2e%oxixA$ zuyWL^nqk3RYB2Kz>(WvkhRxh^S;|UKHNvD$JP(-ylXBZo4_dHUzk2`v2k(1$&BgoQ z$G?lo?>CU?&kR~LPz##}exXr|iuOrNSY9;+J>4djH{<&R(zohi}C!J@X>$V&Wi2Ujp=Ij;kaVv?}bCUC2@P zQY(j8#~wGvm1SF$G?tiJbHx|OoAL78pjnxi0O7ynt;6r0b?<{Ots6Y>=-i-0P<}YUs!BEeieFDykc1Qma93Kfpo^!p3Q)ghMj>(1=@2vQASbJ4 z8v|(fyFPj7v%BuN=lS*WyyB^&uwILiOJDx82EFd95fd9}a%S!plP48g=Hp?|Ivm;Z z)p>@WhAU4Ux(dwPOw)vW-nW zw~CU{sohQBsJmGsdzdjq@@jP}YOhY)0FxYf_WFn4e)>HPwxT~G{SjLZP>(nVNYl?n zB|^+ToRjTCw}qDu;)EQhgih+r7>V&Jo(5#+kuyFy@|PpKzJ;Avdu4j0BXy|FBfZdVix(uH?2S#$qov5zfN9cf*%j#p0uz#3lst@rF|UgISl%4 zxC30ohpyfE+q<9Nw03`JxpsK?8baFoZ@3`2c6F$%NP|J}pgbmv@_4S?#ZINho#240 zCpjmnLe4MZ);cMArLjOAN~GIbs>1pJeB^ZpE;|0@qd(ewi0!DXiS$24uDS-;Pde|C zp`0@XM%2?a+SOQtXt8OJr&c?ndKy_ z*(@-#=4iM%BAA^???OSffUh_#mV@W)-gEEun@Y*s;^6c8@C9bDxI&=GA0vFx=^!cf z>Xbp14UrSA__z%vcC@g^1{2^a%eZ-Z8=01E6c<#$B`m~~E~P#jPYMP`o??pd&^k#z z;R-8Mh>dn#_{lw&zqb1q*rK?=xmMa*kplQNqNGk3$4jr&ftgxTGr5D39MP*9XUSzE zrAS{+XG(*|7lKuF)+HAlcgim}eJjpn7O+kykqf{4J{YHWd7ToGQ!9u&yctWT=J{mo zm`oJJ>!;Si9G01S>?pT2`GEr8V^>yOI$uX}l$n}TvTdRlhZTw1m=eLY`P%ERpK{Ta z73>pbN3Zc(26EcD;M4Z=piCpxnWg%g22D()%dLm6IM#tl23baCfB#?<{CC=umpc2_bGQ~{76SwGgan4_vw~O_K zEuBz@L~36>NHPxbGGhkK;%y#MknZR=-QJ~qtgY3ivqA|z;^jRLyz}aD*KN`xAO7(R zSYSg!Y9AKB2brwN%FId@sTQ2ZDME(UOH_qwPN3u33d3W#hDa*77G5xqk|I8)Agb$W;g32zSAn&S+>@Q!}YU z3u7S78RJC`Q@O^3G~Ol8-TcVe&;DQ0?_Y5r!G>0bn7#llnP9F_MpAN5hDgjS<`gIn zSB(;q^R}T7HE~)l@MW#oRx(Rb&U5#dKAtVB1|`tt=REMMbANx$TFggVtT{t^1va;Emj z+HJ=^*1~p}0lDMfAYV2xYnF(|tT%J3xmLDajFTO$9K9~Atb9$ruh5S>l14K}MM{9D zcePlgbUU~Sm(i+fB1mKr;q~nU$jcl!>EH*)KelNBcO@-`4YvZh?3wGJX0x+w7HaE# z8v(?rI$youO>{{uZ-GkW+uZ|1k2iZmyvooEB}{?2k!TwcE_gs$d^4hk$1zxfrjae& zoHIbDw$s(p#`Ia?8eRKU%9Hf{360EAaDz zdhkfiPnr1moL~T0r5ZBTxW8o>uQ+=ZiaLBJ@Mksy%;G5JmJ+3 zXtrHW;c3^UoW{ueNf5~}hoTu%S)NS>{HUlkCpzb5)N6 z%$aW*=uUyzQfCymywv#m>@{9xc*XI86`Y& zs03P;IJuOSV+z2^j>o<{W6#@1wqf6JEiH?E0}0ustf11<9kh4+?qBY` zY2PWEA&w4WCTQ=6$jLwXn+E+J$3_!!f`XB}-euOgoE#K1*nY{QAMg0!m75=0ugznS z^Rc5ni;N8v8$PyhEx~1 z%@{&5>a&CI{q@C%HoXx4=i+~1?G2H4o`DAryEzDz(hcWCXDjiH#j%r@)%%6`Qefno z5rb4_X|@RaLdD_OY>v<2vApk?H(%X(;VvL=Z{0Xb{*-##Isdb^hV3Iq-AV!Tz5<_R zsnpqo7QbUN$Du+tTYtOh+J|mfchbCLE#dDY z-y6%|q^B-$dW4e$saHvEK@~HTKHY4Hl%9dXl;K-QrXU&e{CjrY_~h~TAA`M(wrrgF zhzA?hZzAVx-vA+tNCTUTLko;#G9#`>8+Efjr=p4vlpJ8!t!J?{B8L|!!@5S>ZJiKE zeh1s*f(3cU8~=Xb*_$X>=kQMhL?>de?|T{Ylm7vK3NEY2uN(Lw7K2=~Mk@?F7-gNOY{ZZew<4)l78v1Yes<-v zM-JZhE|4GGyMicxq6jlR z#h|%WU?o@+4tX}wK_u8@_MLK0Fwa^A38|`En&`GGqI{+6omv@2xq&}TyBrdrCLVd@ zix>C3^e+%rZP_^Rjs4h1*O7C#ybFw!D4R-Gn&1WIo&iNbPnc^+X~rXpIa zlhGVvXm~g5KX02Xd+r|%Pbry=2Ptt`{>fD^Jd-AmD^H*L-pX(m+pJ=uG8SE z+PZ=M8f1`y*T6@cgDDh^#p zpw06Ulr4`(P5Hu*)150hv|>1%R!_Zl$o&tqCYzT+j_DC4cc};seO{6pkDKgy@89nn zduT0%-m>wN!be!M3gjg?E>Vx#k`kikA@J#SZlpd$p$LdMYAh31lcvQCKEm^5B|YOz z2l7VUA0~8V7L71Wq)ewsTv&;EYB9atpCL+1h&RNlM&L3(_0XYXUwruuH8$**eX%ye z*oy4E0u=ei6*b4~4T(*>e#TQ*@j@QU%NKDYVX|k!HCUPA9Nv>3Ny5pbNMb^@QhnJ- z*1LwfwwFmZ&HK){q~L+maObnHzjMx0zgwR!SDw7C8%jm~AvjlqYA4}-7&jL5iqeQ> zsjpUQfN0cs{7ku=;w;-Uii66m#k9JSN~UF-+-|9Jh9;AAU&SPBN|i(ia&}#D=?#Cp z{Nzn|l>W2xuz}JcyY^zo>`=VqI<%!xphHr~6{Z}4rE%yZ28+p0OUjM*PTwEFyX#U_ zpT8XICc(uJZkHP$f9|ede)jz4o#~mcH4}5>>xz~dRmU|wh{+{Pgkuqy%cwyl9uUIZ zn1kY6G7DpWuGbn#IYWYmTnV=PU_&hrvXZ^2$6mDhG*jTpe0JMSPanKzojbnW@+kJD zDddH}fhU>2ppCShLYSv{BUzb@$AT`uHfT@Tt@27UA}2569&8MTTkD9$shmub8J>W(XSQd6gbS_-&8p^ zK;qVXwBPNIm~-jMWN_O(BEwQ{cE)o?F zzO(*-4MQENUKRqWyUv~%mi$?b&9-!T-NS)WF*LGk4xH9X zB9V-%P>;u|n$-z)nr@>(`bZ`jm|%Imc;728eDvE*diqbk{VLX=64?sYVW=s*N`y7; zq=IC#L1izdXPJ)XNqWPiC#W|$t0B|k4p*xsWt-SCrBl7ZkZHEqyJbX_%Au@mgGmmk zAvv-A#5eZe`O=Ml+O+#Sk8zSsA{DiqLr9S2COAEjl|`MQ4Ld* zB{8a5F1U5VGCl9v2XDONiCbU~9JO)$##pnB^>K4ks~kfzcY(U;r!@w65tD*An=mC1 z#q540y3ojKW2()!Z#=R}9OyY@R0@reHml|NK5uT~YCO#R6l~c|ycBHp0~h@H=1-o#bn_g!HU9&w zK_fz=e569HB}Iw_PgNY%p4rGEJBT!Yo};%Cdk$pPjH*o*}(mj!&Ja zQdJm_b$yaDZ%aESnz$pah0yKHzkYhdNq>B7lgM+Md#zq6AzywD#TO|IEg>y+P?tDr zbAd05LJpx>l-H5wRk3Q8h*xGFawDn+?CIbW&z}0b)Bdt46FGlR7`s#b$X(~Z4o+o= zk*Sa7>@`bq8k<#>lmUUmGMLp}_k5O=h%KRrJeTR%QVCyMNW>56M3q!q&G~3DvaFXZ zHG_POiIAlw#7S!1*Qt z3d^0w0sHil=k9swAJ2Tg_CM2Jw@wIr3-M#sqqrHmiy5Gcc>G+(-eP;kDQj*O`yD!V25m(i>q0U}$T2xH**R2a zLgoa;tOXXx1hIZhcBwNXr#i-@Q3FxeG{W`<#o{QhK~fOoApSaV(oJW6`RI;g)_eb% zty?wQcwb+?dcKByYZshsTFugcBcXj_pg%1c^fVkdkY(oFDsM7rMZ2__$fxJbL~KV# zFCeLU>T%Xr=*D@&P$$_vKC&lY3nZAq<^YL*Ln>utECM_SV6l+dQDFl}!VK|!<4f_rSMGr-0oYG($mO^KLQ>(JHpB;@xr;e>2ziz9#6;tn#UNW z&>AZ^oknraapBeKSXE~7*&4*!WcwSpY`=Hs4ac0h9+!j90*L<32iIYvoj^X^kyq1o!L}JFMUX?J+o~q{7F+!w+I#n>q^;>XPu$3vw?=C`9j1LW#waKd5xxU&WbX2xX$Twx>_S=9Lhs7 zanGSA{(Ri)r-Q-FmW{#V>r8JHsh{u&0Jg~hKHg3@rFcBwvWg3YX;ziq4i`wGWsL-d zV_Z>#Mkomu*xDqk%~^0Y1}~%BiODH&#$EK`p#vZNpK8_r{My@(kDxzBdw#mqt3St>Hah6A`D<3VB!od=DAT9fObs%&b!sbS?1<8A@2)pM0yWxZ~>sx4XJRmKw@C}<^^w&ptsUXYFmJBz(xG!S|Ku}4s!H-ECc`g@~`(j{pIiW z-nqW37GGbxmqTHv$nW5_Mxkm)Qn${pu?1x=Gl$MDBjzbS6(^06rk&F1_PVNxG~rX3 zNXfL`hH2^og|W;;vIB~I;?wV5f5omBHUWR`>?&*>RgrJZzYgn?CXHrIak{7*km~RQ z^HP>jYK`E3J&n7i9)Fqd?#_*r42d8T=K*lu{=peLK0Wlso=xELfmhdllp5sPy8wML zI$ScMha<|nN>x^;psSI4+zDYE3(J^nZYX6iEMr8Hm%T(w>G)VafPz#aD@qF|1N~gh zfG2ZXMk_4Ai>};%$tQn&7>AAg{tLOA55d9LF^x<2Ym>5$4 zf9=y?cVNlUrqy{cZ0Ywr`S5^EPRJb;zFt{OH3Y>)O?}NgMcu$0n<^|6lohGHb>vG(?Yq3RH=yC#Tns<1Z0wcV-#}{ z%^I4VA}0=PMDQsO<_V5a15%xUQ$PBz8$bELbXLJ;Zj?pS=x)!*P^R*zP5^nWU>Hr6&pyMJ)6$s&U+kUN4U&n!UawAr-DWT zw7>nHJ-__?lVjH6!QbL{0M#7V@F){X- z3k3~Qv#>=$(iqmyu}_`!%;`HGTYqKzwY8KggKT^S43mfwm!jo~EpQXEo0CE43JzZh zcDTllMdL1s(^@<~33u7cI}cpB{oG?6uN7Jc0|Le%v*tNH1j}EinpbJXMVE+= zkb`bb9X7M5BD1p8)fA!YO$nmv7({+|UUkD6FWvFs+Wl_lsEftdDr9fqr@*15g?-B+ zzvZ(ziy2_@GgpyiD2gTuL8nVHU?f#-GD}dhS(r0c%v@Pe1Piw?Mi~=Kv$|c8k0mv2 zdz&KT7$dx1+({SDAUHVT)nhNX=S&B-oCwc8sM+@WAFhD`JaPl|Nk~eJ2;woZES;^G z7K2w2(y#&Dpr>p?O;}NAcL#Qj$l4T+h`y06LUKxHtxVEx(mT}h7(VWH`xz|Bf~f4l zb#nGSkG}oePuKK?M_cRiUq3~5LM=!%W*cS6rZOe&B#CTZYJbQU^VMOZN#kgEgqhjI zC$vohDWOmv=;2*Mv^3zDivG#SVh$MMQF(9bW1=D|=$0q=F;TBgLv3b7SP8+%@Q z>f${|e*5{Rb?z}2d<$CuD@6L^Q^Ce4mV|RERN~VQ&X$3OBy;^1d%m zKK{Y=q7MCit$NEMzfQgdG=+HvbZ9cKV$4SCr8;R@ce8aWZGyA%tE#3>pwUTt9No6J z;*7E)11+WE=;0_yDH8wZ4vvZwF64YuMH(_I1z}1!)YfZs=K}UB{~=}MAR-g+7SmsJ*UZFJMcYTfWzUg1QTMNJmQq?1%F4= z=CbBu9LZxbXSF00w)=^{KK5^qU2>@j>xcUvYtzUq^76Bgx;B$&8Qq|;T$Ex3dQ{1R z>M7wdo9V3w3{ISgAfn8}4KcSVkw}T^VNOLOjr~?nz1^Bb`^|uS0XB^Yo8SR>`mrbe zaPOg0*BP_-|JhJ&bM0Q|{Y%Irm@gtZOK-#(61f#TYm0JLv5zQmd8q6d^$|Jb5WyG7 zx;O>+(3gL6{a-Hp>)T6g&+YlbtlifC?E3(+Vm_V?TW7TnTl>qcKH((}?P=%MRRg@41+1B3!xj1Db7z%XKZ8eW%v9QR9{O5ZSn8T4>Eoc|LPL1C`Y*q0f zNN)$y6rCbKOmmmAj)a)yQBpo9y=@>PW=3wZ{U68gKINp__Cda4%f{01eXK1ha_?S% zz*t-pF4UnDG7YNMP0lKMz*$a7{H2@{m+RYfAwtlU?Gjm9pv|RWB;UI8gk2B6amS{f zZOd!xOZh8E=zd7K1{so|PtZuE5VfprVN0BT^(3>hw(#-=!Q9RBt++y!UnjLnWg=AR z^+sHAp;s`~E^=1CL|m2DCd^JNXC$ZH9>EyY{G5t84A0dY-?{nb6Q8;gOr5^5anrRa z4ezV)?JDHEzXw|+G?4^3WL^p3V(9y!87lFd(Uy3Qh^_b*5CsZSv~FprfdMG2{$E1 zbxDNxw~&E2-*W4q7Dw2C_e3K(03F=|nVEoOW=>q2K}xSMuFgF#-17RT?{(@xD94aj3e;j(Z6x6{50Zaw_?^MAZ=y}llMdVT9Hk>Sq(XH~H1 zyy48E>J3E(d$`^3cE&T&7z*L>4a)LLhFZ-1xJ_qUE{%@4DqLHQ%J14G9m7E00|G&R$(0JY+oj~-?PKu~T zhK9IYXiCiCfX4Ljb?V9STJhgeWnDx3>5;GJ%#>Lk;Nd z$Di=QO~2o@9Wx=?vhi)&$Jl>pk#D~bst}ef(;j;b!jwH(xSRiW(6j_LpC{`nu!){=lp7XpxFdv9T*(L>%f z{|Deo5>ve9kha537Sj!NskJzTlD%M%{EdQ@-j&`%CiLh8du3y0HN?!*gepn98g(jpOhPZIg@zkgcTI}~McVm7A=X;)S18CczBU0Wk+4aKZr zzQc!e=Mq1kRN}2<%=Ia<(CF*)}A-uIr#_xY|1Q!90!kK zT4{z)Sp%#DW0}h>a_WA8M$GzK_G*#m_l+tomfRp%ctEe(OUL{pQ)gM>LCXKm-KU@M z)+7G}5)C*lC?ur-0X@+UA-nyF7^Umd|ly? zNJ$FmTx!tIr5g#O2EkR%UNqwP+P)iACq1y$H443Vq{o2B>FtnE~Mz@ely0s>52?Z|I)la|j=B>A%cK3Q8eKpa- zR(lBfLkwI&`GRyYXE8{)u8Les*Q)hnb6(GwaWpF~%?YPVNX?_645h7<2#I?loT6<9 z%;@QT=R9}k1J|va+kN{C8?J97Ti^aqPqAx{`f;*!*2UJMl#^krX$ zPnp!j)wILUMft9_k>&L*4Y4*u#|T9sjyds`v-a=5`jqwL{_XVjM^X{VZBl5}K&S)@ zgF zxgYP{G!^(J`aRXQa~bPoMicqPAvZkMlSQ(VCs>eMT7kAgW;-j3O5au}+PrDbg6e6N zqDf7PJu}g?xGulIoTbrGlQ>#dhq%<-N5n03UPqY?vH9UU&N;aErE4)0k*yo%;>DV6 zmBhN1odc;iApxfhLb(~#nD;7p*?KG1u_b-0K3PlfXXVD`m>iDSxOR0hBPaDCb`D3WO>Stu>?Wd;Vm2PB(1P)*FqdxzmtCi~#2`teOitV#O!Jcp zA^7L;g~fnbTXhc%xMYMLF!bDfkKJwK!hsP50k?dJW@QyXYp%Zc^Sdtp)gg$Ywrsq5 zniN|>N@V&6(1qD0wODr^O3N)EY3!i2$i!^o58b_Dv1e1nGZhyhBTa=%MDs+wszR=5 z;o>VaIz_iU?y~4CQ@XV1v-nOnp09`a@^3HQ^U?3W*sLD)z)wHIZ}?b){(#n8 z5*!Vy$<8V@yahBqm4y)S)7bakhlg%Ebnd31<)zC1z@98_q<9L6@ubn#@UN3ECU5Rj=(p;A4+1X=)c@>%ie20 z`u%zm_gqfG+J>@VrR^HDQq5QBD=K-BX&3znBg82LbRaP#8^Wf_m}7>rYStX5*|#=< z*Xe4R#1@=8)<6TLBw`LG)a;f#8RUsUQ`BMj>w;J;$m1HunTFZZ%#giSUEN3ZDB23q zY7qx~`^2j+zhm#7?_oo~;nQM6A45d9h#;|53KGd(gL5k8xFlqK$S@fD)ZmG)uE=IQ zvpN8Zd@2i|U+j$xZRx#WR!uYK^Eo1a;$_;~-`i_PxOk?s``9Z02dTOG^{ zdg6tx=#z^YOd`I~lH!^kHAkbI%ZXrwq7kd5S$0>cBbhAxEOE9p0D$@Yr4L>8+-bLC zxs_DUc%aya~sk4kOLFHZz~4EA-JKCBrMT3LqFKaOj+_ zAf(bpCB5ckffDzMQ(n9HvS&BFQQnmt!gO#s zYCs-l0SqwKP(;?Ug^wq2`bBnwLn$H>WoWfjPjMZBilk%PEQ3BsvW03D)u&Z2nK7GE ztd=yj)RC(k;ue<8qN+5Kr{sL%LOOOYQ~092UtzWd(Qv~Lbt^bg8XCh(MVcCcsE~!N zu}QnwDz?QCAz%8z#pj)LG?ducvT@X}q*_2AA%8IZn7~4 z?#+Fm=2tHZxSUew(78Dy1J_yZy0QaRo;t(jQ=WvvMxv&GMU12gTtveMa>WN{KY!{U zE`BA0_3i%A8g^kI&$a|wG==h6(kv}Ds;-vlPK!*Yw~FzZP}o2UY4d<46R7HAy0T#o z&g0c|)~IgDSe0?DSn@8k@wr`y&z5R>GKAqu8$YGDg;;V+i(S#^tPzrpIfp*HaQSO{ z-~a7z)_pK0U%}S-22x(=0osVsMni&htTebiVDL||3bmm)MQX4Zs(5#&L0wS?U;!tQ za7SHBr`z%%dbH9TcyhX;FCY`!9bvP_2dD9lXO92lj{Ubl5diS-Id*N1gCf`d4Bq`B zni&;!e4(Jy$YK*k^r*lZW1-85+tPL#)Jj}@0wyScK#Jze1(fvi^UY%%tb^l^|J`Lb z-gxz96uJ1yTAqwY{FE2eXv!&W;K+RO%HS7C?Xh}(Y~oMn!H?RDb*EMh-N0Cxw@#GkCMlQN?1g+i!C!^)Ql(jd9sxYZ7w2+e+f^92e10_ zjhpT)VO{y^(|2HFWkG(r8)&dB*|5M3EhQl23j*BTM6!sS6fH3I^fG^xBd59@B8byE z-rz)6f@5;$hYuZn(%JX?dOhklKe6W0agnEf2H8(dyAR|@uQpgSkn0VNNFd3H!V1=+ z%`PycOP@ezOjDW_cUhO04AeEW6lVqvu3!_4+?+V083OwqS0CARVDGD&TzQ}OWb7+{ zfLI`sL1k99%wn%hpcu3yO?E83OgpF02wM$9mCHCwWRq-)GN#YdW5MiP{a|&e zSf*jF|NhbSZ~XIy_t#VO;t$v7^ccB(nFKZ-g{ml{0g}IjPg=6-IfyOb zdL*>x{OnTBK}E|8_pWMA*q zl6XrSQ`HSgvi@L5?9eE^Y9K)!e*38xpLqPD^&&0*QI7o^5vd_D*i{_YA~o`dgo*qD z3a#j~24*;9%5qx`w$4Oi#(M*{JgpI>3M|dIEsNkg>=ZtpD1hq?r(NX%mVNZa_uqTg z;Y&An?EgD{El%4&cn`j$Mgt2T7uB=f9UG;h4U1VGsfE6ha<*VF|Maa)lSYv=5W zKC7ZK=NC`{1M0$>8Qq4*pyQVlYM=$jtVv~~!4mh}Jq68#RlquO;k~E7^yXRHu!*?l z{k1dQ7UXrupTVAwkW|)m8aj>XbGE$(BX6PaGZI{haVnC};tR9W=20(L?U@H9GC+-W z*RJgc-?@*AwKJ9-!6JmOAwN*T;@}tXmS%r3srO8y4vWNba~LZto@^nqEM`lT)YFaZ zp{ao5cYAY=sA$!+11<8v!GFAU@&l)Bo-J?gTl-?*k>kGlEzB+pTuTkWF87N7hMI!8 zkYW|}k2Q&Aixr)93ADIcneJ;_F4AD(N>UIqbE1L5Bu_iBC?ap43Z=7HTW{qFq7J}Y1&`C5HlpSX)KkG)HcM!hpZ zP%OlErK}X{D%344ErT~x)K?}nS|_Tr*$PFcTUwZ8KWHi0&5W8ysye3ywwNpA1d^iW z)H$D;O-`##L`tK5ayLwnCznA{akA&dPal2dpO3xyb?iSsfJ#vCx!*y)Xn{5@QjnkROluj}vJ9G?P)TfWN%o54aC0C^Qse~R3gR{A^Zm1V7TT6G9Voy`3`8b6% zT{hBo95=2&`4eqsSjOkve3=Dcv8!Ks{qd(yz7o?&ZrLaczk>bePmq89#RlM&KO9UU zx?(9m&ARj?V@RoNmnszvnZO#<0@M~q)JTy^lwdSI5j3?TCcEEFplP?QB6TPH&MEdX zJNfv3-~Hr`2iA?xu3TrG4M_U%LW8P;R&7&Uma*FrZ?S3UozS26`}lDBI1xb z$$^ff*Yt)dxopxFbvvB@bRFJAK$A7kKD>fS| z!0tB&r@=8R9%klL##z^Dgb3l|SC9MsAI`hszp3Jy$GH>VVHG@T%2-*#4ZzW;SYZh&5Cc+&WZKA3#!%__**`}dQc58JLyg_Cy zu3BnYGsI)2`pf0AL#T@N3H~&=1On8aFOL4xm;XF(O~$plZ^Qm_D>A(9N)YrT>>v~8 zspj-OkJb|6d%9E)ymD)JL|k{YTY9IfG( zM3vE}iajo|GBq)DN-5NawL=`f@A})GyYJBLn>@J3ckESfyD+(CCNhy*2|s~6*I1bI zHlx~^5Rw?-S}|W2@on;s&ohg*Og6ueh9fr9?%-5U;;?zmU`3LbkNf7amWm33lFBTQ z9ctlUcARj`hd1utu?|sxGFXEQ-$dTKstef&sk~)mqS~yr1tpK*Qlg@zxdNAu(UVSv z2kL1e#7sOK6d4VErj@5KQ6tG=OH7|h!xFhiO6K>V$`W%@WCh)Zcx9l%im3l)*I5@n zxA&Aa$8ah6zl-U+YKS&zX$$C1ZA7iSz*K8x|G%Z{j=QU@?@+~R%ByX)3ewl!z4zXG zzjyC-?%sRvdkqj9hEx(%pscWz(hv-@R*)gaFvAEm282Wrf+Qh?8H=>Pb6)?==aciE zd!FC(JiqZBt*%VQ>3Bfh!y_=rn+|DTuNCqYE}|FmpHn+`{9*gmm~+C*BNrN~ctoQD znIM)_X-~L<;ib51P?3400j26~xuo+IDH*Pcfmuq6#6{&|UEY@?0IN9m>tBC(@1EV5 z{MF=G1%1#zAnx&Db&hIh+eb==Vx_f5+RJ)5oJ$Lxp%zQGlum_FCxPv8>S#hKppQ@8 zbkC{V|8GYCjpnV}!M*WI>lnhegZz68(4!j8OhNNfYpPs27{k%WBoEcnwb*sOjkIw? zj*0{}p+nHk`7#B2Yh0w!H3qf>#O3p`N}>bws7K#D`P7laAHT8<+xQ~sKWWzc#4n(4 z>OxN3K?CtH!MIOBj00W<=ZhA?a@NQ?DUOFOyHE`E%q2UYKYifJ3jv6E?%Me`+^bpt z(bxYv*ry@^&Mt^j>X7eHdb*mfBv0dx8sdL>8+_zutY-{m;!_ff;UY9jRY#Ig<%=g1>r`#E zao8$L8JA<2EAz-K=AXFYk|ffQCbZN@W-?D0;le)j*4_JWz5nw~1Ev zb2_TLPD+u1Mj=U= zM|H?fI*6DV@u7xA&FlN(g#zH!lq;@G-YpNkLp`1k$Ngk0@E3d=LBty&QCzn6}(1VA!!f6dI@RwpT5*g%$Z(X3yU64`;JtmFWGj>V* z?YtPN#0D!bhG7di5;4e2Tu7gY^7UFWXoWw3={12z@j~%NaTUyP-TD`^vZ3AAK7;E z^P9bJ4h_>@q#?(4LzCZ@_1PK0bK@c;juK0u%pj+t1G&y4LKnMun3PZri+TH@j}qf>uq3HTjpwN zttfPSz0*lTYi|urMjfBSDWv$F1U2l0F!=D{cVF1{-m92hsZoGQJ>!t1Wlfvg80uCw z<`j_lD}B#A*dWau%NQ=o1ilB=Lvp2T)WIZZnu;a3DK6b!iUka-w4opT>jy(27IF;Cy*}#-ov_&>uLPwM<4Tfq} zHxd-YqKYT#B)jsJz-YOY1!V5LfeQrxN8i5cwp$*$5$Gl7tO>q~fn`$2h}wbXiBSxa z{KK#$#p^jGB|~o%cI(w9hQ!+uwu8eIyON@{`QVqLD{H8kI`p)5J@%`Ic3gHnX7$3{ zk72Ya$Se2#k0z&FvP_93gRGM0ikXTJCekTi7C-6WLli==5S6s0t~A~V&3R_jIEzt2 zp&2c$cEv3ur4e1LTmEh9%R5eE`Puh8ccBd)9U|4kcutqu7}}JbyfzqwHeP68aeJLH zP+K)5DT%^r1_dBK>&YeM1xcAv$&glV^E_fr45wvZpe_=xbkK_Y*{@!=m}D|Ox%G5Qe&A)W{Q2LaFR_Gv3fl+DNE z66(ar8lfxd#;!aYF65U<3uvQd3aOAb5Lw~Ks&QRng8tMU`ySbS%{`xC{D}j<`7*jg zImjdNyH&XhmW`ySRVGd2o~q4APK=~o85E6%`n(ER{P7!)Jb3iu3(<5GtZ2{NqFMh& z6_Z0KA-MNI`9~>=NBUHIG3-g2Jc@px6mt<4iiU=7??}muP-2uF3Mf%XYG&L6KK<>fv~nh zdf<{tBr|GHE%cLOR$oHY@(M~uK`K(~t66rtBNvI-dW{@|9ApLEoKDC|Y&HyerOO#Z zHYk;1ze3aDTlBJpX=d{!NoZ?5^!#7;y?*hD&C%}zFSgMSN=4#CXql<$@dRz9V$9`S zDM{Iq)hvxx(V(zq=OKoqWf%F%Hsgh|Y>|mr`Su1$(4Y7__>_uGad8&{ z1Ai5g6NxNu-jU#PjB5JCG~4j{B9pDBpZoobmwoa>)G*?lwg0YQDiVK>T)Z7ZR-Fz= zB8sZUY>o4(c#2U>69IayJrC6IrB2#vA`f{Rb7xm)YAuFtAiSE{O3zFmpSB~px{L_4 z>D%{z^5R{OZ&IG_xf;{oI}6#f71()6Mz0OHYH{C{0aw!+kE+WXNA|o@oG@0&G@V{L zkRe5St>{-!`;+C6F-q{W6+OLfiNu%073hR&^CS`5z6dQlNqt){Ey}z05fUBLH>4a$ zyLX*>>$4j!dT^7(`GgiTNiZUroyXNVzOodPcLo){kX7?+*h3PdtimevU8Sb1GE}-N zO0|zdD=h{_x-{o&n6!9M4ZZTyU%qt3W1kGrPc-v?usIPve0u{Fn4rZc?*XvAJIotA z{Hf9DHXF?Z7jHJPO-f>;QDhjgQmvj(C526V-%sw^bHlxV!U&ejuP)IT`37>f@;c~6 z3e1SeS^#<{I7v?kDO1v~W3v^_LNd{(uxl(qJs}RzaWjP2@&l9Q_a`p7;fE(LK;P$~ zzdMX>6Fm}sqpi&m+{s?7iQu{8@Hkv=GtAK%(Wk026$ucSQkP;%CO|lzICj&%+n)G* zQ*voPZMT#aPSWl4Ou+{Ih|qE;6|4 zElP1|tQWN8GTL!^@bT9k{P|UwTg`(XCeXJLAd^EyFe~Yab%5G7ddESz7~hq-0%D8Q z&rVce{IHC>A#qumLp{MLvJq_9>EXPqp%4oi9AhySSr&ulp&gl}3C>(huWr^CT0uI_ zsXz!v6-)VVUJ{o6G^Ge~PTJaGL%V*KE)8tc8k| zf$*$0A*lk*?;yxk+2fG*Y`^@9_wPG&486LytiARW%)q~53!)MA1!Vt4KrQB{W-M-= zOVM`Wn$YhG3oZ8L8u6-(CP5l>r@hTv8o~BTC7GxK*taym`d*@NOrDwX)@fr*3{-rxh*4>5S#3?TQ8NP@w@yK(HA2zw z{Li0x?y_h9fSN);K5*gr=$_FdWl2t(OKGN7D~I1E1#vc!CmXNQ(-A7gAqi8}3b2Pr zYpZbi;>{9)Yh=ka5~6TE>XdHSo4s6H*B+WjJT2Xh=dmj}n>orQ`Ku0kt{50w`?^dL zL{p$(-hI;*??3tHcQ9Rh#r=EGKYbSRG`}djE|-f8oUspR}Ow9E#w<==Yod zg08Ix+5R;E**Ha#VSX4Q)*F=BD4eC}WO-Mm&#{HF;sjz7N}Q8u2(QW2HB5PoTO~`= zF1H49u*hh=oJNF&j^U^(e zG?Kpe8fE~LK-5Y=GmB>4P|h9|3N-Q#VU=;Ht(K`)1N>*zfF0`aODg$1OlaVMkLwoL z$+ILc8aBb4^P0yVz5C@$w|$0fo$p@`!g`hS%jgIBI`X?caH!KQ=D}8H$!A>Z{UfTC-1(W`g1f2N~7{?E!N`*Vod6IT;C3)H`0>zUS!9hr##( zRDKn9?fRMfFp)MYvVPW$Fe5himYkS?mtO@7LnPeqdn7d5yuMh;c@;stWmk5z-mx&F zoG225nkhxja0LK$J@wRWTR(Z_HVA-o*8XxcX5`pGu74JQg~ZrkHL%;3bS|h$swwky zYsO`R3V$rlpb@O`A$7JKPL8~A?T>d{@$6n`z-(E2d~Z^-e#DP0X#;t+bT**rRsKR| z7AwbvK68{*2Bk=oT%((1gF-!B!<%jp=qYFv9r?rQhu*&7ub8caU&Q=}49L-+LNZ3g z8ChF=K zpLIanP&?ENbc0*+@j~@JUyE)rjk<3_9VF5jQH1d>oR^6LNt9 zFC6AC9=!U#t8af8Tl_yik2wo`0lCu#--ONqud8u^t_A7z9#58vI(hR9nQNhy?DKv;^ zyX(f=J;7)R*J{t%Wd5w*Gc3Xkk~^at#=GJI428Qy?lJ>gh}YEE^K-K=>j17boflIY?D5!=S4wz> zDKB5D?l5w^B8N>K%S}TMjo=0B->3U`-~GyO-o)4irf<^G)i@t{`#3->n0V6yT*!o! zBHklhFf`^>pDog7wK2KG?*!h3pA>BsihedU<@u0V9ld(nuFHRkUg=xbUg6}m>(k!? z$_5oA%^rbMhm!{ciEnApk_|?kqL{I|79688mU5QrN}ZQd2!XS=d~U~4B%YL!QwPhA z$M#?K!VjMK3c6)(`;7%%4F(c4n4rR`jf0#l-Pt!3vV_(OX(aLs>jr5~W7k3YdRnC8 zO3FGu)JrvJRHaFnNf-27y?CrH0zC!x_wJjv{_^*K#@GoTJ&Hr0`%R>IE|`m|tjj2# zn(x#oZFStR$mFLCMQC0%_Gq?XCm33I6TXzHCWy{@A-Z?0o>mlPO06G@C1ZsNz$}jc z_|en9f8fH+x%v;p7ofGyI?_o4J?#8mW7$y~$0Z*ykkh?c)m0BQJc0y%JbCnzgBRZQ zt6f(BI&aHb_X3`F{SQxXM=wkq;>|!lNo;hrF@&L^1C~!C3yy?~Qia1aIBcslZ!uA2 zyY2`~nXi0p>(1XE`CbF<#2q;Hef9cJblcPzxvPd8xa@7fEP~A9oIjy5@}#MXUIB}b z*kY>ZvPH{QhCpGB{Nr35U*Bk!XkC%46g0JHcJ78`NEZq1OTCN)qQe%Gd2Wl_VP&>m z_mlVj^Uz*Qb?R&HM$tvqAm!sw4Fv{Ho1-&L%pEF1EYj4woGwx`$<*;yy>zpfUXfyQ z^&&K~GOV#ILtit+<#SEBkx^G!vW=wzNFb^OPVF&`LzIbyU=ufmE;2f*Km7RK*AM;( z|Qz+dVS$y^R{fvTSe;`AiF zk@8t>a64rR;h+i02qsDibFDkS?%5wS(wWt!#SNg4%kvqZ(7WNsbM^SDFmQr`dzZ!DoVuwo?%IE!B#^ljM zCtrT~iI4XD4f?8Ic^^Bc!U$UdxOK8r#IVkj%0{M3sA)u0a32#6v%x~5FV*QvJcmJ5 zlsaut{{8N!mmYoRVH8b%&e~Ncu$HnBc~39{YKOIw&{R!s$5KI!*IHS(+n-m?$X-jz z6p`g;#=J%T-_d?A*EagaCpS~!z^qtIds`T_)lOq5pE zeJu)sHthz7Ccdp>C#&Pc(L4*8qp)fpjQoRSld7daY&25(RJ5Eh!l{4gjc0ei`j-<} zlZzErpqtKzXb?d7=E_<+olkA4z4N5e6MzJHnJ8BnYHgV$4qFnF-XPz1FC_gKajwkf z6*Lh(mRkV-5g}A{?2dHQCsy6HG_&4g5c2hAJno#~L-onbu~LeifCj)4A*zd?xae--kdF=M(BimMt7v9RN1$p?13OW-%) zz!FWKZIPm&M5n9QrxvoY4FZ>v@YoMfMPdWd@xK25w`vNFk*$u106`^5k}|B$9_jG;Q3}V>?7F zpRtrz0TzY?>PIF!=F6ojUjI{|76<(Oduk diff --git a/tests/google_messages.proto b/tests/google_messages.proto deleted file mode 100644 index 489c4707327..00000000000 --- a/tests/google_messages.proto +++ /dev/null @@ -1,149 +0,0 @@ - -package benchmarks; - -option optimize_for = SPEED; - -enum Foo { - FOO_VALUE = 1; - FOO_VALUE2 = 2; -} - -message Simple { - message M2 { - optional int32 f1 = 1234567; - } - optional M2 m2 = 1; -} - -message SpeedMessage1 { - required string field1 = 1; - optional string field9 = 9; - optional string field18 = 18; - optional bool field80 = 80 [default=false]; - optional bool field81 = 81 [default=true]; - required int32 field2 = 2; - required int32 field3 = 3; - optional int32 field280 = 280; - optional int32 field6 = 6 [default=0]; - optional int64 field22 = 22; - optional string field4 = 4; - repeated fixed64 field5 = 5; - optional bool field59 = 59 [default=false]; - optional string field7 = 7; - optional int32 field16 = 16; - optional int32 field130 = 130 [default=0]; - optional bool field12 = 12 [default=true]; - optional bool field17 = 17 [default=true]; - optional bool field13 = 13 [default=true]; - optional bool field14 = 14 [default=true]; - optional int32 field104 = 104 [default=0]; - optional int32 field100 = 100 [default=0]; - optional int32 field101 = 101 [default=0]; - optional string field102 = 102; - optional string field103 = 103; - optional int32 field29 = 29 [default=0]; - optional bool field30 = 30 [default=false]; - optional int32 field60 = 60 [default=-1]; - optional int32 field271 = 271 [default=-1]; - optional int32 field272 = 272 [default=-1]; - optional int32 field150 = 150; - optional int32 field23 = 23 [default=0]; - optional bool field24 = 24 [default=false]; - optional int32 field25 = 25 [default=0]; - optional SpeedMessage1SubMessage field15 = 15; - optional bool field78 = 78; - optional int32 field67 = 67 [default=0]; - optional int32 field68 = 68; - optional int32 field128 = 128 [default=0]; - optional string field129 = 129 [default="xxxxxxxxxxxxxxxxxxxxx"]; - optional int32 field131 = 131 [default=0]; - optional Foo field132 = 132 [default=FOO_VALUE]; -} - -message SpeedMessage1SubMessage { - optional int32 field1 = 1 [default=0]; - optional int32 field2 = 2 [default=0]; - optional int32 field3 = 3 [default=0]; - optional string field15 = 15 [default="FOOBAR!"]; - optional bool field12 = 12 [default=true]; - optional int64 field13 = 13; - optional int64 field14 = 14; - optional int32 field16 = 16; - optional int32 field19 = 19 [default=2]; - optional bool field20 = 20 [default=true]; - optional bool field28 = 28 [default=true]; - optional fixed64 field21 = 21; - optional int32 field22 = 22; - optional bool field23 = 23 [ default=false ]; - optional bool field206 = 206 [default=false]; - optional fixed32 field203 = 203; - optional int32 field204 = 204; - optional string field205 = 205; - optional uint64 field207 = 207; - optional uint64 field300 = 300; -} - -message SpeedMessage2 { - optional string field1 = 1; - optional int64 field3 = 3; - optional int64 field4 = 4; - optional int64 field30 = 30; - optional bool field75 = 75 [default=false]; - optional string field6 = 6; - optional bytes field2 = 2; - optional int32 field21 = 21 [default=0]; - optional int32 field71 = 71; - optional float field25 = 25; - optional int32 field109 = 109 [default=0]; - optional int32 field210 = 210 [default=0]; - optional int32 field211 = 211 [default=0]; - optional int32 field212 = 212 [default=0]; - optional int32 field213 = 213 [default=0]; - optional int32 field216 = 216 [default=0]; - optional int32 field217 = 217 [default=0]; - optional int32 field218 = 218 [default=0]; - optional int32 field220 = 220 [default=0]; - optional int32 field221 = 221 [default=0]; - optional float field222 = 222 [default=0.0]; - optional int32 field63 = 63; - - repeated group Group1 = 10 { - required float field11 = 11; - optional float field26 = 26; - optional string field12 = 12; - optional string field13 = 13; - repeated string field14 = 14; - required uint64 field15 = 15; - optional int32 field5 = 5; - optional string field27 = 27; - optional int32 field28 = 28; - optional string field29 = 29; - optional string field16 = 16; - repeated string field22 = 22; - repeated int32 field73 = 73; - optional int32 field20 = 20 [default=0]; - optional string field24 = 24; - optional SpeedMessage2GroupedMessage field31 = 31; - } - repeated string field128 = 128; - optional int64 field131 = 131; - repeated string field127 = 127; - optional int32 field129 = 129; - repeated int64 field130 = 130; - optional bool field205 = 205 [default=false]; - optional bool field206 = 206 [default=false]; -} - -message SpeedMessage2GroupedMessage { - optional float field1 = 1; - optional float field2 = 2; - optional float field3 = 3 [default=0.0]; - optional bool field4 = 4; - optional bool field5 = 5; - optional bool field6 = 6 [default=true]; - optional bool field7 = 7 [default=false]; - optional float field8 = 8; - optional bool field9 = 9; - optional float field10 = 10; - optional int64 field11 = 11; -} diff --git a/tests/pb/test_varint.c b/tests/pb/test_varint.c index 95a04ab9b8d..cdae9dba473 100644 --- a/tests/pb/test_varint.c +++ b/tests/pb/test_varint.c @@ -53,6 +53,13 @@ static void test_varint_for_num(upb_decoderet (*decoder)(const char*), ASSERT(upb_zzenc_64(upb_zzdec_64(num)) == num); } +/* Making up for the lack of 64-bit constants in C89. */ +static uint64_t make_u64(uint32_t high, uint32_t low) { + uint64_t ret = high; + ret = (ret << 32) | low; + return ret; +} + static void test_varint_decoder(upb_decoderet (*decoder)(const char*)) { #define TEST(bytes, expected_val) {\ size_t n = sizeof(bytes) - 1; /* for NULL */ \ @@ -74,18 +81,20 @@ static void test_varint_decoder(upb_decoderet (*decoder)(const char*)) { upb_decoderet r = decoder(twelvebyte_buf); ASSERT(r.p == NULL); - TEST("\x00", 0ULL); - TEST("\x01", 1ULL); - TEST("\x81\x14", 0xa01ULL); - TEST("\x81\x03", 0x181ULL); - TEST("\x81\x83\x07", 0x1c181ULL); - TEST("\x81\x83\x87\x0f", 0x1e1c181ULL); - TEST("\x81\x83\x87\x8f\x1f", 0x1f1e1c181ULL); - TEST("\x81\x83\x87\x8f\x9f\x3f", 0x1f9f1e1c181ULL); - TEST("\x81\x83\x87\x8f\x9f\xbf\x7f", 0x1fdf9f1e1c181ULL); - TEST("\x81\x83\x87\x8f\x9f\xbf\xff\x01", 0x3fdf9f1e1c181ULL); - TEST("\x81\x83\x87\x8f\x9f\xbf\xff\x81\x03", 0x303fdf9f1e1c181ULL); - TEST("\x81\x83\x87\x8f\x9f\xbf\xff\x81\x83\x07", 0x8303fdf9f1e1c181ULL); + TEST("\x00", 0UL); + TEST("\x01", 1UL); + TEST("\x81\x14", 0xa01UL); + TEST("\x81\x03", 0x181UL); + TEST("\x81\x83\x07", 0x1c181UL); + TEST("\x81\x83\x87\x0f", 0x1e1c181UL); + TEST("\x81\x83\x87\x8f\x1f", make_u64(0x1, 0xf1e1c181UL)); + TEST("\x81\x83\x87\x8f\x9f\x3f", make_u64(0x1f9, 0xf1e1c181UL)); + TEST("\x81\x83\x87\x8f\x9f\xbf\x7f", make_u64(0x1fdf9, 0xf1e1c181UL)); + TEST("\x81\x83\x87\x8f\x9f\xbf\xff\x01", make_u64(0x3fdf9, 0xf1e1c181UL)); + TEST("\x81\x83\x87\x8f\x9f\xbf\xff\x81\x03", + make_u64(0x303fdf9, 0xf1e1c181UL)); + TEST("\x81\x83\x87\x8f\x9f\xbf\xff\x81\x83\x07", + make_u64(0x8303fdf9, 0xf1e1c181UL)); #undef TEST for (num = 5; num * 1.5 < UINT64_MAX; num *= 1.5) { diff --git a/tests/test.proto.pb b/tests/test.proto.pb deleted file mode 100644 index a587fb18250872a4b66b976be4ed5efeafd5bde7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 652 zcmZ{i-Acni5QUw@^k-U24G4=@8ZY#!LMwuoOZ(JH1ds6kH;Ne=(DVa0=l_ z!XkJ?7%`q#{-K08D*nN&1s-;`YX=h#X%Dp|hhjUgw}A8&df z(ZUC2{sp#k3F-CbRkYYmn%p?E@K+A?bVM3=3cDO?t~x6Epm!lUBxzTYklAU7wI_Nq ZD&C3z@2kV3mCZmDdUQca@?(kS={LWsf1v;X diff --git a/tests/test_generated_code.c b/tests/test_generated_code.c new file mode 100644 index 00000000000..3d1f518b4c4 --- /dev/null +++ b/tests/test_generated_code.c @@ -0,0 +1,329 @@ +/* Test of generated code, with a special focus on features that are not used in + * descriptor.proto or conformance.proto (since these get some testing from + * upb/def.c and tests/conformance_upb.c, respectively). + */ + +#include "src/google/protobuf/test_messages_proto3.upb.h" +#include "tests/upb_test.h" + +const char test_str[] = "abcdefg"; +const char test_str2[] = "12345678910"; +const char test_str3[] = "rstlnezxcvbnm"; +const char test_str4[] = "just another test string"; + +const upb_strview test_str_view = {test_str, sizeof(test_str) - 1}; +const upb_strview test_str_view2 = {test_str2, sizeof(test_str2) - 1}; +const upb_strview test_str_view3 = {test_str3, sizeof(test_str3) - 1}; +const upb_strview test_str_view4 = {test_str4, sizeof(test_str4) - 1}; + +const int32_t test_int32 = 10; +const int32_t test_int32_2 = -20; +const int32_t test_int32_3 = 30; +const int32_t test_int32_4 = -40; + +static void test_scalars() { + upb_arena *arena = upb_arena_new(); + protobuf_test_messages_proto3_TestAllTypesProto3 *msg = + protobuf_test_messages_proto3_TestAllTypesProto3_new(arena); + protobuf_test_messages_proto3_TestAllTypesProto3 *msg2; + upb_strview serialized; + + protobuf_test_messages_proto3_TestAllTypesProto3_set_optional_int32(msg, 10); + protobuf_test_messages_proto3_TestAllTypesProto3_set_optional_int64(msg, 20); + protobuf_test_messages_proto3_TestAllTypesProto3_set_optional_uint32(msg, 30); + protobuf_test_messages_proto3_TestAllTypesProto3_set_optional_uint64(msg, 40); + protobuf_test_messages_proto3_TestAllTypesProto3_set_optional_float(msg, 50.5); + protobuf_test_messages_proto3_TestAllTypesProto3_set_optional_double(msg, 60.6); + protobuf_test_messages_proto3_TestAllTypesProto3_set_optional_bool(msg, 1); + protobuf_test_messages_proto3_TestAllTypesProto3_set_optional_string( + msg, test_str_view); + + serialized.data = protobuf_test_messages_proto3_TestAllTypesProto3_serialize( + msg, arena, &serialized.size); + + msg2 = protobuf_test_messages_proto3_TestAllTypesProto3_parse( + serialized.data, serialized.size, arena); + + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_optional_int32( + msg2) == 10); + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_optional_int64( + msg2) == 20); + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_optional_uint32( + msg2) == 30); + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_optional_uint64( + msg2) == 40); + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_optional_float( + msg2) == 50.5); + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_optional_double( + msg2) == 60.6); + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_optional_bool( + msg2) == 1); + ASSERT(upb_strview_eql( + protobuf_test_messages_proto3_TestAllTypesProto3_optional_string(msg2), + test_str_view)); + + upb_arena_free(arena); +} + +static void check_string_map_empty( + protobuf_test_messages_proto3_TestAllTypesProto3 *msg) { + size_t iter; + + ASSERT( + protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_size( + msg) == 0); + ASSERT( + !protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_next( + msg, &iter)); +} + +static void check_string_map_one_entry( + protobuf_test_messages_proto3_TestAllTypesProto3 *msg) { + const protobuf_test_messages_proto3_TestAllTypesProto3_MapStringStringEntry + *const_ent; + size_t iter; + upb_strview str; + + ASSERT( + protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_size( + msg) == 1); + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_get( + msg, test_str_view, &str)); + ASSERT(upb_strview_eql(str, test_str_view2)); + + ASSERT( + !protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_get( + msg, test_str_view3, &str)); + + /* Test that iteration reveals a single k/v pair in the map. */ + iter = UPB_MAP_BEGIN; + const_ent = protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_next( + msg, &iter); + ASSERT(const_ent); + ASSERT(upb_strview_eql( + test_str_view, + protobuf_test_messages_proto3_TestAllTypesProto3_MapStringStringEntry_key( + const_ent))); + ASSERT(upb_strview_eql( + test_str_view2, + protobuf_test_messages_proto3_TestAllTypesProto3_MapStringStringEntry_value( + const_ent))); + + const_ent = protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_next( + msg, &iter); + ASSERT(!const_ent); +} + +static void test_string_map() { + upb_arena *arena = upb_arena_new(); + protobuf_test_messages_proto3_TestAllTypesProto3 *msg = + protobuf_test_messages_proto3_TestAllTypesProto3_new(arena); + const protobuf_test_messages_proto3_TestAllTypesProto3_MapStringStringEntry + *const_ent; + size_t iter, count; + + check_string_map_empty(msg); + + /* Set map[test_str_view] = test_str_view2 */ + protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_set( + msg, test_str_view, test_str_view2, arena); + check_string_map_one_entry(msg); + + /* Deleting a non-existent key does nothing. */ + ASSERT( + !protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_delete( + msg, test_str_view3)); + check_string_map_one_entry(msg); + + /* Deleting the key sets the map back to empty. */ + ASSERT( + protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_delete( + msg, test_str_view)); + check_string_map_empty(msg); + + /* Set two keys this time: + * map[test_str_view] = test_str_view2 + * map[test_str_view3] = test_str_view4 + */ + protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_set( + msg, test_str_view, test_str_view2, arena); + protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_set( + msg, test_str_view3, test_str_view4, arena); + + /* Test iteration */ + iter = UPB_MAP_BEGIN; + count = 0; + + while ( + (const_ent = + protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_next( + msg, &iter)) != NULL) { + upb_strview key = + protobuf_test_messages_proto3_TestAllTypesProto3_MapStringStringEntry_key( + const_ent); + upb_strview val = + protobuf_test_messages_proto3_TestAllTypesProto3_MapStringStringEntry_value( + const_ent); + + count++; + if (upb_strview_eql(key, test_str_view)) { + ASSERT(upb_strview_eql(val, test_str_view2)); + } else { + ASSERT(upb_strview_eql(key, test_str_view3)); + ASSERT(upb_strview_eql(val, test_str_view4)); + } + } + + ASSERT(count == 2); + + /* Clearing the map goes back to empty. */ + protobuf_test_messages_proto3_TestAllTypesProto3_map_string_string_clear(msg); + check_string_map_empty(msg); + + upb_arena_free(arena); +} + +static void check_int32_map_empty( + protobuf_test_messages_proto3_TestAllTypesProto3 *msg) { + size_t iter; + + ASSERT( + protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_size( + msg) == 0); + ASSERT( + !protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_next( + msg, &iter)); +} + +static void check_int32_map_one_entry( + protobuf_test_messages_proto3_TestAllTypesProto3 *msg) { + const protobuf_test_messages_proto3_TestAllTypesProto3_MapInt32Int32Entry + *const_ent; + size_t iter; + int32_t val; + + ASSERT( + protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_size( + msg) == 1); + ASSERT(protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_get( + msg, test_int32, &val)); + ASSERT(val == test_int32_2); + + ASSERT( + !protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_get( + msg, test_int32_3, &val)); + + /* Test that iteration reveals a single k/v pair in the map. */ + iter = UPB_MAP_BEGIN; + const_ent = protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_next( + msg, &iter); + ASSERT(const_ent); + ASSERT( + test_int32 == + protobuf_test_messages_proto3_TestAllTypesProto3_MapInt32Int32Entry_key( + const_ent)); + ASSERT( + test_int32_2 == + protobuf_test_messages_proto3_TestAllTypesProto3_MapInt32Int32Entry_value( + const_ent)); + + const_ent = protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_next( + msg, &iter); + ASSERT(!const_ent); +} + +static void test_int32_map() { + upb_arena *arena = upb_arena_new(); + protobuf_test_messages_proto3_TestAllTypesProto3 *msg = + protobuf_test_messages_proto3_TestAllTypesProto3_new(arena); + const protobuf_test_messages_proto3_TestAllTypesProto3_MapInt32Int32Entry + *const_ent; + size_t iter, count; + + check_int32_map_empty(msg); + + /* Set map[test_int32] = test_int32_2 */ + protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_set( + msg, test_int32, test_int32_2, arena); + check_int32_map_one_entry(msg); + + /* Deleting a non-existent key does nothing. */ + ASSERT( + !protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_delete( + msg, test_int32_3)); + check_int32_map_one_entry(msg); + + /* Deleting the key sets the map back to empty. */ + ASSERT( + protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_delete( + msg, test_int32)); + check_int32_map_empty(msg); + + /* Set two keys this time: + * map[test_int32] = test_int32_2 + * map[test_int32_3] = test_int32_4 + */ + protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_set( + msg, test_int32, test_int32_2, arena); + protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_set( + msg, test_int32_3, test_int32_4, arena); + + /* Test iteration */ + iter = UPB_MAP_BEGIN; + count = 0; + + while ( + (const_ent = + protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_next( + msg, &iter)) != NULL) { + int32_t key = + protobuf_test_messages_proto3_TestAllTypesProto3_MapInt32Int32Entry_key( + const_ent); + int32_t val = + protobuf_test_messages_proto3_TestAllTypesProto3_MapInt32Int32Entry_value( + const_ent); + + count++; + if (key == test_int32) { + ASSERT(val == test_int32_2); + } else { + ASSERT(key == test_int32_3); + ASSERT(val == test_int32_4); + } + } + + ASSERT(count == 2); + + /* Clearing the map goes back to empty. */ + protobuf_test_messages_proto3_TestAllTypesProto3_map_int32_int32_clear(msg); + check_int32_map_empty(msg); + + upb_arena_free(arena); +} + +void test_repeated() { + upb_arena *arena = upb_arena_new(); + protobuf_test_messages_proto3_TestAllTypesProto3 *msg = + protobuf_test_messages_proto3_TestAllTypesProto3_new(arena); + size_t size; + const int *elems; + + protobuf_test_messages_proto3_TestAllTypesProto3_add_repeated_int32( + msg, 5, arena); + + elems = protobuf_test_messages_proto3_TestAllTypesProto3_repeated_int32( + msg, &size); + + ASSERT(size == 1); + ASSERT(elems[0] == 5); + + upb_arena_free(arena); +} + +int run_tests(int argc, char *argv[]) { + test_scalars(); + test_string_map(); + test_int32_map(); + test_repeated(); + return 0; +} diff --git a/tests/test_table.cc b/tests/test_table.cc index 063eb68cee6..e19a74a50de 100644 --- a/tests/test_table.cc +++ b/tests/test_table.cc @@ -166,7 +166,8 @@ class StrTable { std::pair operator*() const { std::pair ret; - ret.first.assign(upb_strtable_iter_key(&iter_)); + upb_strview view = upb_strtable_iter_key(&iter_); + ret.first.assign(view.data, view.size); ret.second = upb_strtable_iter_value(&iter_); return ret; } diff --git a/tools/make_cmakelists.py b/tools/make_cmakelists.py index a4923c8da07..76e3ee15981 100755 --- a/tools/make_cmakelists.py +++ b/tools/make_cmakelists.py @@ -38,6 +38,8 @@ class BuildFileFunctions(object): def cc_library(self, **kwargs): if kwargs["name"] == "amalgamation" or kwargs["name"] == "upbc_generator": return + if kwargs["name"] == "lupb": + return files = kwargs.get("srcs", []) + kwargs.get("hdrs", []) found_files = [] for file in files: @@ -98,16 +100,7 @@ class BuildFileFunctions(object): def py_binary(self, **kwargs): pass - def lua_cclibrary(self, **kwargs): - pass - - def lua_library(self, **kwargs): - pass - - def lua_binary(self, **kwargs): - pass - - def lua_test(self, **kwargs): + def lua_proto_library(self, **kwargs): pass def sh_test(self, **kwargs): diff --git a/upb/bindings/lua/def.c b/upb/bindings/lua/def.c index a9ab9a89db0..6dc6b1a5757 100644 --- a/upb/bindings/lua/def.c +++ b/upb/bindings/lua/def.c @@ -15,97 +15,71 @@ #define LUPB_SYMTAB "lupb.symtab" #define LUPB_OBJCACHE "lupb.objcache" -#define CHK(pred) \ - do { \ - upb_status status; \ - upb_status_clear(&status); \ - pred; \ - lupb_checkstatus(L, &status); \ - } while (0) +static void lupb_symtab_pushwrapper(lua_State *L, int narg, const void *def, + const char *type); /* lupb_wrapper ***************************************************************/ -/* Wrappers around upb objects. */ +/* Wrappers around upb def objects. The userval contains a reference to the + * symtab. */ -/* Checks type; if it matches, pulls the pointer out of the wrapper. */ -void *lupb_checkwrapper(lua_State *L, int narg, const char *type) { - void *ud = lua_touserdata(L, narg); - void *ret; +#define LUPB_SYMTAB_INDEX 1 - if (!ud) { - luaL_typerror(L, narg, "upb wrapper"); - } - - memcpy(&ret, ud, sizeof(ret)); - if (!ret) { - luaL_error(L, "called into dead object"); - } +typedef struct { + const void* def; /* upb_msgdef, upb_enumdef, upb_oneofdef, etc. */ +} lupb_wrapper; - luaL_checkudata(L, narg, type); - return ret; +static const void *lupb_wrapper_check(lua_State *L, int narg, + const char *type) { + lupb_wrapper *w = luaL_checkudata(L, narg, type); + return w->def; } -void lupb_pushwrapper(lua_State *L, const void *obj, const char *type) { - void *ud; - - if (obj == NULL) { - lua_pushnil(L); - return; - } - - /* Lookup our cache in the registry (we don't put our objects in the registry - * directly because we need our cache to be a weak table). */ - lua_getfield(L, LUA_REGISTRYINDEX, LUPB_OBJCACHE); - UPB_ASSERT(!lua_isnil(L, -1)); /* Should have been created by luaopen_upb. */ - lua_pushlightuserdata(L, (void*)obj); - lua_rawget(L, -2); - /* Stack is now: objcache, cached value. */ - - if (lua_isnil(L, -1)) { - /* Remove bad cached value and push new value. */ - lua_pop(L, 1); - ud = lua_newuserdata(L, sizeof(*ud)); - memcpy(ud, &obj, sizeof(*ud)); - - luaL_getmetatable(L, type); - /* Should have been created by luaopen_upb. */ - lupb_assert(L, !lua_isnil(L, -1)); - lua_setmetatable(L, -2); - - /* Set it in the cache. */ - lua_pushlightuserdata(L, (void*)obj); - lua_pushvalue(L, -2); - lua_rawset(L, -4); - } - - lua_insert(L, -2); - lua_pop(L, 1); +static void lupb_wrapper_pushsymtab(lua_State *L, int narg) { + lua_getiuservalue(L, narg, LUPB_SYMTAB_INDEX); } -void lupb_msgdef_pushwrapper(lua_State *L, const upb_msgdef *m); -void lupb_oneofdef_pushwrapper(lua_State *L, const upb_oneofdef *o); -static void lupb_enumdef_pushwrapper(lua_State *L, const upb_enumdef *e); +/* lupb_wrapper_pushwrapper() + * + * For a given def wrapper at index |narg|, pushes a wrapper for the given |def| + * and the given |type|. The new wrapper will be part of the same symtab. */ +static void lupb_wrapper_pushwrapper(lua_State *L, int narg, const void *def, + const char *type) { + lupb_wrapper_pushsymtab(L, narg); + lupb_symtab_pushwrapper(L, -1, def, type); + lua_replace(L, -2); /* Remove symtab from stack. */ +} +/* lupb_msgdef_pushsubmsgdef() + * + * Pops the msgdef wrapper at the top of the stack and replaces it with a msgdef + * wrapper for field |f| of this msgdef. + */ +void lupb_msgdef_pushsubmsgdef(lua_State *L, const upb_fielddef *f) { + assert(luaL_testudata(L, -1, LUPB_MSGDEF)); + const upb_msgdef *m = upb_fielddef_msgsubdef(f); + assert(upb_fielddef_containingtype(f) == lupb_msgdef_check(L, -1)); + lupb_wrapper_pushwrapper(L, -1, m, LUPB_MSGDEF); + lua_replace(L, -2); /* Replace msgdef with submsgdef. */ +} /* lupb_fielddef **************************************************************/ -void lupb_fielddef_pushwrapper(lua_State *L, const upb_fielddef *f) { - lupb_pushwrapper(L, f, LUPB_FIELDDEF); -} - const upb_fielddef *lupb_fielddef_check(lua_State *L, int narg) { - return lupb_checkwrapper(L, narg, LUPB_FIELDDEF); + return lupb_wrapper_check(L, narg, LUPB_FIELDDEF); } static int lupb_fielddef_containingoneof(lua_State *L) { const upb_fielddef *f = lupb_fielddef_check(L, 1); - lupb_oneofdef_pushwrapper(L, upb_fielddef_containingoneof(f)); + const upb_oneofdef *o = upb_fielddef_containingoneof(f); + lupb_wrapper_pushwrapper(L, 1, o, LUPB_ONEOFDEF); return 1; } static int lupb_fielddef_containingtype(lua_State *L) { const upb_fielddef *f = lupb_fielddef_check(L, 1); - lupb_msgdef_pushwrapper(L, upb_fielddef_containingtype(f)); + const upb_msgdef *m = upb_fielddef_containingtype(f); + lupb_wrapper_pushwrapper(L, 1, m, LUPB_MSGDEF); return 1; } @@ -146,17 +120,6 @@ static int lupb_fielddef_descriptortype(lua_State *L) { return 1; } -static int lupb_fielddef_getsel(lua_State *L) { - const upb_fielddef *f = lupb_fielddef_check(L, 1); - upb_selector_t sel; - if (upb_handlers_getselector(f, luaL_checknumber(L, 2), &sel)) { - lua_pushinteger(L, sel); - return 1; - } else { - return 0; - } -} - static int lupb_fielddef_hassubdef(lua_State *L) { const upb_fielddef *f = lupb_fielddef_check(L, 1); lua_pushboolean(L, upb_fielddef_hassubdef(f)); @@ -211,22 +174,21 @@ static int lupb_fielddef_packed(lua_State *L) { static int lupb_fielddef_msgsubdef(lua_State *L) { const upb_fielddef *f = lupb_fielddef_check(L, 1); - lupb_msgdef_pushwrapper(L, upb_fielddef_msgsubdef(f)); + const upb_msgdef *m = upb_fielddef_msgsubdef(f); + lupb_wrapper_pushwrapper(L, 1, m, LUPB_MSGDEF); return 1; } static int lupb_fielddef_enumsubdef(lua_State *L) { const upb_fielddef *f = lupb_fielddef_check(L, 1); - lupb_enumdef_pushwrapper(L, upb_fielddef_enumsubdef(f)); + const upb_enumdef *e = upb_fielddef_enumsubdef(f); + lupb_wrapper_pushwrapper(L, 1, e, LUPB_ENUMDEF); return 1; } static int lupb_fielddef_type(lua_State *L) { const upb_fielddef *f = lupb_fielddef_check(L, 1); - if (upb_fielddef_typeisset(f)) - lua_pushinteger(L, upb_fielddef_type(f)); - else - lua_pushnil(L); + lua_pushinteger(L, upb_fielddef_type(f)); return 1; } @@ -235,7 +197,6 @@ static const struct luaL_Reg lupb_fielddef_m[] = { {"containing_type", lupb_fielddef_containingtype}, {"default", lupb_fielddef_default}, {"descriptor_type", lupb_fielddef_descriptortype}, - {"getsel", lupb_fielddef_getsel}, {"has_subdef", lupb_fielddef_hassubdef}, {"index", lupb_fielddef_index}, {"is_extension", lupb_fielddef_isextension}, @@ -250,55 +211,64 @@ static const struct luaL_Reg lupb_fielddef_m[] = { {NULL, NULL} }; - /* lupb_oneofdef **************************************************************/ -void lupb_oneofdef_pushwrapper(lua_State *L, const upb_oneofdef *o) { - lupb_pushwrapper(L, o, LUPB_ONEOFDEF); -} - const upb_oneofdef *lupb_oneofdef_check(lua_State *L, int narg) { - return lupb_checkwrapper(L, narg, LUPB_ONEOFDEF); + return lupb_wrapper_check(L, narg, LUPB_ONEOFDEF); } static int lupb_oneofdef_containingtype(lua_State *L) { const upb_oneofdef *o = lupb_oneofdef_check(L, 1); - lupb_msgdef_pushwrapper(L, upb_oneofdef_containingtype(o)); + const upb_msgdef *m = upb_oneofdef_containingtype(o); + lupb_wrapper_pushwrapper(L, 1, m, LUPB_MSGDEF); return 1; } +/* lupb_oneofdef_field() + * + * Handles: + * oneof.field(field_number) + * oneof.field(field_name) + */ static int lupb_oneofdef_field(lua_State *L) { const upb_oneofdef *o = lupb_oneofdef_check(L, 1); - int type = lua_type(L, 2); const upb_fielddef *f; - if (type == LUA_TNUMBER) { - f = upb_oneofdef_itof(o, lua_tointeger(L, 2)); - } else if (type == LUA_TSTRING) { - f = upb_oneofdef_ntofz(o, lua_tostring(L, 2)); - } else { - const char *msg = lua_pushfstring(L, "number or string expected, got %s", - luaL_typename(L, 2)); - return luaL_argerror(L, 2, msg); + + switch (lua_type(L, 2)) { + case LUA_TNUMBER: + f = upb_oneofdef_itof(o, lua_tointeger(L, 2)); + break; + case LUA_TSTRING: + f = upb_oneofdef_ntofz(o, lua_tostring(L, 2)); + break; + default: { + const char *msg = lua_pushfstring(L, "number or string expected, got %s", + luaL_typename(L, 2)); + return luaL_argerror(L, 2, msg); + } } - lupb_fielddef_pushwrapper(L, f); + lupb_wrapper_pushwrapper(L, 1, f, LUPB_FIELDDEF); return 1; } static int lupb_oneofiter_next(lua_State *L) { upb_oneof_iter *i = lua_touserdata(L, lua_upvalueindex(1)); + const upb_fielddef *f; if (upb_oneof_done(i)) return 0; - lupb_fielddef_pushwrapper(L, upb_oneof_iter_field(i)); + f = upb_oneof_iter_field(i); upb_oneof_next(i); + lupb_symtab_pushwrapper(L, lua_upvalueindex(2), f, LUPB_FIELDDEF); return 1; } static int lupb_oneofdef_fields(lua_State *L) { const upb_oneofdef *o = lupb_oneofdef_check(L, 1); upb_oneof_iter *i = lua_newuserdata(L, sizeof(upb_oneof_iter)); + lupb_wrapper_pushsymtab(L, 1); upb_oneof_begin(i, o); - /* Need to guarantee that the msgdef outlives the iter. */ - lua_pushvalue(L, 1); + + /* Closure upvalues are: iter, symtab. */ lua_pushcclosure(L, &lupb_oneofiter_next, 2); return 1; } @@ -335,12 +305,8 @@ typedef struct { const upb_msgdef *md; } lupb_msgdef; -void lupb_msgdef_pushwrapper(lua_State *L, const upb_msgdef *m) { - lupb_pushwrapper(L, m, LUPB_MSGDEF); -} - const upb_msgdef *lupb_msgdef_check(lua_State *L, int narg) { - return lupb_checkwrapper(L, narg, LUPB_MSGDEF); + return lupb_wrapper_check(L, narg, LUPB_MSGDEF); } static int lupb_msgdef_len(lua_State *L) { @@ -349,42 +315,73 @@ static int lupb_msgdef_len(lua_State *L) { return 1; } +/* lupb_msgdef_field() + * + * Handles: + * msg.field(field_number) -> fielddef + * msg.field(field_name) -> fielddef + */ static int lupb_msgdef_field(lua_State *L) { const upb_msgdef *m = lupb_msgdef_check(L, 1); - int type = lua_type(L, 2); const upb_fielddef *f; - if (type == LUA_TNUMBER) { - f = upb_msgdef_itof(m, lua_tointeger(L, 2)); - } else if (type == LUA_TSTRING) { - f = upb_msgdef_ntofz(m, lua_tostring(L, 2)); - } else { - const char *msg = lua_pushfstring(L, "number or string expected, got %s", - luaL_typename(L, 2)); - return luaL_argerror(L, 2, msg); + + switch (lua_type(L, 2)) { + case LUA_TNUMBER: + f = upb_msgdef_itof(m, lua_tointeger(L, 2)); + break; + case LUA_TSTRING: + f = upb_msgdef_ntofz(m, lua_tostring(L, 2)); + break; + default: { + const char *msg = lua_pushfstring(L, "number or string expected, got %s", + luaL_typename(L, 2)); + return luaL_argerror(L, 2, msg); + } } - lupb_fielddef_pushwrapper(L, f); + lupb_wrapper_pushwrapper(L, 1, f, LUPB_FIELDDEF); return 1; } +/* lupb_msgdef_lookupname() + * + * Handles: + * msg.lookup_name(name) -> fielddef or oneofdef + */ static int lupb_msgdef_lookupname(lua_State *L) { const upb_msgdef *m = lupb_msgdef_check(L, 1); const upb_fielddef *f; const upb_oneofdef *o; + if (!upb_msgdef_lookupnamez(m, lua_tostring(L, 2), &f, &o)) { lua_pushnil(L); } else if (o) { - lupb_oneofdef_pushwrapper(L, o); + lupb_wrapper_pushwrapper(L, 1, o, LUPB_ONEOFDEF); } else { - lupb_fielddef_pushwrapper(L, f); + lupb_wrapper_pushwrapper(L, 1, f, LUPB_FIELDDEF); } + + return 1; +} + +/* lupb_msgdef_name() + * + * Handles: + * msg.name() -> string + */ +static int lupb_msgdef_name(lua_State *L) { + const upb_msgdef *m = lupb_msgdef_check(L, 1); + lua_pushstring(L, upb_msgdef_name(m)); return 1; } static int lupb_msgfielditer_next(lua_State *L) { upb_msg_field_iter *i = lua_touserdata(L, lua_upvalueindex(1)); + const upb_fielddef *f; + if (upb_msg_field_done(i)) return 0; - lupb_fielddef_pushwrapper(L, upb_msg_iter_field(i)); + f = upb_msg_iter_field(i); + lupb_symtab_pushwrapper(L, lua_upvalueindex(2), f, LUPB_FIELDDEF); upb_msg_field_next(i); return 1; } @@ -392,27 +389,44 @@ static int lupb_msgfielditer_next(lua_State *L) { static int lupb_msgdef_fields(lua_State *L) { const upb_msgdef *m = lupb_msgdef_check(L, 1); upb_msg_field_iter *i = lua_newuserdata(L, sizeof(upb_msg_field_iter)); + lupb_wrapper_pushsymtab(L, 1); upb_msg_field_begin(i, m); - /* Need to guarantee that the msgdef outlives the iter. */ - lua_pushvalue(L, 1); + + /* Closure upvalues are: iter, symtab. */ lua_pushcclosure(L, &lupb_msgfielditer_next, 2); return 1; } +static int lupb_msgdef_file(lua_State *L) { + const upb_msgdef *m = lupb_msgdef_check(L, 1); + const upb_filedef *file = upb_msgdef_file(m); + lupb_wrapper_pushwrapper(L, 1, file, LUPB_FILEDEF); + return 1; +} + +static int lupb_msgdef_fullname(lua_State *L) { + const upb_msgdef *m = lupb_msgdef_check(L, 1); + lua_pushstring(L, upb_msgdef_fullname(m)); + return 1; +} + static int lupb_msgoneofiter_next(lua_State *L) { upb_msg_oneof_iter *i = lua_touserdata(L, lua_upvalueindex(1)); + const upb_oneofdef *o; if (upb_msg_oneof_done(i)) return 0; - lupb_oneofdef_pushwrapper(L, upb_msg_iter_oneof(i)); + o = upb_msg_iter_oneof(i); upb_msg_oneof_next(i); + lupb_symtab_pushwrapper(L, lua_upvalueindex(2), o, LUPB_ONEOFDEF); return 1; } static int lupb_msgdef_oneofs(lua_State *L) { const upb_msgdef *m = lupb_msgdef_check(L, 1); upb_msg_oneof_iter *i = lua_newuserdata(L, sizeof(upb_msg_oneof_iter)); + lupb_wrapper_pushsymtab(L, 1); upb_msg_oneof_begin(i, m); - /* Need to guarantee that the msgdef outlives the iter. */ - lua_pushvalue(L, 1); + + /* Closure upvalues are: iter, symtab. */ lua_pushcclosure(L, &lupb_msgoneofiter_next, 2); return 1; } @@ -429,15 +443,27 @@ static int lupb_msgdef_syntax(lua_State *L) { return 1; } +static int lupb_msgdef_tostring(lua_State *L) { + const upb_msgdef *m = lupb_msgdef_check(L, 1); + lua_pushfstring(L, "", + upb_msgdef_fullname(m), (int)upb_msgdef_numfields(m)); + return 1; +} + static const struct luaL_Reg lupb_msgdef_mm[] = { + {"__call", lupb_msg_pushnew}, {"__len", lupb_msgdef_len}, + {"__tostring", lupb_msgdef_tostring}, {NULL, NULL} }; static const struct luaL_Reg lupb_msgdef_m[] = { {"field", lupb_msgdef_field}, {"fields", lupb_msgdef_fields}, + {"file", lupb_msgdef_file}, + {"full_name", lupb_msgdef_fullname}, {"lookup_name", lupb_msgdef_lookupname}, + {"name", lupb_msgdef_name}, {"oneofs", lupb_msgdef_oneofs}, {"syntax", lupb_msgdef_syntax}, {"_map_entry", lupb_msgdef_mapentry}, @@ -448,11 +474,7 @@ static const struct luaL_Reg lupb_msgdef_m[] = { /* lupb_enumdef ***************************************************************/ const upb_enumdef *lupb_enumdef_check(lua_State *L, int narg) { - return lupb_checkwrapper(L, narg, LUPB_ENUMDEF); -} - -static void lupb_enumdef_pushwrapper(lua_State *L, const upb_enumdef *e) { - lupb_pushwrapper(L, e, LUPB_ENUMDEF); + return lupb_wrapper_check(L, narg, LUPB_ENUMDEF); } static int lupb_enumdef_len(lua_State *L) { @@ -461,26 +483,46 @@ static int lupb_enumdef_len(lua_State *L) { return 1; } +static int lupb_enumdef_file(lua_State *L) { + const upb_enumdef *e = lupb_enumdef_check(L, 1); + const upb_filedef *file = upb_enumdef_file(e); + lupb_wrapper_pushwrapper(L, 1, file, LUPB_FILEDEF); + return 1; +} + +/* lupb_enumdef_value() + * + * Handles: + * enum.value(number) -> name + * enum.value(name) -> number + */ static int lupb_enumdef_value(lua_State *L) { const upb_enumdef *e = lupb_enumdef_check(L, 1); - int type = lua_type(L, 2); - if (type == LUA_TNUMBER) { - /* Pushes "nil" for a NULL pointer. */ - int32_t key = lupb_checkint32(L, 2); - lua_pushstring(L, upb_enumdef_iton(e, key)); - } else if (type == LUA_TSTRING) { - const char *key = lua_tostring(L, 2); - int32_t num; - if (upb_enumdef_ntoiz(e, key, &num)) { - lua_pushinteger(L, num); - } else { - lua_pushnil(L); + + switch (lua_type(L, 2)) { + case LUA_TNUMBER: { + int32_t key = lupb_checkint32(L, 2); + /* Pushes "nil" for a NULL pointer. */ + lua_pushstring(L, upb_enumdef_iton(e, key)); + break; + } + case LUA_TSTRING: { + const char *key = lua_tostring(L, 2); + int32_t num; + if (upb_enumdef_ntoiz(e, key, &num)) { + lua_pushinteger(L, num); + } else { + lua_pushnil(L); + } + break; + } + default: { + const char *msg = lua_pushfstring(L, "number or string expected, got %s", + luaL_typename(L, 2)); + return luaL_argerror(L, 2, msg); } - } else { - const char *msg = lua_pushfstring(L, "number or string expected, got %s", - luaL_typename(L, 2)); - return luaL_argerror(L, 2, msg); } + return 1; } @@ -496,9 +538,10 @@ static int lupb_enumiter_next(lua_State *L) { static int lupb_enumdef_values(lua_State *L) { const upb_enumdef *e = lupb_enumdef_check(L, 1); upb_enum_iter *i = lua_newuserdata(L, sizeof(upb_enum_iter)); + lupb_wrapper_pushsymtab(L, 1); upb_enum_begin(i, e); - /* Need to guarantee that the enumdef outlives the iter. */ - lua_pushvalue(L, 1); + + /* Closure upvalues are: iter, symtab. */ lua_pushcclosure(L, &lupb_enumiter_next, 2); return 1; } @@ -509,6 +552,7 @@ static const struct luaL_Reg lupb_enumdef_mm[] = { }; static const struct luaL_Reg lupb_enumdef_m[] = { + {"file", lupb_enumdef_file}, {"value", lupb_enumdef_value}, {"values", lupb_enumdef_values}, {NULL, NULL} @@ -517,18 +561,15 @@ static const struct luaL_Reg lupb_enumdef_m[] = { /* lupb_filedef ***************************************************************/ -void lupb_filedef_pushwrapper(lua_State *L, const upb_filedef *f) { - lupb_pushwrapper(L, f, LUPB_FILEDEF); -} - const upb_filedef *lupb_filedef_check(lua_State *L, int narg) { - return lupb_checkwrapper(L, narg, LUPB_FILEDEF); + return lupb_wrapper_check(L, narg, LUPB_FILEDEF); } static int lupb_filedef_dep(lua_State *L) { const upb_filedef *f = lupb_filedef_check(L, 1); int index = luaL_checkint(L, 2); - lupb_filedef_pushwrapper(L, upb_filedef_dep(f, index)); + const upb_filedef *dep = upb_filedef_dep(f, index); + lupb_wrapper_pushwrapper(L, 1, dep, LUPB_FILEDEF); return 1; } @@ -541,7 +582,8 @@ static int lupb_filedef_depcount(lua_State *L) { static int lupb_filedef_enum(lua_State *L) { const upb_filedef *f = lupb_filedef_check(L, 1); int index = luaL_checkint(L, 2); - lupb_enumdef_pushwrapper(L, upb_filedef_enum(f, index)); + const upb_enumdef *e = upb_filedef_enum(f, index); + lupb_wrapper_pushwrapper(L, 1, e, LUPB_ENUMDEF); return 1; } @@ -554,7 +596,8 @@ static int lupb_filedef_enumcount(lua_State *L) { static int lupb_filedef_msg(lua_State *L) { const upb_filedef *f = lupb_filedef_check(L, 1); int index = luaL_checkint(L, 2); - lupb_msgdef_pushwrapper(L, upb_filedef_msg(f, index)); + const upb_msgdef *m = upb_filedef_msg(f, index); + lupb_wrapper_pushwrapper(L, 1, m, LUPB_MSGDEF); return 1; } @@ -598,6 +641,13 @@ static const struct luaL_Reg lupb_filedef_m[] = { /* lupb_symtab ****************************************************************/ +/* The symtab owns all defs. Thus GC-rooting the symtab ensures that all + * underlying defs stay alive. + * + * The symtab's userval is a cache of def* -> object. */ + +#define LUPB_CACHE_INDEX 1 + typedef struct { upb_symtab *symtab; } lupb_symtab; @@ -610,11 +660,61 @@ upb_symtab *lupb_symtab_check(lua_State *L, int narg) { return lsymtab->symtab; } +void lupb_symtab_pushwrapper(lua_State *L, int narg, const void *def, + const char *type) { + narg = lua_absindex(L, narg); + assert(luaL_testudata(L, narg, LUPB_SYMTAB)); + + if (def == NULL) { + lua_pushnil(L); + return; + } + + lua_getiuservalue(L, narg, LUPB_CACHE_INDEX); /* Get cache. */ + + /* Index by "def" pointer. */ + lua_rawgetp(L, -1, def); + + /* Stack is now: cache, cached value. */ + if (lua_isnil(L, -1)) { + /* Create new wrapper. */ + lupb_wrapper *w = lupb_newuserdata(L, sizeof(*w), 1, type); + w->def = def; + lua_replace(L, -2); /* Replace nil */ + + /* Set symtab as userval. */ + lua_pushvalue(L, narg); + lua_setiuservalue(L, -2, LUPB_SYMTAB_INDEX); + + /* Add wrapper to the the cache. */ + lua_pushvalue(L, -1); + lua_rawsetp(L, -3, def); + } + + lua_replace(L, -2); /* Remove cache, leaving only the wrapper. */ +} + +/* upb_symtab_new() + * + * Handles: + * upb.SymbolTable() -> + */ static int lupb_symtab_new(lua_State *L) { - lupb_symtab *lsymtab = lua_newuserdata(L, sizeof(*lsymtab)); + lupb_symtab *lsymtab = lupb_newuserdata(L, sizeof(*lsymtab), 1, LUPB_SYMTAB); lsymtab->symtab = upb_symtab_new(); - luaL_getmetatable(L, LUPB_SYMTAB); + + /* Create our object cache. */ + lua_newtable(L); + + /* Cache metatable: specifies that values are weak. */ + lua_createtable(L, 0, 1); + lua_pushstring(L, "v"); + lua_setfield(L, -2, "__mode"); lua_setmetatable(L, -2); + + /* Set the cache as our userval. */ + lua_setiuservalue(L, -2, LUPB_CACHE_INDEX); + return 1; } @@ -625,20 +725,40 @@ static int lupb_symtab_gc(lua_State *L) { return 0; } -/* TODO(haberman): perhaps this should take a message object instead of a - * serialized string once we have a good story for vending compiled-in - * messages. */ -static int lupb_symtab_add(lua_State *L) { - upb_arena *arena; +static int lupb_symtab_addfile(lua_State *L) { + size_t len; + upb_symtab *s = lupb_symtab_check(L, 1); + const char *str = luaL_checklstring(L, 2, &len); + upb_arena *arena = lupb_arena_pushnew(L);; + const google_protobuf_FileDescriptorProto *file; + const upb_filedef *file_def; + upb_status status; + + upb_status_clear(&status); + file = google_protobuf_FileDescriptorProto_parse(str, len, arena); + + if (!file) { + luaL_argerror(L, 2, "failed to parse descriptor"); + } + + file_def = upb_symtab_addfile(s, file, &status); + lupb_checkstatus(L, &status); + + lupb_symtab_pushwrapper(L, 1, file_def, LUPB_FILEDEF); + + return 1; +} + +static int lupb_symtab_addset(lua_State *L) { size_t i, n, len; const google_protobuf_FileDescriptorProto *const *files; google_protobuf_FileDescriptorSet *set; upb_symtab *s = lupb_symtab_check(L, 1); const char *str = luaL_checklstring(L, 2, &len); + upb_arena *arena = lupb_arena_pushnew(L);; + upb_status status; - lupb_arena_new(L); - arena = lupb_arena_check(L, -1); - + upb_status_clear(&status); set = google_protobuf_FileDescriptorSet_parse(str, len, arena); if (!set) { @@ -647,7 +767,8 @@ static int lupb_symtab_add(lua_State *L) { files = google_protobuf_FileDescriptorSet_file(set, &n); for (i = 0; i < n; i++) { - CHK(upb_symtab_addfile(s, files[i], &status)); + upb_symtab_addfile(s, files[i], &status); + lupb_checkstatus(L, &status); } return 0; @@ -656,19 +777,27 @@ static int lupb_symtab_add(lua_State *L) { static int lupb_symtab_lookupmsg(lua_State *L) { const upb_symtab *s = lupb_symtab_check(L, 1); const upb_msgdef *m = upb_symtab_lookupmsg(s, luaL_checkstring(L, 2)); - lupb_msgdef_pushwrapper(L, m); + lupb_symtab_pushwrapper(L, 1, m, LUPB_MSGDEF); return 1; } static int lupb_symtab_lookupenum(lua_State *L) { const upb_symtab *s = lupb_symtab_check(L, 1); const upb_enumdef *e = upb_symtab_lookupenum(s, luaL_checkstring(L, 2)); - lupb_enumdef_pushwrapper(L, e); + lupb_symtab_pushwrapper(L, 1, e, LUPB_ENUMDEF); + return 1; +} + +static int lupb_symtab_tostring(lua_State *L) { + const upb_symtab *s = lupb_symtab_check(L, 1); + lua_pushfstring(L, "", + (int)upb_symtab_filecount(s)); return 1; } static const struct luaL_Reg lupb_symtab_m[] = { - {"add", lupb_symtab_add}, + {"add_file", lupb_symtab_addfile}, + {"add_set", lupb_symtab_addset}, {"lookup_msg", lupb_symtab_lookupmsg}, {"lookup_enum", lupb_symtab_lookupenum}, {NULL, NULL} @@ -676,6 +805,7 @@ static const struct luaL_Reg lupb_symtab_m[] = { static const struct luaL_Reg lupb_symtab_mm[] = { {"__gc", lupb_symtab_gc}, + {"__tostring", lupb_symtab_tostring}, {NULL, NULL} }; @@ -694,7 +824,7 @@ static const struct luaL_Reg lupbdef_toplevel_m[] = { void lupb_def_registertypes(lua_State *L) { lupb_setfuncs(L, lupbdef_toplevel_m); - /* Refcounted types. */ + /* Register types. */ lupb_register_type(L, LUPB_ENUMDEF, lupb_enumdef_m, lupb_enumdef_mm); lupb_register_type(L, LUPB_FIELDDEF, lupb_fielddef_m, NULL); lupb_register_type(L, LUPB_FILEDEF, lupb_filedef_m, NULL); @@ -702,14 +832,6 @@ void lupb_def_registertypes(lua_State *L) { lupb_register_type(L, LUPB_ONEOFDEF, lupb_oneofdef_m, lupb_oneofdef_mm); lupb_register_type(L, LUPB_SYMTAB, lupb_symtab_m, lupb_symtab_mm); - /* Create our object cache. */ - lua_newtable(L); - lua_createtable(L, 0, 1); /* Cache metatable. */ - lua_pushstring(L, "v"); /* Values are weak. */ - lua_setfield(L, -2, "__mode"); - lua_setmetatable(L, -2); - lua_setfield(L, LUA_REGISTRYINDEX, LUPB_OBJCACHE); - /* Register constants. */ lupb_setfieldi(L, "LABEL_OPTIONAL", UPB_LABEL_OPTIONAL); lupb_setfieldi(L, "LABEL_REQUIRED", UPB_LABEL_REQUIRED); @@ -746,21 +868,6 @@ void lupb_def_registertypes(lua_State *L) { lupb_setfieldi(L, "DESCRIPTOR_TYPE_SINT32", UPB_DESCRIPTOR_TYPE_SINT32); lupb_setfieldi(L, "DESCRIPTOR_TYPE_SINT64", UPB_DESCRIPTOR_TYPE_SINT64); - lupb_setfieldi(L, "HANDLER_INT32", UPB_HANDLER_INT32); - lupb_setfieldi(L, "HANDLER_INT64", UPB_HANDLER_INT64); - lupb_setfieldi(L, "HANDLER_UINT32", UPB_HANDLER_UINT32); - lupb_setfieldi(L, "HANDLER_UINT64", UPB_HANDLER_UINT64); - lupb_setfieldi(L, "HANDLER_FLOAT", UPB_HANDLER_FLOAT); - lupb_setfieldi(L, "HANDLER_DOUBLE", UPB_HANDLER_DOUBLE); - lupb_setfieldi(L, "HANDLER_BOOL", UPB_HANDLER_BOOL); - lupb_setfieldi(L, "HANDLER_STARTSTR", UPB_HANDLER_STARTSTR); - lupb_setfieldi(L, "HANDLER_STRING", UPB_HANDLER_STRING); - lupb_setfieldi(L, "HANDLER_ENDSTR", UPB_HANDLER_ENDSTR); - lupb_setfieldi(L, "HANDLER_STARTSUBMSG", UPB_HANDLER_STARTSUBMSG); - lupb_setfieldi(L, "HANDLER_ENDSUBMSG", UPB_HANDLER_ENDSUBMSG); - lupb_setfieldi(L, "HANDLER_STARTSEQ", UPB_HANDLER_STARTSEQ); - lupb_setfieldi(L, "HANDLER_ENDSEQ", UPB_HANDLER_ENDSEQ); - lupb_setfieldi(L, "SYNTAX_PROTO2", UPB_SYNTAX_PROTO2); lupb_setfieldi(L, "SYNTAX_PROTO3", UPB_SYNTAX_PROTO3); } diff --git a/upb/bindings/lua/lua_proto_library.bzl b/upb/bindings/lua/lua_proto_library.bzl new file mode 100644 index 00000000000..f21655140a8 --- /dev/null +++ b/upb/bindings/lua/lua_proto_library.bzl @@ -0,0 +1,109 @@ + +load("@bazel_skylib//lib:paths.bzl", "paths") + +# Generic support code ######################################################### + +_is_bazel = not hasattr(native, "genmpm") + +def _get_real_short_path(file): + # For some reason, files from other archives have short paths that look like: + # ../com_google_protobuf/google/protobuf/descriptor.proto + short_path = file.short_path + if short_path.startswith("../"): + second_slash = short_path.index("/", 3) + short_path = short_path[second_slash + 1:] + # Sometimes it has another few prefixes like: + # _virtual_imports/any_proto/google/protobuf/any.proto + # We want just google/protobuf/any.proto. + if short_path.startswith("_virtual_imports"): + short_path = short_path.split("/", 2)[-1] + return short_path + +def _get_real_root(file): + real_short_path = _get_real_short_path(file) + return file.path[:-len(real_short_path) - 1] + +def _generate_output_file(ctx, src, extension): + real_short_path = _get_real_short_path(src) + real_short_path = paths.relativize(real_short_path, ctx.label.package) + output_filename = paths.replace_extension(real_short_path, extension) + ret = ctx.actions.declare_file(output_filename) + return ret + +# upb_proto_library / upb_proto_reflection_library shared code ################# + +_LuaFiles = provider(fields = ["files"]) + +def _compile_upb_protos(ctx, proto_info, proto_sources): + files = [_generate_output_file(ctx, name, "_pb.lua") for name in proto_sources] + transitive_sets = proto_info.transitive_descriptor_sets.to_list() + ctx.actions.run( + inputs = depset( + direct = [proto_info.direct_descriptor_set], + transitive = [proto_info.transitive_descriptor_sets], + ), + tools = [ctx.executable._upbc], + outputs = files, + executable = ctx.executable._protoc, + arguments = [ + "--lua_out=" + _get_real_root(files[0]), + "--plugin=protoc-gen-lua=" + ctx.executable._upbc.path, + "--descriptor_set_in=" + ctx.configuration.host_path_separator.join([f.path for f in transitive_sets]), + ] + + [_get_real_short_path(file) for file in proto_sources], + progress_message = "Generating Lua protos for :" + ctx.label.name, + ) + return files + +def _lua_proto_rule_impl(ctx): + if len(ctx.attr.deps) != 1: + fail("only one deps dependency allowed.") + dep = ctx.attr.deps[0] + if _LuaFiles not in dep: + fail("proto_library rule must generate _LuaFiles (aspect should have handled this).") + files = dep[_LuaFiles].files + return [ + DefaultInfo( + files = files, + data_runfiles = ctx.runfiles(files = files.to_list())), + ] + +def _lua_proto_library_aspect_impl(target, ctx): + proto_info = target[ProtoInfo] + files = _compile_upb_protos(ctx, proto_info, proto_info.direct_sources) + deps = ctx.rule.attr.deps + transitive = [dep[_LuaFiles].files for dep in deps if _LuaFiles in dep] + return [_LuaFiles(files = depset(direct = files, transitive = transitive))] + +# lua_proto_library() ########################################################## + +_lua_proto_library_aspect = aspect( + attrs = { + "_upbc": attr.label( + executable = True, + cfg = "host", + default = "//:protoc-gen-lua", + ), + "_protoc": attr.label( + executable = True, + cfg = "host", + default = "@com_google_protobuf//:protoc", + ), + }, + implementation = _lua_proto_library_aspect_impl, + provides = [_LuaFiles], + attr_aspects = ["deps"], + fragments = ["cpp"], +) + +lua_proto_library = rule( + output_to_genfiles = True, + implementation = _lua_proto_rule_impl, + attrs = { + "deps": attr.label_list( + aspects = [_lua_proto_library_aspect], + allow_rules = ["proto_library"], + providers = [ProtoInfo], + ), + }, +) diff --git a/upb/bindings/lua/msg.c b/upb/bindings/lua/msg.c index 5e769b2f0dd..82d65e0fa67 100644 --- a/upb/bindings/lua/msg.c +++ b/upb/bindings/lua/msg.c @@ -2,6 +2,8 @@ ** lupb_msg -- Message/Array/Map objects in Lua/C that wrap upb/msg.h */ +#include "upb/msg.h" + #include #include #include @@ -10,575 +12,479 @@ #include "lauxlib.h" #include "upb/bindings/lua/upb.h" -#include "upb/handlers.h" -#include "upb/legacy_msg_reflection.h" -#include "upb/msg.h" +#include "upb/reflection.h" #include "upb/port_def.inc" /* - * Message/Array/Map objects can be constructed in one of two ways: - * - * 1. To point to existing msg/array/map data inside an arena. - * 2. To create and uniquely own some brand new data. - * - * Case (1) is for when we've parsed some data into an arena (which is faster - * than parsing directly into Lua objects) or when we're pointing at some - * read-only data (like custom options in a def). - * - * Case (2) is for when a user creates the object directly in Lua. - * - * We use the userval of container objects (Message/Array/Map) to store - * references to sub-objects (Strings/Messages/Arrays/Maps). But we need to - * keep the userval in sync with the underlying upb_msg/upb_array/upb_map. - * We populate the userval lazily from the underlying data. - * - * This means that no one may remove/replace any String/Message/Array/Map - * field/entry in the underlying upb_{msg,array,map} behind our back. It's ok - * for entries to be added or for primitives to be modified, but *replacing* - * sub-containers is not. - * - * Luckily parse/merge follow this rule. However clear does not, so it's not - * safe to clear behind our back. + * Message/Map/Array objects. These objects form a directed graph: a message + * can contain submessages, arrays, and maps, which can then point to other + * messages. This graph can technically be cyclic, though this is an error and + * a cyclic graph cannot be serialized. So it's better to think of this as a + * tree of objects. + * + * The actual data exists at the upb level (upb_msg, upb_map, upb_array), + * independently of Lua. The upb objects contain all the canonical data and + * edges between objects. Lua wrapper objects expose the upb objects to Lua, + * but ultimately they are just wrappers. They pass through all reads and + * writes to the underlying upb objects. + * + * Each upb object lives in a upb arena. We have a Lua object to wrap the upb + * arena, but arenas are never exposed to the user. The Lua arena object just + * serves to own the upb arena and free it at the proper time, once the Lua GC + * has determined that there are no more references to anything that lives in + * that arena. All wrapper objects strongly reference the arena to which they + * belong. + * + * A global object cache stores a mapping of C pointer (upb_msg*, upb_array*, + * upb_map*) to a corresponding Lua wrapper. These references are weak so that + * the wrappers can be collected if they are no longer needed. A new wrapper + * object can always be recreated later. + * + * arena + * +->group + * | + * V +-----+ + * lupb_arena |cache|-weak-+ + * | ^ +-----+ | + * | | V + * Lua level | +------------lupb_msg + * ----------------|-----------------|------------------------------------------- + * upb level | | + * | +----V------------------------------+ + * +->upb_arena | upb_msg ...(empty arena storage) | + * +-----------------------------------+ + * + * If the user creates a reference between two objects that have different + * arenas, we need to merge the arenas into a single, bigger arena group. The + * arena group will reference both arenas, and will inherit the longest lifetime + * of anything in the arena. + * + * arena + * +--------------------------->group<-----------------+ + * | | + * V +-----+ V + * lupb_arena +-weak-|cache|-weak-+ lupb_arena + * | ^ | +-----+ | ^ | + * | | V V | | + * Lua level | +------------lupb_msg lupb_msg----+ | + * ----------------|-----------------|-------------------------|---------|------- + * upb level | | | | + * | +----V----+ +----V----+ V + * +->upb_arena | upb_msg | | upb_msg | upb_arena + * +------|--+ +--^------+ + * +---------------------+ + * Key invariants: + * 1. every wrapper references the arena that contains it. + * 2. every arena group references all arenas that own upb objects reachable + * from that arena. In other words, when a wrapper references an arena, + * this is sufficient to ensure that any upb object reachable from that + * wrapper will stay alive. + * + * Additionally, every message object contains a strong reference to the + * corresponding Descriptor object. Likewise, array/map objects reference a + * Descriptor object if they are typed to store message values. + * + * (The object cache could be per-arena-group. This would keep individual cache + * tables smaller, and when an arena group is freed the entire cache table(s) could + * be collected in one fell swoop. However this makes merging another arena + * into the group an O(n) operation, since all entries would need to be copied + * from the existing cache table.) */ #define LUPB_ARENA "lupb.arena" - -#define LUPB_MSGCLASS "lupb.msgclass" -#define LUPB_MSGFACTORY "lupb.msgfactory" - #define LUPB_ARRAY "lupb.array" #define LUPB_MAP "lupb.map" #define LUPB_MSG "lupb.msg" -#define LUPB_STRING "lupb.string" -static int lupb_msg_pushnew(lua_State *L, int narg); +#define LUPB_ARENA_INDEX 1 +#define LUPB_MSGDEF_INDEX 2 /* For msg, and map/array that store msg */ -/* Lazily creates the uservalue if it doesn't exist. */ -static void lupb_getuservalue(lua_State *L, int index) { - lua_getuservalue(L, index); - if (lua_isnil(L, -1)) { - /* Lazily create and set userval. */ - lua_pop(L, 1); /* nil. */ - lua_pushvalue(L, index); /* userdata copy. */ - lua_newtable(L); - lua_setuservalue(L, -2); - lua_pop(L, 1); /* userdata copy. */ - lua_getuservalue(L, index); - } - assert(!lua_isnil(L, -1)); -} - -static void lupb_uservalseti(lua_State *L, int userdata, int index, int val) { - lupb_getuservalue(L, userdata); - lua_pushvalue(L, val); - lua_rawseti(L, -2, index); - lua_pop(L, 1); /* Uservalue. */ -} +static void lupb_msg_newmsgwrapper(lua_State *L, int narg, upb_msgval val); +static upb_msg *lupb_msg_check(lua_State *L, int narg); -static void lupb_uservalgeti(lua_State *L, int userdata, int index) { - lupb_getuservalue(L, userdata); - lua_rawgeti(L, -1, index); - lua_insert(L, -2); - lua_pop(L, 1); /* Uservalue. */ +static upb_fieldtype_t lupb_checkfieldtype(lua_State *L, int narg) { + uint32_t n = lupb_checkuint32(L, narg); + bool ok = n >= UPB_TYPE_BOOL && n <= UPB_TYPE_BYTES; + luaL_argcheck(L, ok, narg, "invalid field type"); + return n; } -/* Pushes a new userdata with the given metatable. */ -static void *lupb_newuserdata(lua_State *L, size_t size, const char *type) { - void *ret = lua_newuserdata(L, size); +char cache_key; - /* Set metatable. */ - luaL_getmetatable(L, type); - UPB_ASSERT(!lua_isnil(L, -1)); /* Should have been created by luaopen_upb. */ +/* lupb_cacheinit() + * + * Creates the global cache used by lupb_cacheget() and lupb_cacheset(). + */ +static void lupb_cacheinit(lua_State *L) { + /* Create our object cache. */ + lua_newtable(L); + + /* Cache metatable gives the cache weak values */ + lua_createtable(L, 0, 1); + lua_pushstring(L, "v"); + lua_setfield(L, -2, "__mode"); lua_setmetatable(L, -2); - /* We don't set a uservalue here -- we lazily create it later if necessary. */ + /* Set cache in the registry. */ + lua_rawsetp(L, LUA_REGISTRYINDEX, &cache_key); +} - return ret; +/* lupb_cacheget() + * + * Pushes cache[key] and returns true if this key is present in the cache. + * Otherwise returns false and leaves nothing on the stack. + */ +static bool lupb_cacheget(lua_State *L, const void *key) { + if (key == NULL) { + lua_pushnil(L); + return true; + } + + lua_rawgetp(L, LUA_REGISTRYINDEX, &cache_key); + lua_rawgetp(L, -1, key); + if (lua_isnil(L, -1)) { + lua_pop(L, 2); /* Pop table, nil. */ + return false; + } else { + lua_replace(L, -2); /* Replace cache table. */ + return true; + } } +/* lupb_cacheset() + * + * Sets cache[key] = val, where "val" is the value at the top of the stack. + * Does not pop the value. + */ +static void lupb_cacheset(lua_State *L, const void *key) { + lua_rawgetp(L, LUA_REGISTRYINDEX, &cache_key); + lua_pushvalue(L, -2); + lua_rawsetp(L, -2, key); + lua_pop(L, 1); /* Pop table. */ +} /* lupb_arena *****************************************************************/ -/* lupb_arena only exists to wrap a upb_arena. It is never exposed to users; - * it is an internal memory management detail. Other objects refer to this - * object from their userdata to keep the arena-owned data alive. */ +/* lupb_arena only exists to wrap a upb_arena. It is never exposed to users; it + * is an internal memory management detail. Other wrapper objects refer to this + * object from their userdata to keep the arena-owned data alive. + * + * The arena userval is a table representing the arena group. Every arena in + * the group points to the same table, and the table references all arenas in + * the group. + */ + +#define LUPB_ARENAGROUP_INDEX 1 typedef struct { upb_arena *arena; } lupb_arena; -upb_arena *lupb_arena_check(lua_State *L, int narg) { +static upb_arena *lupb_arena_check(lua_State *L, int narg) { lupb_arena *a = luaL_checkudata(L, narg, LUPB_ARENA); - return a ? a->arena : NULL; + return a->arena; } -int lupb_arena_new(lua_State *L) { - lupb_arena *a = lupb_newuserdata(L, sizeof(lupb_arena), LUPB_ARENA); - - /* TODO(haberman): use Lua alloc func as block allocator? Would need to - * verify that all cases of upb_malloc in msg/table are longjmp-safe. */ +upb_arena *lupb_arena_pushnew(lua_State *L) { + lupb_arena *a = lupb_newuserdata(L, sizeof(lupb_arena), 1, LUPB_ARENA); a->arena = upb_arena_new(); - return 1; -} - -char lupb_arena_cache_key; + /* Create arena group table and add this arena to it. */ + lua_createtable(L, 0, 1); + lua_pushvalue(L, -2); + lua_rawseti(L, -2, 1); -/* Returns the global lupb_arena func that was created in our luaopen(). - * Callers can be guaranteed that it will be alive as long as |L| is. - * TODO(haberman): we shouldn't use a global arena! We should have - * one arena for a parse, or per independently-created message. */ -upb_arena *lupb_arena_get(lua_State *L) { - upb_arena *arena; + /* Set arena group as this object's userval. */ + lua_setiuservalue(L, -2, LUPB_ARENAGROUP_INDEX); - lua_pushlightuserdata(L, &lupb_arena_cache_key); - lua_gettable(L, LUA_REGISTRYINDEX); - arena = lua_touserdata(L, -1); - UPB_ASSERT(arena); - lua_pop(L, 1); - - return arena; + return a->arena; } -static void lupb_arena_initsingleton(lua_State *L) { - lua_pushlightuserdata(L, &lupb_arena_cache_key); - lupb_arena_new(L); - lua_settable(L, LUA_REGISTRYINDEX); -} - -static int lupb_arena_gc(lua_State *L) { - upb_arena *a = lupb_arena_check(L, 1); - upb_arena_free(a); - return 0; -} - -static const struct luaL_Reg lupb_arena_mm[] = { - {"__gc", lupb_arena_gc}, - {NULL, NULL} -}; - - -/* lupb_msgfactory ************************************************************/ - -/* Userval contains a map of: - * [1] -> SymbolTable (to keep GC-reachable) - * [const upb_msgdef*] -> [lupb_msgclass userdata] - */ - -#define LUPB_MSGFACTORY_SYMTAB 1 - -typedef struct lupb_msgfactory { - upb_msgfactory *factory; -} lupb_msgfactory; - -static int lupb_msgclass_pushnew(lua_State *L, int factory, - const upb_msgdef *md); - -/* lupb_msgfactory helpers. */ - -static lupb_msgfactory *lupb_msgfactory_check(lua_State *L, int narg) { - return luaL_checkudata(L, narg, LUPB_MSGFACTORY); -} - -static void lupb_msgfactory_pushmsgclass(lua_State *L, int narg, - const upb_msgdef *md) { - lupb_getuservalue(L, narg); - lua_pushlightuserdata(L, (void*)md); - lua_rawget(L, -2); - - if (lua_isnil(L, -1)) { - lua_pop(L, 1); - /* TODO: verify md is in symtab? */ - lupb_msgclass_pushnew(L, narg, md); - - /* Set in userval. */ - lua_pushlightuserdata(L, (void*)md); - lua_pushvalue(L, -2); - lua_rawset(L, -4); +/** + * lupb_arena_merge() + * + * Merges |from| into |to| so that there is a single arena group that contains + * both, and both arenas will point at this new table. */ +static void lupb_arena_merge(lua_State *L, int to, int from) { + int i, from_count, to_count; + lua_getiuservalue(L, to, LUPB_ARENAGROUP_INDEX); + lua_getiuservalue(L, from, LUPB_ARENAGROUP_INDEX); + + if (lua_rawequal(L, -1, -2)) { + /* These arenas are already in the same group. */ + lua_pop(L, 2); + return; } -} -static int lupb_msgfactory_gc(lua_State *L) { - lupb_msgfactory *lfactory = lupb_msgfactory_check(L, 1); + to_count = lua_rawlen(L, -2); + from_count = lua_rawlen(L, -1); - if (lfactory->factory) { - upb_msgfactory_free(lfactory->factory); - lfactory->factory = NULL; + /* Add everything in |from|'s arena group. */ + for (i = 1; i <= from_count; i++) { + lua_rawgeti(L, -1, i); + lua_rawseti(L, -3, i + to_count); } - return 0; + /* Make |from| point to |to|'s table. */ + lua_pop(L, 1); + lua_setiuservalue(L, from, LUPB_ARENAGROUP_INDEX); } -/* lupb_msgfactory Public API. */ - /** - * lupb_msgfactory_new() + * lupb_arena_addobj() * - * Handles: - * msgfactory = upb.MessageFactory(symtab) + * Creates a reference from the arena in |narg| to the object at the top of the + * stack, and pops it. This will guarantee that the object lives as long as + * the arena. * - * Creates a new, empty MessageFactory for the given SymbolTable. - * Message classes will be created on demand when the user calls - * msgfactory.get_message_class(). - */ -static int lupb_msgfactory_new(lua_State *L) { - const upb_symtab *symtab = lupb_symtab_check(L, 1); - - lupb_msgfactory *lmsgfactory = - lupb_newuserdata(L, sizeof(lupb_msgfactory), LUPB_MSGFACTORY); - lmsgfactory->factory = upb_msgfactory_new(symtab); - lupb_uservalseti(L, -1, LUPB_MSGFACTORY_SYMTAB, 1); - - return 1; + * This is mainly useful for pinning strings we have parsed protobuf data from. + * It will allow us to point directly to string data in the original string. */ +static void lupb_arena_addobj(lua_State *L, int narg) { + lua_getiuservalue(L, narg, LUPB_ARENAGROUP_INDEX); + int n = lua_rawlen(L, -1); + lua_pushvalue(L, -2); + lua_rawseti(L, -2, n + 1); + lua_pop(L, 2); /* obj, arena group. */ } -/** - * lupb_msgfactory_getmsgclass() - * - * Handles: - * MessageClass = factory.get_message_class(message_name) - */ -static int lupb_msgfactory_getmsgclass(lua_State *L) { - lupb_msgfactory *lfactory = lupb_msgfactory_check(L, 1); - const upb_symtab *symtab = upb_msgfactory_symtab(lfactory->factory); - const upb_msgdef *m = upb_symtab_lookupmsg(symtab, luaL_checkstring(L, 2)); - - if (!m) { - luaL_error(L, "No such message type: %s\n", lua_tostring(L, 2)); - } - - lupb_msgfactory_pushmsgclass(L, 1, m); - - return 1; +static int lupb_arena_gc(lua_State *L) { + upb_arena *a = lupb_arena_check(L, 1); + upb_arena_free(a); + return 0; } -static const struct luaL_Reg lupb_msgfactory_m[] = { - {"get_message_class", lupb_msgfactory_getmsgclass}, - {NULL, NULL} -}; - -static const struct luaL_Reg lupb_msgfactory_mm[] = { - {"__gc", lupb_msgfactory_gc}, +static const struct luaL_Reg lupb_arena_mm[] = { + {"__gc", lupb_arena_gc}, {NULL, NULL} }; - -/* lupb_msgclass **************************************************************/ - -/* Userval contains a map of: - * [1] -> MessageFactory (to keep GC-reachable) - * [const upb_msgdef*] -> [lupb_msgclass userdata] - */ - -#define LUPB_MSGCLASS_FACTORY 1 - -struct lupb_msgclass { - const upb_msglayout *layout; - const upb_msgdef *msgdef; - const lupb_msgfactory *lfactory; -}; - -/* Type-checks for assigning to a message field. */ -static upb_msgval lupb_array_typecheck(lua_State *L, int narg, int msg, - const upb_fielddef *f); -static upb_msgval lupb_map_typecheck(lua_State *L, int narg, int msg, - const upb_fielddef *f); -static const lupb_msgclass *lupb_msg_getsubmsgclass(lua_State *L, int narg, - const upb_fielddef *f); -static const lupb_msgclass *lupb_msg_msgclassfor(lua_State *L, int narg, - const upb_msgdef *md); - -const lupb_msgclass *lupb_msgclass_check(lua_State *L, int narg) { - return luaL_checkudata(L, narg, LUPB_MSGCLASS); -} - -const upb_msglayout *lupb_msgclass_getlayout(lua_State *L, int narg) { - return lupb_msgclass_check(L, narg)->layout; -} - -const upb_msgdef *lupb_msgclass_getmsgdef(const lupb_msgclass *lmsgclass) { - return lmsgclass->msgdef; -} - -upb_msgfactory *lupb_msgclass_getfactory(const lupb_msgclass *lmsgclass) { - return lmsgclass->lfactory->factory; -} - -/** - * lupb_msgclass_typecheck() +/* lupb_arenaget() * - * Verifies that the expected msgclass matches the actual. If not, raises a Lua - * error. + * Returns the arena from the given message, array, or map object. */ -static void lupb_msgclass_typecheck(lua_State *L, const lupb_msgclass *expected, - const lupb_msgclass *actual) { - if (expected != actual) { - luaL_error(L, "Message had incorrect type, expected '%s', got '%s'", - upb_msgdef_fullname(expected->msgdef), - upb_msgdef_fullname(actual->msgdef)); - } -} - -static const lupb_msgclass *lupb_msgclass_msgclassfor(lua_State *L, int narg, - const upb_msgdef *md) { - lupb_uservalgeti(L, narg, LUPB_MSGCLASS_FACTORY); - lupb_msgfactory_pushmsgclass(L, -1, md); - return lupb_msgclass_check(L, -1); -} - -/** - * lupb_msgclass_getsubmsgclass() - * - * Given a MessageClass at index |narg| and the submessage field |f|, returns - * the message class for this field. - * - * Currently we do a hash table lookup for this. If we wanted we could try to - * optimize this by caching these pointers in our msgclass, in an array indexed - * by field index. We would still need to fall back to calling msgclassfor(), - * unless we wanted to eagerly create message classes for all submessages. But - * for big schemas that might be a lot of things to build, and we might end up - * not using most of them. */ -static const lupb_msgclass *lupb_msgclass_getsubmsgclass(lua_State *L, int narg, - const upb_fielddef *f) { - if (upb_fielddef_type(f) != UPB_TYPE_MESSAGE) { - return NULL; - } - - return lupb_msgclass_msgclassfor(L, narg, upb_fielddef_msgsubdef(f)); +static upb_arena *lupb_arenaget(lua_State *L, int narg) { + upb_arena *arena; + lua_getiuservalue(L, narg, LUPB_ARENA_INDEX); + arena = lupb_arena_check(L, -1); + lua_pop(L, 1); + return arena; } -static int lupb_msgclass_pushnew(lua_State *L, int factory, - const upb_msgdef *md) { - const lupb_msgfactory *lfactory = lupb_msgfactory_check(L, factory); - lupb_msgclass *lmc = lupb_newuserdata(L, sizeof(*lmc), LUPB_MSGCLASS); - - lupb_uservalseti(L, -1, LUPB_MSGCLASS_FACTORY, factory); - lmc->layout = upb_msgfactory_getlayout(lfactory->factory, md); - lmc->lfactory = lfactory; - lmc->msgdef = md; - - return 1; -} +/* upb <-> Lua type conversion ************************************************/ -/* MessageClass Public API. */ +/* Whether string data should be copied into the containing arena. We can + * avoid a copy if the string data is only needed temporarily (like for a map + * lookup). + */ +typedef enum { + LUPB_COPY, /* Copy string data into the arena. */ + LUPB_REF /* Reference the Lua copy of the string data. */ +} lupb_copy_t; /** - * lupb_msgclass_call() - * - * Handles: - * msg = MessageClass() + * lupb_tomsgval() * - * Creates a new message from the given MessageClass. + * Converts the given Lua value |narg| to a upb_msgval. */ -static int lupb_msgclass_call(lua_State *L) { - lupb_msg_pushnew(L, 1); - return 1; -} - -static const struct luaL_Reg lupb_msgclass_mm[] = { - {"__call", lupb_msgclass_call}, - {NULL, NULL} -}; - - -/* upb <-> Lua type conversion ************************************************/ - -static bool lupb_istypewrapped(upb_fieldtype_t type) { - return type == UPB_TYPE_STRING || type == UPB_TYPE_BYTES || - type == UPB_TYPE_MESSAGE; -} - static upb_msgval lupb_tomsgval(lua_State *L, upb_fieldtype_t type, int narg, - const lupb_msgclass *lmsgclass) { + int container, lupb_copy_t copy) { + upb_msgval ret; switch (type) { case UPB_TYPE_INT32: case UPB_TYPE_ENUM: - return upb_msgval_int32(lupb_checkint32(L, narg)); + ret.int32_val = lupb_checkint32(L, narg); + break; case UPB_TYPE_INT64: - return upb_msgval_int64(lupb_checkint64(L, narg)); + ret.int64_val = lupb_checkint64(L, narg); + break; case UPB_TYPE_UINT32: - return upb_msgval_uint32(lupb_checkuint32(L, narg)); + ret.uint32_val = lupb_checkuint32(L, narg); + break; case UPB_TYPE_UINT64: - return upb_msgval_uint64(lupb_checkuint64(L, narg)); + ret.uint64_val = lupb_checkuint64(L, narg); + break; case UPB_TYPE_DOUBLE: - return upb_msgval_double(lupb_checkdouble(L, narg)); + ret.double_val = lupb_checkdouble(L, narg); + break; case UPB_TYPE_FLOAT: - return upb_msgval_float(lupb_checkfloat(L, narg)); + ret.float_val = lupb_checkfloat(L, narg); + break; case UPB_TYPE_BOOL: - return upb_msgval_bool(lupb_checkbool(L, narg)); + ret.bool_val = lupb_checkbool(L, narg); + break; case UPB_TYPE_STRING: case UPB_TYPE_BYTES: { size_t len; const char *ptr = lupb_checkstring(L, narg, &len); - return upb_msgval_makestr(ptr, len); + switch (copy) { + case LUPB_COPY: { + upb_arena *arena = lupb_arenaget(L, container); + char *data = upb_arena_malloc(arena, len); + memcpy(data, ptr, len); + ret.str_val = upb_strview_make(data, len); + break; + } + case LUPB_REF: + ret.str_val = upb_strview_make(ptr, len); + break; + } + break; } case UPB_TYPE_MESSAGE: - UPB_ASSERT(lmsgclass); - return upb_msgval_msg(lupb_msg_checkmsg(L, narg, lmsgclass)); + ret.msg_val = lupb_msg_check(L, narg); + /* Typecheck message. */ + lua_getiuservalue(L, container, LUPB_MSGDEF_INDEX); + lua_getiuservalue(L, narg, LUPB_MSGDEF_INDEX); + luaL_argcheck(L, lua_rawequal(L, -1, -2), narg, "message type mismatch"); + lua_pop(L, 2); + break; } - UPB_UNREACHABLE(); + return ret; } -static void lupb_pushmsgval(lua_State *L, upb_fieldtype_t type, +static void lupb_pushmsgval(lua_State *L, int container, upb_fieldtype_t type, upb_msgval val) { switch (type) { case UPB_TYPE_INT32: case UPB_TYPE_ENUM: - lupb_pushint32(L, upb_msgval_getint32(val)); + lupb_pushint32(L, val.int32_val); return; case UPB_TYPE_INT64: - lupb_pushint64(L, upb_msgval_getint64(val)); + lupb_pushint64(L, val.int64_val); return; case UPB_TYPE_UINT32: - lupb_pushuint32(L, upb_msgval_getuint32(val)); + lupb_pushuint32(L, val.uint32_val); return; case UPB_TYPE_UINT64: - lupb_pushuint64(L, upb_msgval_getuint64(val)); + lupb_pushuint64(L, val.uint64_val); return; case UPB_TYPE_DOUBLE: - lupb_pushdouble(L, upb_msgval_getdouble(val)); + lua_pushnumber(L, val.double_val); return; case UPB_TYPE_FLOAT: - lupb_pushfloat(L, upb_msgval_getfloat(val)); + lua_pushnumber(L, val.float_val); return; case UPB_TYPE_BOOL: - lua_pushboolean(L, upb_msgval_getbool(val)); + lua_pushboolean(L, val.bool_val); return; case UPB_TYPE_STRING: case UPB_TYPE_BYTES: + lua_pushlstring(L, val.str_val.data, val.str_val.size); + return; case UPB_TYPE_MESSAGE: - break; /* Shouldn't call this function. */ + assert(container); + if (!lupb_cacheget(L, val.msg_val)) { + lupb_msg_newmsgwrapper(L, container, val); + } + return; } - UPB_UNREACHABLE(); + LUPB_UNREACHABLE(); } /* lupb_array *****************************************************************/ -/* A strongly typed array. Implemented by wrapping upb_array. - * - * - we only allow integer indices. - * - all entries must have the correct type. - * - we do not allow "holes" in the array; you can only assign to an existing - * index or one past the end (which will grow the array by one). - * - * For string/submessage entries we keep in the userval: - * - * [number index] -> [lupb_string/lupb_msg userdata] - */ - typedef struct { - /* Only needed for array of message. This wastes space in the non-message - * case but simplifies the code. Could optimize away if desired. */ - const lupb_msgclass *lmsgclass; upb_array *arr; upb_fieldtype_t type; } lupb_array; -#define ARRAY_MSGCLASS_INDEX 0 - static lupb_array *lupb_array_check(lua_State *L, int narg) { return luaL_checkudata(L, narg, LUPB_ARRAY); } -/** - * lupb_array_typecheck() - * - * Verifies that the lupb_array object at index |narg| can be safely assigned - * to the field |f| of the lupb_msg object at index |msg|. If this is safe, - * returns a upb_msgval representing the array. Otherwise, throws a Lua error. - */ -static upb_msgval lupb_array_typecheck(lua_State *L, int narg, int msg, - const upb_fielddef *f) { - lupb_array *larray = lupb_array_check(L, narg); - - if (upb_array_type(larray->arr) != upb_fielddef_type(f) || - lupb_msg_getsubmsgclass(L, msg, f) != larray->lmsgclass) { - luaL_error(L, "Array had incorrect type (expected: %d, got: %d)", - (int)upb_fielddef_type(f), (int)upb_array_type(larray->arr)); - } - - if (upb_array_type(larray->arr) == UPB_TYPE_MESSAGE) { - lupb_msgclass_typecheck(L, lupb_msg_getsubmsgclass(L, msg, f), - larray->lmsgclass); - } - - return upb_msgval_arr(larray->arr); -} - /** * lupb_array_checkindex() * * Checks the array index at Lua stack index |narg| to verify that it is an * integer between 1 and |max|, inclusively. Also corrects it to be zero-based * for C. - * - * We use "int" because of lua_rawseti/lua_rawgeti -- can re-evaluate if we want - * arrays bigger than 2^31. */ static int lupb_array_checkindex(lua_State *L, int narg, uint32_t max) { uint32_t n = lupb_checkuint32(L, narg); - if (n == 0 || n > max || n > INT_MAX) { - luaL_error(L, "Invalid array index: expected between 1 and %d", (int)max); - } - return n - 1; /* Lua uses 1-based indexing. :( */ + luaL_argcheck(L, n != 0 && n <= max, narg, "invalid array index"); + return n - 1; /* Lua uses 1-based indexing. */ } /* lupb_array Public API */ +/* lupb_array_new(): + * + * Handles: + * Array(upb.TYPE_INT32) + * Array(message_type) + */ static int lupb_array_new(lua_State *L) { lupb_array *larray; - upb_fieldtype_t type; - const lupb_msgclass *lmsgclass = NULL; + upb_arena *arena; if (lua_type(L, 1) == LUA_TNUMBER) { - type = lupb_checkfieldtype(L, 1); + upb_fieldtype_t type = lupb_checkfieldtype(L, 1); + larray = lupb_newuserdata(L, sizeof(*larray), 1, LUPB_ARRAY); + larray->type = type; } else { - type = UPB_TYPE_MESSAGE; - lmsgclass = lupb_msgclass_check(L, 1); - lupb_uservalseti(L, -1, ARRAY_MSGCLASS_INDEX, 1); /* GC-root lmsgclass. */ + lupb_msgdef_check(L, 1); + larray = lupb_newuserdata(L, sizeof(*larray), 2, LUPB_ARRAY); + larray->type = UPB_TYPE_MESSAGE; + lua_pushvalue(L, 1); + lua_setiuservalue(L, -2, LUPB_MSGDEF_INDEX); } - larray = lupb_newuserdata(L, sizeof(*larray), LUPB_ARRAY); - larray->type = type; - larray->lmsgclass = lmsgclass; - larray->arr = upb_array_new(lupb_arena_get(L)); + arena = lupb_arena_pushnew(L); + lua_setiuservalue(L, -2, LUPB_ARENA_INDEX); + + larray->arr = upb_array_new(arena, larray->type); + lupb_cacheset(L, larray->arr); return 1; } +/* lupb_array_newindex(): + * + * Handles: + * array[idx] = val + * + * idx can be within the array or one past the end to extend. + */ static int lupb_array_newindex(lua_State *L) { lupb_array *larray = lupb_array_check(L, 1); - upb_fieldtype_t type = upb_array_type(larray->arr); - uint32_t n = lupb_array_checkindex(L, 2, upb_array_size(larray->arr) + 1); - upb_msgval msgval = lupb_tomsgval(L, type, 3, larray->lmsgclass); - - upb_array_set(larray->arr, larray->type, n, msgval, lupb_arena_get(L)); + size_t size = upb_array_size(larray->arr); + uint32_t n = lupb_array_checkindex(L, 2, size + 1); + upb_msgval msgval = lupb_tomsgval(L, larray->type, 3, 1, LUPB_COPY); - if (lupb_istypewrapped(type)) { - lupb_uservalseti(L, 1, n, 3); + if (n == size) { + upb_array_append(larray->arr, msgval, lupb_arenaget(L, 1)); + } else { + upb_array_set(larray->arr, n, msgval); } return 0; /* 1 for chained assignments? */ } +/* lupb_array_index(): + * + * Handles: + * array[idx] -> val + * + * idx must be within the array. + */ static int lupb_array_index(lua_State *L) { lupb_array *larray = lupb_array_check(L, 1); - upb_array *array = larray->arr; - uint32_t n = lupb_array_checkindex(L, 2, upb_array_size(array)); - upb_fieldtype_t type = upb_array_type(array); + size_t size = upb_array_size(larray->arr); + uint32_t n = lupb_array_checkindex(L, 2, size); + upb_msgval val = upb_array_get(larray->arr, n); - if (lupb_istypewrapped(type)) { - lupb_uservalgeti(L, 1, n); - } else { - lupb_pushmsgval(L, upb_array_type(array), - upb_array_get(array, larray->type, n)); - } + lupb_pushmsgval(L, 1, larray->type, val); return 1; } +/* lupb_array_len(): + * + * Handles: + * #array -> len + */ static int lupb_array_len(lua_State *L) { lupb_array *larray = lupb_array_check(L, 1); lua_pushnumber(L, upb_array_size(larray->arr)); @@ -595,61 +501,16 @@ static const struct luaL_Reg lupb_array_mm[] = { /* lupb_map *******************************************************************/ -/* A map object. Implemented by wrapping upb_map. - * - * When the value type is string/bytes/message, the userval consists of: - * - * [Lua number/string] -> [lupb_string/lupb_msg userdata] - * - * For other value types we don't use the userdata. - */ - typedef struct { - const lupb_msgclass *value_lmsgclass; upb_map *map; + upb_fieldtype_t key_type; + upb_fieldtype_t value_type; } lupb_map; -#define MAP_MSGCLASS_INDEX 0 - -/* lupb_map internal functions */ +#define MAP_MSGDEF_INDEX 1 static lupb_map *lupb_map_check(lua_State *L, int narg) { - return luaL_checkudata(L, narg, LUPB_ARRAY); -} - -/** - * lupb_map_typecheck() - * - * Checks that the lupb_map at index |narg| can be safely assigned to the - * field |f| of the message at index |msg|. If so, returns a upb_msgval for - * this map. Otherwise, raises a Lua error. - */ -static upb_msgval lupb_map_typecheck(lua_State *L, int narg, int msg, - const upb_fielddef *f) { - lupb_map *lmap = lupb_map_check(L, narg); - upb_map *map = lmap->map; - const upb_msgdef *entry = upb_fielddef_msgsubdef(f); - const upb_fielddef *key_field = upb_msgdef_itof(entry, UPB_MAPENTRY_KEY); - const upb_fielddef *value_field = upb_msgdef_itof(entry, UPB_MAPENTRY_VALUE); - - UPB_ASSERT(entry && key_field && value_field); - - if (upb_map_keytype(map) != upb_fielddef_type(key_field)) { - luaL_error(L, "Map key type invalid"); - } - - if (upb_map_valuetype(map) != upb_fielddef_type(value_field)) { - luaL_error(L, "Map had incorrect value type (expected: %s, got: %s)", - upb_fielddef_type(value_field), upb_map_valuetype(map)); - } - - if (upb_map_valuetype(map) == UPB_TYPE_MESSAGE) { - lupb_msgclass_typecheck( - L, lupb_msg_msgclassfor(L, msg, upb_fielddef_msgsubdef(value_field)), - lmap->value_lmsgclass); - } - - return upb_msgval_map(map); + return luaL_checkudata(L, narg, LUPB_MAP); } /* lupb_map Public API */ @@ -659,28 +520,29 @@ static upb_msgval lupb_map_typecheck(lua_State *L, int narg, int msg, * * Handles: * new_map = upb.Map(key_type, value_type) + * new_map = upb.Map(key_type, value_msgdef) */ static int lupb_map_new(lua_State *L) { + upb_arena *arena; lupb_map *lmap; - upb_fieldtype_t key_type = lupb_checkfieldtype(L, 1); - upb_fieldtype_t value_type; - const lupb_msgclass *value_lmsgclass = NULL; if (lua_type(L, 2) == LUA_TNUMBER) { - value_type = lupb_checkfieldtype(L, 2); + lmap = lupb_newuserdata(L, sizeof(*lmap), 1, LUPB_MAP); + lmap->value_type = lupb_checkfieldtype(L, 2); } else { - value_type = UPB_TYPE_MESSAGE; + lupb_msgdef_check(L, 2); + lmap = lupb_newuserdata(L, sizeof(*lmap), 2, LUPB_MAP); + lmap->value_type = UPB_TYPE_MESSAGE; + lua_pushvalue(L, 2); + lua_setiuservalue(L, -2, MAP_MSGDEF_INDEX); } - lmap = lupb_newuserdata(L, sizeof(*lmap), LUPB_MAP); + arena = lupb_arena_pushnew(L); + lua_setiuservalue(L, -2, LUPB_ARENA_INDEX); - if (value_type == UPB_TYPE_MESSAGE) { - value_lmsgclass = lupb_msgclass_check(L, 2); - lupb_uservalseti(L, -1, MAP_MSGCLASS_INDEX, 2); /* GC-root lmsgclass. */ - } - - lmap->value_lmsgclass = value_lmsgclass; - lmap->map = upb_map_new(key_type, value_type, lupb_arena_get(L)); + lmap->key_type = lupb_checkfieldtype(L, 1); + lmap->map = upb_map_new(arena, lmap->key_type, lmap->value_type); + lupb_cacheset(L, lmap->map); return 1; } @@ -693,28 +555,13 @@ static int lupb_map_new(lua_State *L) { */ static int lupb_map_index(lua_State *L) { lupb_map *lmap = lupb_map_check(L, 1); - upb_map *map = lmap->map; - upb_fieldtype_t valtype = upb_map_valuetype(map); - /* We don't always use "key", but this call checks the key type. */ - upb_msgval key = lupb_tomsgval(L, upb_map_keytype(map), 2, NULL); + upb_msgval key = lupb_tomsgval(L, lmap->key_type, 2, 1, LUPB_REF); + upb_msgval val; - if (lupb_istypewrapped(valtype)) { - /* Userval contains the full map, lookup there by key. */ - lupb_getuservalue(L, 1); - lua_pushvalue(L, 2); - lua_rawget(L, -2); - - if (lua_isnil(L, -1)) { - /* TODO: lazy read from upb_map */ - } + if (upb_map_get(lmap->map, key, &val)) { + lupb_pushmsgval(L, 1, lmap->value_type, val); } else { - /* Lookup in upb_map. */ - upb_msgval val; - if (upb_map_get(map, key, &val)) { - lupb_pushmsgval(L, upb_map_valuetype(map), val); - } else { - lua_pushnil(L); - } + lua_pushnil(L); } return 1; @@ -742,80 +589,52 @@ static int lupb_map_len(lua_State *L) { static int lupb_map_newindex(lua_State *L) { lupb_map *lmap = lupb_map_check(L, 1); upb_map *map = lmap->map; - upb_msgval key = lupb_tomsgval(L, upb_map_keytype(map), 2, NULL); + upb_msgval key = lupb_tomsgval(L, lmap->key_type, 2, 1, LUPB_REF); if (lua_isnil(L, 3)) { - /* Delete from map. */ - upb_map_del(map, key); - - if (lupb_istypewrapped(upb_map_valuetype(map))) { - /* Delete in userval. */ - lupb_getuservalue(L, 1); - lua_pushvalue(L, 2); - lua_pushnil(L); - lua_rawset(L, -3); - lua_pop(L, 1); - } + upb_map_delete(map, key); } else { - /* Set in map. */ - upb_msgval val = - lupb_tomsgval(L, upb_map_valuetype(map), 3, lmap->value_lmsgclass); - - upb_map_set(map, key, val, NULL); - - if (lupb_istypewrapped(upb_map_valuetype(map))) { - /* Set in userval. */ - lupb_getuservalue(L, 1); - lua_pushvalue(L, 2); - lua_pushvalue(L, 3); - lua_rawset(L, -3); - lua_pop(L, 1); - } + upb_msgval val = lupb_tomsgval(L, lmap->value_type, 3, 1, LUPB_COPY); + upb_map_set(map, key, val, lupb_arenaget(L, 1)); } return 0; } -/* upb_mapiter [[[ */ - static int lupb_mapiter_next(lua_State *L) { - upb_mapiter *i = lua_touserdata(L, lua_upvalueindex(1)); - lupb_map *lmap = lupb_map_check(L, 1); - upb_map *map = lmap->map; - - if (upb_mapiter_done(i)) { + int map = lua_upvalueindex(2); + size_t *iter = lua_touserdata(L, lua_upvalueindex(1)); + lupb_map *lmap = lupb_map_check(L, map); + + if (upb_mapiter_next(lmap->map, iter)) { + upb_msgval key = upb_mapiter_key(lmap->map, *iter); + upb_msgval val = upb_mapiter_value(lmap->map, *iter); + lupb_pushmsgval(L, map, lmap->key_type, key); + lupb_pushmsgval(L, map, lmap->value_type, val); + return 2; + } else { return 0; } - lupb_pushmsgval(L, upb_map_keytype(map), upb_mapiter_key(i)); - lupb_pushmsgval(L, upb_map_valuetype(map), upb_mapiter_value(i)); - upb_mapiter_next(i); - - return 2; } +/** + * lupb_map_pairs() + * + * Handles: + * pairs(map) + */ static int lupb_map_pairs(lua_State *L) { - lupb_map *lmap = lupb_map_check(L, 1); - - if (lupb_istypewrapped(upb_map_keytype(lmap->map)) || - lupb_istypewrapped(upb_map_valuetype(lmap->map))) { - /* Complex key or value type. - * Sync upb_map to userval if necessary, then iterate over userval. */ - - /* TODO: Lua tables don't know how many entries they have, gah!. */ - return 1; - } else { - /* Simple key and value type, iterate over the upb_map directly. */ - upb_mapiter *i = lua_newuserdata(L, upb_mapiter_sizeof()); + lupb_map_check(L, 1); + size_t *iter = lua_newuserdata(L, sizeof(*iter)); - upb_mapiter_begin(i, lmap->map); - lua_pushvalue(L, 1); + *iter = UPB_MAP_BEGIN; + lua_pushvalue(L, 1); - /* Upvalues are [upb_mapiter, lupb_map]. */ - lua_pushcclosure(L, &lupb_mapiter_next, 2); + /* Upvalues are [iter, lupb_map]. */ + lua_pushcclosure(L, &lupb_mapiter_next, 2); - return 1; - } + return 1; } /* upb_mapiter ]]] */ @@ -831,100 +650,119 @@ static const struct luaL_Reg lupb_map_mm[] = { /* lupb_msg *******************************************************************/ -/* A message object. Implemented by wrapping upb_msg. - * - * Our userval contains: - * - * - [0] -> our message class - * - [lupb_fieldindex(f)] -> [lupb_{string,array,map,msg} userdata] - * - * Fields with scalar number/bool types don't go in the userval. - */ - -#define LUPB_MSG_MSGCLASSINDEX 0 -#define LUPB_MSG_ARENA -1 - -int lupb_fieldindex(const upb_fielddef *f) { - return upb_fielddef_index(f) + 1; /* 1-based Lua arrays. */ -} - - typedef struct { - const lupb_msgclass *lmsgclass; upb_msg *msg; } lupb_msg; /* lupb_msg helpers */ -static bool in_userval(const upb_fielddef *f) { - return lupb_istypewrapped(upb_fielddef_type(f)) || upb_fielddef_isseq(f) || - upb_fielddef_ismap(f); -} - -lupb_msg *lupb_msg_check(lua_State *L, int narg) { +static upb_msg *lupb_msg_check(lua_State *L, int narg) { lupb_msg *msg = luaL_checkudata(L, narg, LUPB_MSG); - if (!msg->lmsgclass) luaL_error(L, "called into dead msg"); - return msg; -} - -const upb_msg *lupb_msg_checkmsg(lua_State *L, int narg, - const lupb_msgclass *lmsgclass) { - lupb_msg *lmsg = lupb_msg_check(L, narg); - lupb_msgclass_typecheck(L, lmsgclass, lmsg->lmsgclass); - return lmsg->msg; + return msg->msg; } -upb_msg *lupb_msg_checkmsg2(lua_State *L, int narg, - const upb_msglayout **layout) { - lupb_msg *lmsg = lupb_msg_check(L, narg); - *layout = lmsg->lmsgclass->layout; - return lmsg->msg; -} - -const upb_msgdef *lupb_msg_checkdef(lua_State *L, int narg) { - return lupb_msg_check(L, narg)->lmsgclass->msgdef; -} - -static const upb_fielddef *lupb_msg_checkfield(lua_State *L, - const lupb_msg *msg, - int fieldarg) { +static const upb_fielddef *lupb_msg_checkfield(lua_State *L, int msg, + int field) { size_t len; - const char *fieldname = luaL_checklstring(L, fieldarg, &len); - const upb_msgdef *msgdef = msg->lmsgclass->msgdef; - const upb_fielddef *f = upb_msgdef_ntof(msgdef, fieldname, len); - - if (!f) { - const char *msg = lua_pushfstring(L, "no such field: %s", fieldname); - luaL_argerror(L, fieldarg, msg); - return NULL; /* Never reached. */ + const char *fieldname = luaL_checklstring(L, field, &len); + const upb_msgdef *m; + const upb_fielddef *f; + + lua_getiuservalue(L, msg, LUPB_MSGDEF_INDEX); + m = lupb_msgdef_check(L, -1); + f = upb_msgdef_ntof(m, fieldname, len); + if (f == NULL) { + luaL_error(L, "no such field '%s'", fieldname); } + lua_pop(L, 1); return f; } -static const lupb_msgclass *lupb_msg_msgclassfor(lua_State *L, int narg, - const upb_msgdef *md) { - lupb_uservalgeti(L, narg, LUPB_MSG_MSGCLASSINDEX); - return lupb_msgclass_msgclassfor(L, -1, md); +/** + * lupb_msg_newmsgwrapper() + * + * Creates a new wrapper for a message, copying the arena and msgdef references + * from |narg| (which should be an array or map). + */ +static void lupb_msg_newmsgwrapper(lua_State *L, int narg, upb_msgval val) { + lupb_msg *lmsg = lupb_newuserdata(L, sizeof(*lmsg), 2, LUPB_MSG); + lmsg->msg = (upb_msg*)val.msg_val; /* XXX: cast isn't great. */ + lupb_cacheset(L, lmsg->msg); + + /* Copy both arena and msgdef into the wrapper. */ + lua_getiuservalue(L, narg, LUPB_ARENA_INDEX); + lua_setiuservalue(L, -2, LUPB_ARENA_INDEX); + lua_getiuservalue(L, narg, LUPB_MSGDEF_INDEX); + lua_setiuservalue(L, -2, LUPB_MSGDEF_INDEX); } -static const lupb_msgclass *lupb_msg_getsubmsgclass(lua_State *L, int narg, - const upb_fielddef *f) { - lupb_uservalgeti(L, narg, LUPB_MSG_MSGCLASSINDEX); - return lupb_msgclass_getsubmsgclass(L, -1, f); +/** + * lupb_msg_newud() + * + * Creates the Lua userdata for a new wrapper object, adding a reference to + * the msgdef if necessary. + */ +static void *lupb_msg_newud(lua_State *L, int narg, size_t size, + const char *type, const upb_fielddef *f) { + if (upb_fielddef_type(f) == UPB_TYPE_MESSAGE) { + /* Wrapper needs a reference to the msgdef. */ + void* ud = lupb_newuserdata(L, size, 2, type); + lua_getiuservalue(L, narg, LUPB_MSGDEF_INDEX); + lupb_msgdef_pushsubmsgdef(L, f); + lua_setiuservalue(L, -2, LUPB_MSGDEF_INDEX); + return ud; + } else { + return lupb_newuserdata(L, size, 1, type); + } } -int lupb_msg_pushref(lua_State *L, int msgclass, upb_msg *msg) { - const lupb_msgclass *lmsgclass = lupb_msgclass_check(L, msgclass); - lupb_msg *lmsg = lupb_newuserdata(L, sizeof(lupb_msg), LUPB_MSG); +/** + * lupb_msg_newwrapper() + * + * Creates a new Lua wrapper object to wrap the given array, map, or message. + */ +static void lupb_msg_newwrapper(lua_State *L, int narg, const upb_fielddef *f, + upb_mutmsgval val) { + if (upb_fielddef_ismap(f)) { + const upb_msgdef *entry = upb_fielddef_msgsubdef(f); + const upb_fielddef *key_f = upb_msgdef_itof(entry, UPB_MAPENTRY_KEY); + const upb_fielddef *val_f = upb_msgdef_itof(entry, UPB_MAPENTRY_VALUE); + lupb_map *lmap = lupb_msg_newud(L, narg, sizeof(*lmap), LUPB_MAP, val_f); + lmap->key_type = upb_fielddef_type(key_f); + lmap->value_type = upb_fielddef_type(val_f); + lmap->map = val.map; + } else if (upb_fielddef_isseq(f)) { + lupb_array *larr = lupb_msg_newud(L, narg, sizeof(*larr), LUPB_ARRAY, f); + larr->type = upb_fielddef_type(f); + larr->arr = val.array; + } else { + lupb_msg *lmsg = lupb_msg_newud(L, narg, sizeof(*lmsg), LUPB_MSG, f); + lmsg->msg = val.msg; + } - lmsg->lmsgclass = lmsgclass; - lmsg->msg = msg; + /* Copy arena ref to new wrapper. This may be a different arena than the + * underlying data was originally constructed from, but if so both arenas + * must be in the same group. */ + lua_getiuservalue(L, narg, LUPB_ARENA_INDEX); + lua_setiuservalue(L, -2, LUPB_ARENA_INDEX); - lupb_uservalseti(L, -1, LUPB_MSG_MSGCLASSINDEX, msgclass); - lupb_uservalseti(L, -1, LUPB_MSG_ARENA, -2); + lupb_cacheset(L, val.msg); +} - return 1; +/** + * lupb_msg_typechecksubmsg() + * + * Typechecks the given array, map, or msg against this upb_fielddef. + */ +static void lupb_msg_typechecksubmsg(lua_State *L, int narg, int msgarg, + const upb_fielddef *f) { + /* Typecheck this map's msgdef against this message field. */ + lua_getiuservalue(L, narg, LUPB_MSGDEF_INDEX); + lua_getiuservalue(L, msgarg, LUPB_MSGDEF_INDEX); + lupb_msgdef_pushsubmsgdef(L, f); + luaL_argcheck(L, lua_rawequal(L, -1, -2), narg, "message type mismatch"); + lua_pop(L, 2); } /* lupb_msg Public API */ @@ -934,15 +772,31 @@ int lupb_msg_pushref(lua_State *L, int msgclass, upb_msg *msg) { * * Handles: * new_msg = MessageClass() + * new_msg = MessageClass{foo = "bar", baz = 3, quux = {foo = 3}} */ -static int lupb_msg_pushnew(lua_State *L, int narg) { - const lupb_msgclass *lmsgclass = lupb_msgclass_check(L, narg); - lupb_msg *lmsg = lupb_newuserdata(L, sizeof(lupb_msg), LUPB_MSG); - - lmsg->lmsgclass = lmsgclass; - lmsg->msg = upb_msg_new(lmsgclass->layout, lupb_arena_get(L)); - - lupb_uservalseti(L, -1, LUPB_MSG_MSGCLASSINDEX, narg); +int lupb_msg_pushnew(lua_State *L) { + int argcount = lua_gettop(L); + const upb_msgdef *m = lupb_msgdef_check(L, 1); + lupb_msg *lmsg = lupb_newuserdata(L, sizeof(lupb_msg), 2, LUPB_MSG); + upb_arena *arena = lupb_arena_pushnew(L); + + lua_setiuservalue(L, -2, LUPB_ARENA_INDEX); + lua_pushvalue(L, 1); + lua_setiuservalue(L, -2, LUPB_MSGDEF_INDEX); + + lmsg->msg = upb_msg_new(m, arena); + lupb_cacheset(L, lmsg->msg); + + if (argcount > 1) { + /* Set initial fields from table. */ + int msg = lua_gettop(L); + lua_pushnil(L); + while (lua_next(L, 2) != 0) { + lua_pushvalue(L, -2); /* now stack is key, val, key */ + lua_insert(L, -3); /* now stack is key, key, val */ + lua_settable(L, msg); + } + } return 1; } @@ -956,33 +810,20 @@ static int lupb_msg_pushnew(lua_State *L, int narg) { * msg[field_descriptor] # (for extensions) (TODO) */ static int lupb_msg_index(lua_State *L) { - lupb_msg *lmsg = lupb_msg_check(L, 1); - const upb_fielddef *f = lupb_msg_checkfield(L, lmsg, 2); - const upb_msglayout *l = lmsg->lmsgclass->layout; - int field_index = upb_fielddef_index(f); - - if (in_userval(f)) { - lupb_uservalgeti(L, 1, lupb_fieldindex(f)); - - if (lua_isnil(L, -1)) { - /* Check if we need to lazily create wrapper. */ - if (upb_fielddef_isseq(f)) { - /* TODO(haberman) */ - } else if (upb_fielddef_issubmsg(f)) { - /* TODO(haberman) */ - } else { - UPB_ASSERT(upb_fielddef_isstring(f)); - if (upb_msg_has(lmsg->msg, field_index, l)) { - upb_msgval val = upb_msg_get(lmsg->msg, field_index, l); - lua_pop(L, 1); - lua_pushlstring(L, val.str.data, val.str.size); - lupb_uservalseti(L, 1, lupb_fieldindex(f), -1); - } - } + upb_msg *msg = lupb_msg_check(L, 1); + const upb_fielddef *f = lupb_msg_checkfield(L, 1, 2); + + if (upb_fielddef_isseq(f) || upb_fielddef_issubmsg(f)) { + /* Wrapped type; get or create wrapper. */ + upb_arena *arena = upb_fielddef_isseq(f) ? lupb_arenaget(L, 1) : NULL; + upb_mutmsgval val = upb_msg_mutable(msg, f, arena); + if (!lupb_cacheget(L, val.msg)) { + lupb_msg_newwrapper(L, 1, f, val); } } else { - upb_msgval val = upb_msg_get(lmsg->msg, field_index, l); - lupb_pushmsgval(L, upb_fielddef_type(f), val); + /* Value type, just push value and return .*/ + upb_msgval val = upb_msg_get(msg, f); + lupb_pushmsgval(L, 0, upb_fielddef_type(f), val); } return 1; @@ -997,37 +838,53 @@ static int lupb_msg_index(lua_State *L) { * msg[field_descriptor] = bar # (for extensions) (TODO) */ static int lupb_msg_newindex(lua_State *L) { - lupb_msg *lmsg = lupb_msg_check(L, 1); - const upb_fielddef *f = lupb_msg_checkfield(L, lmsg, 2); - upb_fieldtype_t type = upb_fielddef_type(f); - int field_index = upb_fielddef_index(f); + upb_msg *msg = lupb_msg_check(L, 1); + const upb_fielddef *f = lupb_msg_checkfield(L, 1, 2); upb_msgval msgval; - - /* Typecheck and get msgval. */ - - if (upb_fielddef_isseq(f)) { - msgval = lupb_array_typecheck(L, 3, 1, f); - } else if (upb_fielddef_ismap(f)) { - msgval = lupb_map_typecheck(L, 3, 1, f); - } else { - const lupb_msgclass *lmsgclass = NULL; - + bool merge_arenas = true; + + if (upb_fielddef_ismap(f)) { + lupb_map *lmap = lupb_map_check(L, 3); + const upb_msgdef *entry = upb_fielddef_msgsubdef(f); + const upb_fielddef *key_f = upb_msgdef_itof(entry, UPB_MAPENTRY_KEY); + const upb_fielddef *val_f = upb_msgdef_itof(entry, UPB_MAPENTRY_VALUE); + upb_fieldtype_t key_type = upb_fielddef_type(key_f); + upb_fieldtype_t value_type = upb_fielddef_type(val_f); + luaL_argcheck(L, lmap->key_type == key_type, 3, "key type mismatch"); + luaL_argcheck(L, lmap->value_type == value_type, 3, "value type mismatch"); + if (value_type == UPB_TYPE_MESSAGE) { + lupb_msg_typechecksubmsg(L, 3, 1, val_f); + } + msgval.map_val = lmap->map; + } else if (upb_fielddef_isseq(f)) { + lupb_array *larr = lupb_array_check(L, 3); + upb_fieldtype_t type = upb_fielddef_type(f); + luaL_argcheck(L, larr->type == type, 3, "array type mismatch"); if (type == UPB_TYPE_MESSAGE) { - lmsgclass = lupb_msg_getsubmsgclass(L, 1, f); + lupb_msg_typechecksubmsg(L, 3, 1, f); } - - msgval = lupb_tomsgval(L, type, 3, lmsgclass); + msgval.array_val = larr->arr; + } else if (upb_fielddef_issubmsg(f)) { + upb_msg *msg = lupb_msg_check(L, 3); + lupb_msg_typechecksubmsg(L, 3, 1, f); + msgval.msg_val = msg; + } else { + msgval = lupb_tomsgval(L, upb_fielddef_type(f), 3, 1, LUPB_COPY); + merge_arenas = false; } - /* Set in upb_msg and userval (if necessary). */ - - upb_msg_set(lmsg->msg, field_index, msgval, lmsg->lmsgclass->layout); - - if (in_userval(f)) { - lupb_uservalseti(L, 1, lupb_fieldindex(f), 3); + if (merge_arenas) { + lua_getiuservalue(L, 1, LUPB_ARENA_INDEX); + lua_getiuservalue(L, 3, LUPB_ARENA_INDEX); + lupb_arena_merge(L, lua_absindex(L, -2), lua_absindex(L, -1)); + lua_pop(L, 2); } - return 0; /* 1 for chained assignments? */ + upb_msg_set(msg, f, msgval, lupb_arenaget(L, 1)); + + /* Return the new value for chained assignments. */ + lua_pushvalue(L, 3); + return 1; } static const struct luaL_Reg lupb_msg_mm[] = { @@ -1039,22 +896,89 @@ static const struct luaL_Reg lupb_msg_mm[] = { /* lupb_msg toplevel **********************************************************/ +/** + * lupb_decode() + * + * Handles: + * msg = upb.decode(MessageClass, bin_string) + */ +static int lupb_decode(lua_State *L) { + size_t len; + const upb_msgdef *m = lupb_msgdef_check(L, 1); + const char *pb = lua_tolstring(L, 2, &len); + const upb_msglayout *layout = upb_msgdef_layout(m); + upb_msg *msg; + upb_arena *arena; + bool ok; + + /* Create message. */ + lua_pushcfunction(L, &lupb_msg_pushnew); + lua_pushvalue(L, 1); + lua_call(L, 1, 1); + msg = lupb_msg_check(L, -1); + + lua_getiuservalue(L, -1, LUPB_ARENA_INDEX); + arena = lupb_arena_check(L, -1); + + /* Pin string data so we can reference it. */ + lua_pushvalue(L, 2); + lupb_arena_addobj(L, -2); + lua_pop(L, 1); + + ok = upb_decode(pb, len, msg, layout, arena); + + if (!ok) { + lua_pushstring(L, "Error decoding protobuf."); + return lua_error(L); + } + + return 1; +} + +/** + * lupb_encode() + * + * Handles: + * bin_string = upb.encode(msg) + */ +static int lupb_encode(lua_State *L) { + const upb_msg *msg = lupb_msg_check(L, 1); + const upb_msglayout *layout; + upb_arena *arena = lupb_arena_pushnew(L); + size_t size; + char *result; + + lua_getiuservalue(L, 1, LUPB_MSGDEF_INDEX); + layout = upb_msgdef_layout(lupb_msgdef_check(L, -1)); + lua_pop(L, 1); + + result = upb_encode(msg, (const void*)layout, arena, &size); + + if (!result) { + lua_pushstring(L, "Error encoding protobuf."); + return lua_error(L); + } + + lua_pushlstring(L, result, size); + + return 1; +} + static const struct luaL_Reg lupb_msg_toplevel_m[] = { {"Array", lupb_array_new}, {"Map", lupb_map_new}, - {"MessageFactory", lupb_msgfactory_new}, + {"decode", lupb_decode}, + {"encode", lupb_encode}, {NULL, NULL} }; void lupb_msg_registertypes(lua_State *L) { lupb_setfuncs(L, lupb_msg_toplevel_m); - lupb_register_type(L, LUPB_ARENA, NULL, lupb_arena_mm); - lupb_register_type(L, LUPB_MSGCLASS, NULL, lupb_msgclass_mm); - lupb_register_type(L, LUPB_MSGFACTORY, lupb_msgfactory_m, lupb_msgfactory_mm); - lupb_register_type(L, LUPB_ARRAY, NULL, lupb_array_mm); - lupb_register_type(L, LUPB_MAP, NULL, lupb_map_mm); - lupb_register_type(L, LUPB_MSG, NULL, lupb_msg_mm); + lupb_register_type(L, LUPB_ARENA, NULL, lupb_arena_mm); + lupb_register_type(L, LUPB_ARRAY, NULL, lupb_array_mm); + lupb_register_type(L, LUPB_MAP, NULL, lupb_map_mm); + lupb_register_type(L, LUPB_MSG, NULL, lupb_msg_mm); - lupb_arena_initsingleton(L); + lupb_cacheinit(L); } diff --git a/upb/bindings/lua/upb.c b/upb/bindings/lua/upb.c index 38fd24a27ef..3630ae2ef33 100644 --- a/upb/bindings/lua/upb.c +++ b/upb/bindings/lua/upb.c @@ -20,103 +20,91 @@ ** domain of [u]int64 values. */ +#include "upb/bindings/lua/upb.h" + #include #include #include #include + #include "lauxlib.h" -#include "upb/bindings/lua/upb.h" -#include "upb/handlers.h" #include "upb/msg.h" - /* Lua compatibility code *****************************************************/ -/* Lua 5.1 and Lua 5.2 have slightly incompatible APIs. A little bit of - * compatibility code can help hide the difference. Not too many people still - * use Lua 5.1 but LuaJIT uses the Lua 5.1 API in some ways. */ +/* Shims for upcoming Lua 5.3 functionality. */ +static bool lua_isinteger(lua_State *L, int argn) { + LUPB_UNUSED(L); + LUPB_UNUSED(argn); + return false; +} -#if LUA_VERSION_NUM == 501 -/* taken from lua 5.2's source. */ -void *luaL_testudata(lua_State *L, int ud, const char *tname) { - void *p = lua_touserdata(L, ud); - if (p != NULL) { /* value is a userdata? */ - if (lua_getmetatable(L, ud)) { /* does it have a metatable? */ - luaL_getmetatable(L, tname); /* get correct metatable */ - if (!lua_rawequal(L, -1, -2)) /* not the same? */ - p = NULL; /* value is a userdata with wrong metatable */ - lua_pop(L, 2); /* remove both metatables */ - return p; - } +/* Utility functions **********************************************************/ + +void lupb_checkstatus(lua_State *L, upb_status *s) { + if (!upb_ok(s)) { + lua_pushstring(L, upb_status_errmsg(s)); + lua_error(L); } - return NULL; /* value is not a userdata with a metatable */ } -static void lupb_newlib(lua_State *L, const char *name, const luaL_Reg *funcs) { - luaL_register(L, name, funcs); -} +/* Pushes a new userdata with the given metatable. */ +void *lupb_newuserdata(lua_State *L, size_t size, int n, const char *type) { +#if LUA_VERSION_NUM >= 504 + void *ret = lua_newuserdatauv(L, size, n); +#else + void *ret = lua_newuserdata(L, size); + lua_createtable(L, 0, n); + lua_setuservalue(L, -2); +#endif -#elif LUA_VERSION_NUM == 502 + /* Set metatable. */ + luaL_getmetatable(L, type); + assert(!lua_isnil(L, -1)); /* Should have been created by luaopen_upb. */ + lua_setmetatable(L, -2); -int luaL_typerror(lua_State *L, int narg, const char *tname) { - const char *msg = lua_pushfstring(L, "%s expected, got %s", - tname, luaL_typename(L, narg)); - return luaL_argerror(L, narg, msg); + return ret; } -static void lupb_newlib(lua_State *L, const char *name, const luaL_Reg *funcs) { - /* Lua 5.2 modules are not expected to set a global variable, so "name" is - * unused. */ - UPB_UNUSED(name); - - /* Can't use luaL_newlib(), because funcs is not the actual array. - * Could (micro-)optimize this a bit to count funcs for initial table size. */ - lua_createtable(L, 0, 8); - luaL_setfuncs(L, funcs, 0); +#if LUA_VERSION_NUM < 504 +int lua_setiuservalue(lua_State *L, int index, int n) { + lua_getuservalue(L, index); + lua_insert(L, -2); + lua_rawseti(L, -2, n); + lua_pop(L, 1); + return 1; } -#else -#error Only Lua 5.1 and 5.2 are supported -#endif - -/* Shims for upcoming Lua 5.3 functionality. */ -bool lua_isinteger(lua_State *L, int argn) { - UPB_UNUSED(L); - UPB_UNUSED(argn); - return false; +int lua_getiuservalue(lua_State *L, int index, int n) { + lua_getuservalue(L, index); + lua_rawgeti(L, -1, n); + lua_replace(L, -2); + return 1; } +#endif +void lupb_register_type(lua_State *L, const char *name, const luaL_Reg *m, + const luaL_Reg *mm) { + luaL_newmetatable(L, name); -/* Utility functions **********************************************************/ - -/* We store our module table in the registry, keyed by ptr. - * For more info about the motivation/rationale, see this thread: - * http://thread.gmane.org/gmane.comp.lang.lua.general/110632 */ -bool lupb_openlib(lua_State *L, void *ptr, const char *name, - const luaL_Reg *funcs) { - /* Lookup cached module table. */ - lua_pushlightuserdata(L, ptr); - lua_rawget(L, LUA_REGISTRYINDEX); - if (!lua_isnil(L, -1)) { - return true; + if (mm) { + lupb_setfuncs(L, mm); } - lupb_newlib(L, name, funcs); - - /* Save module table in cache. */ - lua_pushlightuserdata(L, ptr); - lua_pushvalue(L, -2); - lua_rawset(L, LUA_REGISTRYINDEX); - - return false; -} + if (m) { + /* Methods go in the mt's __index method. This implies that you can' + * implement __index and also have methods. */ + lua_getfield(L, -1, "__index"); + lupb_assert(L, lua_isnil(L, -1)); + lua_pop(L, 1); -void lupb_checkstatus(lua_State *L, upb_status *s) { - if (!upb_ok(s)) { - lua_pushstring(L, upb_status_errmsg(s)); - lua_error(L); + lua_createtable(L, 0, 0); + lupb_setfuncs(L, m); + lua_setfield(L, -2, "__index"); } + + lua_pop(L, 1); /* The mt. */ } /* Scalar type mapping ********************************************************/ @@ -204,42 +192,16 @@ void lupb_pushfloat(lua_State *L, float d) { lua_pushnumber(L, d); } +/* Library entry point ********************************************************/ -static const struct luaL_Reg lupb_toplevel_m[] = { - {NULL, NULL} -}; - -void lupb_register_type(lua_State *L, const char *name, const luaL_Reg *m, - const luaL_Reg *mm) { - luaL_newmetatable(L, name); - - if (mm) { - lupb_setfuncs(L, mm); - } - - if (m) { - /* Methods go in the mt's __index method. This implies that you can' - * implement __index and also have methods. */ - lua_getfield(L, -1, "__index"); - lupb_assert(L, lua_isnil(L, -1)); - lua_pop(L, 1); - - lua_createtable(L, 0, 0); - lupb_setfuncs(L, m); - lua_setfield(L, -2, "__index"); - } - - lua_pop(L, 1); /* The mt. */ -} - -int luaopen_upb_c(lua_State *L) { - static char module_key; - if (lupb_openlib(L, &module_key, "upb_c", lupb_toplevel_m)) { - return 1; - } - +int luaopen_lupb(lua_State *L) { +#if LUA_VERSION_NUM == 501 + const struct luaL_Reg funcs[] = {{NULL, NULL}}; + luaL_register(L, "upb_c", funcs); +#else + lua_createtable(L, 0, 8); +#endif lupb_def_registertypes(L); lupb_msg_registertypes(L); - return 1; /* Return package table. */ } diff --git a/upb/bindings/lua/upb.h b/upb/bindings/lua/upb.h index 51d8acf9e45..02ed341098c 100644 --- a/upb/bindings/lua/upb.h +++ b/upb/bindings/lua/upb.h @@ -7,65 +7,46 @@ #include "lauxlib.h" #include "upb/def.h" -#include "upb/handlers.h" #include "upb/msg.h" -#include "upb/msgfactory.h" -/* Lua 5.1/5.2 compatibility code. */ -#if LUA_VERSION_NUM == 501 +/* Lua changes its API in incompatible ways in every minor release. + * This is some shim code to paper over the differences. */ +#if LUA_VERSION_NUM == 501 #define lua_rawlen lua_objlen - -/* Lua >= 5.2's getuservalue/setuservalue functions do not exist in prior - * versions but the older function lua_getfenv() can provide 100% of its - * capabilities (the reverse is not true). */ -#define lua_getuservalue(L, index) lua_getfenv(L, index) -#define lua_setuservalue(L, index) lua_setfenv(L, index) - -void *luaL_testudata(lua_State *L, int ud, const char *tname); - +#define lua_setuservalue(L, idx) lua_setfenv(L, idx) +#define lua_getuservalue(L, idx) lua_getfenv(L, idx) #define lupb_setfuncs(L, l) luaL_register(L, NULL, l) +#elif LUA_VERSION_NUM >= 502 && LUA_VERSION_NUM <= 504 +#define lupb_setfuncs(L, l) luaL_setfuncs(L, l, 0) +#else +#error Only Lua 5.1-5.4 are supported +#endif -#elif LUA_VERSION_NUM == 502 +/* Create a new userdata with the given type and |n| uservals, which are popped + * from the stack to initialize the userdata. */ +void *lupb_newuserdata(lua_State *L, size_t size, int n, const char *type); -int luaL_typerror(lua_State *L, int narg, const char *tname); +#if LUA_VERSION_NUM < 504 +/* Polyfills for this Lua 5.4 function. Pushes userval |n| for the userdata at + * |index|. */ +int lua_setiuservalue(lua_State *L, int index, int n); +int lua_getiuservalue(lua_State *L, int index, int n); +#endif -#define lupb_setfuncs(L, l) luaL_setfuncs(L, l, 0) +/* Registers a type with the given name, methods, and metamethods. */ +void lupb_register_type(lua_State *L, const char *name, const luaL_Reg *m, + const luaL_Reg *mm); -#else -#error Only Lua 5.1 and 5.2 are supported -#endif +/* Checks the given upb_status and throws a Lua error if it is not ok. */ +void lupb_checkstatus(lua_State *L, upb_status *s); -#define lupb_assert(L, predicate) \ - if (!(predicate)) \ - luaL_error(L, "internal error: %s, %s:%d ", #predicate, __FILE__, __LINE__); +int luaopen_lupb(lua_State *L); -/* Function for initializing the core library. This function is idempotent, - * and should be called at least once before calling any of the functions that - * construct core upb types. */ -int luaopen_upb(lua_State *L); - -/* Gets or creates a package table for a C module that is uniquely identified by - * "ptr". The easiest way to supply a unique "ptr" is to pass the address of a - * static variable private in the module's .c file. - * - * If this module has already been registered in this lua_State, pushes it and - * returns true. - * - * Otherwise, creates a new module table for this module with the given name, - * pushes it, and registers the given top-level functions in it. It also sets - * it as a global variable, but only if the current version of Lua expects that - * (ie Lua 5.1/LuaJIT). - * - * If "false" is returned, the caller is guaranteed that this lib has not been - * registered in this Lua state before (regardless of any funny business the - * user might have done to the global state), so the caller can safely perform - * one-time initialization. */ -bool lupb_openlib(lua_State *L, void *ptr, const char *name, - const luaL_Reg *funcs); +/* C <-> Lua value conversions. ***********************************************/ /* Custom check/push functions. Unlike the Lua equivalents, they are pinned to - * specific types (instead of lua_Number, etc), and do not allow any implicit + * specific C types (instead of lua_Number, etc), and do not allow any implicit * conversion or data loss. */ int64_t lupb_checkint64(lua_State *L, int narg); int32_t lupb_checkint32(lua_State *L, int narg); @@ -81,47 +62,35 @@ void lupb_pushint64(lua_State *L, int64_t val); void lupb_pushint32(lua_State *L, int32_t val); void lupb_pushuint64(lua_State *L, uint64_t val); void lupb_pushuint32(lua_State *L, uint32_t val); -void lupb_pushdouble(lua_State *L, double val); -void lupb_pushfloat(lua_State *L, float val); - -/* Registers a type with the given name, methods, and metamethods. */ -void lupb_register_type(lua_State *L, const char *name, const luaL_Reg *m, - const luaL_Reg *mm); - -/* Checks the given upb_status and throws a Lua error if it is not ok. */ -void lupb_checkstatus(lua_State *L, upb_status *s); - /** From def.c. ***************************************************************/ -upb_fieldtype_t lupb_checkfieldtype(lua_State *L, int narg); - const upb_msgdef *lupb_msgdef_check(lua_State *L, int narg); const upb_enumdef *lupb_enumdef_check(lua_State *L, int narg); const upb_fielddef *lupb_fielddef_check(lua_State *L, int narg); upb_symtab *lupb_symtab_check(lua_State *L, int narg); +void lupb_msgdef_pushsubmsgdef(lua_State *L, const upb_fielddef *f); void lupb_def_registertypes(lua_State *L); - /** From msg.c. ***************************************************************/ -struct lupb_msgclass; -typedef struct lupb_msgclass lupb_msgclass; - -upb_arena *lupb_arena_check(lua_State *L, int narg); -int lupb_arena_new(lua_State *L); -upb_arena *lupb_arena_get(lua_State *L); -int lupb_msg_pushref(lua_State *L, int msgclass, void *msg); -const upb_msg *lupb_msg_checkmsg(lua_State *L, int narg, - const lupb_msgclass *lmsgclass); -upb_msg *lupb_msg_checkmsg2(lua_State *L, int narg, - const upb_msglayout **layout); - -const lupb_msgclass *lupb_msgclass_check(lua_State *L, int narg); -const upb_msglayout *lupb_msgclass_getlayout(lua_State *L, int narg); -const upb_msgdef *lupb_msgclass_getmsgdef(const lupb_msgclass *lmsgclass); -upb_msgfactory *lupb_msgclass_getfactory(const lupb_msgclass *lmsgclass); +int lupb_msg_pushnew(lua_State *L); +upb_arena *lupb_arena_pushnew(lua_State *L); + void lupb_msg_registertypes(lua_State *L); +#define lupb_assert(L, predicate) \ + if (!(predicate)) \ + luaL_error(L, "internal error: %s, %s:%d ", #predicate, __FILE__, __LINE__); + +#define LUPB_UNUSED(var) (void)var + +#if defined(__GNUC__) || defined(__clang__) +#define LUPB_UNREACHABLE() do { assert(0); __builtin_unreachable(); } while(0) +#else +#define LUPB_UNREACHABLE() do { assert(0); } while(0) +#endif + + #endif /* UPB_LUA_UPB_H_ */ diff --git a/upb/bindings/lua/upb.lua b/upb/bindings/lua/upb.lua index 728852e997a..ad6184a3d32 100644 --- a/upb/bindings/lua/upb.lua +++ b/upb/bindings/lua/upb.lua @@ -1,172 +1,30 @@ --- Before calling require on "upb_c", we need to load the same library --- as RTLD_GLOBAL, for the benefit of other C extensions that depend on --- C functions in the core. --- --- This has to happen *before* the require call, because if the module --- is loaded RTLD_LOCAL first, a subsequent load as RTLD_GLOBAL won't --- have the proper effect, at least on some platforms. -local so = package.searchpath and package.searchpath("upb_c", package.cpath) -if so then - package.loadlib(so, "*") -end - -local upb = require("upb_c") - --- A convenience function for building/linking/freezing defs --- while maintaining their original order. --- --- Sample usage: --- local m1, m2 = upb.build_defs{ --- upb.MessageDef{full_name = "M1", fields = { --- upb.FieldDef{ --- name = "m2", --- number = 1, --- type = upb.TYPE_MESSAGE, --- subdef_name = ".M2" --- }, --- } --- }, --- upb.MessageDef{full_name = "M2"} --- } -upb.build_defs = function(defs) - upb.SymbolTable(defs) - -- Lua 5.2 puts unpack in the table library. - return (unpack or table.unpack)(defs) -end +local upb = require("lupb") -local ipairs_iter = function(array, last_index) - local next_index = last_index + 1 - if next_index > #array then - return nil - end - return next_index, array[next_index] -end +upb.generated_pool = upb.SymbolTable() --- For iterating over the indexes and values of a upb.Array. --- --- for i, val in upb.ipairs(array) do --- -- ... --- end -upb.ipairs = function(array) - return ipairs_iter, array, 0 -end - -local set_named = function(obj, init) - for k, v in pairs(init) do - local func = obj["set_" .. k] - if not func then - error("Cannot set member: " .. k) +local module_metatable = { + __index = function(t, k) + local package = t._filedef:package() + if package then + k = package .. "." .. k end - func(obj, v) - end -end - --- Capture references to the functions we're wrapping. -local RealFieldDef = upb.FieldDef -local RealEnumDef = upb.EnumDef -local RealMessageDef = upb.MessageDef -local RealOneofDef = upb.OneofDef -local RealSymbolTable = upb.SymbolTable - --- FieldDef constructor; a wrapper around the real constructor that can --- set initial properties. --- --- User can specify initialization values like so: --- upb.FieldDef{label=upb.LABEL_REQUIRED, name="my_field", number=5, --- type=upb.TYPE_INT32, default_value=12, type_name="Foo"} -upb.FieldDef = function(init) - local f = RealFieldDef() - - if init then - -- Other members are often dependent on type, so set that first. - if init.type then - f:set_type(init.type) - init.type = nil - end - - set_named(f, init) - end - - return f -end - - --- MessageDef constructor; a wrapper around the real constructor that can --- set initial properties. --- --- User can specify initialization values like so: --- upb.MessageDef{full_name="MyMessage", extstart=8000, fields={...}} -upb.MessageDef = function(init) - local m = RealMessageDef() - - if init then - for _, f in pairs(init.fields or {}) do - m:add(f) + local pool = upb.generated_pool + local def = pool:lookup_msg(k) or pool:lookup_enum(k) + local v = nil + if def and def:file():name() == t._filedef:name() then + v = def + t[k] = v end - init.fields = nil - - set_named(m, init) - end - - return m -end - --- EnumDef constructor; a wrapper around the real constructor that can --- set initial properties. --- --- User can specify initialization values like so: --- upb.EnumDef{full_name="MyEnum", --- values={ --- {"FOO_VALUE_1", 1}, --- {"FOO_VALUE_2", 2} --- } --- } -upb.EnumDef = function(init) - local e = RealEnumDef() - - if init then - for _, val in pairs(init.values or {}) do - e:add(val[1], val[2]) - end - init.values = nil - - set_named(e, init) - end - - return e -end - --- OneofDef constructor; a wrapper around the real constructor that can --- set initial properties. --- --- User can specify initialization values like so: --- upb.OneofDef{name="foo", fields={...}} -upb.OneofDef = function(init) - local o = RealOneofDef() - - if init then - for _, val in pairs(init.fields or {}) do - o:add(val) - end - init.fields = nil - - set_named(o, init) - end - - return o -end - --- SymbolTable constructor; a wrapper around the real constructor that can --- add an initial set of defs. -upb.SymbolTable = function(defs) - local s = RealSymbolTable() - - if defs then - s:add(defs) + return v end +} - return s +function upb._generated_module(desc_string) + local file = upb.generated_pool:add_file(desc_string) + local module = {_filedef = file} + setmetatable(module, module_metatable) + return module end return upb diff --git a/upb/bindings/lua/upb/pb.c b/upb/bindings/lua/upb/pb.c deleted file mode 100644 index 266bd974c9e..00000000000 --- a/upb/bindings/lua/upb/pb.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -** require("upb.pb") -- A Lua extension for upb.pb. -** -** Exposes all the types defined in upb/pb/{*}.h -** Also defines a few convenience functions on top. -*/ - -#include "upb/bindings/lua/upb.h" -#include "upb/decode.h" -#include "upb/encode.h" - -#define LUPB_PBDECODERMETHOD "lupb.pb.decodermethod" - -static int lupb_pb_decode(lua_State *L) { - size_t len; - const upb_msglayout *layout; - upb_msg *msg = lupb_msg_checkmsg2(L, 1, &layout); - const char *pb = lua_tolstring(L, 2, &len); - - upb_decode(pb, len, msg, layout, lupb_arena_get(L)); - /* TODO(haberman): check for error. */ - - return 0; -} - -static int lupb_pb_encode(lua_State *L) { - const upb_msglayout *layout; - const upb_msg *msg = lupb_msg_checkmsg2(L, 1, &layout); - upb_arena *arena = upb_arena_new(); - size_t size; - char *result; - - result = upb_encode(msg, (const void*)layout, arena, &size); - - /* Free resources before we potentially bail on error. */ - lua_pushlstring(L, result, size); - upb_arena_free(arena); - /* TODO(haberman): check for error. */ - - return 1; -} - -static const struct luaL_Reg toplevel_m[] = { - {"decode", lupb_pb_decode}, - {"encode", lupb_pb_encode}, - {NULL, NULL} -}; - -int luaopen_upb_pb_c(lua_State *L) { - static char module_key; - if (lupb_openlib(L, &module_key, "upb.pb_c", toplevel_m)) { - return 1; - } - - return 1; -} diff --git a/upb/bindings/lua/upb/pb.lua b/upb/bindings/lua/upb/pb.lua deleted file mode 100644 index b865902d3a5..00000000000 --- a/upb/bindings/lua/upb/pb.lua +++ /dev/null @@ -1,3 +0,0 @@ - -require "upb" -return require "upb.pb_c" diff --git a/upb/bindings/lua/upbc.cc b/upb/bindings/lua/upbc.cc new file mode 100644 index 00000000000..e7563bc0bab --- /dev/null +++ b/upb/bindings/lua/upbc.cc @@ -0,0 +1,112 @@ + +#include "absl/strings/string_view.h" +#include "absl/strings/substitute.h" +#include "absl/strings/str_replace.h" +#include "google/protobuf/compiler/code_generator.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/descriptor.pb.h" +#include +#include + +namespace protoc = ::google::protobuf::compiler; +namespace protobuf = ::google::protobuf; + +class LuaGenerator : public protoc::CodeGenerator { + bool Generate(const protobuf::FileDescriptor* file, + const std::string& parameter, protoc::GeneratorContext* context, + std::string* error) const override; + +}; + +static std::string StripExtension(absl::string_view fname) { + size_t lastdot = fname.find_last_of("."); + if (lastdot == std::string::npos) { + return std::string(fname); + } + return std::string(fname.substr(0, lastdot)); +} + +static std::string Filename(const protobuf::FileDescriptor* file) { + return StripExtension(file->name()) + "_pb.lua"; +} + +static std::string ModuleName(const protobuf::FileDescriptor* file) { + std::string ret = StripExtension(file->name()) + "_pb"; + return absl::StrReplaceAll(ret, {{"/", "."}}); +} + +static void PrintHexDigit(char digit, protobuf::io::Printer* printer) { + char text; + if (digit < 10) { + text = '0' + digit; + } else { + text = 'A' + (digit - 10); + } + printer->WriteRaw(&text, 1); +} + +static void PrintString(int max_cols, absl::string_view* str, + protobuf::io::Printer* printer) { + printer->Print("\'"); + while (max_cols > 0 && !str->empty()) { + char ch = (*str)[0]; + if (ch == '\\') { + printer->PrintRaw("\\\\"); + max_cols--; + } else if (ch == '\'') { + printer->PrintRaw("\\'"); + max_cols--; + } else if (isprint(ch)) { + printer->WriteRaw(&ch, 1); + max_cols--; + } else { + unsigned char byte = ch; + printer->PrintRaw("\\x"); + PrintHexDigit(byte >> 4, printer); + PrintHexDigit(byte & 15, printer); + max_cols -= 4; + } + str->remove_prefix(1); + } + printer->Print("\'"); +} + +bool LuaGenerator::Generate( + const protobuf::FileDescriptor* file, + const std::string& parameter, + protoc::GeneratorContext* context, + std::string* error) const { + std::string filename = Filename(file); + protobuf::io::ZeroCopyOutputStream* out = context->Open(filename); + protobuf::io::Printer printer(out, '$'); + + for (int i = 0; i < file->dependency_count(); i++) { + const protobuf::FileDescriptor* dep = file->dependency(i); + printer.Print("require('$name$')\n", "name", ModuleName(dep)); + } + + printer.Print("local upb = require('upb')\n"); + + protobuf::FileDescriptorProto file_proto; + file->CopyTo(&file_proto); + std::string file_data; + file_proto.SerializeToString(&file_data); + + printer.Print("local descriptor = table.concat({\n"); + absl::string_view data(file_data); + while (!data.empty()) { + printer.Print(" "); + PrintString(72, &data, &printer); + printer.Print(",\n"); + } + printer.Print("})\n"); + + printer.Print("return upb._generated_module(descriptor)\n"); + + return true; +} + +int main(int argc, char** argv) { + LuaGenerator generator; + return google::protobuf::compiler::PluginMain(argc, argv, &generator); +} diff --git a/upb/decode.c b/upb/decode.c index 4672b1b84ba..ce5552af40e 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -6,8 +6,8 @@ #include "upb/port_def.inc" /* Maps descriptor type -> upb field type. */ -const uint8_t upb_desctype_to_fieldtype[] = { - UPB_WIRE_TYPE_END_GROUP, /* ENDGROUP */ +static const uint8_t desctype_to_fieldtype[] = { + -1, /* invalid descriptor type */ UPB_TYPE_DOUBLE, /* DOUBLE */ UPB_TYPE_FLOAT, /* FLOAT */ UPB_TYPE_INT64, /* INT64 */ @@ -28,9 +28,31 @@ const uint8_t upb_desctype_to_fieldtype[] = { UPB_TYPE_INT64, /* SINT64 */ }; +/* Maps descriptor type -> upb map size. */ +static const uint8_t desctype_to_mapsize[] = { + -1, /* invalid descriptor type */ + 8, /* DOUBLE */ + 4, /* FLOAT */ + 8, /* INT64 */ + 8, /* UINT64 */ + 4, /* INT32 */ + 8, /* FIXED64 */ + 4, /* FIXED32 */ + 1, /* BOOL */ + UPB_MAPTYPE_STRING, /* STRING */ + sizeof(void*), /* GROUP */ + sizeof(void*), /* MESSAGE */ + UPB_MAPTYPE_STRING, /* BYTES */ + 4, /* UINT32 */ + 4, /* ENUM */ + 4, /* SFIXED32 */ + 8, /* SFIXED64 */ + 4, /* SINT32 */ + 8, /* SINT64 */ +}; + /* Data pertaining to the parse. */ typedef struct { - const char *ptr; /* Current parsing position. */ const char *field_start; /* Start of this field. */ const char *limit; /* End of delimited region or end of buffer. */ upb_arena *arena; @@ -38,60 +60,50 @@ typedef struct { uint32_t end_group; /* Set to field number of END_GROUP tag, if any. */ } upb_decstate; -/* Data passed by value to each parsing function. */ -typedef struct { - char *msg; - const upb_msglayout *layout; - upb_decstate *state; -} upb_decframe; - #define CHK(x) if (!(x)) { return 0; } +#define PTR_AT(msg, ofs, type) (type*)((const char*)msg + ofs) -static bool upb_skip_unknowngroup(upb_decstate *d, int field_number); -static bool upb_decode_message(upb_decstate *d, char *msg, - const upb_msglayout *l); +static const char *upb_decode_message(const char *ptr, const upb_msglayout *l, + upb_msg *msg, upb_decstate *d); -static bool upb_decode_varint(const char **ptr, const char *limit, - uint64_t *val) { +static const char *upb_decode_varint(const char *ptr, const char *limit, + uint64_t *val) { uint8_t byte; int bitpos = 0; - const char *p = *ptr; *val = 0; do { - CHK(bitpos < 70 && p < limit); - byte = *p; + CHK(bitpos < 70 && ptr < limit); + byte = *ptr; *val |= (uint64_t)(byte & 0x7F) << bitpos; - p++; + ptr++; bitpos += 7; } while (byte & 0x80); - *ptr = p; - return true; + return ptr; } -static bool upb_decode_varint32(const char **ptr, const char *limit, - uint32_t *val) { +static const char *upb_decode_varint32(const char *ptr, const char *limit, + uint32_t *val) { uint64_t u64; - CHK(upb_decode_varint(ptr, limit, &u64) && u64 <= UINT32_MAX); + CHK(ptr = upb_decode_varint(ptr, limit, &u64)) + CHK(u64 <= UINT32_MAX); *val = (uint32_t)u64; - return true; + return ptr; } -static bool upb_decode_64bit(const char **ptr, const char *limit, - uint64_t *val) { - CHK(limit - *ptr >= 8); - memcpy(val, *ptr, 8); - *ptr += 8; - return true; +static const char *upb_decode_64bit(const char *ptr, const char *limit, + uint64_t *val) { + CHK(limit - ptr >= 8); + memcpy(val, ptr, 8); + return ptr + 8; } -static bool upb_decode_32bit(const char **ptr, const char *limit, - uint32_t *val) { - CHK(limit - *ptr >= 4); - memcpy(val, *ptr, 4); - *ptr += 4; - return true; +static const char *upb_decode_32bit(const char *ptr, const char *limit, + uint32_t *val) { + CHK(limit - ptr >= 4); + memcpy(val, ptr, 4); + return ptr + 4; } static int32_t upb_zzdecode_32(uint32_t n) { @@ -102,99 +114,72 @@ static int64_t upb_zzdecode_64(uint64_t n) { return (n >> 1) ^ -(int64_t)(n & 1); } -static bool upb_decode_string(const char **ptr, const char *limit, - int *outlen) { +static const char *upb_decode_string(const char *ptr, const char *limit, + int *outlen) { uint32_t len; - CHK(upb_decode_varint32(ptr, limit, &len) && - len < INT32_MAX && - limit - *ptr >= (int32_t)len); + CHK(ptr = upb_decode_varint32(ptr, limit, &len)); + CHK(len < INT32_MAX); + CHK(limit - ptr >= (int32_t)len); *outlen = len; - return true; + return ptr; } static void upb_set32(void *msg, size_t ofs, uint32_t val) { memcpy((char*)msg + ofs, &val, sizeof(val)); } -static bool upb_append_unknown(upb_decstate *d, upb_decframe *frame) { - upb_msg_addunknown(frame->msg, d->field_start, d->ptr - d->field_start, - d->arena); - return true; +static const char *upb_append_unknown(const char *ptr, upb_msg *msg, + upb_decstate *d) { + upb_msg_addunknown(msg, d->field_start, ptr - d->field_start, d->arena); + return ptr; } - -static bool upb_skip_unknownfielddata(upb_decstate *d, uint32_t tag, - uint32_t group_fieldnum) { +static const char *upb_skip_unknownfielddata(const char *ptr, upb_decstate *d, + uint32_t tag) { switch (tag & 7) { case UPB_WIRE_TYPE_VARINT: { uint64_t val; - return upb_decode_varint(&d->ptr, d->limit, &val); + return upb_decode_varint(ptr, d->limit, &val); } case UPB_WIRE_TYPE_32BIT: { uint32_t val; - return upb_decode_32bit(&d->ptr, d->limit, &val); + return upb_decode_32bit(ptr, d->limit, &val); } case UPB_WIRE_TYPE_64BIT: { uint64_t val; - return upb_decode_64bit(&d->ptr, d->limit, &val); + return upb_decode_64bit(ptr, d->limit, &val); } case UPB_WIRE_TYPE_DELIMITED: { int len; - CHK(upb_decode_string(&d->ptr, d->limit, &len)); - d->ptr += len; - return true; + CHK(ptr = upb_decode_string(ptr, d->limit, &len)); + return ptr + len; + } + case UPB_WIRE_TYPE_START_GROUP: { + uint32_t field_number = tag >> 3; + while (ptr < d->limit && d->end_group == 0) { + uint32_t tag = 0; + CHK(ptr = upb_decode_varint32(ptr, d->limit, &tag)); + CHK(ptr = upb_skip_unknownfielddata(ptr, d, tag)); + } + CHK(d->end_group == field_number); + d->end_group = 0; + return ptr; } - case UPB_WIRE_TYPE_START_GROUP: - return upb_skip_unknowngroup(d, tag >> 3); case UPB_WIRE_TYPE_END_GROUP: - return (tag >> 3) == group_fieldnum; + d->end_group = tag >> 3; + return ptr; } return false; } -static bool upb_skip_unknowngroup(upb_decstate *d, int field_number) { - while (d->ptr < d->limit && d->end_group == 0) { - uint32_t tag = 0; - CHK(upb_decode_varint32(&d->ptr, d->limit, &tag)); - CHK(upb_skip_unknownfielddata(d, tag, field_number)); - } - - CHK(d->end_group == field_number); - d->end_group = 0; - return true; -} - -static bool upb_array_grow(upb_array *arr, size_t elements, size_t elem_size, - upb_arena *arena) { - size_t needed = arr->len + elements; - size_t new_size = UPB_MAX(arr->size, 8); - size_t new_bytes; - size_t old_bytes; - void *new_data; - upb_alloc *alloc = upb_arena_alloc(arena); - - while (new_size < needed) { - new_size *= 2; - } - - old_bytes = arr->len * elem_size; - new_bytes = new_size * elem_size; - new_data = upb_realloc(alloc, arr->data, old_bytes, new_bytes); - CHK(new_data); - - arr->data = new_data; - arr->size = new_size; - return true; -} - static void *upb_array_reserve(upb_array *arr, size_t elements, size_t elem_size, upb_arena *arena) { if (arr->size - arr->len < elements) { - CHK(upb_array_grow(arr, elements, elem_size, arena)); + CHK(_upb_array_realloc(arr, arr->len + elements, arena)); } - return (char*)arr->data + (arr->len * elem_size); + return (char*)_upb_array_ptr(arr) + (arr->len * elem_size); } bool upb_array_add(upb_array *arr, size_t elements, size_t elem_size, @@ -208,82 +193,80 @@ bool upb_array_add(upb_array *arr, size_t elements, size_t elem_size, return true; } -static upb_array *upb_getarr(upb_decframe *frame, - const upb_msglayout_field *field) { +static upb_array *upb_getarr(upb_msg *msg, const upb_msglayout_field *field) { UPB_ASSERT(field->label == UPB_LABEL_REPEATED); - return *(upb_array**)&frame->msg[field->offset]; + return *PTR_AT(msg, field->offset, upb_array*); } -static upb_array *upb_getorcreatearr(upb_decframe *frame, - const upb_msglayout_field *field) { - upb_array *arr = upb_getarr(frame, field); +static upb_array *upb_getorcreatearr(upb_msg *msg, + const upb_msglayout_field *field, + upb_decstate *d) { + upb_array *arr = upb_getarr(msg, field); if (!arr) { - arr = upb_array_new(frame->state->arena); + upb_fieldtype_t type = desctype_to_fieldtype[field->descriptortype]; + arr = _upb_array_new(d->arena, type); CHK(arr); - *(upb_array**)&frame->msg[field->offset] = arr; + *PTR_AT(msg, field->offset, upb_array*) = arr; } return arr; } -static upb_msg *upb_getorcreatemsg(upb_decframe *frame, +static upb_msg *upb_getorcreatemsg(upb_msg *msg, const upb_msglayout_field *field, - const upb_msglayout **subm) { - upb_msg **submsg = (void*)(frame->msg + field->offset); - *subm = frame->layout->submsgs[field->submsg_index]; + const upb_msglayout *layout, + upb_decstate *d) { + upb_msg **submsg = PTR_AT(msg, field->offset, upb_msg*); UPB_ASSERT(field->label != UPB_LABEL_REPEATED); if (!*submsg) { - *submsg = upb_msg_new(*subm, frame->state->arena); + *submsg = _upb_msg_new(layout, d->arena); CHK(*submsg); } return *submsg; } -static upb_msg *upb_addmsg(upb_decframe *frame, +static upb_msg *upb_addmsg(upb_msg *msg, const upb_msglayout_field *field, - const upb_msglayout **subm) { + const upb_msglayout *layout, + upb_decstate *d) { upb_msg *submsg; - upb_array *arr = upb_getorcreatearr(frame, field); + upb_array *arr = upb_getorcreatearr(msg, field, d); UPB_ASSERT(field->label == UPB_LABEL_REPEATED); UPB_ASSERT(field->descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE || field->descriptortype == UPB_DESCRIPTOR_TYPE_GROUP); - *subm = frame->layout->submsgs[field->submsg_index]; - submsg = upb_msg_new(*subm, frame->state->arena); + submsg = _upb_msg_new(layout, d->arena); CHK(submsg); - upb_array_add(arr, 1, sizeof(submsg), &submsg, frame->state->arena); + upb_array_add(arr, 1, sizeof(submsg), &submsg, d->arena); return submsg; } -static void upb_sethasbit(upb_decframe *frame, - const upb_msglayout_field *field) { +static void upb_sethasbit(upb_msg *msg, const upb_msglayout_field *field) { int32_t hasbit = field->presence; UPB_ASSERT(field->presence > 0); - frame->msg[hasbit / 8] |= (1 << (hasbit % 8)); + *PTR_AT(msg, hasbit / 8, char) |= (1 << (hasbit % 8)); } -static void upb_setoneofcase(upb_decframe *frame, - const upb_msglayout_field *field) { +static void upb_setoneofcase(upb_msg *msg, const upb_msglayout_field *field) { UPB_ASSERT(field->presence < 0); - upb_set32(frame->msg, ~field->presence, field->number); + upb_set32(msg, ~field->presence, field->number); } -static bool upb_decode_addval(upb_decframe *frame, - const upb_msglayout_field *field, void *val, - size_t size) { - char *field_mem = frame->msg + field->offset; +static bool upb_decode_addval(upb_msg *msg, const upb_msglayout_field *field, + void *val, size_t size, upb_decstate *d) { + char *field_mem = PTR_AT(msg, field->offset, char); upb_array *arr; if (field->label == UPB_LABEL_REPEATED) { - arr = upb_getorcreatearr(frame, field); + arr = upb_getorcreatearr(msg, field, d); CHK(arr); - field_mem = upb_array_reserve(arr, 1, size, frame->state->arena); + field_mem = upb_array_reserve(arr, 1, size, d->arena); CHK(field_mem); } @@ -291,142 +274,147 @@ static bool upb_decode_addval(upb_decframe *frame, return true; } -static void upb_decode_setpresent(upb_decframe *frame, +static void upb_decode_setpresent(upb_msg *msg, const upb_msglayout_field *field) { if (field->label == UPB_LABEL_REPEATED) { - upb_array *arr = upb_getarr(frame, field); + upb_array *arr = upb_getarr(msg, field); UPB_ASSERT(arr->len < arr->size); arr->len++; } else if (field->presence < 0) { - upb_setoneofcase(frame, field); + upb_setoneofcase(msg, field); } else if (field->presence > 0) { - upb_sethasbit(frame, field); + upb_sethasbit(msg, field); } } -static bool upb_decode_msgfield(upb_decstate *d, upb_msg *msg, - const upb_msglayout *layout, int limit) { +static const char *upb_decode_msgfield(const char *ptr, + const upb_msglayout *layout, int limit, + upb_msg *msg, upb_decstate *d) { const char* saved_limit = d->limit; - d->limit = d->ptr + limit; + d->limit = ptr + limit; CHK(--d->depth >= 0); - upb_decode_message(d, msg, layout); + ptr = upb_decode_message(ptr, layout, msg, d); d->depth++; d->limit = saved_limit; CHK(d->end_group == 0); - return true; + return ptr; } -static bool upb_decode_groupfield(upb_decstate *d, upb_msg *msg, - const upb_msglayout *layout, - int field_number) { +static const char *upb_decode_groupfield(const char *ptr, + const upb_msglayout *layout, + int field_number, upb_msg *msg, + upb_decstate *d) { CHK(--d->depth >= 0); - upb_decode_message(d, msg, layout); + ptr = upb_decode_message(ptr, layout, msg, d); d->depth++; CHK(d->end_group == field_number); d->end_group = 0; - return true; + return ptr; } -static bool upb_decode_varintfield(upb_decstate *d, upb_decframe *frame, - const upb_msglayout_field *field) { +static const char *upb_decode_varintfield(const char *ptr, upb_msg *msg, + const upb_msglayout_field *field, + upb_decstate *d) { uint64_t val; - CHK(upb_decode_varint(&d->ptr, d->limit, &val)); + CHK(ptr = upb_decode_varint(ptr, d->limit, &val)); switch (field->descriptortype) { case UPB_DESCRIPTOR_TYPE_INT64: case UPB_DESCRIPTOR_TYPE_UINT64: - CHK(upb_decode_addval(frame, field, &val, sizeof(val))); + CHK(upb_decode_addval(msg, field, &val, sizeof(val), d)); break; case UPB_DESCRIPTOR_TYPE_INT32: case UPB_DESCRIPTOR_TYPE_UINT32: case UPB_DESCRIPTOR_TYPE_ENUM: { uint32_t val32 = (uint32_t)val; - CHK(upb_decode_addval(frame, field, &val32, sizeof(val32))); + CHK(upb_decode_addval(msg, field, &val32, sizeof(val32), d)); break; } case UPB_DESCRIPTOR_TYPE_BOOL: { bool valbool = val != 0; - CHK(upb_decode_addval(frame, field, &valbool, sizeof(valbool))); + CHK(upb_decode_addval(msg, field, &valbool, sizeof(valbool), d)); break; } case UPB_DESCRIPTOR_TYPE_SINT32: { int32_t decoded = upb_zzdecode_32((uint32_t)val); - CHK(upb_decode_addval(frame, field, &decoded, sizeof(decoded))); + CHK(upb_decode_addval(msg, field, &decoded, sizeof(decoded), d)); break; } case UPB_DESCRIPTOR_TYPE_SINT64: { int64_t decoded = upb_zzdecode_64(val); - CHK(upb_decode_addval(frame, field, &decoded, sizeof(decoded))); + CHK(upb_decode_addval(msg, field, &decoded, sizeof(decoded), d)); break; } default: - return upb_append_unknown(d, frame); + return upb_append_unknown(ptr, msg, d); } - upb_decode_setpresent(frame, field); - return true; + upb_decode_setpresent(msg, field); + return ptr; } -static bool upb_decode_64bitfield(upb_decstate *d, upb_decframe *frame, - const upb_msglayout_field *field) { +static const char *upb_decode_64bitfield(const char *ptr, + const upb_msglayout_field *field, + upb_msg *msg, upb_decstate *d) { uint64_t val; - CHK(upb_decode_64bit(&d->ptr, d->limit, &val)); + CHK(ptr = upb_decode_64bit(ptr, d->limit, &val)); switch (field->descriptortype) { case UPB_DESCRIPTOR_TYPE_DOUBLE: case UPB_DESCRIPTOR_TYPE_FIXED64: case UPB_DESCRIPTOR_TYPE_SFIXED64: - CHK(upb_decode_addval(frame, field, &val, sizeof(val))); + CHK(upb_decode_addval(msg, field, &val, sizeof(val), d)); break; default: - return upb_append_unknown(d, frame); + return upb_append_unknown(ptr, msg, d); } - upb_decode_setpresent(frame, field); - return true; + upb_decode_setpresent(msg, field); + return ptr; } -static bool upb_decode_32bitfield(upb_decstate *d, upb_decframe *frame, - const upb_msglayout_field *field) { +static const char *upb_decode_32bitfield(const char *ptr, + const upb_msglayout_field *field, + upb_msg *msg, upb_decstate *d) { uint32_t val; - CHK(upb_decode_32bit(&d->ptr, d->limit, &val)); + CHK(ptr = upb_decode_32bit(ptr, d->limit, &val)); switch (field->descriptortype) { case UPB_DESCRIPTOR_TYPE_FLOAT: case UPB_DESCRIPTOR_TYPE_FIXED32: case UPB_DESCRIPTOR_TYPE_SFIXED32: - CHK(upb_decode_addval(frame, field, &val, sizeof(val))); + CHK(upb_decode_addval(msg, field, &val, sizeof(val), d)); break; default: - return upb_append_unknown(d, frame); + return upb_append_unknown(ptr, msg, d); } - upb_decode_setpresent(frame, field); - return true; + upb_decode_setpresent(msg, field); + return ptr; } -static bool upb_decode_fixedpacked(upb_decstate *d, upb_array *arr, - uint32_t len, int elem_size) { +static const char *upb_decode_fixedpacked(const char *ptr, upb_decstate *d, + upb_array *arr, uint32_t len, + int elem_size) { size_t elements = len / elem_size; CHK((size_t)(elements * elem_size) == len); - CHK(upb_array_add(arr, elements, elem_size, d->ptr, d->arena)); - d->ptr += len; - - return true; + CHK(upb_array_add(arr, elements, elem_size, ptr, d->arena)); + return ptr + len; } -static upb_strview upb_decode_strfield(upb_decstate *d, uint32_t len) { - upb_strview ret; - ret.data = d->ptr; - ret.size = len; - d->ptr += len; - return ret; +static const char *upb_decode_strfield(const char *ptr, upb_decstate *d, + uint32_t len, upb_strview *str) { + str->data = ptr; + str->size = len; + return ptr + len; } -static bool upb_decode_toarray(upb_decstate *d, upb_decframe *frame, - const upb_msglayout_field *field, int len) { - upb_array *arr = upb_getorcreatearr(frame, field); +static const char *upb_decode_toarray(const char *ptr, + const upb_msglayout *layout, + const upb_msglayout_field *field, int len, + upb_msg *msg, upb_decstate *d) { + upb_array *arr = upb_getorcreatearr(msg, field, d); CHK(arr); #define VARINT_CASE(ctype, decode) \ @@ -434,33 +422,33 @@ static bool upb_decode_toarray(upb_decstate *d, upb_decframe *frame, #define VARINT_CASE_EX(ctype, decode, dtype) \ { \ - const char *ptr = d->ptr; \ const char *limit = ptr + len; \ while (ptr < limit) { \ uint64_t val; \ ctype decoded; \ - CHK(upb_decode_varint(&ptr, limit, &val)); \ + CHK(ptr = upb_decode_varint(ptr, limit, &val)); \ decoded = (decode)((dtype)val); \ CHK(upb_array_add(arr, 1, sizeof(decoded), &decoded, d->arena)); \ } \ - d->ptr = ptr; \ - return true; \ + return ptr; \ } switch (field->descriptortype) { case UPB_DESCRIPTOR_TYPE_STRING: case UPB_DESCRIPTOR_TYPE_BYTES: { - upb_strview str = upb_decode_strfield(d, len); - return upb_array_add(arr, 1, sizeof(str), &str, d->arena); + upb_strview str; + ptr = upb_decode_strfield(ptr, d, len, &str); + CHK(upb_array_add(arr, 1, sizeof(str), &str, d->arena)); + return ptr; } case UPB_DESCRIPTOR_TYPE_FLOAT: case UPB_DESCRIPTOR_TYPE_FIXED32: case UPB_DESCRIPTOR_TYPE_SFIXED32: - return upb_decode_fixedpacked(d, arr, len, sizeof(int32_t)); + return upb_decode_fixedpacked(ptr, d, arr, len, sizeof(int32_t)); case UPB_DESCRIPTOR_TYPE_DOUBLE: case UPB_DESCRIPTOR_TYPE_FIXED64: case UPB_DESCRIPTOR_TYPE_SFIXED64: - return upb_decode_fixedpacked(d, arr, len, sizeof(int64_t)); + return upb_decode_fixedpacked(ptr, d, arr, len, sizeof(int64_t)); case UPB_DESCRIPTOR_TYPE_INT32: case UPB_DESCRIPTOR_TYPE_UINT32: case UPB_DESCRIPTOR_TYPE_ENUM: @@ -475,48 +463,83 @@ static bool upb_decode_toarray(upb_decstate *d, upb_decframe *frame, case UPB_DESCRIPTOR_TYPE_SINT64: VARINT_CASE_EX(int64_t, upb_zzdecode_64, uint64_t); case UPB_DESCRIPTOR_TYPE_MESSAGE: { - const upb_msglayout *subm; - upb_msg *submsg = upb_addmsg(frame, field, &subm); + const upb_msglayout *subl = layout->submsgs[field->submsg_index]; + upb_msg *submsg = upb_addmsg(msg, field, subl, d); CHK(submsg); - return upb_decode_msgfield(d, submsg, subm, len); + return upb_decode_msgfield(ptr, subl, len, submsg, d); } case UPB_DESCRIPTOR_TYPE_GROUP: - return upb_append_unknown(d, frame); + return upb_append_unknown(ptr, msg, d); } #undef VARINT_CASE UPB_UNREACHABLE(); } -static bool upb_decode_delimitedfield(upb_decstate *d, upb_decframe *frame, - const upb_msglayout_field *field) { +static const char *upb_decode_mapfield(const char *ptr, + const upb_msglayout *layout, + const upb_msglayout_field *field, + int len, upb_msg *msg, upb_decstate *d) { + upb_map *map = *PTR_AT(msg, field->offset, upb_map*); + const upb_msglayout *entry = layout->submsgs[field->submsg_index]; + upb_map_entry ent; + + if (!map) { + /* Lazily create map. */ + const upb_msglayout_field *key_field = &entry->fields[0]; + const upb_msglayout_field *val_field = &entry->fields[1]; + char key_size = desctype_to_mapsize[key_field->descriptortype]; + char val_size = desctype_to_mapsize[val_field->descriptortype]; + UPB_ASSERT(key_field->number == 1); + UPB_ASSERT(val_field->number == 2); + UPB_ASSERT(key_field->offset == 0); + UPB_ASSERT(val_field->offset == sizeof(upb_strview)); + map = _upb_map_new(d->arena, key_size, val_size); + *PTR_AT(msg, field->offset, upb_map*) = map; + } + + /* Parse map entry. */ + memset(&ent, 0, sizeof(ent)); + CHK(ptr = upb_decode_msgfield(ptr, entry, len, &ent.k, d)); + + /* Insert into map. */ + _upb_map_set(map, &ent.k, map->key_size, &ent.v, map->val_size, d->arena); + return ptr; +} + +static const char *upb_decode_delimitedfield(const char *ptr, + const upb_msglayout *layout, + const upb_msglayout_field *field, + upb_msg *msg, upb_decstate *d) { int len; - CHK(upb_decode_string(&d->ptr, d->limit, &len)); + CHK(ptr = upb_decode_string(ptr, d->limit, &len)); if (field->label == UPB_LABEL_REPEATED) { - return upb_decode_toarray(d, frame, field, len); + return upb_decode_toarray(ptr, layout, field, len, msg, d); + } else if (field->label == UPB_LABEL_MAP) { + return upb_decode_mapfield(ptr, layout, field, len, msg, d); } else { switch (field->descriptortype) { case UPB_DESCRIPTOR_TYPE_STRING: case UPB_DESCRIPTOR_TYPE_BYTES: { - upb_strview str = upb_decode_strfield(d, len); - CHK(upb_decode_addval(frame, field, &str, sizeof(str))); + upb_strview str; + ptr = upb_decode_strfield(ptr, d, len, &str); + CHK(upb_decode_addval(msg, field, &str, sizeof(str), d)); break; } case UPB_DESCRIPTOR_TYPE_MESSAGE: { - const upb_msglayout *subm; - upb_msg *submsg = upb_getorcreatemsg(frame, field, &subm); + const upb_msglayout *subl = layout->submsgs[field->submsg_index]; + upb_msg *submsg = upb_getorcreatemsg(msg, field, subl, d); CHK(submsg); - CHK(upb_decode_msgfield(d, submsg, subm, len)); + CHK(ptr = upb_decode_msgfield(ptr, subl, len, submsg, d)); break; } default: /* TODO(haberman): should we accept the last element of a packed? */ - d->ptr += len; - return upb_append_unknown(d, frame); + return upb_append_unknown(ptr + len, msg, d); } - upb_decode_setpresent(frame, field); - return true; + upb_decode_setpresent(msg, field); + return ptr; } } @@ -533,77 +556,75 @@ static const upb_msglayout_field *upb_find_field(const upb_msglayout *l, return NULL; /* Unknown field. */ } -static bool upb_decode_field(upb_decstate *d, upb_decframe *frame) { +static const char *upb_decode_field(const char *ptr, + const upb_msglayout *layout, upb_msg *msg, + upb_decstate *d) { uint32_t tag; const upb_msglayout_field *field; int field_number; - d->field_start = d->ptr; - CHK(upb_decode_varint32(&d->ptr, d->limit, &tag)); + d->field_start = ptr; + CHK(ptr = upb_decode_varint32(ptr, d->limit, &tag)); field_number = tag >> 3; - field = upb_find_field(frame->layout, field_number); + field = upb_find_field(layout, field_number); if (field) { switch (tag & 7) { case UPB_WIRE_TYPE_VARINT: - return upb_decode_varintfield(d, frame, field); + return upb_decode_varintfield(ptr, msg, field, d); case UPB_WIRE_TYPE_32BIT: - return upb_decode_32bitfield(d, frame, field); + return upb_decode_32bitfield(ptr, field, msg, d); case UPB_WIRE_TYPE_64BIT: - return upb_decode_64bitfield(d, frame, field); + return upb_decode_64bitfield(ptr, field, msg, d); case UPB_WIRE_TYPE_DELIMITED: - return upb_decode_delimitedfield(d, frame, field); + return upb_decode_delimitedfield(ptr, layout, field, msg, d); case UPB_WIRE_TYPE_START_GROUP: { - const upb_msglayout *layout; + const upb_msglayout *subl = layout->submsgs[field->submsg_index]; upb_msg *group; if (field->label == UPB_LABEL_REPEATED) { - group = upb_addmsg(frame, field, &layout); + group = upb_addmsg(msg, field, subl, d); } else { - group = upb_getorcreatemsg(frame, field, &layout); + group = upb_getorcreatemsg(msg, field, subl, d); } - return upb_decode_groupfield(d, group, layout, field_number); + return upb_decode_groupfield(ptr, subl, field_number, group, d); } case UPB_WIRE_TYPE_END_GROUP: d->end_group = field_number; - return true; + return ptr; default: CHK(false); } } else { CHK(field_number != 0); - CHK(upb_skip_unknownfielddata(d, tag, -1)); - CHK(upb_append_unknown(d, frame)); - return true; + CHK(ptr = upb_skip_unknownfielddata(ptr, d, tag)); + CHK(ptr = upb_append_unknown(ptr, msg, d)); + return ptr; } UPB_UNREACHABLE(); } -static bool upb_decode_message(upb_decstate *d, char *msg, const upb_msglayout *l) { - upb_decframe frame; - frame.msg = msg; - frame.layout = l; - frame.state = d; - - while (d->ptr < d->limit) { - CHK(upb_decode_field(d, &frame)); +static const char *upb_decode_message(const char *ptr, const upb_msglayout *l, + upb_msg *msg, upb_decstate *d) { + while (ptr < d->limit) { + CHK(ptr = upb_decode_field(ptr, l, msg, d)); } - return true; + return ptr; } bool upb_decode(const char *buf, size_t size, void *msg, const upb_msglayout *l, upb_arena *arena) { upb_decstate state; - state.ptr = buf; state.limit = buf + size; state.arena = arena; state.depth = 64; state.end_group = 0; - CHK(upb_decode_message(&state, msg, l)); + CHK(upb_decode_message(buf, l, msg, &state)); return state.end_group == 0; } #undef CHK +#undef PTR_AT diff --git a/upb/def.c b/upb/def.c index 98aead6b674..f9de1a9f751 100644 --- a/upb/def.c +++ b/upb/def.c @@ -42,7 +42,8 @@ struct upb_fielddef { const google_protobuf_FieldDescriptorProto *unresolved; } sub; uint32_t number_; - uint32_t index_; + uint16_t index_; + uint16_t layout_index; uint32_t selector_base; /* Used to index into a upb::Handlers table. */ bool is_extension_; bool lazy_; @@ -52,6 +53,7 @@ struct upb_fielddef { }; struct upb_msgdef { + const upb_msglayout *layout; const upb_filedef *file; const char *full_name; uint32_t selector_count; @@ -379,7 +381,7 @@ const char *upb_enumdef_iton(const upb_enumdef *def, int32_t num) { } const char *upb_enum_iter_name(upb_enum_iter *iter) { - return upb_strtable_iter_key(iter); + return upb_strtable_iter_key(iter).data; } int32_t upb_enum_iter_number(upb_enum_iter *iter) { @@ -575,6 +577,10 @@ const upb_enumdef *upb_fielddef_enumsubdef(const upb_fielddef *f) { return f->sub.enumdef; } +const upb_msglayout_field *upb_fielddef_layout(const upb_fielddef *f) { + return &f->msgdef->layout->fields[f->layout_index]; +} + bool upb_fielddef_issubmsg(const upb_fielddef *f) { return upb_fielddef_type(f) == UPB_TYPE_MESSAGE; } @@ -604,6 +610,7 @@ bool upb_fielddef_hassubdef(const upb_fielddef *f) { bool upb_fielddef_haspresence(const upb_fielddef *f) { if (upb_fielddef_isseq(f)) return false; if (upb_fielddef_issubmsg(f)) return true; + if (upb_fielddef_containingoneof(f)) return true; return f->file->syntax == UPB_SYNTAX_PROTO2; } @@ -697,6 +704,15 @@ int upb_msgdef_numoneofs(const upb_msgdef *m) { return upb_strtable_count(&m->ntof) - upb_inttable_count(&m->itof); } +const upb_msglayout *upb_msgdef_layout(const upb_msgdef *m) { + return m->layout; +} + +const upb_fielddef *_upb_msgdef_field(const upb_msgdef *m, int i) { + if (i >= m->field_count) return NULL; + return &m->fields[i]; +} + bool upb_msgdef_mapentry(const upb_msgdef *m) { return m->map_entry; } @@ -819,6 +835,194 @@ void upb_oneof_iter_setdone(upb_oneof_iter *iter) { upb_inttable_iter_setdone(iter); } +/* Dynamic Layout Generation. *************************************************/ + +static bool is_power_of_two(size_t val) { + return (val & (val - 1)) == 0; +} + +/* Align up to the given power of 2. */ +static size_t align_up(size_t val, size_t align) { + UPB_ASSERT(is_power_of_two(align)); + return (val + align - 1) & ~(align - 1); +} + +static size_t div_round_up(size_t n, size_t d) { + return (n + d - 1) / d; +} + +static size_t upb_msgval_sizeof(upb_fieldtype_t type) { + switch (type) { + case UPB_TYPE_DOUBLE: + case UPB_TYPE_INT64: + case UPB_TYPE_UINT64: + return 8; + case UPB_TYPE_ENUM: + case UPB_TYPE_INT32: + case UPB_TYPE_UINT32: + case UPB_TYPE_FLOAT: + return 4; + case UPB_TYPE_BOOL: + return 1; + case UPB_TYPE_MESSAGE: + return sizeof(void*); + case UPB_TYPE_BYTES: + case UPB_TYPE_STRING: + return sizeof(upb_strview); + } + UPB_UNREACHABLE(); +} + +static uint8_t upb_msg_fielddefsize(const upb_fielddef *f) { + if (upb_msgdef_mapentry(upb_fielddef_containingtype(f))) { + upb_map_entry ent; + UPB_ASSERT(sizeof(ent.k) == sizeof(ent.v)); + return sizeof(ent.k); + } else if (upb_fielddef_isseq(f)) { + return sizeof(void*); + } else { + return upb_msgval_sizeof(upb_fielddef_type(f)); + } +} + +static size_t upb_msglayout_place(upb_msglayout *l, size_t size) { + size_t ret; + + l->size = align_up(l->size, size); + ret = l->size; + l->size += size; + return ret; +} + +/* This function is the dynamic equivalent of message_layout.{cc,h} in upbc. + * It computes a dynamic layout for all of the fields in |m|. */ +static bool make_layout(const upb_symtab *symtab, const upb_msgdef *m) { + upb_msglayout *l = (upb_msglayout*)m->layout; + upb_msg_field_iter it; + upb_msg_oneof_iter oit; + size_t hasbit; + size_t submsg_count = m->submsg_field_count; + const upb_msglayout **submsgs; + upb_msglayout_field *fields; + upb_alloc *alloc = upb_arena_alloc(symtab->arena); + + memset(l, 0, sizeof(*l)); + + fields = upb_malloc(alloc, upb_msgdef_numfields(m) * sizeof(*fields)); + submsgs = upb_malloc(alloc, submsg_count * sizeof(*submsgs)); + + if ((!fields && upb_msgdef_numfields(m)) || + (!submsgs && submsg_count)) { + /* OOM. */ + return false; + } + + l->field_count = upb_msgdef_numfields(m); + l->fields = fields; + l->submsgs = submsgs; + + /* Allocate data offsets in three stages: + * + * 1. hasbits. + * 2. regular fields. + * 3. oneof fields. + * + * OPT: There is a lot of room for optimization here to minimize the size. + */ + + /* Allocate hasbits and set basic field attributes. */ + submsg_count = 0; + for (upb_msg_field_begin(&it, m), hasbit = 0; + !upb_msg_field_done(&it); + upb_msg_field_next(&it)) { + upb_fielddef* f = upb_msg_iter_field(&it); + upb_msglayout_field *field = &fields[upb_fielddef_index(f)]; + + field->number = upb_fielddef_number(f); + field->descriptortype = upb_fielddef_descriptortype(f); + field->label = upb_fielddef_label(f); + + if (upb_fielddef_ismap(f)) { + field->label = UPB_LABEL_MAP; + } + + /* TODO: we probably should sort the fields by field number to match the + * output of upbc, and to improve search speed for the table parser. */ + f->layout_index = f->index_; + + if (upb_fielddef_issubmsg(f)) { + const upb_msgdef *subm = upb_fielddef_msgsubdef(f); + field->submsg_index = submsg_count++; + submsgs[field->submsg_index] = subm->layout; + } + + if (upb_fielddef_haspresence(f) && !upb_fielddef_containingoneof(f)) { + /* We don't use hasbit 0, so that 0 can indicate "no presence" in the + * table. This wastes one hasbit, but we don't worry about it for now. */ + field->presence = ++hasbit; + } else { + field->presence = 0; + } + } + + /* Account for space used by hasbits. */ + l->size = div_round_up(hasbit, 8); + + /* Allocate non-oneof fields. */ + for (upb_msg_field_begin(&it, m); !upb_msg_field_done(&it); + upb_msg_field_next(&it)) { + const upb_fielddef* f = upb_msg_iter_field(&it); + size_t field_size = upb_msg_fielddefsize(f); + size_t index = upb_fielddef_index(f); + + if (upb_fielddef_containingoneof(f)) { + /* Oneofs are handled separately below. */ + continue; + } + + fields[index].offset = upb_msglayout_place(l, field_size); + } + + /* Allocate oneof fields. Each oneof field consists of a uint32 for the case + * and space for the actual data. */ + for (upb_msg_oneof_begin(&oit, m); !upb_msg_oneof_done(&oit); + upb_msg_oneof_next(&oit)) { + const upb_oneofdef* o = upb_msg_iter_oneof(&oit); + upb_oneof_iter fit; + + size_t case_size = sizeof(uint32_t); /* Could potentially optimize this. */ + size_t field_size = 0; + uint32_t case_offset; + uint32_t data_offset; + + /* Calculate field size: the max of all field sizes. */ + for (upb_oneof_begin(&fit, o); + !upb_oneof_done(&fit); + upb_oneof_next(&fit)) { + const upb_fielddef* f = upb_oneof_iter_field(&fit); + field_size = UPB_MAX(field_size, upb_msg_fielddefsize(f)); + } + + /* Align and allocate case offset. */ + case_offset = upb_msglayout_place(l, case_size); + data_offset = upb_msglayout_place(l, field_size); + + for (upb_oneof_begin(&fit, o); + !upb_oneof_done(&fit); + upb_oneof_next(&fit)) { + const upb_fielddef* f = upb_oneof_iter_field(&fit); + fields[upb_fielddef_index(f)].offset = data_offset; + fields[upb_fielddef_index(f)].presence = ~case_offset; + } + } + + /* Size of the entire structure should be a multiple of its greatest + * alignment. TODO: track overall alignment for real? */ + l->size = align_up(l->size, 8); + + return true; +} + /* Code to build defs from descriptor protos. *********************************/ /* There is a question of how much validation to do here. It will be difficult @@ -831,11 +1035,12 @@ void upb_oneof_iter_setdone(upb_oneof_iter *iter) { typedef struct { const upb_symtab *symtab; - upb_filedef *file; /* File we are building. */ - upb_alloc *alloc; /* Allocate defs here. */ - upb_alloc *tmp; /* Alloc for addtab and any other tmp data. */ - upb_strtable *addtab; /* full_name -> packed def ptr for new defs. */ - upb_status *status; /* Record errors here. */ + upb_filedef *file; /* File we are building. */ + upb_alloc *alloc; /* Allocate defs here. */ + upb_alloc *tmp; /* Alloc for addtab and any other tmp data. */ + upb_strtable *addtab; /* full_name -> packed def ptr for new defs */ + const upb_msglayout **layouts; /* NULL if we should build layouts. */ + upb_status *status; /* Record errors here. */ } symtab_addctx; static char* strviewdup(const symtab_addctx *ctx, upb_strview view) { @@ -990,7 +1195,7 @@ static bool parse_default(const symtab_addctx *ctx, const char *str, size_t len, } case UPB_TYPE_INT64: { /* XXX: Need to write our own strtoll, since it's not available in c89. */ - long long val = strtol(str, &end, 0); + int64_t val = strtol(str, &end, 0); CHK(val <= INT64_MAX && val >= INT64_MIN && errno != ERANGE && !*end); f->defaultval.sint = val; break; @@ -1003,7 +1208,7 @@ static bool parse_default(const symtab_addctx *ctx, const char *str, size_t len, } case UPB_TYPE_UINT64: { /* XXX: Need to write our own strtoull, since it's not available in c89. */ - unsigned long long val = strtoul(str, &end, 0); + uint64_t val = strtoul(str, &end, 0); CHK(val <= UINT64_MAX && errno != ERANGE && !*end); f->defaultval.uint = val; break; @@ -1121,6 +1326,21 @@ static bool create_fielddef( field_number); return false; } + + if (ctx->layouts) { + const upb_msglayout_field *fields = m->layout->fields; + int count = m->layout->field_count; + bool found = false; + int i; + for (i = 0; i < count; i++) { + if (fields[i].number == field_number) { + f->layout_index = i; + found = true; + break; + } + } + UPB_ASSERT(found); + } } else { /* extension field. */ f = (upb_fielddef*)&ctx->file->exts[ctx->file->ext_count]; @@ -1257,7 +1477,7 @@ static bool create_enumdef( return true; } -static bool create_msgdef(const symtab_addctx *ctx, const char *prefix, +static bool create_msgdef(symtab_addctx *ctx, const char *prefix, const google_protobuf_DescriptorProto *msg_proto) { upb_msgdef *m; const google_protobuf_MessageOptions *options; @@ -1287,6 +1507,14 @@ static bool create_msgdef(const symtab_addctx *ctx, const char *prefix, m->map_entry = google_protobuf_MessageOptions_map_entry(options); } + if (ctx->layouts) { + m->layout = *ctx->layouts; + ctx->layouts++; + } else { + /* Allocate now (to allow cross-linking), populate later. */ + m->layout = upb_malloc(ctx->alloc, sizeof(*m->layout)); + } + oneofs = google_protobuf_DescriptorProto_oneof_decl(msg_proto, &n); m->oneof_count = 0; m->oneofs = upb_malloc(ctx->alloc, sizeof(*m->oneofs) * n); @@ -1433,7 +1661,7 @@ static bool resolve_fielddef(const symtab_addctx *ctx, const char *prefix, } static bool build_filedef( - const symtab_addctx *ctx, upb_filedef *file, + symtab_addctx *ctx, upb_filedef *file, const google_protobuf_FileDescriptorProto *file_proto) { upb_alloc *alloc = ctx->alloc; const google_protobuf_FileOptions *file_options_proto; @@ -1547,7 +1775,7 @@ static bool build_filedef( CHK(create_fielddef(ctx, file->package, NULL, exts[i])); } - /* Now that all names are in the table, resolve references. */ + /* Now that all names are in the table, build layouts and resolve refs. */ for (i = 0; i < file->ext_count; i++) { CHK(resolve_fielddef(ctx, file->package, (upb_fielddef*)&file->exts[i])); } @@ -1560,6 +1788,13 @@ static bool build_filedef( } } + if (!ctx->layouts) { + for (i = 0; i < file->msg_count; i++) { + const upb_msgdef *m = &file->msgs[i]; + make_layout(ctx->symtab, m); + } + } + return true; } @@ -1574,10 +1809,9 @@ static bool upb_symtab_addtotabs(upb_symtab *s, symtab_addctx *ctx, upb_strtable_begin(&iter, ctx->addtab); for (; !upb_strtable_done(&iter); upb_strtable_next(&iter)) { - const char *key = upb_strtable_iter_key(&iter); - size_t keylen = upb_strtable_iter_keylength(&iter); + upb_strview key = upb_strtable_iter_key(&iter); upb_value value = upb_strtable_iter_value(&iter); - CHK_OOM(upb_strtable_insert3(&s->syms, key, keylen, value, alloc)); + CHK_OOM(upb_strtable_insert3(&s->syms, key.data, key.size, value, alloc)); } return true; @@ -1679,9 +1913,13 @@ const upb_filedef *upb_symtab_lookupfile(const upb_symtab *s, const char *name) : NULL; } -const upb_filedef *upb_symtab_addfile( +int upb_symtab_filecount(const upb_symtab *s) { + return upb_strtable_count(&s->files); +} + +static const upb_filedef *_upb_symtab_addfile( upb_symtab *s, const google_protobuf_FileDescriptorProto *file_proto, - upb_status *status) { + const upb_msglayout **layouts, upb_status *status) { upb_arena *tmparena = upb_arena_new(); upb_strtable addtab; upb_alloc *alloc = upb_arena_alloc(s->arena); @@ -1694,6 +1932,7 @@ const upb_filedef *upb_symtab_addfile( ctx.alloc = alloc; ctx.tmp = upb_arena_alloc(tmparena); ctx.addtab = &addtab; + ctx.layouts = layouts; ctx.status = status; ok = file && @@ -1705,6 +1944,12 @@ const upb_filedef *upb_symtab_addfile( return ok ? file : NULL; } +const upb_filedef *upb_symtab_addfile( + upb_symtab *s, const google_protobuf_FileDescriptorProto *file_proto, + upb_status *status) { + return _upb_symtab_addfile(s, file_proto, NULL, status); +} + /* Include here since we want most of this file to be stdio-free. */ #include @@ -1740,7 +1985,7 @@ bool _upb_symtab_loaddefinit(upb_symtab *s, const upb_def_init *init) { goto err; } - if (!upb_symtab_addfile(s, file, &status)) goto err; + if (!_upb_symtab_addfile(s, file, init->layouts, &status)) goto err; upb_arena_free(arena); return true; diff --git a/upb/def.h b/upb/def.h index 9be285794ee..5bc361e28bc 100644 --- a/upb/def.h +++ b/upb/def.h @@ -123,6 +123,7 @@ bool upb_fielddef_hassubdef(const upb_fielddef *f); bool upb_fielddef_haspresence(const upb_fielddef *f); const upb_msgdef *upb_fielddef_msgsubdef(const upb_fielddef *f); const upb_enumdef *upb_fielddef_enumsubdef(const upb_fielddef *f); +const upb_msglayout_field *upb_fielddef_layout(const upb_fielddef *f); /* Internal only. */ uint32_t upb_fielddef_selectorbase(const upb_fielddef *f); @@ -425,6 +426,8 @@ const upb_oneofdef *upb_msgdef_ntoo(const upb_msgdef *m, const char *name, size_t len); int upb_msgdef_numfields(const upb_msgdef *m); int upb_msgdef_numoneofs(const upb_msgdef *m); +const upb_msglayout *upb_msgdef_layout(const upb_msgdef *m); +const upb_fielddef *_upb_msgdef_field(const upb_msgdef *m, int i); UPB_INLINE const upb_oneofdef *upb_msgdef_ntooz(const upb_msgdef *m, const char *name) { @@ -851,9 +854,10 @@ const upb_filedef *upb_symtab_addfile( /* For generated code only: loads a generated descriptor. */ typedef struct upb_def_init { - struct upb_def_init **deps; + struct upb_def_init **deps; /* Dependencies of this file. */ + const upb_msglayout **layouts; /* Pre-order layouts of all messages. */ const char *filename; - upb_strview descriptor; + upb_strview descriptor; /* Serialized descriptor. */ } upb_def_init; bool _upb_symtab_loaddefinit(upb_symtab *s, const upb_def_init *init); diff --git a/upb/encode.c b/upb/encode.c index 43d24cdbfcc..d9adbff596f 100644 --- a/upb/encode.c +++ b/upb/encode.c @@ -70,6 +70,7 @@ static bool upb_encode_reserve(upb_encstate *e, size_t bytes) { /* Writes the given bytes to the buffer, handling reserve/advance. */ static bool upb_put_bytes(upb_encstate *e, const void *data, size_t len) { + if (len == 0) return true; CHK(upb_encode_reserve(e, len)); memcpy(e->ptr, data, len); return true; @@ -130,12 +131,89 @@ static bool upb_put_tag(upb_encstate *e, int field_number, int wire_type) { static bool upb_put_fixedarray(upb_encstate *e, const upb_array *arr, size_t size) { size_t bytes = arr->len * size; - return upb_put_bytes(e, arr->data, bytes) && upb_put_varint(e, bytes); + const void* data = _upb_array_constptr(arr); + return upb_put_bytes(e, data, bytes) && upb_put_varint(e, bytes); } bool upb_encode_message(upb_encstate *e, const char *msg, const upb_msglayout *m, size_t *size); +static bool upb_encode_scalarfield(upb_encstate *e, const void *_field_mem, + const upb_msglayout *m, + const upb_msglayout_field *f, + bool skip_zero_value) { + const char *field_mem = _field_mem; +#define CASE(ctype, type, wire_type, encodeval) do { \ + ctype val = *(ctype*)field_mem; \ + if (skip_zero_value && val == 0) { \ + return true; \ + } \ + return upb_put_ ## type(e, encodeval) && \ + upb_put_tag(e, f->number, wire_type); \ +} while(0) + + switch (f->descriptortype) { + case UPB_DESCRIPTOR_TYPE_DOUBLE: + CASE(double, double, UPB_WIRE_TYPE_64BIT, val); + case UPB_DESCRIPTOR_TYPE_FLOAT: + CASE(float, float, UPB_WIRE_TYPE_32BIT, val); + case UPB_DESCRIPTOR_TYPE_INT64: + case UPB_DESCRIPTOR_TYPE_UINT64: + CASE(uint64_t, varint, UPB_WIRE_TYPE_VARINT, val); + case UPB_DESCRIPTOR_TYPE_UINT32: + CASE(uint32_t, varint, UPB_WIRE_TYPE_VARINT, val); + case UPB_DESCRIPTOR_TYPE_INT32: + case UPB_DESCRIPTOR_TYPE_ENUM: + CASE(int32_t, varint, UPB_WIRE_TYPE_VARINT, (int64_t)val); + case UPB_DESCRIPTOR_TYPE_SFIXED64: + case UPB_DESCRIPTOR_TYPE_FIXED64: + CASE(uint64_t, fixed64, UPB_WIRE_TYPE_64BIT, val); + case UPB_DESCRIPTOR_TYPE_FIXED32: + case UPB_DESCRIPTOR_TYPE_SFIXED32: + CASE(uint32_t, fixed32, UPB_WIRE_TYPE_32BIT, val); + case UPB_DESCRIPTOR_TYPE_BOOL: + CASE(bool, varint, UPB_WIRE_TYPE_VARINT, val); + case UPB_DESCRIPTOR_TYPE_SINT32: + CASE(int32_t, varint, UPB_WIRE_TYPE_VARINT, upb_zzencode_32(val)); + case UPB_DESCRIPTOR_TYPE_SINT64: + CASE(int64_t, varint, UPB_WIRE_TYPE_VARINT, upb_zzencode_64(val)); + case UPB_DESCRIPTOR_TYPE_STRING: + case UPB_DESCRIPTOR_TYPE_BYTES: { + upb_strview view = *(upb_strview*)field_mem; + if (skip_zero_value && view.size == 0) { + return true; + } + return upb_put_bytes(e, view.data, view.size) && + upb_put_varint(e, view.size) && + upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED); + } + case UPB_DESCRIPTOR_TYPE_GROUP: { + size_t size; + void *submsg = *(void **)field_mem; + const upb_msglayout *subm = m->submsgs[f->submsg_index]; + if (submsg == NULL) { + return true; + } + return upb_put_tag(e, f->number, UPB_WIRE_TYPE_END_GROUP) && + upb_encode_message(e, submsg, subm, &size) && + upb_put_tag(e, f->number, UPB_WIRE_TYPE_START_GROUP); + } + case UPB_DESCRIPTOR_TYPE_MESSAGE: { + size_t size; + void *submsg = *(void **)field_mem; + const upb_msglayout *subm = m->submsgs[f->submsg_index]; + if (submsg == NULL) { + return true; + } + return upb_encode_message(e, submsg, subm, &size) && + upb_put_varint(e, size) && + upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED); + } + } +#undef CASE + UPB_UNREACHABLE(); +} + static bool upb_encode_array(upb_encstate *e, const char *field_mem, const upb_msglayout *m, const upb_msglayout_field *f) { @@ -146,8 +224,8 @@ static bool upb_encode_array(upb_encstate *e, const char *field_mem, } #define VARINT_CASE(ctype, encode) { \ - ctype *start = arr->data; \ - ctype *ptr = start + arr->len; \ + const ctype *start = _upb_array_constptr(arr); \ + const ctype *ptr = start + arr->len; \ size_t pre_len = e->limit - e->ptr; \ do { \ ptr--; \ @@ -189,8 +267,8 @@ do { ; } while(0) VARINT_CASE(int64_t, upb_zzencode_64(*ptr)); case UPB_DESCRIPTOR_TYPE_STRING: case UPB_DESCRIPTOR_TYPE_BYTES: { - upb_strview *start = arr->data; - upb_strview *ptr = start + arr->len; + const upb_strview *start = _upb_array_constptr(arr); + const upb_strview *ptr = start + arr->len; do { ptr--; CHK(upb_put_bytes(e, ptr->data, ptr->size) && @@ -200,8 +278,8 @@ do { ; } while(0) return true; } case UPB_DESCRIPTOR_TYPE_GROUP: { - void **start = arr->data; - void **ptr = start + arr->len; + const void *const*start = _upb_array_constptr(arr); + const void *const*ptr = start + arr->len; const upb_msglayout *subm = m->submsgs[f->submsg_index]; do { size_t size; @@ -213,8 +291,8 @@ do { ; } while(0) return true; } case UPB_DESCRIPTOR_TYPE_MESSAGE: { - void **start = arr->data; - void **ptr = start + arr->len; + const void *const*start = _upb_array_constptr(arr); + const void *const*ptr = start + arr->len; const upb_msglayout *subm = m->submsgs[f->submsg_index]; do { size_t size; @@ -234,81 +312,40 @@ do { ; } while(0) return true; } -static bool upb_encode_scalarfield(upb_encstate *e, const char *field_mem, - const upb_msglayout *m, - const upb_msglayout_field *f, - bool skip_zero_value) { -#define CASE(ctype, type, wire_type, encodeval) do { \ - ctype val = *(ctype*)field_mem; \ - if (skip_zero_value && val == 0) { \ - return true; \ - } \ - return upb_put_ ## type(e, encodeval) && \ - upb_put_tag(e, f->number, wire_type); \ -} while(0) +static bool upb_encode_map(upb_encstate *e, const char *field_mem, + const upb_msglayout *m, + const upb_msglayout_field *f) { + const upb_map *map = *(const upb_map**)field_mem; + const upb_msglayout *entry = m->submsgs[f->submsg_index]; + const upb_msglayout_field *key_field = &entry->fields[0]; + const upb_msglayout_field *val_field = &entry->fields[1]; + upb_strtable_iter i; + if (map == NULL) { + return true; + } - switch (f->descriptortype) { - case UPB_DESCRIPTOR_TYPE_DOUBLE: - CASE(double, double, UPB_WIRE_TYPE_64BIT, val); - case UPB_DESCRIPTOR_TYPE_FLOAT: - CASE(float, float, UPB_WIRE_TYPE_32BIT, val); - case UPB_DESCRIPTOR_TYPE_INT64: - case UPB_DESCRIPTOR_TYPE_UINT64: - CASE(uint64_t, varint, UPB_WIRE_TYPE_VARINT, val); - case UPB_DESCRIPTOR_TYPE_UINT32: - CASE(uint32_t, varint, UPB_WIRE_TYPE_VARINT, val); - case UPB_DESCRIPTOR_TYPE_INT32: - case UPB_DESCRIPTOR_TYPE_ENUM: - CASE(int32_t, varint, UPB_WIRE_TYPE_VARINT, (int64_t)val); - case UPB_DESCRIPTOR_TYPE_SFIXED64: - case UPB_DESCRIPTOR_TYPE_FIXED64: - CASE(uint64_t, fixed64, UPB_WIRE_TYPE_64BIT, val); - case UPB_DESCRIPTOR_TYPE_FIXED32: - case UPB_DESCRIPTOR_TYPE_SFIXED32: - CASE(uint32_t, fixed32, UPB_WIRE_TYPE_32BIT, val); - case UPB_DESCRIPTOR_TYPE_BOOL: - CASE(bool, varint, UPB_WIRE_TYPE_VARINT, val); - case UPB_DESCRIPTOR_TYPE_SINT32: - CASE(int32_t, varint, UPB_WIRE_TYPE_VARINT, upb_zzencode_32(val)); - case UPB_DESCRIPTOR_TYPE_SINT64: - CASE(int64_t, varint, UPB_WIRE_TYPE_VARINT, upb_zzencode_64(val)); - case UPB_DESCRIPTOR_TYPE_STRING: - case UPB_DESCRIPTOR_TYPE_BYTES: { - upb_strview view = *(upb_strview*)field_mem; - if (skip_zero_value && view.size == 0) { - return true; - } - return upb_put_bytes(e, view.data, view.size) && - upb_put_varint(e, view.size) && - upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED); - } - case UPB_DESCRIPTOR_TYPE_GROUP: { - size_t size; - void *submsg = *(void **)field_mem; - const upb_msglayout *subm = m->submsgs[f->submsg_index]; - if (submsg == NULL) { - return true; - } - return upb_put_tag(e, f->number, UPB_WIRE_TYPE_END_GROUP) && - upb_encode_message(e, submsg, subm, &size) && - upb_put_tag(e, f->number, UPB_WIRE_TYPE_START_GROUP); - } - case UPB_DESCRIPTOR_TYPE_MESSAGE: { - size_t size; - void *submsg = *(void **)field_mem; - const upb_msglayout *subm = m->submsgs[f->submsg_index]; - if (submsg == NULL) { - return true; - } - return upb_encode_message(e, submsg, subm, &size) && - upb_put_varint(e, size) && - upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED); - } + upb_strtable_begin(&i, &map->table); + for(; !upb_strtable_done(&i); upb_strtable_next(&i)) { + size_t pre_len = e->limit - e->ptr; + size_t size; + upb_strview key = upb_strtable_iter_key(&i); + const upb_value val = upb_strtable_iter_value(&i); + const void *keyp = + map->key_size == UPB_MAPTYPE_STRING ? (void *)&key : key.data; + const void *valp = + map->val_size == UPB_MAPTYPE_STRING ? upb_value_getptr(val) : &val; + + CHK(upb_encode_scalarfield(e, valp, entry, val_field, false)); + CHK(upb_encode_scalarfield(e, keyp, entry, key_field, false)); + size = (e->limit - e->ptr) - pre_len; + CHK(upb_put_varint(e, size)); + CHK(upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED)); } -#undef CASE - UPB_UNREACHABLE(); + + return true; } + bool upb_encode_message(upb_encstate *e, const char *msg, const upb_msglayout *m, size_t *size) { int i; @@ -316,11 +353,19 @@ bool upb_encode_message(upb_encstate *e, const char *msg, const char *unknown; size_t unknown_size; + unknown = upb_msg_getunknown(msg, &unknown_size); + + if (unknown) { + upb_put_bytes(e, unknown, unknown_size); + } + for (i = m->field_count - 1; i >= 0; i--) { const upb_msglayout_field *f = &m->fields[i]; if (f->label == UPB_LABEL_REPEATED) { CHK(upb_encode_array(e, msg + f->offset, m, f)); + } else if (f->label == UPB_LABEL_MAP) { + CHK(upb_encode_map(e, msg + f->offset, m, f)); } else { bool skip_empty = false; if (f->presence == 0) { @@ -341,12 +386,6 @@ bool upb_encode_message(upb_encstate *e, const char *msg, } } - unknown = upb_msg_getunknown(msg, &unknown_size); - - if (unknown) { - upb_put_bytes(e, unknown, unknown_size); - } - *size = (e->limit - e->ptr) - pre_len; return true; } diff --git a/upb/generated_util.h b/upb/generated_util.h deleted file mode 100644 index 234bcdad3c9..00000000000 --- a/upb/generated_util.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -** Functions for use by generated code. These are not public and users must -** not call them directly. -*/ - -#ifndef UPB_GENERATED_UTIL_H_ -#define UPB_GENERATED_UTIL_H_ - -#include -#include "upb/msg.h" - -#include "upb/port_def.inc" - -#define PTR_AT(msg, ofs, type) (type*)((const char*)msg + ofs) - -UPB_INLINE const void *_upb_array_accessor(const void *msg, size_t ofs, - size_t *size) { - const upb_array *arr = *PTR_AT(msg, ofs, const upb_array*); - if (arr) { - if (size) *size = arr->len; - return arr->data; - } else { - if (size) *size = 0; - return NULL; - } -} - -UPB_INLINE void *_upb_array_mutable_accessor(void *msg, size_t ofs, - size_t *size) { - upb_array *arr = *PTR_AT(msg, ofs, upb_array*); - if (arr) { - if (size) *size = arr->len; - return arr->data; - } else { - if (size) *size = 0; - return NULL; - } -} - -/* TODO(haberman): this is a mess. It will improve when upb_array no longer - * carries reflective state (type, elem_size). */ -UPB_INLINE void *_upb_array_resize_accessor(void *msg, size_t ofs, size_t size, - size_t elem_size, - upb_fieldtype_t type, - upb_arena *arena) { - upb_array *arr = *PTR_AT(msg, ofs, upb_array*); - - if (!arr) { - arr = upb_array_new(arena); - if (!arr) return NULL; - *PTR_AT(msg, ofs, upb_array*) = arr; - } - - if (size > arr->size) { - size_t new_size = UPB_MAX(arr->size, 4); - size_t old_bytes = arr->size * elem_size; - size_t new_bytes; - while (new_size < size) new_size *= 2; - new_bytes = new_size * elem_size; - arr->data = upb_arena_realloc(arena, arr->data, old_bytes, new_bytes); - if (!arr->data) { - return NULL; - } - arr->size = new_size; - } - - arr->len = size; - return arr->data; -} - -UPB_INLINE bool _upb_array_append_accessor(void *msg, size_t ofs, - size_t elem_size, - upb_fieldtype_t type, - const void *value, - upb_arena *arena) { - upb_array *arr = *PTR_AT(msg, ofs, upb_array*); - size_t i = arr ? arr->len : 0; - void *data = - _upb_array_resize_accessor(msg, ofs, i + 1, elem_size, type, arena); - if (!data) return false; - memcpy(PTR_AT(data, i * elem_size, char), value, elem_size); - return true; -} - -UPB_INLINE bool _upb_has_field(const void *msg, size_t idx) { - return (*PTR_AT(msg, idx / 8, const char) & (1 << (idx % 8))) != 0; -} - -UPB_INLINE bool _upb_sethas(const void *msg, size_t idx) { - return (*PTR_AT(msg, idx / 8, char)) |= (char)(1 << (idx % 8)); -} - -UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx) { - return (*PTR_AT(msg, idx / 8, char)) &= (char)(~(1 << (idx % 8))); -} - -UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num) { - return *PTR_AT(msg, case_ofs, int32_t) == num; -} - -#undef PTR_AT - -#include "upb/port_undef.inc" - -#endif /* UPB_GENERATED_UTIL_H_ */ diff --git a/upb/json/parser.rl b/upb/json/parser.rl index 1180ce137f8..eefdadf5778 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -389,7 +389,7 @@ static upb_selector_t getsel_for_handlertype(upb_json_parser *p, upb_handlertype_t type) { upb_selector_t sel; bool ok = upb_handlers_getselector(p->top->f, type, &sel); - UPB_ASSERT(ok); + UPB_ASSUME(ok); return sel; } @@ -414,7 +414,7 @@ static void set_name_table(upb_json_parser *p, upb_jsonparser_frame *frame) { const upb_json_parsermethod *method; ok = upb_inttable_lookupptr(&cache->methods, frame->m, &v); - UPB_ASSERT(ok); + UPB_ASSUME(ok); method = upb_value_getconstptr(v); frame->name_table = &method->name_table; @@ -2019,7 +2019,7 @@ static void end_member(upb_json_parser *p) { /* send ENDSUBMSG in repeated-field-of-mapentries frame. */ p->top--; ok = upb_handlers_getselector(mapfield, UPB_HANDLER_ENDSUBMSG, &sel); - UPB_ASSERT(ok); + UPB_ASSUME(ok); upb_sink_endsubmsg(p->top->sink, (p->top + 1)->sink, sel); } diff --git a/upb/json/printer.c b/upb/json/printer.c index 38f817d4d40..a3cb9bdb010 100644 --- a/upb/json/printer.c +++ b/upb/json/printer.c @@ -6,6 +6,7 @@ #include "upb/json/printer.h" #include +#include #include #include #include @@ -208,28 +209,26 @@ static size_t fmt_bool(bool val, char* buf, size_t length) { return n; } -static size_t fmt_int64_as_number(long long val, char* buf, size_t length) { - size_t n = _upb_snprintf(buf, length, "%lld", val); +static size_t fmt_int64_as_number(int64_t val, char* buf, size_t length) { + size_t n = _upb_snprintf(buf, length, "%" PRId64, val); CHKLENGTH(n > 0 && n < length); return n; } -static size_t fmt_uint64_as_number( - unsigned long long val, char* buf, size_t length) { - size_t n = _upb_snprintf(buf, length, "%llu", val); +static size_t fmt_uint64_as_number(uint64_t val, char* buf, size_t length) { + size_t n = _upb_snprintf(buf, length, "%" PRIu64, val); CHKLENGTH(n > 0 && n < length); return n; } -static size_t fmt_int64_as_string(long long val, char* buf, size_t length) { - size_t n = _upb_snprintf(buf, length, "\"%lld\"", val); +static size_t fmt_int64_as_string(int64_t val, char* buf, size_t length) { + size_t n = _upb_snprintf(buf, length, "\"%" PRId64 "\"", val); CHKLENGTH(n > 0 && n < length); return n; } -static size_t fmt_uint64_as_string( - unsigned long long val, char* buf, size_t length) { - size_t n = _upb_snprintf(buf, length, "\"%llu\"", val); +static size_t fmt_uint64_as_string(uint64_t val, char* buf, size_t length) { + size_t n = _upb_snprintf(buf, length, "\"%" PRIu64 "\"", val); CHKLENGTH(n > 0 && n < length); return n; } diff --git a/upb/legacy_msg_reflection.c b/upb/legacy_msg_reflection.c deleted file mode 100644 index 031aa4e9cc7..00000000000 --- a/upb/legacy_msg_reflection.c +++ /dev/null @@ -1,399 +0,0 @@ - -#include "upb/legacy_msg_reflection.h" - -#include -#include "upb/table.int.h" -#include "upb/msg.h" - -#include "upb/port_def.inc" - -bool upb_fieldtype_mapkeyok(upb_fieldtype_t type) { - return type == UPB_TYPE_BOOL || type == UPB_TYPE_INT32 || - type == UPB_TYPE_UINT32 || type == UPB_TYPE_INT64 || - type == UPB_TYPE_UINT64 || type == UPB_TYPE_STRING; -} - -#define PTR_AT(msg, ofs, type) (type*)((char*)msg + ofs) -#define VOIDPTR_AT(msg, ofs) PTR_AT(msg, ofs, void) -#define ENCODE_MAX_NESTING 64 -#define CHECK_TRUE(x) if (!(x)) { return false; } - -/** upb_msgval ****************************************************************/ - -/* These functions will generate real memcpy() calls on ARM sadly, because - * the compiler assumes they might not be aligned. */ - -static upb_msgval upb_msgval_read(const void *p, size_t ofs, - uint8_t size) { - upb_msgval val; - p = (char*)p + ofs; - memcpy(&val, p, size); - return val; -} - -static void upb_msgval_write(void *p, size_t ofs, upb_msgval val, - uint8_t size) { - p = (char*)p + ofs; - memcpy(p, &val, size); -} - -static size_t upb_msgval_sizeof(upb_fieldtype_t type) { - switch (type) { - case UPB_TYPE_DOUBLE: - case UPB_TYPE_INT64: - case UPB_TYPE_UINT64: - return 8; - case UPB_TYPE_ENUM: - case UPB_TYPE_INT32: - case UPB_TYPE_UINT32: - case UPB_TYPE_FLOAT: - return 4; - case UPB_TYPE_BOOL: - return 1; - case UPB_TYPE_MESSAGE: - return sizeof(void*); - case UPB_TYPE_BYTES: - case UPB_TYPE_STRING: - return sizeof(upb_strview); - } - UPB_UNREACHABLE(); -} - -static uint8_t upb_msg_fieldsize(const upb_msglayout_field *field) { - if (field->label == UPB_LABEL_REPEATED) { - return sizeof(void*); - } else { - return upb_msgval_sizeof(upb_desctype_to_fieldtype[field->descriptortype]); - } -} - -/* TODO(haberman): this is broken right now because upb_msgval can contain - * a char* / size_t pair, which is too big for a upb_value. To fix this - * we'll probably need to dynamically allocate a upb_msgval and store a - * pointer to that in the tables for extensions/maps. */ -static upb_value upb_toval(upb_msgval val) { - upb_value ret; - UPB_UNUSED(val); - memset(&ret, 0, sizeof(upb_value)); /* XXX */ - return ret; -} - -static upb_msgval upb_msgval_fromval(upb_value val) { - upb_msgval ret; - UPB_UNUSED(val); - memset(&ret, 0, sizeof(upb_msgval)); /* XXX */ - return ret; -} - -static upb_ctype_t upb_fieldtotabtype(upb_fieldtype_t type) { - switch (type) { - case UPB_TYPE_FLOAT: return UPB_CTYPE_FLOAT; - case UPB_TYPE_DOUBLE: return UPB_CTYPE_DOUBLE; - case UPB_TYPE_BOOL: return UPB_CTYPE_BOOL; - case UPB_TYPE_BYTES: - case UPB_TYPE_MESSAGE: - case UPB_TYPE_STRING: return UPB_CTYPE_CONSTPTR; - case UPB_TYPE_ENUM: - case UPB_TYPE_INT32: return UPB_CTYPE_INT32; - case UPB_TYPE_UINT32: return UPB_CTYPE_UINT32; - case UPB_TYPE_INT64: return UPB_CTYPE_INT64; - case UPB_TYPE_UINT64: return UPB_CTYPE_UINT64; - default: UPB_ASSERT(false); return 0; - } -} - - -/** upb_msg *******************************************************************/ - -/* If we always read/write as a consistent type to each address, this shouldn't - * violate aliasing. - */ -#define DEREF(msg, ofs, type) *PTR_AT(msg, ofs, type) - -static const upb_msglayout_field *upb_msg_checkfield(int field_index, - const upb_msglayout *l) { - UPB_ASSERT(field_index >= 0 && field_index < l->field_count); - return &l->fields[field_index]; -} - -static bool upb_msg_inoneof(const upb_msglayout_field *field) { - return field->presence < 0; -} - -static uint32_t *upb_msg_oneofcase(const upb_msg *msg, int field_index, - const upb_msglayout *l) { - const upb_msglayout_field *field = upb_msg_checkfield(field_index, l); - UPB_ASSERT(upb_msg_inoneof(field)); - return PTR_AT(msg, ~field->presence, uint32_t); -} - -bool upb_msg_has(const upb_msg *msg, - int field_index, - const upb_msglayout *l) { - const upb_msglayout_field *field = upb_msg_checkfield(field_index, l); - - UPB_ASSERT(field->presence); - - if (upb_msg_inoneof(field)) { - /* Oneofs are set when the oneof number is set to this field. */ - return *upb_msg_oneofcase(msg, field_index, l) == field->number; - } else { - /* Other fields are set when their hasbit is set. */ - uint32_t hasbit = field->presence; - return DEREF(msg, hasbit / 8, char) | (1 << (hasbit % 8)); - } -} - -upb_msgval upb_msg_get(const upb_msg *msg, int field_index, - const upb_msglayout *l) { - const upb_msglayout_field *field = upb_msg_checkfield(field_index, l); - int size = upb_msg_fieldsize(field); - return upb_msgval_read(msg, field->offset, size); -} - -void upb_msg_set(upb_msg *msg, int field_index, upb_msgval val, - const upb_msglayout *l) { - const upb_msglayout_field *field = upb_msg_checkfield(field_index, l); - int size = upb_msg_fieldsize(field); - upb_msgval_write(msg, field->offset, val, size); -} - - -/** upb_array *****************************************************************/ - -#define DEREF_ARR(arr, i, type) ((type*)arr->data)[i] - -size_t upb_array_size(const upb_array *arr) { - return arr->len; -} - -upb_msgval upb_array_get(const upb_array *arr, upb_fieldtype_t type, size_t i) { - size_t element_size = upb_msgval_sizeof(type); - UPB_ASSERT(i < arr->len); - return upb_msgval_read(arr->data, i * element_size, element_size); -} - -bool upb_array_set(upb_array *arr, upb_fieldtype_t type, size_t i, - upb_msgval val, upb_arena *arena) { - size_t element_size = upb_msgval_sizeof(type); - UPB_ASSERT(i <= arr->len); - - if (i == arr->len) { - /* Extending the array. */ - - if (i == arr->size) { - /* Need to reallocate. */ - size_t new_size = UPB_MAX(arr->size * 2, 8); - size_t new_bytes = new_size * element_size; - size_t old_bytes = arr->size * element_size; - upb_alloc *alloc = upb_arena_alloc(arena); - upb_msgval *new_data = - upb_realloc(alloc, arr->data, old_bytes, new_bytes); - - if (!new_data) { - return false; - } - - arr->data = new_data; - arr->size = new_size; - } - - arr->len = i + 1; - } - - upb_msgval_write(arr->data, i * element_size, val, element_size); - return true; -} - -/** upb_map *******************************************************************/ - -struct upb_map { - upb_fieldtype_t key_type; - upb_fieldtype_t val_type; - /* We may want to optimize this to use inttable where possible, for greater - * efficiency and lower memory footprint. */ - upb_strtable strtab; - upb_arena *arena; -}; - -static void upb_map_tokey(upb_fieldtype_t type, upb_msgval *key, - const char **out_key, size_t *out_len) { - switch (type) { - case UPB_TYPE_STRING: - /* Point to string data of the input key. */ - *out_key = key->str.data; - *out_len = key->str.size; - return; - case UPB_TYPE_BOOL: - case UPB_TYPE_INT32: - case UPB_TYPE_UINT32: - case UPB_TYPE_INT64: - case UPB_TYPE_UINT64: - /* Point to the key itself. XXX: big-endian. */ - *out_key = (const char*)key; - *out_len = upb_msgval_sizeof(type); - return; - case UPB_TYPE_BYTES: - case UPB_TYPE_DOUBLE: - case UPB_TYPE_ENUM: - case UPB_TYPE_FLOAT: - case UPB_TYPE_MESSAGE: - break; /* Cannot be a map key. */ - } - UPB_UNREACHABLE(); -} - -static upb_msgval upb_map_fromkey(upb_fieldtype_t type, const char *key, - size_t len) { - switch (type) { - case UPB_TYPE_STRING: - return upb_msgval_makestr(key, len); - case UPB_TYPE_BOOL: - case UPB_TYPE_INT32: - case UPB_TYPE_UINT32: - case UPB_TYPE_INT64: - case UPB_TYPE_UINT64: - return upb_msgval_read(key, 0, upb_msgval_sizeof(type)); - case UPB_TYPE_BYTES: - case UPB_TYPE_DOUBLE: - case UPB_TYPE_ENUM: - case UPB_TYPE_FLOAT: - case UPB_TYPE_MESSAGE: - break; /* Cannot be a map key. */ - } - UPB_UNREACHABLE(); -} - -upb_map *upb_map_new(upb_fieldtype_t ktype, upb_fieldtype_t vtype, - upb_arena *a) { - upb_ctype_t vtabtype = upb_fieldtotabtype(vtype); - upb_alloc *alloc = upb_arena_alloc(a); - upb_map *map = upb_malloc(alloc, sizeof(upb_map)); - - if (!map) { - return NULL; - } - - UPB_ASSERT(upb_fieldtype_mapkeyok(ktype)); - map->key_type = ktype; - map->val_type = vtype; - map->arena = a; - - if (!upb_strtable_init2(&map->strtab, vtabtype, alloc)) { - return NULL; - } - - return map; -} - -size_t upb_map_size(const upb_map *map) { - return upb_strtable_count(&map->strtab); -} - -upb_fieldtype_t upb_map_keytype(const upb_map *map) { - return map->key_type; -} - -upb_fieldtype_t upb_map_valuetype(const upb_map *map) { - return map->val_type; -} - -bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val) { - upb_value tabval; - const char *key_str; - size_t key_len; - bool ret; - - upb_map_tokey(map->key_type, &key, &key_str, &key_len); - ret = upb_strtable_lookup2(&map->strtab, key_str, key_len, &tabval); - if (ret) { - memcpy(val, &tabval, sizeof(tabval)); - } - - return ret; -} - -bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val, - upb_msgval *removed) { - const char *key_str; - size_t key_len; - upb_value tabval = upb_toval(val); - upb_value removedtabval; - upb_alloc *a = upb_arena_alloc(map->arena); - - upb_map_tokey(map->key_type, &key, &key_str, &key_len); - - /* TODO(haberman): add overwrite operation to minimize number of lookups. */ - if (upb_strtable_lookup2(&map->strtab, key_str, key_len, NULL)) { - upb_strtable_remove3(&map->strtab, key_str, key_len, &removedtabval, a); - memcpy(&removed, &removedtabval, sizeof(removed)); - } - - return upb_strtable_insert3(&map->strtab, key_str, key_len, tabval, a); -} - -bool upb_map_del(upb_map *map, upb_msgval key) { - const char *key_str; - size_t key_len; - upb_alloc *a = upb_arena_alloc(map->arena); - - upb_map_tokey(map->key_type, &key, &key_str, &key_len); - return upb_strtable_remove3(&map->strtab, key_str, key_len, NULL, a); -} - - -/** upb_mapiter ***************************************************************/ - -struct upb_mapiter { - upb_strtable_iter iter; - upb_fieldtype_t key_type; -}; - -size_t upb_mapiter_sizeof(void) { - return sizeof(upb_mapiter); -} - -void upb_mapiter_begin(upb_mapiter *i, const upb_map *map) { - upb_strtable_begin(&i->iter, &map->strtab); - i->key_type = map->key_type; -} - -upb_mapiter *upb_mapiter_new(const upb_map *t, upb_alloc *a) { - upb_mapiter *ret = upb_malloc(a, upb_mapiter_sizeof()); - - if (!ret) { - return NULL; - } - - upb_mapiter_begin(ret, t); - return ret; -} - -void upb_mapiter_free(upb_mapiter *i, upb_alloc *a) { - upb_free(a, i); -} - -void upb_mapiter_next(upb_mapiter *i) { - upb_strtable_next(&i->iter); -} - -bool upb_mapiter_done(const upb_mapiter *i) { - return upb_strtable_done(&i->iter); -} - -upb_msgval upb_mapiter_key(const upb_mapiter *i) { - return upb_map_fromkey(i->key_type, upb_strtable_iter_key(&i->iter), - upb_strtable_iter_keylength(&i->iter)); -} - -upb_msgval upb_mapiter_value(const upb_mapiter *i) { - return upb_msgval_fromval(upb_strtable_iter_value(&i->iter)); -} - -void upb_mapiter_setdone(upb_mapiter *i) { - upb_strtable_iter_setdone(&i->iter); -} - -bool upb_mapiter_isequal(const upb_mapiter *i1, const upb_mapiter *i2) { - return upb_strtable_iter_isequal(&i1->iter, &i2->iter); -} diff --git a/upb/legacy_msg_reflection.h b/upb/legacy_msg_reflection.h deleted file mode 100644 index c54bfb947a8..00000000000 --- a/upb/legacy_msg_reflection.h +++ /dev/null @@ -1,191 +0,0 @@ - -#ifndef UPB_LEGACY_MSG_REFLECTION_H_ -#define UPB_LEGACY_MSG_REFLECTION_H_ - -#include "upb/upb.h" -#include "upb/msg.h" - -#include "upb/port_def.inc" - -struct upb_map; -typedef struct upb_map upb_map; - -struct upb_mapiter; -typedef struct upb_mapiter upb_mapiter; - -/** upb_msgval ****************************************************************/ - -/* A union representing all possible protobuf values. Used for generic get/set - * operations. */ - -typedef union { - bool b; - float flt; - double dbl; - int32_t i32; - int64_t i64; - uint32_t u32; - uint64_t u64; - const upb_map* map; - const upb_msg* msg; - const upb_array* arr; - const void* ptr; - upb_strview str; -} upb_msgval; - -#define ACCESSORS(name, membername, ctype) \ - UPB_INLINE ctype upb_msgval_get ## name(upb_msgval v) { \ - return v.membername; \ - } \ - UPB_INLINE void upb_msgval_set ## name(upb_msgval *v, ctype cval) { \ - v->membername = cval; \ - } \ - UPB_INLINE upb_msgval upb_msgval_ ## name(ctype v) { \ - upb_msgval ret; \ - ret.membername = v; \ - return ret; \ - } - -ACCESSORS(bool, b, bool) -ACCESSORS(float, flt, float) -ACCESSORS(double, dbl, double) -ACCESSORS(int32, i32, int32_t) -ACCESSORS(int64, i64, int64_t) -ACCESSORS(uint32, u32, uint32_t) -ACCESSORS(uint64, u64, uint64_t) -ACCESSORS(map, map, const upb_map*) -ACCESSORS(msg, msg, const upb_msg*) -ACCESSORS(ptr, ptr, const void*) -ACCESSORS(arr, arr, const upb_array*) -ACCESSORS(str, str, upb_strview) - -#undef ACCESSORS - -UPB_INLINE upb_msgval upb_msgval_makestr(const char *data, size_t size) { - return upb_msgval_str(upb_strview_make(data, size)); -} - -/** upb_msg *******************************************************************/ - -/* A upb_msg represents a protobuf message. It always corresponds to a specific - * upb_msglayout, which describes how it is laid out in memory. */ - -/* Read-only message API. Can be safely called by anyone. */ - -/* Returns the value associated with this field: - * - for scalar fields (including strings), the value directly. - * - return upb_msg*, or upb_map* for msg/map. - * If the field is unset for these field types, returns NULL. - * - * TODO(haberman): should we let users store cached array/map/msg - * pointers here for fields that are unset? Could be useful for the - * strongly-owned submessage model (ie. generated C API that doesn't use - * arenas). - */ -upb_msgval upb_msg_get(const upb_msg *msg, - int field_index, - const upb_msglayout *l); - -/* May only be called for fields where upb_fielddef_haspresence(f) == true. */ -bool upb_msg_has(const upb_msg *msg, - int field_index, - const upb_msglayout *l); - -/* Mutable message API. May only be called by the owner of the message who - * knows its ownership scheme and how to keep it consistent. */ - -/* Sets the given field to the given value. Does not perform any memory - * management: if you overwrite a pointer to a msg/array/map/string without - * cleaning it up (or using an arena) it will leak. - */ -void upb_msg_set(upb_msg *msg, - int field_index, - upb_msgval val, - const upb_msglayout *l); - -/* For a primitive field, set it back to its default. For repeated, string, and - * submessage fields set it back to NULL. This could involve releasing some - * internal memory (for example, from an extension dictionary), but it is not - * recursive in any way and will not recover any memory that may be used by - * arrays/maps/strings/msgs that this field may have pointed to. - */ -bool upb_msg_clearfield(upb_msg *msg, - int field_index, - const upb_msglayout *l); - -/* TODO(haberman): copyfrom()/mergefrom()? */ - -/** upb_array *****************************************************************/ - -/* A upb_array stores data for a repeated field. The memory management - * semantics are the same as upb_msg. A upb_array allocates dynamic - * memory internally for the array elements. */ - -upb_fieldtype_t upb_array_type(const upb_array *arr); - -/* Read-only interface. Safe for anyone to call. */ - -size_t upb_array_size(const upb_array *arr); -upb_msgval upb_array_get(const upb_array *arr, upb_fieldtype_t type, size_t i); - -/* Write interface. May only be called by the message's owner who can enforce - * its memory management invariants. */ - -bool upb_array_set(upb_array *arr, upb_fieldtype_t type, size_t i, - upb_msgval val, upb_arena *arena); - -/** upb_map *******************************************************************/ - -/* A upb_map stores data for a map field. The memory management semantics are - * the same as upb_msg, with one notable exception. upb_map will internally - * store a copy of all string keys, but *not* any string values or submessages. - * So you must ensure that any string or message values outlive the map, and you - * must delete them manually when they are no longer required. */ - -upb_map *upb_map_new(upb_fieldtype_t ktype, upb_fieldtype_t vtype, - upb_arena *a); - -/* Read-only interface. Safe for anyone to call. */ - -size_t upb_map_size(const upb_map *map); -upb_fieldtype_t upb_map_keytype(const upb_map *map); -upb_fieldtype_t upb_map_valuetype(const upb_map *map); -bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val); - -/* Write interface. May only be called by the message's owner who can enforce - * its memory management invariants. */ - -/* Sets or overwrites an entry in the map. Return value indicates whether - * the operation succeeded or failed with OOM, and also whether an existing - * key was replaced or not. */ -bool upb_map_set(upb_map *map, - upb_msgval key, upb_msgval val, - upb_msgval *valremoved); - -/* Deletes an entry in the map. Returns true if the key was present. */ -bool upb_map_del(upb_map *map, upb_msgval key); - -/** upb_mapiter ***************************************************************/ - -/* For iterating over a map. Map iterators are invalidated by mutations to the - * map, but an invalidated iterator will never return junk or crash the process. - * An invalidated iterator may return entries that were already returned though, - * and if you keep invalidating the iterator during iteration, the program may - * enter an infinite loop. */ - -size_t upb_mapiter_sizeof(void); - -void upb_mapiter_begin(upb_mapiter *i, const upb_map *t); -upb_mapiter *upb_mapiter_new(const upb_map *t, upb_alloc *a); -void upb_mapiter_free(upb_mapiter *i, upb_alloc *a); -void upb_mapiter_next(upb_mapiter *i); -bool upb_mapiter_done(const upb_mapiter *i); - -upb_msgval upb_mapiter_key(const upb_mapiter *i); -upb_msgval upb_mapiter_value(const upb_mapiter *i); -void upb_mapiter_setdone(upb_mapiter *i); -bool upb_mapiter_isequal(const upb_mapiter *i1, const upb_mapiter *i2); - -#include "upb/port_undef.inc" - -#endif /* UPB_LEGACY_MSG_REFLECTION_H_ */ diff --git a/upb/msg.c b/upb/msg.c index a77da5665c7..6c6d3008aa4 100644 --- a/upb/msg.c +++ b/upb/msg.c @@ -7,22 +7,27 @@ #define VOIDPTR_AT(msg, ofs) (void*)((char*)msg + (int)ofs) -/* Internal members of a upb_msg. We can change this without breaking binary - * compatibility. We put these before the user's data. The user's upb_msg* - * points after the upb_msg_internal. */ - -/* Used when a message is not extendable. */ -typedef struct { - char *unknown; - size_t unknown_len; - size_t unknown_size; -} upb_msg_internal; - -/* Used when a message is extendable. */ -typedef struct { - upb_inttable *extdict; - upb_msg_internal base; -} upb_msg_internal_withext; +/** upb_msg *******************************************************************/ + +static char _upb_fieldtype_to_sizelg2[12] = { + 0, + 0, /* UPB_TYPE_BOOL */ + 2, /* UPB_TYPE_FLOAT */ + 2, /* UPB_TYPE_INT32 */ + 2, /* UPB_TYPE_UINT32 */ + 2, /* UPB_TYPE_ENUM */ + UPB_SIZE(2, 3), /* UPB_TYPE_MESSAGE */ + 3, /* UPB_TYPE_DOUBLE */ + 3, /* UPB_TYPE_INT64 */ + 3, /* UPB_TYPE_UINT64 */ + UPB_SIZE(3, 4), /* UPB_TYPE_STRING */ + UPB_SIZE(3, 4), /* UPB_TYPE_BYTES */ +}; + +static uintptr_t tag_arrptr(void* ptr, int elem_size_lg2) { + UPB_ASSERT(elem_size_lg2 <= 4); + return (uintptr_t)ptr | elem_size_lg2; +} static int upb_msg_internalsize(const upb_msglayout *l) { return sizeof(upb_msg_internal) - l->extendable * sizeof(void *); @@ -46,7 +51,7 @@ static upb_msg_internal_withext *upb_msg_getinternalwithext( return VOIDPTR_AT(msg, -sizeof(upb_msg_internal_withext)); } -upb_msg *upb_msg_new(const upb_msglayout *l, upb_arena *a) { +upb_msg *_upb_msg_new(const upb_msglayout *l, upb_arena *a) { upb_alloc *alloc = upb_arena_alloc(a); void *mem = upb_malloc(alloc, upb_msg_sizeof(l)); upb_msg_internal *in; @@ -74,20 +79,6 @@ upb_msg *upb_msg_new(const upb_msglayout *l, upb_arena *a) { return msg; } -upb_array *upb_array_new(upb_arena *a) { - upb_array *ret = upb_arena_malloc(a, sizeof(upb_array)); - - if (!ret) { - return NULL; - } - - ret->data = NULL; - ret->len = 0; - ret->size = 0; - - return ret; -} - void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, upb_arena *arena) { upb_msg_internal *in = upb_msg_getinternal(msg); @@ -103,9 +94,103 @@ void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, } const char *upb_msg_getunknown(const upb_msg *msg, size_t *len) { - const upb_msg_internal* in = upb_msg_getinternal_const(msg); + const upb_msg_internal *in = upb_msg_getinternal_const(msg); *len = in->unknown_len; return in->unknown; } +/** upb_array *****************************************************************/ + +upb_array *_upb_array_new(upb_arena *a, upb_fieldtype_t type) { + upb_array *arr = upb_arena_malloc(a, sizeof(upb_array)); + + if (!arr) { + return NULL; + } + + arr->data = tag_arrptr(NULL, _upb_fieldtype_to_sizelg2[type]); + arr->len = 0; + arr->size = 0; + + return arr; +} + +bool _upb_array_realloc(upb_array *arr, size_t min_size, upb_arena *arena) { + size_t new_size = UPB_MAX(arr->size, 4); + int elem_size_lg2 = arr->data & 7; + size_t old_bytes = arr->size << elem_size_lg2; + size_t new_bytes; + void* ptr = _upb_array_ptr(arr); + + /* Log2 ceiling of size. */ + while (new_size < min_size) new_size *= 2; + + new_bytes = new_size << elem_size_lg2; + ptr = upb_arena_realloc(arena, ptr, old_bytes, new_bytes); + + if (!ptr) { + return false; + } + + arr->data = tag_arrptr(ptr, elem_size_lg2); + arr->size = new_size; + return true; +} + +static upb_array *getorcreate_array(upb_array **arr_ptr, upb_fieldtype_t type, + upb_arena *arena) { + upb_array *arr = *arr_ptr; + if (!arr) { + arr = _upb_array_new(arena, type); + if (!arr) return NULL; + *arr_ptr = arr; + } + return arr; +} + +static bool resize_array(upb_array *arr, size_t size, upb_arena *arena) { + if (size > arr->size && !_upb_array_realloc(arr, size, arena)) { + return false; + } + + arr->len = size; + return true; +} + +void *_upb_array_resize_fallback(upb_array **arr_ptr, size_t size, + upb_fieldtype_t type, upb_arena *arena) { + upb_array *arr = getorcreate_array(arr_ptr, type, arena); + return arr && resize_array(arr, size, arena) ? _upb_array_ptr(arr) : NULL; +} + +bool _upb_array_append_fallback(upb_array **arr_ptr, const void *value, + upb_fieldtype_t type, upb_arena *arena) { + upb_array *arr = getorcreate_array(arr_ptr, type, arena); + size_t elem = arr->len; + int lg2 = _upb_fieldtype_to_sizelg2[type]; + char *data; + + if (!arr || !resize_array(arr, elem + 1, arena)) return false; + + data = _upb_array_ptr(arr); + memcpy(data + (elem << lg2), value, 1 << lg2); + return true; +} + +/** upb_map *******************************************************************/ + +upb_map *_upb_map_new(upb_arena *a, size_t key_size, size_t value_size) { + upb_map *map = upb_arena_malloc(a, sizeof(upb_map)); + + if (!map) { + return NULL; + } + + upb_strtable_init2(&map->table, UPB_CTYPE_INT32, upb_arena_alloc(a)); + map->key_size = key_size; + map->val_size = value_size; + + return map; +} + #undef VOIDPTR_AT diff --git a/upb/msg.h b/upb/msg.h index 4bec023bd3e..2b3274b6da9 100644 --- a/upb/msg.h +++ b/upb/msg.h @@ -1,7 +1,6 @@ /* -** Data structures for message tables, used for parsing and serialization. -** This are much lighter-weight than full reflection, but they are do not -** have enough information to convert to text format, JSON, etc. +** Our memory representation for parsing tables and messages themselves. +** Functions in this file are used by generated code and possibly reflection. ** ** The definitions in this file are internal to upb. **/ @@ -11,12 +10,18 @@ #include #include + +#include "upb/table.int.h" #include "upb/upb.h" +#include "upb/port_def.inc" + #ifdef __cplusplus extern "C" { #endif +#define PTR_AT(msg, ofs, type) (type*)((const char*)msg + ofs) + typedef void upb_msg; /** upb_msglayout *************************************************************/ @@ -25,6 +30,12 @@ typedef void upb_msg; * members are public so generated code can initialize them, but users MUST NOT * read or write any of its members. */ +/* This isn't a real label according to descriptor.proto, but in the table we + * use this for map fields instead of UPB_LABEL_REPEATED. */ +enum { + UPB_LABEL_MAP = 4 +}; + typedef struct { uint32_t number; uint16_t offset; @@ -44,26 +55,344 @@ typedef struct upb_msglayout { bool extendable; } upb_msglayout; -/** Message internal representation *******************************************/ +/** upb_msg *******************************************************************/ -/* Our internal representation for repeated fields. */ +/* Internal members of a upb_msg. We can change this without breaking binary + * compatibility. We put these before the user's data. The user's upb_msg* + * points after the upb_msg_internal. */ + +/* Used when a message is not extendable. */ typedef struct { - void *data; /* Each element is element_size. */ - size_t len; /* Measured in elements. */ - size_t size; /* Measured in elements. */ -} upb_array; + char *unknown; + size_t unknown_len; + size_t unknown_size; +} upb_msg_internal; -upb_msg *upb_msg_new(const upb_msglayout *l, upb_arena *a); -upb_msg *upb_msg_new(const upb_msglayout *l, upb_arena *a); +/* Used when a message is extendable. */ +typedef struct { + upb_inttable *extdict; + upb_msg_internal base; +} upb_msg_internal_withext; + +/* Maps upb_fieldtype_t -> memory size. */ +extern char _upb_fieldtype_to_size[12]; +/* Creates a new messages with the given layout on the given arena. */ +upb_msg *_upb_msg_new(const upb_msglayout *l, upb_arena *a); + +/* Adds unknown data (serialized protobuf data) to the given message. The data + * is copied into the message instance. */ void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, upb_arena *arena); + +/* Returns a reference to the message's unknown data. */ const char *upb_msg_getunknown(const upb_msg *msg, size_t *len); -upb_array *upb_array_new(upb_arena *a); +UPB_INLINE bool _upb_has_field(const void *msg, size_t idx) { + return (*PTR_AT(msg, idx / 8, const char) & (1 << (idx % 8))) != 0; +} + +UPB_INLINE bool _upb_sethas(const void *msg, size_t idx) { + return (*PTR_AT(msg, idx / 8, char)) |= (char)(1 << (idx % 8)); +} + +UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx) { + return (*PTR_AT(msg, idx / 8, char)) &= (char)(~(1 << (idx % 8))); +} + +UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num) { + return *PTR_AT(msg, case_ofs, int32_t) == num; +} + +/** upb_array *****************************************************************/ + +/* Our internal representation for repeated fields. */ +typedef struct { + uintptr_t data; /* Tagged ptr: low 2 bits of ptr are lg2(elem size). */ + size_t len; /* Measured in elements. */ + size_t size; /* Measured in elements. */ +} upb_array; + +UPB_INLINE const void *_upb_array_constptr(const upb_array *arr) { + return (void*)((uintptr_t)arr->data & ~7UL); +} + +UPB_INLINE void *_upb_array_ptr(upb_array *arr) { + return (void*)_upb_array_constptr(arr); +} + +/* Creates a new array on the given arena. */ +upb_array *_upb_array_new(upb_arena *a, upb_fieldtype_t type); + +/* Resizes the capacity of the array to be at least min_size. */ +bool _upb_array_realloc(upb_array *arr, size_t min_size, upb_arena *arena); + +/* Fallback functions for when the accessors require a resize. */ +void *_upb_array_resize_fallback(upb_array **arr_ptr, size_t size, + upb_fieldtype_t type, upb_arena *arena); +bool _upb_array_append_fallback(upb_array **arr_ptr, const void *value, + upb_fieldtype_t type, upb_arena *arena); + +UPB_INLINE const void *_upb_array_accessor(const void *msg, size_t ofs, + size_t *size) { + const upb_array *arr = *PTR_AT(msg, ofs, const upb_array*); + if (arr) { + if (size) *size = arr->len; + return _upb_array_constptr(arr); + } else { + if (size) *size = 0; + return NULL; + } +} + +UPB_INLINE void *_upb_array_mutable_accessor(void *msg, size_t ofs, + size_t *size) { + upb_array *arr = *PTR_AT(msg, ofs, upb_array*); + if (arr) { + if (size) *size = arr->len; + return _upb_array_ptr(arr); + } else { + if (size) *size = 0; + return NULL; + } +} + +UPB_INLINE void *_upb_array_resize_accessor(void *msg, size_t ofs, size_t size, + upb_fieldtype_t type, + upb_arena *arena) { + upb_array **arr_ptr = PTR_AT(msg, ofs, upb_array*); + upb_array *arr = *arr_ptr; + if (!arr || arr->size < size) { + return _upb_array_resize_fallback(arr_ptr, size, type, arena); + } + arr->len = size; + return _upb_array_ptr(arr); +} + + +UPB_INLINE bool _upb_array_append_accessor(void *msg, size_t ofs, + size_t elem_size, + upb_fieldtype_t type, + const void *value, + upb_arena *arena) { + upb_array **arr_ptr = PTR_AT(msg, ofs, upb_array*); + upb_array *arr = *arr_ptr; + void* ptr; + if (!arr || arr->len == arr->size) { + return _upb_array_append_fallback(arr_ptr, value, type, arena); + } + ptr = _upb_array_ptr(arr); + memcpy(PTR_AT(ptr, arr->len * elem_size, char), value, elem_size); + arr->len++; + return true; +} + +/** upb_map *******************************************************************/ + +/* Right now we use strmaps for everything. We'll likely want to use + * integer-specific maps for integer-keyed maps.*/ +typedef struct { + /* Size of key and val, based on the map type. Strings are represented as '0' + * because they must be handled specially. */ + char key_size; + char val_size; + + upb_strtable table; +} upb_map; + +/* Map entries aren't actually stored, they are only used during parsing. For + * parsing, it helps a lot if all map entry messages have the same layout. + * The compiler and def.c must ensure that all map entries have this layout. */ +typedef struct { + upb_msg_internal internal; + union { + upb_strview str; /* For str/bytes. */ + upb_value val; /* For all other types. */ + } k; + union { + upb_strview str; /* For str/bytes. */ + upb_value val; /* For all other types. */ + } v; +} upb_map_entry; + +/* Creates a new map on the given arena with this key/value type. */ +upb_map *_upb_map_new(upb_arena *a, size_t key_size, size_t value_size); + +/* Converting between internal table representation and user values. + * + * _upb_map_tokey() and _upb_map_fromkey() are inverses. + * _upb_map_tovalue() and _upb_map_fromvalue() are inverses. + * + * These functions account for the fact that strings are treated differently + * from other types when stored in a map. + */ + +UPB_INLINE upb_strview _upb_map_tokey(const void *key, size_t size) { + if (size == UPB_MAPTYPE_STRING) { + return *(upb_strview*)key; + } else { + return upb_strview_make((const char*)key, size); + } +} + +UPB_INLINE void _upb_map_fromkey(upb_strview key, void* out, size_t size) { + if (size == UPB_MAPTYPE_STRING) { + memcpy(out, &key, sizeof(key)); + } else { + memcpy(out, key.data, size); + } +} + +UPB_INLINE upb_value _upb_map_tovalue(const void *val, size_t size, + upb_arena *a) { + upb_value ret = {0}; + if (size == UPB_MAPTYPE_STRING) { + upb_strview *strp = (upb_strview*)upb_arena_malloc(a, sizeof(*strp)); + *strp = *(upb_strview*)val; + memcpy(&ret, &strp, sizeof(strp)); + } else { + memcpy(&ret, val, size); + } + return ret; +} + +UPB_INLINE void _upb_map_fromvalue(upb_value val, void* out, size_t size) { + if (size == UPB_MAPTYPE_STRING) { + const upb_strview *strp = (const upb_strview*)upb_value_getptr(val); + memcpy(out, strp, sizeof(upb_strview)); + } else { + memcpy(out, &val, size); + } +} + +/* Map operations, shared by reflection and generated code. */ + +UPB_INLINE size_t _upb_map_size(const upb_map *map) { + return map->table.t.count; +} + +UPB_INLINE bool _upb_map_get(const upb_map *map, const void *key, + size_t key_size, void *val, size_t val_size) { + upb_value tabval; + upb_strview k = _upb_map_tokey(key, key_size); + bool ret = upb_strtable_lookup2(&map->table, k.data, k.size, &tabval); + if (ret) { + _upb_map_fromvalue(tabval, val, val_size); + } + return ret; +} + +UPB_INLINE void* _upb_map_next(const upb_map *map, size_t *iter) { + upb_strtable_iter it; + it.t = &map->table; + it.index = *iter; + upb_strtable_next(&it); + if (upb_strtable_done(&it)) return NULL; + *iter = it.index; + return (void*)str_tabent(&it); +} + +UPB_INLINE bool _upb_map_set(upb_map *map, const void *key, size_t key_size, + void *val, size_t val_size, upb_arena *arena) { + upb_strview strkey = _upb_map_tokey(key, key_size); + upb_value tabval = _upb_map_tovalue(val, val_size, arena); + upb_alloc *a = upb_arena_alloc(arena); + + /* TODO(haberman): add overwrite operation to minimize number of lookups. */ + upb_strtable_remove3(&map->table, strkey.data, strkey.size, NULL, a); + return upb_strtable_insert3(&map->table, strkey.data, strkey.size, tabval, a); +} + +UPB_INLINE bool _upb_map_delete(upb_map *map, const void *key, size_t key_size) { + upb_strview k = _upb_map_tokey(key, key_size); + return upb_strtable_remove3(&map->table, k.data, k.size, NULL, NULL); +} + +UPB_INLINE void _upb_map_clear(upb_map *map) { + upb_strtable_clear(&map->table); +} + +/* Message map operations, these get the map from the message first. */ + +UPB_INLINE size_t _upb_msg_map_size(const upb_msg *msg, size_t ofs) { + upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + return map ? _upb_map_size(map) : 0; +} + +UPB_INLINE bool _upb_msg_map_get(const upb_msg *msg, size_t ofs, + const void *key, size_t key_size, void *val, + size_t val_size) { + upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + if (!map) return false; + return _upb_map_get(map, key, key_size, val, val_size); +} + +UPB_INLINE void *_upb_msg_map_next(const upb_msg *msg, size_t ofs, + size_t *iter) { + upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + if (!map) return NULL; + return _upb_map_next(map, iter); +} + +UPB_INLINE bool _upb_msg_map_set(upb_msg *msg, size_t ofs, const void *key, + size_t key_size, void *val, size_t val_size, + upb_arena *arena) { + upb_map **map = PTR_AT(msg, ofs, upb_map *); + if (!*map) { + *map = _upb_map_new(arena, key_size, val_size); + } + return _upb_map_set(*map, key, key_size, val, val_size, arena); +} + +UPB_INLINE bool _upb_msg_map_delete(upb_msg *msg, size_t ofs, const void *key, + size_t key_size) { + upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + if (!map) return false; + return _upb_map_delete(map, key, key_size); +} + +UPB_INLINE void _upb_msg_map_clear(upb_msg *msg, size_t ofs) { + upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + if (!map) return; + _upb_map_clear(map); +} + +/* Accessing map key/value from a pointer, used by generated code only. */ + +UPB_INLINE void _upb_msg_map_key(const void* msg, void* key, size_t size) { + const upb_tabent *ent = (const upb_tabent*)msg; + uint32_t u32len; + upb_strview k; + k.data = upb_tabstr(ent->key, &u32len); + k.size = u32len; + _upb_map_fromkey(k, key, size); +} + +UPB_INLINE void _upb_msg_map_value(const void* msg, void* val, size_t size) { + const upb_tabent *ent = (const upb_tabent*)msg; + upb_value v; + _upb_value_setval(&v, ent->val.val); + _upb_map_fromvalue(v, val, size); +} + +UPB_INLINE void _upb_msg_map_set_value(void* msg, const void* val, size_t size) { + upb_tabent *ent = (upb_tabent*)msg; + /* This is like _upb_map_tovalue() except the entry already exists so we can + * reuse the allocated upb_strview for string fields. */ + if (size == UPB_MAPTYPE_STRING) { + upb_strview *strp = (upb_strview*)ent->val.val; + memcpy(strp, val, sizeof(*strp)); + } else { + memcpy(&ent->val.val, val, size); + } +} + +#undef PTR_AT #ifdef __cplusplus } /* extern "C" */ #endif +#include "upb/port_undef.inc" + #endif /* UPB_MSG_H_ */ diff --git a/upb/msgfactory.c b/upb/msgfactory.c deleted file mode 100644 index 4ecf2725b15..00000000000 --- a/upb/msgfactory.c +++ /dev/null @@ -1,248 +0,0 @@ - -#include "upb/msgfactory.h" - -#include "upb/port_def.inc" - -static bool is_power_of_two(size_t val) { - return (val & (val - 1)) == 0; -} - -/* Align up to the given power of 2. */ -static size_t align_up(size_t val, size_t align) { - UPB_ASSERT(is_power_of_two(align)); - return (val + align - 1) & ~(align - 1); -} - -static size_t div_round_up(size_t n, size_t d) { - return (n + d - 1) / d; -} - -static size_t upb_msgval_sizeof2(upb_fieldtype_t type) { - switch (type) { - case UPB_TYPE_DOUBLE: - case UPB_TYPE_INT64: - case UPB_TYPE_UINT64: - return 8; - case UPB_TYPE_ENUM: - case UPB_TYPE_INT32: - case UPB_TYPE_UINT32: - case UPB_TYPE_FLOAT: - return 4; - case UPB_TYPE_BOOL: - return 1; - case UPB_TYPE_MESSAGE: - return sizeof(void*); - case UPB_TYPE_BYTES: - case UPB_TYPE_STRING: - return sizeof(upb_strview); - } - UPB_UNREACHABLE(); -} - -static uint8_t upb_msg_fielddefsize(const upb_fielddef *f) { - if (upb_fielddef_isseq(f)) { - return sizeof(void*); - } else { - return upb_msgval_sizeof2(upb_fielddef_type(f)); - } -} - - -/** upb_msglayout *************************************************************/ - -static void upb_msglayout_free(upb_msglayout *l) { - upb_gfree(l); -} - -static size_t upb_msglayout_place(upb_msglayout *l, size_t size) { - size_t ret; - - l->size = align_up(l->size, size); - ret = l->size; - l->size += size; - return ret; -} - -static bool upb_msglayout_init(const upb_msgdef *m, - upb_msglayout *l, - upb_msgfactory *factory) { - upb_msg_field_iter it; - upb_msg_oneof_iter oit; - size_t hasbit; - size_t submsg_count = 0; - const upb_msglayout **submsgs; - upb_msglayout_field *fields; - - for (upb_msg_field_begin(&it, m); - !upb_msg_field_done(&it); - upb_msg_field_next(&it)) { - const upb_fielddef* f = upb_msg_iter_field(&it); - if (upb_fielddef_issubmsg(f)) { - submsg_count++; - } - } - - memset(l, 0, sizeof(*l)); - - fields = upb_gmalloc(upb_msgdef_numfields(m) * sizeof(*fields)); - submsgs = upb_gmalloc(submsg_count * sizeof(*submsgs)); - - if ((!fields && upb_msgdef_numfields(m)) || - (!submsgs && submsg_count)) { - /* OOM. */ - upb_gfree(fields); - upb_gfree(submsgs); - return false; - } - - l->field_count = upb_msgdef_numfields(m); - l->fields = fields; - l->submsgs = submsgs; - - /* Allocate data offsets in three stages: - * - * 1. hasbits. - * 2. regular fields. - * 3. oneof fields. - * - * OPT: There is a lot of room for optimization here to minimize the size. - */ - - /* Allocate hasbits and set basic field attributes. */ - submsg_count = 0; - for (upb_msg_field_begin(&it, m), hasbit = 0; - !upb_msg_field_done(&it); - upb_msg_field_next(&it)) { - const upb_fielddef* f = upb_msg_iter_field(&it); - upb_msglayout_field *field = &fields[upb_fielddef_index(f)]; - - field->number = upb_fielddef_number(f); - field->descriptortype = upb_fielddef_descriptortype(f); - field->label = upb_fielddef_label(f); - - if (upb_fielddef_issubmsg(f)) { - const upb_msglayout *sub_layout = - upb_msgfactory_getlayout(factory, upb_fielddef_msgsubdef(f)); - field->submsg_index = submsg_count++; - submsgs[field->submsg_index] = sub_layout; - } - - if (upb_fielddef_haspresence(f) && !upb_fielddef_containingoneof(f)) { - field->presence = (hasbit++); - } else { - field->presence = 0; - } - } - - /* Account for space used by hasbits. */ - l->size = div_round_up(hasbit, 8); - - /* Allocate non-oneof fields. */ - for (upb_msg_field_begin(&it, m); !upb_msg_field_done(&it); - upb_msg_field_next(&it)) { - const upb_fielddef* f = upb_msg_iter_field(&it); - size_t field_size = upb_msg_fielddefsize(f); - size_t index = upb_fielddef_index(f); - - if (upb_fielddef_containingoneof(f)) { - /* Oneofs are handled separately below. */ - continue; - } - - fields[index].offset = upb_msglayout_place(l, field_size); - } - - /* Allocate oneof fields. Each oneof field consists of a uint32 for the case - * and space for the actual data. */ - for (upb_msg_oneof_begin(&oit, m); !upb_msg_oneof_done(&oit); - upb_msg_oneof_next(&oit)) { - const upb_oneofdef* o = upb_msg_iter_oneof(&oit); - upb_oneof_iter fit; - - size_t case_size = sizeof(uint32_t); /* Could potentially optimize this. */ - size_t field_size = 0; - uint32_t case_offset; - uint32_t data_offset; - - /* Calculate field size: the max of all field sizes. */ - for (upb_oneof_begin(&fit, o); - !upb_oneof_done(&fit); - upb_oneof_next(&fit)) { - const upb_fielddef* f = upb_oneof_iter_field(&fit); - field_size = UPB_MAX(field_size, upb_msg_fielddefsize(f)); - } - - /* Align and allocate case offset. */ - case_offset = upb_msglayout_place(l, case_size); - data_offset = upb_msglayout_place(l, field_size); - - for (upb_oneof_begin(&fit, o); - !upb_oneof_done(&fit); - upb_oneof_next(&fit)) { - const upb_fielddef* f = upb_oneof_iter_field(&fit); - fields[upb_fielddef_index(f)].offset = data_offset; - fields[upb_fielddef_index(f)].presence = ~case_offset; - } - } - - /* Size of the entire structure should be a multiple of its greatest - * alignment. TODO: track overall alignment for real? */ - l->size = align_up(l->size, 8); - - return true; -} - - -/** upb_msgfactory ************************************************************/ - -struct upb_msgfactory { - const upb_symtab *symtab; /* We own a ref. */ - upb_inttable layouts; -}; - -upb_msgfactory *upb_msgfactory_new(const upb_symtab *symtab) { - upb_msgfactory *ret = upb_gmalloc(sizeof(*ret)); - - ret->symtab = symtab; - upb_inttable_init(&ret->layouts, UPB_CTYPE_PTR); - - return ret; -} - -void upb_msgfactory_free(upb_msgfactory *f) { - upb_inttable_iter i; - upb_inttable_begin(&i, &f->layouts); - for(; !upb_inttable_done(&i); upb_inttable_next(&i)) { - upb_msglayout *l = upb_value_getptr(upb_inttable_iter_value(&i)); - upb_msglayout_free(l); - } - - upb_inttable_uninit(&f->layouts); - upb_gfree(f); -} - -const upb_symtab *upb_msgfactory_symtab(const upb_msgfactory *f) { - return f->symtab; -} - -const upb_msglayout *upb_msgfactory_getlayout(upb_msgfactory *f, - const upb_msgdef *m) { - upb_value v; - UPB_ASSERT(upb_symtab_lookupmsg(f->symtab, upb_msgdef_fullname(m)) == m); - UPB_ASSERT(!upb_msgdef_mapentry(m)); - - if (upb_inttable_lookupptr(&f->layouts, m, &v)) { - UPB_ASSERT(upb_value_getptr(v)); - return upb_value_getptr(v); - } else { - /* In case of circular dependency, layout has to be inserted first. */ - upb_msglayout *l = upb_gmalloc(sizeof(*l)); - upb_msgfactory *mutable_f = (void*)f; - upb_inttable_insertptr(&mutable_f->layouts, m, upb_value_ptr(l)); - UPB_ASSERT(l); - if (!upb_msglayout_init(m, l, f)) { - upb_msglayout_free(l); - } - return l; - } -} diff --git a/upb/msgfactory.h b/upb/msgfactory.h deleted file mode 100644 index 9b3b5999389..00000000000 --- a/upb/msgfactory.h +++ /dev/null @@ -1,48 +0,0 @@ - -#include "upb/def.h" -#include "upb/msg.h" - -#ifndef UPB_MSGFACTORY_H_ -#define UPB_MSGFACTORY_H_ - -/** upb_msgfactory ************************************************************/ - -struct upb_msgfactory; -typedef struct upb_msgfactory upb_msgfactory; - -#ifdef __cplusplus -extern "C" { -#endif - -/* A upb_msgfactory contains a cache of upb_msglayout, upb_handlers, and - * upb_visitorplan objects. These are the objects necessary to represent, - * populate, and and visit upb_msg objects. - * - * These caches are all populated by upb_msgdef, and lazily created on demand. - */ - -/* Creates and destroys a msgfactory, respectively. The messages for this - * msgfactory must come from |symtab| (which should outlive the msgfactory). */ -upb_msgfactory *upb_msgfactory_new(const upb_symtab *symtab); -void upb_msgfactory_free(upb_msgfactory *f); - -const upb_symtab *upb_msgfactory_symtab(const upb_msgfactory *f); - -/* The functions to get cached objects, lazily creating them on demand. These - * all require: - * - * - m is in upb_msgfactory_symtab(f) - * - upb_msgdef_mapentry(m) == false (since map messages can't have layouts). - * - * The returned objects will live for as long as the msgfactory does. - * - * TODO(haberman): consider making this thread-safe and take a const - * upb_msgfactory. */ -const upb_msglayout *upb_msgfactory_getlayout(upb_msgfactory *f, - const upb_msgdef *m); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* UPB_MSGFACTORY_H_ */ diff --git a/upb/pb/compile_decoder.c b/upb/pb/compile_decoder.c index f5c7d656466..44b310fe3f9 100644 --- a/upb/pb/compile_decoder.c +++ b/upb/pb/compile_decoder.c @@ -910,10 +910,10 @@ const upb_pbdecodermethod *upb_pbcodecache_get(upb_pbcodecache *c, } else { g = mgroup_new(h, c->lazy); ok = upb_inttable_insertptr(&c->groups, md, upb_value_constptr(g)); - UPB_ASSERT(ok); + UPB_ASSUME(ok); } ok = upb_inttable_lookupptr(&g->methods, h, &v); - UPB_ASSERT(ok); + UPB_ASSUME(ok); return upb_value_getptr(v); } diff --git a/upb/pb/varint.int.h b/upb/pb/varint.int.h index ff1ca661491..293067a5cb8 100644 --- a/upb/pb/varint.int.h +++ b/upb/pb/varint.int.h @@ -26,16 +26,16 @@ extern "C" { * descriptor type (upb_descriptortype_t). */ extern const uint8_t upb_pb_native_wire_types[]; -UPB_INLINE uint64_t byteswap64(uint64_t val) -{ - return ((((val) & 0xff00000000000000ull) >> 56) - | (((val) & 0x00ff000000000000ull) >> 40) - | (((val) & 0x0000ff0000000000ull) >> 24) - | (((val) & 0x000000ff00000000ull) >> 8) - | (((val) & 0x00000000ff000000ull) << 8) - | (((val) & 0x0000000000ff0000ull) << 24) - | (((val) & 0x000000000000ff00ull) << 40) - | (((val) & 0x00000000000000ffull) << 56)); +UPB_INLINE uint64_t byteswap64(uint64_t val) { + uint64_t byte = 0xff; + return (val & (byte << 56) >> 56) + | (val & (byte << 48) >> 40) + | (val & (byte << 40) >> 24) + | (val & (byte << 32) >> 8) + | (val & (byte << 24) << 8) + | (val & (byte << 16) << 24) + | (val & (byte << 8) << 40) + | (val & (byte << 0) << 56); } /* Zig-zag encoding/decoding **************************************************/ diff --git a/upb/port_def.inc b/upb/port_def.inc index b416eaeaf1a..51f8eac96f6 100644 --- a/upb/port_def.inc +++ b/upb/port_def.inc @@ -28,6 +28,9 @@ #define UPB_SIZE(size32, size64) size64 #endif +/* These macros aren't really "port", they are helper macros that we don't want + * to leak. + */ #define UPB_FIELD_AT(msg, fieldtype, offset) \ *(fieldtype*)((const char*)(msg) + offset) @@ -40,6 +43,8 @@ UPB_FIELD_AT(msg, int, case_offset) = case_val; \ UPB_FIELD_AT(msg, fieldtype, offset) = value; +#define UPB_MAPTYPE_STRING 0 + /* UPB_INLINE: inline if possible, emit standalone code if required. */ #ifdef __cplusplus #define UPB_INLINE inline @@ -123,6 +128,18 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg); #define UPB_UNUSED(var) (void)var +/* UPB_ASSUME(): in release mode, we tell the compiler to assume this is true. + */ +#ifdef NDEBUG +#ifdef __GNUC__ +#define UPB_ASSUME(expr) if (!(expr)) __builtin_unreachable() +#else +#define UPB_ASSUME(expr) do {} if (false && (expr)) +#endif +#else +#define UPB_ASSUME(expr) assert(expr) +#endif + /* UPB_ASSERT(): in release mode, we use the expression without letting it be * evaluated. This prevents "unused variable" warnings. */ #ifdef NDEBUG diff --git a/upb/port_undef.inc b/upb/port_undef.inc index 103180b7fbd..e91e9644bb1 100644 --- a/upb/port_undef.inc +++ b/upb/port_undef.inc @@ -1,5 +1,6 @@ /* See port_def.inc. This should #undef all macros #defined there. */ +#undef UPB_MAPTYPE_STRING #undef UPB_SIZE #undef UPB_FIELD_AT #undef UPB_READ_ONEOF @@ -11,6 +12,7 @@ #undef UPB_MAX #undef UPB_MIN #undef UPB_UNUSED +#undef UPB_ASSUME #undef UPB_ASSERT #undef UPB_ASSERT_DEBUGVAR #undef UPB_UNREACHABLE diff --git a/upb/reflection.c b/upb/reflection.c new file mode 100644 index 00000000000..b3bc883c777 --- /dev/null +++ b/upb/reflection.c @@ -0,0 +1,289 @@ + +#include "upb/reflection.h" + +#include +#include "upb/table.int.h" +#include "upb/msg.h" + +#include "upb/port_def.inc" + +static char field_size[] = { + 0,/* 0 */ + 8, /* UPB_DESCRIPTOR_TYPE_DOUBLE */ + 4, /* UPB_DESCRIPTOR_TYPE_FLOAT */ + 8, /* UPB_DESCRIPTOR_TYPE_INT64 */ + 8, /* UPB_DESCRIPTOR_TYPE_UINT64 */ + 4, /* UPB_DESCRIPTOR_TYPE_INT32 */ + 8, /* UPB_DESCRIPTOR_TYPE_FIXED64 */ + 4, /* UPB_DESCRIPTOR_TYPE_FIXED32 */ + 1, /* UPB_DESCRIPTOR_TYPE_BOOL */ + sizeof(upb_strview), /* UPB_DESCRIPTOR_TYPE_STRING */ + sizeof(void*), /* UPB_DESCRIPTOR_TYPE_GROUP */ + sizeof(void*), /* UPB_DESCRIPTOR_TYPE_MESSAGE */ + sizeof(upb_strview), /* UPB_DESCRIPTOR_TYPE_BYTES */ + 4, /* UPB_DESCRIPTOR_TYPE_UINT32 */ + 4, /* UPB_DESCRIPTOR_TYPE_ENUM */ + 4, /* UPB_DESCRIPTOR_TYPE_SFIXED32 */ + 8, /* UPB_DESCRIPTOR_TYPE_SFIXED64 */ + 4, /* UPB_DESCRIPTOR_TYPE_SINT32 */ + 8, /* UPB_DESCRIPTOR_TYPE_SINT64 */ +}; + +/* Strings/bytes are special-cased in maps. */ +static char _upb_fieldtype_to_mapsize[12] = { + 0, + 1, /* UPB_TYPE_BOOL */ + 4, /* UPB_TYPE_FLOAT */ + 4, /* UPB_TYPE_INT32 */ + 4, /* UPB_TYPE_UINT32 */ + 4, /* UPB_TYPE_ENUM */ + sizeof(void*), /* UPB_TYPE_MESSAGE */ + 8, /* UPB_TYPE_DOUBLE */ + 8, /* UPB_TYPE_INT64 */ + 8, /* UPB_TYPE_UINT64 */ + 0, /* UPB_TYPE_STRING */ + 0, /* UPB_TYPE_BYTES */ +}; + +/** upb_msg *******************************************************************/ + +/* If we always read/write as a consistent type to each address, this shouldn't + * violate aliasing. + */ +#define PTR_AT(msg, ofs, type) (type*)((char*)msg + ofs) + +upb_msg *upb_msg_new(const upb_msgdef *m, upb_arena *a) { + return _upb_msg_new(upb_msgdef_layout(m), a); +} + +static bool in_oneof(const upb_msglayout_field *field) { + return field->presence < 0; +} + +static uint32_t *oneofcase(const upb_msg *msg, + const upb_msglayout_field *field) { + UPB_ASSERT(in_oneof(field)); + return PTR_AT(msg, ~field->presence, uint32_t); +} + +static upb_msgval _upb_msg_getraw(const upb_msg *msg, const upb_fielddef *f) { + const upb_msglayout_field *field = upb_fielddef_layout(f); + const char *mem = PTR_AT(msg, field->offset, char); + upb_msgval val = {0}; + int size = upb_fielddef_isseq(f) ? sizeof(void *) + : field_size[field->descriptortype]; + memcpy(&val, mem, size); + return val; +} + +bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f) { + const upb_msglayout_field *field = upb_fielddef_layout(f); + if (in_oneof(field)) { + return *oneofcase(msg, field) == field->number; + } else if (field->presence > 0) { + uint32_t hasbit = field->presence; + return *PTR_AT(msg, hasbit / 8, char) | (1 << (hasbit % 8)); + } else { + UPB_ASSERT(field->descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE || + field->descriptortype == UPB_DESCRIPTOR_TYPE_GROUP); + return _upb_msg_getraw(msg, f).msg_val != NULL; + } +} + +upb_msgval upb_msg_get(const upb_msg *msg, const upb_fielddef *f) { + if (!upb_fielddef_haspresence(f) || upb_msg_has(msg, f)) { + return _upb_msg_getraw(msg, f); + } else { + /* TODO(haberman): change upb_fielddef to not require this switch(). */ + upb_msgval val = {0}; + switch (upb_fielddef_type(f)) { + case UPB_TYPE_INT32: + case UPB_TYPE_ENUM: + val.int32_val = upb_fielddef_defaultint32(f); + break; + case UPB_TYPE_INT64: + val.int64_val = upb_fielddef_defaultint64(f); + break; + case UPB_TYPE_UINT32: + val.uint32_val = upb_fielddef_defaultuint32(f); + break; + case UPB_TYPE_UINT64: + val.uint64_val = upb_fielddef_defaultuint64(f); + break; + case UPB_TYPE_FLOAT: + val.float_val = upb_fielddef_defaultfloat(f); + break; + case UPB_TYPE_DOUBLE: + val.double_val = upb_fielddef_defaultdouble(f); + break; + case UPB_TYPE_BOOL: + val.double_val = upb_fielddef_defaultbool(f); + break; + case UPB_TYPE_STRING: + case UPB_TYPE_BYTES: + val.str_val.data = upb_fielddef_defaultstr(f, &val.str_val.size); + break; + case UPB_TYPE_MESSAGE: + val.msg_val = NULL; + break; + } + return val; + } +} + +upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, + upb_arena *a) { + const upb_msglayout_field *field = upb_fielddef_layout(f); + upb_mutmsgval ret; + char *mem = PTR_AT(msg, field->offset, char); + memcpy(&ret, mem, sizeof(void*)); + if (a && !ret.msg) { + if (upb_fielddef_ismap(f)) { + const upb_msgdef *entry = upb_fielddef_msgsubdef(f); + const upb_fielddef *key = upb_msgdef_itof(entry, UPB_MAPENTRY_KEY); + const upb_fielddef *value = upb_msgdef_itof(entry, UPB_MAPENTRY_VALUE); + ret.map = upb_map_new(a, upb_fielddef_type(key), upb_fielddef_type(value)); + } else if (upb_fielddef_isseq(f)) { + ret.array = upb_array_new(a, upb_fielddef_type(f)); + } else { + UPB_ASSERT(upb_fielddef_issubmsg(f)); + ret.msg = upb_msg_new(upb_fielddef_msgsubdef(f), a); + } + memcpy(mem, &ret, sizeof(void*)); + } + return ret; +} + +void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, + upb_arena *a) { + const upb_msglayout_field *field = upb_fielddef_layout(f); + char *mem = PTR_AT(msg, field->offset, char); + int size = upb_fielddef_isseq(f) ? sizeof(void *) + : field_size[field->descriptortype]; + memcpy(mem, &val, size); + if (in_oneof(field)) { + *oneofcase(msg, field) = field->number; + } +} + +bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m, + const upb_symtab *ext_pool, const upb_fielddef **out_f, + upb_msgval *out_val, size_t *iter) { + int i = *iter; + const upb_msgval zero = {0}; + const upb_fielddef *f; + while ((f = _upb_msgdef_field(m, ++i)) != NULL) { + upb_msgval val = _upb_msg_getraw(msg, f); + + /* Skip field if unset or empty. */ + if (upb_fielddef_haspresence(f)) { + if (!upb_msg_has(msg, f)) continue; + } else { + upb_msgval test = val; + if (upb_fielddef_isstring(f) && !upb_fielddef_isseq(f)) { + /* Clear string pointer, only size matters (ptr could be non-NULL). */ + test.str_val.data = NULL; + } + /* Continue if NULL or 0. */ + if (memcmp(&test, &zero, sizeof(test)) == 0) continue; + } + + *out_val = val; + *out_f = f; + *iter = i; + return true; + } + *iter = i; + return false; +} + +/** upb_array *****************************************************************/ + +upb_array *upb_array_new(upb_arena *a, upb_fieldtype_t type) { + return _upb_array_new(a, type); +} + +size_t upb_array_size(const upb_array *arr) { + return arr->len; +} + +upb_msgval upb_array_get(const upb_array *arr, size_t i) { + upb_msgval ret; + const char* data = _upb_array_constptr(arr); + int lg2 = arr->data & 7; + UPB_ASSERT(i < arr->len); + memcpy(&ret, data + (i << lg2), 1 << lg2); + return ret; +} + +void upb_array_set(upb_array *arr, size_t i, upb_msgval val) { + char* data = _upb_array_ptr(arr); + int lg2 = arr->data & 7; + UPB_ASSERT(i < arr->len); + memcpy(data + (i << lg2), &val, 1 << lg2); +} + +bool upb_array_append(upb_array *arr, upb_msgval val, upb_arena *arena) { + if (!_upb_array_realloc(arr, arr->len + 1, arena)) { + return false; + } + arr->len++; + upb_array_set(arr, arr->len - 1, val); + return true; +} + +/* Resizes the array to the given size, reallocating if necessary, and returns a + * pointer to the new array elements. */ +bool upb_array_resize(upb_array *arr, size_t size, upb_arena *arena) { + return _upb_array_realloc(arr, size, arena); +} + +/** upb_map *******************************************************************/ + +upb_map *upb_map_new(upb_arena *a, upb_fieldtype_t key_type, + upb_fieldtype_t value_type) { + return _upb_map_new(a, _upb_fieldtype_to_mapsize[key_type], + _upb_fieldtype_to_mapsize[value_type]); +} + +size_t upb_map_size(const upb_map *map) { + return _upb_map_size(map); +} + +bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val) { + return _upb_map_get(map, &key, map->key_size, val, map->val_size); +} + +bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val, + upb_arena *arena) { + return _upb_map_set(map, &key, map->key_size, &val, map->val_size, arena); +} + +bool upb_map_delete(upb_map *map, upb_msgval key) { + return _upb_map_delete(map, &key, map->key_size); +} + +bool upb_mapiter_next(const upb_map *map, size_t *iter) { + return _upb_map_next(map, iter); +} + +/* Returns the key and value for this entry of the map. */ +upb_msgval upb_mapiter_key(const upb_map *map, size_t iter) { + upb_strtable_iter i; + upb_msgval ret; + i.t = &map->table; + i.index = iter; + _upb_map_fromkey(upb_strtable_iter_key(&i), &ret, map->key_size); + return ret; +} + +upb_msgval upb_mapiter_value(const upb_map *map, size_t iter) { + upb_strtable_iter i; + upb_msgval ret; + i.t = &map->table; + i.index = iter; + _upb_map_fromvalue(upb_strtable_iter_value(&i), &ret, map->val_size); + return ret; +} + +/* void upb_mapiter_setvalue(upb_map *map, size_t iter, upb_msgval value); */ diff --git a/upb/reflection.h b/upb/reflection.h new file mode 100644 index 00000000000..95156b7d76b --- /dev/null +++ b/upb/reflection.h @@ -0,0 +1,153 @@ + +#ifndef UPB_REFLECTION_H_ +#define UPB_REFLECTION_H_ + +#include "upb/def.h" +#include "upb/msg.h" +#include "upb/upb.h" + +#include "upb/port_def.inc" + +typedef union { + bool bool_val; + float float_val; + double double_val; + int32_t int32_val; + int64_t int64_val; + uint32_t uint32_val; + uint64_t uint64_val; + const upb_map* map_val; + const upb_msg* msg_val; + const upb_array* array_val; + upb_strview str_val; +} upb_msgval; + +typedef union { + upb_map* map; + upb_msg* msg; + upb_array* array; +} upb_mutmsgval; + +/** upb_msg *******************************************************************/ + +/* Creates a new message of the given type in the given arena. */ +upb_msg *upb_msg_new(const upb_msgdef *m, upb_arena *a); + +/* Returns the value associated with this field. */ +upb_msgval upb_msg_get(const upb_msg *msg, const upb_fielddef *f); + +/* Returns a mutable pointer to a map, array, or submessage value. If the given + * arena is non-NULL this will construct a new object if it was not previously + * present. May not be called for primitive fields. */ +upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, upb_arena *a); + +/* May only be called for fields where upb_fielddef_haspresence(f) == true. */ +bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f); + +/* Sets the given field to the given value. For a msg/array/map/string, the + * value must be in the same arena. */ +void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, + upb_arena *a); + +/* Clears any field presence and sets the value back to its default. */ +void upb_msg_clearfield(upb_msg *msg, const upb_fielddef *f); + +/* Iterate over present fields. + * + * size_t iter = UPB_MSG_BEGIN; + * const upb_fielddef *f; + * upb_msgval val; + * while (upb_msg_next(msg, m, ext_pool, &f, &val, &iter)) { + * process_field(f, val); + * } + * + * If ext_pool is NULL, no extensions will be returned. If the given symtab + * returns extensions that don't match what is in this message, those extensions + * will be skipped. + */ + +#define UPB_MSG_BEGIN -1 +bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m, + const upb_symtab *ext_pool, const upb_fielddef **f, + upb_msgval *val, size_t *iter); + +/* Adds unknown data (serialized protobuf data) to the given message. The data + * is copied into the message instance. */ +void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, + upb_arena *arena); + +/* Returns a reference to the message's unknown data. */ +const char *upb_msg_getunknown(const upb_msg *msg, size_t *len); + +/** upb_array *****************************************************************/ + +/* Creates a new array on the given arena that holds elements of this type. */ +upb_array *upb_array_new(upb_arena *a, upb_fieldtype_t type); + +/* Returns the size of the array. */ +size_t upb_array_size(const upb_array *arr); + +/* Returns the given element, which must be within the array's current size. */ +upb_msgval upb_array_get(const upb_array *arr, size_t i); + +/* Sets the given element, which must be within the array's current size. */ +void upb_array_set(upb_array *arr, size_t i, upb_msgval val); + +/* Appends an element to the array. Returns false on allocation failure. */ +bool upb_array_append(upb_array *array, upb_msgval val, upb_arena *arena); + +/* Changes the size of a vector. New elements are initialized to empty/0. + * Returns false on allocation failure. */ +bool upb_array_resize(upb_array *array, size_t size, upb_arena *arena); + +/** upb_map *******************************************************************/ + +/* Creates a new map on the given arena with the given key/value size. */ +upb_map *upb_map_new(upb_arena *a, upb_fieldtype_t key_type, + upb_fieldtype_t value_type); + +/* Returns the number of entries in the map. */ +size_t upb_map_size(const upb_map *map); + +/* Stores a value for the given key into |*val| (or the zero value if the key is + * not present). Returns whether the key was present. The |val| pointer may be + * NULL, in which case the function tests whether the given key is present. */ +bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val); + +/* Removes all entries in the map. */ +void upb_map_clear(upb_map *map); + +/* Sets the given key to the given value. Returns true if this was a new key in + * the map, or false if an existing key was replaced. */ +bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val, + upb_arena *arena); + +/* Deletes this key from the table. Returns true if the key was present. */ +bool upb_map_delete(upb_map *map, upb_msgval key); + +/* Map iteration: + * + * size_t iter = UPB_MAP_BEGIN; + * while (upb_mapiter_next(map, &iter)) { + * upb_msgval key = upb_mapiter_key(map, iter); + * upb_msgval val = upb_mapiter_value(map, iter); + * + * // If mutating is desired. + * upb_mapiter_setvalue(map, iter, value2); + * } + */ + +/* Advances to the next entry. Returns false if no more entries are present. */ +bool upb_mapiter_next(const upb_map *map, size_t *iter); + +/* Returns the key and value for this entry of the map. */ +upb_msgval upb_mapiter_key(const upb_map *map, size_t iter); +upb_msgval upb_mapiter_value(const upb_map *map, size_t iter); + +/* Sets the value for this entry. The iterator must not be done, and the + * iterator must not have been initialized const. */ +void upb_mapiter_setvalue(upb_map *map, size_t iter, upb_msgval value); + +#include "upb/port_undef.inc" + +#endif /* UPB_REFLECTION_H_ */ diff --git a/upb/table.c b/upb/table.c index fd5bc53f962..21f8fcf6f87 100644 --- a/upb/table.c +++ b/upb/table.c @@ -16,12 +16,6 @@ #define ARRAY_SIZE(x) \ ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x]))))) -static void upb_check_alloc(upb_table *t, upb_alloc *a) { - UPB_UNUSED(t); - UPB_UNUSED(a); - UPB_ASSERT_DEBUGVAR(t->alloc == a); -} - static const double MAX_LOAD = 0.85; /* The minimum utilization of the array part of a mixed hash/array table. This @@ -100,17 +94,12 @@ static bool isfull(upb_table *t) { } } -static bool init(upb_table *t, upb_ctype_t ctype, uint8_t size_lg2, - upb_alloc *a) { +static bool init(upb_table *t, uint8_t size_lg2, upb_alloc *a) { size_t bytes; t->count = 0; - t->ctype = ctype; t->size_lg2 = size_lg2; t->mask = upb_table_size(t) ? upb_table_size(t) - 1 : 0; -#ifndef NDEBUG - t->alloc = a; -#endif bytes = upb_table_size(t) * sizeof(upb_tabent); if (bytes > 0) { t->entries = upb_malloc(a, bytes); @@ -123,7 +112,6 @@ static bool init(upb_table *t, upb_ctype_t ctype, uint8_t size_lg2, } static void uninit(upb_table *t, upb_alloc *a) { - upb_check_alloc(t, a); upb_free(a, mutable_entries(t)); } @@ -159,7 +147,7 @@ static bool lookup(const upb_table *t, lookupkey_t key, upb_value *v, const upb_tabent *e = findentry(t, key, hash, eql); if (e) { if (v) { - _upb_value_setval(v, e->val.val, t->ctype); + _upb_value_setval(v, e->val.val); } return true; } else { @@ -175,7 +163,6 @@ static void insert(upb_table *t, lookupkey_t key, upb_tabkey tabkey, upb_tabent *our_e; UPB_ASSERT(findentry(t, key, hash, eql) == NULL); - UPB_ASSERT_DEBUGVAR(val.ctype == t->ctype); t->count++; mainpos_e = getentry_mutable(t, hash); @@ -221,7 +208,7 @@ static bool rm(upb_table *t, lookupkey_t key, upb_value *val, if (eql(chain->key, key)) { /* Element to remove is at the head of its chain. */ t->count--; - if (val) _upb_value_setval(val, chain->val.val, t->ctype); + if (val) _upb_value_setval(val, chain->val.val); if (removed) *removed = chain->key; if (chain->next) { upb_tabent *move = (upb_tabent*)chain->next; @@ -241,7 +228,7 @@ static bool rm(upb_table *t, lookupkey_t key, upb_value *val, /* Found element to remove. */ upb_tabent *rm = (upb_tabent*)chain->next; t->count--; - if (val) _upb_value_setval(val, chain->next->val.val, t->ctype); + if (val) _upb_value_setval(val, chain->next->val.val); if (removed) *removed = rm->key; rm->key = 0; /* Make the slot empty. */ chain->next = rm->next; @@ -294,7 +281,13 @@ static bool streql(upb_tabkey k1, lookupkey_t k2) { } bool upb_strtable_init2(upb_strtable *t, upb_ctype_t ctype, upb_alloc *a) { - return init(&t->t, ctype, 2, a); + return init(&t->t, 2, a); +} + +void upb_strtable_clear(upb_strtable *t) { + size_t bytes = upb_table_size(&t->t) * sizeof(upb_tabent); + t->t.count = 0; + memset((char*)t->t.entries, 0, bytes); } void upb_strtable_uninit2(upb_strtable *t, upb_alloc *a) { @@ -308,18 +301,14 @@ bool upb_strtable_resize(upb_strtable *t, size_t size_lg2, upb_alloc *a) { upb_strtable new_table; upb_strtable_iter i; - upb_check_alloc(&t->t, a); - - if (!init(&new_table.t, t->t.ctype, size_lg2, a)) + if (!init(&new_table.t, size_lg2, a)) return false; upb_strtable_begin(&i, t); for ( ; !upb_strtable_done(&i); upb_strtable_next(&i)) { + upb_strview key = upb_strtable_iter_key(&i); upb_strtable_insert3( - &new_table, - upb_strtable_iter_key(&i), - upb_strtable_iter_keylength(&i), - upb_strtable_iter_value(&i), - a); + &new_table, key.data, key.size, + upb_strtable_iter_value(&i), a); } upb_strtable_uninit2(t, a); *t = new_table; @@ -332,8 +321,6 @@ bool upb_strtable_insert3(upb_strtable *t, const char *k, size_t len, upb_tabkey tabkey; uint32_t hash; - upb_check_alloc(&t->t, a); - if (isfull(&t->t)) { /* Need to resize. New table of double the size, add old elements to it. */ if (!upb_strtable_resize(t, t->t.size_lg2 + 1, a)) { @@ -361,7 +348,10 @@ bool upb_strtable_remove3(upb_strtable *t, const char *key, size_t len, uint32_t hash = upb_murmur_hash2(key, len, 0); upb_tabkey tabkey; if (rm(&t->t, strkey2(key, len), val, &tabkey, hash, &streql)) { - upb_free(alloc, (void*)tabkey); + if (alloc) { + /* Arena-based allocs don't need to free and won't pass this. */ + upb_free(alloc, (void*)tabkey); + } return true; } else { return false; @@ -370,10 +360,6 @@ bool upb_strtable_remove3(upb_strtable *t, const char *key, size_t len, /* Iteration */ -static const upb_tabent *str_tabent(const upb_strtable_iter *i) { - return &i->t->t.entries[i->index]; -} - void upb_strtable_begin(upb_strtable_iter *i, const upb_strtable *t) { i->t = t; i->index = begin(&t->t); @@ -389,21 +375,18 @@ bool upb_strtable_done(const upb_strtable_iter *i) { upb_tabent_isempty(str_tabent(i)); } -const char *upb_strtable_iter_key(const upb_strtable_iter *i) { - UPB_ASSERT(!upb_strtable_done(i)); - return upb_tabstr(str_tabent(i)->key, NULL); -} - -size_t upb_strtable_iter_keylength(const upb_strtable_iter *i) { +upb_strview upb_strtable_iter_key(const upb_strtable_iter *i) { + upb_strview key; uint32_t len; UPB_ASSERT(!upb_strtable_done(i)); - upb_tabstr(str_tabent(i)->key, &len); - return len; + key.data = upb_tabstr(str_tabent(i)->key, &len); + key.size = len; + return key; } upb_value upb_strtable_iter_value(const upb_strtable_iter *i) { UPB_ASSERT(!upb_strtable_done(i)); - return _upb_value_val(str_tabent(i)->val.val, i->t->t.ctype); + return _upb_value_val(str_tabent(i)->val.val); } void upb_strtable_iter_setdone(upb_strtable_iter *i) { @@ -469,11 +452,11 @@ static void check(upb_inttable *t) { #endif } -bool upb_inttable_sizedinit(upb_inttable *t, upb_ctype_t ctype, - size_t asize, int hsize_lg2, upb_alloc *a) { +bool upb_inttable_sizedinit(upb_inttable *t, size_t asize, int hsize_lg2, + upb_alloc *a) { size_t array_bytes; - if (!init(&t->t, ctype, hsize_lg2, a)) return false; + if (!init(&t->t, hsize_lg2, a)) return false; /* Always make the array part at least 1 long, so that we know key 0 * won't be in the hash part, which simplifies things. */ t->array_size = UPB_MAX(1, asize); @@ -490,7 +473,7 @@ bool upb_inttable_sizedinit(upb_inttable *t, upb_ctype_t ctype, } bool upb_inttable_init2(upb_inttable *t, upb_ctype_t ctype, upb_alloc *a) { - return upb_inttable_sizedinit(t, ctype, 0, 4, a); + return upb_inttable_sizedinit(t, 0, 4, a); } void upb_inttable_uninit2(upb_inttable *t, upb_alloc *a) { @@ -504,8 +487,6 @@ bool upb_inttable_insert2(upb_inttable *t, uintptr_t key, upb_value val, tabval.val = val.val; UPB_ASSERT(upb_arrhas(tabval)); /* This will reject (uint64_t)-1. Fix this. */ - upb_check_alloc(&t->t, a); - if (key < t->array_size) { UPB_ASSERT(!upb_arrhas(t->array[key])); t->array_count++; @@ -516,7 +497,7 @@ bool upb_inttable_insert2(upb_inttable *t, uintptr_t key, upb_value val, size_t i; upb_table new_table; - if (!init(&new_table, t->t.ctype, t->t.size_lg2 + 1, a)) { + if (!init(&new_table, t->t.size_lg2 + 1, a)) { return false; } @@ -525,7 +506,7 @@ bool upb_inttable_insert2(upb_inttable *t, uintptr_t key, upb_value val, uint32_t hash; upb_value v; - _upb_value_setval(&v, e->val.val, t->t.ctype); + _upb_value_setval(&v, e->val.val); hash = upb_inthash(e->key); insert(&new_table, intkey(e->key), e->key, v, hash, &inthash, &inteql); } @@ -544,7 +525,7 @@ bool upb_inttable_insert2(upb_inttable *t, uintptr_t key, upb_value val, bool upb_inttable_lookup(const upb_inttable *t, uintptr_t key, upb_value *v) { const upb_tabval *table_v = inttable_val_const(t, key); if (!table_v) return false; - if (v) _upb_value_setval(v, table_v->val, t->t.ctype); + if (v) _upb_value_setval(v, table_v->val); return true; } @@ -562,7 +543,7 @@ bool upb_inttable_remove(upb_inttable *t, uintptr_t key, upb_value *val) { upb_tabval empty = UPB_TABVALUE_EMPTY_INIT; t->array_count--; if (val) { - _upb_value_setval(val, t->array[key].val, t->t.ctype); + _upb_value_setval(val, t->array[key].val); } mutable_array(t)[key] = empty; success = true; @@ -577,7 +558,6 @@ bool upb_inttable_remove(upb_inttable *t, uintptr_t key, upb_value *val) { } bool upb_inttable_push2(upb_inttable *t, upb_value val, upb_alloc *a) { - upb_check_alloc(&t->t, a); return upb_inttable_insert2(t, upb_inttable_count(t), val, a); } @@ -590,7 +570,6 @@ upb_value upb_inttable_pop(upb_inttable *t) { bool upb_inttable_insertptr2(upb_inttable *t, const void *key, upb_value val, upb_alloc *a) { - upb_check_alloc(&t->t, a); return upb_inttable_insert2(t, (uintptr_t)key, val, a); } @@ -615,8 +594,6 @@ void upb_inttable_compact2(upb_inttable *t, upb_alloc *a) { int size_lg2; upb_inttable new_t; - upb_check_alloc(&t->t, a); - upb_inttable_begin(&i, t); for (; !upb_inttable_done(&i); upb_inttable_next(&i)) { uintptr_t key = upb_inttable_iter_key(&i); @@ -649,7 +626,7 @@ void upb_inttable_compact2(upb_inttable *t, upb_alloc *a) { size_t hash_size = hash_count ? (hash_count / MAX_LOAD) + 1 : 0; int hashsize_lg2 = log2ceil(hash_size); - upb_inttable_sizedinit(&new_t, t->t.ctype, arr_size, hashsize_lg2, a); + upb_inttable_sizedinit(&new_t, arr_size, hashsize_lg2, a); upb_inttable_begin(&i, t); for (; !upb_inttable_done(&i); upb_inttable_next(&i)) { uintptr_t k = upb_inttable_iter_key(&i); @@ -715,8 +692,7 @@ uintptr_t upb_inttable_iter_key(const upb_inttable_iter *i) { upb_value upb_inttable_iter_value(const upb_inttable_iter *i) { UPB_ASSERT(!upb_inttable_done(i)); return _upb_value_val( - i->array_part ? i->t->array[i->index].val : int_tabent(i)->val.val, - i->t->t.ctype); + i->array_part ? i->t->array[i->index].val : int_tabent(i)->val.val); } void upb_inttable_iter_setdone(upb_inttable_iter *i) { diff --git a/upb/table.int.h b/upb/table.int.h index 23b0b2f2213..75575eb7d52 100644 --- a/upb/table.int.h +++ b/upb/table.int.h @@ -52,19 +52,8 @@ typedef enum { typedef struct { uint64_t val; -#ifndef NDEBUG - /* In debug mode we carry the value type around also so we can check accesses - * to be sure the right member is being read. */ - upb_ctype_t ctype; -#endif } upb_value; -#ifdef NDEBUG -#define SET_TYPE(dest, val) UPB_UNUSED(val) -#else -#define SET_TYPE(dest, val) dest = val -#endif - /* Like strdup(), which isn't always available since it's not ANSI C. */ char *upb_strdup(const char *s, upb_alloc *a); /* Variant that works with a length-delimited rather than NULL-delimited string, @@ -75,15 +64,13 @@ UPB_INLINE char *upb_gstrdup(const char *s) { return upb_strdup(s, &upb_alloc_global); } -UPB_INLINE void _upb_value_setval(upb_value *v, uint64_t val, - upb_ctype_t ctype) { +UPB_INLINE void _upb_value_setval(upb_value *v, uint64_t val) { v->val = val; - SET_TYPE(v->ctype, ctype); } -UPB_INLINE upb_value _upb_value_val(uint64_t val, upb_ctype_t ctype) { +UPB_INLINE upb_value _upb_value_val(uint64_t val) { upb_value ret; - _upb_value_setval(&ret, val, ctype); + _upb_value_setval(&ret, val); return ret; } @@ -98,7 +85,6 @@ UPB_INLINE upb_value _upb_value_val(uint64_t val, upb_ctype_t ctype) { #define FUNCS(name, membername, type_t, converter, proto_type) \ UPB_INLINE void upb_value_set ## name(upb_value *val, type_t cval) { \ val->val = (converter)cval; \ - SET_TYPE(val->ctype, proto_type); \ } \ UPB_INLINE upb_value upb_value_ ## name(type_t val) { \ upb_value ret; \ @@ -106,7 +92,6 @@ UPB_INLINE upb_value _upb_value_val(uint64_t val, upb_ctype_t ctype) { return ret; \ } \ UPB_INLINE type_t upb_value_get ## name(upb_value val) { \ - UPB_ASSERT_DEBUGVAR(val.ctype == proto_type); \ return (type_t)(converter)val.val; \ } @@ -124,12 +109,10 @@ FUNCS(fptr, fptr, upb_func*, uintptr_t, UPB_CTYPE_FPTR) UPB_INLINE void upb_value_setfloat(upb_value *val, float cval) { memcpy(&val->val, &cval, sizeof(cval)); - SET_TYPE(val->ctype, UPB_CTYPE_FLOAT); } UPB_INLINE void upb_value_setdouble(upb_value *val, double cval) { memcpy(&val->val, &cval, sizeof(cval)); - SET_TYPE(val->ctype, UPB_CTYPE_DOUBLE); } UPB_INLINE upb_value upb_value_float(float cval) { @@ -173,7 +156,6 @@ typedef struct { #define UPB_TABVALUE_EMPTY_INIT {-1} - /* upb_table ******************************************************************/ typedef struct _upb_tabent { @@ -190,7 +172,6 @@ typedef struct _upb_tabent { typedef struct { size_t count; /* Number of entries in the hash part. */ size_t mask; /* Mask to turn hash value -> bucket. */ - upb_ctype_t ctype; /* Type of all values. */ uint8_t size_lg2; /* Size of the hashtable part is 2^size_lg2 entries. */ /* Hash table entries. @@ -200,17 +181,6 @@ typedef struct { * initialize const hash tables. Then we cast away const when we have to. */ const upb_tabent *entries; - -#ifndef NDEBUG - /* This table's allocator. We make the user pass it in to every relevant - * function and only use this to check it in debug mode. We do this solely - * to keep upb_table as small as possible. This might seem slightly paranoid - * but the plan is to use upb_table for all map fields and extension sets in - * a forthcoming message representation, so there could be a lot of these. - * If this turns out to be too annoying later, we can change it (since this - * is an internal-only header file). */ - upb_alloc *alloc; -#endif } upb_table; typedef struct { @@ -224,12 +194,6 @@ typedef struct { size_t array_count; /* Array part number of elements. */ } upb_inttable; -#define UPB_INTTABLE_INIT(count, mask, ctype, size_lg2, ent, a, asize, acount) \ - {UPB_TABLE_INIT(count, mask, ctype, size_lg2, ent), a, asize, acount} - -#define UPB_EMPTY_INTTABLE_INIT(ctype) \ - UPB_INTTABLE_INIT(0, 0, ctype, 0, NULL, NULL, 0, 0) - #define UPB_ARRAY_EMPTYENT -1 UPB_INLINE size_t upb_table_size(const upb_table *t) { @@ -298,6 +262,7 @@ upb_inttable *upb_inttable_pack(const upb_inttable *t, void *p, size_t *ofs, size_t size); upb_strtable *upb_strtable_pack(const upb_strtable *t, void *p, size_t *ofs, size_t size); +void upb_strtable_clear(upb_strtable *t); /* Inserts the given key into the hashtable with the given value. The key must * not already exist in the hash table. For string tables, the key must be @@ -399,7 +364,7 @@ UPB_INLINE bool upb_inttable_lookup32(const upb_inttable *t, uint32_t key, if (key < t->array_size) { upb_tabval arrval = t->array[key]; if (upb_arrhas(arrval)) { - _upb_value_setval(v, arrval.val, t->t.ctype); + _upb_value_setval(v, arrval.val); return true; } else { return false; @@ -409,7 +374,7 @@ UPB_INLINE bool upb_inttable_lookup32(const upb_inttable *t, uint32_t key, if (t->t.entries == NULL) return false; for (e = upb_getentry(&t->t, upb_inthash(key)); true; e = e->next) { if ((uint32_t)e->key == key) { - _upb_value_setval(v, e->val.val, t->t.ctype); + _upb_value_setval(v, e->val.val); return true; } if (e->next == NULL) return false; @@ -463,8 +428,7 @@ typedef struct { void upb_strtable_begin(upb_strtable_iter *i, const upb_strtable *t); void upb_strtable_next(upb_strtable_iter *i); bool upb_strtable_done(const upb_strtable_iter *i); -const char *upb_strtable_iter_key(const upb_strtable_iter *i); -size_t upb_strtable_iter_keylength(const upb_strtable_iter *i); +upb_strview upb_strtable_iter_key(const upb_strtable_iter *i); upb_value upb_strtable_iter_value(const upb_strtable_iter *i); void upb_strtable_iter_setdone(upb_strtable_iter *i); bool upb_strtable_iter_isequal(const upb_strtable_iter *i1, @@ -488,6 +452,10 @@ typedef struct { bool array_part; } upb_inttable_iter; +UPB_INLINE const upb_tabent *str_tabent(const upb_strtable_iter *i) { + return &i->t->t.entries[i->index]; +} + void upb_inttable_begin(upb_inttable_iter *i, const upb_inttable *t); void upb_inttable_next(upb_inttable_iter *i); bool upb_inttable_done(const upb_inttable_iter *i); diff --git a/upb/textencode.c b/upb/textencode.c new file mode 100644 index 00000000000..8af78ffd4af --- /dev/null +++ b/upb/textencode.c @@ -0,0 +1,393 @@ + +#include "upb/textencode.h" + +#include +#include +#include +#include +#include +#include + +#include "upb/reflection.h" +#include "upb/port_def.inc" + +typedef struct { + char *buf, *ptr, *end; + size_t overflow; + int indent_depth; + int options; + const upb_symtab *ext_pool; +} txtenc; + +static void txtenc_msg(txtenc *e, const upb_msg *msg, const upb_msgdef *m); + +#define CHK(x) do { if (!(x)) { return false; } } while(0) + +static void txtenc_putbytes(txtenc *e, const void *data, size_t len) { + size_t have = e->end - e->ptr; + if (UPB_LIKELY(have >= len)) { + memcpy(e->ptr, data, len); + e->ptr += len; + } else { + memcpy(e->ptr, data, have); + e->ptr += have; + e->overflow += (len - have); + } +} + +static void txtenc_putstr(txtenc *e, const char *str) { + txtenc_putbytes(e, str, strlen(str)); +} + +static void txtenc_printf(txtenc *e, const char *fmt, ...) { + size_t n; + size_t have = e->end - e->ptr; + va_list args; + + va_start(args, fmt); + n = _upb_vsnprintf(e->ptr, have, fmt, args); + va_end(args); + + if (UPB_LIKELY(have > n)) { + e->ptr += n; + } else { + e->ptr += have; + e->overflow += (n - have); + } +} + +static void txtenc_indent(txtenc *e) { + if ((e->options & UPB_TXTENC_SINGLELINE) == 0) { + int i = e->indent_depth; + while (i-- > 0) { + txtenc_putstr(e, " "); + } + } +} + +static void txtenc_endfield(txtenc *e) { + if (e->options & UPB_TXTENC_SINGLELINE) { + txtenc_putstr(e, " "); + } else { + txtenc_putstr(e, "\n"); + } +} + +static void txtenc_enum(int32_t val, const upb_fielddef *f, txtenc *e) { + const upb_enumdef *e_def = upb_fielddef_enumsubdef(f); + const char *name = upb_enumdef_iton(e_def, val); + + if (name) { + txtenc_printf(e, "%s", name); + } else { + txtenc_printf(e, "%" PRId32, val); + } +} + +static void txtenc_string(txtenc *e, upb_strview str, bool bytes) { + const char *ptr = str.data; + const char *end = ptr + str.size; + txtenc_putstr(e, "\""); + + while (ptr < end) { + switch (*ptr) { + case '\n': + txtenc_putstr(e, "\\n"); + break; + case '\r': + txtenc_putstr(e, "\\r"); + break; + case '\t': + txtenc_putstr(e, "\\t"); + break; + case '\"': + txtenc_putstr(e, "\\\""); + break; + case '\'': + txtenc_putstr(e, "\\'"); + break; + case '\\': + txtenc_putstr(e, "\\\\"); + break; + default: + if ((bytes || (uint8_t)*ptr < 0x80) && !isprint(*ptr)) { + txtenc_printf(e, "\\%03o", (int)(uint8_t)*ptr); + } else { + txtenc_putbytes(e, ptr, 1); + } + } + ptr++; + } + + txtenc_putstr(e, "\""); +} + +static void txtenc_field(txtenc *e, upb_msgval val, const upb_fielddef *f) { + txtenc_indent(e); + txtenc_printf(e, "%s: ", upb_fielddef_name(f)); + + switch (upb_fielddef_type(f)) { + case UPB_TYPE_BOOL: + txtenc_putstr(e, val.bool_val ? "true" : "false"); + break; + case UPB_TYPE_FLOAT: + txtenc_printf(e, "%f", val.float_val); + break; + case UPB_TYPE_DOUBLE: + txtenc_printf(e, "%f", val.double_val); + break; + case UPB_TYPE_INT32: + txtenc_printf(e, "%" PRId32, val.int32_val); + break; + case UPB_TYPE_UINT32: + txtenc_printf(e, "%" PRIu32, val.uint32_val); + break; + case UPB_TYPE_INT64: + txtenc_printf(e, "%" PRId64, val.int64_val); + break; + case UPB_TYPE_UINT64: + txtenc_printf(e, "%" PRIu64, val.uint64_val); + break; + case UPB_TYPE_STRING: + txtenc_string(e, val.str_val, false); + break; + case UPB_TYPE_BYTES: + txtenc_string(e, val.str_val, true); + break; + case UPB_TYPE_ENUM: + txtenc_enum(val.int32_val, f, e); + break; + case UPB_TYPE_MESSAGE: + txtenc_putstr(e, "{"); + e->indent_depth++; + txtenc_msg(e, val.msg_val, upb_fielddef_msgsubdef(f)); + e->indent_depth--; + txtenc_indent(e); + txtenc_putstr(e, "}"); + break; + } + + txtenc_endfield(e); +} + +/* + * Arrays print as simple repeated elements, eg. + * + * foo_field: 1 + * foo_field: 2 + * foo_field: 3 + */ +static void txtenc_array(txtenc *e, const upb_array *arr, + const upb_fielddef *f) { + size_t i; + size_t size = upb_array_size(arr); + + for (i = 0; i < size; i++) { + txtenc_field(e, upb_array_get(arr, i), f); + } +} + +/* + * Maps print as messages of key/value, etc. + * + * foo_map: { + * key: "abc" + * value: 123 + * } + * foo_map: { + * key: "def" + * value: 456 + * } + */ +static void txtenc_map(txtenc *e, const upb_map *map, const upb_fielddef *f) { + const upb_msgdef *entry = upb_fielddef_msgsubdef(f); + const upb_fielddef *key_f = upb_msgdef_itof(entry, 1); + const upb_fielddef *val_f = upb_msgdef_itof(entry, 2); + size_t iter = UPB_MAP_BEGIN; + + while (upb_mapiter_next(map, &iter)) { + upb_msgval key = upb_mapiter_key(map, iter); + upb_msgval val = upb_mapiter_value(map, iter); + + txtenc_indent(e); + txtenc_printf(e, "%s: {", upb_fielddef_name(f)); + txtenc_endfield(e); + e->indent_depth++; + + txtenc_field(e, key, key_f); + txtenc_field(e, val, val_f); + + e->indent_depth--; + txtenc_indent(e); + txtenc_putstr(e, "}"); + txtenc_endfield(e); + } +} + +static const char *txtenc_parsevarint(const char *ptr, const char *limit, + uint64_t *val) { + uint8_t byte; + int bitpos = 0; + *val = 0; + + do { + CHK(bitpos < 70 && ptr < limit); + byte = *ptr; + *val |= (uint64_t)(byte & 0x7F) << bitpos; + ptr++; + bitpos += 7; + } while (byte & 0x80); + + return ptr; +} + +/* + * Unknown fields are printed by number. + * + * 1001: 123 + * 1002: "hello" + * 1006: 0xdeadbeef + * 1003: { + * 1: 111 + * } + */ +static const char *txtenc_unknown(txtenc *e, const char *ptr, const char *end, + int groupnum) { + while (ptr < end) { + uint64_t tag_64; + uint32_t tag; + CHK(ptr = txtenc_parsevarint(ptr, end, &tag_64)); + CHK(tag_64 < UINT32_MAX); + tag = tag_64; + + if ((tag & 7) == UPB_WIRE_TYPE_END_GROUP) { + CHK((tag >> 3) == groupnum); + return ptr; + } + + txtenc_indent(e); + txtenc_printf(e, "%d: ", (int)(tag >> 3)); + + switch (tag & 7) { + case UPB_WIRE_TYPE_VARINT: { + uint64_t val; + CHK(ptr = txtenc_parsevarint(ptr, end, &val)); + txtenc_printf(e, "%" PRIu64, val); + break; + } + case UPB_WIRE_TYPE_32BIT: { + uint32_t val; + CHK(end - ptr >= 4); + memcpy(&val, ptr, 4); + ptr += 4; + txtenc_printf(e, "0x%08" PRIu32, val); + break; + } + case UPB_WIRE_TYPE_64BIT: { + uint64_t val; + CHK(end - ptr >= 8); + memcpy(&val, ptr, 8); + ptr += 8; + txtenc_printf(e, "0x%016" PRIu64, val); + break; + } + case UPB_WIRE_TYPE_DELIMITED: { + uint64_t len; + char *start = e->ptr; + size_t start_overflow = e->overflow; + CHK(ptr = txtenc_parsevarint(ptr, end, &len)); + CHK(end - ptr >= len); + + /* Speculatively try to parse as message. */ + txtenc_putstr(e, "{"); + txtenc_endfield(e); + e->indent_depth++; + if (txtenc_unknown(e, ptr, end, -1)) { + e->indent_depth--; + txtenc_indent(e); + txtenc_putstr(e, "}"); + } else { + /* Didn't work out, print as raw bytes. */ + e->indent_depth--; + e->ptr = start; + e->overflow = start_overflow; + upb_strview str = {ptr, len}; + txtenc_string(e, str, true); + } + ptr += len; + break; + } + case UPB_WIRE_TYPE_START_GROUP: + txtenc_putstr(e, "{"); + txtenc_endfield(e); + e->indent_depth++; + CHK(ptr = txtenc_unknown(e, ptr, end, tag >> 3)); + e->indent_depth--; + txtenc_indent(e); + txtenc_putstr(e, "}"); + break; + } + txtenc_endfield(e); + } + + return groupnum == -1 ? ptr : NULL; +} + +static void txtenc_msg(txtenc *e, const upb_msg *msg, + const upb_msgdef *m) { + size_t iter = UPB_MSG_BEGIN; + const upb_fielddef *f; + upb_msgval val; + + while (upb_msg_next(msg, m, e->ext_pool, &f, &val, &iter)) { + if (upb_fielddef_ismap(f)) { + txtenc_map(e, val.map_val, f); + } else if (upb_fielddef_isseq(f)) { + txtenc_array(e, val.array_val, f); + } else { + txtenc_field(e, val, f); + } + } + + if ((e->options & UPB_TXTENC_SKIPUNKNOWN) == 0) { + size_t len; + const char *ptr = upb_msg_getunknown(msg, &len); + char *start = e->ptr; + if (ptr) { + if (!txtenc_unknown(e, ptr, ptr + len, -1)) { + /* Unknown failed to parse, back up and don't print it at all. */ + e->ptr = start; + } + } + } +} + +size_t txtenc_nullz(txtenc *e, size_t size) { + size_t ret = e->ptr - e->buf + e->overflow; + + if (size > 0) { + if (e->ptr == e->end) e->ptr--; + *e->ptr = '\0'; + } + + return ret; +} + +size_t upb_textencode(const upb_msg *msg, const upb_msgdef *m, + const upb_symtab *ext_pool, int options, char *buf, + size_t size) { + txtenc e; + + e.buf = buf; + e.ptr = buf; + e.end = buf + size; + e.overflow = 0; + e.indent_depth = 0; + e.options = options; + e.ext_pool = ext_pool; + + txtenc_msg(&e, msg, m); + return txtenc_nullz(&e, size); +} + +#undef CHK diff --git a/upb/textencode.h b/upb/textencode.h new file mode 100644 index 00000000000..87ceed0c062 --- /dev/null +++ b/upb/textencode.h @@ -0,0 +1,27 @@ + +#ifndef UPB_TEXTENCODE_H_ +#define UPB_TEXTENCODE_H_ + +#include "upb/def.h" + +enum { + /* When set, prints everything on a single line. */ + UPB_TXTENC_SINGLELINE = 1, + + /* When set, unknown fields are not printed. */ + UPB_TXTENC_SKIPUNKNOWN = 2 +}; + +/* Encodes the given |msg| to text format. The message's reflection is given in + * |m|. The symtab in |symtab| is used to find extensions (if NULL, extensions + * will not be printed). + * + * Output is placed in the given buffer, and always NULL-terminated. The output + * size (excluding NULL) is returned. This means that a return value >= |size| + * implies that the output was truncated. (These are the same semantics as + * snprintf()). */ +size_t upb_textencode(const upb_msg *msg, const upb_msgdef *m, + const upb_symtab *ext_pool, int options, char *buf, + size_t size); + +#endif /* UPB_TEXTENCODE_H_ */ diff --git a/upb/upb.h b/upb/upb.h index 79c19d281e9..011103d949a 100644 --- a/upb/upb.h +++ b/upb/upb.h @@ -318,14 +318,15 @@ typedef enum { UPB_TYPE_INT32 = 3, UPB_TYPE_UINT32 = 4, UPB_TYPE_ENUM = 5, /* Enum values are int32. */ - /* Types stored as pointers (probably 4 or 8 bytes). */ - UPB_TYPE_STRING = 6, - UPB_TYPE_BYTES = 7, - UPB_TYPE_MESSAGE = 8, + /* Types stored as void* (probably 4 or 8 bytes). */ + UPB_TYPE_MESSAGE = 6, /* Types stored as 8 bytes. */ - UPB_TYPE_DOUBLE = 9, - UPB_TYPE_INT64 = 10, - UPB_TYPE_UINT64 = 11 + UPB_TYPE_DOUBLE = 7, + UPB_TYPE_INT64 = 8, + UPB_TYPE_UINT64 = 9, + /* Types stored as upb_strview (2 * void*) (probably 8 or 16 bytes). */ + UPB_TYPE_STRING = 10, + UPB_TYPE_BYTES = 11 } upb_fieldtype_t; /* The repeated-ness of each field; this matches descriptor.proto. */ @@ -357,7 +358,7 @@ typedef enum { UPB_DESCRIPTOR_TYPE_SINT64 = 18 } upb_descriptortype_t; -extern const uint8_t upb_desctype_to_fieldtype[]; +#define UPB_MAP_BEGIN -1 #include "upb/port_undef.inc" diff --git a/upbc/generator.cc b/upbc/generator.cc index 7096278180b..50fb42d5647 100644 --- a/upbc/generator.cc +++ b/upbc/generator.cc @@ -331,21 +331,24 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output output("/* $0 */\n\n", message->full_name()); std::string msgname = ToCIdent(message->full_name()); - output( - "UPB_INLINE $0 *$0_new(upb_arena *arena) {\n" - " return ($0 *)upb_msg_new(&$1, arena);\n" - "}\n" - "UPB_INLINE $0 *$0_parse(const char *buf, size_t size,\n" - " upb_arena *arena) {\n" - " $0 *ret = $0_new(arena);\n" - " return (ret && upb_decode(buf, size, ret, &$1, arena)) ? ret : NULL;\n" - "}\n" - "UPB_INLINE char *$0_serialize(const $0 *msg, upb_arena *arena, size_t " - "*len) {\n" - " return upb_encode(msg, &$1, arena, len);\n" - "}\n" - "\n", - MessageName(message), MessageInit(message)); + + if (!message->options().map_entry()) { + output( + "UPB_INLINE $0 *$0_new(upb_arena *arena) {\n" + " return ($0 *)_upb_msg_new(&$1, arena);\n" + "}\n" + "UPB_INLINE $0 *$0_parse(const char *buf, size_t size,\n" + " upb_arena *arena) {\n" + " $0 *ret = $0_new(arena);\n" + " return (ret && upb_decode(buf, size, ret, &$1, arena)) ? ret : NULL;\n" + "}\n" + "UPB_INLINE char *$0_serialize(const $0 *msg, upb_arena *arena, size_t " + "*len) {\n" + " return upb_encode(msg, &$1, arena, len);\n" + "}\n" + "\n", + MessageName(message), MessageInit(message)); + } for (int i = 0; i < message->oneof_decl_count(); i++) { const protobuf::OneofDescriptor* oneof = message->oneof_decl(i); @@ -367,8 +370,10 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output GetSizeInit(layout.GetOneofCaseOffset(oneof))); } - for (auto field : FieldNumberOrder(message)) { + // Generate const methods. + for (auto field : FieldNumberOrder(message)) { + // Generate hazzer (if any). if (layout.HasHasbit(field)) { output( "UPB_INLINE bool $0_has_$1(const $0 *msg) { " @@ -383,7 +388,43 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output field->number()); } - if (field->is_repeated()) { + // Generate getter. + if (field->is_map()) { + const protobuf::Descriptor* entry = field->message_type(); + const protobuf::FieldDescriptor* key = entry->FindFieldByNumber(1); + const protobuf::FieldDescriptor* val = entry->FindFieldByNumber(2); + output( + "UPB_INLINE size_t $0_$1_size(const $0 *msg) {" + "return _upb_msg_map_size(msg, $2); }\n", + msgname, field->name(), GetSizeInit(layout.GetFieldOffset(field))); + output( + "UPB_INLINE bool $0_$1_get(const $0 *msg, $2 key, $3 *val) { " + "return _upb_msg_map_get(msg, $4, &key, $5, val, $6); }\n", + msgname, field->name(), CType(key), CType(val), + GetSizeInit(layout.GetFieldOffset(field)), + key->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_STRING + ? "0" + : "sizeof(key)", + val->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_STRING + ? "0" + : "sizeof(*val)"); + output( + "UPB_INLINE $0 $1_$2_next(const $1 *msg, size_t* iter) { " + "return ($0)_upb_msg_map_next(msg, $3, iter); }\n", + CTypeConst(field), msgname, field->name(), + GetSizeInit(layout.GetFieldOffset(field))); + } else if (message->options().map_entry()) { + output( + "UPB_INLINE $0 $1_$2(const $1 *msg) {\n" + " $3 ret;\n" + " _upb_msg_map_$2(msg, &ret, $4);\n" + " return ret;\n" + "}\n", + CTypeConst(field), msgname, field->name(), CType(field), + field->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_STRING + ? "0" + : "sizeof(ret)"); + } else if (field->is_repeated()) { output( "UPB_INLINE $0 const* $1_$2(const $1 *msg, size_t *len) { " "return ($0 const*)_upb_array_accessor(msg, $3, len); }\n", @@ -408,8 +449,43 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output output("\n"); + // Generate mutable methods. + for (auto field : FieldNumberOrder(message)) { - if (field->is_repeated()) { + if (field->is_map()) { + // TODO(haberman): add map-based mutators. + const protobuf::Descriptor* entry = field->message_type(); + const protobuf::FieldDescriptor* key = entry->FindFieldByNumber(1); + const protobuf::FieldDescriptor* val = entry->FindFieldByNumber(2); + output( + "UPB_INLINE void $0_$1_clear($0 *msg) { _upb_msg_map_clear(msg, $2); }\n", + msgname, field->name(), + GetSizeInit(layout.GetFieldOffset(field))); + output( + "UPB_INLINE bool $0_$1_set($0 *msg, $2 key, $3 val, upb_arena *a) { " + "return _upb_msg_map_set(msg, $4, &key, $5, &val, $6, a); }\n", + msgname, field->name(), CType(key), CType(val), + GetSizeInit(layout.GetFieldOffset(field)), + key->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_STRING + ? "0" + : "sizeof(key)", + val->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_STRING + ? "0" + : "sizeof(val)"); + output( + "UPB_INLINE bool $0_$1_delete($0 *msg, $2 key) { " + "return _upb_msg_map_delete(msg, $3, &key, $4); }\n", + msgname, field->name(), CType(key), + GetSizeInit(layout.GetFieldOffset(field)), + key->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_STRING + ? "0" + : "sizeof(key)"); + output( + "UPB_INLINE $0 $1_$2_nextmutable($1 *msg, size_t* iter) { " + "return ($0)_upb_msg_map_next(msg, $3, iter); }\n", + CType(field), msgname, field->name(), + GetSizeInit(layout.GetFieldOffset(field))); + } else if (field->is_repeated()) { output( "UPB_INLINE $0* $1_mutable_$2($1 *msg, size_t *len) {\n" " return ($0*)_upb_array_mutable_accessor(msg, $3, len);\n" @@ -419,17 +495,15 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output output( "UPB_INLINE $0* $1_resize_$2($1 *msg, size_t len, " "upb_arena *arena) {\n" - " return ($0*)_upb_array_resize_accessor(msg, $3, len, $4, $5, " - "arena);\n" + " return ($0*)_upb_array_resize_accessor(msg, $3, len, $4, arena);\n" "}\n", CType(field), msgname, field->name(), GetSizeInit(layout.GetFieldOffset(field)), - GetSizeInit(MessageLayout::SizeOfUnwrapped(field).size), UpbType(field)); if (field->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_MESSAGE) { output( "UPB_INLINE struct $0* $1_add_$2($1 *msg, upb_arena *arena) {\n" - " struct $0* sub = (struct $0*)upb_msg_new(&$3, arena);\n" + " struct $0* sub = (struct $0*)_upb_msg_new(&$3, arena);\n" " bool ok = _upb_array_append_accessor(\n" " msg, $4, $5, $6, &sub, arena);\n" " if (!ok) return NULL;\n" @@ -443,8 +517,8 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output } else { output( "UPB_INLINE bool $1_add_$2($1 *msg, $0 val, upb_arena *arena) {\n" - " return _upb_array_append_accessor(\n" - " msg, $3, $4, $5, &val, arena);\n" + " return _upb_array_append_accessor(msg, $3, $4, $5, &val,\n" + " arena);\n" "}\n", CType(field), msgname, field->name(), GetSizeInit(layout.GetFieldOffset(field)), @@ -452,9 +526,25 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output UpbType(field)); } } else { + // Non-repeated field. + if (message->options().map_entry() && field->name() == "key") { + // Key cannot be mutated. + continue; + } + + // The common function signature for all setters. Varying implementations + // follow. output("UPB_INLINE void $0_set_$1($0 *msg, $2 value) {\n", msgname, field->name(), CType(field)); - if (field->containing_oneof()) { + + if (message->options().map_entry()) { + output( + " _upb_msg_map_set_value(msg, &value, $0);\n" + "}\n", + field->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_STRING + ? "0" + : "sizeof(" + CType(field) + ")"); + } else if (field->containing_oneof()) { output( " UPB_WRITE_ONEOF(msg, $0, $1, value, $2, $3);\n" "}\n", @@ -470,12 +560,14 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output "}\n", CType(field), GetSizeInit(layout.GetFieldOffset(field))); } - if (field->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_MESSAGE) { + + if (field->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_MESSAGE && + !message->options().map_entry()) { output( "UPB_INLINE struct $0* $1_mutable_$2($1 *msg, upb_arena *arena) {\n" " struct $0* sub = (struct $0*)$1_$2(msg);\n" " if (sub == NULL) {\n" - " sub = (struct $0*)upb_msg_new(&$3, arena);\n" + " sub = (struct $0*)_upb_msg_new(&$3, arena);\n" " if (!sub) return NULL;\n" " $1_set_$2(msg, sub);\n" " }\n" @@ -495,7 +587,6 @@ void WriteHeader(const protobuf::FileDescriptor* file, Output& output) { output( "#ifndef $0_UPB_H_\n" "#define $0_UPB_H_\n\n" - "#include \"upb/generated_util.h\"\n" "#include \"upb/msg.h\"\n" "#include \"upb/decode.h\"\n" "#include \"upb/encode.h\"\n\n", @@ -661,6 +752,8 @@ void WriteSource(const protobuf::FileDescriptor* file, Output& output) { case_offset.size64 = -case_offset.size64 - 1; presence = GetSizeInit(case_offset); } + // Sync '4' with UPB_LABEL_MAP in upb/msg.h. + int label = field->is_map() ? 4 : field->label(); output(" {$0, $1, $2, $3, $4, $5},\n", field->number(), @@ -668,7 +761,7 @@ void WriteSource(const protobuf::FileDescriptor* file, Output& output) { presence, submsg_index, field->type(), - field->label()); + label); } output("};\n\n"); } @@ -752,12 +845,27 @@ void WriteDefSource(const protobuf::FileDescriptor* file, Output& output) { output("extern upb_def_init $0;\n", DefInitSymbol(file->dependency(i))); } + std::vector file_messages = + SortedMessages(file); + + for (auto message : file_messages) { + output("extern const upb_msglayout $0;\n", MessageInit(message)); + } + output("\n"); + + output("static const upb_msglayout *layouts[$0] = {\n", file_messages.size()); + for (auto message : file_messages) { + output(" &$0,\n", MessageInit(message)); + } + output("};\n"); + output("\n"); + protobuf::FileDescriptorProto file_proto; file->CopyTo(&file_proto); std::string file_data; file_proto.SerializeToString(&file_data); - output("static const char descriptor[$0] =\n", file_data.size()); + output("static const char descriptor[$0] =", file_data.size()); { if (file_data.size() > 65535) { @@ -777,13 +885,15 @@ void WriteDefSource(const protobuf::FileDescriptor* file, Output& output) { // Only write 40 bytes per line. static const size_t kBytesPerLine = 40; for (size_t i = 0; i < file_data.size(); i += kBytesPerLine) { + output("\n"); output( - "\"$0\"\n", + " \"$0\"", EscapeTrigraphs(absl::CEscape(file_data.substr(i, kBytesPerLine)))); } } output(";\n"); } + output("\n"); output("static upb_def_init *deps[$0] = {\n", file->dependency_count() + 1); for (int i = 0; i < file->dependency_count(); i++) { @@ -791,9 +901,11 @@ void WriteDefSource(const protobuf::FileDescriptor* file, Output& output) { } output(" NULL\n"); output("};\n"); + output("\n"); output("upb_def_init $0 = {\n", DefInitSymbol(file)); output(" deps,\n"); + output(" layouts,\n"); output(" \"$0\",\n", file->name()); output(" UPB_STRVIEW_INIT(descriptor, $0)\n", file_data.size()); output("};\n"); diff --git a/upbc/message_layout.cc b/upbc/message_layout.cc index f0a68725c20..bf3eb2b3bd1 100644 --- a/upbc/message_layout.cc +++ b/upbc/message_layout.cc @@ -1,5 +1,6 @@ #include "upbc/message_layout.h" +#include "google/protobuf/descriptor.pb.h" namespace upbc { @@ -25,12 +26,18 @@ MessageLayout::Size MessageLayout::Place( bool MessageLayout::HasHasbit(const protobuf::FieldDescriptor* field) { return field->file()->syntax() == protobuf::FileDescriptor::SYNTAX_PROTO2 && field->label() != protobuf::FieldDescriptor::LABEL_REPEATED && - !field->containing_oneof(); + !field->containing_oneof() && + !field->containing_type()->options().map_entry(); } MessageLayout::SizeAndAlign MessageLayout::SizeOf( const protobuf::FieldDescriptor* field) { - if (field->is_repeated()) { + if (field->containing_type()->options().map_entry()) { + // Map entries aren't actually stored, they are only used during parsing. + // For parsing, it helps a lot if all map entry messages have the same + // layout. + return {{8, 16}, {4, 8}}; // upb_stringview + } else if (field->is_repeated()) { return {{4, 8}, {4, 8}}; // Pointer to array object. } else { return SizeOfUnwrapped(field); From 695163261247d849b883e317826d0c97a347e4bb Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 4 Feb 2020 10:12:28 -0800 Subject: [PATCH 002/239] Ran gen_upb_api.sh. --- .../envoy/api/v2/auth/cert.upb.h | 131 ++-- .../ext/upb-generated/envoy/api/v2/cds.upb.c | 4 +- .../ext/upb-generated/envoy/api/v2/cds.upb.h | 271 +++---- .../api/v2/cluster/circuit_breaker.upb.h | 19 +- .../envoy/api/v2/cluster/filter.upb.h | 5 +- .../api/v2/cluster/outlier_detection.upb.h | 41 +- .../envoy/api/v2/core/address.upb.h | 33 +- .../envoy/api/v2/core/base.upb.c | 2 +- .../envoy/api/v2/core/base.upb.h | 112 ++- .../envoy/api/v2/core/config_source.upb.h | 39 +- .../envoy/api/v2/core/grpc_service.upb.h | 63 +- .../envoy/api/v2/core/health_check.upb.h | 75 +- .../envoy/api/v2/core/http_uri.upb.h | 5 +- .../envoy/api/v2/core/protocol.upb.h | 37 +- .../envoy/api/v2/discovery.upb.c | 2 +- .../envoy/api/v2/discovery.upb.h | 107 ++- .../ext/upb-generated/envoy/api/v2/eds.upb.c | 2 +- .../ext/upb-generated/envoy/api/v2/eds.upb.h | 78 +- .../envoy/api/v2/endpoint/endpoint.upb.h | 29 +- .../envoy/api/v2/endpoint/load_report.upb.h | 39 +- .../ext/upb-generated/envoy/api/v2/lds.upb.h | 49 +- .../envoy/api/v2/listener/listener.upb.h | 61 +- .../api/v2/listener/udp_listener_config.upb.h | 7 +- .../ext/upb-generated/envoy/api/v2/rds.upb.h | 41 +- .../envoy/api/v2/route/route.upb.c | 12 +- .../envoy/api/v2/route/route.upb.h | 681 +++++++----------- .../ext/upb-generated/envoy/api/v2/srds.upb.h | 13 +- .../filter/accesslog/v2/accesslog.upb.h | 91 ++- .../v2/http_connection_manager.upb.h | 129 ++-- .../config/listener/v2/api_listener.upb.h | 5 +- .../envoy/service/discovery/v2/ads.upb.h | 3 +- .../envoy/service/load_stats/v2/lrs.upb.h | 19 +- .../ext/upb-generated/envoy/type/http.upb.h | 1 - .../envoy/type/matcher/regex.upb.h | 9 +- .../envoy/type/matcher/string.upb.h | 11 +- .../upb-generated/envoy/type/percent.upb.h | 5 +- .../ext/upb-generated/envoy/type/range.upb.h | 5 +- .../ext/upb-generated/gogoproto/gogo.upb.h | 1 - .../google/api/annotations.upb.h | 1 - .../ext/upb-generated/google/api/http.upb.h | 17 +- .../upb-generated/google/protobuf/any.upb.h | 3 +- .../google/protobuf/descriptor.upb.h | 237 +++--- .../google/protobuf/duration.upb.h | 3 +- .../upb-generated/google/protobuf/empty.upb.h | 3 +- .../google/protobuf/struct.upb.c | 2 +- .../google/protobuf/struct.upb.h | 70 +- .../google/protobuf/timestamp.upb.h | 3 +- .../google/protobuf/wrappers.upb.h | 19 +- .../ext/upb-generated/google/rpc/status.upb.h | 7 +- .../src/proto/grpc/gcp/altscontext.upb.c | 2 +- .../src/proto/grpc/gcp/altscontext.upb.h | 51 +- .../src/proto/grpc/gcp/handshaker.upb.c | 8 +- .../src/proto/grpc/gcp/handshaker.upb.h | 184 ++--- .../grpc/gcp/transport_security_common.upb.h | 9 +- .../src/proto/grpc/health/v1/health.upb.h | 5 +- .../src/proto/grpc/lb/v1/load_balancer.upb.h | 41 +- .../udpa/data/orca/v1/orca_load_report.upb.c | 8 +- .../udpa/data/orca/v1/orca_load_report.upb.h | 95 +-- .../ext/upb-generated/validate/validate.upb.h | 319 ++++---- 59 files changed, 1464 insertions(+), 1860 deletions(-) diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h index 252d9d76e9e..b11de083e37 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_AUTH_CERT_PROTO_UPB_H_ #define ENVOY_API_V2_AUTH_CERT_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -78,7 +77,7 @@ typedef enum { /* envoy.api.v2.auth.TlsParameters */ UPB_INLINE envoy_api_v2_auth_TlsParameters *envoy_api_v2_auth_TlsParameters_new(upb_arena *arena) { - return (envoy_api_v2_auth_TlsParameters *)upb_msg_new(&envoy_api_v2_auth_TlsParameters_msginit, arena); + return (envoy_api_v2_auth_TlsParameters *)_upb_msg_new(&envoy_api_v2_auth_TlsParameters_msginit, arena); } UPB_INLINE envoy_api_v2_auth_TlsParameters *envoy_api_v2_auth_TlsParameters_parse(const char *buf, size_t size, upb_arena *arena) { @@ -104,27 +103,27 @@ UPB_INLINE upb_strview* envoy_api_v2_auth_TlsParameters_mutable_cipher_suites(en return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 16), len); } UPB_INLINE upb_strview* envoy_api_v2_auth_TlsParameters_resize_cipher_suites(envoy_api_v2_auth_TlsParameters *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 16), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 16), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_auth_TlsParameters_add_cipher_suites(envoy_api_v2_auth_TlsParameters *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(16, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(16, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* envoy_api_v2_auth_TlsParameters_mutable_ecdh_curves(envoy_api_v2_auth_TlsParameters *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); } UPB_INLINE upb_strview* envoy_api_v2_auth_TlsParameters_resize_ecdh_curves(envoy_api_v2_auth_TlsParameters *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_auth_TlsParameters_add_ecdh_curves(envoy_api_v2_auth_TlsParameters *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(20, 24), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(20, 24), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* envoy.api.v2.auth.PrivateKeyProvider */ UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider *envoy_api_v2_auth_PrivateKeyProvider_new(upb_arena *arena) { - return (envoy_api_v2_auth_PrivateKeyProvider *)upb_msg_new(&envoy_api_v2_auth_PrivateKeyProvider_msginit, arena); + return (envoy_api_v2_auth_PrivateKeyProvider *)_upb_msg_new(&envoy_api_v2_auth_PrivateKeyProvider_msginit, arena); } UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider *envoy_api_v2_auth_PrivateKeyProvider_parse(const char *buf, size_t size, upb_arena *arena) { @@ -157,7 +156,7 @@ UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_config(envoy_api_v2_aut UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_auth_PrivateKeyProvider_mutable_config(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_auth_PrivateKeyProvider_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_PrivateKeyProvider_set_config(msg, sub); } @@ -169,7 +168,7 @@ UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_typed_config(envoy_api_ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_auth_PrivateKeyProvider_mutable_typed_config(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_auth_PrivateKeyProvider_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_PrivateKeyProvider_set_typed_config(msg, sub); } @@ -179,7 +178,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_auth_PrivateKeyProvider_muta /* envoy.api.v2.auth.TlsCertificate */ UPB_INLINE envoy_api_v2_auth_TlsCertificate *envoy_api_v2_auth_TlsCertificate_new(upb_arena *arena) { - return (envoy_api_v2_auth_TlsCertificate *)upb_msg_new(&envoy_api_v2_auth_TlsCertificate_msginit, arena); + return (envoy_api_v2_auth_TlsCertificate *)_upb_msg_new(&envoy_api_v2_auth_TlsCertificate_msginit, arena); } UPB_INLINE envoy_api_v2_auth_TlsCertificate *envoy_api_v2_auth_TlsCertificate_parse(const char *buf, size_t size, upb_arena *arena) { @@ -203,7 +202,7 @@ UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_certificate_chain(envoy_api UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_mutable_certificate_chain(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_TlsCertificate_certificate_chain(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_TlsCertificate_set_certificate_chain(msg, sub); } @@ -215,7 +214,7 @@ UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_private_key(envoy_api_v2_au UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_mutable_private_key(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_TlsCertificate_private_key(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_TlsCertificate_set_private_key(msg, sub); } @@ -227,7 +226,7 @@ UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_password(envoy_api_v2_auth_ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_mutable_password(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_TlsCertificate_password(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_TlsCertificate_set_password(msg, sub); } @@ -239,7 +238,7 @@ UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_ocsp_staple(envoy_api_v2_au UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_mutable_ocsp_staple(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_TlsCertificate_ocsp_staple(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_TlsCertificate_set_ocsp_staple(msg, sub); } @@ -249,10 +248,10 @@ UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsCertificat return (struct envoy_api_v2_core_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsCertificate_resize_signed_certificate_timestamp(envoy_api_v2_auth_TlsCertificate *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_add_signed_certificate_timestamp(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { - struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -264,7 +263,7 @@ UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_private_key_provider(envoy_ UPB_INLINE struct envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCertificate_mutable_private_key_provider(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_auth_PrivateKeyProvider* sub = (struct envoy_api_v2_auth_PrivateKeyProvider*)envoy_api_v2_auth_TlsCertificate_private_key_provider(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_PrivateKeyProvider*)upb_msg_new(&envoy_api_v2_auth_PrivateKeyProvider_msginit, arena); + sub = (struct envoy_api_v2_auth_PrivateKeyProvider*)_upb_msg_new(&envoy_api_v2_auth_PrivateKeyProvider_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_TlsCertificate_set_private_key_provider(msg, sub); } @@ -274,7 +273,7 @@ UPB_INLINE struct envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCer /* envoy.api.v2.auth.TlsSessionTicketKeys */ UPB_INLINE envoy_api_v2_auth_TlsSessionTicketKeys *envoy_api_v2_auth_TlsSessionTicketKeys_new(upb_arena *arena) { - return (envoy_api_v2_auth_TlsSessionTicketKeys *)upb_msg_new(&envoy_api_v2_auth_TlsSessionTicketKeys_msginit, arena); + return (envoy_api_v2_auth_TlsSessionTicketKeys *)_upb_msg_new(&envoy_api_v2_auth_TlsSessionTicketKeys_msginit, arena); } UPB_INLINE envoy_api_v2_auth_TlsSessionTicketKeys *envoy_api_v2_auth_TlsSessionTicketKeys_parse(const char *buf, size_t size, upb_arena *arena) { @@ -291,10 +290,10 @@ UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsSessionTic return (struct envoy_api_v2_core_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsSessionTicketKeys_resize_keys(envoy_api_v2_auth_TlsSessionTicketKeys *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsSessionTicketKeys_add_keys(envoy_api_v2_auth_TlsSessionTicketKeys *msg, upb_arena *arena) { - struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -304,7 +303,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsSessionTick /* envoy.api.v2.auth.CertificateValidationContext */ UPB_INLINE envoy_api_v2_auth_CertificateValidationContext *envoy_api_v2_auth_CertificateValidationContext_new(upb_arena *arena) { - return (envoy_api_v2_auth_CertificateValidationContext *)upb_msg_new(&envoy_api_v2_auth_CertificateValidationContext_msginit, arena); + return (envoy_api_v2_auth_CertificateValidationContext *)_upb_msg_new(&envoy_api_v2_auth_CertificateValidationContext_msginit, arena); } UPB_INLINE envoy_api_v2_auth_CertificateValidationContext *envoy_api_v2_auth_CertificateValidationContext_parse(const char *buf, size_t size, upb_arena *arena) { @@ -330,7 +329,7 @@ UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_trusted_ca(en UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateValidationContext_mutable_trusted_ca(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_CertificateValidationContext_trusted_ca(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CertificateValidationContext_set_trusted_ca(msg, sub); } @@ -340,31 +339,31 @@ UPB_INLINE upb_strview* envoy_api_v2_auth_CertificateValidationContext_mutable_v return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE upb_strview* envoy_api_v2_auth_CertificateValidationContext_resize_verify_certificate_hash(envoy_api_v2_auth_CertificateValidationContext *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_add_verify_certificate_hash(envoy_api_v2_auth_CertificateValidationContext *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(20, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(20, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* envoy_api_v2_auth_CertificateValidationContext_mutable_verify_certificate_spki(envoy_api_v2_auth_CertificateValidationContext *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview* envoy_api_v2_auth_CertificateValidationContext_resize_verify_certificate_spki(envoy_api_v2_auth_CertificateValidationContext *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_add_verify_certificate_spki(envoy_api_v2_auth_CertificateValidationContext *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* envoy_api_v2_auth_CertificateValidationContext_mutable_verify_subject_alt_name(envoy_api_v2_auth_CertificateValidationContext *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE upb_strview* envoy_api_v2_auth_CertificateValidationContext_resize_verify_subject_alt_name(envoy_api_v2_auth_CertificateValidationContext *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_add_verify_subject_alt_name(envoy_api_v2_auth_CertificateValidationContext *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_require_ocsp_staple(envoy_api_v2_auth_CertificateValidationContext *msg, struct google_protobuf_BoolValue* value) { UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)) = value; @@ -372,7 +371,7 @@ UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_require_ocsp_ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValidationContext_mutable_require_ocsp_staple(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_auth_CertificateValidationContext_require_ocsp_staple(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CertificateValidationContext_set_require_ocsp_staple(msg, sub); } @@ -384,7 +383,7 @@ UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_require_signe UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValidationContext_mutable_require_signed_certificate_timestamp(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_auth_CertificateValidationContext_require_signed_certificate_timestamp(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CertificateValidationContext_set_require_signed_certificate_timestamp(msg, sub); } @@ -396,7 +395,7 @@ UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_crl(envoy_api UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateValidationContext_mutable_crl(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_CertificateValidationContext_crl(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CertificateValidationContext_set_crl(msg, sub); } @@ -409,7 +408,7 @@ UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_allow_expired /* envoy.api.v2.auth.CommonTlsContext */ UPB_INLINE envoy_api_v2_auth_CommonTlsContext *envoy_api_v2_auth_CommonTlsContext_new(upb_arena *arena) { - return (envoy_api_v2_auth_CommonTlsContext *)upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_msginit, arena); + return (envoy_api_v2_auth_CommonTlsContext *)_upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_msginit, arena); } UPB_INLINE envoy_api_v2_auth_CommonTlsContext *envoy_api_v2_auth_CommonTlsContext_parse(const char *buf, size_t size, upb_arena *arena) { @@ -445,7 +444,7 @@ UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_set_tls_params(envoy_api_v2_a UPB_INLINE struct envoy_api_v2_auth_TlsParameters* envoy_api_v2_auth_CommonTlsContext_mutable_tls_params(envoy_api_v2_auth_CommonTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_TlsParameters* sub = (struct envoy_api_v2_auth_TlsParameters*)envoy_api_v2_auth_CommonTlsContext_tls_params(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_TlsParameters*)upb_msg_new(&envoy_api_v2_auth_TlsParameters_msginit, arena); + sub = (struct envoy_api_v2_auth_TlsParameters*)_upb_msg_new(&envoy_api_v2_auth_TlsParameters_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CommonTlsContext_set_tls_params(msg, sub); } @@ -455,10 +454,10 @@ UPB_INLINE envoy_api_v2_auth_TlsCertificate** envoy_api_v2_auth_CommonTlsContext return (envoy_api_v2_auth_TlsCertificate**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE envoy_api_v2_auth_TlsCertificate** envoy_api_v2_auth_CommonTlsContext_resize_tls_certificates(envoy_api_v2_auth_CommonTlsContext *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_auth_TlsCertificate**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_auth_TlsCertificate**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_auth_TlsCertificate* envoy_api_v2_auth_CommonTlsContext_add_tls_certificates(envoy_api_v2_auth_CommonTlsContext *msg, upb_arena *arena) { - struct envoy_api_v2_auth_TlsCertificate* sub = (struct envoy_api_v2_auth_TlsCertificate*)upb_msg_new(&envoy_api_v2_auth_TlsCertificate_msginit, arena); + struct envoy_api_v2_auth_TlsCertificate* sub = (struct envoy_api_v2_auth_TlsCertificate*)_upb_msg_new(&envoy_api_v2_auth_TlsCertificate_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -470,7 +469,7 @@ UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_set_validation_context(envoy_ UPB_INLINE struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_mutable_validation_context(envoy_api_v2_auth_CommonTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_CertificateValidationContext* sub = (struct envoy_api_v2_auth_CertificateValidationContext*)envoy_api_v2_auth_CommonTlsContext_validation_context(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_CertificateValidationContext*)upb_msg_new(&envoy_api_v2_auth_CertificateValidationContext_msginit, arena); + sub = (struct envoy_api_v2_auth_CertificateValidationContext*)_upb_msg_new(&envoy_api_v2_auth_CertificateValidationContext_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CommonTlsContext_set_validation_context(msg, sub); } @@ -480,20 +479,20 @@ UPB_INLINE upb_strview* envoy_api_v2_auth_CommonTlsContext_mutable_alpn_protocol return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE upb_strview* envoy_api_v2_auth_CommonTlsContext_resize_alpn_protocols(envoy_api_v2_auth_CommonTlsContext *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_add_alpn_protocols(envoy_api_v2_auth_CommonTlsContext *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE envoy_api_v2_auth_SdsSecretConfig** envoy_api_v2_auth_CommonTlsContext_mutable_tls_certificate_sds_secret_configs(envoy_api_v2_auth_CommonTlsContext *msg, size_t *len) { return (envoy_api_v2_auth_SdsSecretConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE envoy_api_v2_auth_SdsSecretConfig** envoy_api_v2_auth_CommonTlsContext_resize_tls_certificate_sds_secret_configs(envoy_api_v2_auth_CommonTlsContext *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_auth_SdsSecretConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_auth_SdsSecretConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTlsContext_add_tls_certificate_sds_secret_configs(envoy_api_v2_auth_CommonTlsContext *msg, upb_arena *arena) { - struct envoy_api_v2_auth_SdsSecretConfig* sub = (struct envoy_api_v2_auth_SdsSecretConfig*)upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); + struct envoy_api_v2_auth_SdsSecretConfig* sub = (struct envoy_api_v2_auth_SdsSecretConfig*)_upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -505,7 +504,7 @@ UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_set_validation_context_sds_se UPB_INLINE struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTlsContext_mutable_validation_context_sds_secret_config(envoy_api_v2_auth_CommonTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_SdsSecretConfig* sub = (struct envoy_api_v2_auth_SdsSecretConfig*)envoy_api_v2_auth_CommonTlsContext_validation_context_sds_secret_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_SdsSecretConfig*)upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); + sub = (struct envoy_api_v2_auth_SdsSecretConfig*)_upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CommonTlsContext_set_validation_context_sds_secret_config(msg, sub); } @@ -517,7 +516,7 @@ UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_set_combined_validation_conte UPB_INLINE struct envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_mutable_combined_validation_context(envoy_api_v2_auth_CommonTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext* sub = (struct envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext*)envoy_api_v2_auth_CommonTlsContext_combined_validation_context(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext*)upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_msginit, arena); + sub = (struct envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext*)_upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CommonTlsContext_set_combined_validation_context(msg, sub); } @@ -527,7 +526,7 @@ UPB_INLINE struct envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidati /* envoy.api.v2.auth.CommonTlsContext.CombinedCertificateValidationContext */ UPB_INLINE envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_new(upb_arena *arena) { - return (envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *)upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_msginit, arena); + return (envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *)_upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_msginit, arena); } UPB_INLINE envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_parse(const char *buf, size_t size, upb_arena *arena) { @@ -547,7 +546,7 @@ UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidation UPB_INLINE struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_mutable_default_validation_context(envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_CertificateValidationContext* sub = (struct envoy_api_v2_auth_CertificateValidationContext*)envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_CertificateValidationContext*)upb_msg_new(&envoy_api_v2_auth_CertificateValidationContext_msginit, arena); + sub = (struct envoy_api_v2_auth_CertificateValidationContext*)_upb_msg_new(&envoy_api_v2_auth_CertificateValidationContext_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_set_default_validation_context(msg, sub); } @@ -559,7 +558,7 @@ UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidation UPB_INLINE struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_mutable_validation_context_sds_secret_config(envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_SdsSecretConfig* sub = (struct envoy_api_v2_auth_SdsSecretConfig*)envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_validation_context_sds_secret_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_SdsSecretConfig*)upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); + sub = (struct envoy_api_v2_auth_SdsSecretConfig*)_upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_set_validation_context_sds_secret_config(msg, sub); } @@ -569,7 +568,7 @@ UPB_INLINE struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTls /* envoy.api.v2.auth.UpstreamTlsContext */ UPB_INLINE envoy_api_v2_auth_UpstreamTlsContext *envoy_api_v2_auth_UpstreamTlsContext_new(upb_arena *arena) { - return (envoy_api_v2_auth_UpstreamTlsContext *)upb_msg_new(&envoy_api_v2_auth_UpstreamTlsContext_msginit, arena); + return (envoy_api_v2_auth_UpstreamTlsContext *)_upb_msg_new(&envoy_api_v2_auth_UpstreamTlsContext_msginit, arena); } UPB_INLINE envoy_api_v2_auth_UpstreamTlsContext *envoy_api_v2_auth_UpstreamTlsContext_parse(const char *buf, size_t size, upb_arena *arena) { @@ -591,7 +590,7 @@ UPB_INLINE void envoy_api_v2_auth_UpstreamTlsContext_set_common_tls_context(envo UPB_INLINE struct envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_UpstreamTlsContext_mutable_common_tls_context(envoy_api_v2_auth_UpstreamTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_CommonTlsContext* sub = (struct envoy_api_v2_auth_CommonTlsContext*)envoy_api_v2_auth_UpstreamTlsContext_common_tls_context(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_CommonTlsContext*)upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_msginit, arena); + sub = (struct envoy_api_v2_auth_CommonTlsContext*)_upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_UpstreamTlsContext_set_common_tls_context(msg, sub); } @@ -609,7 +608,7 @@ UPB_INLINE void envoy_api_v2_auth_UpstreamTlsContext_set_max_session_keys(envoy_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_auth_UpstreamTlsContext_mutable_max_session_keys(envoy_api_v2_auth_UpstreamTlsContext *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_auth_UpstreamTlsContext_max_session_keys(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_UpstreamTlsContext_set_max_session_keys(msg, sub); } @@ -619,7 +618,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_auth_UpstreamTlsCont /* envoy.api.v2.auth.DownstreamTlsContext */ UPB_INLINE envoy_api_v2_auth_DownstreamTlsContext *envoy_api_v2_auth_DownstreamTlsContext_new(upb_arena *arena) { - return (envoy_api_v2_auth_DownstreamTlsContext *)upb_msg_new(&envoy_api_v2_auth_DownstreamTlsContext_msginit, arena); + return (envoy_api_v2_auth_DownstreamTlsContext *)_upb_msg_new(&envoy_api_v2_auth_DownstreamTlsContext_msginit, arena); } UPB_INLINE envoy_api_v2_auth_DownstreamTlsContext *envoy_api_v2_auth_DownstreamTlsContext_parse(const char *buf, size_t size, upb_arena *arena) { @@ -651,7 +650,7 @@ UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_common_tls_context(en UPB_INLINE struct envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_DownstreamTlsContext_mutable_common_tls_context(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_CommonTlsContext* sub = (struct envoy_api_v2_auth_CommonTlsContext*)envoy_api_v2_auth_DownstreamTlsContext_common_tls_context(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_CommonTlsContext*)upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_msginit, arena); + sub = (struct envoy_api_v2_auth_CommonTlsContext*)_upb_msg_new(&envoy_api_v2_auth_CommonTlsContext_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_DownstreamTlsContext_set_common_tls_context(msg, sub); } @@ -663,7 +662,7 @@ UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_require_client_certif UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_mutable_require_client_certificate(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_auth_DownstreamTlsContext_require_client_certificate(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_DownstreamTlsContext_set_require_client_certificate(msg, sub); } @@ -675,7 +674,7 @@ UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_require_sni(envoy_api UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_mutable_require_sni(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_auth_DownstreamTlsContext_require_sni(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_DownstreamTlsContext_set_require_sni(msg, sub); } @@ -687,7 +686,7 @@ UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_session_ticket_keys(e UPB_INLINE struct envoy_api_v2_auth_TlsSessionTicketKeys* envoy_api_v2_auth_DownstreamTlsContext_mutable_session_ticket_keys(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_TlsSessionTicketKeys* sub = (struct envoy_api_v2_auth_TlsSessionTicketKeys*)envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_TlsSessionTicketKeys*)upb_msg_new(&envoy_api_v2_auth_TlsSessionTicketKeys_msginit, arena); + sub = (struct envoy_api_v2_auth_TlsSessionTicketKeys*)_upb_msg_new(&envoy_api_v2_auth_TlsSessionTicketKeys_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_DownstreamTlsContext_set_session_ticket_keys(msg, sub); } @@ -699,7 +698,7 @@ UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_session_ticket_keys_s UPB_INLINE struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_DownstreamTlsContext_mutable_session_ticket_keys_sds_secret_config(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_SdsSecretConfig* sub = (struct envoy_api_v2_auth_SdsSecretConfig*)envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_sds_secret_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_SdsSecretConfig*)upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); + sub = (struct envoy_api_v2_auth_SdsSecretConfig*)_upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_DownstreamTlsContext_set_session_ticket_keys_sds_secret_config(msg, sub); } @@ -709,7 +708,7 @@ UPB_INLINE struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_Downstrea /* envoy.api.v2.auth.SdsSecretConfig */ UPB_INLINE envoy_api_v2_auth_SdsSecretConfig *envoy_api_v2_auth_SdsSecretConfig_new(upb_arena *arena) { - return (envoy_api_v2_auth_SdsSecretConfig *)upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); + return (envoy_api_v2_auth_SdsSecretConfig *)_upb_msg_new(&envoy_api_v2_auth_SdsSecretConfig_msginit, arena); } UPB_INLINE envoy_api_v2_auth_SdsSecretConfig *envoy_api_v2_auth_SdsSecretConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -732,7 +731,7 @@ UPB_INLINE void envoy_api_v2_auth_SdsSecretConfig_set_sds_config(envoy_api_v2_au UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_auth_SdsSecretConfig_mutable_sds_config(envoy_api_v2_auth_SdsSecretConfig *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_auth_SdsSecretConfig_sds_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_ConfigSource*)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_SdsSecretConfig_set_sds_config(msg, sub); } @@ -742,7 +741,7 @@ UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_auth_SdsSecretCon /* envoy.api.v2.auth.Secret */ UPB_INLINE envoy_api_v2_auth_Secret *envoy_api_v2_auth_Secret_new(upb_arena *arena) { - return (envoy_api_v2_auth_Secret *)upb_msg_new(&envoy_api_v2_auth_Secret_msginit, arena); + return (envoy_api_v2_auth_Secret *)_upb_msg_new(&envoy_api_v2_auth_Secret_msginit, arena); } UPB_INLINE envoy_api_v2_auth_Secret *envoy_api_v2_auth_Secret_parse(const char *buf, size_t size, upb_arena *arena) { @@ -778,7 +777,7 @@ UPB_INLINE void envoy_api_v2_auth_Secret_set_tls_certificate(envoy_api_v2_auth_S UPB_INLINE struct envoy_api_v2_auth_TlsCertificate* envoy_api_v2_auth_Secret_mutable_tls_certificate(envoy_api_v2_auth_Secret *msg, upb_arena *arena) { struct envoy_api_v2_auth_TlsCertificate* sub = (struct envoy_api_v2_auth_TlsCertificate*)envoy_api_v2_auth_Secret_tls_certificate(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_TlsCertificate*)upb_msg_new(&envoy_api_v2_auth_TlsCertificate_msginit, arena); + sub = (struct envoy_api_v2_auth_TlsCertificate*)_upb_msg_new(&envoy_api_v2_auth_TlsCertificate_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_Secret_set_tls_certificate(msg, sub); } @@ -790,7 +789,7 @@ UPB_INLINE void envoy_api_v2_auth_Secret_set_session_ticket_keys(envoy_api_v2_au UPB_INLINE struct envoy_api_v2_auth_TlsSessionTicketKeys* envoy_api_v2_auth_Secret_mutable_session_ticket_keys(envoy_api_v2_auth_Secret *msg, upb_arena *arena) { struct envoy_api_v2_auth_TlsSessionTicketKeys* sub = (struct envoy_api_v2_auth_TlsSessionTicketKeys*)envoy_api_v2_auth_Secret_session_ticket_keys(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_TlsSessionTicketKeys*)upb_msg_new(&envoy_api_v2_auth_TlsSessionTicketKeys_msginit, arena); + sub = (struct envoy_api_v2_auth_TlsSessionTicketKeys*)_upb_msg_new(&envoy_api_v2_auth_TlsSessionTicketKeys_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_Secret_set_session_ticket_keys(msg, sub); } @@ -802,7 +801,7 @@ UPB_INLINE void envoy_api_v2_auth_Secret_set_validation_context(envoy_api_v2_aut UPB_INLINE struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_Secret_mutable_validation_context(envoy_api_v2_auth_Secret *msg, upb_arena *arena) { struct envoy_api_v2_auth_CertificateValidationContext* sub = (struct envoy_api_v2_auth_CertificateValidationContext*)envoy_api_v2_auth_Secret_validation_context(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_CertificateValidationContext*)upb_msg_new(&envoy_api_v2_auth_CertificateValidationContext_msginit, arena); + sub = (struct envoy_api_v2_auth_CertificateValidationContext*)_upb_msg_new(&envoy_api_v2_auth_CertificateValidationContext_msginit, arena); if (!sub) return NULL; envoy_api_v2_auth_Secret_set_validation_context(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c index 6a95c790d5d..096eb51c720 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c @@ -95,8 +95,8 @@ static const upb_msglayout_field envoy_api_v2_Cluster__fields[42] = { {32, UPB_SIZE(25, 25), 0, 0, 8, 1}, {33, UPB_SIZE(116, 208), 0, 11, 11, 1}, {34, UPB_SIZE(172, 312), UPB_SIZE(-177, -321), 6, 11, 1}, - {35, UPB_SIZE(144, 264), 0, 3, 11, 3}, - {36, UPB_SIZE(148, 272), 0, 10, 11, 3}, + {35, UPB_SIZE(144, 264), 0, 3, 11, 4}, + {36, UPB_SIZE(148, 272), 0, 10, 11, 4}, {37, UPB_SIZE(172, 312), UPB_SIZE(-177, -321), 5, 11, 1}, {38, UPB_SIZE(160, 296), UPB_SIZE(-169, -305), 1, 11, 1}, {39, UPB_SIZE(26, 26), 0, 0, 8, 1}, diff --git a/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h index 5dac864fcb3..857e38c4455 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CDS_PROTO_UPB_H_ #define ENVOY_API_V2_CDS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -172,7 +171,7 @@ typedef enum { /* envoy.api.v2.Cluster */ UPB_INLINE envoy_api_v2_Cluster *envoy_api_v2_Cluster_new(upb_arena *arena) { - return (envoy_api_v2_Cluster *)upb_msg_new(&envoy_api_v2_Cluster_msginit, arena); + return (envoy_api_v2_Cluster *)_upb_msg_new(&envoy_api_v2_Cluster_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster *envoy_api_v2_Cluster_parse(const char *buf, size_t size, upb_arena *arena) { @@ -233,8 +232,12 @@ UPB_INLINE bool envoy_api_v2_Cluster_drain_connections_on_host_removal(const env UPB_INLINE const struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_load_assignment(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_ClusterLoadAssignment*, UPB_SIZE(116, 208)); } UPB_INLINE bool envoy_api_v2_Cluster_has_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(176, 320), 34); } UPB_INLINE const envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(172, 312), UPB_SIZE(176, 320), 34, NULL); } -UPB_INLINE const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* const* envoy_api_v2_Cluster_extension_protocol_options(const envoy_api_v2_Cluster *msg, size_t *len) { return (const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(144, 264), len); } -UPB_INLINE const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* const* envoy_api_v2_Cluster_typed_extension_protocol_options(const envoy_api_v2_Cluster *msg, size_t *len) { return (const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(148, 272), len); } +UPB_INLINE size_t envoy_api_v2_Cluster_extension_protocol_options_size(const envoy_api_v2_Cluster *msg) {return _upb_msg_map_size(msg, UPB_SIZE(144, 264)); } +UPB_INLINE bool envoy_api_v2_Cluster_extension_protocol_options_get(const envoy_api_v2_Cluster *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(144, 264), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_extension_protocol_options_next(const envoy_api_v2_Cluster *msg, size_t* iter) { return (const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(144, 264), iter); } +UPB_INLINE size_t envoy_api_v2_Cluster_typed_extension_protocol_options_size(const envoy_api_v2_Cluster *msg) {return _upb_msg_map_size(msg, UPB_SIZE(148, 272)); } +UPB_INLINE bool envoy_api_v2_Cluster_typed_extension_protocol_options_get(const envoy_api_v2_Cluster *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(148, 272), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_typed_extension_protocol_options_next(const envoy_api_v2_Cluster *msg, size_t* iter) { return (const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(148, 272), iter); } UPB_INLINE bool envoy_api_v2_Cluster_has_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(176, 320), 37); } UPB_INLINE const envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(172, 312), UPB_SIZE(176, 320), 37, NULL); } UPB_INLINE bool envoy_api_v2_Cluster_has_cluster_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(168, 304), 38); } @@ -258,7 +261,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_eds_cluster_config(envoy_api_v2_Cluster UPB_INLINE struct envoy_api_v2_Cluster_EdsClusterConfig* envoy_api_v2_Cluster_mutable_eds_cluster_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_EdsClusterConfig* sub = (struct envoy_api_v2_Cluster_EdsClusterConfig*)envoy_api_v2_Cluster_eds_cluster_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_EdsClusterConfig*)upb_msg_new(&envoy_api_v2_Cluster_EdsClusterConfig_msginit, arena); + sub = (struct envoy_api_v2_Cluster_EdsClusterConfig*)_upb_msg_new(&envoy_api_v2_Cluster_EdsClusterConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_eds_cluster_config(msg, sub); } @@ -270,7 +273,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_connect_timeout(envoy_api_v2_Cluster *m UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_connect_timeout(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_connect_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_connect_timeout(msg, sub); } @@ -282,7 +285,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_per_connection_buffer_limit_bytes(envoy UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_mutable_per_connection_buffer_limit_bytes(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Cluster_per_connection_buffer_limit_bytes(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_per_connection_buffer_limit_bytes(msg, sub); } @@ -295,10 +298,10 @@ UPB_INLINE struct envoy_api_v2_core_Address** envoy_api_v2_Cluster_mutable_hosts return (struct envoy_api_v2_core_Address**)_upb_array_mutable_accessor(msg, UPB_SIZE(132, 240), len); } UPB_INLINE struct envoy_api_v2_core_Address** envoy_api_v2_Cluster_resize_hosts(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_Address**)_upb_array_resize_accessor(msg, UPB_SIZE(132, 240), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_Address**)_upb_array_resize_accessor(msg, UPB_SIZE(132, 240), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_Cluster_add_hosts(envoy_api_v2_Cluster *msg, upb_arena *arena) { - struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); + struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)_upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(132, 240), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -308,10 +311,10 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck** envoy_api_v2_Cluster_mutable_h return (struct envoy_api_v2_core_HealthCheck**)_upb_array_mutable_accessor(msg, UPB_SIZE(136, 248), len); } UPB_INLINE struct envoy_api_v2_core_HealthCheck** envoy_api_v2_Cluster_resize_health_checks(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HealthCheck**)_upb_array_resize_accessor(msg, UPB_SIZE(136, 248), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HealthCheck**)_upb_array_resize_accessor(msg, UPB_SIZE(136, 248), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HealthCheck* envoy_api_v2_Cluster_add_health_checks(envoy_api_v2_Cluster *msg, upb_arena *arena) { - struct envoy_api_v2_core_HealthCheck* sub = (struct envoy_api_v2_core_HealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_msginit, arena); + struct envoy_api_v2_core_HealthCheck* sub = (struct envoy_api_v2_core_HealthCheck*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(136, 248), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -323,7 +326,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_max_requests_per_connection(envoy_api_v UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_mutable_max_requests_per_connection(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Cluster_max_requests_per_connection(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_max_requests_per_connection(msg, sub); } @@ -335,7 +338,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_circuit_breakers(envoy_api_v2_Cluster * UPB_INLINE struct envoy_api_v2_cluster_CircuitBreakers* envoy_api_v2_Cluster_mutable_circuit_breakers(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_cluster_CircuitBreakers* sub = (struct envoy_api_v2_cluster_CircuitBreakers*)envoy_api_v2_Cluster_circuit_breakers(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_cluster_CircuitBreakers*)upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_msginit, arena); + sub = (struct envoy_api_v2_cluster_CircuitBreakers*)_upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_circuit_breakers(msg, sub); } @@ -347,7 +350,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_tls_context(envoy_api_v2_Cluster *msg, UPB_INLINE struct envoy_api_v2_auth_UpstreamTlsContext* envoy_api_v2_Cluster_mutable_tls_context(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_auth_UpstreamTlsContext* sub = (struct envoy_api_v2_auth_UpstreamTlsContext*)envoy_api_v2_Cluster_tls_context(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_UpstreamTlsContext*)upb_msg_new(&envoy_api_v2_auth_UpstreamTlsContext_msginit, arena); + sub = (struct envoy_api_v2_auth_UpstreamTlsContext*)_upb_msg_new(&envoy_api_v2_auth_UpstreamTlsContext_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_tls_context(msg, sub); } @@ -359,7 +362,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_http_protocol_options(envoy_api_v2_Clus UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions* envoy_api_v2_Cluster_mutable_http_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_Http1ProtocolOptions* sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)envoy_api_v2_Cluster_http_protocol_options(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_msginit, arena); + sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)_upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_http_protocol_options(msg, sub); } @@ -371,7 +374,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_http2_protocol_options(envoy_api_v2_Clu UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_Cluster_mutable_http2_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_Http2ProtocolOptions* sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)envoy_api_v2_Cluster_http2_protocol_options(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); + sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)_upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_http2_protocol_options(msg, sub); } @@ -383,7 +386,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_dns_refresh_rate(envoy_api_v2_Cluster * UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_dns_refresh_rate(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_dns_refresh_rate(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_dns_refresh_rate(msg, sub); } @@ -396,10 +399,10 @@ UPB_INLINE struct envoy_api_v2_core_Address** envoy_api_v2_Cluster_mutable_dns_r return (struct envoy_api_v2_core_Address**)_upb_array_mutable_accessor(msg, UPB_SIZE(140, 256), len); } UPB_INLINE struct envoy_api_v2_core_Address** envoy_api_v2_Cluster_resize_dns_resolvers(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_Address**)_upb_array_resize_accessor(msg, UPB_SIZE(140, 256), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_Address**)_upb_array_resize_accessor(msg, UPB_SIZE(140, 256), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_Cluster_add_dns_resolvers(envoy_api_v2_Cluster *msg, upb_arena *arena) { - struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); + struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)_upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(140, 256), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -411,7 +414,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_outlier_detection(envoy_api_v2_Cluster UPB_INLINE struct envoy_api_v2_cluster_OutlierDetection* envoy_api_v2_Cluster_mutable_outlier_detection(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_cluster_OutlierDetection* sub = (struct envoy_api_v2_cluster_OutlierDetection*)envoy_api_v2_Cluster_outlier_detection(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_cluster_OutlierDetection*)upb_msg_new(&envoy_api_v2_cluster_OutlierDetection_msginit, arena); + sub = (struct envoy_api_v2_cluster_OutlierDetection*)_upb_msg_new(&envoy_api_v2_cluster_OutlierDetection_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_outlier_detection(msg, sub); } @@ -423,7 +426,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_cleanup_interval(envoy_api_v2_Cluster * UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_cleanup_interval(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_cleanup_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_cleanup_interval(msg, sub); } @@ -435,7 +438,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_upstream_bind_config(envoy_api_v2_Clust UPB_INLINE struct envoy_api_v2_core_BindConfig* envoy_api_v2_Cluster_mutable_upstream_bind_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_BindConfig* sub = (struct envoy_api_v2_core_BindConfig*)envoy_api_v2_Cluster_upstream_bind_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_BindConfig*)upb_msg_new(&envoy_api_v2_core_BindConfig_msginit, arena); + sub = (struct envoy_api_v2_core_BindConfig*)_upb_msg_new(&envoy_api_v2_core_BindConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_upstream_bind_config(msg, sub); } @@ -447,7 +450,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_lb_subset_config(envoy_api_v2_Cluster * UPB_INLINE struct envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_mutable_lb_subset_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_LbSubsetConfig* sub = (struct envoy_api_v2_Cluster_LbSubsetConfig*)envoy_api_v2_Cluster_lb_subset_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_LbSubsetConfig*)upb_msg_new(&envoy_api_v2_Cluster_LbSubsetConfig_msginit, arena); + sub = (struct envoy_api_v2_Cluster_LbSubsetConfig*)_upb_msg_new(&envoy_api_v2_Cluster_LbSubsetConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_lb_subset_config(msg, sub); } @@ -459,7 +462,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_ring_hash_lb_config(envoy_api_v2_Cluste UPB_INLINE struct envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_mutable_ring_hash_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_RingHashLbConfig* sub = (struct envoy_api_v2_Cluster_RingHashLbConfig*)envoy_api_v2_Cluster_ring_hash_lb_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_RingHashLbConfig*)upb_msg_new(&envoy_api_v2_Cluster_RingHashLbConfig_msginit, arena); + sub = (struct envoy_api_v2_Cluster_RingHashLbConfig*)_upb_msg_new(&envoy_api_v2_Cluster_RingHashLbConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_ring_hash_lb_config(msg, sub); } @@ -471,7 +474,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_transport_socket(envoy_api_v2_Cluster * UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_mutable_transport_socket(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_TransportSocket* sub = (struct envoy_api_v2_core_TransportSocket*)envoy_api_v2_Cluster_transport_socket(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_TransportSocket*)upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); + sub = (struct envoy_api_v2_core_TransportSocket*)_upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_transport_socket(msg, sub); } @@ -483,7 +486,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_metadata(envoy_api_v2_Cluster *msg, str UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_Cluster_mutable_metadata(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_Cluster_metadata(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); + sub = (struct envoy_api_v2_core_Metadata*)_upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_metadata(msg, sub); } @@ -498,7 +501,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_common_lb_config(envoy_api_v2_Cluster * UPB_INLINE struct envoy_api_v2_Cluster_CommonLbConfig* envoy_api_v2_Cluster_mutable_common_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_CommonLbConfig* sub = (struct envoy_api_v2_Cluster_CommonLbConfig*)envoy_api_v2_Cluster_common_lb_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_CommonLbConfig*)upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_msginit, arena); + sub = (struct envoy_api_v2_Cluster_CommonLbConfig*)_upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_common_lb_config(msg, sub); } @@ -513,7 +516,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_common_http_protocol_options(envoy_api_ UPB_INLINE struct envoy_api_v2_core_HttpProtocolOptions* envoy_api_v2_Cluster_mutable_common_http_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_HttpProtocolOptions* sub = (struct envoy_api_v2_core_HttpProtocolOptions*)envoy_api_v2_Cluster_common_http_protocol_options(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HttpProtocolOptions*)upb_msg_new(&envoy_api_v2_core_HttpProtocolOptions_msginit, arena); + sub = (struct envoy_api_v2_core_HttpProtocolOptions*)_upb_msg_new(&envoy_api_v2_core_HttpProtocolOptions_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_common_http_protocol_options(msg, sub); } @@ -525,7 +528,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_upstream_connection_options(envoy_api_v UPB_INLINE struct envoy_api_v2_UpstreamConnectionOptions* envoy_api_v2_Cluster_mutable_upstream_connection_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_UpstreamConnectionOptions* sub = (struct envoy_api_v2_UpstreamConnectionOptions*)envoy_api_v2_Cluster_upstream_connection_options(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_UpstreamConnectionOptions*)upb_msg_new(&envoy_api_v2_UpstreamConnectionOptions_msginit, arena); + sub = (struct envoy_api_v2_UpstreamConnectionOptions*)_upb_msg_new(&envoy_api_v2_UpstreamConnectionOptions_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_upstream_connection_options(msg, sub); } @@ -543,7 +546,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_load_assignment(envoy_api_v2_Cluster *m UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_mutable_load_assignment(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_ClusterLoadAssignment* sub = (struct envoy_api_v2_ClusterLoadAssignment*)envoy_api_v2_Cluster_load_assignment(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_ClusterLoadAssignment*)upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_msginit, arena); + sub = (struct envoy_api_v2_ClusterLoadAssignment*)_upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_load_assignment(msg, sub); } @@ -555,45 +558,27 @@ UPB_INLINE void envoy_api_v2_Cluster_set_original_dst_lb_config(envoy_api_v2_Clu UPB_INLINE struct envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_mutable_original_dst_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_OriginalDstLbConfig* sub = (struct envoy_api_v2_Cluster_OriginalDstLbConfig*)envoy_api_v2_Cluster_original_dst_lb_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_OriginalDstLbConfig*)upb_msg_new(&envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, arena); + sub = (struct envoy_api_v2_Cluster_OriginalDstLbConfig*)_upb_msg_new(&envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_original_dst_lb_config(msg, sub); } return sub; } -UPB_INLINE envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry** envoy_api_v2_Cluster_mutable_extension_protocol_options(envoy_api_v2_Cluster *msg, size_t *len) { - return (envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(144, 264), len); -} -UPB_INLINE envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry** envoy_api_v2_Cluster_resize_extension_protocol_options(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(144, 264), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_add_extension_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { - struct envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* sub = (struct envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry*)upb_msg_new(&envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(144, 264), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry** envoy_api_v2_Cluster_mutable_typed_extension_protocol_options(envoy_api_v2_Cluster *msg, size_t *len) { - return (envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(148, 272), len); -} -UPB_INLINE envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry** envoy_api_v2_Cluster_resize_typed_extension_protocol_options(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(148, 272), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_add_typed_extension_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { - struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* sub = (struct envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry*)upb_msg_new(&envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(148, 272), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void envoy_api_v2_Cluster_extension_protocol_options_clear(envoy_api_v2_Cluster *msg) { _upb_msg_map_clear(msg, UPB_SIZE(144, 264)); } +UPB_INLINE bool envoy_api_v2_Cluster_extension_protocol_options_set(envoy_api_v2_Cluster *msg, upb_strview key, struct google_protobuf_Struct* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(144, 264), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_Cluster_extension_protocol_options_delete(envoy_api_v2_Cluster *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(144, 264), &key, 0); } +UPB_INLINE envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_extension_protocol_options_nextmutable(envoy_api_v2_Cluster *msg, size_t* iter) { return (envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(144, 264), iter); } +UPB_INLINE void envoy_api_v2_Cluster_typed_extension_protocol_options_clear(envoy_api_v2_Cluster *msg) { _upb_msg_map_clear(msg, UPB_SIZE(148, 272)); } +UPB_INLINE bool envoy_api_v2_Cluster_typed_extension_protocol_options_set(envoy_api_v2_Cluster *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(148, 272), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_Cluster_typed_extension_protocol_options_delete(envoy_api_v2_Cluster *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(148, 272), &key, 0); } +UPB_INLINE envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_typed_extension_protocol_options_nextmutable(envoy_api_v2_Cluster *msg, size_t* iter) { return (envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(148, 272), iter); } UPB_INLINE void envoy_api_v2_Cluster_set_least_request_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_LeastRequestLbConfig* value) { UPB_WRITE_ONEOF(msg, envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(172, 312), value, UPB_SIZE(176, 320), 37); } UPB_INLINE struct envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_mutable_least_request_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_LeastRequestLbConfig* sub = (struct envoy_api_v2_Cluster_LeastRequestLbConfig*)envoy_api_v2_Cluster_least_request_lb_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_LeastRequestLbConfig*)upb_msg_new(&envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, arena); + sub = (struct envoy_api_v2_Cluster_LeastRequestLbConfig*)_upb_msg_new(&envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_least_request_lb_config(msg, sub); } @@ -605,7 +590,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_cluster_type(envoy_api_v2_Cluster *msg, UPB_INLINE struct envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_mutable_cluster_type(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_CustomClusterType* sub = (struct envoy_api_v2_Cluster_CustomClusterType*)envoy_api_v2_Cluster_cluster_type(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_CustomClusterType*)upb_msg_new(&envoy_api_v2_Cluster_CustomClusterType_msginit, arena); + sub = (struct envoy_api_v2_Cluster_CustomClusterType*)_upb_msg_new(&envoy_api_v2_Cluster_CustomClusterType_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_cluster_type(msg, sub); } @@ -618,10 +603,10 @@ UPB_INLINE struct envoy_api_v2_cluster_Filter** envoy_api_v2_Cluster_mutable_fil return (struct envoy_api_v2_cluster_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(152, 280), len); } UPB_INLINE struct envoy_api_v2_cluster_Filter** envoy_api_v2_Cluster_resize_filters(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_cluster_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(152, 280), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_cluster_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(152, 280), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_cluster_Filter* envoy_api_v2_Cluster_add_filters(envoy_api_v2_Cluster *msg, upb_arena *arena) { - struct envoy_api_v2_cluster_Filter* sub = (struct envoy_api_v2_cluster_Filter*)upb_msg_new(&envoy_api_v2_cluster_Filter_msginit, arena); + struct envoy_api_v2_cluster_Filter* sub = (struct envoy_api_v2_cluster_Filter*)_upb_msg_new(&envoy_api_v2_cluster_Filter_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(152, 280), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -633,7 +618,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_load_balancing_policy(envoy_api_v2_Clus UPB_INLINE struct envoy_api_v2_LoadBalancingPolicy* envoy_api_v2_Cluster_mutable_load_balancing_policy(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_LoadBalancingPolicy* sub = (struct envoy_api_v2_LoadBalancingPolicy*)envoy_api_v2_Cluster_load_balancing_policy(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_LoadBalancingPolicy*)upb_msg_new(&envoy_api_v2_LoadBalancingPolicy_msginit, arena); + sub = (struct envoy_api_v2_LoadBalancingPolicy*)_upb_msg_new(&envoy_api_v2_LoadBalancingPolicy_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_load_balancing_policy(msg, sub); } @@ -645,7 +630,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_lrs_server(envoy_api_v2_Cluster *msg, s UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_mutable_lrs_server(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_Cluster_lrs_server(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_ConfigSource*)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_lrs_server(msg, sub); } @@ -655,10 +640,10 @@ UPB_INLINE envoy_api_v2_Cluster_TransportSocketMatch** envoy_api_v2_Cluster_muta return (envoy_api_v2_Cluster_TransportSocketMatch**)_upb_array_mutable_accessor(msg, UPB_SIZE(156, 288), len); } UPB_INLINE envoy_api_v2_Cluster_TransportSocketMatch** envoy_api_v2_Cluster_resize_transport_socket_matches(envoy_api_v2_Cluster *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_Cluster_TransportSocketMatch**)_upb_array_resize_accessor(msg, UPB_SIZE(156, 288), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_Cluster_TransportSocketMatch**)_upb_array_resize_accessor(msg, UPB_SIZE(156, 288), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_Cluster_TransportSocketMatch* envoy_api_v2_Cluster_add_transport_socket_matches(envoy_api_v2_Cluster *msg, upb_arena *arena) { - struct envoy_api_v2_Cluster_TransportSocketMatch* sub = (struct envoy_api_v2_Cluster_TransportSocketMatch*)upb_msg_new(&envoy_api_v2_Cluster_TransportSocketMatch_msginit, arena); + struct envoy_api_v2_Cluster_TransportSocketMatch* sub = (struct envoy_api_v2_Cluster_TransportSocketMatch*)_upb_msg_new(&envoy_api_v2_Cluster_TransportSocketMatch_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(156, 288), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -670,7 +655,7 @@ UPB_INLINE void envoy_api_v2_Cluster_set_dns_failure_refresh_rate(envoy_api_v2_C UPB_INLINE struct envoy_api_v2_Cluster_RefreshRate* envoy_api_v2_Cluster_mutable_dns_failure_refresh_rate(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_RefreshRate* sub = (struct envoy_api_v2_Cluster_RefreshRate*)envoy_api_v2_Cluster_dns_failure_refresh_rate(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_RefreshRate*)upb_msg_new(&envoy_api_v2_Cluster_RefreshRate_msginit, arena); + sub = (struct envoy_api_v2_Cluster_RefreshRate*)_upb_msg_new(&envoy_api_v2_Cluster_RefreshRate_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_set_dns_failure_refresh_rate(msg, sub); } @@ -680,7 +665,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_RefreshRate* envoy_api_v2_Cluster_mutable /* envoy.api.v2.Cluster.TransportSocketMatch */ UPB_INLINE envoy_api_v2_Cluster_TransportSocketMatch *envoy_api_v2_Cluster_TransportSocketMatch_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_TransportSocketMatch *)upb_msg_new(&envoy_api_v2_Cluster_TransportSocketMatch_msginit, arena); + return (envoy_api_v2_Cluster_TransportSocketMatch *)_upb_msg_new(&envoy_api_v2_Cluster_TransportSocketMatch_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_TransportSocketMatch *envoy_api_v2_Cluster_TransportSocketMatch_parse(const char *buf, size_t size, upb_arena *arena) { @@ -704,7 +689,7 @@ UPB_INLINE void envoy_api_v2_Cluster_TransportSocketMatch_set_match(envoy_api_v2 UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_Cluster_TransportSocketMatch_mutable_match(envoy_api_v2_Cluster_TransportSocketMatch *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_Cluster_TransportSocketMatch_match(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_TransportSocketMatch_set_match(msg, sub); } @@ -716,7 +701,7 @@ UPB_INLINE void envoy_api_v2_Cluster_TransportSocketMatch_set_transport_socket(e UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_TransportSocketMatch_mutable_transport_socket(envoy_api_v2_Cluster_TransportSocketMatch *msg, upb_arena *arena) { struct envoy_api_v2_core_TransportSocket* sub = (struct envoy_api_v2_core_TransportSocket*)envoy_api_v2_Cluster_TransportSocketMatch_transport_socket(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_TransportSocket*)upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); + sub = (struct envoy_api_v2_core_TransportSocket*)_upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_TransportSocketMatch_set_transport_socket(msg, sub); } @@ -726,7 +711,7 @@ UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_Transp /* envoy.api.v2.Cluster.CustomClusterType */ UPB_INLINE envoy_api_v2_Cluster_CustomClusterType *envoy_api_v2_Cluster_CustomClusterType_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_CustomClusterType *)upb_msg_new(&envoy_api_v2_Cluster_CustomClusterType_msginit, arena); + return (envoy_api_v2_Cluster_CustomClusterType *)_upb_msg_new(&envoy_api_v2_Cluster_CustomClusterType_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_CustomClusterType *envoy_api_v2_Cluster_CustomClusterType_parse(const char *buf, size_t size, upb_arena *arena) { @@ -749,7 +734,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CustomClusterType_set_typed_config(envoy_ap UPB_INLINE struct google_protobuf_Any* envoy_api_v2_Cluster_CustomClusterType_mutable_typed_config(envoy_api_v2_Cluster_CustomClusterType *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_Cluster_CustomClusterType_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_CustomClusterType_set_typed_config(msg, sub); } @@ -759,7 +744,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_Cluster_CustomClusterType_mu /* envoy.api.v2.Cluster.EdsClusterConfig */ UPB_INLINE envoy_api_v2_Cluster_EdsClusterConfig *envoy_api_v2_Cluster_EdsClusterConfig_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_EdsClusterConfig *)upb_msg_new(&envoy_api_v2_Cluster_EdsClusterConfig_msginit, arena); + return (envoy_api_v2_Cluster_EdsClusterConfig *)_upb_msg_new(&envoy_api_v2_Cluster_EdsClusterConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_EdsClusterConfig *envoy_api_v2_Cluster_EdsClusterConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -779,7 +764,7 @@ UPB_INLINE void envoy_api_v2_Cluster_EdsClusterConfig_set_eds_config(envoy_api_v UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_EdsClusterConfig_mutable_eds_config(envoy_api_v2_Cluster_EdsClusterConfig *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_Cluster_EdsClusterConfig_eds_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_ConfigSource*)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_EdsClusterConfig_set_eds_config(msg, sub); } @@ -792,7 +777,7 @@ UPB_INLINE void envoy_api_v2_Cluster_EdsClusterConfig_set_service_name(envoy_api /* envoy.api.v2.Cluster.LbSubsetConfig */ UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig *envoy_api_v2_Cluster_LbSubsetConfig_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_LbSubsetConfig *)upb_msg_new(&envoy_api_v2_Cluster_LbSubsetConfig_msginit, arena); + return (envoy_api_v2_Cluster_LbSubsetConfig *)_upb_msg_new(&envoy_api_v2_Cluster_LbSubsetConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig *envoy_api_v2_Cluster_LbSubsetConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -820,7 +805,7 @@ UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_default_subset(envoy_api UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_Cluster_LbSubsetConfig_mutable_default_subset(envoy_api_v2_Cluster_LbSubsetConfig *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_Cluster_LbSubsetConfig_default_subset(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_LbSubsetConfig_set_default_subset(msg, sub); } @@ -830,10 +815,10 @@ UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector** envoy_api_v2_C return (envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 24), len); } UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector** envoy_api_v2_Cluster_LbSubsetConfig_resize_subset_selectors(envoy_api_v2_Cluster_LbSubsetConfig *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector* envoy_api_v2_Cluster_LbSubsetConfig_add_subset_selectors(envoy_api_v2_Cluster_LbSubsetConfig *msg, upb_arena *arena) { - struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector* sub = (struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector*)upb_msg_new(&envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena); + struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector* sub = (struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector*)_upb_msg_new(&envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -855,7 +840,7 @@ UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_list_as_any(envoy_api_v2 /* envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector */ UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *)upb_msg_new(&envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena); + return (envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *)_upb_msg_new(&envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_parse(const char *buf, size_t size, upb_arena *arena) { @@ -873,11 +858,11 @@ UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_mut return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); } UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_resize_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_add_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(8, 8), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(8, 8), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_set_fallback_policy(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; @@ -886,7 +871,7 @@ UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_set_fallbac /* envoy.api.v2.Cluster.LeastRequestLbConfig */ UPB_INLINE envoy_api_v2_Cluster_LeastRequestLbConfig *envoy_api_v2_Cluster_LeastRequestLbConfig_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_LeastRequestLbConfig *)upb_msg_new(&envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, arena); + return (envoy_api_v2_Cluster_LeastRequestLbConfig *)_upb_msg_new(&envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_LeastRequestLbConfig *envoy_api_v2_Cluster_LeastRequestLbConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -905,7 +890,7 @@ UPB_INLINE void envoy_api_v2_Cluster_LeastRequestLbConfig_set_choice_count(envoy UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_LeastRequestLbConfig_mutable_choice_count(envoy_api_v2_Cluster_LeastRequestLbConfig *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Cluster_LeastRequestLbConfig_choice_count(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_LeastRequestLbConfig_set_choice_count(msg, sub); } @@ -915,7 +900,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_LeastRequest /* envoy.api.v2.Cluster.RingHashLbConfig */ UPB_INLINE envoy_api_v2_Cluster_RingHashLbConfig *envoy_api_v2_Cluster_RingHashLbConfig_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_RingHashLbConfig *)upb_msg_new(&envoy_api_v2_Cluster_RingHashLbConfig_msginit, arena); + return (envoy_api_v2_Cluster_RingHashLbConfig *)_upb_msg_new(&envoy_api_v2_Cluster_RingHashLbConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_RingHashLbConfig *envoy_api_v2_Cluster_RingHashLbConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -936,7 +921,7 @@ UPB_INLINE void envoy_api_v2_Cluster_RingHashLbConfig_set_minimum_ring_size(envo UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbConfig_mutable_minimum_ring_size(envoy_api_v2_Cluster_RingHashLbConfig *msg, upb_arena *arena) { struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_api_v2_Cluster_RingHashLbConfig_minimum_ring_size(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt64Value*)upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); + sub = (struct google_protobuf_UInt64Value*)_upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_RingHashLbConfig_set_minimum_ring_size(msg, sub); } @@ -951,7 +936,7 @@ UPB_INLINE void envoy_api_v2_Cluster_RingHashLbConfig_set_maximum_ring_size(envo UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbConfig_mutable_maximum_ring_size(envoy_api_v2_Cluster_RingHashLbConfig *msg, upb_arena *arena) { struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_api_v2_Cluster_RingHashLbConfig_maximum_ring_size(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt64Value*)upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); + sub = (struct google_protobuf_UInt64Value*)_upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_RingHashLbConfig_set_maximum_ring_size(msg, sub); } @@ -961,7 +946,7 @@ UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbCo /* envoy.api.v2.Cluster.OriginalDstLbConfig */ UPB_INLINE envoy_api_v2_Cluster_OriginalDstLbConfig *envoy_api_v2_Cluster_OriginalDstLbConfig_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_OriginalDstLbConfig *)upb_msg_new(&envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, arena); + return (envoy_api_v2_Cluster_OriginalDstLbConfig *)_upb_msg_new(&envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_OriginalDstLbConfig *envoy_api_v2_Cluster_OriginalDstLbConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -981,7 +966,7 @@ UPB_INLINE void envoy_api_v2_Cluster_OriginalDstLbConfig_set_use_http_header(env /* envoy.api.v2.Cluster.CommonLbConfig */ UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig *envoy_api_v2_Cluster_CommonLbConfig_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_CommonLbConfig *)upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_msginit, arena); + return (envoy_api_v2_Cluster_CommonLbConfig *)_upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig *envoy_api_v2_Cluster_CommonLbConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1014,7 +999,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_healthy_panic_threshold( UPB_INLINE struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_mutable_healthy_panic_threshold(envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_api_v2_Cluster_CommonLbConfig_healthy_panic_threshold(msg); if (sub == NULL) { - sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + sub = (struct envoy_type_Percent*)_upb_msg_new(&envoy_type_Percent_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_CommonLbConfig_set_healthy_panic_threshold(msg, sub); } @@ -1026,7 +1011,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_zone_aware_lb_config(env UPB_INLINE struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig* envoy_api_v2_Cluster_CommonLbConfig_mutable_zone_aware_lb_config(envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig* sub = (struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig*)envoy_api_v2_Cluster_CommonLbConfig_zone_aware_lb_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig*)upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena); + sub = (struct envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig*)_upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_CommonLbConfig_set_zone_aware_lb_config(msg, sub); } @@ -1038,7 +1023,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_locality_weighted_lb_con UPB_INLINE struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* envoy_api_v2_Cluster_CommonLbConfig_mutable_locality_weighted_lb_config(envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* sub = (struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*)envoy_api_v2_Cluster_CommonLbConfig_locality_weighted_lb_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*)upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena); + sub = (struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*)_upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_CommonLbConfig_set_locality_weighted_lb_config(msg, sub); } @@ -1050,7 +1035,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_update_merge_window(envo UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_mutable_update_merge_window(envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_CommonLbConfig_update_merge_window(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_CommonLbConfig_set_update_merge_window(msg, sub); } @@ -1066,7 +1051,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_close_connections_on_hos /* envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig */ UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *)upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena); + return (envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *)_upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1087,7 +1072,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_routin UPB_INLINE struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_mutable_routing_enabled(envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_routing_enabled(msg); if (sub == NULL) { - sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + sub = (struct envoy_type_Percent*)_upb_msg_new(&envoy_type_Percent_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_routing_enabled(msg, sub); } @@ -1099,7 +1084,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_min_cl UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_mutable_min_cluster_size(envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena) { struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_min_cluster_size(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt64Value*)upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); + sub = (struct google_protobuf_UInt64Value*)_upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_min_cluster_size(msg, sub); } @@ -1112,7 +1097,7 @@ UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_fail_t /* envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig */ UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *)upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena); + return (envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *)_upb_msg_new(&envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig *envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1128,7 +1113,7 @@ UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_se /* envoy.api.v2.Cluster.RefreshRate */ UPB_INLINE envoy_api_v2_Cluster_RefreshRate *envoy_api_v2_Cluster_RefreshRate_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_RefreshRate *)upb_msg_new(&envoy_api_v2_Cluster_RefreshRate_msginit, arena); + return (envoy_api_v2_Cluster_RefreshRate *)_upb_msg_new(&envoy_api_v2_Cluster_RefreshRate_msginit, arena); } UPB_INLINE envoy_api_v2_Cluster_RefreshRate *envoy_api_v2_Cluster_RefreshRate_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1148,7 +1133,7 @@ UPB_INLINE void envoy_api_v2_Cluster_RefreshRate_set_base_interval(envoy_api_v2_ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_mutable_base_interval(envoy_api_v2_Cluster_RefreshRate *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_RefreshRate_base_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_RefreshRate_set_base_interval(msg, sub); } @@ -1160,7 +1145,7 @@ UPB_INLINE void envoy_api_v2_Cluster_RefreshRate_set_max_interval(envoy_api_v2_C UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_mutable_max_interval(envoy_api_v2_Cluster_RefreshRate *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_RefreshRate_max_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_Cluster_RefreshRate_set_max_interval(msg, sub); } @@ -1169,74 +1154,42 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_mut /* envoy.api.v2.Cluster.ExtensionProtocolOptionsEntry */ -UPB_INLINE envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *)upb_msg_new(&envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit, arena); -} -UPB_INLINE envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *ret = envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_key(const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_serialize(const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit, arena, len); +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_value(const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg) { + struct google_protobuf_Struct* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_key(const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_value(const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_set_key(envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_set_value(envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_mutable_value(envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg, upb_arena *arena) { - struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Struct*)); } /* envoy.api.v2.Cluster.TypedExtensionProtocolOptionsEntry */ -UPB_INLINE envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_new(upb_arena *arena) { - return (envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *)upb_msg_new(&envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit, arena); -} -UPB_INLINE envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *ret = envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_key(const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_serialize(const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit, arena, len); +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_value(const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg) { + struct google_protobuf_Any* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_key(const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_value(const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_set_key(envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_set_value(envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Any* envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_mutable_value(envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg, upb_arena *arena) { - struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Any*)); } /* envoy.api.v2.LoadBalancingPolicy */ UPB_INLINE envoy_api_v2_LoadBalancingPolicy *envoy_api_v2_LoadBalancingPolicy_new(upb_arena *arena) { - return (envoy_api_v2_LoadBalancingPolicy *)upb_msg_new(&envoy_api_v2_LoadBalancingPolicy_msginit, arena); + return (envoy_api_v2_LoadBalancingPolicy *)_upb_msg_new(&envoy_api_v2_LoadBalancingPolicy_msginit, arena); } UPB_INLINE envoy_api_v2_LoadBalancingPolicy *envoy_api_v2_LoadBalancingPolicy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1253,10 +1206,10 @@ UPB_INLINE envoy_api_v2_LoadBalancingPolicy_Policy** envoy_api_v2_LoadBalancingP return (envoy_api_v2_LoadBalancingPolicy_Policy**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_LoadBalancingPolicy_Policy** envoy_api_v2_LoadBalancingPolicy_resize_policies(envoy_api_v2_LoadBalancingPolicy *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_LoadBalancingPolicy_Policy**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_LoadBalancingPolicy_Policy**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_LoadBalancingPolicy_Policy* envoy_api_v2_LoadBalancingPolicy_add_policies(envoy_api_v2_LoadBalancingPolicy *msg, upb_arena *arena) { - struct envoy_api_v2_LoadBalancingPolicy_Policy* sub = (struct envoy_api_v2_LoadBalancingPolicy_Policy*)upb_msg_new(&envoy_api_v2_LoadBalancingPolicy_Policy_msginit, arena); + struct envoy_api_v2_LoadBalancingPolicy_Policy* sub = (struct envoy_api_v2_LoadBalancingPolicy_Policy*)_upb_msg_new(&envoy_api_v2_LoadBalancingPolicy_Policy_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1266,7 +1219,7 @@ UPB_INLINE struct envoy_api_v2_LoadBalancingPolicy_Policy* envoy_api_v2_LoadBala /* envoy.api.v2.LoadBalancingPolicy.Policy */ UPB_INLINE envoy_api_v2_LoadBalancingPolicy_Policy *envoy_api_v2_LoadBalancingPolicy_Policy_new(upb_arena *arena) { - return (envoy_api_v2_LoadBalancingPolicy_Policy *)upb_msg_new(&envoy_api_v2_LoadBalancingPolicy_Policy_msginit, arena); + return (envoy_api_v2_LoadBalancingPolicy_Policy *)_upb_msg_new(&envoy_api_v2_LoadBalancingPolicy_Policy_msginit, arena); } UPB_INLINE envoy_api_v2_LoadBalancingPolicy_Policy *envoy_api_v2_LoadBalancingPolicy_Policy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1290,7 +1243,7 @@ UPB_INLINE void envoy_api_v2_LoadBalancingPolicy_Policy_set_config(envoy_api_v2_ UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_LoadBalancingPolicy_Policy_mutable_config(envoy_api_v2_LoadBalancingPolicy_Policy *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_LoadBalancingPolicy_Policy_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_LoadBalancingPolicy_Policy_set_config(msg, sub); } @@ -1302,7 +1255,7 @@ UPB_INLINE void envoy_api_v2_LoadBalancingPolicy_Policy_set_typed_config(envoy_a UPB_INLINE struct google_protobuf_Any* envoy_api_v2_LoadBalancingPolicy_Policy_mutable_typed_config(envoy_api_v2_LoadBalancingPolicy_Policy *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_LoadBalancingPolicy_Policy_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_LoadBalancingPolicy_Policy_set_typed_config(msg, sub); } @@ -1312,7 +1265,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_LoadBalancingPolicy_Policy_m /* envoy.api.v2.UpstreamBindConfig */ UPB_INLINE envoy_api_v2_UpstreamBindConfig *envoy_api_v2_UpstreamBindConfig_new(upb_arena *arena) { - return (envoy_api_v2_UpstreamBindConfig *)upb_msg_new(&envoy_api_v2_UpstreamBindConfig_msginit, arena); + return (envoy_api_v2_UpstreamBindConfig *)_upb_msg_new(&envoy_api_v2_UpstreamBindConfig_msginit, arena); } UPB_INLINE envoy_api_v2_UpstreamBindConfig *envoy_api_v2_UpstreamBindConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1331,7 +1284,7 @@ UPB_INLINE void envoy_api_v2_UpstreamBindConfig_set_source_address(envoy_api_v2_ UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_UpstreamBindConfig_mutable_source_address(envoy_api_v2_UpstreamBindConfig *msg, upb_arena *arena) { struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_UpstreamBindConfig_source_address(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Address*)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); + sub = (struct envoy_api_v2_core_Address*)_upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); if (!sub) return NULL; envoy_api_v2_UpstreamBindConfig_set_source_address(msg, sub); } @@ -1341,7 +1294,7 @@ UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_UpstreamBindConfig_mut /* envoy.api.v2.UpstreamConnectionOptions */ UPB_INLINE envoy_api_v2_UpstreamConnectionOptions *envoy_api_v2_UpstreamConnectionOptions_new(upb_arena *arena) { - return (envoy_api_v2_UpstreamConnectionOptions *)upb_msg_new(&envoy_api_v2_UpstreamConnectionOptions_msginit, arena); + return (envoy_api_v2_UpstreamConnectionOptions *)_upb_msg_new(&envoy_api_v2_UpstreamConnectionOptions_msginit, arena); } UPB_INLINE envoy_api_v2_UpstreamConnectionOptions *envoy_api_v2_UpstreamConnectionOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1360,7 +1313,7 @@ UPB_INLINE void envoy_api_v2_UpstreamConnectionOptions_set_tcp_keepalive(envoy_a UPB_INLINE struct envoy_api_v2_core_TcpKeepalive* envoy_api_v2_UpstreamConnectionOptions_mutable_tcp_keepalive(envoy_api_v2_UpstreamConnectionOptions *msg, upb_arena *arena) { struct envoy_api_v2_core_TcpKeepalive* sub = (struct envoy_api_v2_core_TcpKeepalive*)envoy_api_v2_UpstreamConnectionOptions_tcp_keepalive(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_TcpKeepalive*)upb_msg_new(&envoy_api_v2_core_TcpKeepalive_msginit, arena); + sub = (struct envoy_api_v2_core_TcpKeepalive*)_upb_msg_new(&envoy_api_v2_core_TcpKeepalive_msginit, arena); if (!sub) return NULL; envoy_api_v2_UpstreamConnectionOptions_set_tcp_keepalive(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h index 9a1fa088f05..e645c1d46ef 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CLUSTER_CIRCUIT_BREAKER_PROTO_UPB_H_ #define ENVOY_API_V2_CLUSTER_CIRCUIT_BREAKER_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -33,7 +32,7 @@ extern const upb_msglayout google_protobuf_UInt32Value_msginit; /* envoy.api.v2.cluster.CircuitBreakers */ UPB_INLINE envoy_api_v2_cluster_CircuitBreakers *envoy_api_v2_cluster_CircuitBreakers_new(upb_arena *arena) { - return (envoy_api_v2_cluster_CircuitBreakers *)upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_msginit, arena); + return (envoy_api_v2_cluster_CircuitBreakers *)_upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_msginit, arena); } UPB_INLINE envoy_api_v2_cluster_CircuitBreakers *envoy_api_v2_cluster_CircuitBreakers_parse(const char *buf, size_t size, upb_arena *arena) { @@ -50,10 +49,10 @@ UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds** envoy_api_v2_cluste return (envoy_api_v2_cluster_CircuitBreakers_Thresholds**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds** envoy_api_v2_cluster_CircuitBreakers_resize_thresholds(envoy_api_v2_cluster_CircuitBreakers *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_cluster_CircuitBreakers_Thresholds**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_cluster_CircuitBreakers_Thresholds**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_cluster_CircuitBreakers_Thresholds* envoy_api_v2_cluster_CircuitBreakers_add_thresholds(envoy_api_v2_cluster_CircuitBreakers *msg, upb_arena *arena) { - struct envoy_api_v2_cluster_CircuitBreakers_Thresholds* sub = (struct envoy_api_v2_cluster_CircuitBreakers_Thresholds*)upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit, arena); + struct envoy_api_v2_cluster_CircuitBreakers_Thresholds* sub = (struct envoy_api_v2_cluster_CircuitBreakers_Thresholds*)_upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -63,7 +62,7 @@ UPB_INLINE struct envoy_api_v2_cluster_CircuitBreakers_Thresholds* envoy_api_v2_ /* envoy.api.v2.cluster.CircuitBreakers.Thresholds */ UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds *envoy_api_v2_cluster_CircuitBreakers_Thresholds_new(upb_arena *arena) { - return (envoy_api_v2_cluster_CircuitBreakers_Thresholds *)upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit, arena); + return (envoy_api_v2_cluster_CircuitBreakers_Thresholds *)_upb_msg_new(&envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit, arena); } UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds *envoy_api_v2_cluster_CircuitBreakers_Thresholds_parse(const char *buf, size_t size, upb_arena *arena) { @@ -91,7 +90,7 @@ UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_connecti UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_connections(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connections(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_connections(msg, sub); } @@ -103,7 +102,7 @@ UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_pending_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_pending_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_pending_requests(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_pending_requests(msg, sub); } @@ -115,7 +114,7 @@ UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_requests UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_requests(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_requests(msg, sub); } @@ -127,7 +126,7 @@ UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_retries( UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_retries(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_retries(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_retries(msg, sub); } @@ -142,7 +141,7 @@ UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_connecti UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_connection_pools(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connection_pools(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_connection_pools(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h index bd8746cc428..426ba467eb3 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPB_H_ #define ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -30,7 +29,7 @@ extern const upb_msglayout google_protobuf_Any_msginit; /* envoy.api.v2.cluster.Filter */ UPB_INLINE envoy_api_v2_cluster_Filter *envoy_api_v2_cluster_Filter_new(upb_arena *arena) { - return (envoy_api_v2_cluster_Filter *)upb_msg_new(&envoy_api_v2_cluster_Filter_msginit, arena); + return (envoy_api_v2_cluster_Filter *)_upb_msg_new(&envoy_api_v2_cluster_Filter_msginit, arena); } UPB_INLINE envoy_api_v2_cluster_Filter *envoy_api_v2_cluster_Filter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -53,7 +52,7 @@ UPB_INLINE void envoy_api_v2_cluster_Filter_set_typed_config(envoy_api_v2_cluste UPB_INLINE struct google_protobuf_Any* envoy_api_v2_cluster_Filter_mutable_typed_config(envoy_api_v2_cluster_Filter *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_cluster_Filter_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_Filter_set_typed_config(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h index 31f8b3f6aad..ab98c645a63 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CLUSTER_OUTLIER_DETECTION_PROTO_UPB_H_ #define ENVOY_API_V2_CLUSTER_OUTLIER_DETECTION_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -32,7 +31,7 @@ extern const upb_msglayout google_protobuf_UInt32Value_msginit; /* envoy.api.v2.cluster.OutlierDetection */ UPB_INLINE envoy_api_v2_cluster_OutlierDetection *envoy_api_v2_cluster_OutlierDetection_new(upb_arena *arena) { - return (envoy_api_v2_cluster_OutlierDetection *)upb_msg_new(&envoy_api_v2_cluster_OutlierDetection_msginit, arena); + return (envoy_api_v2_cluster_OutlierDetection *)_upb_msg_new(&envoy_api_v2_cluster_OutlierDetection_msginit, arena); } UPB_INLINE envoy_api_v2_cluster_OutlierDetection *envoy_api_v2_cluster_OutlierDetection_parse(const char *buf, size_t size, upb_arena *arena) { @@ -70,7 +69,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_5xx(envoy_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_consecutive_5xx(msg, sub); } @@ -82,7 +81,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_interval(envoy_api_v2_ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_mutable_interval(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_cluster_OutlierDetection_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_interval(msg, sub); } @@ -94,7 +93,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_base_ejection_time(env UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_mutable_base_ejection_time(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_cluster_OutlierDetection_base_ejection_time(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_base_ejection_time(msg, sub); } @@ -106,7 +105,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_max_ejection_percent(e UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_max_ejection_percent(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_max_ejection_percent(msg, sub); } @@ -118,7 +117,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_5xx(msg, sub); } @@ -130,7 +129,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_success_rate UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_enforcing_success_rate(msg, sub); } @@ -142,7 +141,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_minimum_h UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_success_rate_minimum_hosts(msg, sub); } @@ -154,7 +153,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_request_v UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_success_rate_request_volume(msg, sub); } @@ -166,7 +165,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_stdev_fac UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_stdev_factor(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_success_rate_stdev_factor(msg, sub); } @@ -178,7 +177,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_gateway_fa UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_consecutive_gateway_failure(msg, sub); } @@ -190,7 +189,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_gateway_failure(msg, sub); } @@ -205,7 +204,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_local_orig UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_local_origin_failure(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_consecutive_local_origin_failure(msg, sub); } @@ -217,7 +216,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_local_origin_failure(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_local_origin_failure(msg, sub); } @@ -229,7 +228,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_local_origin UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_local_origin_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_local_origin_success_rate(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_enforcing_local_origin_success_rate(msg, sub); } @@ -241,7 +240,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_thr UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_failure_percentage_threshold(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_failure_percentage_threshold(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_threshold(msg, sub); } @@ -253,7 +252,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_failure_perc UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_failure_percentage(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_failure_percentage(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_enforcing_failure_percentage(msg, sub); } @@ -265,7 +264,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_failure_perc UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_failure_percentage_local_origin(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_failure_percentage_local_origin(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_enforcing_failure_percentage_local_origin(msg, sub); } @@ -277,7 +276,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_min UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_failure_percentage_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_failure_percentage_minimum_hosts(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_minimum_hosts(msg, sub); } @@ -289,7 +288,7 @@ UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_req UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_failure_percentage_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_failure_percentage_request_volume(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_request_volume(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h index ebf172a036a..56565d7c584 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_ #define ENVOY_API_V2_CORE_ADDRESS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -54,7 +53,7 @@ typedef enum { /* envoy.api.v2.core.Pipe */ UPB_INLINE envoy_api_v2_core_Pipe *envoy_api_v2_core_Pipe_new(upb_arena *arena) { - return (envoy_api_v2_core_Pipe *)upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena); + return (envoy_api_v2_core_Pipe *)_upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena); } UPB_INLINE envoy_api_v2_core_Pipe *envoy_api_v2_core_Pipe_parse(const char *buf, size_t size, upb_arena *arena) { @@ -74,7 +73,7 @@ UPB_INLINE void envoy_api_v2_core_Pipe_set_path(envoy_api_v2_core_Pipe *msg, upb /* envoy.api.v2.core.SocketAddress */ UPB_INLINE envoy_api_v2_core_SocketAddress *envoy_api_v2_core_SocketAddress_new(upb_arena *arena) { - return (envoy_api_v2_core_SocketAddress *)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); + return (envoy_api_v2_core_SocketAddress *)_upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); } UPB_INLINE envoy_api_v2_core_SocketAddress *envoy_api_v2_core_SocketAddress_parse(const char *buf, size_t size, upb_arena *arena) { @@ -123,7 +122,7 @@ UPB_INLINE void envoy_api_v2_core_SocketAddress_set_ipv4_compat(envoy_api_v2_cor /* envoy.api.v2.core.TcpKeepalive */ UPB_INLINE envoy_api_v2_core_TcpKeepalive *envoy_api_v2_core_TcpKeepalive_new(upb_arena *arena) { - return (envoy_api_v2_core_TcpKeepalive *)upb_msg_new(&envoy_api_v2_core_TcpKeepalive_msginit, arena); + return (envoy_api_v2_core_TcpKeepalive *)_upb_msg_new(&envoy_api_v2_core_TcpKeepalive_msginit, arena); } UPB_INLINE envoy_api_v2_core_TcpKeepalive *envoy_api_v2_core_TcpKeepalive_parse(const char *buf, size_t size, upb_arena *arena) { @@ -144,7 +143,7 @@ UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(envoy_api_v2 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_probes(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(msg, sub); } @@ -156,7 +155,7 @@ UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_time(envoy_api_v2_c UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_time(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_TcpKeepalive_set_keepalive_time(msg, sub); } @@ -168,7 +167,7 @@ UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(envoy_api_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(msg, sub); } @@ -178,7 +177,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mu /* envoy.api.v2.core.BindConfig */ UPB_INLINE envoy_api_v2_core_BindConfig *envoy_api_v2_core_BindConfig_new(upb_arena *arena) { - return (envoy_api_v2_core_BindConfig *)upb_msg_new(&envoy_api_v2_core_BindConfig_msginit, arena); + return (envoy_api_v2_core_BindConfig *)_upb_msg_new(&envoy_api_v2_core_BindConfig_msginit, arena); } UPB_INLINE envoy_api_v2_core_BindConfig *envoy_api_v2_core_BindConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -199,7 +198,7 @@ UPB_INLINE void envoy_api_v2_core_BindConfig_set_source_address(envoy_api_v2_cor UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_mutable_source_address(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) { struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_BindConfig_source_address(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_SocketAddress*)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); + sub = (struct envoy_api_v2_core_SocketAddress*)_upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_BindConfig_set_source_address(msg, sub); } @@ -211,7 +210,7 @@ UPB_INLINE void envoy_api_v2_core_BindConfig_set_freebind(envoy_api_v2_core_Bind UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_mutable_freebind(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_BindConfig_freebind(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_BindConfig_set_freebind(msg, sub); } @@ -221,10 +220,10 @@ UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_core_BindConfig_ return (struct envoy_api_v2_core_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_core_BindConfig_resize_socket_options(envoy_api_v2_core_BindConfig *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_SocketOption* envoy_api_v2_core_BindConfig_add_socket_options(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) { - struct envoy_api_v2_core_SocketOption* sub = (struct envoy_api_v2_core_SocketOption*)upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena); + struct envoy_api_v2_core_SocketOption* sub = (struct envoy_api_v2_core_SocketOption*)_upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -234,7 +233,7 @@ UPB_INLINE struct envoy_api_v2_core_SocketOption* envoy_api_v2_core_BindConfig_a /* envoy.api.v2.core.Address */ UPB_INLINE envoy_api_v2_core_Address *envoy_api_v2_core_Address_new(upb_arena *arena) { - return (envoy_api_v2_core_Address *)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); + return (envoy_api_v2_core_Address *)_upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); } UPB_INLINE envoy_api_v2_core_Address *envoy_api_v2_core_Address_parse(const char *buf, size_t size, upb_arena *arena) { @@ -263,7 +262,7 @@ UPB_INLINE void envoy_api_v2_core_Address_set_socket_address(envoy_api_v2_core_A UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_mutable_socket_address(envoy_api_v2_core_Address *msg, upb_arena *arena) { struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_Address_socket_address(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_SocketAddress*)upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); + sub = (struct envoy_api_v2_core_SocketAddress*)_upb_msg_new(&envoy_api_v2_core_SocketAddress_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Address_set_socket_address(msg, sub); } @@ -275,7 +274,7 @@ UPB_INLINE void envoy_api_v2_core_Address_set_pipe(envoy_api_v2_core_Address *ms UPB_INLINE struct envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_mutable_pipe(envoy_api_v2_core_Address *msg, upb_arena *arena) { struct envoy_api_v2_core_Pipe* sub = (struct envoy_api_v2_core_Pipe*)envoy_api_v2_core_Address_pipe(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Pipe*)upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena); + sub = (struct envoy_api_v2_core_Pipe*)_upb_msg_new(&envoy_api_v2_core_Pipe_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Address_set_pipe(msg, sub); } @@ -285,7 +284,7 @@ UPB_INLINE struct envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_mutable_pipe /* envoy.api.v2.core.CidrRange */ UPB_INLINE envoy_api_v2_core_CidrRange *envoy_api_v2_core_CidrRange_new(upb_arena *arena) { - return (envoy_api_v2_core_CidrRange *)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); + return (envoy_api_v2_core_CidrRange *)_upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); } UPB_INLINE envoy_api_v2_core_CidrRange *envoy_api_v2_core_CidrRange_parse(const char *buf, size_t size, upb_arena *arena) { @@ -308,7 +307,7 @@ UPB_INLINE void envoy_api_v2_core_CidrRange_set_prefix_len(envoy_api_v2_core_Cid UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_mutable_prefix_len(envoy_api_v2_core_CidrRange *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_CidrRange_prefix_len(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_CidrRange_set_prefix_len(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c index dab0ee224c3..2c89321d331 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c @@ -54,7 +54,7 @@ static const upb_msglayout *const envoy_api_v2_core_Metadata_submsgs[1] = { }; static const upb_msglayout_field envoy_api_v2_core_Metadata__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, + {1, UPB_SIZE(0, 0), 0, 0, 11, 4}, }; const upb_msglayout envoy_api_v2_core_Metadata_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h index 28186e06f73..966a3d4fc29 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CORE_BASE_PROTO_UPB_H_ #define ENVOY_API_V2_CORE_BASE_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -113,7 +112,7 @@ typedef enum { /* envoy.api.v2.core.Locality */ UPB_INLINE envoy_api_v2_core_Locality *envoy_api_v2_core_Locality_new(upb_arena *arena) { - return (envoy_api_v2_core_Locality *)upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); + return (envoy_api_v2_core_Locality *)_upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); } UPB_INLINE envoy_api_v2_core_Locality *envoy_api_v2_core_Locality_parse(const char *buf, size_t size, upb_arena *arena) { @@ -141,7 +140,7 @@ UPB_INLINE void envoy_api_v2_core_Locality_set_sub_zone(envoy_api_v2_core_Locali /* envoy.api.v2.core.Node */ UPB_INLINE envoy_api_v2_core_Node *envoy_api_v2_core_Node_new(upb_arena *arena) { - return (envoy_api_v2_core_Node *)upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); + return (envoy_api_v2_core_Node *)_upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); } UPB_INLINE envoy_api_v2_core_Node *envoy_api_v2_core_Node_parse(const char *buf, size_t size, upb_arena *arena) { @@ -170,7 +169,7 @@ UPB_INLINE void envoy_api_v2_core_Node_set_metadata(envoy_api_v2_core_Node *msg, UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_Node_mutable_metadata(envoy_api_v2_core_Node *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_Node_metadata(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Node_set_metadata(msg, sub); } @@ -182,7 +181,7 @@ UPB_INLINE void envoy_api_v2_core_Node_set_locality(envoy_api_v2_core_Node *msg, UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_core_Node_mutable_locality(envoy_api_v2_core_Node *msg, upb_arena *arena) { struct envoy_api_v2_core_Locality* sub = (struct envoy_api_v2_core_Locality*)envoy_api_v2_core_Node_locality(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Locality*)upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); + sub = (struct envoy_api_v2_core_Locality*)_upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Node_set_locality(msg, sub); } @@ -195,7 +194,7 @@ UPB_INLINE void envoy_api_v2_core_Node_set_build_version(envoy_api_v2_core_Node /* envoy.api.v2.core.Metadata */ UPB_INLINE envoy_api_v2_core_Metadata *envoy_api_v2_core_Metadata_new(upb_arena *arena) { - return (envoy_api_v2_core_Metadata *)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); + return (envoy_api_v2_core_Metadata *)_upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); } UPB_INLINE envoy_api_v2_core_Metadata *envoy_api_v2_core_Metadata_parse(const char *buf, size_t size, upb_arena *arena) { @@ -206,59 +205,36 @@ UPB_INLINE char *envoy_api_v2_core_Metadata_serialize(const envoy_api_v2_core_Me return upb_encode(msg, &envoy_api_v2_core_Metadata_msginit, arena, len); } -UPB_INLINE const envoy_api_v2_core_Metadata_FilterMetadataEntry* const* envoy_api_v2_core_Metadata_filter_metadata(const envoy_api_v2_core_Metadata *msg, size_t *len) { return (const envoy_api_v2_core_Metadata_FilterMetadataEntry* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } +UPB_INLINE size_t envoy_api_v2_core_Metadata_filter_metadata_size(const envoy_api_v2_core_Metadata *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_Metadata_filter_metadata_get(const envoy_api_v2_core_Metadata *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_core_Metadata_FilterMetadataEntry* envoy_api_v2_core_Metadata_filter_metadata_next(const envoy_api_v2_core_Metadata *msg, size_t* iter) { return (const envoy_api_v2_core_Metadata_FilterMetadataEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } -UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry** envoy_api_v2_core_Metadata_mutable_filter_metadata(envoy_api_v2_core_Metadata *msg, size_t *len) { - return (envoy_api_v2_core_Metadata_FilterMetadataEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); -} -UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry** envoy_api_v2_core_Metadata_resize_filter_metadata(envoy_api_v2_core_Metadata *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_core_Metadata_FilterMetadataEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_core_Metadata_FilterMetadataEntry* envoy_api_v2_core_Metadata_add_filter_metadata(envoy_api_v2_core_Metadata *msg, upb_arena *arena) { - struct envoy_api_v2_core_Metadata_FilterMetadataEntry* sub = (struct envoy_api_v2_core_Metadata_FilterMetadataEntry*)upb_msg_new(&envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void envoy_api_v2_core_Metadata_filter_metadata_clear(envoy_api_v2_core_Metadata *msg) { _upb_msg_map_clear(msg, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_Metadata_filter_metadata_set(envoy_api_v2_core_Metadata *msg, upb_strview key, struct google_protobuf_Struct* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(0, 0), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_core_Metadata_filter_metadata_delete(envoy_api_v2_core_Metadata *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(0, 0), &key, 0); } +UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry* envoy_api_v2_core_Metadata_filter_metadata_nextmutable(envoy_api_v2_core_Metadata *msg, size_t* iter) { return (envoy_api_v2_core_Metadata_FilterMetadataEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } /* envoy.api.v2.core.Metadata.FilterMetadataEntry */ -UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry *envoy_api_v2_core_Metadata_FilterMetadataEntry_new(upb_arena *arena) { - return (envoy_api_v2_core_Metadata_FilterMetadataEntry *)upb_msg_new(&envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, arena); -} -UPB_INLINE envoy_api_v2_core_Metadata_FilterMetadataEntry *envoy_api_v2_core_Metadata_FilterMetadataEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_core_Metadata_FilterMetadataEntry *ret = envoy_api_v2_core_Metadata_FilterMetadataEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_api_v2_core_Metadata_FilterMetadataEntry_key(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_api_v2_core_Metadata_FilterMetadataEntry_serialize(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, arena, len); +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_Metadata_FilterMetadataEntry_value(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg) { + struct google_protobuf_Struct* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_core_Metadata_FilterMetadataEntry_key(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_Metadata_FilterMetadataEntry_value(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_core_Metadata_FilterMetadataEntry_set_key(envoy_api_v2_core_Metadata_FilterMetadataEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_core_Metadata_FilterMetadataEntry_set_value(envoy_api_v2_core_Metadata_FilterMetadataEntry *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_Metadata_FilterMetadataEntry_mutable_value(envoy_api_v2_core_Metadata_FilterMetadataEntry *msg, upb_arena *arena) { - struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_Metadata_FilterMetadataEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_core_Metadata_FilterMetadataEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Struct*)); } /* envoy.api.v2.core.RuntimeUInt32 */ UPB_INLINE envoy_api_v2_core_RuntimeUInt32 *envoy_api_v2_core_RuntimeUInt32_new(upb_arena *arena) { - return (envoy_api_v2_core_RuntimeUInt32 *)upb_msg_new(&envoy_api_v2_core_RuntimeUInt32_msginit, arena); + return (envoy_api_v2_core_RuntimeUInt32 *)_upb_msg_new(&envoy_api_v2_core_RuntimeUInt32_msginit, arena); } UPB_INLINE envoy_api_v2_core_RuntimeUInt32 *envoy_api_v2_core_RuntimeUInt32_parse(const char *buf, size_t size, upb_arena *arena) { @@ -282,7 +258,7 @@ UPB_INLINE void envoy_api_v2_core_RuntimeUInt32_set_runtime_key(envoy_api_v2_cor /* envoy.api.v2.core.RuntimeFeatureFlag */ UPB_INLINE envoy_api_v2_core_RuntimeFeatureFlag *envoy_api_v2_core_RuntimeFeatureFlag_new(upb_arena *arena) { - return (envoy_api_v2_core_RuntimeFeatureFlag *)upb_msg_new(&envoy_api_v2_core_RuntimeFeatureFlag_msginit, arena); + return (envoy_api_v2_core_RuntimeFeatureFlag *)_upb_msg_new(&envoy_api_v2_core_RuntimeFeatureFlag_msginit, arena); } UPB_INLINE envoy_api_v2_core_RuntimeFeatureFlag *envoy_api_v2_core_RuntimeFeatureFlag_parse(const char *buf, size_t size, upb_arena *arena) { @@ -302,7 +278,7 @@ UPB_INLINE void envoy_api_v2_core_RuntimeFeatureFlag_set_default_value(envoy_api UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_RuntimeFeatureFlag_mutable_default_value(envoy_api_v2_core_RuntimeFeatureFlag *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_RuntimeFeatureFlag_default_value(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_RuntimeFeatureFlag_set_default_value(msg, sub); } @@ -315,7 +291,7 @@ UPB_INLINE void envoy_api_v2_core_RuntimeFeatureFlag_set_runtime_key(envoy_api_v /* envoy.api.v2.core.HeaderValue */ UPB_INLINE envoy_api_v2_core_HeaderValue *envoy_api_v2_core_HeaderValue_new(upb_arena *arena) { - return (envoy_api_v2_core_HeaderValue *)upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); + return (envoy_api_v2_core_HeaderValue *)_upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); } UPB_INLINE envoy_api_v2_core_HeaderValue *envoy_api_v2_core_HeaderValue_parse(const char *buf, size_t size, upb_arena *arena) { @@ -339,7 +315,7 @@ UPB_INLINE void envoy_api_v2_core_HeaderValue_set_value(envoy_api_v2_core_Header /* envoy.api.v2.core.HeaderValueOption */ UPB_INLINE envoy_api_v2_core_HeaderValueOption *envoy_api_v2_core_HeaderValueOption_new(upb_arena *arena) { - return (envoy_api_v2_core_HeaderValueOption *)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + return (envoy_api_v2_core_HeaderValueOption *)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); } UPB_INLINE envoy_api_v2_core_HeaderValueOption *envoy_api_v2_core_HeaderValueOption_parse(const char *buf, size_t size, upb_arena *arena) { @@ -359,7 +335,7 @@ UPB_INLINE void envoy_api_v2_core_HeaderValueOption_set_header(envoy_api_v2_core UPB_INLINE struct envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderValueOption_mutable_header(envoy_api_v2_core_HeaderValueOption *msg, upb_arena *arena) { struct envoy_api_v2_core_HeaderValue* sub = (struct envoy_api_v2_core_HeaderValue*)envoy_api_v2_core_HeaderValueOption_header(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HeaderValue*)upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); + sub = (struct envoy_api_v2_core_HeaderValue*)_upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HeaderValueOption_set_header(msg, sub); } @@ -371,7 +347,7 @@ UPB_INLINE void envoy_api_v2_core_HeaderValueOption_set_append(envoy_api_v2_core UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_HeaderValueOption_mutable_append(envoy_api_v2_core_HeaderValueOption *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_HeaderValueOption_append(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HeaderValueOption_set_append(msg, sub); } @@ -381,7 +357,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_HeaderValueOption /* envoy.api.v2.core.HeaderMap */ UPB_INLINE envoy_api_v2_core_HeaderMap *envoy_api_v2_core_HeaderMap_new(upb_arena *arena) { - return (envoy_api_v2_core_HeaderMap *)upb_msg_new(&envoy_api_v2_core_HeaderMap_msginit, arena); + return (envoy_api_v2_core_HeaderMap *)_upb_msg_new(&envoy_api_v2_core_HeaderMap_msginit, arena); } UPB_INLINE envoy_api_v2_core_HeaderMap *envoy_api_v2_core_HeaderMap_parse(const char *buf, size_t size, upb_arena *arena) { @@ -398,10 +374,10 @@ UPB_INLINE envoy_api_v2_core_HeaderValue** envoy_api_v2_core_HeaderMap_mutable_h return (envoy_api_v2_core_HeaderValue**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_core_HeaderValue** envoy_api_v2_core_HeaderMap_resize_headers(envoy_api_v2_core_HeaderMap *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_core_HeaderValue**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_core_HeaderValue**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderMap_add_headers(envoy_api_v2_core_HeaderMap *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValue* sub = (struct envoy_api_v2_core_HeaderValue*)upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); + struct envoy_api_v2_core_HeaderValue* sub = (struct envoy_api_v2_core_HeaderValue*)_upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -411,7 +387,7 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderMap_add /* envoy.api.v2.core.DataSource */ UPB_INLINE envoy_api_v2_core_DataSource *envoy_api_v2_core_DataSource_new(upb_arena *arena) { - return (envoy_api_v2_core_DataSource *)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + return (envoy_api_v2_core_DataSource *)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); } UPB_INLINE envoy_api_v2_core_DataSource *envoy_api_v2_core_DataSource_parse(const char *buf, size_t size, upb_arena *arena) { @@ -450,7 +426,7 @@ UPB_INLINE void envoy_api_v2_core_DataSource_set_inline_string(envoy_api_v2_core /* envoy.api.v2.core.RemoteDataSource */ UPB_INLINE envoy_api_v2_core_RemoteDataSource *envoy_api_v2_core_RemoteDataSource_new(upb_arena *arena) { - return (envoy_api_v2_core_RemoteDataSource *)upb_msg_new(&envoy_api_v2_core_RemoteDataSource_msginit, arena); + return (envoy_api_v2_core_RemoteDataSource *)_upb_msg_new(&envoy_api_v2_core_RemoteDataSource_msginit, arena); } UPB_INLINE envoy_api_v2_core_RemoteDataSource *envoy_api_v2_core_RemoteDataSource_parse(const char *buf, size_t size, upb_arena *arena) { @@ -470,7 +446,7 @@ UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_http_uri(envoy_api_v2_cor UPB_INLINE struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_mutable_http_uri(envoy_api_v2_core_RemoteDataSource *msg, upb_arena *arena) { struct envoy_api_v2_core_HttpUri* sub = (struct envoy_api_v2_core_HttpUri*)envoy_api_v2_core_RemoteDataSource_http_uri(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HttpUri*)upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena); + sub = (struct envoy_api_v2_core_HttpUri*)_upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_RemoteDataSource_set_http_uri(msg, sub); } @@ -483,7 +459,7 @@ UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_sha256(envoy_api_v2_core_ /* envoy.api.v2.core.AsyncDataSource */ UPB_INLINE envoy_api_v2_core_AsyncDataSource *envoy_api_v2_core_AsyncDataSource_new(upb_arena *arena) { - return (envoy_api_v2_core_AsyncDataSource *)upb_msg_new(&envoy_api_v2_core_AsyncDataSource_msginit, arena); + return (envoy_api_v2_core_AsyncDataSource *)_upb_msg_new(&envoy_api_v2_core_AsyncDataSource_msginit, arena); } UPB_INLINE envoy_api_v2_core_AsyncDataSource *envoy_api_v2_core_AsyncDataSource_parse(const char *buf, size_t size, upb_arena *arena) { @@ -512,7 +488,7 @@ UPB_INLINE void envoy_api_v2_core_AsyncDataSource_set_local(envoy_api_v2_core_As UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_AsyncDataSource_mutable_local(envoy_api_v2_core_AsyncDataSource *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_AsyncDataSource_local(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_AsyncDataSource_set_local(msg, sub); } @@ -524,7 +500,7 @@ UPB_INLINE void envoy_api_v2_core_AsyncDataSource_set_remote(envoy_api_v2_core_A UPB_INLINE struct envoy_api_v2_core_RemoteDataSource* envoy_api_v2_core_AsyncDataSource_mutable_remote(envoy_api_v2_core_AsyncDataSource *msg, upb_arena *arena) { struct envoy_api_v2_core_RemoteDataSource* sub = (struct envoy_api_v2_core_RemoteDataSource*)envoy_api_v2_core_AsyncDataSource_remote(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_RemoteDataSource*)upb_msg_new(&envoy_api_v2_core_RemoteDataSource_msginit, arena); + sub = (struct envoy_api_v2_core_RemoteDataSource*)_upb_msg_new(&envoy_api_v2_core_RemoteDataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_AsyncDataSource_set_remote(msg, sub); } @@ -534,7 +510,7 @@ UPB_INLINE struct envoy_api_v2_core_RemoteDataSource* envoy_api_v2_core_AsyncDat /* envoy.api.v2.core.TransportSocket */ UPB_INLINE envoy_api_v2_core_TransportSocket *envoy_api_v2_core_TransportSocket_new(upb_arena *arena) { - return (envoy_api_v2_core_TransportSocket *)upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); + return (envoy_api_v2_core_TransportSocket *)_upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); } UPB_INLINE envoy_api_v2_core_TransportSocket *envoy_api_v2_core_TransportSocket_parse(const char *buf, size_t size, upb_arena *arena) { @@ -567,7 +543,7 @@ UPB_INLINE void envoy_api_v2_core_TransportSocket_set_config(envoy_api_v2_core_T UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_TransportSocket_mutable_config(envoy_api_v2_core_TransportSocket *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_TransportSocket_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_TransportSocket_set_config(msg, sub); } @@ -579,7 +555,7 @@ UPB_INLINE void envoy_api_v2_core_TransportSocket_set_typed_config(envoy_api_v2_ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_core_TransportSocket_mutable_typed_config(envoy_api_v2_core_TransportSocket *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_core_TransportSocket_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_TransportSocket_set_typed_config(msg, sub); } @@ -589,7 +565,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_core_TransportSocket_mutable /* envoy.api.v2.core.SocketOption */ UPB_INLINE envoy_api_v2_core_SocketOption *envoy_api_v2_core_SocketOption_new(upb_arena *arena) { - return (envoy_api_v2_core_SocketOption *)upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena); + return (envoy_api_v2_core_SocketOption *)_upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena); } UPB_INLINE envoy_api_v2_core_SocketOption *envoy_api_v2_core_SocketOption_parse(const char *buf, size_t size, upb_arena *arena) { @@ -638,7 +614,7 @@ UPB_INLINE void envoy_api_v2_core_SocketOption_set_state(envoy_api_v2_core_Socke /* envoy.api.v2.core.RuntimeFractionalPercent */ UPB_INLINE envoy_api_v2_core_RuntimeFractionalPercent *envoy_api_v2_core_RuntimeFractionalPercent_new(upb_arena *arena) { - return (envoy_api_v2_core_RuntimeFractionalPercent *)upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); + return (envoy_api_v2_core_RuntimeFractionalPercent *)_upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); } UPB_INLINE envoy_api_v2_core_RuntimeFractionalPercent *envoy_api_v2_core_RuntimeFractionalPercent_parse(const char *buf, size_t size, upb_arena *arena) { @@ -658,7 +634,7 @@ UPB_INLINE void envoy_api_v2_core_RuntimeFractionalPercent_set_default_value(env UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_core_RuntimeFractionalPercent_mutable_default_value(envoy_api_v2_core_RuntimeFractionalPercent *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_core_RuntimeFractionalPercent_default_value(msg); if (sub == NULL) { - sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + sub = (struct envoy_type_FractionalPercent*)_upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_RuntimeFractionalPercent_set_default_value(msg, sub); } @@ -671,7 +647,7 @@ UPB_INLINE void envoy_api_v2_core_RuntimeFractionalPercent_set_runtime_key(envoy /* envoy.api.v2.core.ControlPlane */ UPB_INLINE envoy_api_v2_core_ControlPlane *envoy_api_v2_core_ControlPlane_new(upb_arena *arena) { - return (envoy_api_v2_core_ControlPlane *)upb_msg_new(&envoy_api_v2_core_ControlPlane_msginit, arena); + return (envoy_api_v2_core_ControlPlane *)_upb_msg_new(&envoy_api_v2_core_ControlPlane_msginit, arena); } UPB_INLINE envoy_api_v2_core_ControlPlane *envoy_api_v2_core_ControlPlane_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h index dc14b8d9e9a..ac1aaf6550d 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CORE_CONFIG_SOURCE_PROTO_UPB_H_ #define ENVOY_API_V2_CORE_CONFIG_SOURCE_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -55,7 +54,7 @@ typedef enum { /* envoy.api.v2.core.ApiConfigSource */ UPB_INLINE envoy_api_v2_core_ApiConfigSource *envoy_api_v2_core_ApiConfigSource_new(upb_arena *arena) { - return (envoy_api_v2_core_ApiConfigSource *)upb_msg_new(&envoy_api_v2_core_ApiConfigSource_msginit, arena); + return (envoy_api_v2_core_ApiConfigSource *)_upb_msg_new(&envoy_api_v2_core_ApiConfigSource_msginit, arena); } UPB_INLINE envoy_api_v2_core_ApiConfigSource *envoy_api_v2_core_ApiConfigSource_parse(const char *buf, size_t size, upb_arena *arena) { @@ -81,11 +80,11 @@ UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_mutable_cluster_names( return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len); } UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_resize_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_add_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) { UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 16)) = value; @@ -93,7 +92,7 @@ UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_refresh_delay(envoy_api_v2 UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_refresh_delay(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_ApiConfigSource_set_refresh_delay(msg, sub); } @@ -103,10 +102,10 @@ UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSou return (struct envoy_api_v2_core_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len); } UPB_INLINE struct envoy_api_v2_core_GrpcService** envoy_api_v2_core_ApiConfigSource_resize_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_GrpcService**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_GrpcService**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_ApiConfigSource_add_grpc_services(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { - struct envoy_api_v2_core_GrpcService* sub = (struct envoy_api_v2_core_GrpcService*)upb_msg_new(&envoy_api_v2_core_GrpcService_msginit, arena); + struct envoy_api_v2_core_GrpcService* sub = (struct envoy_api_v2_core_GrpcService*)_upb_msg_new(&envoy_api_v2_core_GrpcService_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -118,7 +117,7 @@ UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_request_timeout(envoy_api_ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_request_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_ApiConfigSource_set_request_timeout(msg, sub); } @@ -130,7 +129,7 @@ UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_rate_limit_settings(envoy_ UPB_INLINE struct envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_mutable_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct envoy_api_v2_core_RateLimitSettings* sub = (struct envoy_api_v2_core_RateLimitSettings*)envoy_api_v2_core_ApiConfigSource_rate_limit_settings(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_RateLimitSettings*)upb_msg_new(&envoy_api_v2_core_RateLimitSettings_msginit, arena); + sub = (struct envoy_api_v2_core_RateLimitSettings*)_upb_msg_new(&envoy_api_v2_core_RateLimitSettings_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_ApiConfigSource_set_rate_limit_settings(msg, sub); } @@ -143,7 +142,7 @@ UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_set_node_on_first_message_ /* envoy.api.v2.core.AggregatedConfigSource */ UPB_INLINE envoy_api_v2_core_AggregatedConfigSource *envoy_api_v2_core_AggregatedConfigSource_new(upb_arena *arena) { - return (envoy_api_v2_core_AggregatedConfigSource *)upb_msg_new(&envoy_api_v2_core_AggregatedConfigSource_msginit, arena); + return (envoy_api_v2_core_AggregatedConfigSource *)_upb_msg_new(&envoy_api_v2_core_AggregatedConfigSource_msginit, arena); } UPB_INLINE envoy_api_v2_core_AggregatedConfigSource *envoy_api_v2_core_AggregatedConfigSource_parse(const char *buf, size_t size, upb_arena *arena) { @@ -159,7 +158,7 @@ UPB_INLINE char *envoy_api_v2_core_AggregatedConfigSource_serialize(const envoy_ /* envoy.api.v2.core.SelfConfigSource */ UPB_INLINE envoy_api_v2_core_SelfConfigSource *envoy_api_v2_core_SelfConfigSource_new(upb_arena *arena) { - return (envoy_api_v2_core_SelfConfigSource *)upb_msg_new(&envoy_api_v2_core_SelfConfigSource_msginit, arena); + return (envoy_api_v2_core_SelfConfigSource *)_upb_msg_new(&envoy_api_v2_core_SelfConfigSource_msginit, arena); } UPB_INLINE envoy_api_v2_core_SelfConfigSource *envoy_api_v2_core_SelfConfigSource_parse(const char *buf, size_t size, upb_arena *arena) { @@ -175,7 +174,7 @@ UPB_INLINE char *envoy_api_v2_core_SelfConfigSource_serialize(const envoy_api_v2 /* envoy.api.v2.core.RateLimitSettings */ UPB_INLINE envoy_api_v2_core_RateLimitSettings *envoy_api_v2_core_RateLimitSettings_new(upb_arena *arena) { - return (envoy_api_v2_core_RateLimitSettings *)upb_msg_new(&envoy_api_v2_core_RateLimitSettings_msginit, arena); + return (envoy_api_v2_core_RateLimitSettings *)_upb_msg_new(&envoy_api_v2_core_RateLimitSettings_msginit, arena); } UPB_INLINE envoy_api_v2_core_RateLimitSettings *envoy_api_v2_core_RateLimitSettings_parse(const char *buf, size_t size, upb_arena *arena) { @@ -195,7 +194,7 @@ UPB_INLINE void envoy_api_v2_core_RateLimitSettings_set_max_tokens(envoy_api_v2_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_RateLimitSettings_mutable_max_tokens(envoy_api_v2_core_RateLimitSettings *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_RateLimitSettings_max_tokens(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_RateLimitSettings_set_max_tokens(msg, sub); } @@ -207,7 +206,7 @@ UPB_INLINE void envoy_api_v2_core_RateLimitSettings_set_fill_rate(envoy_api_v2_c UPB_INLINE struct google_protobuf_DoubleValue* envoy_api_v2_core_RateLimitSettings_mutable_fill_rate(envoy_api_v2_core_RateLimitSettings *msg, upb_arena *arena) { struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_api_v2_core_RateLimitSettings_fill_rate(msg); if (sub == NULL) { - sub = (struct google_protobuf_DoubleValue*)upb_msg_new(&google_protobuf_DoubleValue_msginit, arena); + sub = (struct google_protobuf_DoubleValue*)_upb_msg_new(&google_protobuf_DoubleValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_RateLimitSettings_set_fill_rate(msg, sub); } @@ -217,7 +216,7 @@ UPB_INLINE struct google_protobuf_DoubleValue* envoy_api_v2_core_RateLimitSettin /* envoy.api.v2.core.ConfigSource */ UPB_INLINE envoy_api_v2_core_ConfigSource *envoy_api_v2_core_ConfigSource_new(upb_arena *arena) { - return (envoy_api_v2_core_ConfigSource *)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + return (envoy_api_v2_core_ConfigSource *)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); } UPB_INLINE envoy_api_v2_core_ConfigSource *envoy_api_v2_core_ConfigSource_parse(const char *buf, size_t size, upb_arena *arena) { @@ -256,7 +255,7 @@ UPB_INLINE void envoy_api_v2_core_ConfigSource_set_api_config_source(envoy_api_v UPB_INLINE struct envoy_api_v2_core_ApiConfigSource* envoy_api_v2_core_ConfigSource_mutable_api_config_source(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) { struct envoy_api_v2_core_ApiConfigSource* sub = (struct envoy_api_v2_core_ApiConfigSource*)envoy_api_v2_core_ConfigSource_api_config_source(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ApiConfigSource*)upb_msg_new(&envoy_api_v2_core_ApiConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_ApiConfigSource*)_upb_msg_new(&envoy_api_v2_core_ApiConfigSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_ConfigSource_set_api_config_source(msg, sub); } @@ -268,7 +267,7 @@ UPB_INLINE void envoy_api_v2_core_ConfigSource_set_ads(envoy_api_v2_core_ConfigS UPB_INLINE struct envoy_api_v2_core_AggregatedConfigSource* envoy_api_v2_core_ConfigSource_mutable_ads(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) { struct envoy_api_v2_core_AggregatedConfigSource* sub = (struct envoy_api_v2_core_AggregatedConfigSource*)envoy_api_v2_core_ConfigSource_ads(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_AggregatedConfigSource*)upb_msg_new(&envoy_api_v2_core_AggregatedConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_AggregatedConfigSource*)_upb_msg_new(&envoy_api_v2_core_AggregatedConfigSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_ConfigSource_set_ads(msg, sub); } @@ -280,7 +279,7 @@ UPB_INLINE void envoy_api_v2_core_ConfigSource_set_initial_fetch_timeout(envoy_a UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ConfigSource_mutable_initial_fetch_timeout(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ConfigSource_initial_fetch_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_ConfigSource_set_initial_fetch_timeout(msg, sub); } @@ -292,7 +291,7 @@ UPB_INLINE void envoy_api_v2_core_ConfigSource_set_self(envoy_api_v2_core_Config UPB_INLINE struct envoy_api_v2_core_SelfConfigSource* envoy_api_v2_core_ConfigSource_mutable_self(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) { struct envoy_api_v2_core_SelfConfigSource* sub = (struct envoy_api_v2_core_SelfConfigSource*)envoy_api_v2_core_ConfigSource_self(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_SelfConfigSource*)upb_msg_new(&envoy_api_v2_core_SelfConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_SelfConfigSource*)_upb_msg_new(&envoy_api_v2_core_SelfConfigSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_ConfigSource_set_self(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h index bff3c3c0e81..6201c03fd17 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CORE_GRPC_SERVICE_PROTO_UPB_H_ #define ENVOY_API_V2_CORE_GRPC_SERVICE_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -67,7 +66,7 @@ extern const upb_msglayout google_protobuf_Struct_msginit; /* envoy.api.v2.core.GrpcService */ UPB_INLINE envoy_api_v2_core_GrpcService *envoy_api_v2_core_GrpcService_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService *)upb_msg_new(&envoy_api_v2_core_GrpcService_msginit, arena); + return (envoy_api_v2_core_GrpcService *)_upb_msg_new(&envoy_api_v2_core_GrpcService_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService *envoy_api_v2_core_GrpcService_parse(const char *buf, size_t size, upb_arena *arena) { @@ -98,7 +97,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_set_envoy_grpc(envoy_api_v2_core_G UPB_INLINE struct envoy_api_v2_core_GrpcService_EnvoyGrpc* envoy_api_v2_core_GrpcService_mutable_envoy_grpc(envoy_api_v2_core_GrpcService *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_EnvoyGrpc* sub = (struct envoy_api_v2_core_GrpcService_EnvoyGrpc*)envoy_api_v2_core_GrpcService_envoy_grpc(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_GrpcService_EnvoyGrpc*)upb_msg_new(&envoy_api_v2_core_GrpcService_EnvoyGrpc_msginit, arena); + sub = (struct envoy_api_v2_core_GrpcService_EnvoyGrpc*)_upb_msg_new(&envoy_api_v2_core_GrpcService_EnvoyGrpc_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_set_envoy_grpc(msg, sub); } @@ -110,7 +109,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_set_google_grpc(envoy_api_v2_core_ UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc* envoy_api_v2_core_GrpcService_mutable_google_grpc(envoy_api_v2_core_GrpcService *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_GoogleGrpc* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc*)envoy_api_v2_core_GrpcService_google_grpc(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_msginit, arena); + sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc*)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_set_google_grpc(msg, sub); } @@ -122,7 +121,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_set_timeout(envoy_api_v2_core_Grpc UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_GrpcService_mutable_timeout(envoy_api_v2_core_GrpcService *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_GrpcService_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_set_timeout(msg, sub); } @@ -132,10 +131,10 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValue** envoy_api_v2_core_GrpcService_ return (struct envoy_api_v2_core_HeaderValue**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValue** envoy_api_v2_core_GrpcService_resize_initial_metadata(envoy_api_v2_core_GrpcService *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValue**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValue**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValue* envoy_api_v2_core_GrpcService_add_initial_metadata(envoy_api_v2_core_GrpcService *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValue* sub = (struct envoy_api_v2_core_HeaderValue*)upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); + struct envoy_api_v2_core_HeaderValue* sub = (struct envoy_api_v2_core_HeaderValue*)_upb_msg_new(&envoy_api_v2_core_HeaderValue_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -145,7 +144,7 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValue* envoy_api_v2_core_GrpcService_a /* envoy.api.v2.core.GrpcService.EnvoyGrpc */ UPB_INLINE envoy_api_v2_core_GrpcService_EnvoyGrpc *envoy_api_v2_core_GrpcService_EnvoyGrpc_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_EnvoyGrpc *)upb_msg_new(&envoy_api_v2_core_GrpcService_EnvoyGrpc_msginit, arena); + return (envoy_api_v2_core_GrpcService_EnvoyGrpc *)_upb_msg_new(&envoy_api_v2_core_GrpcService_EnvoyGrpc_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_EnvoyGrpc *envoy_api_v2_core_GrpcService_EnvoyGrpc_parse(const char *buf, size_t size, upb_arena *arena) { @@ -165,7 +164,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_EnvoyGrpc_set_cluster_name(envoy_a /* envoy.api.v2.core.GrpcService.GoogleGrpc */ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc *envoy_api_v2_core_GrpcService_GoogleGrpc_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_msginit, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc *)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc *envoy_api_v2_core_GrpcService_GoogleGrpc_parse(const char *buf, size_t size, upb_arena *arena) { @@ -192,7 +191,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_set_channel_credentials UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_mutable_channel_credentials(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials*)envoy_api_v2_core_GrpcService_GoogleGrpc_channel_credentials(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_msginit, arena); + sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials*)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_set_channel_credentials(msg, sub); } @@ -202,10 +201,10 @@ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials** envoy_api_ return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials** envoy_api_v2_core_GrpcService_GoogleGrpc_resize_call_credentials(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_add_call_credentials(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, upb_arena *arena) { - struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_msginit, arena); + struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials*)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -223,7 +222,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_set_config(envoy_api_v2 UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_GrpcService_GoogleGrpc_mutable_config(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_GrpcService_GoogleGrpc_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_set_config(msg, sub); } @@ -233,7 +232,7 @@ UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_GrpcService_GoogleGr /* envoy.api.v2.core.GrpcService.GoogleGrpc.SslCredentials */ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_msginit, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_parse(const char *buf, size_t size, upb_arena *arena) { @@ -254,7 +253,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_root UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_mutable_root_certs(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_root_certs(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_root_certs(msg, sub); } @@ -266,7 +265,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_priv UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_mutable_private_key(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_private_key(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_private_key(msg, sub); } @@ -278,7 +277,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_cert UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_mutable_cert_chain(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_cert_chain(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_cert_chain(msg, sub); } @@ -288,7 +287,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_Go /* envoy.api.v2.core.GrpcService.GoogleGrpc.GoogleLocalCredentials */ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials *)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_parse(const char *buf, size_t size, upb_arena *arena) { @@ -304,7 +303,7 @@ UPB_INLINE char *envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials /* envoy.api.v2.core.GrpcService.GoogleGrpc.ChannelCredentials */ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_msginit, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_parse(const char *buf, size_t size, upb_arena *arena) { @@ -336,7 +335,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_set_ UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_mutable_ssl_credentials(envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials*)envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_ssl_credentials(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_msginit, arena); + sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials*)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_set_ssl_credentials(msg, sub); } @@ -348,7 +347,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_set_ UPB_INLINE struct google_protobuf_Empty* envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_mutable_google_default(envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg, upb_arena *arena) { struct google_protobuf_Empty* sub = (struct google_protobuf_Empty*)envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_google_default(msg); if (sub == NULL) { - sub = (struct google_protobuf_Empty*)upb_msg_new(&google_protobuf_Empty_msginit, arena); + sub = (struct google_protobuf_Empty*)_upb_msg_new(&google_protobuf_Empty_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_set_google_default(msg, sub); } @@ -360,7 +359,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_set_ UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_mutable_local_credentials(envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials*)envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_local_credentials(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit, arena); + sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials*)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_set_local_credentials(msg, sub); } @@ -370,7 +369,7 @@ UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredential /* envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials */ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_msginit, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_parse(const char *buf, size_t size, upb_arena *arena) { @@ -414,7 +413,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_goo UPB_INLINE struct google_protobuf_Empty* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_mutable_google_compute_engine(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg, upb_arena *arena) { struct google_protobuf_Empty* sub = (struct google_protobuf_Empty*)envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_google_compute_engine(msg); if (sub == NULL) { - sub = (struct google_protobuf_Empty*)upb_msg_new(&google_protobuf_Empty_msginit, arena); + sub = (struct google_protobuf_Empty*)_upb_msg_new(&google_protobuf_Empty_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_google_compute_engine(msg, sub); } @@ -429,7 +428,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_ser UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_mutable_service_account_jwt_access(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials*)envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_service_account_jwt_access(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, arena); + sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials*)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_service_account_jwt_access(msg, sub); } @@ -441,7 +440,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_goo UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_mutable_google_iam(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials*)envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_google_iam(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, arena); + sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials*)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_google_iam(msg, sub); } @@ -453,7 +452,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_fro UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_mutable_from_plugin(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin*)envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_from_plugin(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin*)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit, arena); + sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin*)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_from_plugin(msg, sub); } @@ -463,7 +462,7 @@ UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_Metad /* envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials */ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_parse(const char *buf, size_t size, upb_arena *arena) { @@ -487,7 +486,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_Service /* envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials */ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_parse(const char *buf, size_t size, upb_arena *arena) { @@ -511,7 +510,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleI /* envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin */ UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *)upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit, arena); + return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *)_upb_msg_new(&envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_parse(const char *buf, size_t size, upb_arena *arena) { @@ -544,7 +543,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_Metadat UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_mutable_config(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_set_config(msg, sub); } @@ -556,7 +555,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_Metadat UPB_INLINE struct google_protobuf_Any* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_mutable_typed_config(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_set_typed_config(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h index 53a385e628f..ef3a245cc7a 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CORE_HEALTH_CHECK_PROTO_UPB_H_ #define ENVOY_API_V2_CORE_HEALTH_CHECK_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -69,7 +68,7 @@ typedef enum { /* envoy.api.v2.core.HealthCheck */ UPB_INLINE envoy_api_v2_core_HealthCheck *envoy_api_v2_core_HealthCheck_new(upb_arena *arena) { - return (envoy_api_v2_core_HealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_msginit, arena); + return (envoy_api_v2_core_HealthCheck *)_upb_msg_new(&envoy_api_v2_core_HealthCheck_msginit, arena); } UPB_INLINE envoy_api_v2_core_HealthCheck *envoy_api_v2_core_HealthCheck_parse(const char *buf, size_t size, upb_arena *arena) { @@ -119,7 +118,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_timeout(envoy_api_v2_core_Heal UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_timeout(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_timeout(msg, sub); } @@ -131,7 +130,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_interval(envoy_api_v2_core_Hea UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_interval(msg, sub); } @@ -143,7 +142,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_interval_jitter(envoy_api_v2_c UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_interval_jitter(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_interval_jitter(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_interval_jitter(msg, sub); } @@ -155,7 +154,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_threshold(envoy_api_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_unhealthy_threshold(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_unhealthy_threshold(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_unhealthy_threshold(msg, sub); } @@ -167,7 +166,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_healthy_threshold(envoy_api_v2 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_healthy_threshold(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_healthy_threshold(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_healthy_threshold(msg, sub); } @@ -179,7 +178,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_alt_port(envoy_api_v2_core_Hea UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_alt_port(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_alt_port(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_alt_port(msg, sub); } @@ -191,7 +190,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_reuse_connection(envoy_api_v2_ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_HealthCheck_mutable_reuse_connection(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_HealthCheck_reuse_connection(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_reuse_connection(msg, sub); } @@ -203,7 +202,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_http_health_check(envoy_api_v2 UPB_INLINE struct envoy_api_v2_core_HealthCheck_HttpHealthCheck* envoy_api_v2_core_HealthCheck_mutable_http_health_check(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_HttpHealthCheck* sub = (struct envoy_api_v2_core_HealthCheck_HttpHealthCheck*)envoy_api_v2_core_HealthCheck_http_health_check(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HealthCheck_HttpHealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, arena); + sub = (struct envoy_api_v2_core_HealthCheck_HttpHealthCheck*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_http_health_check(msg, sub); } @@ -215,7 +214,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_tcp_health_check(envoy_api_v2_ UPB_INLINE struct envoy_api_v2_core_HealthCheck_TcpHealthCheck* envoy_api_v2_core_HealthCheck_mutable_tcp_health_check(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_TcpHealthCheck* sub = (struct envoy_api_v2_core_HealthCheck_TcpHealthCheck*)envoy_api_v2_core_HealthCheck_tcp_health_check(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HealthCheck_TcpHealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, arena); + sub = (struct envoy_api_v2_core_HealthCheck_TcpHealthCheck*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_tcp_health_check(msg, sub); } @@ -227,7 +226,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_grpc_health_check(envoy_api_v2 UPB_INLINE struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck* envoy_api_v2_core_HealthCheck_mutable_grpc_health_check(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck* sub = (struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck*)envoy_api_v2_core_HealthCheck_grpc_health_check(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, arena); + sub = (struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_grpc_health_check(msg, sub); } @@ -239,7 +238,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_no_traffic_interval(envoy_api_ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_no_traffic_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_no_traffic_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_no_traffic_interval(msg, sub); } @@ -251,7 +250,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_custom_health_check(envoy_api_ UPB_INLINE struct envoy_api_v2_core_HealthCheck_CustomHealthCheck* envoy_api_v2_core_HealthCheck_mutable_custom_health_check(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_CustomHealthCheck* sub = (struct envoy_api_v2_core_HealthCheck_CustomHealthCheck*)envoy_api_v2_core_HealthCheck_custom_health_check(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HealthCheck_CustomHealthCheck*)upb_msg_new(&envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, arena); + sub = (struct envoy_api_v2_core_HealthCheck_CustomHealthCheck*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_custom_health_check(msg, sub); } @@ -263,7 +262,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_interval(envoy_api_v UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_unhealthy_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_unhealthy_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_unhealthy_interval(msg, sub); } @@ -275,7 +274,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_edge_interval(envoy_ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_unhealthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_unhealthy_edge_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_unhealthy_edge_interval(msg, sub); } @@ -287,7 +286,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_healthy_edge_interval(envoy_ap UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_healthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_healthy_edge_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_healthy_edge_interval(msg, sub); } @@ -308,7 +307,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_set_initial_jitter(envoy_api_v2_co UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_initial_jitter(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_initial_jitter(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_set_initial_jitter(msg, sub); } @@ -318,7 +317,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl /* envoy.api.v2.core.HealthCheck.Payload */ UPB_INLINE envoy_api_v2_core_HealthCheck_Payload *envoy_api_v2_core_HealthCheck_Payload_new(upb_arena *arena) { - return (envoy_api_v2_core_HealthCheck_Payload *)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + return (envoy_api_v2_core_HealthCheck_Payload *)_upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); } UPB_INLINE envoy_api_v2_core_HealthCheck_Payload *envoy_api_v2_core_HealthCheck_Payload_parse(const char *buf, size_t size, upb_arena *arena) { @@ -351,7 +350,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_Payload_set_binary(envoy_api_v2_co /* envoy.api.v2.core.HealthCheck.HttpHealthCheck */ UPB_INLINE envoy_api_v2_core_HealthCheck_HttpHealthCheck *envoy_api_v2_core_HealthCheck_HttpHealthCheck_new(upb_arena *arena) { - return (envoy_api_v2_core_HealthCheck_HttpHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, arena); + return (envoy_api_v2_core_HealthCheck_HttpHealthCheck *)_upb_msg_new(&envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, arena); } UPB_INLINE envoy_api_v2_core_HealthCheck_HttpHealthCheck *envoy_api_v2_core_HealthCheck_HttpHealthCheck_parse(const char *buf, size_t size, upb_arena *arena) { @@ -385,7 +384,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_send(envoy_api UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_send(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_HttpHealthCheck_send(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HealthCheck_Payload*)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + sub = (struct envoy_api_v2_core_HealthCheck_Payload*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_send(msg, sub); } @@ -397,7 +396,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_receive(envoy_ UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_receive(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_HttpHealthCheck_receive(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HealthCheck_Payload*)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + sub = (struct envoy_api_v2_core_HealthCheck_Payload*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_receive(msg, sub); } @@ -410,10 +409,10 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_core_Health return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_core_HealthCheck_HttpHealthCheck_resize_request_headers_to_add(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_core_HealthCheck_HttpHealthCheck_add_request_headers_to_add(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -426,20 +425,20 @@ UPB_INLINE upb_strview* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_re return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len); } UPB_INLINE upb_strview* envoy_api_v2_core_HealthCheck_HttpHealthCheck_resize_request_headers_to_remove(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_add_request_headers_to_remove(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(48, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(48, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE struct envoy_type_Int64Range** envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_expected_statuses(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (struct envoy_type_Int64Range**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 96), len); } UPB_INLINE struct envoy_type_Int64Range** envoy_api_v2_core_HealthCheck_HttpHealthCheck_resize_expected_statuses(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t len, upb_arena *arena) { - return (struct envoy_type_Int64Range**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 96), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_type_Int64Range**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 96), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_type_Int64Range* envoy_api_v2_core_HealthCheck_HttpHealthCheck_add_expected_statuses(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { - struct envoy_type_Int64Range* sub = (struct envoy_type_Int64Range*)upb_msg_new(&envoy_type_Int64Range_msginit, arena); + struct envoy_type_Int64Range* sub = (struct envoy_type_Int64Range*)_upb_msg_new(&envoy_type_Int64Range_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(52, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -452,7 +451,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_codec_client_t /* envoy.api.v2.core.HealthCheck.TcpHealthCheck */ UPB_INLINE envoy_api_v2_core_HealthCheck_TcpHealthCheck *envoy_api_v2_core_HealthCheck_TcpHealthCheck_new(upb_arena *arena) { - return (envoy_api_v2_core_HealthCheck_TcpHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, arena); + return (envoy_api_v2_core_HealthCheck_TcpHealthCheck *)_upb_msg_new(&envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, arena); } UPB_INLINE envoy_api_v2_core_HealthCheck_TcpHealthCheck *envoy_api_v2_core_HealthCheck_TcpHealthCheck_parse(const char *buf, size_t size, upb_arena *arena) { @@ -472,7 +471,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_TcpHealthCheck_set_send(envoy_api_ UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_TcpHealthCheck_mutable_send(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_TcpHealthCheck_send(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HealthCheck_Payload*)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + sub = (struct envoy_api_v2_core_HealthCheck_Payload*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_TcpHealthCheck_set_send(msg, sub); } @@ -482,10 +481,10 @@ UPB_INLINE envoy_api_v2_core_HealthCheck_Payload** envoy_api_v2_core_HealthCheck return (envoy_api_v2_core_HealthCheck_Payload**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE envoy_api_v2_core_HealthCheck_Payload** envoy_api_v2_core_HealthCheck_TcpHealthCheck_resize_receive(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_core_HealthCheck_Payload**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_core_HealthCheck_Payload**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_TcpHealthCheck_add_receive(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, upb_arena *arena) { - struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); + struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)_upb_msg_new(&envoy_api_v2_core_HealthCheck_Payload_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -495,7 +494,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_Healt /* envoy.api.v2.core.HealthCheck.RedisHealthCheck */ UPB_INLINE envoy_api_v2_core_HealthCheck_RedisHealthCheck *envoy_api_v2_core_HealthCheck_RedisHealthCheck_new(upb_arena *arena) { - return (envoy_api_v2_core_HealthCheck_RedisHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit, arena); + return (envoy_api_v2_core_HealthCheck_RedisHealthCheck *)_upb_msg_new(&envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit, arena); } UPB_INLINE envoy_api_v2_core_HealthCheck_RedisHealthCheck *envoy_api_v2_core_HealthCheck_RedisHealthCheck_parse(const char *buf, size_t size, upb_arena *arena) { @@ -515,7 +514,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_RedisHealthCheck_set_key(envoy_api /* envoy.api.v2.core.HealthCheck.GrpcHealthCheck */ UPB_INLINE envoy_api_v2_core_HealthCheck_GrpcHealthCheck *envoy_api_v2_core_HealthCheck_GrpcHealthCheck_new(upb_arena *arena) { - return (envoy_api_v2_core_HealthCheck_GrpcHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, arena); + return (envoy_api_v2_core_HealthCheck_GrpcHealthCheck *)_upb_msg_new(&envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, arena); } UPB_INLINE envoy_api_v2_core_HealthCheck_GrpcHealthCheck *envoy_api_v2_core_HealthCheck_GrpcHealthCheck_parse(const char *buf, size_t size, upb_arena *arena) { @@ -539,7 +538,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_GrpcHealthCheck_set_authority(envo /* envoy.api.v2.core.HealthCheck.CustomHealthCheck */ UPB_INLINE envoy_api_v2_core_HealthCheck_CustomHealthCheck *envoy_api_v2_core_HealthCheck_CustomHealthCheck_new(upb_arena *arena) { - return (envoy_api_v2_core_HealthCheck_CustomHealthCheck *)upb_msg_new(&envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, arena); + return (envoy_api_v2_core_HealthCheck_CustomHealthCheck *)_upb_msg_new(&envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, arena); } UPB_INLINE envoy_api_v2_core_HealthCheck_CustomHealthCheck *envoy_api_v2_core_HealthCheck_CustomHealthCheck_parse(const char *buf, size_t size, upb_arena *arena) { @@ -572,7 +571,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_config(envoy UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_HealthCheck_CustomHealthCheck_mutable_config(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_HealthCheck_CustomHealthCheck_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_config(msg, sub); } @@ -584,7 +583,7 @@ UPB_INLINE void envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_typed_config UPB_INLINE struct google_protobuf_Any* envoy_api_v2_core_HealthCheck_CustomHealthCheck_mutable_typed_config(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_core_HealthCheck_CustomHealthCheck_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_typed_config(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h index f0dc22b7a20..aa62b81df31 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_ #define ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -30,7 +29,7 @@ extern const upb_msglayout google_protobuf_Duration_msginit; /* envoy.api.v2.core.HttpUri */ UPB_INLINE envoy_api_v2_core_HttpUri *envoy_api_v2_core_HttpUri_new(upb_arena *arena) { - return (envoy_api_v2_core_HttpUri *)upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena); + return (envoy_api_v2_core_HttpUri *)_upb_msg_new(&envoy_api_v2_core_HttpUri_msginit, arena); } UPB_INLINE envoy_api_v2_core_HttpUri *envoy_api_v2_core_HttpUri_parse(const char *buf, size_t size, upb_arena *arena) { @@ -64,7 +63,7 @@ UPB_INLINE void envoy_api_v2_core_HttpUri_set_timeout(envoy_api_v2_core_HttpUri UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_mutable_timeout(envoy_api_v2_core_HttpUri *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpUri_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HttpUri_set_timeout(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h index 37127d8f4d5..059a86dc4c6 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_CORE_PROTOCOL_PROTO_UPB_H_ #define ENVOY_API_V2_CORE_PROTOCOL_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -46,7 +45,7 @@ extern const upb_msglayout google_protobuf_UInt32Value_msginit; /* envoy.api.v2.core.TcpProtocolOptions */ UPB_INLINE envoy_api_v2_core_TcpProtocolOptions *envoy_api_v2_core_TcpProtocolOptions_new(upb_arena *arena) { - return (envoy_api_v2_core_TcpProtocolOptions *)upb_msg_new(&envoy_api_v2_core_TcpProtocolOptions_msginit, arena); + return (envoy_api_v2_core_TcpProtocolOptions *)_upb_msg_new(&envoy_api_v2_core_TcpProtocolOptions_msginit, arena); } UPB_INLINE envoy_api_v2_core_TcpProtocolOptions *envoy_api_v2_core_TcpProtocolOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -62,7 +61,7 @@ UPB_INLINE char *envoy_api_v2_core_TcpProtocolOptions_serialize(const envoy_api_ /* envoy.api.v2.core.HttpProtocolOptions */ UPB_INLINE envoy_api_v2_core_HttpProtocolOptions *envoy_api_v2_core_HttpProtocolOptions_new(upb_arena *arena) { - return (envoy_api_v2_core_HttpProtocolOptions *)upb_msg_new(&envoy_api_v2_core_HttpProtocolOptions_msginit, arena); + return (envoy_api_v2_core_HttpProtocolOptions *)_upb_msg_new(&envoy_api_v2_core_HttpProtocolOptions_msginit, arena); } UPB_INLINE envoy_api_v2_core_HttpProtocolOptions *envoy_api_v2_core_HttpProtocolOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -82,7 +81,7 @@ UPB_INLINE void envoy_api_v2_core_HttpProtocolOptions_set_idle_timeout(envoy_api UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_mutable_idle_timeout(envoy_api_v2_core_HttpProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpProtocolOptions_idle_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HttpProtocolOptions_set_idle_timeout(msg, sub); } @@ -94,7 +93,7 @@ UPB_INLINE void envoy_api_v2_core_HttpProtocolOptions_set_max_headers_count(envo UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HttpProtocolOptions_mutable_max_headers_count(envoy_api_v2_core_HttpProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HttpProtocolOptions_max_headers_count(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_HttpProtocolOptions_set_max_headers_count(msg, sub); } @@ -104,7 +103,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HttpProtocolOpt /* envoy.api.v2.core.Http1ProtocolOptions */ UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions *envoy_api_v2_core_Http1ProtocolOptions_new(upb_arena *arena) { - return (envoy_api_v2_core_Http1ProtocolOptions *)upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_msginit, arena); + return (envoy_api_v2_core_Http1ProtocolOptions *)_upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_msginit, arena); } UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions *envoy_api_v2_core_Http1ProtocolOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -125,7 +124,7 @@ UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_set_allow_absolute_url(en UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_Http1ProtocolOptions_mutable_allow_absolute_url(envoy_api_v2_core_Http1ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_Http1ProtocolOptions_allow_absolute_url(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http1ProtocolOptions_set_allow_absolute_url(msg, sub); } @@ -141,7 +140,7 @@ UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_set_default_host_for_http /* envoy.api.v2.core.Http2ProtocolOptions */ UPB_INLINE envoy_api_v2_core_Http2ProtocolOptions *envoy_api_v2_core_Http2ProtocolOptions_new(upb_arena *arena) { - return (envoy_api_v2_core_Http2ProtocolOptions *)upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); + return (envoy_api_v2_core_Http2ProtocolOptions *)_upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); } UPB_INLINE envoy_api_v2_core_Http2ProtocolOptions *envoy_api_v2_core_Http2ProtocolOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -171,7 +170,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_hpack_table_size(envo UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_hpack_table_size(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_hpack_table_size(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_hpack_table_size(msg, sub); } @@ -183,7 +182,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_concurrent_stream UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_concurrent_streams(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_concurrent_streams(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_max_concurrent_streams(msg, sub); } @@ -195,7 +194,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_initial_stream_window UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_initial_stream_window_size(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_initial_stream_window_size(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_initial_stream_window_size(msg, sub); } @@ -207,7 +206,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_initial_connection_wi UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_initial_connection_window_size(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_initial_connection_window_size(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_initial_connection_window_size(msg, sub); } @@ -225,7 +224,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_frames(e UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_outbound_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_outbound_frames(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_frames(msg, sub); } @@ -237,7 +236,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_control_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_outbound_control_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_outbound_control_frames(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_control_frames(msg, sub); } @@ -249,7 +248,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_consecutive_inbou UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_consecutive_inbound_frames_with_empty_payload(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_max_consecutive_inbound_frames_with_empty_payload(msg, sub); } @@ -261,7 +260,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_priority_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_inbound_priority_frames_per_stream(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_priority_frames_per_stream(msg, sub); } @@ -273,7 +272,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_window_up UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_inbound_window_update_frames_per_data_frame_sent(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_window_update_frames_per_data_frame_sent(msg, sub); } @@ -286,7 +285,7 @@ UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_stream_error_on_inval /* envoy.api.v2.core.GrpcProtocolOptions */ UPB_INLINE envoy_api_v2_core_GrpcProtocolOptions *envoy_api_v2_core_GrpcProtocolOptions_new(upb_arena *arena) { - return (envoy_api_v2_core_GrpcProtocolOptions *)upb_msg_new(&envoy_api_v2_core_GrpcProtocolOptions_msginit, arena); + return (envoy_api_v2_core_GrpcProtocolOptions *)_upb_msg_new(&envoy_api_v2_core_GrpcProtocolOptions_msginit, arena); } UPB_INLINE envoy_api_v2_core_GrpcProtocolOptions *envoy_api_v2_core_GrpcProtocolOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -305,7 +304,7 @@ UPB_INLINE void envoy_api_v2_core_GrpcProtocolOptions_set_http2_protocol_options UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_core_GrpcProtocolOptions_mutable_http2_protocol_options(envoy_api_v2_core_GrpcProtocolOptions *msg, upb_arena *arena) { struct envoy_api_v2_core_Http2ProtocolOptions* sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)envoy_api_v2_core_GrpcProtocolOptions_http2_protocol_options(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); + sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)_upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); if (!sub) return NULL; envoy_api_v2_core_GrpcProtocolOptions_set_http2_protocol_options(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c index ac07af487c2..ba01a085e17 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c @@ -66,7 +66,7 @@ static const upb_msglayout_field envoy_api_v2_DeltaDiscoveryRequest__fields[7] = {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, {3, UPB_SIZE(24, 48), 0, 0, 9, 3}, {4, UPB_SIZE(28, 56), 0, 0, 9, 3}, - {5, UPB_SIZE(32, 64), 0, 0, 11, 3}, + {5, UPB_SIZE(32, 64), 0, 0, 11, 4}, {6, UPB_SIZE(8, 16), 0, 0, 9, 1}, {7, UPB_SIZE(20, 40), 0, 2, 11, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h index b2475bee1b6..24b7619da7e 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_DISCOVERY_PROTO_UPB_H_ #define ENVOY_API_V2_DISCOVERY_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -51,7 +50,7 @@ extern const upb_msglayout google_rpc_Status_msginit; /* envoy.api.v2.DiscoveryRequest */ UPB_INLINE envoy_api_v2_DiscoveryRequest *envoy_api_v2_DiscoveryRequest_new(upb_arena *arena) { - return (envoy_api_v2_DiscoveryRequest *)upb_msg_new(&envoy_api_v2_DiscoveryRequest_msginit, arena); + return (envoy_api_v2_DiscoveryRequest *)_upb_msg_new(&envoy_api_v2_DiscoveryRequest_msginit, arena); } UPB_INLINE envoy_api_v2_DiscoveryRequest *envoy_api_v2_DiscoveryRequest_parse(const char *buf, size_t size, upb_arena *arena) { @@ -78,7 +77,7 @@ UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_node(envoy_api_v2_DiscoveryReq UPB_INLINE struct envoy_api_v2_core_Node* envoy_api_v2_DiscoveryRequest_mutable_node(envoy_api_v2_DiscoveryRequest *msg, upb_arena *arena) { struct envoy_api_v2_core_Node* sub = (struct envoy_api_v2_core_Node*)envoy_api_v2_DiscoveryRequest_node(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Node*)upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); + sub = (struct envoy_api_v2_core_Node*)_upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); if (!sub) return NULL; envoy_api_v2_DiscoveryRequest_set_node(msg, sub); } @@ -88,11 +87,11 @@ UPB_INLINE upb_strview* envoy_api_v2_DiscoveryRequest_mutable_resource_names(env return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE upb_strview* envoy_api_v2_DiscoveryRequest_resize_resource_names(envoy_api_v2_DiscoveryRequest *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_DiscoveryRequest_add_resource_names(envoy_api_v2_DiscoveryRequest *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_type_url(envoy_api_v2_DiscoveryRequest *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; @@ -106,7 +105,7 @@ UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_error_detail(envoy_api_v2_Disc UPB_INLINE struct google_rpc_Status* envoy_api_v2_DiscoveryRequest_mutable_error_detail(envoy_api_v2_DiscoveryRequest *msg, upb_arena *arena) { struct google_rpc_Status* sub = (struct google_rpc_Status*)envoy_api_v2_DiscoveryRequest_error_detail(msg); if (sub == NULL) { - sub = (struct google_rpc_Status*)upb_msg_new(&google_rpc_Status_msginit, arena); + sub = (struct google_rpc_Status*)_upb_msg_new(&google_rpc_Status_msginit, arena); if (!sub) return NULL; envoy_api_v2_DiscoveryRequest_set_error_detail(msg, sub); } @@ -116,7 +115,7 @@ UPB_INLINE struct google_rpc_Status* envoy_api_v2_DiscoveryRequest_mutable_error /* envoy.api.v2.DiscoveryResponse */ UPB_INLINE envoy_api_v2_DiscoveryResponse *envoy_api_v2_DiscoveryResponse_new(upb_arena *arena) { - return (envoy_api_v2_DiscoveryResponse *)upb_msg_new(&envoy_api_v2_DiscoveryResponse_msginit, arena); + return (envoy_api_v2_DiscoveryResponse *)_upb_msg_new(&envoy_api_v2_DiscoveryResponse_msginit, arena); } UPB_INLINE envoy_api_v2_DiscoveryResponse *envoy_api_v2_DiscoveryResponse_parse(const char *buf, size_t size, upb_arena *arena) { @@ -141,10 +140,10 @@ UPB_INLINE struct google_protobuf_Any** envoy_api_v2_DiscoveryResponse_mutable_r return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE struct google_protobuf_Any** envoy_api_v2_DiscoveryResponse_resize_resources(envoy_api_v2_DiscoveryResponse *msg, size_t len, upb_arena *arena) { - return (struct google_protobuf_Any**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct google_protobuf_Any**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_Any* envoy_api_v2_DiscoveryResponse_add_resources(envoy_api_v2_DiscoveryResponse *msg, upb_arena *arena) { - struct google_protobuf_Any* sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -165,7 +164,7 @@ UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_control_plane(envoy_api_v2_Di UPB_INLINE struct envoy_api_v2_core_ControlPlane* envoy_api_v2_DiscoveryResponse_mutable_control_plane(envoy_api_v2_DiscoveryResponse *msg, upb_arena *arena) { struct envoy_api_v2_core_ControlPlane* sub = (struct envoy_api_v2_core_ControlPlane*)envoy_api_v2_DiscoveryResponse_control_plane(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ControlPlane*)upb_msg_new(&envoy_api_v2_core_ControlPlane_msginit, arena); + sub = (struct envoy_api_v2_core_ControlPlane*)_upb_msg_new(&envoy_api_v2_core_ControlPlane_msginit, arena); if (!sub) return NULL; envoy_api_v2_DiscoveryResponse_set_control_plane(msg, sub); } @@ -175,7 +174,7 @@ UPB_INLINE struct envoy_api_v2_core_ControlPlane* envoy_api_v2_DiscoveryResponse /* envoy.api.v2.DeltaDiscoveryRequest */ UPB_INLINE envoy_api_v2_DeltaDiscoveryRequest *envoy_api_v2_DeltaDiscoveryRequest_new(upb_arena *arena) { - return (envoy_api_v2_DeltaDiscoveryRequest *)upb_msg_new(&envoy_api_v2_DeltaDiscoveryRequest_msginit, arena); + return (envoy_api_v2_DeltaDiscoveryRequest *)_upb_msg_new(&envoy_api_v2_DeltaDiscoveryRequest_msginit, arena); } UPB_INLINE envoy_api_v2_DeltaDiscoveryRequest *envoy_api_v2_DeltaDiscoveryRequest_parse(const char *buf, size_t size, upb_arena *arena) { @@ -190,7 +189,9 @@ UPB_INLINE const struct envoy_api_v2_core_Node* envoy_api_v2_DeltaDiscoveryReque UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_type_url(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } UPB_INLINE upb_strview const* envoy_api_v2_DeltaDiscoveryRequest_resource_names_subscribe(const envoy_api_v2_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview const* envoy_api_v2_DeltaDiscoveryRequest_resource_names_unsubscribe(const envoy_api_v2_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } -UPB_INLINE const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry* const* envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions(const envoy_api_v2_DeltaDiscoveryRequest *msg, size_t *len) { return (const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } +UPB_INLINE size_t envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_size(const envoy_api_v2_DeltaDiscoveryRequest *msg) {return _upb_msg_map_size(msg, UPB_SIZE(32, 64)); } +UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_get(const envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(32, 64), &key, 0, val, 0); } +UPB_INLINE const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_next(const envoy_api_v2_DeltaDiscoveryRequest *msg, size_t* iter) { return (const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 64), iter); } UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_response_nonce(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_rpc_Status* envoy_api_v2_DeltaDiscoveryRequest_error_detail(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct google_rpc_Status*, UPB_SIZE(20, 40)); } @@ -200,7 +201,7 @@ UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_set_node(envoy_api_v2_DeltaDi UPB_INLINE struct envoy_api_v2_core_Node* envoy_api_v2_DeltaDiscoveryRequest_mutable_node(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_arena *arena) { struct envoy_api_v2_core_Node* sub = (struct envoy_api_v2_core_Node*)envoy_api_v2_DeltaDiscoveryRequest_node(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Node*)upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); + sub = (struct envoy_api_v2_core_Node*)_upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); if (!sub) return NULL; envoy_api_v2_DeltaDiscoveryRequest_set_node(msg, sub); } @@ -213,35 +214,26 @@ UPB_INLINE upb_strview* envoy_api_v2_DeltaDiscoveryRequest_mutable_resource_name return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview* envoy_api_v2_DeltaDiscoveryRequest_resize_resource_names_subscribe(envoy_api_v2_DeltaDiscoveryRequest *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_add_resource_names_subscribe(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* envoy_api_v2_DeltaDiscoveryRequest_mutable_resource_names_unsubscribe(envoy_api_v2_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE upb_strview* envoy_api_v2_DeltaDiscoveryRequest_resize_resource_names_unsubscribe(envoy_api_v2_DeltaDiscoveryRequest *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_add_resource_names_unsubscribe(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); -} -UPB_INLINE envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry** envoy_api_v2_DeltaDiscoveryRequest_mutable_initial_resource_versions(envoy_api_v2_DeltaDiscoveryRequest *msg, size_t *len) { - return (envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); -} -UPB_INLINE envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry** envoy_api_v2_DeltaDiscoveryRequest_resize_initial_resource_versions(envoy_api_v2_DeltaDiscoveryRequest *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_api_v2_DeltaDiscoveryRequest_add_initial_resource_versions(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_arena *arena) { - struct envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry* sub = (struct envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)upb_msg_new(&envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; + return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } +UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_clear(envoy_api_v2_DeltaDiscoveryRequest *msg) { _upb_msg_map_clear(msg, UPB_SIZE(32, 64)); } +UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_set(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(32, 64), &key, 0, &val, 0, a); } +UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_delete(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(32, 64), &key, 0); } +UPB_INLINE envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_nextmutable(envoy_api_v2_DeltaDiscoveryRequest *msg, size_t* iter) { return (envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 64), iter); } UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_set_response_nonce(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; } @@ -251,7 +243,7 @@ UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_set_error_detail(envoy_api_v2 UPB_INLINE struct google_rpc_Status* envoy_api_v2_DeltaDiscoveryRequest_mutable_error_detail(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_arena *arena) { struct google_rpc_Status* sub = (struct google_rpc_Status*)envoy_api_v2_DeltaDiscoveryRequest_error_detail(msg); if (sub == NULL) { - sub = (struct google_rpc_Status*)upb_msg_new(&google_rpc_Status_msginit, arena); + sub = (struct google_rpc_Status*)_upb_msg_new(&google_rpc_Status_msginit, arena); if (!sub) return NULL; envoy_api_v2_DeltaDiscoveryRequest_set_error_detail(msg, sub); } @@ -260,32 +252,25 @@ UPB_INLINE struct google_rpc_Status* envoy_api_v2_DeltaDiscoveryRequest_mutable_ /* envoy.api.v2.DeltaDiscoveryRequest.InitialResourceVersionsEntry */ -UPB_INLINE envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_new(upb_arena *arena) { - return (envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *)upb_msg_new(&envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit, arena); +UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_key(const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *ret = envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_serialize(const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit, arena, len); +UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_value(const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *msg) { + upb_strview ret; + _upb_msg_map_value(msg, &ret, 0); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_key(const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_value(const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_set_key(envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_set_value(envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + _upb_msg_map_set_value(msg, &value, 0); } /* envoy.api.v2.DeltaDiscoveryResponse */ UPB_INLINE envoy_api_v2_DeltaDiscoveryResponse *envoy_api_v2_DeltaDiscoveryResponse_new(upb_arena *arena) { - return (envoy_api_v2_DeltaDiscoveryResponse *)upb_msg_new(&envoy_api_v2_DeltaDiscoveryResponse_msginit, arena); + return (envoy_api_v2_DeltaDiscoveryResponse *)_upb_msg_new(&envoy_api_v2_DeltaDiscoveryResponse_msginit, arena); } UPB_INLINE envoy_api_v2_DeltaDiscoveryResponse *envoy_api_v2_DeltaDiscoveryResponse_parse(const char *buf, size_t size, upb_arena *arena) { @@ -309,10 +294,10 @@ UPB_INLINE envoy_api_v2_Resource** envoy_api_v2_DeltaDiscoveryResponse_mutable_r return (envoy_api_v2_Resource**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE envoy_api_v2_Resource** envoy_api_v2_DeltaDiscoveryResponse_resize_resources(envoy_api_v2_DeltaDiscoveryResponse *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_Resource**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_Resource**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_Resource* envoy_api_v2_DeltaDiscoveryResponse_add_resources(envoy_api_v2_DeltaDiscoveryResponse *msg, upb_arena *arena) { - struct envoy_api_v2_Resource* sub = (struct envoy_api_v2_Resource*)upb_msg_new(&envoy_api_v2_Resource_msginit, arena); + struct envoy_api_v2_Resource* sub = (struct envoy_api_v2_Resource*)_upb_msg_new(&envoy_api_v2_Resource_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -328,17 +313,17 @@ UPB_INLINE upb_strview* envoy_api_v2_DeltaDiscoveryResponse_mutable_removed_reso return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE upb_strview* envoy_api_v2_DeltaDiscoveryResponse_resize_removed_resources(envoy_api_v2_DeltaDiscoveryResponse *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_DeltaDiscoveryResponse_add_removed_resources(envoy_api_v2_DeltaDiscoveryResponse *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* envoy.api.v2.Resource */ UPB_INLINE envoy_api_v2_Resource *envoy_api_v2_Resource_new(upb_arena *arena) { - return (envoy_api_v2_Resource *)upb_msg_new(&envoy_api_v2_Resource_msginit, arena); + return (envoy_api_v2_Resource *)_upb_msg_new(&envoy_api_v2_Resource_msginit, arena); } UPB_INLINE envoy_api_v2_Resource *envoy_api_v2_Resource_parse(const char *buf, size_t size, upb_arena *arena) { @@ -363,7 +348,7 @@ UPB_INLINE void envoy_api_v2_Resource_set_resource(envoy_api_v2_Resource *msg, s UPB_INLINE struct google_protobuf_Any* envoy_api_v2_Resource_mutable_resource(envoy_api_v2_Resource *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_Resource_resource(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_Resource_set_resource(msg, sub); } @@ -376,11 +361,11 @@ UPB_INLINE upb_strview* envoy_api_v2_Resource_mutable_aliases(envoy_api_v2_Resou return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE upb_strview* envoy_api_v2_Resource_resize_aliases(envoy_api_v2_Resource *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_Resource_add_aliases(envoy_api_v2_Resource *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(20, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(20, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c b/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c index 83d26c19328..cecb14f3bd8 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c @@ -29,7 +29,7 @@ static const upb_msglayout_field envoy_api_v2_ClusterLoadAssignment__fields[4] = {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(12, 24), 0, 2, 11, 3}, {4, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {5, UPB_SIZE(16, 32), 0, 0, 11, 3}, + {5, UPB_SIZE(16, 32), 0, 0, 11, 4}, }; const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h b/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h index 4491b8c065e..5fbf3824faa 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_EDS_PROTO_UPB_H_ #define ENVOY_API_V2_EDS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -47,7 +46,7 @@ extern const upb_msglayout google_protobuf_UInt32Value_msginit; /* envoy.api.v2.ClusterLoadAssignment */ UPB_INLINE envoy_api_v2_ClusterLoadAssignment *envoy_api_v2_ClusterLoadAssignment_new(upb_arena *arena) { - return (envoy_api_v2_ClusterLoadAssignment *)upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_msginit, arena); + return (envoy_api_v2_ClusterLoadAssignment *)_upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_msginit, arena); } UPB_INLINE envoy_api_v2_ClusterLoadAssignment *envoy_api_v2_ClusterLoadAssignment_parse(const char *buf, size_t size, upb_arena *arena) { @@ -61,7 +60,9 @@ UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_serialize(const envoy_api_v2 UPB_INLINE upb_strview envoy_api_v2_ClusterLoadAssignment_cluster_name(const envoy_api_v2_ClusterLoadAssignment *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } UPB_INLINE const struct envoy_api_v2_endpoint_LocalityLbEndpoints* const* envoy_api_v2_ClusterLoadAssignment_endpoints(const envoy_api_v2_ClusterLoadAssignment *msg, size_t *len) { return (const struct envoy_api_v2_endpoint_LocalityLbEndpoints* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE const envoy_api_v2_ClusterLoadAssignment_Policy* envoy_api_v2_ClusterLoadAssignment_policy(const envoy_api_v2_ClusterLoadAssignment *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_ClusterLoadAssignment_Policy*, UPB_SIZE(8, 16)); } -UPB_INLINE const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry* const* envoy_api_v2_ClusterLoadAssignment_named_endpoints(const envoy_api_v2_ClusterLoadAssignment *msg, size_t *len) { return (const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } +UPB_INLINE size_t envoy_api_v2_ClusterLoadAssignment_named_endpoints_size(const envoy_api_v2_ClusterLoadAssignment *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_named_endpoints_get(const envoy_api_v2_ClusterLoadAssignment *msg, upb_strview key, struct envoy_api_v2_endpoint_Endpoint* *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry* envoy_api_v2_ClusterLoadAssignment_named_endpoints_next(const envoy_api_v2_ClusterLoadAssignment *msg, size_t* iter) { return (const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_set_cluster_name(envoy_api_v2_ClusterLoadAssignment *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; @@ -70,10 +71,10 @@ UPB_INLINE struct envoy_api_v2_endpoint_LocalityLbEndpoints** envoy_api_v2_Clust return (struct envoy_api_v2_endpoint_LocalityLbEndpoints**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE struct envoy_api_v2_endpoint_LocalityLbEndpoints** envoy_api_v2_ClusterLoadAssignment_resize_endpoints(envoy_api_v2_ClusterLoadAssignment *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_endpoint_LocalityLbEndpoints**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_endpoint_LocalityLbEndpoints**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_endpoint_LocalityLbEndpoints* envoy_api_v2_ClusterLoadAssignment_add_endpoints(envoy_api_v2_ClusterLoadAssignment *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_LocalityLbEndpoints* sub = (struct envoy_api_v2_endpoint_LocalityLbEndpoints*)upb_msg_new(&envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, arena); + struct envoy_api_v2_endpoint_LocalityLbEndpoints* sub = (struct envoy_api_v2_endpoint_LocalityLbEndpoints*)_upb_msg_new(&envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -85,30 +86,21 @@ UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_set_policy(envoy_api_v2_Clust UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment_Policy* envoy_api_v2_ClusterLoadAssignment_mutable_policy(envoy_api_v2_ClusterLoadAssignment *msg, upb_arena *arena) { struct envoy_api_v2_ClusterLoadAssignment_Policy* sub = (struct envoy_api_v2_ClusterLoadAssignment_Policy*)envoy_api_v2_ClusterLoadAssignment_policy(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_ClusterLoadAssignment_Policy*)upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena); + sub = (struct envoy_api_v2_ClusterLoadAssignment_Policy*)_upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena); if (!sub) return NULL; envoy_api_v2_ClusterLoadAssignment_set_policy(msg, sub); } return sub; } -UPB_INLINE envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry** envoy_api_v2_ClusterLoadAssignment_mutable_named_endpoints(envoy_api_v2_ClusterLoadAssignment *msg, size_t *len) { - return (envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); -} -UPB_INLINE envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry** envoy_api_v2_ClusterLoadAssignment_resize_named_endpoints(envoy_api_v2_ClusterLoadAssignment *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry* envoy_api_v2_ClusterLoadAssignment_add_named_endpoints(envoy_api_v2_ClusterLoadAssignment *msg, upb_arena *arena) { - struct envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry* sub = (struct envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry*)upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_named_endpoints_clear(envoy_api_v2_ClusterLoadAssignment *msg) { _upb_msg_map_clear(msg, UPB_SIZE(16, 32)); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_named_endpoints_set(envoy_api_v2_ClusterLoadAssignment *msg, upb_strview key, struct envoy_api_v2_endpoint_Endpoint* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(16, 32), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_named_endpoints_delete(envoy_api_v2_ClusterLoadAssignment *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(16, 32), &key, 0); } +UPB_INLINE envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry* envoy_api_v2_ClusterLoadAssignment_named_endpoints_nextmutable(envoy_api_v2_ClusterLoadAssignment *msg, size_t* iter) { return (envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } /* envoy.api.v2.ClusterLoadAssignment.Policy */ UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy *envoy_api_v2_ClusterLoadAssignment_Policy_new(upb_arena *arena) { - return (envoy_api_v2_ClusterLoadAssignment_Policy *)upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena); + return (envoy_api_v2_ClusterLoadAssignment_Policy *)_upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena); } UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy *envoy_api_v2_ClusterLoadAssignment_Policy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -128,10 +120,10 @@ UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload** envoy_api_v2 return (envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload** envoy_api_v2_ClusterLoadAssignment_Policy_resize_drop_overloads(envoy_api_v2_ClusterLoadAssignment_Policy *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload* envoy_api_v2_ClusterLoadAssignment_Policy_add_drop_overloads(envoy_api_v2_ClusterLoadAssignment_Policy *msg, upb_arena *arena) { - struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload* sub = (struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload*)upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, arena); + struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload* sub = (struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload*)_upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -143,7 +135,7 @@ UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_set_overprovisioning_f UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_ClusterLoadAssignment_Policy_mutable_overprovisioning_factor(envoy_api_v2_ClusterLoadAssignment_Policy *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_ClusterLoadAssignment_Policy_overprovisioning_factor(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_ClusterLoadAssignment_Policy_set_overprovisioning_factor(msg, sub); } @@ -155,7 +147,7 @@ UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_set_endpoint_stale_aft UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_ClusterLoadAssignment_Policy_mutable_endpoint_stale_after(envoy_api_v2_ClusterLoadAssignment_Policy *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_ClusterLoadAssignment_Policy_endpoint_stale_after(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_ClusterLoadAssignment_Policy_set_endpoint_stale_after(msg, sub); } @@ -168,7 +160,7 @@ UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_set_disable_overprovis /* envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload */ UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_new(upb_arena *arena) { - return (envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *)upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, arena); + return (envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *)_upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, arena); } UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_parse(const char *buf, size_t size, upb_arena *arena) { @@ -191,7 +183,7 @@ UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_set_drop_ UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_mutable_drop_percentage(envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(msg); if (sub == NULL) { - sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + sub = (struct envoy_type_FractionalPercent*)_upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_set_drop_percentage(msg, sub); } @@ -200,35 +192,19 @@ UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_ClusterLoadAssignme /* envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry */ -UPB_INLINE envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_new(upb_arena *arena) { - return (envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *)upb_msg_new(&envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit, arena); -} -UPB_INLINE envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *ret = envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_key(const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_serialize(const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit, arena, len); +UPB_INLINE const struct envoy_api_v2_endpoint_Endpoint* envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_value(const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg) { + struct envoy_api_v2_endpoint_Endpoint* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_key(const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_endpoint_Endpoint* envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_value(const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_endpoint_Endpoint*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_set_key(envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_set_value(envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg, struct envoy_api_v2_endpoint_Endpoint* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_endpoint_Endpoint*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct envoy_api_v2_endpoint_Endpoint* envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_mutable_value(envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_Endpoint* sub = (struct envoy_api_v2_endpoint_Endpoint*)envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_value(msg); - if (sub == NULL) { - sub = (struct envoy_api_v2_endpoint_Endpoint*)upb_msg_new(&envoy_api_v2_endpoint_Endpoint_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct envoy_api_v2_endpoint_Endpoint*)); } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h index 2b3a9166c55..f59425bfd3b 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_ENDPOINT_ENDPOINT_PROTO_UPB_H_ #define ENVOY_API_V2_ENDPOINT_ENDPOINT_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -45,7 +44,7 @@ extern const upb_msglayout google_protobuf_UInt32Value_msginit; /* envoy.api.v2.endpoint.Endpoint */ UPB_INLINE envoy_api_v2_endpoint_Endpoint *envoy_api_v2_endpoint_Endpoint_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_Endpoint *)upb_msg_new(&envoy_api_v2_endpoint_Endpoint_msginit, arena); + return (envoy_api_v2_endpoint_Endpoint *)_upb_msg_new(&envoy_api_v2_endpoint_Endpoint_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_Endpoint *envoy_api_v2_endpoint_Endpoint_parse(const char *buf, size_t size, upb_arena *arena) { @@ -65,7 +64,7 @@ UPB_INLINE void envoy_api_v2_endpoint_Endpoint_set_address(envoy_api_v2_endpoint UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_Endpoint_mutable_address(envoy_api_v2_endpoint_Endpoint *msg, upb_arena *arena) { struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_endpoint_Endpoint_address(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Address*)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); + sub = (struct envoy_api_v2_core_Address*)_upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_Endpoint_set_address(msg, sub); } @@ -77,7 +76,7 @@ UPB_INLINE void envoy_api_v2_endpoint_Endpoint_set_health_check_config(envoy_api UPB_INLINE struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* envoy_api_v2_endpoint_Endpoint_mutable_health_check_config(envoy_api_v2_endpoint_Endpoint *msg, upb_arena *arena) { struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* sub = (struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig*)envoy_api_v2_endpoint_Endpoint_health_check_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig*)upb_msg_new(&envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, arena); + sub = (struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig*)_upb_msg_new(&envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_Endpoint_set_health_check_config(msg, sub); } @@ -87,7 +86,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* envoy_api_v2 /* envoy.api.v2.endpoint.Endpoint.HealthCheckConfig */ UPB_INLINE envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *)upb_msg_new(&envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, arena); + return (envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *)_upb_msg_new(&envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -107,7 +106,7 @@ UPB_INLINE void envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_set_port_value( /* envoy.api.v2.endpoint.LbEndpoint */ UPB_INLINE envoy_api_v2_endpoint_LbEndpoint *envoy_api_v2_endpoint_LbEndpoint_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_LbEndpoint *)upb_msg_new(&envoy_api_v2_endpoint_LbEndpoint_msginit, arena); + return (envoy_api_v2_endpoint_LbEndpoint *)_upb_msg_new(&envoy_api_v2_endpoint_LbEndpoint_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_LbEndpoint *envoy_api_v2_endpoint_LbEndpoint_parse(const char *buf, size_t size, upb_arena *arena) { @@ -139,7 +138,7 @@ UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_endpoint(envoy_api_v2_endpo UPB_INLINE struct envoy_api_v2_endpoint_Endpoint* envoy_api_v2_endpoint_LbEndpoint_mutable_endpoint(envoy_api_v2_endpoint_LbEndpoint *msg, upb_arena *arena) { struct envoy_api_v2_endpoint_Endpoint* sub = (struct envoy_api_v2_endpoint_Endpoint*)envoy_api_v2_endpoint_LbEndpoint_endpoint(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_endpoint_Endpoint*)upb_msg_new(&envoy_api_v2_endpoint_Endpoint_msginit, arena); + sub = (struct envoy_api_v2_endpoint_Endpoint*)_upb_msg_new(&envoy_api_v2_endpoint_Endpoint_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_LbEndpoint_set_endpoint(msg, sub); } @@ -154,7 +153,7 @@ UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_metadata(envoy_api_v2_endpo UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_endpoint_LbEndpoint_mutable_metadata(envoy_api_v2_endpoint_LbEndpoint *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_endpoint_LbEndpoint_metadata(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); + sub = (struct envoy_api_v2_core_Metadata*)_upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_LbEndpoint_set_metadata(msg, sub); } @@ -166,7 +165,7 @@ UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_load_balancing_weight(envoy UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LbEndpoint_mutable_load_balancing_weight(envoy_api_v2_endpoint_LbEndpoint *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_endpoint_LbEndpoint_load_balancing_weight(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_LbEndpoint_set_load_balancing_weight(msg, sub); } @@ -179,7 +178,7 @@ UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_endpoint_name(envoy_api_v2_ /* envoy.api.v2.endpoint.LocalityLbEndpoints */ UPB_INLINE envoy_api_v2_endpoint_LocalityLbEndpoints *envoy_api_v2_endpoint_LocalityLbEndpoints_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_LocalityLbEndpoints *)upb_msg_new(&envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, arena); + return (envoy_api_v2_endpoint_LocalityLbEndpoints *)_upb_msg_new(&envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_LocalityLbEndpoints *envoy_api_v2_endpoint_LocalityLbEndpoints_parse(const char *buf, size_t size, upb_arena *arena) { @@ -202,7 +201,7 @@ UPB_INLINE void envoy_api_v2_endpoint_LocalityLbEndpoints_set_locality(envoy_api UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_LocalityLbEndpoints_mutable_locality(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena) { struct envoy_api_v2_core_Locality* sub = (struct envoy_api_v2_core_Locality*)envoy_api_v2_endpoint_LocalityLbEndpoints_locality(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Locality*)upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); + sub = (struct envoy_api_v2_core_Locality*)_upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_LocalityLbEndpoints_set_locality(msg, sub); } @@ -212,10 +211,10 @@ UPB_INLINE envoy_api_v2_endpoint_LbEndpoint** envoy_api_v2_endpoint_LocalityLbEn return (envoy_api_v2_endpoint_LbEndpoint**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE envoy_api_v2_endpoint_LbEndpoint** envoy_api_v2_endpoint_LocalityLbEndpoints_resize_lb_endpoints(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_endpoint_LbEndpoint**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_endpoint_LbEndpoint**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_endpoint_LbEndpoint* envoy_api_v2_endpoint_LocalityLbEndpoints_add_lb_endpoints(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_LbEndpoint* sub = (struct envoy_api_v2_endpoint_LbEndpoint*)upb_msg_new(&envoy_api_v2_endpoint_LbEndpoint_msginit, arena); + struct envoy_api_v2_endpoint_LbEndpoint* sub = (struct envoy_api_v2_endpoint_LbEndpoint*)_upb_msg_new(&envoy_api_v2_endpoint_LbEndpoint_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -227,7 +226,7 @@ UPB_INLINE void envoy_api_v2_endpoint_LocalityLbEndpoints_set_load_balancing_wei UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbEndpoints_mutable_load_balancing_weight(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_endpoint_LocalityLbEndpoints_load_balancing_weight(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_LocalityLbEndpoints_set_load_balancing_weight(msg, sub); } @@ -242,7 +241,7 @@ UPB_INLINE void envoy_api_v2_endpoint_LocalityLbEndpoints_set_proximity(envoy_ap UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbEndpoints_mutable_proximity(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_endpoint_LocalityLbEndpoints_proximity(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_LocalityLbEndpoints_set_proximity(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h index d37045d874e..52841485199 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_ENDPOINT_LOAD_REPORT_PROTO_UPB_H_ #define ENVOY_API_V2_ENDPOINT_LOAD_REPORT_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -48,7 +47,7 @@ extern const upb_msglayout google_protobuf_Struct_msginit; /* envoy.api.v2.endpoint.UpstreamLocalityStats */ UPB_INLINE envoy_api_v2_endpoint_UpstreamLocalityStats *envoy_api_v2_endpoint_UpstreamLocalityStats_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_UpstreamLocalityStats *)upb_msg_new(&envoy_api_v2_endpoint_UpstreamLocalityStats_msginit, arena); + return (envoy_api_v2_endpoint_UpstreamLocalityStats *)_upb_msg_new(&envoy_api_v2_endpoint_UpstreamLocalityStats_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_UpstreamLocalityStats *envoy_api_v2_endpoint_UpstreamLocalityStats_parse(const char *buf, size_t size, upb_arena *arena) { @@ -74,7 +73,7 @@ UPB_INLINE void envoy_api_v2_endpoint_UpstreamLocalityStats_set_locality(envoy_a UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_UpstreamLocalityStats_mutable_locality(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, upb_arena *arena) { struct envoy_api_v2_core_Locality* sub = (struct envoy_api_v2_core_Locality*)envoy_api_v2_endpoint_UpstreamLocalityStats_locality(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Locality*)upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); + sub = (struct envoy_api_v2_core_Locality*)_upb_msg_new(&envoy_api_v2_core_Locality_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_UpstreamLocalityStats_set_locality(msg, sub); } @@ -93,10 +92,10 @@ UPB_INLINE envoy_api_v2_endpoint_EndpointLoadMetricStats** envoy_api_v2_endpoint return (envoy_api_v2_endpoint_EndpointLoadMetricStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 48), len); } UPB_INLINE envoy_api_v2_endpoint_EndpointLoadMetricStats** envoy_api_v2_endpoint_UpstreamLocalityStats_resize_load_metric_stats(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_endpoint_EndpointLoadMetricStats**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_endpoint_EndpointLoadMetricStats**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_endpoint_EndpointLoadMetricStats* envoy_api_v2_endpoint_UpstreamLocalityStats_add_load_metric_stats(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_EndpointLoadMetricStats* sub = (struct envoy_api_v2_endpoint_EndpointLoadMetricStats*)upb_msg_new(&envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit, arena); + struct envoy_api_v2_endpoint_EndpointLoadMetricStats* sub = (struct envoy_api_v2_endpoint_EndpointLoadMetricStats*)_upb_msg_new(&envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(40, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -109,10 +108,10 @@ UPB_INLINE envoy_api_v2_endpoint_UpstreamEndpointStats** envoy_api_v2_endpoint_U return (envoy_api_v2_endpoint_UpstreamEndpointStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 56), len); } UPB_INLINE envoy_api_v2_endpoint_UpstreamEndpointStats** envoy_api_v2_endpoint_UpstreamLocalityStats_resize_upstream_endpoint_stats(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_endpoint_UpstreamEndpointStats**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_endpoint_UpstreamEndpointStats**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_endpoint_UpstreamEndpointStats* envoy_api_v2_endpoint_UpstreamLocalityStats_add_upstream_endpoint_stats(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_UpstreamEndpointStats* sub = (struct envoy_api_v2_endpoint_UpstreamEndpointStats*)upb_msg_new(&envoy_api_v2_endpoint_UpstreamEndpointStats_msginit, arena); + struct envoy_api_v2_endpoint_UpstreamEndpointStats* sub = (struct envoy_api_v2_endpoint_UpstreamEndpointStats*)_upb_msg_new(&envoy_api_v2_endpoint_UpstreamEndpointStats_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(44, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -125,7 +124,7 @@ UPB_INLINE void envoy_api_v2_endpoint_UpstreamLocalityStats_set_total_issued_req /* envoy.api.v2.endpoint.UpstreamEndpointStats */ UPB_INLINE envoy_api_v2_endpoint_UpstreamEndpointStats *envoy_api_v2_endpoint_UpstreamEndpointStats_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_UpstreamEndpointStats *)upb_msg_new(&envoy_api_v2_endpoint_UpstreamEndpointStats_msginit, arena); + return (envoy_api_v2_endpoint_UpstreamEndpointStats *)_upb_msg_new(&envoy_api_v2_endpoint_UpstreamEndpointStats_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_UpstreamEndpointStats *envoy_api_v2_endpoint_UpstreamEndpointStats_parse(const char *buf, size_t size, upb_arena *arena) { @@ -150,7 +149,7 @@ UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_address(envoy_ap UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_UpstreamEndpointStats_mutable_address(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, upb_arena *arena) { struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_endpoint_UpstreamEndpointStats_address(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Address*)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); + sub = (struct envoy_api_v2_core_Address*)_upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_UpstreamEndpointStats_set_address(msg, sub); } @@ -169,10 +168,10 @@ UPB_INLINE envoy_api_v2_endpoint_EndpointLoadMetricStats** envoy_api_v2_endpoint return (envoy_api_v2_endpoint_EndpointLoadMetricStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 48), len); } UPB_INLINE envoy_api_v2_endpoint_EndpointLoadMetricStats** envoy_api_v2_endpoint_UpstreamEndpointStats_resize_load_metric_stats(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_endpoint_EndpointLoadMetricStats**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_endpoint_EndpointLoadMetricStats**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_endpoint_EndpointLoadMetricStats* envoy_api_v2_endpoint_UpstreamEndpointStats_add_load_metric_stats(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_EndpointLoadMetricStats* sub = (struct envoy_api_v2_endpoint_EndpointLoadMetricStats*)upb_msg_new(&envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit, arena); + struct envoy_api_v2_endpoint_EndpointLoadMetricStats* sub = (struct envoy_api_v2_endpoint_EndpointLoadMetricStats*)_upb_msg_new(&envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(40, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -184,7 +183,7 @@ UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_metadata(envoy_a UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_endpoint_UpstreamEndpointStats_mutable_metadata(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_endpoint_UpstreamEndpointStats_metadata(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_UpstreamEndpointStats_set_metadata(msg, sub); } @@ -197,7 +196,7 @@ UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_total_issued_req /* envoy.api.v2.endpoint.EndpointLoadMetricStats */ UPB_INLINE envoy_api_v2_endpoint_EndpointLoadMetricStats *envoy_api_v2_endpoint_EndpointLoadMetricStats_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_EndpointLoadMetricStats *)upb_msg_new(&envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit, arena); + return (envoy_api_v2_endpoint_EndpointLoadMetricStats *)_upb_msg_new(&envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_EndpointLoadMetricStats *envoy_api_v2_endpoint_EndpointLoadMetricStats_parse(const char *buf, size_t size, upb_arena *arena) { @@ -225,7 +224,7 @@ UPB_INLINE void envoy_api_v2_endpoint_EndpointLoadMetricStats_set_total_metric_v /* envoy.api.v2.endpoint.ClusterStats */ UPB_INLINE envoy_api_v2_endpoint_ClusterStats *envoy_api_v2_endpoint_ClusterStats_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_ClusterStats *)upb_msg_new(&envoy_api_v2_endpoint_ClusterStats_msginit, arena); + return (envoy_api_v2_endpoint_ClusterStats *)_upb_msg_new(&envoy_api_v2_endpoint_ClusterStats_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_ClusterStats *envoy_api_v2_endpoint_ClusterStats_parse(const char *buf, size_t size, upb_arena *arena) { @@ -250,10 +249,10 @@ UPB_INLINE envoy_api_v2_endpoint_UpstreamLocalityStats** envoy_api_v2_endpoint_C return (envoy_api_v2_endpoint_UpstreamLocalityStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len); } UPB_INLINE envoy_api_v2_endpoint_UpstreamLocalityStats** envoy_api_v2_endpoint_ClusterStats_resize_upstream_locality_stats(envoy_api_v2_endpoint_ClusterStats *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_endpoint_UpstreamLocalityStats**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_endpoint_UpstreamLocalityStats**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_endpoint_UpstreamLocalityStats* envoy_api_v2_endpoint_ClusterStats_add_upstream_locality_stats(envoy_api_v2_endpoint_ClusterStats *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_UpstreamLocalityStats* sub = (struct envoy_api_v2_endpoint_UpstreamLocalityStats*)upb_msg_new(&envoy_api_v2_endpoint_UpstreamLocalityStats_msginit, arena); + struct envoy_api_v2_endpoint_UpstreamLocalityStats* sub = (struct envoy_api_v2_endpoint_UpstreamLocalityStats*)_upb_msg_new(&envoy_api_v2_endpoint_UpstreamLocalityStats_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -268,7 +267,7 @@ UPB_INLINE void envoy_api_v2_endpoint_ClusterStats_set_load_report_interval(envo UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_endpoint_ClusterStats_mutable_load_report_interval(envoy_api_v2_endpoint_ClusterStats *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_endpoint_ClusterStats_load_report_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_endpoint_ClusterStats_set_load_report_interval(msg, sub); } @@ -278,10 +277,10 @@ UPB_INLINE envoy_api_v2_endpoint_ClusterStats_DroppedRequests** envoy_api_v2_end return (envoy_api_v2_endpoint_ClusterStats_DroppedRequests**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len); } UPB_INLINE envoy_api_v2_endpoint_ClusterStats_DroppedRequests** envoy_api_v2_endpoint_ClusterStats_resize_dropped_requests(envoy_api_v2_endpoint_ClusterStats *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_endpoint_ClusterStats_DroppedRequests**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_endpoint_ClusterStats_DroppedRequests**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats_DroppedRequests* envoy_api_v2_endpoint_ClusterStats_add_dropped_requests(envoy_api_v2_endpoint_ClusterStats *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_ClusterStats_DroppedRequests* sub = (struct envoy_api_v2_endpoint_ClusterStats_DroppedRequests*)upb_msg_new(&envoy_api_v2_endpoint_ClusterStats_DroppedRequests_msginit, arena); + struct envoy_api_v2_endpoint_ClusterStats_DroppedRequests* sub = (struct envoy_api_v2_endpoint_ClusterStats_DroppedRequests*)_upb_msg_new(&envoy_api_v2_endpoint_ClusterStats_DroppedRequests_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -294,7 +293,7 @@ UPB_INLINE void envoy_api_v2_endpoint_ClusterStats_set_cluster_service_name(envo /* envoy.api.v2.endpoint.ClusterStats.DroppedRequests */ UPB_INLINE envoy_api_v2_endpoint_ClusterStats_DroppedRequests *envoy_api_v2_endpoint_ClusterStats_DroppedRequests_new(upb_arena *arena) { - return (envoy_api_v2_endpoint_ClusterStats_DroppedRequests *)upb_msg_new(&envoy_api_v2_endpoint_ClusterStats_DroppedRequests_msginit, arena); + return (envoy_api_v2_endpoint_ClusterStats_DroppedRequests *)_upb_msg_new(&envoy_api_v2_endpoint_ClusterStats_DroppedRequests_msginit, arena); } UPB_INLINE envoy_api_v2_endpoint_ClusterStats_DroppedRequests *envoy_api_v2_endpoint_ClusterStats_DroppedRequests_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h b/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h index 97bb265162e..fd3820a094a 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_LDS_PROTO_UPB_H_ #define ENVOY_API_V2_LDS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -62,7 +61,7 @@ typedef enum { /* envoy.api.v2.Listener */ UPB_INLINE envoy_api_v2_Listener *envoy_api_v2_Listener_new(upb_arena *arena) { - return (envoy_api_v2_Listener *)upb_msg_new(&envoy_api_v2_Listener_msginit, arena); + return (envoy_api_v2_Listener *)_upb_msg_new(&envoy_api_v2_Listener_msginit, arena); } UPB_INLINE envoy_api_v2_Listener *envoy_api_v2_Listener_parse(const char *buf, size_t size, upb_arena *arena) { @@ -102,7 +101,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_address(envoy_api_v2_Listener *msg, st UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_Listener_mutable_address(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_Listener_address(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Address*)upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); + sub = (struct envoy_api_v2_core_Address*)_upb_msg_new(&envoy_api_v2_core_Address_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_address(msg, sub); } @@ -112,10 +111,10 @@ UPB_INLINE struct envoy_api_v2_listener_FilterChain** envoy_api_v2_Listener_muta return (struct envoy_api_v2_listener_FilterChain**)_upb_array_mutable_accessor(msg, UPB_SIZE(76, 136), len); } UPB_INLINE struct envoy_api_v2_listener_FilterChain** envoy_api_v2_Listener_resize_filter_chains(envoy_api_v2_Listener *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_listener_FilterChain**)_upb_array_resize_accessor(msg, UPB_SIZE(76, 136), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_listener_FilterChain**)_upb_array_resize_accessor(msg, UPB_SIZE(76, 136), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_listener_FilterChain* envoy_api_v2_Listener_add_filter_chains(envoy_api_v2_Listener *msg, upb_arena *arena) { - struct envoy_api_v2_listener_FilterChain* sub = (struct envoy_api_v2_listener_FilterChain*)upb_msg_new(&envoy_api_v2_listener_FilterChain_msginit, arena); + struct envoy_api_v2_listener_FilterChain* sub = (struct envoy_api_v2_listener_FilterChain*)_upb_msg_new(&envoy_api_v2_listener_FilterChain_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(76, 136), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -127,7 +126,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_use_original_dst(envoy_api_v2_Listener UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_use_original_dst(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_use_original_dst(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_use_original_dst(msg, sub); } @@ -139,7 +138,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_per_connection_buffer_limit_bytes(envo UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Listener_mutable_per_connection_buffer_limit_bytes(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Listener_per_connection_buffer_limit_bytes(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_per_connection_buffer_limit_bytes(msg, sub); } @@ -151,7 +150,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_metadata(envoy_api_v2_Listener *msg, s UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_Listener_mutable_metadata(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_Listener_metadata(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); + sub = (struct envoy_api_v2_core_Metadata*)_upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_metadata(msg, sub); } @@ -163,7 +162,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_deprecated_v1(envoy_api_v2_Listener *m UPB_INLINE struct envoy_api_v2_Listener_DeprecatedV1* envoy_api_v2_Listener_mutable_deprecated_v1(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_Listener_DeprecatedV1* sub = (struct envoy_api_v2_Listener_DeprecatedV1*)envoy_api_v2_Listener_deprecated_v1(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Listener_DeprecatedV1*)upb_msg_new(&envoy_api_v2_Listener_DeprecatedV1_msginit, arena); + sub = (struct envoy_api_v2_Listener_DeprecatedV1*)_upb_msg_new(&envoy_api_v2_Listener_DeprecatedV1_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_deprecated_v1(msg, sub); } @@ -176,10 +175,10 @@ UPB_INLINE struct envoy_api_v2_listener_ListenerFilter** envoy_api_v2_Listener_m return (struct envoy_api_v2_listener_ListenerFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(80, 144), len); } UPB_INLINE struct envoy_api_v2_listener_ListenerFilter** envoy_api_v2_Listener_resize_listener_filters(envoy_api_v2_Listener *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_listener_ListenerFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(80, 144), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_listener_ListenerFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(80, 144), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_listener_ListenerFilter* envoy_api_v2_Listener_add_listener_filters(envoy_api_v2_Listener *msg, upb_arena *arena) { - struct envoy_api_v2_listener_ListenerFilter* sub = (struct envoy_api_v2_listener_ListenerFilter*)upb_msg_new(&envoy_api_v2_listener_ListenerFilter_msginit, arena); + struct envoy_api_v2_listener_ListenerFilter* sub = (struct envoy_api_v2_listener_ListenerFilter*)_upb_msg_new(&envoy_api_v2_listener_ListenerFilter_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(80, 144), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -191,7 +190,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_transparent(envoy_api_v2_Listener *msg UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_transparent(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_transparent(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_transparent(msg, sub); } @@ -203,7 +202,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_freebind(envoy_api_v2_Listener *msg, s UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_freebind(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_freebind(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_freebind(msg, sub); } @@ -215,7 +214,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_tcp_fast_open_queue_length(envoy_api_v UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Listener_mutable_tcp_fast_open_queue_length(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Listener_tcp_fast_open_queue_length(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_tcp_fast_open_queue_length(msg, sub); } @@ -225,10 +224,10 @@ UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_Listener_mutable return (struct envoy_api_v2_core_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(84, 152), len); } UPB_INLINE struct envoy_api_v2_core_SocketOption** envoy_api_v2_Listener_resize_socket_options(envoy_api_v2_Listener *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(84, 152), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(84, 152), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_SocketOption* envoy_api_v2_Listener_add_socket_options(envoy_api_v2_Listener *msg, upb_arena *arena) { - struct envoy_api_v2_core_SocketOption* sub = (struct envoy_api_v2_core_SocketOption*)upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena); + struct envoy_api_v2_core_SocketOption* sub = (struct envoy_api_v2_core_SocketOption*)_upb_msg_new(&envoy_api_v2_core_SocketOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(84, 152), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -240,7 +239,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_listener_filters_timeout(envoy_api_v2_ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Listener_mutable_listener_filters_timeout(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Listener_listener_filters_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_listener_filters_timeout(msg, sub); } @@ -258,7 +257,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_udp_listener_config(envoy_api_v2_Liste UPB_INLINE struct envoy_api_v2_listener_UdpListenerConfig* envoy_api_v2_Listener_mutable_udp_listener_config(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_listener_UdpListenerConfig* sub = (struct envoy_api_v2_listener_UdpListenerConfig*)envoy_api_v2_Listener_udp_listener_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_listener_UdpListenerConfig*)upb_msg_new(&envoy_api_v2_listener_UdpListenerConfig_msginit, arena); + sub = (struct envoy_api_v2_listener_UdpListenerConfig*)_upb_msg_new(&envoy_api_v2_listener_UdpListenerConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_udp_listener_config(msg, sub); } @@ -270,7 +269,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_api_listener(envoy_api_v2_Listener *ms UPB_INLINE struct envoy_config_listener_v2_ApiListener* envoy_api_v2_Listener_mutable_api_listener(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_config_listener_v2_ApiListener* sub = (struct envoy_config_listener_v2_ApiListener*)envoy_api_v2_Listener_api_listener(msg); if (sub == NULL) { - sub = (struct envoy_config_listener_v2_ApiListener*)upb_msg_new(&envoy_config_listener_v2_ApiListener_msginit, arena); + sub = (struct envoy_config_listener_v2_ApiListener*)_upb_msg_new(&envoy_config_listener_v2_ApiListener_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_api_listener(msg, sub); } @@ -282,7 +281,7 @@ UPB_INLINE void envoy_api_v2_Listener_set_connection_balance_config(envoy_api_v2 UPB_INLINE struct envoy_api_v2_Listener_ConnectionBalanceConfig* envoy_api_v2_Listener_mutable_connection_balance_config(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_Listener_ConnectionBalanceConfig* sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig*)envoy_api_v2_Listener_connection_balance_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig*)upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena); + sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig*)_upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_set_connection_balance_config(msg, sub); } @@ -292,7 +291,7 @@ UPB_INLINE struct envoy_api_v2_Listener_ConnectionBalanceConfig* envoy_api_v2_Li /* envoy.api.v2.Listener.DeprecatedV1 */ UPB_INLINE envoy_api_v2_Listener_DeprecatedV1 *envoy_api_v2_Listener_DeprecatedV1_new(upb_arena *arena) { - return (envoy_api_v2_Listener_DeprecatedV1 *)upb_msg_new(&envoy_api_v2_Listener_DeprecatedV1_msginit, arena); + return (envoy_api_v2_Listener_DeprecatedV1 *)_upb_msg_new(&envoy_api_v2_Listener_DeprecatedV1_msginit, arena); } UPB_INLINE envoy_api_v2_Listener_DeprecatedV1 *envoy_api_v2_Listener_DeprecatedV1_parse(const char *buf, size_t size, upb_arena *arena) { @@ -311,7 +310,7 @@ UPB_INLINE void envoy_api_v2_Listener_DeprecatedV1_set_bind_to_port(envoy_api_v2 UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_DeprecatedV1_mutable_bind_to_port(envoy_api_v2_Listener_DeprecatedV1 *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_DeprecatedV1_bind_to_port(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_DeprecatedV1_set_bind_to_port(msg, sub); } @@ -321,7 +320,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_DeprecatedV1_ /* envoy.api.v2.Listener.ConnectionBalanceConfig */ UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig *envoy_api_v2_Listener_ConnectionBalanceConfig_new(upb_arena *arena) { - return (envoy_api_v2_Listener_ConnectionBalanceConfig *)upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena); + return (envoy_api_v2_Listener_ConnectionBalanceConfig *)_upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, arena); } UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig *envoy_api_v2_Listener_ConnectionBalanceConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -347,7 +346,7 @@ UPB_INLINE void envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance( UPB_INLINE struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* envoy_api_v2_Listener_ConnectionBalanceConfig_mutable_exact_balance(envoy_api_v2_Listener_ConnectionBalanceConfig *msg, upb_arena *arena) { struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*)envoy_api_v2_Listener_ConnectionBalanceConfig_exact_balance(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*)upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena); + sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*)_upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena); if (!sub) return NULL; envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance(msg, sub); } @@ -357,7 +356,7 @@ UPB_INLINE struct envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* en /* envoy.api.v2.Listener.ConnectionBalanceConfig.ExactBalance */ UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_new(upb_arena *arena) { - return (envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *)upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena); + return (envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *)_upb_msg_new(&envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena); } UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h index f91fad7a578..ac38048e684 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPB_H_ #define ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -59,7 +58,7 @@ typedef enum { /* envoy.api.v2.listener.Filter */ UPB_INLINE envoy_api_v2_listener_Filter *envoy_api_v2_listener_Filter_new(upb_arena *arena) { - return (envoy_api_v2_listener_Filter *)upb_msg_new(&envoy_api_v2_listener_Filter_msginit, arena); + return (envoy_api_v2_listener_Filter *)_upb_msg_new(&envoy_api_v2_listener_Filter_msginit, arena); } UPB_INLINE envoy_api_v2_listener_Filter *envoy_api_v2_listener_Filter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -92,7 +91,7 @@ UPB_INLINE void envoy_api_v2_listener_Filter_set_config(envoy_api_v2_listener_Fi UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_listener_Filter_mutable_config(envoy_api_v2_listener_Filter *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_listener_Filter_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_Filter_set_config(msg, sub); } @@ -104,7 +103,7 @@ UPB_INLINE void envoy_api_v2_listener_Filter_set_typed_config(envoy_api_v2_liste UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_Filter_mutable_typed_config(envoy_api_v2_listener_Filter *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_listener_Filter_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_Filter_set_typed_config(msg, sub); } @@ -114,7 +113,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_Filter_mutable_type /* envoy.api.v2.listener.FilterChainMatch */ UPB_INLINE envoy_api_v2_listener_FilterChainMatch *envoy_api_v2_listener_FilterChainMatch_new(upb_arena *arena) { - return (envoy_api_v2_listener_FilterChainMatch *)upb_msg_new(&envoy_api_v2_listener_FilterChainMatch_msginit, arena); + return (envoy_api_v2_listener_FilterChainMatch *)_upb_msg_new(&envoy_api_v2_listener_FilterChainMatch_msginit, arena); } UPB_INLINE envoy_api_v2_listener_FilterChainMatch *envoy_api_v2_listener_FilterChainMatch_parse(const char *buf, size_t size, upb_arena *arena) { @@ -140,10 +139,10 @@ UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChai return (struct envoy_api_v2_core_CidrRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len); } UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_resize_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_CidrRange**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_CidrRange**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_api_v2_listener_FilterChainMatch_add_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) { - struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); + struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)_upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -158,7 +157,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_suffix_len(envoy_api_ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_mutable_suffix_len(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_listener_FilterChainMatch_suffix_len(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_FilterChainMatch_set_suffix_len(msg, sub); } @@ -168,10 +167,10 @@ UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChai return (struct envoy_api_v2_core_CidrRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len); } UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_resize_source_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_CidrRange**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_CidrRange**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_api_v2_listener_FilterChainMatch_add_source_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) { - struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); + struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)_upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -181,11 +180,11 @@ UPB_INLINE uint32_t* envoy_api_v2_listener_FilterChainMatch_mutable_source_ports return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len); } UPB_INLINE uint32_t* envoy_api_v2_listener_FilterChainMatch_resize_source_ports(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) { - return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_UINT32, arena); } UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_add_source_ports(envoy_api_v2_listener_FilterChainMatch *msg, uint32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(40, 72), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(40, 72), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, + arena); } UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_destination_port(envoy_api_v2_listener_FilterChainMatch *msg, struct google_protobuf_UInt32Value* value) { UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)) = value; @@ -193,7 +192,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_destination_port(envo UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_mutable_destination_port(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_listener_FilterChainMatch_destination_port(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_FilterChainMatch_set_destination_port(msg, sub); } @@ -206,21 +205,21 @@ UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_mutable_applicati return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len); } UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_resize_application_protocols(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_add_application_protocols(envoy_api_v2_listener_FilterChainMatch *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(44, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(44, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_mutable_server_names(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len); } UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_resize_server_names(envoy_api_v2_listener_FilterChainMatch *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_add_server_names(envoy_api_v2_listener_FilterChainMatch *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(48, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(48, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_source_type(envoy_api_v2_listener_FilterChainMatch *msg, int32_t value) { UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; @@ -229,7 +228,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_source_type(envoy_api /* envoy.api.v2.listener.FilterChain */ UPB_INLINE envoy_api_v2_listener_FilterChain *envoy_api_v2_listener_FilterChain_new(upb_arena *arena) { - return (envoy_api_v2_listener_FilterChain *)upb_msg_new(&envoy_api_v2_listener_FilterChain_msginit, arena); + return (envoy_api_v2_listener_FilterChain *)_upb_msg_new(&envoy_api_v2_listener_FilterChain_msginit, arena); } UPB_INLINE envoy_api_v2_listener_FilterChain *envoy_api_v2_listener_FilterChain_parse(const char *buf, size_t size, upb_arena *arena) { @@ -254,7 +253,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChain_set_filter_chain_match(envoy_a UPB_INLINE struct envoy_api_v2_listener_FilterChainMatch* envoy_api_v2_listener_FilterChain_mutable_filter_chain_match(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct envoy_api_v2_listener_FilterChainMatch* sub = (struct envoy_api_v2_listener_FilterChainMatch*)envoy_api_v2_listener_FilterChain_filter_chain_match(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_listener_FilterChainMatch*)upb_msg_new(&envoy_api_v2_listener_FilterChainMatch_msginit, arena); + sub = (struct envoy_api_v2_listener_FilterChainMatch*)_upb_msg_new(&envoy_api_v2_listener_FilterChainMatch_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_FilterChain_set_filter_chain_match(msg, sub); } @@ -266,7 +265,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChain_set_tls_context(envoy_api_v2_l UPB_INLINE struct envoy_api_v2_auth_DownstreamTlsContext* envoy_api_v2_listener_FilterChain_mutable_tls_context(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct envoy_api_v2_auth_DownstreamTlsContext* sub = (struct envoy_api_v2_auth_DownstreamTlsContext*)envoy_api_v2_listener_FilterChain_tls_context(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_auth_DownstreamTlsContext*)upb_msg_new(&envoy_api_v2_auth_DownstreamTlsContext_msginit, arena); + sub = (struct envoy_api_v2_auth_DownstreamTlsContext*)_upb_msg_new(&envoy_api_v2_auth_DownstreamTlsContext_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_FilterChain_set_tls_context(msg, sub); } @@ -276,10 +275,10 @@ UPB_INLINE envoy_api_v2_listener_Filter** envoy_api_v2_listener_FilterChain_muta return (envoy_api_v2_listener_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE envoy_api_v2_listener_Filter** envoy_api_v2_listener_FilterChain_resize_filters(envoy_api_v2_listener_FilterChain *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_listener_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_listener_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_listener_Filter* envoy_api_v2_listener_FilterChain_add_filters(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { - struct envoy_api_v2_listener_Filter* sub = (struct envoy_api_v2_listener_Filter*)upb_msg_new(&envoy_api_v2_listener_Filter_msginit, arena); + struct envoy_api_v2_listener_Filter* sub = (struct envoy_api_v2_listener_Filter*)_upb_msg_new(&envoy_api_v2_listener_Filter_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -291,7 +290,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChain_set_use_proxy_proto(envoy_api_ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_listener_FilterChain_mutable_use_proxy_proto(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_listener_FilterChain_use_proxy_proto(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_FilterChain_set_use_proxy_proto(msg, sub); } @@ -303,7 +302,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChain_set_metadata(envoy_api_v2_list UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_listener_FilterChain_mutable_metadata(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_listener_FilterChain_metadata(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); + sub = (struct envoy_api_v2_core_Metadata*)_upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_FilterChain_set_metadata(msg, sub); } @@ -315,7 +314,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChain_set_transport_socket(envoy_api UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_listener_FilterChain_mutable_transport_socket(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct envoy_api_v2_core_TransportSocket* sub = (struct envoy_api_v2_core_TransportSocket*)envoy_api_v2_listener_FilterChain_transport_socket(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_TransportSocket*)upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); + sub = (struct envoy_api_v2_core_TransportSocket*)_upb_msg_new(&envoy_api_v2_core_TransportSocket_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_FilterChain_set_transport_socket(msg, sub); } @@ -328,7 +327,7 @@ UPB_INLINE void envoy_api_v2_listener_FilterChain_set_name(envoy_api_v2_listener /* envoy.api.v2.listener.ListenerFilter */ UPB_INLINE envoy_api_v2_listener_ListenerFilter *envoy_api_v2_listener_ListenerFilter_new(upb_arena *arena) { - return (envoy_api_v2_listener_ListenerFilter *)upb_msg_new(&envoy_api_v2_listener_ListenerFilter_msginit, arena); + return (envoy_api_v2_listener_ListenerFilter *)_upb_msg_new(&envoy_api_v2_listener_ListenerFilter_msginit, arena); } UPB_INLINE envoy_api_v2_listener_ListenerFilter *envoy_api_v2_listener_ListenerFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -361,7 +360,7 @@ UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_config(envoy_api_v2_lis UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_listener_ListenerFilter_mutable_config(envoy_api_v2_listener_ListenerFilter *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_listener_ListenerFilter_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_ListenerFilter_set_config(msg, sub); } @@ -373,7 +372,7 @@ UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_typed_config(envoy_api_ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_ListenerFilter_mutable_typed_config(envoy_api_v2_listener_ListenerFilter *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_listener_ListenerFilter_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_ListenerFilter_set_typed_config(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h index d7b409a1247..b6f9d727678 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPB_H_ #define ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -32,7 +31,7 @@ extern const upb_msglayout google_protobuf_Struct_msginit; /* envoy.api.v2.listener.UdpListenerConfig */ UPB_INLINE envoy_api_v2_listener_UdpListenerConfig *envoy_api_v2_listener_UdpListenerConfig_new(upb_arena *arena) { - return (envoy_api_v2_listener_UdpListenerConfig *)upb_msg_new(&envoy_api_v2_listener_UdpListenerConfig_msginit, arena); + return (envoy_api_v2_listener_UdpListenerConfig *)_upb_msg_new(&envoy_api_v2_listener_UdpListenerConfig_msginit, arena); } UPB_INLINE envoy_api_v2_listener_UdpListenerConfig *envoy_api_v2_listener_UdpListenerConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -65,7 +64,7 @@ UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_config(envoy_api_v2_ UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_listener_UdpListenerConfig_mutable_config(envoy_api_v2_listener_UdpListenerConfig *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_listener_UdpListenerConfig_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_UdpListenerConfig_set_config(msg, sub); } @@ -77,7 +76,7 @@ UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_typed_config(envoy_a UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_UdpListenerConfig_mutable_typed_config(envoy_api_v2_listener_UdpListenerConfig *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_listener_UdpListenerConfig_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_listener_UdpListenerConfig_set_typed_config(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h b/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h index 08014f67efb..88bc169c111 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_RDS_PROTO_UPB_H_ #define ENVOY_API_V2_RDS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -39,7 +38,7 @@ extern const upb_msglayout google_protobuf_BoolValue_msginit; /* envoy.api.v2.RouteConfiguration */ UPB_INLINE envoy_api_v2_RouteConfiguration *envoy_api_v2_RouteConfiguration_new(upb_arena *arena) { - return (envoy_api_v2_RouteConfiguration *)upb_msg_new(&envoy_api_v2_RouteConfiguration_msginit, arena); + return (envoy_api_v2_RouteConfiguration *)_upb_msg_new(&envoy_api_v2_RouteConfiguration_msginit, arena); } UPB_INLINE envoy_api_v2_RouteConfiguration *envoy_api_v2_RouteConfiguration_parse(const char *buf, size_t size, upb_arena *arena) { @@ -68,10 +67,10 @@ UPB_INLINE struct envoy_api_v2_route_VirtualHost** envoy_api_v2_RouteConfigurati return (struct envoy_api_v2_route_VirtualHost**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE struct envoy_api_v2_route_VirtualHost** envoy_api_v2_RouteConfiguration_resize_virtual_hosts(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_route_VirtualHost**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_route_VirtualHost**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_VirtualHost* envoy_api_v2_RouteConfiguration_add_virtual_hosts(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) { - struct envoy_api_v2_route_VirtualHost* sub = (struct envoy_api_v2_route_VirtualHost*)upb_msg_new(&envoy_api_v2_route_VirtualHost_msginit, arena); + struct envoy_api_v2_route_VirtualHost* sub = (struct envoy_api_v2_route_VirtualHost*)_upb_msg_new(&envoy_api_v2_route_VirtualHost_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -81,20 +80,20 @@ UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_internal_only_he return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_resize_internal_only_headers(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_RouteConfiguration_add_internal_only_headers(envoy_api_v2_RouteConfiguration *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_RouteConfiguration_mutable_response_headers_to_add(envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_RouteConfiguration_resize_response_headers_to_add(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_RouteConfiguration_add_response_headers_to_add(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -104,20 +103,20 @@ UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_response_headers return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_resize_response_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_RouteConfiguration_add_response_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_RouteConfiguration_mutable_request_headers_to_add(envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_RouteConfiguration_resize_request_headers_to_add(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_RouteConfiguration_add_request_headers_to_add(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -129,7 +128,7 @@ UPB_INLINE void envoy_api_v2_RouteConfiguration_set_validate_clusters(envoy_api_ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_RouteConfiguration_mutable_validate_clusters(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_RouteConfiguration_validate_clusters(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_RouteConfiguration_set_validate_clusters(msg, sub); } @@ -139,11 +138,11 @@ UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_mutable_request_headers_ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE upb_strview* envoy_api_v2_RouteConfiguration_resize_request_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_RouteConfiguration_add_request_headers_to_remove(envoy_api_v2_RouteConfiguration *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_RouteConfiguration_set_vhds(envoy_api_v2_RouteConfiguration *msg, envoy_api_v2_Vhds* value) { UPB_FIELD_AT(msg, envoy_api_v2_Vhds*, UPB_SIZE(16, 32)) = value; @@ -151,7 +150,7 @@ UPB_INLINE void envoy_api_v2_RouteConfiguration_set_vhds(envoy_api_v2_RouteConfi UPB_INLINE struct envoy_api_v2_Vhds* envoy_api_v2_RouteConfiguration_mutable_vhds(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) { struct envoy_api_v2_Vhds* sub = (struct envoy_api_v2_Vhds*)envoy_api_v2_RouteConfiguration_vhds(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_Vhds*)upb_msg_new(&envoy_api_v2_Vhds_msginit, arena); + sub = (struct envoy_api_v2_Vhds*)_upb_msg_new(&envoy_api_v2_Vhds_msginit, arena); if (!sub) return NULL; envoy_api_v2_RouteConfiguration_set_vhds(msg, sub); } @@ -164,7 +163,7 @@ UPB_INLINE void envoy_api_v2_RouteConfiguration_set_most_specific_header_mutatio /* envoy.api.v2.Vhds */ UPB_INLINE envoy_api_v2_Vhds *envoy_api_v2_Vhds_new(upb_arena *arena) { - return (envoy_api_v2_Vhds *)upb_msg_new(&envoy_api_v2_Vhds_msginit, arena); + return (envoy_api_v2_Vhds *)_upb_msg_new(&envoy_api_v2_Vhds_msginit, arena); } UPB_INLINE envoy_api_v2_Vhds *envoy_api_v2_Vhds_parse(const char *buf, size_t size, upb_arena *arena) { @@ -183,7 +182,7 @@ UPB_INLINE void envoy_api_v2_Vhds_set_config_source(envoy_api_v2_Vhds *msg, stru UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Vhds_mutable_config_source(envoy_api_v2_Vhds *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_Vhds_config_source(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_ConfigSource*)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_Vhds_set_config_source(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c b/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c index e0044657e3d..28aecccd1e8 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c @@ -45,10 +45,10 @@ static const upb_msglayout_field envoy_api_v2_route_VirtualHost__fields[16] = { {8, UPB_SIZE(20, 32), 0, 1, 11, 1}, {10, UPB_SIZE(52, 96), 0, 0, 11, 3}, {11, UPB_SIZE(56, 104), 0, 0, 9, 3}, - {12, UPB_SIZE(60, 112), 0, 7, 11, 3}, + {12, UPB_SIZE(60, 112), 0, 7, 11, 4}, {13, UPB_SIZE(64, 120), 0, 0, 9, 3}, {14, UPB_SIZE(8, 8), 0, 0, 8, 1}, - {15, UPB_SIZE(68, 128), 0, 8, 11, 3}, + {15, UPB_SIZE(68, 128), 0, 8, 11, 4}, {16, UPB_SIZE(24, 40), 0, 4, 11, 1}, {17, UPB_SIZE(28, 48), 0, 2, 11, 1}, }; @@ -109,12 +109,12 @@ static const upb_msglayout_field envoy_api_v2_route_Route__fields[14] = { {4, UPB_SIZE(12, 24), 0, 1, 11, 1}, {5, UPB_SIZE(16, 32), 0, 2, 11, 1}, {7, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 3, 11, 1}, - {8, UPB_SIZE(24, 48), 0, 5, 11, 3}, + {8, UPB_SIZE(24, 48), 0, 5, 11, 4}, {9, UPB_SIZE(28, 56), 0, 0, 11, 3}, {10, UPB_SIZE(32, 64), 0, 0, 11, 3}, {11, UPB_SIZE(36, 72), 0, 0, 9, 3}, {12, UPB_SIZE(40, 80), 0, 0, 9, 3}, - {13, UPB_SIZE(44, 88), 0, 6, 11, 3}, + {13, UPB_SIZE(44, 88), 0, 6, 11, 4}, {14, UPB_SIZE(0, 0), 0, 0, 9, 1}, {15, UPB_SIZE(20, 40), 0, 9, 11, 1}, }; @@ -187,9 +187,9 @@ static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeigh {4, UPB_SIZE(16, 32), 0, 0, 11, 3}, {5, UPB_SIZE(20, 40), 0, 0, 11, 3}, {6, UPB_SIZE(24, 48), 0, 0, 9, 3}, - {8, UPB_SIZE(28, 56), 0, 2, 11, 3}, + {8, UPB_SIZE(28, 56), 0, 2, 11, 4}, {9, UPB_SIZE(32, 64), 0, 0, 9, 3}, - {10, UPB_SIZE(36, 72), 0, 3, 11, 3}, + {10, UPB_SIZE(36, 72), 0, 3, 11, 4}, }; const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h b/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h index c11ba9b201e..7e598db421f 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_ROUTE_ROUTE_PROTO_UPB_H_ #define ENVOY_API_V2_ROUTE_ROUTE_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -195,7 +194,7 @@ typedef enum { /* envoy.api.v2.route.VirtualHost */ UPB_INLINE envoy_api_v2_route_VirtualHost *envoy_api_v2_route_VirtualHost_new(upb_arena *arena) { - return (envoy_api_v2_route_VirtualHost *)upb_msg_new(&envoy_api_v2_route_VirtualHost_msginit, arena); + return (envoy_api_v2_route_VirtualHost *)_upb_msg_new(&envoy_api_v2_route_VirtualHost_msginit, arena); } UPB_INLINE envoy_api_v2_route_VirtualHost *envoy_api_v2_route_VirtualHost_parse(const char *buf, size_t size, upb_arena *arena) { @@ -216,10 +215,14 @@ UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2 UPB_INLINE const envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_VirtualHost_cors(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_CorsPolicy*, UPB_SIZE(20, 32)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_VirtualHost_response_headers_to_add(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(52, 96), len); } UPB_INLINE upb_strview const* envoy_api_v2_route_VirtualHost_response_headers_to_remove(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(56, 104), len); } -UPB_INLINE const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry* const* envoy_api_v2_route_VirtualHost_per_filter_config(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry* const*)_upb_array_accessor(msg, UPB_SIZE(60, 112), len); } +UPB_INLINE size_t envoy_api_v2_route_VirtualHost_per_filter_config_size(const envoy_api_v2_route_VirtualHost *msg) {return _upb_msg_map_size(msg, UPB_SIZE(60, 112)); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_per_filter_config_get(const envoy_api_v2_route_VirtualHost *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(60, 112), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry* envoy_api_v2_route_VirtualHost_per_filter_config_next(const envoy_api_v2_route_VirtualHost *msg, size_t* iter) { return (const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(60, 112), iter); } UPB_INLINE upb_strview const* envoy_api_v2_route_VirtualHost_request_headers_to_remove(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(64, 120), len); } UPB_INLINE bool envoy_api_v2_route_VirtualHost_include_request_attempt_count(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } -UPB_INLINE const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry* const* envoy_api_v2_route_VirtualHost_typed_per_filter_config(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry* const*)_upb_array_accessor(msg, UPB_SIZE(68, 128), len); } +UPB_INLINE size_t envoy_api_v2_route_VirtualHost_typed_per_filter_config_size(const envoy_api_v2_route_VirtualHost *msg) {return _upb_msg_map_size(msg, UPB_SIZE(68, 128)); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_typed_per_filter_config_get(const envoy_api_v2_route_VirtualHost *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(68, 128), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry* envoy_api_v2_route_VirtualHost_typed_per_filter_config_next(const envoy_api_v2_route_VirtualHost *msg, size_t* iter) { return (const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(68, 128), iter); } UPB_INLINE const envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_VirtualHost_retry_policy(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RetryPolicy*, UPB_SIZE(24, 40)); } UPB_INLINE const envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_VirtualHost_hedge_policy(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_HedgePolicy*, UPB_SIZE(28, 48)); } @@ -230,20 +233,20 @@ UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_mutable_domains(envoy_api return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len); } UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_resize_domains(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_VirtualHost_add_domains(envoy_api_v2_route_VirtualHost *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(32, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(32, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE envoy_api_v2_route_Route** envoy_api_v2_route_VirtualHost_mutable_routes(envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (envoy_api_v2_route_Route**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len); } UPB_INLINE envoy_api_v2_route_Route** envoy_api_v2_route_VirtualHost_resize_routes(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_Route**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_Route**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_Route* envoy_api_v2_route_VirtualHost_add_routes(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { - struct envoy_api_v2_route_Route* sub = (struct envoy_api_v2_route_Route*)upb_msg_new(&envoy_api_v2_route_Route_msginit, arena); + struct envoy_api_v2_route_Route* sub = (struct envoy_api_v2_route_Route*)_upb_msg_new(&envoy_api_v2_route_Route_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -256,10 +259,10 @@ UPB_INLINE envoy_api_v2_route_VirtualCluster** envoy_api_v2_route_VirtualHost_mu return (envoy_api_v2_route_VirtualCluster**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len); } UPB_INLINE envoy_api_v2_route_VirtualCluster** envoy_api_v2_route_VirtualHost_resize_virtual_clusters(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_VirtualCluster**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_VirtualCluster**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_VirtualCluster* envoy_api_v2_route_VirtualHost_add_virtual_clusters(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { - struct envoy_api_v2_route_VirtualCluster* sub = (struct envoy_api_v2_route_VirtualCluster*)upb_msg_new(&envoy_api_v2_route_VirtualCluster_msginit, arena); + struct envoy_api_v2_route_VirtualCluster* sub = (struct envoy_api_v2_route_VirtualCluster*)_upb_msg_new(&envoy_api_v2_route_VirtualCluster_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(40, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -269,10 +272,10 @@ UPB_INLINE envoy_api_v2_route_RateLimit** envoy_api_v2_route_VirtualHost_mutable return (envoy_api_v2_route_RateLimit**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len); } UPB_INLINE envoy_api_v2_route_RateLimit** envoy_api_v2_route_VirtualHost_resize_rate_limits(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_RateLimit**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_RateLimit**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_RateLimit* envoy_api_v2_route_VirtualHost_add_rate_limits(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { - struct envoy_api_v2_route_RateLimit* sub = (struct envoy_api_v2_route_RateLimit*)upb_msg_new(&envoy_api_v2_route_RateLimit_msginit, arena); + struct envoy_api_v2_route_RateLimit* sub = (struct envoy_api_v2_route_RateLimit*)_upb_msg_new(&envoy_api_v2_route_RateLimit_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -282,10 +285,10 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Virtu return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_VirtualHost_resize_request_headers_to_add(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_route_VirtualHost_add_request_headers_to_add(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(48, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -297,7 +300,7 @@ UPB_INLINE void envoy_api_v2_route_VirtualHost_set_cors(envoy_api_v2_route_Virtu UPB_INLINE struct envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_VirtualHost_mutable_cors(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { struct envoy_api_v2_route_CorsPolicy* sub = (struct envoy_api_v2_route_CorsPolicy*)envoy_api_v2_route_VirtualHost_cors(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_CorsPolicy*)upb_msg_new(&envoy_api_v2_route_CorsPolicy_msginit, arena); + sub = (struct envoy_api_v2_route_CorsPolicy*)_upb_msg_new(&envoy_api_v2_route_CorsPolicy_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_VirtualHost_set_cors(msg, sub); } @@ -307,10 +310,10 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Virtu return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 96), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_VirtualHost_resize_response_headers_to_add(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 96), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 96), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_route_VirtualHost_add_response_headers_to_add(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(52, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -320,58 +323,40 @@ UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_mutable_response_headers_ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 104), len); } UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_resize_response_headers_to_remove(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 104), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 104), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_VirtualHost_add_response_headers_to_remove(envoy_api_v2_route_VirtualHost *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(56, 104), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); -} -UPB_INLINE envoy_api_v2_route_VirtualHost_PerFilterConfigEntry** envoy_api_v2_route_VirtualHost_mutable_per_filter_config(envoy_api_v2_route_VirtualHost *msg, size_t *len) { - return (envoy_api_v2_route_VirtualHost_PerFilterConfigEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 112), len); -} -UPB_INLINE envoy_api_v2_route_VirtualHost_PerFilterConfigEntry** envoy_api_v2_route_VirtualHost_resize_per_filter_config(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_VirtualHost_PerFilterConfigEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(60, 112), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_route_VirtualHost_PerFilterConfigEntry* envoy_api_v2_route_VirtualHost_add_per_filter_config(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { - struct envoy_api_v2_route_VirtualHost_PerFilterConfigEntry* sub = (struct envoy_api_v2_route_VirtualHost_PerFilterConfigEntry*)upb_msg_new(&envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(60, 112), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; + return _upb_array_append_accessor(msg, UPB_SIZE(56, 104), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } +UPB_INLINE void envoy_api_v2_route_VirtualHost_per_filter_config_clear(envoy_api_v2_route_VirtualHost *msg) { _upb_msg_map_clear(msg, UPB_SIZE(60, 112)); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_per_filter_config_set(envoy_api_v2_route_VirtualHost *msg, upb_strview key, struct google_protobuf_Struct* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(60, 112), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_per_filter_config_delete(envoy_api_v2_route_VirtualHost *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(60, 112), &key, 0); } +UPB_INLINE envoy_api_v2_route_VirtualHost_PerFilterConfigEntry* envoy_api_v2_route_VirtualHost_per_filter_config_nextmutable(envoy_api_v2_route_VirtualHost *msg, size_t* iter) { return (envoy_api_v2_route_VirtualHost_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(60, 112), iter); } UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_mutable_request_headers_to_remove(envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(64, 120), len); } UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_resize_request_headers_to_remove(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(64, 120), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(64, 120), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_VirtualHost_add_request_headers_to_remove(envoy_api_v2_route_VirtualHost *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(64, 120), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(64, 120), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_include_request_attempt_count(envoy_api_v2_route_VirtualHost *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; } -UPB_INLINE envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry** envoy_api_v2_route_VirtualHost_mutable_typed_per_filter_config(envoy_api_v2_route_VirtualHost *msg, size_t *len) { - return (envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(68, 128), len); -} -UPB_INLINE envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry** envoy_api_v2_route_VirtualHost_resize_typed_per_filter_config(envoy_api_v2_route_VirtualHost *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(68, 128), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry* envoy_api_v2_route_VirtualHost_add_typed_per_filter_config(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { - struct envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry* sub = (struct envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry*)upb_msg_new(&envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(68, 128), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void envoy_api_v2_route_VirtualHost_typed_per_filter_config_clear(envoy_api_v2_route_VirtualHost *msg) { _upb_msg_map_clear(msg, UPB_SIZE(68, 128)); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_typed_per_filter_config_set(envoy_api_v2_route_VirtualHost *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(68, 128), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_typed_per_filter_config_delete(envoy_api_v2_route_VirtualHost *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(68, 128), &key, 0); } +UPB_INLINE envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry* envoy_api_v2_route_VirtualHost_typed_per_filter_config_nextmutable(envoy_api_v2_route_VirtualHost *msg, size_t* iter) { return (envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(68, 128), iter); } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_retry_policy(envoy_api_v2_route_VirtualHost *msg, envoy_api_v2_route_RetryPolicy* value) { UPB_FIELD_AT(msg, envoy_api_v2_route_RetryPolicy*, UPB_SIZE(24, 40)) = value; } UPB_INLINE struct envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_VirtualHost_mutable_retry_policy(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { struct envoy_api_v2_route_RetryPolicy* sub = (struct envoy_api_v2_route_RetryPolicy*)envoy_api_v2_route_VirtualHost_retry_policy(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RetryPolicy*)upb_msg_new(&envoy_api_v2_route_RetryPolicy_msginit, arena); + sub = (struct envoy_api_v2_route_RetryPolicy*)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_VirtualHost_set_retry_policy(msg, sub); } @@ -383,7 +368,7 @@ UPB_INLINE void envoy_api_v2_route_VirtualHost_set_hedge_policy(envoy_api_v2_rou UPB_INLINE struct envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_VirtualHost_mutable_hedge_policy(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { struct envoy_api_v2_route_HedgePolicy* sub = (struct envoy_api_v2_route_HedgePolicy*)envoy_api_v2_route_VirtualHost_hedge_policy(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_HedgePolicy*)upb_msg_new(&envoy_api_v2_route_HedgePolicy_msginit, arena); + sub = (struct envoy_api_v2_route_HedgePolicy*)_upb_msg_new(&envoy_api_v2_route_HedgePolicy_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_VirtualHost_set_hedge_policy(msg, sub); } @@ -392,74 +377,42 @@ UPB_INLINE struct envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_VirtualHost /* envoy.api.v2.route.VirtualHost.PerFilterConfigEntry */ -UPB_INLINE envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_new(upb_arena *arena) { - return (envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *)upb_msg_new(&envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit, arena); +UPB_INLINE upb_strview envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_key(const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *ret = envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_value(const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg) { + struct google_protobuf_Struct* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE char *envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_serialize(const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit, arena, len); -} - -UPB_INLINE upb_strview envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_key(const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_value(const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16)); } -UPB_INLINE void envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_set_key(envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_set_value(envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_mutable_value(envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg, upb_arena *arena) { - struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Struct*)); } /* envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry */ -UPB_INLINE envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_new(upb_arena *arena) { - return (envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *)upb_msg_new(&envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit, arena); +UPB_INLINE upb_strview envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_key(const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *ret = envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_serialize(const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit, arena, len); +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg) { + struct google_protobuf_Any* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_key(const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_set_key(envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_set_value(envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_mutable_value(envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg, upb_arena *arena) { - struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Any*)); } /* envoy.api.v2.route.Route */ UPB_INLINE envoy_api_v2_route_Route *envoy_api_v2_route_Route_new(upb_arena *arena) { - return (envoy_api_v2_route_Route *)upb_msg_new(&envoy_api_v2_route_Route_msginit, arena); + return (envoy_api_v2_route_Route *)_upb_msg_new(&envoy_api_v2_route_Route_msginit, arena); } UPB_INLINE envoy_api_v2_route_Route *envoy_api_v2_route_Route_parse(const char *buf, size_t size, upb_arena *arena) { @@ -487,12 +440,16 @@ UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_Route_met UPB_INLINE const envoy_api_v2_route_Decorator* envoy_api_v2_route_Route_decorator(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_Decorator*, UPB_SIZE(16, 32)); } UPB_INLINE bool envoy_api_v2_route_Route_has_direct_response(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(52, 104), 7); } UPB_INLINE const envoy_api_v2_route_DirectResponseAction* envoy_api_v2_route_Route_direct_response(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_DirectResponseAction*, UPB_SIZE(48, 96), UPB_SIZE(52, 104), 7, NULL); } -UPB_INLINE const envoy_api_v2_route_Route_PerFilterConfigEntry* const* envoy_api_v2_route_Route_per_filter_config(const envoy_api_v2_route_Route *msg, size_t *len) { return (const envoy_api_v2_route_Route_PerFilterConfigEntry* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE size_t envoy_api_v2_route_Route_per_filter_config_size(const envoy_api_v2_route_Route *msg) {return _upb_msg_map_size(msg, UPB_SIZE(24, 48)); } +UPB_INLINE bool envoy_api_v2_route_Route_per_filter_config_get(const envoy_api_v2_route_Route *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(24, 48), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_route_Route_PerFilterConfigEntry* envoy_api_v2_route_Route_per_filter_config_next(const envoy_api_v2_route_Route *msg, size_t* iter) { return (const envoy_api_v2_route_Route_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 48), iter); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_Route_request_headers_to_add(const envoy_api_v2_route_Route *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_Route_response_headers_to_add(const envoy_api_v2_route_Route *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE upb_strview const* envoy_api_v2_route_Route_response_headers_to_remove(const envoy_api_v2_route_Route *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE upb_strview const* envoy_api_v2_route_Route_request_headers_to_remove(const envoy_api_v2_route_Route *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } -UPB_INLINE const envoy_api_v2_route_Route_TypedPerFilterConfigEntry* const* envoy_api_v2_route_Route_typed_per_filter_config(const envoy_api_v2_route_Route *msg, size_t *len) { return (const envoy_api_v2_route_Route_TypedPerFilterConfigEntry* const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } +UPB_INLINE size_t envoy_api_v2_route_Route_typed_per_filter_config_size(const envoy_api_v2_route_Route *msg) {return _upb_msg_map_size(msg, UPB_SIZE(44, 88)); } +UPB_INLINE bool envoy_api_v2_route_Route_typed_per_filter_config_get(const envoy_api_v2_route_Route *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(44, 88), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_route_Route_TypedPerFilterConfigEntry* envoy_api_v2_route_Route_typed_per_filter_config_next(const envoy_api_v2_route_Route *msg, size_t* iter) { return (const envoy_api_v2_route_Route_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 88), iter); } UPB_INLINE upb_strview envoy_api_v2_route_Route_name(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_api_v2_route_Tracing* envoy_api_v2_route_Route_tracing(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_Tracing*, UPB_SIZE(20, 40)); } @@ -502,7 +459,7 @@ UPB_INLINE void envoy_api_v2_route_Route_set_match(envoy_api_v2_route_Route *msg UPB_INLINE struct envoy_api_v2_route_RouteMatch* envoy_api_v2_route_Route_mutable_match(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteMatch* sub = (struct envoy_api_v2_route_RouteMatch*)envoy_api_v2_route_Route_match(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RouteMatch*)upb_msg_new(&envoy_api_v2_route_RouteMatch_msginit, arena); + sub = (struct envoy_api_v2_route_RouteMatch*)_upb_msg_new(&envoy_api_v2_route_RouteMatch_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Route_set_match(msg, sub); } @@ -514,7 +471,7 @@ UPB_INLINE void envoy_api_v2_route_Route_set_route(envoy_api_v2_route_Route *msg UPB_INLINE struct envoy_api_v2_route_RouteAction* envoy_api_v2_route_Route_mutable_route(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteAction* sub = (struct envoy_api_v2_route_RouteAction*)envoy_api_v2_route_Route_route(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RouteAction*)upb_msg_new(&envoy_api_v2_route_RouteAction_msginit, arena); + sub = (struct envoy_api_v2_route_RouteAction*)_upb_msg_new(&envoy_api_v2_route_RouteAction_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Route_set_route(msg, sub); } @@ -526,7 +483,7 @@ UPB_INLINE void envoy_api_v2_route_Route_set_redirect(envoy_api_v2_route_Route * UPB_INLINE struct envoy_api_v2_route_RedirectAction* envoy_api_v2_route_Route_mutable_redirect(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_RedirectAction* sub = (struct envoy_api_v2_route_RedirectAction*)envoy_api_v2_route_Route_redirect(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RedirectAction*)upb_msg_new(&envoy_api_v2_route_RedirectAction_msginit, arena); + sub = (struct envoy_api_v2_route_RedirectAction*)_upb_msg_new(&envoy_api_v2_route_RedirectAction_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Route_set_redirect(msg, sub); } @@ -538,7 +495,7 @@ UPB_INLINE void envoy_api_v2_route_Route_set_metadata(envoy_api_v2_route_Route * UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_route_Route_mutable_metadata(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_route_Route_metadata(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); + sub = (struct envoy_api_v2_core_Metadata*)_upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Route_set_metadata(msg, sub); } @@ -550,7 +507,7 @@ UPB_INLINE void envoy_api_v2_route_Route_set_decorator(envoy_api_v2_route_Route UPB_INLINE struct envoy_api_v2_route_Decorator* envoy_api_v2_route_Route_mutable_decorator(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_Decorator* sub = (struct envoy_api_v2_route_Decorator*)envoy_api_v2_route_Route_decorator(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_Decorator*)upb_msg_new(&envoy_api_v2_route_Decorator_msginit, arena); + sub = (struct envoy_api_v2_route_Decorator*)_upb_msg_new(&envoy_api_v2_route_Decorator_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Route_set_decorator(msg, sub); } @@ -562,33 +519,24 @@ UPB_INLINE void envoy_api_v2_route_Route_set_direct_response(envoy_api_v2_route_ UPB_INLINE struct envoy_api_v2_route_DirectResponseAction* envoy_api_v2_route_Route_mutable_direct_response(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_DirectResponseAction* sub = (struct envoy_api_v2_route_DirectResponseAction*)envoy_api_v2_route_Route_direct_response(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_DirectResponseAction*)upb_msg_new(&envoy_api_v2_route_DirectResponseAction_msginit, arena); + sub = (struct envoy_api_v2_route_DirectResponseAction*)_upb_msg_new(&envoy_api_v2_route_DirectResponseAction_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Route_set_direct_response(msg, sub); } return sub; } -UPB_INLINE envoy_api_v2_route_Route_PerFilterConfigEntry** envoy_api_v2_route_Route_mutable_per_filter_config(envoy_api_v2_route_Route *msg, size_t *len) { - return (envoy_api_v2_route_Route_PerFilterConfigEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); -} -UPB_INLINE envoy_api_v2_route_Route_PerFilterConfigEntry** envoy_api_v2_route_Route_resize_per_filter_config(envoy_api_v2_route_Route *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_Route_PerFilterConfigEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_route_Route_PerFilterConfigEntry* envoy_api_v2_route_Route_add_per_filter_config(envoy_api_v2_route_Route *msg, upb_arena *arena) { - struct envoy_api_v2_route_Route_PerFilterConfigEntry* sub = (struct envoy_api_v2_route_Route_PerFilterConfigEntry*)upb_msg_new(&envoy_api_v2_route_Route_PerFilterConfigEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void envoy_api_v2_route_Route_per_filter_config_clear(envoy_api_v2_route_Route *msg) { _upb_msg_map_clear(msg, UPB_SIZE(24, 48)); } +UPB_INLINE bool envoy_api_v2_route_Route_per_filter_config_set(envoy_api_v2_route_Route *msg, upb_strview key, struct google_protobuf_Struct* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(24, 48), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_route_Route_per_filter_config_delete(envoy_api_v2_route_Route *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(24, 48), &key, 0); } +UPB_INLINE envoy_api_v2_route_Route_PerFilterConfigEntry* envoy_api_v2_route_Route_per_filter_config_nextmutable(envoy_api_v2_route_Route *msg, size_t* iter) { return (envoy_api_v2_route_Route_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 48), iter); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Route_mutable_request_headers_to_add(envoy_api_v2_route_Route *msg, size_t *len) { return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Route_resize_request_headers_to_add(envoy_api_v2_route_Route *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_route_Route_add_request_headers_to_add(envoy_api_v2_route_Route *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -598,10 +546,10 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Route return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Route_resize_response_headers_to_add(envoy_api_v2_route_Route *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_route_Route_add_response_headers_to_add(envoy_api_v2_route_Route *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -611,35 +559,26 @@ UPB_INLINE upb_strview* envoy_api_v2_route_Route_mutable_response_headers_to_rem return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE upb_strview* envoy_api_v2_route_Route_resize_response_headers_to_remove(envoy_api_v2_route_Route *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_Route_add_response_headers_to_remove(envoy_api_v2_route_Route *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* envoy_api_v2_route_Route_mutable_request_headers_to_remove(envoy_api_v2_route_Route *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE upb_strview* envoy_api_v2_route_Route_resize_request_headers_to_remove(envoy_api_v2_route_Route *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_Route_add_request_headers_to_remove(envoy_api_v2_route_Route *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); -} -UPB_INLINE envoy_api_v2_route_Route_TypedPerFilterConfigEntry** envoy_api_v2_route_Route_mutable_typed_per_filter_config(envoy_api_v2_route_Route *msg, size_t *len) { - return (envoy_api_v2_route_Route_TypedPerFilterConfigEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); -} -UPB_INLINE envoy_api_v2_route_Route_TypedPerFilterConfigEntry** envoy_api_v2_route_Route_resize_typed_per_filter_config(envoy_api_v2_route_Route *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_Route_TypedPerFilterConfigEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_route_Route_TypedPerFilterConfigEntry* envoy_api_v2_route_Route_add_typed_per_filter_config(envoy_api_v2_route_Route *msg, upb_arena *arena) { - struct envoy_api_v2_route_Route_TypedPerFilterConfigEntry* sub = (struct envoy_api_v2_route_Route_TypedPerFilterConfigEntry*)upb_msg_new(&envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(44, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; + return _upb_array_append_accessor(msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } +UPB_INLINE void envoy_api_v2_route_Route_typed_per_filter_config_clear(envoy_api_v2_route_Route *msg) { _upb_msg_map_clear(msg, UPB_SIZE(44, 88)); } +UPB_INLINE bool envoy_api_v2_route_Route_typed_per_filter_config_set(envoy_api_v2_route_Route *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(44, 88), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_route_Route_typed_per_filter_config_delete(envoy_api_v2_route_Route *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(44, 88), &key, 0); } +UPB_INLINE envoy_api_v2_route_Route_TypedPerFilterConfigEntry* envoy_api_v2_route_Route_typed_per_filter_config_nextmutable(envoy_api_v2_route_Route *msg, size_t* iter) { return (envoy_api_v2_route_Route_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 88), iter); } UPB_INLINE void envoy_api_v2_route_Route_set_name(envoy_api_v2_route_Route *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; } @@ -649,7 +588,7 @@ UPB_INLINE void envoy_api_v2_route_Route_set_tracing(envoy_api_v2_route_Route *m UPB_INLINE struct envoy_api_v2_route_Tracing* envoy_api_v2_route_Route_mutable_tracing(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_Tracing* sub = (struct envoy_api_v2_route_Tracing*)envoy_api_v2_route_Route_tracing(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_Tracing*)upb_msg_new(&envoy_api_v2_route_Tracing_msginit, arena); + sub = (struct envoy_api_v2_route_Tracing*)_upb_msg_new(&envoy_api_v2_route_Tracing_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Route_set_tracing(msg, sub); } @@ -658,74 +597,42 @@ UPB_INLINE struct envoy_api_v2_route_Tracing* envoy_api_v2_route_Route_mutable_t /* envoy.api.v2.route.Route.PerFilterConfigEntry */ -UPB_INLINE envoy_api_v2_route_Route_PerFilterConfigEntry *envoy_api_v2_route_Route_PerFilterConfigEntry_new(upb_arena *arena) { - return (envoy_api_v2_route_Route_PerFilterConfigEntry *)upb_msg_new(&envoy_api_v2_route_Route_PerFilterConfigEntry_msginit, arena); -} -UPB_INLINE envoy_api_v2_route_Route_PerFilterConfigEntry *envoy_api_v2_route_Route_PerFilterConfigEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_Route_PerFilterConfigEntry *ret = envoy_api_v2_route_Route_PerFilterConfigEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_Route_PerFilterConfigEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_api_v2_route_Route_PerFilterConfigEntry_key(const envoy_api_v2_route_Route_PerFilterConfigEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_api_v2_route_Route_PerFilterConfigEntry_serialize(const envoy_api_v2_route_Route_PerFilterConfigEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_Route_PerFilterConfigEntry_msginit, arena, len); +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_Route_PerFilterConfigEntry_value(const envoy_api_v2_route_Route_PerFilterConfigEntry *msg) { + struct google_protobuf_Struct* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_route_Route_PerFilterConfigEntry_key(const envoy_api_v2_route_Route_PerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_Route_PerFilterConfigEntry_value(const envoy_api_v2_route_Route_PerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_route_Route_PerFilterConfigEntry_set_key(envoy_api_v2_route_Route_PerFilterConfigEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_route_Route_PerFilterConfigEntry_set_value(envoy_api_v2_route_Route_PerFilterConfigEntry *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_route_Route_PerFilterConfigEntry_mutable_value(envoy_api_v2_route_Route_PerFilterConfigEntry *msg, upb_arena *arena) { - struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_route_Route_PerFilterConfigEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_route_Route_PerFilterConfigEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Struct*)); } /* envoy.api.v2.route.Route.TypedPerFilterConfigEntry */ -UPB_INLINE envoy_api_v2_route_Route_TypedPerFilterConfigEntry *envoy_api_v2_route_Route_TypedPerFilterConfigEntry_new(upb_arena *arena) { - return (envoy_api_v2_route_Route_TypedPerFilterConfigEntry *)upb_msg_new(&envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit, arena); -} -UPB_INLINE envoy_api_v2_route_Route_TypedPerFilterConfigEntry *envoy_api_v2_route_Route_TypedPerFilterConfigEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_Route_TypedPerFilterConfigEntry *ret = envoy_api_v2_route_Route_TypedPerFilterConfigEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_api_v2_route_Route_TypedPerFilterConfigEntry_key(const envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_api_v2_route_Route_TypedPerFilterConfigEntry_serialize(const envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit, arena, len); +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_Route_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg) { + struct google_protobuf_Any* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_route_Route_TypedPerFilterConfigEntry_key(const envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_Route_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_route_Route_TypedPerFilterConfigEntry_set_key(envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_route_Route_TypedPerFilterConfigEntry_set_value(envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_Route_TypedPerFilterConfigEntry_mutable_value(envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg, upb_arena *arena) { - struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_route_Route_TypedPerFilterConfigEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_route_Route_TypedPerFilterConfigEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Any*)); } /* envoy.api.v2.route.WeightedCluster */ UPB_INLINE envoy_api_v2_route_WeightedCluster *envoy_api_v2_route_WeightedCluster_new(upb_arena *arena) { - return (envoy_api_v2_route_WeightedCluster *)upb_msg_new(&envoy_api_v2_route_WeightedCluster_msginit, arena); + return (envoy_api_v2_route_WeightedCluster *)_upb_msg_new(&envoy_api_v2_route_WeightedCluster_msginit, arena); } UPB_INLINE envoy_api_v2_route_WeightedCluster *envoy_api_v2_route_WeightedCluster_parse(const char *buf, size_t size, upb_arena *arena) { @@ -744,10 +651,10 @@ UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight** envoy_api_v2_route return (envoy_api_v2_route_WeightedCluster_ClusterWeight**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight** envoy_api_v2_route_WeightedCluster_resize_clusters(envoy_api_v2_route_WeightedCluster *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_WeightedCluster_ClusterWeight**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_WeightedCluster_ClusterWeight**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_WeightedCluster_ClusterWeight* envoy_api_v2_route_WeightedCluster_add_clusters(envoy_api_v2_route_WeightedCluster *msg, upb_arena *arena) { - struct envoy_api_v2_route_WeightedCluster_ClusterWeight* sub = (struct envoy_api_v2_route_WeightedCluster_ClusterWeight*)upb_msg_new(&envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, arena); + struct envoy_api_v2_route_WeightedCluster_ClusterWeight* sub = (struct envoy_api_v2_route_WeightedCluster_ClusterWeight*)_upb_msg_new(&envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -762,7 +669,7 @@ UPB_INLINE void envoy_api_v2_route_WeightedCluster_set_total_weight(envoy_api_v2 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluster_mutable_total_weight(envoy_api_v2_route_WeightedCluster *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_WeightedCluster_total_weight(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_WeightedCluster_set_total_weight(msg, sub); } @@ -772,7 +679,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluste /* envoy.api.v2.route.WeightedCluster.ClusterWeight */ UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight *envoy_api_v2_route_WeightedCluster_ClusterWeight_new(upb_arena *arena) { - return (envoy_api_v2_route_WeightedCluster_ClusterWeight *)upb_msg_new(&envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, arena); + return (envoy_api_v2_route_WeightedCluster_ClusterWeight *)_upb_msg_new(&envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, arena); } UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight *envoy_api_v2_route_WeightedCluster_ClusterWeight_parse(const char *buf, size_t size, upb_arena *arena) { @@ -789,9 +696,13 @@ UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_WeightedC UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_WeightedCluster_ClusterWeight_request_headers_to_add(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_WeightedCluster_ClusterWeight_response_headers_to_add(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE upb_strview const* envoy_api_v2_route_WeightedCluster_ClusterWeight_response_headers_to_remove(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } -UPB_INLINE const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry* const* envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } +UPB_INLINE size_t envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_size(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 56)); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_get(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(28, 56), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry* envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_next(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); } UPB_INLINE upb_strview const* envoy_api_v2_route_WeightedCluster_ClusterWeight_request_headers_to_remove(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } -UPB_INLINE const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* const* envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } +UPB_INLINE size_t envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_size(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) {return _upb_msg_map_size(msg, UPB_SIZE(36, 72)); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_get(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(36, 72), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_next(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(36, 72), iter); } UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_set_name(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; @@ -802,7 +713,7 @@ UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_set_weight(envo UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_weight(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_WeightedCluster_ClusterWeight_weight(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_WeightedCluster_ClusterWeight_set_weight(msg, sub); } @@ -814,7 +725,7 @@ UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_set_metadata_ma UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_metadata_match(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_route_WeightedCluster_ClusterWeight_metadata_match(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); + sub = (struct envoy_api_v2_core_Metadata*)_upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_WeightedCluster_ClusterWeight_set_metadata_match(msg, sub); } @@ -824,10 +735,10 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Weigh return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_WeightedCluster_ClusterWeight_resize_request_headers_to_add(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_route_WeightedCluster_ClusterWeight_add_request_headers_to_add(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -837,10 +748,10 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_Weigh return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_route_WeightedCluster_ClusterWeight_resize_response_headers_to_add(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_route_WeightedCluster_ClusterWeight_add_response_headers_to_add(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena) { - struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); + struct envoy_api_v2_core_HeaderValueOption* sub = (struct envoy_api_v2_core_HeaderValueOption*)_upb_msg_new(&envoy_api_v2_core_HeaderValueOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -850,119 +761,69 @@ UPB_INLINE upb_strview* envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview* envoy_api_v2_route_WeightedCluster_ClusterWeight_resize_response_headers_to_remove(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_add_response_headers_to_remove(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); -} -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry** envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_per_filter_config(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { - return (envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); -} -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry** envoy_api_v2_route_WeightedCluster_ClusterWeight_resize_per_filter_config(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry* envoy_api_v2_route_WeightedCluster_ClusterWeight_add_per_filter_config(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena) { - struct envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry* sub = (struct envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry*)upb_msg_new(&envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } +UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_clear(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { _upb_msg_map_clear(msg, UPB_SIZE(28, 56)); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_set(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Struct* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(28, 56), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_delete(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(28, 56), &key, 0); } +UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry* envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_nextmutable(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); } UPB_INLINE upb_strview* envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_request_headers_to_remove(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE upb_strview* envoy_api_v2_route_WeightedCluster_ClusterWeight_resize_request_headers_to_remove(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_add_request_headers_to_remove(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); -} -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry** envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_typed_per_filter_config(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { - return (envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); -} -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry** envoy_api_v2_route_WeightedCluster_ClusterWeight_resize_typed_per_filter_config(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* envoy_api_v2_route_WeightedCluster_ClusterWeight_add_typed_per_filter_config(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena) { - struct envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* sub = (struct envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry*)upb_msg_new(&envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; + return _upb_array_append_accessor(msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } +UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_clear(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { _upb_msg_map_clear(msg, UPB_SIZE(36, 72)); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_set(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(36, 72), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_delete(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(36, 72), &key, 0); } +UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_nextmutable(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(36, 72), iter); } /* envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry */ -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_new(upb_arena *arena) { - return (envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *)upb_msg_new(&envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit, arena); -} -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *ret = envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_key(const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_serialize(const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit, arena, len); +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_value(const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg) { + struct google_protobuf_Struct* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_key(const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_value(const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_set_key(envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_set_value(envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_mutable_value(envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg, upb_arena *arena) { - struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Struct*)); } /* envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry */ -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_new(upb_arena *arena) { - return (envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *)upb_msg_new(&envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit, arena); -} -UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *ret = envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_key(const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_serialize(const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit, arena, len); +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg) { + struct google_protobuf_Any* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_key(const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_set_key(envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_set_value(envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_mutable_value(envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg, upb_arena *arena) { - struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); - if (!sub) return NULL; - envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(struct google_protobuf_Any*)); } /* envoy.api.v2.route.RouteMatch */ UPB_INLINE envoy_api_v2_route_RouteMatch *envoy_api_v2_route_RouteMatch_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteMatch *)upb_msg_new(&envoy_api_v2_route_RouteMatch_msginit, arena); + return (envoy_api_v2_route_RouteMatch *)_upb_msg_new(&envoy_api_v2_route_RouteMatch_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteMatch *envoy_api_v2_route_RouteMatch_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1011,7 +872,7 @@ UPB_INLINE void envoy_api_v2_route_RouteMatch_set_case_sensitive(envoy_api_v2_ro UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_mutable_case_sensitive(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteMatch_case_sensitive(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteMatch_set_case_sensitive(msg, sub); } @@ -1021,10 +882,10 @@ UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RouteMatch_muta return (envoy_api_v2_route_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RouteMatch_resize_headers(envoy_api_v2_route_RouteMatch *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_api_v2_route_RouteMatch_add_headers(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { - struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1034,10 +895,10 @@ UPB_INLINE envoy_api_v2_route_QueryParameterMatcher** envoy_api_v2_route_RouteMa return (envoy_api_v2_route_QueryParameterMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE envoy_api_v2_route_QueryParameterMatcher** envoy_api_v2_route_RouteMatch_resize_query_parameters(envoy_api_v2_route_RouteMatch *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_QueryParameterMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_QueryParameterMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_QueryParameterMatcher* envoy_api_v2_route_RouteMatch_add_query_parameters(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { - struct envoy_api_v2_route_QueryParameterMatcher* sub = (struct envoy_api_v2_route_QueryParameterMatcher*)upb_msg_new(&envoy_api_v2_route_QueryParameterMatcher_msginit, arena); + struct envoy_api_v2_route_QueryParameterMatcher* sub = (struct envoy_api_v2_route_QueryParameterMatcher*)_upb_msg_new(&envoy_api_v2_route_QueryParameterMatcher_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1049,7 +910,7 @@ UPB_INLINE void envoy_api_v2_route_RouteMatch_set_grpc(envoy_api_v2_route_RouteM UPB_INLINE struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* envoy_api_v2_route_RouteMatch_mutable_grpc(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* sub = (struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*)envoy_api_v2_route_RouteMatch_grpc(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*)upb_msg_new(&envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, arena); + sub = (struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*)_upb_msg_new(&envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteMatch_set_grpc(msg, sub); } @@ -1061,7 +922,7 @@ UPB_INLINE void envoy_api_v2_route_RouteMatch_set_runtime_fraction(envoy_api_v2_ UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteMatch_mutable_runtime_fraction(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeFractionalPercent* sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)envoy_api_v2_route_RouteMatch_runtime_fraction(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); + sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)_upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteMatch_set_runtime_fraction(msg, sub); } @@ -1073,7 +934,7 @@ UPB_INLINE void envoy_api_v2_route_RouteMatch_set_safe_regex(envoy_api_v2_route_ UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_RouteMatch_mutable_safe_regex(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { struct envoy_type_matcher_RegexMatcher* sub = (struct envoy_type_matcher_RegexMatcher*)envoy_api_v2_route_RouteMatch_safe_regex(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_RegexMatcher*)upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); + sub = (struct envoy_type_matcher_RegexMatcher*)_upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteMatch_set_safe_regex(msg, sub); } @@ -1083,7 +944,7 @@ UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_RouteMatch /* envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions */ UPB_INLINE envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *)upb_msg_new(&envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, arena); + return (envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *)_upb_msg_new(&envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions *envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1099,7 +960,7 @@ UPB_INLINE char *envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_serialize(c /* envoy.api.v2.route.CorsPolicy */ UPB_INLINE envoy_api_v2_route_CorsPolicy *envoy_api_v2_route_CorsPolicy_new(upb_arena *arena) { - return (envoy_api_v2_route_CorsPolicy *)upb_msg_new(&envoy_api_v2_route_CorsPolicy_msginit, arena); + return (envoy_api_v2_route_CorsPolicy *)_upb_msg_new(&envoy_api_v2_route_CorsPolicy_msginit, arena); } UPB_INLINE envoy_api_v2_route_CorsPolicy *envoy_api_v2_route_CorsPolicy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1135,11 +996,11 @@ UPB_INLINE upb_strview* envoy_api_v2_route_CorsPolicy_mutable_allow_origin(envoy return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE upb_strview* envoy_api_v2_route_CorsPolicy_resize_allow_origin(envoy_api_v2_route_CorsPolicy *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_CorsPolicy_add_allow_origin(envoy_api_v2_route_CorsPolicy *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_allow_methods(envoy_api_v2_route_CorsPolicy *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; @@ -1159,7 +1020,7 @@ UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_allow_credentials(envoy_api_v2 UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_CorsPolicy_mutable_allow_credentials(envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_CorsPolicy_allow_credentials(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_CorsPolicy_set_allow_credentials(msg, sub); } @@ -1171,7 +1032,7 @@ UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_enabled(envoy_api_v2_route_Cor UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_CorsPolicy_mutable_enabled(envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_CorsPolicy_enabled(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_CorsPolicy_set_enabled(msg, sub); } @@ -1181,11 +1042,11 @@ UPB_INLINE upb_strview* envoy_api_v2_route_CorsPolicy_mutable_allow_origin_regex return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); } UPB_INLINE upb_strview* envoy_api_v2_route_CorsPolicy_resize_allow_origin_regex(envoy_api_v2_route_CorsPolicy *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_api_v2_route_CorsPolicy_add_allow_origin_regex(envoy_api_v2_route_CorsPolicy *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_filter_enabled(envoy_api_v2_route_CorsPolicy *msg, struct envoy_api_v2_core_RuntimeFractionalPercent* value) { UPB_WRITE_ONEOF(msg, struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 9); @@ -1193,7 +1054,7 @@ UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_filter_enabled(envoy_api_v2_ro UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_CorsPolicy_mutable_filter_enabled(envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeFractionalPercent* sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)envoy_api_v2_route_CorsPolicy_filter_enabled(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); + sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)_upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_CorsPolicy_set_filter_enabled(msg, sub); } @@ -1205,7 +1066,7 @@ UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_shadow_enabled(envoy_api_v2_ro UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_CorsPolicy_mutable_shadow_enabled(envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeFractionalPercent* sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)envoy_api_v2_route_CorsPolicy_shadow_enabled(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); + sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)_upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_CorsPolicy_set_shadow_enabled(msg, sub); } @@ -1215,10 +1076,10 @@ UPB_INLINE struct envoy_type_matcher_StringMatcher** envoy_api_v2_route_CorsPoli return (struct envoy_type_matcher_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len); } UPB_INLINE struct envoy_type_matcher_StringMatcher** envoy_api_v2_route_CorsPolicy_resize_allow_origin_string_match(envoy_api_v2_route_CorsPolicy *msg, size_t len, upb_arena *arena) { - return (struct envoy_type_matcher_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_type_matcher_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_api_v2_route_CorsPolicy_add_allow_origin_string_match(envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena) { - struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)_upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1228,7 +1089,7 @@ UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_api_v2_route_CorsPolic /* envoy.api.v2.route.RouteAction */ UPB_INLINE envoy_api_v2_route_RouteAction *envoy_api_v2_route_RouteAction_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteAction *)upb_msg_new(&envoy_api_v2_route_RouteAction_msginit, arena); + return (envoy_api_v2_route_RouteAction *)_upb_msg_new(&envoy_api_v2_route_RouteAction_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteAction *envoy_api_v2_route_RouteAction_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1297,7 +1158,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_weighted_clusters(envoy_api_v UPB_INLINE struct envoy_api_v2_route_WeightedCluster* envoy_api_v2_route_RouteAction_mutable_weighted_clusters(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_WeightedCluster* sub = (struct envoy_api_v2_route_WeightedCluster*)envoy_api_v2_route_RouteAction_weighted_clusters(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_WeightedCluster*)upb_msg_new(&envoy_api_v2_route_WeightedCluster_msginit, arena); + sub = (struct envoy_api_v2_route_WeightedCluster*)_upb_msg_new(&envoy_api_v2_route_WeightedCluster_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_weighted_clusters(msg, sub); } @@ -1309,7 +1170,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_metadata_match(envoy_api_v2_r UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_route_RouteAction_mutable_metadata_match(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_route_RouteAction_metadata_match(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Metadata*)upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); + sub = (struct envoy_api_v2_core_Metadata*)_upb_msg_new(&envoy_api_v2_core_Metadata_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_metadata_match(msg, sub); } @@ -1327,7 +1188,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_auto_host_rewrite(envoy_api_v UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_mutable_auto_host_rewrite(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteAction_auto_host_rewrite(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_auto_host_rewrite(msg, sub); } @@ -1339,7 +1200,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_timeout(envoy_api_v2_route_Ro UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutable_timeout(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_timeout(msg, sub); } @@ -1351,7 +1212,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_retry_policy(envoy_api_v2_rou UPB_INLINE struct envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_RouteAction_mutable_retry_policy(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_RetryPolicy* sub = (struct envoy_api_v2_route_RetryPolicy*)envoy_api_v2_route_RouteAction_retry_policy(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RetryPolicy*)upb_msg_new(&envoy_api_v2_route_RetryPolicy_msginit, arena); + sub = (struct envoy_api_v2_route_RetryPolicy*)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_retry_policy(msg, sub); } @@ -1363,7 +1224,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_request_mirror_policy(envoy_a UPB_INLINE struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy* envoy_api_v2_route_RouteAction_mutable_request_mirror_policy(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy* sub = (struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy*)envoy_api_v2_route_RouteAction_request_mirror_policy(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy*)upb_msg_new(&envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, arena); + sub = (struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy*)_upb_msg_new(&envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_request_mirror_policy(msg, sub); } @@ -1376,10 +1237,10 @@ UPB_INLINE envoy_api_v2_route_RateLimit** envoy_api_v2_route_RouteAction_mutable return (envoy_api_v2_route_RateLimit**)_upb_array_mutable_accessor(msg, UPB_SIZE(72, 120), len); } UPB_INLINE envoy_api_v2_route_RateLimit** envoy_api_v2_route_RouteAction_resize_rate_limits(envoy_api_v2_route_RouteAction *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_RateLimit**)_upb_array_resize_accessor(msg, UPB_SIZE(72, 120), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_RateLimit**)_upb_array_resize_accessor(msg, UPB_SIZE(72, 120), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_RateLimit* envoy_api_v2_route_RouteAction_add_rate_limits(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { - struct envoy_api_v2_route_RateLimit* sub = (struct envoy_api_v2_route_RateLimit*)upb_msg_new(&envoy_api_v2_route_RateLimit_msginit, arena); + struct envoy_api_v2_route_RateLimit* sub = (struct envoy_api_v2_route_RateLimit*)_upb_msg_new(&envoy_api_v2_route_RateLimit_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(72, 120), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1391,7 +1252,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_include_vh_rate_limits(envoy_ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_mutable_include_vh_rate_limits(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteAction_include_vh_rate_limits(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_include_vh_rate_limits(msg, sub); } @@ -1401,10 +1262,10 @@ UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy** envoy_api_v2_route_RouteA return (envoy_api_v2_route_RouteAction_HashPolicy**)_upb_array_mutable_accessor(msg, UPB_SIZE(76, 128), len); } UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy** envoy_api_v2_route_RouteAction_resize_hash_policy(envoy_api_v2_route_RouteAction *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_RouteAction_HashPolicy**)_upb_array_resize_accessor(msg, UPB_SIZE(76, 128), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_RouteAction_HashPolicy**)_upb_array_resize_accessor(msg, UPB_SIZE(76, 128), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_RouteAction_HashPolicy* envoy_api_v2_route_RouteAction_add_hash_policy(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { - struct envoy_api_v2_route_RouteAction_HashPolicy* sub = (struct envoy_api_v2_route_RouteAction_HashPolicy*)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_msginit, arena); + struct envoy_api_v2_route_RouteAction_HashPolicy* sub = (struct envoy_api_v2_route_RouteAction_HashPolicy*)_upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(76, 128), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1416,7 +1277,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_cors(envoy_api_v2_route_Route UPB_INLINE struct envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_RouteAction_mutable_cors(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_CorsPolicy* sub = (struct envoy_api_v2_route_CorsPolicy*)envoy_api_v2_route_RouteAction_cors(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_CorsPolicy*)upb_msg_new(&envoy_api_v2_route_CorsPolicy_msginit, arena); + sub = (struct envoy_api_v2_route_CorsPolicy*)_upb_msg_new(&envoy_api_v2_route_CorsPolicy_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_cors(msg, sub); } @@ -1431,7 +1292,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_max_grpc_timeout(envoy_api_v2 UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutable_max_grpc_timeout(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_max_grpc_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_max_grpc_timeout(msg, sub); } @@ -1443,7 +1304,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_idle_timeout(envoy_api_v2_rou UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutable_idle_timeout(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_idle_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_idle_timeout(msg, sub); } @@ -1453,10 +1314,10 @@ UPB_INLINE envoy_api_v2_route_RouteAction_UpgradeConfig** envoy_api_v2_route_Rou return (envoy_api_v2_route_RouteAction_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(80, 136), len); } UPB_INLINE envoy_api_v2_route_RouteAction_UpgradeConfig** envoy_api_v2_route_RouteAction_resize_upgrade_configs(envoy_api_v2_route_RouteAction *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_RouteAction_UpgradeConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(80, 136), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_RouteAction_UpgradeConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(80, 136), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_RouteAction_UpgradeConfig* envoy_api_v2_route_RouteAction_add_upgrade_configs(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { - struct envoy_api_v2_route_RouteAction_UpgradeConfig* sub = (struct envoy_api_v2_route_RouteAction_UpgradeConfig*)upb_msg_new(&envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, arena); + struct envoy_api_v2_route_RouteAction_UpgradeConfig* sub = (struct envoy_api_v2_route_RouteAction_UpgradeConfig*)_upb_msg_new(&envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(80, 136), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1471,7 +1332,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_hedge_policy(envoy_api_v2_rou UPB_INLINE struct envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_RouteAction_mutable_hedge_policy(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_HedgePolicy* sub = (struct envoy_api_v2_route_HedgePolicy*)envoy_api_v2_route_RouteAction_hedge_policy(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_HedgePolicy*)upb_msg_new(&envoy_api_v2_route_HedgePolicy_msginit, arena); + sub = (struct envoy_api_v2_route_HedgePolicy*)_upb_msg_new(&envoy_api_v2_route_HedgePolicy_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_hedge_policy(msg, sub); } @@ -1483,7 +1344,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_grpc_timeout_offset(envoy_api UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutable_grpc_timeout_offset(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_grpc_timeout_offset(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_set_grpc_timeout_offset(msg, sub); } @@ -1496,7 +1357,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_set_auto_host_rewrite_header(envo /* envoy.api.v2.route.RouteAction.RequestMirrorPolicy */ UPB_INLINE envoy_api_v2_route_RouteAction_RequestMirrorPolicy *envoy_api_v2_route_RouteAction_RequestMirrorPolicy_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteAction_RequestMirrorPolicy *)upb_msg_new(&envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, arena); + return (envoy_api_v2_route_RouteAction_RequestMirrorPolicy *)_upb_msg_new(&envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteAction_RequestMirrorPolicy *envoy_api_v2_route_RouteAction_RequestMirrorPolicy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1523,7 +1384,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_RequestMirrorPolicy_set_runtime_f UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteAction_RequestMirrorPolicy_mutable_runtime_fraction(envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeFractionalPercent* sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)envoy_api_v2_route_RouteAction_RequestMirrorPolicy_runtime_fraction(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); + sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)_upb_msg_new(&envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_RequestMirrorPolicy_set_runtime_fraction(msg, sub); } @@ -1533,7 +1394,7 @@ UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route /* envoy.api.v2.route.RouteAction.HashPolicy */ UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy *envoy_api_v2_route_RouteAction_HashPolicy_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteAction_HashPolicy *)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_msginit, arena); + return (envoy_api_v2_route_RouteAction_HashPolicy *)_upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy *envoy_api_v2_route_RouteAction_HashPolicy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1566,7 +1427,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_header(envoy_api_v UPB_INLINE struct envoy_api_v2_route_RouteAction_HashPolicy_Header* envoy_api_v2_route_RouteAction_HashPolicy_mutable_header(envoy_api_v2_route_RouteAction_HashPolicy *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteAction_HashPolicy_Header* sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_Header*)envoy_api_v2_route_RouteAction_HashPolicy_header(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_Header*)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, arena); + sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_Header*)_upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_HashPolicy_set_header(msg, sub); } @@ -1578,7 +1439,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_cookie(envoy_api_v UPB_INLINE struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie* envoy_api_v2_route_RouteAction_HashPolicy_mutable_cookie(envoy_api_v2_route_RouteAction_HashPolicy *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie* sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie*)envoy_api_v2_route_RouteAction_HashPolicy_cookie(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie*)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, arena); + sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_Cookie*)_upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_HashPolicy_set_cookie(msg, sub); } @@ -1590,7 +1451,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_connection_propert UPB_INLINE struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties* envoy_api_v2_route_RouteAction_HashPolicy_mutable_connection_properties(envoy_api_v2_route_RouteAction_HashPolicy *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties* sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties*)envoy_api_v2_route_RouteAction_HashPolicy_connection_properties(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties*)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, arena); + sub = (struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties*)_upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_HashPolicy_set_connection_properties(msg, sub); } @@ -1603,7 +1464,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_terminal(envoy_api /* envoy.api.v2.route.RouteAction.HashPolicy.Header */ UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_Header *envoy_api_v2_route_RouteAction_HashPolicy_Header_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteAction_HashPolicy_Header *)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, arena); + return (envoy_api_v2_route_RouteAction_HashPolicy_Header *)_upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_Header *envoy_api_v2_route_RouteAction_HashPolicy_Header_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1623,7 +1484,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_Header_set_header_name /* envoy.api.v2.route.RouteAction.HashPolicy.Cookie */ UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_Cookie *envoy_api_v2_route_RouteAction_HashPolicy_Cookie_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteAction_HashPolicy_Cookie *)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, arena); + return (envoy_api_v2_route_RouteAction_HashPolicy_Cookie *)_upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_Cookie *envoy_api_v2_route_RouteAction_HashPolicy_Cookie_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1647,7 +1508,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_Cookie_set_ttl(envoy_a UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_HashPolicy_Cookie_mutable_ttl(envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_HashPolicy_Cookie_ttl(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_HashPolicy_Cookie_set_ttl(msg, sub); } @@ -1660,7 +1521,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_Cookie_set_path(envoy_ /* envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties */ UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *)upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, arena); + return (envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *)_upb_msg_new(&envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1680,7 +1541,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_s /* envoy.api.v2.route.RouteAction.UpgradeConfig */ UPB_INLINE envoy_api_v2_route_RouteAction_UpgradeConfig *envoy_api_v2_route_RouteAction_UpgradeConfig_new(upb_arena *arena) { - return (envoy_api_v2_route_RouteAction_UpgradeConfig *)upb_msg_new(&envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, arena); + return (envoy_api_v2_route_RouteAction_UpgradeConfig *)_upb_msg_new(&envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, arena); } UPB_INLINE envoy_api_v2_route_RouteAction_UpgradeConfig *envoy_api_v2_route_RouteAction_UpgradeConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1703,7 +1564,7 @@ UPB_INLINE void envoy_api_v2_route_RouteAction_UpgradeConfig_set_enabled(envoy_a UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_UpgradeConfig_mutable_enabled(envoy_api_v2_route_RouteAction_UpgradeConfig *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteAction_UpgradeConfig_enabled(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RouteAction_UpgradeConfig_set_enabled(msg, sub); } @@ -1713,7 +1574,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_Upgr /* envoy.api.v2.route.RetryPolicy */ UPB_INLINE envoy_api_v2_route_RetryPolicy *envoy_api_v2_route_RetryPolicy_new(upb_arena *arena) { - return (envoy_api_v2_route_RetryPolicy *)upb_msg_new(&envoy_api_v2_route_RetryPolicy_msginit, arena); + return (envoy_api_v2_route_RetryPolicy *)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_msginit, arena); } UPB_INLINE envoy_api_v2_route_RetryPolicy *envoy_api_v2_route_RetryPolicy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1744,7 +1605,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_num_retries(envoy_api_v2_rout UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_RetryPolicy_mutable_num_retries(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_RetryPolicy_num_retries(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_set_num_retries(msg, sub); } @@ -1756,7 +1617,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_per_try_timeout(envoy_api_v2_ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_mutable_per_try_timeout(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RetryPolicy_per_try_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_set_per_try_timeout(msg, sub); } @@ -1768,7 +1629,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_retry_priority(envoy_api_v2_r UPB_INLINE struct envoy_api_v2_route_RetryPolicy_RetryPriority* envoy_api_v2_route_RetryPolicy_mutable_retry_priority(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { struct envoy_api_v2_route_RetryPolicy_RetryPriority* sub = (struct envoy_api_v2_route_RetryPolicy_RetryPriority*)envoy_api_v2_route_RetryPolicy_retry_priority(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RetryPolicy_RetryPriority*)upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, arena); + sub = (struct envoy_api_v2_route_RetryPolicy_RetryPriority*)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_set_retry_priority(msg, sub); } @@ -1778,10 +1639,10 @@ UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate** envoy_api_v2_rout return (envoy_api_v2_route_RetryPolicy_RetryHostPredicate**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len); } UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate** envoy_api_v2_route_RetryPolicy_resize_retry_host_predicate(envoy_api_v2_route_RetryPolicy *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_RetryPolicy_RetryHostPredicate**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_RetryPolicy_RetryHostPredicate**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate* envoy_api_v2_route_RetryPolicy_add_retry_host_predicate(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { - struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate* sub = (struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate*)upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, arena); + struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate* sub = (struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate*)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1794,11 +1655,11 @@ UPB_INLINE uint32_t* envoy_api_v2_route_RetryPolicy_mutable_retriable_status_cod return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len); } UPB_INLINE uint32_t* envoy_api_v2_route_RetryPolicy_resize_retriable_status_codes(envoy_api_v2_route_RetryPolicy *msg, size_t len, upb_arena *arena) { - return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_TYPE_UINT32, arena); } UPB_INLINE bool envoy_api_v2_route_RetryPolicy_add_retriable_status_codes(envoy_api_v2_route_RetryPolicy *msg, uint32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(36, 64), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(36, 64), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, + arena); } UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_retry_back_off(envoy_api_v2_route_RetryPolicy *msg, envoy_api_v2_route_RetryPolicy_RetryBackOff* value) { UPB_FIELD_AT(msg, envoy_api_v2_route_RetryPolicy_RetryBackOff*, UPB_SIZE(28, 48)) = value; @@ -1806,7 +1667,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_retry_back_off(envoy_api_v2_r UPB_INLINE struct envoy_api_v2_route_RetryPolicy_RetryBackOff* envoy_api_v2_route_RetryPolicy_mutable_retry_back_off(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { struct envoy_api_v2_route_RetryPolicy_RetryBackOff* sub = (struct envoy_api_v2_route_RetryPolicy_RetryBackOff*)envoy_api_v2_route_RetryPolicy_retry_back_off(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RetryPolicy_RetryBackOff*)upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, arena); + sub = (struct envoy_api_v2_route_RetryPolicy_RetryBackOff*)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_set_retry_back_off(msg, sub); } @@ -1816,10 +1677,10 @@ UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RetryPolicy_mut return (envoy_api_v2_route_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len); } UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RetryPolicy_resize_retriable_headers(envoy_api_v2_route_RetryPolicy *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_api_v2_route_RetryPolicy_add_retriable_headers(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { - struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(40, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1829,10 +1690,10 @@ UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RetryPolicy_mut return (envoy_api_v2_route_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len); } UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RetryPolicy_resize_retriable_request_headers(envoy_api_v2_route_RetryPolicy *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_api_v2_route_RetryPolicy_add_retriable_request_headers(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { - struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1842,7 +1703,7 @@ UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_api_v2_route_RetryPoli /* envoy.api.v2.route.RetryPolicy.RetryPriority */ UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryPriority *envoy_api_v2_route_RetryPolicy_RetryPriority_new(upb_arena *arena) { - return (envoy_api_v2_route_RetryPolicy_RetryPriority *)upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, arena); + return (envoy_api_v2_route_RetryPolicy_RetryPriority *)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, arena); } UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryPriority *envoy_api_v2_route_RetryPolicy_RetryPriority_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1875,7 +1736,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryPriority_set_config(envoy_ap UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_route_RetryPolicy_RetryPriority_mutable_config(envoy_api_v2_route_RetryPolicy_RetryPriority *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_route_RetryPolicy_RetryPriority_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_RetryPriority_set_config(msg, sub); } @@ -1887,7 +1748,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryPriority_set_typed_config(en UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_RetryPolicy_RetryPriority_mutable_typed_config(envoy_api_v2_route_RetryPolicy_RetryPriority *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_route_RetryPolicy_RetryPriority_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_RetryPriority_set_typed_config(msg, sub); } @@ -1897,7 +1758,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_RetryPolicy_RetryPrior /* envoy.api.v2.route.RetryPolicy.RetryHostPredicate */ UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate *envoy_api_v2_route_RetryPolicy_RetryHostPredicate_new(upb_arena *arena) { - return (envoy_api_v2_route_RetryPolicy_RetryHostPredicate *)upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, arena); + return (envoy_api_v2_route_RetryPolicy_RetryHostPredicate *)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, arena); } UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate *envoy_api_v2_route_RetryPolicy_RetryHostPredicate_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1930,7 +1791,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_config(env UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_route_RetryPolicy_RetryHostPredicate_mutable_config(envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_config(msg, sub); } @@ -1942,7 +1803,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_typed_conf UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_RetryPolicy_RetryHostPredicate_mutable_typed_config(envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_route_RetryPolicy_RetryHostPredicate_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_typed_config(msg, sub); } @@ -1952,7 +1813,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_RetryPolicy_RetryHostP /* envoy.api.v2.route.RetryPolicy.RetryBackOff */ UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryBackOff *envoy_api_v2_route_RetryPolicy_RetryBackOff_new(upb_arena *arena) { - return (envoy_api_v2_route_RetryPolicy_RetryBackOff *)upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, arena); + return (envoy_api_v2_route_RetryPolicy_RetryBackOff *)_upb_msg_new(&envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, arena); } UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryBackOff *envoy_api_v2_route_RetryPolicy_RetryBackOff_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1972,7 +1833,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryBackOff_set_base_interval(en UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_RetryBackOff_mutable_base_interval(envoy_api_v2_route_RetryPolicy_RetryBackOff *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RetryPolicy_RetryBackOff_base_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_RetryBackOff_set_base_interval(msg, sub); } @@ -1984,7 +1845,7 @@ UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryBackOff_set_max_interval(env UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_RetryBackOff_mutable_max_interval(envoy_api_v2_route_RetryPolicy_RetryBackOff *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RetryPolicy_RetryBackOff_max_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RetryPolicy_RetryBackOff_set_max_interval(msg, sub); } @@ -1994,7 +1855,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_Retry /* envoy.api.v2.route.HedgePolicy */ UPB_INLINE envoy_api_v2_route_HedgePolicy *envoy_api_v2_route_HedgePolicy_new(upb_arena *arena) { - return (envoy_api_v2_route_HedgePolicy *)upb_msg_new(&envoy_api_v2_route_HedgePolicy_msginit, arena); + return (envoy_api_v2_route_HedgePolicy *)_upb_msg_new(&envoy_api_v2_route_HedgePolicy_msginit, arena); } UPB_INLINE envoy_api_v2_route_HedgePolicy *envoy_api_v2_route_HedgePolicy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2015,7 +1876,7 @@ UPB_INLINE void envoy_api_v2_route_HedgePolicy_set_initial_requests(envoy_api_v2 UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_HedgePolicy_mutable_initial_requests(envoy_api_v2_route_HedgePolicy *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_HedgePolicy_initial_requests(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_HedgePolicy_set_initial_requests(msg, sub); } @@ -2027,7 +1888,7 @@ UPB_INLINE void envoy_api_v2_route_HedgePolicy_set_additional_request_chance(env UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_HedgePolicy_mutable_additional_request_chance(envoy_api_v2_route_HedgePolicy *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_route_HedgePolicy_additional_request_chance(msg); if (sub == NULL) { - sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + sub = (struct envoy_type_FractionalPercent*)_upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_HedgePolicy_set_additional_request_chance(msg, sub); } @@ -2040,7 +1901,7 @@ UPB_INLINE void envoy_api_v2_route_HedgePolicy_set_hedge_on_per_try_timeout(envo /* envoy.api.v2.route.RedirectAction */ UPB_INLINE envoy_api_v2_route_RedirectAction *envoy_api_v2_route_RedirectAction_new(upb_arena *arena) { - return (envoy_api_v2_route_RedirectAction *)upb_msg_new(&envoy_api_v2_route_RedirectAction_msginit, arena); + return (envoy_api_v2_route_RedirectAction *)_upb_msg_new(&envoy_api_v2_route_RedirectAction_msginit, arena); } UPB_INLINE envoy_api_v2_route_RedirectAction *envoy_api_v2_route_RedirectAction_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2106,7 +1967,7 @@ UPB_INLINE void envoy_api_v2_route_RedirectAction_set_port_redirect(envoy_api_v2 /* envoy.api.v2.route.DirectResponseAction */ UPB_INLINE envoy_api_v2_route_DirectResponseAction *envoy_api_v2_route_DirectResponseAction_new(upb_arena *arena) { - return (envoy_api_v2_route_DirectResponseAction *)upb_msg_new(&envoy_api_v2_route_DirectResponseAction_msginit, arena); + return (envoy_api_v2_route_DirectResponseAction *)_upb_msg_new(&envoy_api_v2_route_DirectResponseAction_msginit, arena); } UPB_INLINE envoy_api_v2_route_DirectResponseAction *envoy_api_v2_route_DirectResponseAction_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2129,7 +1990,7 @@ UPB_INLINE void envoy_api_v2_route_DirectResponseAction_set_body(envoy_api_v2_ro UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_route_DirectResponseAction_mutable_body(envoy_api_v2_route_DirectResponseAction *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_route_DirectResponseAction_body(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_DataSource*)upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); + sub = (struct envoy_api_v2_core_DataSource*)_upb_msg_new(&envoy_api_v2_core_DataSource_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_DirectResponseAction_set_body(msg, sub); } @@ -2139,7 +2000,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_route_DirectRespons /* envoy.api.v2.route.Decorator */ UPB_INLINE envoy_api_v2_route_Decorator *envoy_api_v2_route_Decorator_new(upb_arena *arena) { - return (envoy_api_v2_route_Decorator *)upb_msg_new(&envoy_api_v2_route_Decorator_msginit, arena); + return (envoy_api_v2_route_Decorator *)_upb_msg_new(&envoy_api_v2_route_Decorator_msginit, arena); } UPB_INLINE envoy_api_v2_route_Decorator *envoy_api_v2_route_Decorator_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2159,7 +2020,7 @@ UPB_INLINE void envoy_api_v2_route_Decorator_set_operation(envoy_api_v2_route_De /* envoy.api.v2.route.Tracing */ UPB_INLINE envoy_api_v2_route_Tracing *envoy_api_v2_route_Tracing_new(upb_arena *arena) { - return (envoy_api_v2_route_Tracing *)upb_msg_new(&envoy_api_v2_route_Tracing_msginit, arena); + return (envoy_api_v2_route_Tracing *)_upb_msg_new(&envoy_api_v2_route_Tracing_msginit, arena); } UPB_INLINE envoy_api_v2_route_Tracing *envoy_api_v2_route_Tracing_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2180,7 +2041,7 @@ UPB_INLINE void envoy_api_v2_route_Tracing_set_client_sampling(envoy_api_v2_rout UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutable_client_sampling(envoy_api_v2_route_Tracing *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_route_Tracing_client_sampling(msg); if (sub == NULL) { - sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + sub = (struct envoy_type_FractionalPercent*)_upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Tracing_set_client_sampling(msg, sub); } @@ -2192,7 +2053,7 @@ UPB_INLINE void envoy_api_v2_route_Tracing_set_random_sampling(envoy_api_v2_rout UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutable_random_sampling(envoy_api_v2_route_Tracing *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_route_Tracing_random_sampling(msg); if (sub == NULL) { - sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + sub = (struct envoy_type_FractionalPercent*)_upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Tracing_set_random_sampling(msg, sub); } @@ -2204,7 +2065,7 @@ UPB_INLINE void envoy_api_v2_route_Tracing_set_overall_sampling(envoy_api_v2_rou UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutable_overall_sampling(envoy_api_v2_route_Tracing *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_route_Tracing_overall_sampling(msg); if (sub == NULL) { - sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + sub = (struct envoy_type_FractionalPercent*)_upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_Tracing_set_overall_sampling(msg, sub); } @@ -2214,7 +2075,7 @@ UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutab /* envoy.api.v2.route.VirtualCluster */ UPB_INLINE envoy_api_v2_route_VirtualCluster *envoy_api_v2_route_VirtualCluster_new(upb_arena *arena) { - return (envoy_api_v2_route_VirtualCluster *)upb_msg_new(&envoy_api_v2_route_VirtualCluster_msginit, arena); + return (envoy_api_v2_route_VirtualCluster *)_upb_msg_new(&envoy_api_v2_route_VirtualCluster_msginit, arena); } UPB_INLINE envoy_api_v2_route_VirtualCluster *envoy_api_v2_route_VirtualCluster_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2243,10 +2104,10 @@ UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_VirtualCluster_ return (envoy_api_v2_route_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len); } UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_VirtualCluster_resize_headers(envoy_api_v2_route_VirtualCluster *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_api_v2_route_VirtualCluster_add_headers(envoy_api_v2_route_VirtualCluster *msg, upb_arena *arena) { - struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(24, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -2256,7 +2117,7 @@ UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_api_v2_route_VirtualCl /* envoy.api.v2.route.RateLimit */ UPB_INLINE envoy_api_v2_route_RateLimit *envoy_api_v2_route_RateLimit_new(upb_arena *arena) { - return (envoy_api_v2_route_RateLimit *)upb_msg_new(&envoy_api_v2_route_RateLimit_msginit, arena); + return (envoy_api_v2_route_RateLimit *)_upb_msg_new(&envoy_api_v2_route_RateLimit_msginit, arena); } UPB_INLINE envoy_api_v2_route_RateLimit *envoy_api_v2_route_RateLimit_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2277,7 +2138,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_set_stage(envoy_api_v2_route_RateLi UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_RateLimit_mutable_stage(envoy_api_v2_route_RateLimit *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_RateLimit_stage(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RateLimit_set_stage(msg, sub); } @@ -2290,10 +2151,10 @@ UPB_INLINE envoy_api_v2_route_RateLimit_Action** envoy_api_v2_route_RateLimit_mu return (envoy_api_v2_route_RateLimit_Action**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE envoy_api_v2_route_RateLimit_Action** envoy_api_v2_route_RateLimit_resize_actions(envoy_api_v2_route_RateLimit *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_RateLimit_Action**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_RateLimit_Action**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_RateLimit_Action* envoy_api_v2_route_RateLimit_add_actions(envoy_api_v2_route_RateLimit *msg, upb_arena *arena) { - struct envoy_api_v2_route_RateLimit_Action* sub = (struct envoy_api_v2_route_RateLimit_Action*)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_msginit, arena); + struct envoy_api_v2_route_RateLimit_Action* sub = (struct envoy_api_v2_route_RateLimit_Action*)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -2303,7 +2164,7 @@ UPB_INLINE struct envoy_api_v2_route_RateLimit_Action* envoy_api_v2_route_RateLi /* envoy.api.v2.route.RateLimit.Action */ UPB_INLINE envoy_api_v2_route_RateLimit_Action *envoy_api_v2_route_RateLimit_Action_new(upb_arena *arena) { - return (envoy_api_v2_route_RateLimit_Action *)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_msginit, arena); + return (envoy_api_v2_route_RateLimit_Action *)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_msginit, arena); } UPB_INLINE envoy_api_v2_route_RateLimit_Action *envoy_api_v2_route_RateLimit_Action_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2344,7 +2205,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_source_cluster(envoy_api UPB_INLINE struct envoy_api_v2_route_RateLimit_Action_SourceCluster* envoy_api_v2_route_RateLimit_Action_mutable_source_cluster(envoy_api_v2_route_RateLimit_Action *msg, upb_arena *arena) { struct envoy_api_v2_route_RateLimit_Action_SourceCluster* sub = (struct envoy_api_v2_route_RateLimit_Action_SourceCluster*)envoy_api_v2_route_RateLimit_Action_source_cluster(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RateLimit_Action_SourceCluster*)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, arena); + sub = (struct envoy_api_v2_route_RateLimit_Action_SourceCluster*)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RateLimit_Action_set_source_cluster(msg, sub); } @@ -2356,7 +2217,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_destination_cluster(envo UPB_INLINE struct envoy_api_v2_route_RateLimit_Action_DestinationCluster* envoy_api_v2_route_RateLimit_Action_mutable_destination_cluster(envoy_api_v2_route_RateLimit_Action *msg, upb_arena *arena) { struct envoy_api_v2_route_RateLimit_Action_DestinationCluster* sub = (struct envoy_api_v2_route_RateLimit_Action_DestinationCluster*)envoy_api_v2_route_RateLimit_Action_destination_cluster(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RateLimit_Action_DestinationCluster*)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, arena); + sub = (struct envoy_api_v2_route_RateLimit_Action_DestinationCluster*)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RateLimit_Action_set_destination_cluster(msg, sub); } @@ -2368,7 +2229,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_request_headers(envoy_ap UPB_INLINE struct envoy_api_v2_route_RateLimit_Action_RequestHeaders* envoy_api_v2_route_RateLimit_Action_mutable_request_headers(envoy_api_v2_route_RateLimit_Action *msg, upb_arena *arena) { struct envoy_api_v2_route_RateLimit_Action_RequestHeaders* sub = (struct envoy_api_v2_route_RateLimit_Action_RequestHeaders*)envoy_api_v2_route_RateLimit_Action_request_headers(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RateLimit_Action_RequestHeaders*)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, arena); + sub = (struct envoy_api_v2_route_RateLimit_Action_RequestHeaders*)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RateLimit_Action_set_request_headers(msg, sub); } @@ -2380,7 +2241,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_remote_address(envoy_api UPB_INLINE struct envoy_api_v2_route_RateLimit_Action_RemoteAddress* envoy_api_v2_route_RateLimit_Action_mutable_remote_address(envoy_api_v2_route_RateLimit_Action *msg, upb_arena *arena) { struct envoy_api_v2_route_RateLimit_Action_RemoteAddress* sub = (struct envoy_api_v2_route_RateLimit_Action_RemoteAddress*)envoy_api_v2_route_RateLimit_Action_remote_address(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RateLimit_Action_RemoteAddress*)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, arena); + sub = (struct envoy_api_v2_route_RateLimit_Action_RemoteAddress*)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RateLimit_Action_set_remote_address(msg, sub); } @@ -2392,7 +2253,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_generic_key(envoy_api_v2 UPB_INLINE struct envoy_api_v2_route_RateLimit_Action_GenericKey* envoy_api_v2_route_RateLimit_Action_mutable_generic_key(envoy_api_v2_route_RateLimit_Action *msg, upb_arena *arena) { struct envoy_api_v2_route_RateLimit_Action_GenericKey* sub = (struct envoy_api_v2_route_RateLimit_Action_GenericKey*)envoy_api_v2_route_RateLimit_Action_generic_key(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RateLimit_Action_GenericKey*)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, arena); + sub = (struct envoy_api_v2_route_RateLimit_Action_GenericKey*)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RateLimit_Action_set_generic_key(msg, sub); } @@ -2404,7 +2265,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_header_value_match(envoy UPB_INLINE struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch* envoy_api_v2_route_RateLimit_Action_mutable_header_value_match(envoy_api_v2_route_RateLimit_Action *msg, upb_arena *arena) { struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch* sub = (struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch*)envoy_api_v2_route_RateLimit_Action_header_value_match(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch*)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, arena); + sub = (struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch*)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RateLimit_Action_set_header_value_match(msg, sub); } @@ -2414,7 +2275,7 @@ UPB_INLINE struct envoy_api_v2_route_RateLimit_Action_HeaderValueMatch* envoy_ap /* envoy.api.v2.route.RateLimit.Action.SourceCluster */ UPB_INLINE envoy_api_v2_route_RateLimit_Action_SourceCluster *envoy_api_v2_route_RateLimit_Action_SourceCluster_new(upb_arena *arena) { - return (envoy_api_v2_route_RateLimit_Action_SourceCluster *)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, arena); + return (envoy_api_v2_route_RateLimit_Action_SourceCluster *)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, arena); } UPB_INLINE envoy_api_v2_route_RateLimit_Action_SourceCluster *envoy_api_v2_route_RateLimit_Action_SourceCluster_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2430,7 +2291,7 @@ UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_SourceCluster_serialize(con /* envoy.api.v2.route.RateLimit.Action.DestinationCluster */ UPB_INLINE envoy_api_v2_route_RateLimit_Action_DestinationCluster *envoy_api_v2_route_RateLimit_Action_DestinationCluster_new(upb_arena *arena) { - return (envoy_api_v2_route_RateLimit_Action_DestinationCluster *)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, arena); + return (envoy_api_v2_route_RateLimit_Action_DestinationCluster *)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, arena); } UPB_INLINE envoy_api_v2_route_RateLimit_Action_DestinationCluster *envoy_api_v2_route_RateLimit_Action_DestinationCluster_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2446,7 +2307,7 @@ UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_DestinationCluster_serializ /* envoy.api.v2.route.RateLimit.Action.RequestHeaders */ UPB_INLINE envoy_api_v2_route_RateLimit_Action_RequestHeaders *envoy_api_v2_route_RateLimit_Action_RequestHeaders_new(upb_arena *arena) { - return (envoy_api_v2_route_RateLimit_Action_RequestHeaders *)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, arena); + return (envoy_api_v2_route_RateLimit_Action_RequestHeaders *)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, arena); } UPB_INLINE envoy_api_v2_route_RateLimit_Action_RequestHeaders *envoy_api_v2_route_RateLimit_Action_RequestHeaders_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2470,7 +2331,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_RequestHeaders_set_descripto /* envoy.api.v2.route.RateLimit.Action.RemoteAddress */ UPB_INLINE envoy_api_v2_route_RateLimit_Action_RemoteAddress *envoy_api_v2_route_RateLimit_Action_RemoteAddress_new(upb_arena *arena) { - return (envoy_api_v2_route_RateLimit_Action_RemoteAddress *)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, arena); + return (envoy_api_v2_route_RateLimit_Action_RemoteAddress *)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, arena); } UPB_INLINE envoy_api_v2_route_RateLimit_Action_RemoteAddress *envoy_api_v2_route_RateLimit_Action_RemoteAddress_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2486,7 +2347,7 @@ UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_RemoteAddress_serialize(con /* envoy.api.v2.route.RateLimit.Action.GenericKey */ UPB_INLINE envoy_api_v2_route_RateLimit_Action_GenericKey *envoy_api_v2_route_RateLimit_Action_GenericKey_new(upb_arena *arena) { - return (envoy_api_v2_route_RateLimit_Action_GenericKey *)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, arena); + return (envoy_api_v2_route_RateLimit_Action_GenericKey *)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, arena); } UPB_INLINE envoy_api_v2_route_RateLimit_Action_GenericKey *envoy_api_v2_route_RateLimit_Action_GenericKey_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2506,7 +2367,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_GenericKey_set_descriptor_va /* envoy.api.v2.route.RateLimit.Action.HeaderValueMatch */ UPB_INLINE envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_new(upb_arena *arena) { - return (envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *)upb_msg_new(&envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, arena); + return (envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *)_upb_msg_new(&envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, arena); } UPB_INLINE envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2530,7 +2391,7 @@ UPB_INLINE void envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_set_expect_ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_mutable_expect_match(envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_expect_match(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_set_expect_match(msg, sub); } @@ -2540,10 +2401,10 @@ UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RateLimit_Actio return (envoy_api_v2_route_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_resize_headers(envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_route_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_add_headers(envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, upb_arena *arena) { - struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -2553,7 +2414,7 @@ UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_api_v2_route_RateLimit /* envoy.api.v2.route.HeaderMatcher */ UPB_INLINE envoy_api_v2_route_HeaderMatcher *envoy_api_v2_route_HeaderMatcher_new(upb_arena *arena) { - return (envoy_api_v2_route_HeaderMatcher *)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + return (envoy_api_v2_route_HeaderMatcher *)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); } UPB_INLINE envoy_api_v2_route_HeaderMatcher *envoy_api_v2_route_HeaderMatcher_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2608,7 +2469,7 @@ UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_range_match(envoy_api_v2_ro UPB_INLINE struct envoy_type_Int64Range* envoy_api_v2_route_HeaderMatcher_mutable_range_match(envoy_api_v2_route_HeaderMatcher *msg, upb_arena *arena) { struct envoy_type_Int64Range* sub = (struct envoy_type_Int64Range*)envoy_api_v2_route_HeaderMatcher_range_match(msg); if (sub == NULL) { - sub = (struct envoy_type_Int64Range*)upb_msg_new(&envoy_type_Int64Range_msginit, arena); + sub = (struct envoy_type_Int64Range*)_upb_msg_new(&envoy_type_Int64Range_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_HeaderMatcher_set_range_match(msg, sub); } @@ -2632,7 +2493,7 @@ UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_safe_regex_match(envoy_api_ UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_HeaderMatcher_mutable_safe_regex_match(envoy_api_v2_route_HeaderMatcher *msg, upb_arena *arena) { struct envoy_type_matcher_RegexMatcher* sub = (struct envoy_type_matcher_RegexMatcher*)envoy_api_v2_route_HeaderMatcher_safe_regex_match(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_RegexMatcher*)upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); + sub = (struct envoy_type_matcher_RegexMatcher*)_upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_HeaderMatcher_set_safe_regex_match(msg, sub); } @@ -2642,7 +2503,7 @@ UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_HeaderMatc /* envoy.api.v2.route.QueryParameterMatcher */ UPB_INLINE envoy_api_v2_route_QueryParameterMatcher *envoy_api_v2_route_QueryParameterMatcher_new(upb_arena *arena) { - return (envoy_api_v2_route_QueryParameterMatcher *)upb_msg_new(&envoy_api_v2_route_QueryParameterMatcher_msginit, arena); + return (envoy_api_v2_route_QueryParameterMatcher *)_upb_msg_new(&envoy_api_v2_route_QueryParameterMatcher_msginit, arena); } UPB_INLINE envoy_api_v2_route_QueryParameterMatcher *envoy_api_v2_route_QueryParameterMatcher_parse(const char *buf, size_t size, upb_arena *arena) { @@ -2680,7 +2541,7 @@ UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_regex(envoy_api_v2_ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_QueryParameterMatcher_mutable_regex(envoy_api_v2_route_QueryParameterMatcher *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_QueryParameterMatcher_regex(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_QueryParameterMatcher_set_regex(msg, sub); } @@ -2692,7 +2553,7 @@ UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_string_match(envoy_ UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_api_v2_route_QueryParameterMatcher_mutable_string_match(envoy_api_v2_route_QueryParameterMatcher *msg, upb_arena *arena) { struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)envoy_api_v2_route_QueryParameterMatcher_string_match(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + sub = (struct envoy_type_matcher_StringMatcher*)_upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); if (!sub) return NULL; envoy_api_v2_route_QueryParameterMatcher_set_string_match(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h b/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h index 2c19cff388f..8f31caa8d32 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_API_V2_SRDS_PROTO_UPB_H_ #define ENVOY_API_V2_SRDS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -34,7 +33,7 @@ extern const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_ms /* envoy.api.v2.ScopedRouteConfiguration */ UPB_INLINE envoy_api_v2_ScopedRouteConfiguration *envoy_api_v2_ScopedRouteConfiguration_new(upb_arena *arena) { - return (envoy_api_v2_ScopedRouteConfiguration *)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_msginit, arena); + return (envoy_api_v2_ScopedRouteConfiguration *)_upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_msginit, arena); } UPB_INLINE envoy_api_v2_ScopedRouteConfiguration *envoy_api_v2_ScopedRouteConfiguration_parse(const char *buf, size_t size, upb_arena *arena) { @@ -61,7 +60,7 @@ UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_set_key(envoy_api_v2_Scope UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration_Key* envoy_api_v2_ScopedRouteConfiguration_mutable_key(envoy_api_v2_ScopedRouteConfiguration *msg, upb_arena *arena) { struct envoy_api_v2_ScopedRouteConfiguration_Key* sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key*)envoy_api_v2_ScopedRouteConfiguration_key(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key*)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena); + sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key*)_upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena); if (!sub) return NULL; envoy_api_v2_ScopedRouteConfiguration_set_key(msg, sub); } @@ -71,7 +70,7 @@ UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration_Key* envoy_api_v2_Scoped /* envoy.api.v2.ScopedRouteConfiguration.Key */ UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key *envoy_api_v2_ScopedRouteConfiguration_Key_new(upb_arena *arena) { - return (envoy_api_v2_ScopedRouteConfiguration_Key *)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena); + return (envoy_api_v2_ScopedRouteConfiguration_Key *)_upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena); } UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key *envoy_api_v2_ScopedRouteConfiguration_Key_parse(const char *buf, size_t size, upb_arena *arena) { @@ -88,10 +87,10 @@ UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment** envoy_api_v2_Sco return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment** envoy_api_v2_ScopedRouteConfiguration_Key_resize_fragments(envoy_api_v2_ScopedRouteConfiguration_Key *msg, size_t len, upb_arena *arena) { - return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* envoy_api_v2_ScopedRouteConfiguration_Key_add_fragments(envoy_api_v2_ScopedRouteConfiguration_Key *msg, upb_arena *arena) { - struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment*)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena); + struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment*)_upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -101,7 +100,7 @@ UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* envoy_api_ /* envoy.api.v2.ScopedRouteConfiguration.Key.Fragment */ UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_new(upb_arena *arena) { - return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena); + return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *)_upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, arena); } UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h index 50e037bab9a..88ffbc51cb1 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPB_H_ #define ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -103,7 +102,7 @@ typedef enum { /* envoy.config.filter.accesslog.v2.AccessLog */ UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog *envoy_config_filter_accesslog_v2_AccessLog_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_AccessLog *)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLog_msginit, arena); + return (envoy_config_filter_accesslog_v2_AccessLog *)_upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLog_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog *envoy_config_filter_accesslog_v2_AccessLog_parse(const char *buf, size_t size, upb_arena *arena) { @@ -137,7 +136,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_filter(envoy_conf UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_mutable_filter(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)envoy_config_filter_accesslog_v2_AccessLog_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLog_set_filter(msg, sub); } @@ -149,7 +148,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_config(envoy_conf UPB_INLINE struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_AccessLog_mutable_config(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_filter_accesslog_v2_AccessLog_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLog_set_config(msg, sub); } @@ -161,7 +160,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_typed_config(envo UPB_INLINE struct google_protobuf_Any* envoy_config_filter_accesslog_v2_AccessLog_mutable_typed_config(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_accesslog_v2_AccessLog_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLog_set_typed_config(msg, sub); } @@ -171,7 +170,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_config_filter_accesslog_v2_AccessLo /* envoy.config.filter.accesslog.v2.AccessLogFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter *envoy_config_filter_accesslog_v2_AccessLogFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_AccessLogFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_AccessLogFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter *envoy_config_filter_accesslog_v2_AccessLogFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -227,7 +226,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_status_code UPB_INLINE struct envoy_config_filter_accesslog_v2_StatusCodeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_status_code_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_StatusCodeFilter* sub = (struct envoy_config_filter_accesslog_v2_StatusCodeFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_status_code_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_StatusCodeFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_StatusCodeFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_status_code_filter(msg, sub); } @@ -239,7 +238,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_duration_fi UPB_INLINE struct envoy_config_filter_accesslog_v2_DurationFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_duration_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_DurationFilter* sub = (struct envoy_config_filter_accesslog_v2_DurationFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_duration_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_DurationFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_DurationFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_duration_filter(msg, sub); } @@ -251,7 +250,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_not_health_ UPB_INLINE struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_not_health_check_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter* sub = (struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_not_health_check_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_NotHealthCheckFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_not_health_check_filter(msg, sub); } @@ -263,7 +262,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_traceable_f UPB_INLINE struct envoy_config_filter_accesslog_v2_TraceableFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_traceable_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_TraceableFilter* sub = (struct envoy_config_filter_accesslog_v2_TraceableFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_traceable_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_TraceableFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_TraceableFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_traceable_filter(msg, sub); } @@ -275,7 +274,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_runtime_fil UPB_INLINE struct envoy_config_filter_accesslog_v2_RuntimeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_runtime_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_RuntimeFilter* sub = (struct envoy_config_filter_accesslog_v2_RuntimeFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_runtime_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_RuntimeFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_RuntimeFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_runtime_filter(msg, sub); } @@ -287,7 +286,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_and_filter( UPB_INLINE struct envoy_config_filter_accesslog_v2_AndFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_and_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_AndFilter* sub = (struct envoy_config_filter_accesslog_v2_AndFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_and_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_AndFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AndFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_AndFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_AndFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_and_filter(msg, sub); } @@ -299,7 +298,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_or_filter(e UPB_INLINE struct envoy_config_filter_accesslog_v2_OrFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_or_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_OrFilter* sub = (struct envoy_config_filter_accesslog_v2_OrFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_or_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_OrFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_OrFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_OrFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_OrFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_or_filter(msg, sub); } @@ -311,7 +310,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_header_filt UPB_INLINE struct envoy_config_filter_accesslog_v2_HeaderFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_header_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_HeaderFilter* sub = (struct envoy_config_filter_accesslog_v2_HeaderFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_header_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_HeaderFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_HeaderFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_header_filter(msg, sub); } @@ -323,7 +322,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_response_fl UPB_INLINE struct envoy_config_filter_accesslog_v2_ResponseFlagFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_response_flag_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_ResponseFlagFilter* sub = (struct envoy_config_filter_accesslog_v2_ResponseFlagFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_response_flag_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_ResponseFlagFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_ResponseFlagFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_response_flag_filter(msg, sub); } @@ -335,7 +334,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_grpc_status UPB_INLINE struct envoy_config_filter_accesslog_v2_GrpcStatusFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_grpc_status_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_GrpcStatusFilter* sub = (struct envoy_config_filter_accesslog_v2_GrpcStatusFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_grpc_status_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_GrpcStatusFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_GrpcStatusFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_grpc_status_filter(msg, sub); } @@ -347,7 +346,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_extension_f UPB_INLINE struct envoy_config_filter_accesslog_v2_ExtensionFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_mutable_extension_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_ExtensionFilter* sub = (struct envoy_config_filter_accesslog_v2_ExtensionFilter*)envoy_config_filter_accesslog_v2_AccessLogFilter_extension_filter(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_ExtensionFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_ExtensionFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_AccessLogFilter_set_extension_filter(msg, sub); } @@ -357,7 +356,7 @@ UPB_INLINE struct envoy_config_filter_accesslog_v2_ExtensionFilter* envoy_config /* envoy.config.filter.accesslog.v2.ComparisonFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_ComparisonFilter *envoy_config_filter_accesslog_v2_ComparisonFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_ComparisonFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_ComparisonFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_ComparisonFilter *envoy_config_filter_accesslog_v2_ComparisonFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -380,7 +379,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_ComparisonFilter_set_value(envo UPB_INLINE struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog_v2_ComparisonFilter_mutable_value(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeUInt32* sub = (struct envoy_api_v2_core_RuntimeUInt32*)envoy_config_filter_accesslog_v2_ComparisonFilter_value(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_RuntimeUInt32*)upb_msg_new(&envoy_api_v2_core_RuntimeUInt32_msginit, arena); + sub = (struct envoy_api_v2_core_RuntimeUInt32*)_upb_msg_new(&envoy_api_v2_core_RuntimeUInt32_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_ComparisonFilter_set_value(msg, sub); } @@ -390,7 +389,7 @@ UPB_INLINE struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog /* envoy.config.filter.accesslog.v2.StatusCodeFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_StatusCodeFilter *envoy_config_filter_accesslog_v2_StatusCodeFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_StatusCodeFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_StatusCodeFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_StatusCodeFilter *envoy_config_filter_accesslog_v2_StatusCodeFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -409,7 +408,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_StatusCodeFilter_set_comparison UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_StatusCodeFilter_mutable_comparison(envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_ComparisonFilter* sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)envoy_config_filter_accesslog_v2_StatusCodeFilter_comparison(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_StatusCodeFilter_set_comparison(msg, sub); } @@ -419,7 +418,7 @@ UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_confi /* envoy.config.filter.accesslog.v2.DurationFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_DurationFilter *envoy_config_filter_accesslog_v2_DurationFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_DurationFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_DurationFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_DurationFilter *envoy_config_filter_accesslog_v2_DurationFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -438,7 +437,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_DurationFilter_set_comparison(e UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_DurationFilter_mutable_comparison(envoy_config_filter_accesslog_v2_DurationFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_ComparisonFilter* sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)envoy_config_filter_accesslog_v2_DurationFilter_comparison(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); + sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_DurationFilter_set_comparison(msg, sub); } @@ -448,7 +447,7 @@ UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_confi /* envoy.config.filter.accesslog.v2.NotHealthCheckFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_NotHealthCheckFilter *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_NotHealthCheckFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_NotHealthCheckFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_NotHealthCheckFilter *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -464,7 +463,7 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_serialize /* envoy.config.filter.accesslog.v2.TraceableFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_TraceableFilter *envoy_config_filter_accesslog_v2_TraceableFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_TraceableFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_TraceableFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_TraceableFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_TraceableFilter *envoy_config_filter_accesslog_v2_TraceableFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -480,7 +479,7 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_TraceableFilter_serialize(cons /* envoy.config.filter.accesslog.v2.RuntimeFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_RuntimeFilter *envoy_config_filter_accesslog_v2_RuntimeFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_RuntimeFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_RuntimeFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_RuntimeFilter *envoy_config_filter_accesslog_v2_RuntimeFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -504,7 +503,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_percent_sampl UPB_INLINE struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2_RuntimeFilter_mutable_percent_sampled(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_config_filter_accesslog_v2_RuntimeFilter_percent_sampled(msg); if (sub == NULL) { - sub = (struct envoy_type_FractionalPercent*)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + sub = (struct envoy_type_FractionalPercent*)_upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_RuntimeFilter_set_percent_sampled(msg, sub); } @@ -517,7 +516,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_use_independe /* envoy.config.filter.accesslog.v2.AndFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_AndFilter *envoy_config_filter_accesslog_v2_AndFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_AndFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_AndFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_AndFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_AndFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_AndFilter *envoy_config_filter_accesslog_v2_AndFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -534,10 +533,10 @@ UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filte return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_AndFilter_resize_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, size_t len, upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AndFilter_add_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, upb_arena *arena) { - struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); + struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -547,7 +546,7 @@ UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config /* envoy.config.filter.accesslog.v2.OrFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_OrFilter *envoy_config_filter_accesslog_v2_OrFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_OrFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_OrFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_OrFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_OrFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_OrFilter *envoy_config_filter_accesslog_v2_OrFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -564,10 +563,10 @@ UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filte return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_OrFilter_resize_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, size_t len, upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_filter_accesslog_v2_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_OrFilter_add_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, upb_arena *arena) { - struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); + struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)_upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -577,7 +576,7 @@ UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config /* envoy.config.filter.accesslog.v2.HeaderFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_HeaderFilter *envoy_config_filter_accesslog_v2_HeaderFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_HeaderFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_HeaderFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_HeaderFilter *envoy_config_filter_accesslog_v2_HeaderFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -596,7 +595,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_HeaderFilter_set_header(envoy_c UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslog_v2_HeaderFilter_mutable_header(envoy_config_filter_accesslog_v2_HeaderFilter *msg, upb_arena *arena) { struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)envoy_config_filter_accesslog_v2_HeaderFilter_header(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + sub = (struct envoy_api_v2_route_HeaderMatcher*)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_HeaderFilter_set_header(msg, sub); } @@ -606,7 +605,7 @@ UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslo /* envoy.config.filter.accesslog.v2.ResponseFlagFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_ResponseFlagFilter *envoy_config_filter_accesslog_v2_ResponseFlagFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_ResponseFlagFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_ResponseFlagFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_ResponseFlagFilter *envoy_config_filter_accesslog_v2_ResponseFlagFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -623,17 +622,17 @@ UPB_INLINE upb_strview* envoy_config_filter_accesslog_v2_ResponseFlagFilter_muta return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE upb_strview* envoy_config_filter_accesslog_v2_ResponseFlagFilter_resize_flags(envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_config_filter_accesslog_v2_ResponseFlagFilter_add_flags(envoy_config_filter_accesslog_v2_ResponseFlagFilter *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* envoy.config.filter.accesslog.v2.GrpcStatusFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_GrpcStatusFilter *envoy_config_filter_accesslog_v2_GrpcStatusFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_GrpcStatusFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_GrpcStatusFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_GrpcStatusFilter *envoy_config_filter_accesslog_v2_GrpcStatusFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -651,11 +650,11 @@ UPB_INLINE int32_t* envoy_config_filter_accesslog_v2_GrpcStatusFilter_mutable_st return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE int32_t* envoy_config_filter_accesslog_v2_GrpcStatusFilter_resize_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(8, 8), UPB_TYPE_ENUM, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_ENUM, arena); } UPB_INLINE bool envoy_config_filter_accesslog_v2_GrpcStatusFilter_add_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(4, 8), UPB_SIZE(8, 8), UPB_TYPE_ENUM, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(4, 8), UPB_SIZE(8, 8), UPB_TYPE_ENUM, &val, + arena); } UPB_INLINE void envoy_config_filter_accesslog_v2_GrpcStatusFilter_set_exclude(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, bool value) { UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; @@ -664,7 +663,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_GrpcStatusFilter_set_exclude(en /* envoy.config.filter.accesslog.v2.ExtensionFilter */ UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter *envoy_config_filter_accesslog_v2_ExtensionFilter_new(upb_arena *arena) { - return (envoy_config_filter_accesslog_v2_ExtensionFilter *)upb_msg_new(&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena); + return (envoy_config_filter_accesslog_v2_ExtensionFilter *)_upb_msg_new(&envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, arena); } UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter *envoy_config_filter_accesslog_v2_ExtensionFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -697,7 +696,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_config(envo UPB_INLINE struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_ExtensionFilter_mutable_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_filter_accesslog_v2_ExtensionFilter_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_ExtensionFilter_set_config(msg, sub); } @@ -709,7 +708,7 @@ UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_typed_confi UPB_INLINE struct google_protobuf_Any* envoy_config_filter_accesslog_v2_ExtensionFilter_mutable_typed_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_accesslog_v2_ExtensionFilter_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_config_filter_accesslog_v2_ExtensionFilter_set_typed_config(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h index 8430c461752..adfa599efa3 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_CONFIG_FILTER_NETWORK_HTTP_CONNECTION_MANAGER_V2_HTTP_CONNECTION_MANAGER_PROTO_UPB_H_ #define ENVOY_CONFIG_FILTER_NETWORK_HTTP_CONNECTION_MANAGER_V2_HTTP_CONNECTION_MANAGER_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -119,7 +118,7 @@ typedef enum { /* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_parse(const char *buf, size_t size, upb_arena *arena) { @@ -188,7 +187,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_Rds* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_rds(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_Rds* sub = (struct envoy_config_filter_network_http_connection_manager_v2_Rds*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_rds(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_Rds*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_Rds*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_rds(msg, sub); } @@ -200,7 +199,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_api_v2_RouteConfiguration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_route_config(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_api_v2_RouteConfiguration* sub = (struct envoy_api_v2_RouteConfiguration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_config(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_RouteConfiguration*)upb_msg_new(&envoy_api_v2_RouteConfiguration_msginit, arena); + sub = (struct envoy_api_v2_RouteConfiguration*)_upb_msg_new(&envoy_api_v2_RouteConfiguration_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_route_config(msg, sub); } @@ -210,10 +209,10 @@ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** e return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(124, 216), len); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_resize_http_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t len, upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(124, 216), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(124, 216), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_http_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { - struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); + struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(124, 216), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -225,7 +224,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_add_user_agent(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_user_agent(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_add_user_agent(msg, sub); } @@ -237,7 +236,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_tracing(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_tracing(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_tracing(msg, sub); } @@ -249,7 +248,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_api_v2_core_Http1ProtocolOptions* sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_protocol_options(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_msginit, arena); + sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)_upb_msg_new(&envoy_api_v2_core_Http1ProtocolOptions_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_http_protocol_options(msg, sub); } @@ -261,7 +260,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_http2_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_api_v2_core_Http2ProtocolOptions* sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http2_protocol_options(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); + sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)_upb_msg_new(&envoy_api_v2_core_Http2ProtocolOptions_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_http2_protocol_options(msg, sub); } @@ -276,7 +275,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_idle_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_idle_timeout(msg, sub); } @@ -288,7 +287,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_drain_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_drain_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_drain_timeout(msg, sub); } @@ -298,10 +297,10 @@ UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLog** envoy_config_filt return (struct envoy_config_filter_accesslog_v2_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(128, 224), len); } UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLog** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_resize_access_log(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t len, upb_arena *arena) { - return (struct envoy_config_filter_accesslog_v2_AccessLog**)_upb_array_resize_accessor(msg, UPB_SIZE(128, 224), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_config_filter_accesslog_v2_AccessLog**)_upb_array_resize_accessor(msg, UPB_SIZE(128, 224), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLog* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_access_log(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { - struct envoy_config_filter_accesslog_v2_AccessLog* sub = (struct envoy_config_filter_accesslog_v2_AccessLog*)upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLog_msginit, arena); + struct envoy_config_filter_accesslog_v2_AccessLog* sub = (struct envoy_config_filter_accesslog_v2_AccessLog*)_upb_msg_new(&envoy_config_filter_accesslog_v2_AccessLog_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(128, 224), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -313,7 +312,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_use_remote_address(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_use_remote_address(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_use_remote_address(msg, sub); } @@ -325,7 +324,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_generate_request_id(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_generate_request_id(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_generate_request_id(msg, sub); } @@ -340,7 +339,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_set_current_client_cert_details(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_current_client_cert_details(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_set_current_client_cert_details(msg, sub); } @@ -365,10 +364,10 @@ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnection return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(132, 232), len); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_resize_upgrade_configs(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t len, upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(132, 232), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(132, 232), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_upgrade_configs(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { - struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena); + struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(132, 232), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -380,7 +379,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_stream_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stream_idle_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_stream_idle_timeout(msg, sub); } @@ -392,7 +391,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_internal_address_config(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_internal_address_config(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_internal_address_config(msg, sub); } @@ -404,7 +403,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_delayed_close_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_delayed_close_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_delayed_close_timeout(msg, sub); } @@ -416,7 +415,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_request_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_timeout(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_request_timeout(msg, sub); } @@ -428,7 +427,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_max_request_headers_kb(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_max_request_headers_kb(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_max_request_headers_kb(msg, sub); } @@ -440,7 +439,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_normalize_path(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_normalize_path(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_normalize_path(msg, sub); } @@ -452,7 +451,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_scoped_routes(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_scoped_routes(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_scoped_routes(msg, sub); } @@ -473,7 +472,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_api_v2_core_HttpProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_common_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_api_v2_core_HttpProtocolOptions* sub = (struct envoy_api_v2_core_HttpProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_common_http_protocol_options(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_HttpProtocolOptions*)upb_msg_new(&envoy_api_v2_core_HttpProtocolOptions_msginit, arena); + sub = (struct envoy_api_v2_core_HttpProtocolOptions*)_upb_msg_new(&envoy_api_v2_core_HttpProtocolOptions_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_common_http_protocol_options(msg, sub); } @@ -483,7 +482,7 @@ UPB_INLINE struct envoy_api_v2_core_HttpProtocolOptions* envoy_config_filter_net /* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_parse(const char *buf, size_t size, upb_arena *arena) { @@ -509,11 +508,11 @@ UPB_INLINE upb_strview* envoy_config_filter_network_http_connection_manager_v2_H return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len); } UPB_INLINE upb_strview* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_resize_request_headers_for_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_add_request_headers_for_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_client_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct envoy_type_Percent* value) { UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(12, 16)) = value; @@ -521,7 +520,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_client_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_client_sampling(msg); if (sub == NULL) { - sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + sub = (struct envoy_type_Percent*)_upb_msg_new(&envoy_type_Percent_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_client_sampling(msg, sub); } @@ -533,7 +532,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_random_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_random_sampling(msg); if (sub == NULL) { - sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + sub = (struct envoy_type_Percent*)_upb_msg_new(&envoy_type_Percent_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_random_sampling(msg, sub); } @@ -545,7 +544,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_overall_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_overall_sampling(msg); if (sub == NULL) { - sub = (struct envoy_type_Percent*)upb_msg_new(&envoy_type_Percent_msginit, arena); + sub = (struct envoy_type_Percent*)_upb_msg_new(&envoy_type_Percent_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_overall_sampling(msg, sub); } @@ -560,7 +559,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_max_path_tag_length(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_max_path_tag_length(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_max_path_tag_length(msg, sub); } @@ -570,7 +569,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_ /* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.InternalAddressConfig */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -590,7 +589,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne /* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_parse(const char *buf, size_t size, upb_arena *arena) { @@ -613,7 +612,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_mutable_subject(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_subject(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_subject(msg, sub); } @@ -635,7 +634,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne /* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_parse(const char *buf, size_t size, upb_arena *arena) { @@ -657,10 +656,10 @@ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** e return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_resize_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, size_t len, upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_add_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena) { - struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); + struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpFilter*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -672,7 +671,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_mutable_enabled(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_enabled(msg); if (sub == NULL) { - sub = (struct google_protobuf_BoolValue*)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_set_enabled(msg, sub); } @@ -682,7 +681,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_co /* envoy.config.filter.network.http_connection_manager.v2.Rds */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_Rds *envoy_config_filter_network_http_connection_manager_v2_Rds_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_Rds *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_Rds *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_Rds *envoy_config_filter_network_http_connection_manager_v2_Rds_parse(const char *buf, size_t size, upb_arena *arena) { @@ -702,7 +701,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_Rds_set_c UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_Rds_mutable_config_source(envoy_config_filter_network_http_connection_manager_v2_Rds *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_Rds_config_source(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_ConfigSource*)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_Rds_set_config_source(msg, sub); } @@ -715,7 +714,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_Rds_set_r /* envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_parse(const char *buf, size_t size, upb_arena *arena) { @@ -732,10 +731,10 @@ UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration** envoy_config_filter_ne return (struct envoy_api_v2_ScopedRouteConfiguration**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration** envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_resize_scoped_route_configurations(envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_ScopedRouteConfiguration**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_ScopedRouteConfiguration**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration* envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_add_scoped_route_configurations(envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, upb_arena *arena) { - struct envoy_api_v2_ScopedRouteConfiguration* sub = (struct envoy_api_v2_ScopedRouteConfiguration*)upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_msginit, arena); + struct envoy_api_v2_ScopedRouteConfiguration* sub = (struct envoy_api_v2_ScopedRouteConfiguration*)_upb_msg_new(&envoy_api_v2_ScopedRouteConfiguration_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -745,7 +744,7 @@ UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration* envoy_config_filter_net /* envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_parse(const char *buf, size_t size, upb_arena *arena) { @@ -780,7 +779,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRou UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_scope_key_builder(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scope_key_builder(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scope_key_builder(msg, sub); } @@ -792,7 +791,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRou UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_rds_config_source(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_ConfigSource*)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_rds_config_source(msg, sub); } @@ -804,7 +803,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRou UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_scoped_route_configurations_list(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_route_configurations_list(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scoped_route_configurations_list(msg, sub); } @@ -816,7 +815,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRou UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_scoped_rds(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_rds(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRds*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scoped_rds(msg, sub); } @@ -826,7 +825,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedR /* envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_parse(const char *buf, size_t size, upb_arena *arena) { @@ -843,10 +842,10 @@ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_S return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder** envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_resize_fragments(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, size_t len, upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_add_fragments(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, upb_arena *arena) { - struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena); + struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -856,7 +855,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedR /* envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_parse(const char *buf, size_t size, upb_arena *arena) { @@ -882,7 +881,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRou UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_mutable_header_value_extractor(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_header_value_extractor(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_set_header_value_extractor(msg, sub); } @@ -892,7 +891,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedR /* envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_parse(const char *buf, size_t size, upb_arena *arena) { @@ -932,7 +931,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRou UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_mutable_element(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element(msg); if (sub == NULL) { - sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena); + sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_element(msg, sub); } @@ -942,7 +941,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedR /* envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_parse(const char *buf, size_t size, upb_arena *arena) { @@ -966,7 +965,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRou /* envoy.config.filter.network.http_connection_manager.v2.ScopedRds */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRds *envoy_config_filter_network_http_connection_manager_v2_ScopedRds_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_ScopedRds *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_ScopedRds *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRds *envoy_config_filter_network_http_connection_manager_v2_ScopedRds_parse(const char *buf, size_t size, upb_arena *arena) { @@ -985,7 +984,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRds UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRds_mutable_scoped_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_ScopedRds_scoped_rds_config_source(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_ConfigSource*)upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); + sub = (struct envoy_api_v2_core_ConfigSource*)_upb_msg_new(&envoy_api_v2_core_ConfigSource_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_ScopedRds_set_scoped_rds_config_source(msg, sub); } @@ -995,7 +994,7 @@ UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_ht /* envoy.config.filter.network.http_connection_manager.v2.HttpFilter */ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter *envoy_config_filter_network_http_connection_manager_v2_HttpFilter_new(upb_arena *arena) { - return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter *)upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); + return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter *)_upb_msg_new(&envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, arena); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter *envoy_config_filter_network_http_connection_manager_v2_HttpFilter_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1028,7 +1027,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpFilte UPB_INLINE struct google_protobuf_Struct* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_mutable_config(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_config(msg, sub); } @@ -1040,7 +1039,7 @@ UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpFilte UPB_INLINE struct google_protobuf_Any* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_mutable_typed_config(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_network_http_connection_manager_v2_HttpFilter_typed_config(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_typed_config(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h index bda29669d5a..5774e14a085 100644 --- a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +++ b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPB_H_ #define ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -30,7 +29,7 @@ extern const upb_msglayout google_protobuf_Any_msginit; /* envoy.config.listener.v2.ApiListener */ UPB_INLINE envoy_config_listener_v2_ApiListener *envoy_config_listener_v2_ApiListener_new(upb_arena *arena) { - return (envoy_config_listener_v2_ApiListener *)upb_msg_new(&envoy_config_listener_v2_ApiListener_msginit, arena); + return (envoy_config_listener_v2_ApiListener *)_upb_msg_new(&envoy_config_listener_v2_ApiListener_msginit, arena); } UPB_INLINE envoy_config_listener_v2_ApiListener *envoy_config_listener_v2_ApiListener_parse(const char *buf, size_t size, upb_arena *arena) { @@ -49,7 +48,7 @@ UPB_INLINE void envoy_config_listener_v2_ApiListener_set_api_listener(envoy_conf UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v2_ApiListener_mutable_api_listener(envoy_config_listener_v2_ApiListener *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_listener_v2_ApiListener_api_listener(msg); if (sub == NULL) { - sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); if (!sub) return NULL; envoy_config_listener_v2_ApiListener_set_api_listener(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h b/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h index 05fc7302e73..789c2e7e677 100644 --- a/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +++ b/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_SERVICE_DISCOVERY_V2_ADS_PROTO_UPB_H_ #define ENVOY_SERVICE_DISCOVERY_V2_ADS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -28,7 +27,7 @@ extern const upb_msglayout envoy_service_discovery_v2_AdsDummy_msginit; /* envoy.service.discovery.v2.AdsDummy */ UPB_INLINE envoy_service_discovery_v2_AdsDummy *envoy_service_discovery_v2_AdsDummy_new(upb_arena *arena) { - return (envoy_service_discovery_v2_AdsDummy *)upb_msg_new(&envoy_service_discovery_v2_AdsDummy_msginit, arena); + return (envoy_service_discovery_v2_AdsDummy *)_upb_msg_new(&envoy_service_discovery_v2_AdsDummy_msginit, arena); } UPB_INLINE envoy_service_discovery_v2_AdsDummy *envoy_service_discovery_v2_AdsDummy_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h b/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h index 457deafdd9d..c9402983f59 100644 --- a/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +++ b/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_SERVICE_LOAD_STATS_V2_LRS_PROTO_UPB_H_ #define ENVOY_SERVICE_LOAD_STATS_V2_LRS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -37,7 +36,7 @@ extern const upb_msglayout google_protobuf_Duration_msginit; /* envoy.service.load_stats.v2.LoadStatsRequest */ UPB_INLINE envoy_service_load_stats_v2_LoadStatsRequest *envoy_service_load_stats_v2_LoadStatsRequest_new(upb_arena *arena) { - return (envoy_service_load_stats_v2_LoadStatsRequest *)upb_msg_new(&envoy_service_load_stats_v2_LoadStatsRequest_msginit, arena); + return (envoy_service_load_stats_v2_LoadStatsRequest *)_upb_msg_new(&envoy_service_load_stats_v2_LoadStatsRequest_msginit, arena); } UPB_INLINE envoy_service_load_stats_v2_LoadStatsRequest *envoy_service_load_stats_v2_LoadStatsRequest_parse(const char *buf, size_t size, upb_arena *arena) { @@ -57,7 +56,7 @@ UPB_INLINE void envoy_service_load_stats_v2_LoadStatsRequest_set_node(envoy_serv UPB_INLINE struct envoy_api_v2_core_Node* envoy_service_load_stats_v2_LoadStatsRequest_mutable_node(envoy_service_load_stats_v2_LoadStatsRequest *msg, upb_arena *arena) { struct envoy_api_v2_core_Node* sub = (struct envoy_api_v2_core_Node*)envoy_service_load_stats_v2_LoadStatsRequest_node(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_Node*)upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); + sub = (struct envoy_api_v2_core_Node*)_upb_msg_new(&envoy_api_v2_core_Node_msginit, arena); if (!sub) return NULL; envoy_service_load_stats_v2_LoadStatsRequest_set_node(msg, sub); } @@ -67,10 +66,10 @@ UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats** envoy_service_load_stats_ return (struct envoy_api_v2_endpoint_ClusterStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats** envoy_service_load_stats_v2_LoadStatsRequest_resize_cluster_stats(envoy_service_load_stats_v2_LoadStatsRequest *msg, size_t len, upb_arena *arena) { - return (struct envoy_api_v2_endpoint_ClusterStats**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct envoy_api_v2_endpoint_ClusterStats**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats* envoy_service_load_stats_v2_LoadStatsRequest_add_cluster_stats(envoy_service_load_stats_v2_LoadStatsRequest *msg, upb_arena *arena) { - struct envoy_api_v2_endpoint_ClusterStats* sub = (struct envoy_api_v2_endpoint_ClusterStats*)upb_msg_new(&envoy_api_v2_endpoint_ClusterStats_msginit, arena); + struct envoy_api_v2_endpoint_ClusterStats* sub = (struct envoy_api_v2_endpoint_ClusterStats*)_upb_msg_new(&envoy_api_v2_endpoint_ClusterStats_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -80,7 +79,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats* envoy_service_load_stats_v /* envoy.service.load_stats.v2.LoadStatsResponse */ UPB_INLINE envoy_service_load_stats_v2_LoadStatsResponse *envoy_service_load_stats_v2_LoadStatsResponse_new(upb_arena *arena) { - return (envoy_service_load_stats_v2_LoadStatsResponse *)upb_msg_new(&envoy_service_load_stats_v2_LoadStatsResponse_msginit, arena); + return (envoy_service_load_stats_v2_LoadStatsResponse *)_upb_msg_new(&envoy_service_load_stats_v2_LoadStatsResponse_msginit, arena); } UPB_INLINE envoy_service_load_stats_v2_LoadStatsResponse *envoy_service_load_stats_v2_LoadStatsResponse_parse(const char *buf, size_t size, upb_arena *arena) { @@ -99,11 +98,11 @@ UPB_INLINE upb_strview* envoy_service_load_stats_v2_LoadStatsResponse_mutable_cl return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE upb_strview* envoy_service_load_stats_v2_LoadStatsResponse_resize_clusters(envoy_service_load_stats_v2_LoadStatsResponse *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_add_clusters(envoy_service_load_stats_v2_LoadStatsResponse *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void envoy_service_load_stats_v2_LoadStatsResponse_set_load_reporting_interval(envoy_service_load_stats_v2_LoadStatsResponse *msg, struct google_protobuf_Duration* value) { UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value; @@ -111,7 +110,7 @@ UPB_INLINE void envoy_service_load_stats_v2_LoadStatsResponse_set_load_reporting UPB_INLINE struct google_protobuf_Duration* envoy_service_load_stats_v2_LoadStatsResponse_mutable_load_reporting_interval(envoy_service_load_stats_v2_LoadStatsResponse *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_service_load_stats_v2_LoadStatsResponse_load_reporting_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; envoy_service_load_stats_v2_LoadStatsResponse_set_load_reporting_interval(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/type/http.upb.h b/src/core/ext/upb-generated/envoy/type/http.upb.h index a576c4911a6..766e59fcaa6 100644 --- a/src/core/ext/upb-generated/envoy/type/http.upb.h +++ b/src/core/ext/upb-generated/envoy/type/http.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_TYPE_HTTP_PROTO_UPB_H_ #define ENVOY_TYPE_HTTP_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h index 1a396732e10..4fac9def24c 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_TYPE_MATCHER_REGEX_PROTO_UPB_H_ #define ENVOY_TYPE_MATCHER_REGEX_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -33,7 +32,7 @@ extern const upb_msglayout google_protobuf_UInt32Value_msginit; /* envoy.type.matcher.RegexMatcher */ UPB_INLINE envoy_type_matcher_RegexMatcher *envoy_type_matcher_RegexMatcher_new(upb_arena *arena) { - return (envoy_type_matcher_RegexMatcher *)upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); + return (envoy_type_matcher_RegexMatcher *)_upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); } UPB_INLINE envoy_type_matcher_RegexMatcher *envoy_type_matcher_RegexMatcher_parse(const char *buf, size_t size, upb_arena *arena) { @@ -60,7 +59,7 @@ UPB_INLINE void envoy_type_matcher_RegexMatcher_set_google_re2(envoy_type_matche UPB_INLINE struct envoy_type_matcher_RegexMatcher_GoogleRE2* envoy_type_matcher_RegexMatcher_mutable_google_re2(envoy_type_matcher_RegexMatcher *msg, upb_arena *arena) { struct envoy_type_matcher_RegexMatcher_GoogleRE2* sub = (struct envoy_type_matcher_RegexMatcher_GoogleRE2*)envoy_type_matcher_RegexMatcher_google_re2(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_RegexMatcher_GoogleRE2*)upb_msg_new(&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena); + sub = (struct envoy_type_matcher_RegexMatcher_GoogleRE2*)_upb_msg_new(&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena); if (!sub) return NULL; envoy_type_matcher_RegexMatcher_set_google_re2(msg, sub); } @@ -73,7 +72,7 @@ UPB_INLINE void envoy_type_matcher_RegexMatcher_set_regex(envoy_type_matcher_Reg /* envoy.type.matcher.RegexMatcher.GoogleRE2 */ UPB_INLINE envoy_type_matcher_RegexMatcher_GoogleRE2 *envoy_type_matcher_RegexMatcher_GoogleRE2_new(upb_arena *arena) { - return (envoy_type_matcher_RegexMatcher_GoogleRE2 *)upb_msg_new(&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena); + return (envoy_type_matcher_RegexMatcher_GoogleRE2 *)_upb_msg_new(&envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena); } UPB_INLINE envoy_type_matcher_RegexMatcher_GoogleRE2 *envoy_type_matcher_RegexMatcher_GoogleRE2_parse(const char *buf, size_t size, upb_arena *arena) { @@ -92,7 +91,7 @@ UPB_INLINE void envoy_type_matcher_RegexMatcher_GoogleRE2_set_max_program_size(e UPB_INLINE struct google_protobuf_UInt32Value* envoy_type_matcher_RegexMatcher_GoogleRE2_mutable_max_program_size(envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_type_matcher_RegexMatcher_GoogleRE2_max_program_size(msg); if (sub == NULL) { - sub = (struct google_protobuf_UInt32Value*)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); if (!sub) return NULL; envoy_type_matcher_RegexMatcher_GoogleRE2_set_max_program_size(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h index d5b4850992f..70ac63d4391 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_TYPE_MATCHER_STRING_PROTO_UPB_H_ #define ENVOY_TYPE_MATCHER_STRING_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -33,7 +32,7 @@ extern const upb_msglayout envoy_type_matcher_RegexMatcher_msginit; /* envoy.type.matcher.StringMatcher */ UPB_INLINE envoy_type_matcher_StringMatcher *envoy_type_matcher_StringMatcher_new(upb_arena *arena) { - return (envoy_type_matcher_StringMatcher *)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + return (envoy_type_matcher_StringMatcher *)_upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); } UPB_INLINE envoy_type_matcher_StringMatcher *envoy_type_matcher_StringMatcher_parse(const char *buf, size_t size, upb_arena *arena) { @@ -83,7 +82,7 @@ UPB_INLINE void envoy_type_matcher_StringMatcher_set_safe_regex(envoy_type_match UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_StringMatcher_mutable_safe_regex(envoy_type_matcher_StringMatcher *msg, upb_arena *arena) { struct envoy_type_matcher_RegexMatcher* sub = (struct envoy_type_matcher_RegexMatcher*)envoy_type_matcher_StringMatcher_safe_regex(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_RegexMatcher*)upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); + sub = (struct envoy_type_matcher_RegexMatcher*)_upb_msg_new(&envoy_type_matcher_RegexMatcher_msginit, arena); if (!sub) return NULL; envoy_type_matcher_StringMatcher_set_safe_regex(msg, sub); } @@ -93,7 +92,7 @@ UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_StringMatc /* envoy.type.matcher.ListStringMatcher */ UPB_INLINE envoy_type_matcher_ListStringMatcher *envoy_type_matcher_ListStringMatcher_new(upb_arena *arena) { - return (envoy_type_matcher_ListStringMatcher *)upb_msg_new(&envoy_type_matcher_ListStringMatcher_msginit, arena); + return (envoy_type_matcher_ListStringMatcher *)_upb_msg_new(&envoy_type_matcher_ListStringMatcher_msginit, arena); } UPB_INLINE envoy_type_matcher_ListStringMatcher *envoy_type_matcher_ListStringMatcher_parse(const char *buf, size_t size, upb_arena *arena) { @@ -110,10 +109,10 @@ UPB_INLINE envoy_type_matcher_StringMatcher** envoy_type_matcher_ListStringMatch return (envoy_type_matcher_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_type_matcher_StringMatcher** envoy_type_matcher_ListStringMatcher_resize_patterns(envoy_type_matcher_ListStringMatcher *msg, size_t len, upb_arena *arena) { - return (envoy_type_matcher_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_type_matcher_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_type_matcher_ListStringMatcher_add_patterns(envoy_type_matcher_ListStringMatcher *msg, upb_arena *arena) { - struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)_upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; diff --git a/src/core/ext/upb-generated/envoy/type/percent.upb.h b/src/core/ext/upb-generated/envoy/type/percent.upb.h index e9aa889957a..9e39faec9ca 100644 --- a/src/core/ext/upb-generated/envoy/type/percent.upb.h +++ b/src/core/ext/upb-generated/envoy/type/percent.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_TYPE_PERCENT_PROTO_UPB_H_ #define ENVOY_TYPE_PERCENT_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -37,7 +36,7 @@ typedef enum { /* envoy.type.Percent */ UPB_INLINE envoy_type_Percent *envoy_type_Percent_new(upb_arena *arena) { - return (envoy_type_Percent *)upb_msg_new(&envoy_type_Percent_msginit, arena); + return (envoy_type_Percent *)_upb_msg_new(&envoy_type_Percent_msginit, arena); } UPB_INLINE envoy_type_Percent *envoy_type_Percent_parse(const char *buf, size_t size, upb_arena *arena) { @@ -57,7 +56,7 @@ UPB_INLINE void envoy_type_Percent_set_value(envoy_type_Percent *msg, double val /* envoy.type.FractionalPercent */ UPB_INLINE envoy_type_FractionalPercent *envoy_type_FractionalPercent_new(upb_arena *arena) { - return (envoy_type_FractionalPercent *)upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); + return (envoy_type_FractionalPercent *)_upb_msg_new(&envoy_type_FractionalPercent_msginit, arena); } UPB_INLINE envoy_type_FractionalPercent *envoy_type_FractionalPercent_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/envoy/type/range.upb.h b/src/core/ext/upb-generated/envoy/type/range.upb.h index 3e607745151..34b5af1ce02 100644 --- a/src/core/ext/upb-generated/envoy/type/range.upb.h +++ b/src/core/ext/upb-generated/envoy/type/range.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_TYPE_RANGE_PROTO_UPB_H_ #define ENVOY_TYPE_RANGE_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -31,7 +30,7 @@ extern const upb_msglayout envoy_type_DoubleRange_msginit; /* envoy.type.Int64Range */ UPB_INLINE envoy_type_Int64Range *envoy_type_Int64Range_new(upb_arena *arena) { - return (envoy_type_Int64Range *)upb_msg_new(&envoy_type_Int64Range_msginit, arena); + return (envoy_type_Int64Range *)_upb_msg_new(&envoy_type_Int64Range_msginit, arena); } UPB_INLINE envoy_type_Int64Range *envoy_type_Int64Range_parse(const char *buf, size_t size, upb_arena *arena) { @@ -55,7 +54,7 @@ UPB_INLINE void envoy_type_Int64Range_set_end(envoy_type_Int64Range *msg, int64_ /* envoy.type.DoubleRange */ UPB_INLINE envoy_type_DoubleRange *envoy_type_DoubleRange_new(upb_arena *arena) { - return (envoy_type_DoubleRange *)upb_msg_new(&envoy_type_DoubleRange_msginit, arena); + return (envoy_type_DoubleRange *)_upb_msg_new(&envoy_type_DoubleRange_msginit, arena); } UPB_INLINE envoy_type_DoubleRange *envoy_type_DoubleRange_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/gogoproto/gogo.upb.h b/src/core/ext/upb-generated/gogoproto/gogo.upb.h index 530adbf32db..a0d30e89efd 100644 --- a/src/core/ext/upb-generated/gogoproto/gogo.upb.h +++ b/src/core/ext/upb-generated/gogoproto/gogo.upb.h @@ -9,7 +9,6 @@ #ifndef GOGOPROTO_GOGO_PROTO_UPB_H_ #define GOGOPROTO_GOGO_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" diff --git a/src/core/ext/upb-generated/google/api/annotations.upb.h b/src/core/ext/upb-generated/google/api/annotations.upb.h index d81cd3d4446..ea05f2597a0 100644 --- a/src/core/ext/upb-generated/google/api/annotations.upb.h +++ b/src/core/ext/upb-generated/google/api/annotations.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_ #define GOOGLE_API_ANNOTATIONS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" diff --git a/src/core/ext/upb-generated/google/api/http.upb.h b/src/core/ext/upb-generated/google/api/http.upb.h index 5e8bffea178..e33a97a4149 100644 --- a/src/core/ext/upb-generated/google/api/http.upb.h +++ b/src/core/ext/upb-generated/google/api/http.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_API_HTTP_PROTO_UPB_H_ #define GOOGLE_API_HTTP_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -34,7 +33,7 @@ extern const upb_msglayout google_api_CustomHttpPattern_msginit; /* google.api.Http */ UPB_INLINE google_api_Http *google_api_Http_new(upb_arena *arena) { - return (google_api_Http *)upb_msg_new(&google_api_Http_msginit, arena); + return (google_api_Http *)_upb_msg_new(&google_api_Http_msginit, arena); } UPB_INLINE google_api_Http *google_api_Http_parse(const char *buf, size_t size, upb_arena *arena) { @@ -52,10 +51,10 @@ UPB_INLINE google_api_HttpRule** google_api_Http_mutable_rules(google_api_Http * return (google_api_HttpRule**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE google_api_HttpRule** google_api_Http_resize_rules(google_api_Http *msg, size_t len, upb_arena *arena) { - return (google_api_HttpRule**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_api_HttpRule**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_api_HttpRule* google_api_Http_add_rules(google_api_Http *msg, upb_arena *arena) { - struct google_api_HttpRule* sub = (struct google_api_HttpRule*)upb_msg_new(&google_api_HttpRule_msginit, arena); + struct google_api_HttpRule* sub = (struct google_api_HttpRule*)_upb_msg_new(&google_api_HttpRule_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -68,7 +67,7 @@ UPB_INLINE void google_api_Http_set_fully_decode_reserved_expansion(google_api_H /* google.api.HttpRule */ UPB_INLINE google_api_HttpRule *google_api_HttpRule_new(upb_arena *arena) { - return (google_api_HttpRule *)upb_msg_new(&google_api_HttpRule_msginit, arena); + return (google_api_HttpRule *)_upb_msg_new(&google_api_HttpRule_msginit, arena); } UPB_INLINE google_api_HttpRule *google_api_HttpRule_parse(const char *buf, size_t size, upb_arena *arena) { @@ -134,7 +133,7 @@ UPB_INLINE void google_api_HttpRule_set_custom(google_api_HttpRule *msg, google_ UPB_INLINE struct google_api_CustomHttpPattern* google_api_HttpRule_mutable_custom(google_api_HttpRule *msg, upb_arena *arena) { struct google_api_CustomHttpPattern* sub = (struct google_api_CustomHttpPattern*)google_api_HttpRule_custom(msg); if (sub == NULL) { - sub = (struct google_api_CustomHttpPattern*)upb_msg_new(&google_api_CustomHttpPattern_msginit, arena); + sub = (struct google_api_CustomHttpPattern*)_upb_msg_new(&google_api_CustomHttpPattern_msginit, arena); if (!sub) return NULL; google_api_HttpRule_set_custom(msg, sub); } @@ -144,10 +143,10 @@ UPB_INLINE google_api_HttpRule** google_api_HttpRule_mutable_additional_bindings return (google_api_HttpRule**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE google_api_HttpRule** google_api_HttpRule_resize_additional_bindings(google_api_HttpRule *msg, size_t len, upb_arena *arena) { - return (google_api_HttpRule**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_api_HttpRule**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_api_HttpRule* google_api_HttpRule_add_additional_bindings(google_api_HttpRule *msg, upb_arena *arena) { - struct google_api_HttpRule* sub = (struct google_api_HttpRule*)upb_msg_new(&google_api_HttpRule_msginit, arena); + struct google_api_HttpRule* sub = (struct google_api_HttpRule*)_upb_msg_new(&google_api_HttpRule_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -160,7 +159,7 @@ UPB_INLINE void google_api_HttpRule_set_response_body(google_api_HttpRule *msg, /* google.api.CustomHttpPattern */ UPB_INLINE google_api_CustomHttpPattern *google_api_CustomHttpPattern_new(upb_arena *arena) { - return (google_api_CustomHttpPattern *)upb_msg_new(&google_api_CustomHttpPattern_msginit, arena); + return (google_api_CustomHttpPattern *)_upb_msg_new(&google_api_CustomHttpPattern_msginit, arena); } UPB_INLINE google_api_CustomHttpPattern *google_api_CustomHttpPattern_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/google/protobuf/any.upb.h b/src/core/ext/upb-generated/google/protobuf/any.upb.h index a591ba85d44..25aff89ecda 100644 --- a/src/core/ext/upb-generated/google/protobuf/any.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/any.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_PROTOBUF_ANY_PROTO_UPB_H_ #define GOOGLE_PROTOBUF_ANY_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -28,7 +27,7 @@ extern const upb_msglayout google_protobuf_Any_msginit; /* google.protobuf.Any */ UPB_INLINE google_protobuf_Any *google_protobuf_Any_new(upb_arena *arena) { - return (google_protobuf_Any *)upb_msg_new(&google_protobuf_Any_msginit, arena); + return (google_protobuf_Any *)_upb_msg_new(&google_protobuf_Any_msginit, arena); } UPB_INLINE google_protobuf_Any *google_protobuf_Any_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h index 681614910e0..5baad088109 100644 --- a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ #define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -157,7 +156,7 @@ typedef enum { /* google.protobuf.FileDescriptorSet */ UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_new(upb_arena *arena) { - return (google_protobuf_FileDescriptorSet *)upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena); + return (google_protobuf_FileDescriptorSet *)_upb_msg_new(&google_protobuf_FileDescriptorSet_msginit, arena); } UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse(const char *buf, size_t size, upb_arena *arena) { @@ -174,10 +173,10 @@ UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorS return (google_protobuf_FileDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet *msg, size_t len, upb_arena *arena) { - return (google_protobuf_FileDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_FileDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet *msg, upb_arena *arena) { - struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); + struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -187,7 +186,7 @@ UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescr /* google.protobuf.FileDescriptorProto */ UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_FileDescriptorProto *)upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); + return (google_protobuf_FileDescriptorProto *)_upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -228,20 +227,20 @@ UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_mutable_dependency(g return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto *msg, size_t *len) { return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -251,10 +250,10 @@ UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorP return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); } UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(44, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -264,10 +263,10 @@ UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescript return (google_protobuf_ServiceDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len); } UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_ServiceDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_ServiceDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); + struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -277,10 +276,10 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptor return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 104), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 104), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 104), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(52, 104), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -293,7 +292,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FileOptions*)upb_msg_new(&google_protobuf_FileOptions_msginit, arena); + sub = (struct google_protobuf_FileOptions*)_upb_msg_new(&google_protobuf_FileOptions_msginit, arena); if (!sub) return NULL; google_protobuf_FileDescriptorProto_set_options(msg, sub); } @@ -306,7 +305,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_ UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); if (sub == NULL) { - sub = (struct google_protobuf_SourceCodeInfo*)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); + sub = (struct google_protobuf_SourceCodeInfo*)_upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); if (!sub) return NULL; google_protobuf_FileDescriptorProto_set_source_code_info(msg, sub); } @@ -316,21 +315,21 @@ UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependenc return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 112), len); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 112), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 112), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(56, 112), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(56, 112), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 120), len); } UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(60, 120), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(60, 120), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(60, 120), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(60, 120), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 3); @@ -340,7 +339,7 @@ UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_F /* google.protobuf.DescriptorProto */ UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_new(upb_arena *arena) { - return (google_protobuf_DescriptorProto *)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); + return (google_protobuf_DescriptorProto *)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -372,10 +371,10 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProt return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -385,10 +384,10 @@ UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mut return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); + struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -398,10 +397,10 @@ UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); + struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -411,10 +410,10 @@ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_Desc return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); + struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -424,10 +423,10 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProt return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); + struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -440,7 +439,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_Desc UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto *msg, upb_arena *arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MessageOptions*)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); + sub = (struct google_protobuf_MessageOptions*)_upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); if (!sub) return NULL; google_protobuf_DescriptorProto_set_options(msg, sub); } @@ -450,10 +449,10 @@ UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProt return (google_protobuf_OneofDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_OneofDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_OneofDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); + struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -463,10 +462,10 @@ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_Descr return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); + struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -476,17 +475,17 @@ UPB_INLINE upb_strview* google_protobuf_DescriptorProto_mutable_reserved_name(go return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len); } UPB_INLINE upb_strview* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* google.protobuf.DescriptorProto.ExtensionRange */ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_new(upb_arena *arena) { - return (google_protobuf_DescriptorProto_ExtensionRange *)upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); + return (google_protobuf_DescriptorProto_ExtensionRange *)_upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena); } UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse(const char *buf, size_t size, upb_arena *arena) { @@ -519,7 +518,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(googl UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ExtensionRangeOptions*)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); + sub = (struct google_protobuf_ExtensionRangeOptions*)_upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); if (!sub) return NULL; google_protobuf_DescriptorProto_ExtensionRange_set_options(msg, sub); } @@ -529,7 +528,7 @@ UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_Descrip /* google.protobuf.DescriptorProto.ReservedRange */ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_new(upb_arena *arena) { - return (google_protobuf_DescriptorProto_ReservedRange *)upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); + return (google_protobuf_DescriptorProto_ReservedRange *)_upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena); } UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse(const char *buf, size_t size, upb_arena *arena) { @@ -557,7 +556,7 @@ UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_pro /* google.protobuf.ExtensionRangeOptions */ UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_new(upb_arena *arena) { - return (google_protobuf_ExtensionRangeOptions *)upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); + return (google_protobuf_ExtensionRangeOptions *)_upb_msg_new(&google_protobuf_ExtensionRangeOptions_msginit, arena); } UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -574,10 +573,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeO return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -587,7 +586,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_Extension /* google.protobuf.FieldDescriptorProto */ UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_FieldDescriptorProto *)upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); + return (google_protobuf_FieldDescriptorProto *)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -654,7 +653,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_FieldOptions*)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); + sub = (struct google_protobuf_FieldOptions*)_upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); if (!sub) return NULL; google_protobuf_FieldDescriptorProto_set_options(msg, sub); } @@ -672,7 +671,7 @@ UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protob /* google.protobuf.OneofDescriptorProto */ UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_OneofDescriptorProto *)upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); + return (google_protobuf_OneofDescriptorProto *)_upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -699,7 +698,7 @@ UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_OneofOptions*)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); + sub = (struct google_protobuf_OneofOptions*)_upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); if (!sub) return NULL; google_protobuf_OneofDescriptorProto_set_options(msg, sub); } @@ -709,7 +708,7 @@ UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorP /* google.protobuf.EnumDescriptorProto */ UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto *)upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); + return (google_protobuf_EnumDescriptorProto *)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -736,10 +735,10 @@ UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescri return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_EnumValueDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_EnumValueDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); + struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -752,7 +751,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_ UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumOptions*)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); + sub = (struct google_protobuf_EnumOptions*)_upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); if (!sub) return NULL; google_protobuf_EnumDescriptorProto_set_options(msg, sub); } @@ -762,10 +761,10 @@ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protob return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); + struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -775,17 +774,17 @@ UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_mutable_reserved_nam return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* google.protobuf.EnumDescriptorProto.EnumReservedRange */ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_new(upb_arena *arena) { - return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); + return (google_protobuf_EnumDescriptorProto_EnumReservedRange *)_upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena); } UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse(const char *buf, size_t size, upb_arena *arena) { @@ -813,7 +812,7 @@ UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(go /* google.protobuf.EnumValueDescriptorProto */ UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_EnumValueDescriptorProto *)upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); + return (google_protobuf_EnumValueDescriptorProto *)_upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -846,7 +845,7 @@ UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_prot UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_EnumValueOptions*)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); + sub = (struct google_protobuf_EnumValueOptions*)_upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); if (!sub) return NULL; google_protobuf_EnumValueDescriptorProto_set_options(msg, sub); } @@ -856,7 +855,7 @@ UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDes /* google.protobuf.ServiceDescriptorProto */ UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_ServiceDescriptorProto *)upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); + return (google_protobuf_ServiceDescriptorProto *)_upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -881,10 +880,10 @@ UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescri return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto *msg, size_t len, upb_arena *arena) { - return (google_protobuf_MethodDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_MethodDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) { - struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); + struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -897,7 +896,7 @@ UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protob UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_ServiceOptions*)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); + sub = (struct google_protobuf_ServiceOptions*)_upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); if (!sub) return NULL; google_protobuf_ServiceDescriptorProto_set_options(msg, sub); } @@ -907,7 +906,7 @@ UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescrip /* google.protobuf.MethodDescriptorProto */ UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_new(upb_arena *arena) { - return (google_protobuf_MethodDescriptorProto *)upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); + return (google_protobuf_MethodDescriptorProto *)_upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena); } UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse(const char *buf, size_t size, upb_arena *arena) { @@ -950,7 +949,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobu UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); if (sub == NULL) { - sub = (struct google_protobuf_MethodOptions*)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); + sub = (struct google_protobuf_MethodOptions*)_upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); if (!sub) return NULL; google_protobuf_MethodDescriptorProto_set_options(msg, sub); } @@ -968,7 +967,7 @@ UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(googl /* google.protobuf.FileOptions */ UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_new(upb_arena *arena) { - return (google_protobuf_FileOptions *)upb_msg_new(&google_protobuf_FileOptions_msginit, arena); + return (google_protobuf_FileOptions *)_upb_msg_new(&google_protobuf_FileOptions_msginit, arena); } UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1105,10 +1104,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mut return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 192), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(108, 192), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(108, 192), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(108, 192), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1118,7 +1117,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptio /* google.protobuf.MessageOptions */ UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_new(upb_arena *arena) { - return (google_protobuf_MessageOptions *)upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); + return (google_protobuf_MessageOptions *)_upb_msg_new(&google_protobuf_MessageOptions_msginit, arena); } UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1159,10 +1158,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_ return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(8, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1172,7 +1171,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOp /* google.protobuf.FieldOptions */ UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_new(upb_arena *arena) { - return (google_protobuf_FieldOptions *)upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); + return (google_protobuf_FieldOptions *)_upb_msg_new(&google_protobuf_FieldOptions_msginit, arena); } UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1225,10 +1224,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mu return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1238,7 +1237,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOpti /* google.protobuf.OneofOptions */ UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_new(upb_arena *arena) { - return (google_protobuf_OneofOptions *)upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); + return (google_protobuf_OneofOptions *)_upb_msg_new(&google_protobuf_OneofOptions_msginit, arena); } UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1255,10 +1254,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mu return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1268,7 +1267,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOpti /* google.protobuf.EnumOptions */ UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_new(upb_arena *arena) { - return (google_protobuf_EnumOptions *)upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); + return (google_protobuf_EnumOptions *)_upb_msg_new(&google_protobuf_EnumOptions_msginit, arena); } UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1297,10 +1296,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mut return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1310,7 +1309,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptio /* google.protobuf.EnumValueOptions */ UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_new(upb_arena *arena) { - return (google_protobuf_EnumValueOptions *)upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); + return (google_protobuf_EnumValueOptions *)_upb_msg_new(&google_protobuf_EnumValueOptions_msginit, arena); } UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1333,10 +1332,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOption return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1346,7 +1345,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValue /* google.protobuf.ServiceOptions */ UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_new(upb_arena *arena) { - return (google_protobuf_ServiceOptions *)upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); + return (google_protobuf_ServiceOptions *)_upb_msg_new(&google_protobuf_ServiceOptions_msginit, arena); } UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1369,10 +1368,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_ return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1382,7 +1381,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOp /* google.protobuf.MethodOptions */ UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_new(upb_arena *arena) { - return (google_protobuf_MethodOptions *)upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); + return (google_protobuf_MethodOptions *)_upb_msg_new(&google_protobuf_MethodOptions_msginit, arena); } UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1411,10 +1410,10 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_m return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(20, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1424,7 +1423,7 @@ UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOpt /* google.protobuf.UninterpretedOption */ UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_new(upb_arena *arena) { - return (google_protobuf_UninterpretedOption *)upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); + return (google_protobuf_UninterpretedOption *)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena); } UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1453,10 +1452,10 @@ UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_Uninte return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 80), len); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption *msg, size_t len, upb_arena *arena) { - return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_resize_accessor(msg, UPB_SIZE(56, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_resize_accessor(msg, UPB_SIZE(56, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption *msg, upb_arena *arena) { - struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); + struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(56, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1490,7 +1489,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_p /* google.protobuf.UninterpretedOption.NamePart */ UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_new(upb_arena *arena) { - return (google_protobuf_UninterpretedOption_NamePart *)upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); + return (google_protobuf_UninterpretedOption_NamePart *)_upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1518,7 +1517,7 @@ UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(go /* google.protobuf.SourceCodeInfo */ UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_new(upb_arena *arena) { - return (google_protobuf_SourceCodeInfo *)upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); + return (google_protobuf_SourceCodeInfo *)_upb_msg_new(&google_protobuf_SourceCodeInfo_msginit, arena); } UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1535,10 +1534,10 @@ UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeI return (google_protobuf_SourceCodeInfo_Location**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo *msg, size_t len, upb_arena *arena) { - return (google_protobuf_SourceCodeInfo_Location**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_SourceCodeInfo_Location**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo *msg, upb_arena *arena) { - struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); + struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1548,7 +1547,7 @@ UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_Sourc /* google.protobuf.SourceCodeInfo.Location */ UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_new(upb_arena *arena) { - return (google_protobuf_SourceCodeInfo_Location *)upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); + return (google_protobuf_SourceCodeInfo_Location *)_upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena); } UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1571,21 +1570,21 @@ UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_ return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(20, 40), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(20, 40), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) { _upb_sethas(msg, 1); @@ -1599,17 +1598,17 @@ UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_mutable_leading_ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* google.protobuf.GeneratedCodeInfo */ UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_new(upb_arena *arena) { - return (google_protobuf_GeneratedCodeInfo *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena); + return (google_protobuf_GeneratedCodeInfo *)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_msginit, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1626,10 +1625,10 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_Genera return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t len, upb_arena *arena) { - return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena) { - struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); + struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1639,7 +1638,7 @@ UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_ /* google.protobuf.GeneratedCodeInfo.Annotation */ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_new(upb_arena *arena) { - return (google_protobuf_GeneratedCodeInfo_Annotation *)upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); + return (google_protobuf_GeneratedCodeInfo_Annotation *)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1662,11 +1661,11 @@ UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(go return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(20, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(20, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value) { _upb_sethas(msg, 3); diff --git a/src/core/ext/upb-generated/google/protobuf/duration.upb.h b/src/core/ext/upb-generated/google/protobuf/duration.upb.h index f4b35811daf..0ebcce3e498 100644 --- a/src/core/ext/upb-generated/google/protobuf/duration.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/duration.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_PROTOBUF_DURATION_PROTO_UPB_H_ #define GOOGLE_PROTOBUF_DURATION_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -28,7 +27,7 @@ extern const upb_msglayout google_protobuf_Duration_msginit; /* google.protobuf.Duration */ UPB_INLINE google_protobuf_Duration *google_protobuf_Duration_new(upb_arena *arena) { - return (google_protobuf_Duration *)upb_msg_new(&google_protobuf_Duration_msginit, arena); + return (google_protobuf_Duration *)_upb_msg_new(&google_protobuf_Duration_msginit, arena); } UPB_INLINE google_protobuf_Duration *google_protobuf_Duration_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/google/protobuf/empty.upb.h b/src/core/ext/upb-generated/google/protobuf/empty.upb.h index 6232ecf6374..a7471dcd08d 100644 --- a/src/core/ext/upb-generated/google/protobuf/empty.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/empty.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_PROTOBUF_EMPTY_PROTO_UPB_H_ #define GOOGLE_PROTOBUF_EMPTY_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -28,7 +27,7 @@ extern const upb_msglayout google_protobuf_Empty_msginit; /* google.protobuf.Empty */ UPB_INLINE google_protobuf_Empty *google_protobuf_Empty_new(upb_arena *arena) { - return (google_protobuf_Empty *)upb_msg_new(&google_protobuf_Empty_msginit, arena); + return (google_protobuf_Empty *)_upb_msg_new(&google_protobuf_Empty_msginit, arena); } UPB_INLINE google_protobuf_Empty *google_protobuf_Empty_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upb.c b/src/core/ext/upb-generated/google/protobuf/struct.upb.c index 5c199fc5771..a74fb7d7980 100644 --- a/src/core/ext/upb-generated/google/protobuf/struct.upb.c +++ b/src/core/ext/upb-generated/google/protobuf/struct.upb.c @@ -17,7 +17,7 @@ static const upb_msglayout *const google_protobuf_Struct_submsgs[1] = { }; static const upb_msglayout_field google_protobuf_Struct__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 3}, + {1, UPB_SIZE(0, 0), 0, 0, 11, 4}, }; const upb_msglayout google_protobuf_Struct_msginit = { diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upb.h b/src/core/ext/upb-generated/google/protobuf/struct.upb.h index 8d036b57663..2b9609010d3 100644 --- a/src/core/ext/upb-generated/google/protobuf/struct.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/struct.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_ #define GOOGLE_PROTOBUF_STRUCT_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -41,7 +40,7 @@ typedef enum { /* google.protobuf.Struct */ UPB_INLINE google_protobuf_Struct *google_protobuf_Struct_new(upb_arena *arena) { - return (google_protobuf_Struct *)upb_msg_new(&google_protobuf_Struct_msginit, arena); + return (google_protobuf_Struct *)_upb_msg_new(&google_protobuf_Struct_msginit, arena); } UPB_INLINE google_protobuf_Struct *google_protobuf_Struct_parse(const char *buf, size_t size, upb_arena *arena) { @@ -52,59 +51,36 @@ UPB_INLINE char *google_protobuf_Struct_serialize(const google_protobuf_Struct * return upb_encode(msg, &google_protobuf_Struct_msginit, arena, len); } -UPB_INLINE const google_protobuf_Struct_FieldsEntry* const* google_protobuf_Struct_fields(const google_protobuf_Struct *msg, size_t *len) { return (const google_protobuf_Struct_FieldsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } +UPB_INLINE size_t google_protobuf_Struct_fields_size(const google_protobuf_Struct *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); } +UPB_INLINE bool google_protobuf_Struct_fields_get(const google_protobuf_Struct *msg, upb_strview key, google_protobuf_Value* *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, sizeof(*val)); } +UPB_INLINE const google_protobuf_Struct_FieldsEntry* google_protobuf_Struct_fields_next(const google_protobuf_Struct *msg, size_t* iter) { return (const google_protobuf_Struct_FieldsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } -UPB_INLINE google_protobuf_Struct_FieldsEntry** google_protobuf_Struct_mutable_fields(google_protobuf_Struct *msg, size_t *len) { - return (google_protobuf_Struct_FieldsEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); -} -UPB_INLINE google_protobuf_Struct_FieldsEntry** google_protobuf_Struct_resize_fields(google_protobuf_Struct *msg, size_t len, upb_arena *arena) { - return (google_protobuf_Struct_FieldsEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct google_protobuf_Struct_FieldsEntry* google_protobuf_Struct_add_fields(google_protobuf_Struct *msg, upb_arena *arena) { - struct google_protobuf_Struct_FieldsEntry* sub = (struct google_protobuf_Struct_FieldsEntry*)upb_msg_new(&google_protobuf_Struct_FieldsEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void google_protobuf_Struct_fields_clear(google_protobuf_Struct *msg) { _upb_msg_map_clear(msg, UPB_SIZE(0, 0)); } +UPB_INLINE bool google_protobuf_Struct_fields_set(google_protobuf_Struct *msg, upb_strview key, google_protobuf_Value* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(0, 0), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool google_protobuf_Struct_fields_delete(google_protobuf_Struct *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(0, 0), &key, 0); } +UPB_INLINE google_protobuf_Struct_FieldsEntry* google_protobuf_Struct_fields_nextmutable(google_protobuf_Struct *msg, size_t* iter) { return (google_protobuf_Struct_FieldsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } /* google.protobuf.Struct.FieldsEntry */ -UPB_INLINE google_protobuf_Struct_FieldsEntry *google_protobuf_Struct_FieldsEntry_new(upb_arena *arena) { - return (google_protobuf_Struct_FieldsEntry *)upb_msg_new(&google_protobuf_Struct_FieldsEntry_msginit, arena); -} -UPB_INLINE google_protobuf_Struct_FieldsEntry *google_protobuf_Struct_FieldsEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - google_protobuf_Struct_FieldsEntry *ret = google_protobuf_Struct_FieldsEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &google_protobuf_Struct_FieldsEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview google_protobuf_Struct_FieldsEntry_key(const google_protobuf_Struct_FieldsEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *google_protobuf_Struct_FieldsEntry_serialize(const google_protobuf_Struct_FieldsEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &google_protobuf_Struct_FieldsEntry_msginit, arena, len); +UPB_INLINE const google_protobuf_Value* google_protobuf_Struct_FieldsEntry_value(const google_protobuf_Struct_FieldsEntry *msg) { + google_protobuf_Value* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview google_protobuf_Struct_FieldsEntry_key(const google_protobuf_Struct_FieldsEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const google_protobuf_Value* google_protobuf_Struct_FieldsEntry_value(const google_protobuf_Struct_FieldsEntry *msg) { return UPB_FIELD_AT(msg, const google_protobuf_Value*, UPB_SIZE(8, 16)); } - -UPB_INLINE void google_protobuf_Struct_FieldsEntry_set_key(google_protobuf_Struct_FieldsEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void google_protobuf_Struct_FieldsEntry_set_value(google_protobuf_Struct_FieldsEntry *msg, google_protobuf_Value* value) { - UPB_FIELD_AT(msg, google_protobuf_Value*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct google_protobuf_Value* google_protobuf_Struct_FieldsEntry_mutable_value(google_protobuf_Struct_FieldsEntry *msg, upb_arena *arena) { - struct google_protobuf_Value* sub = (struct google_protobuf_Value*)google_protobuf_Struct_FieldsEntry_value(msg); - if (sub == NULL) { - sub = (struct google_protobuf_Value*)upb_msg_new(&google_protobuf_Value_msginit, arena); - if (!sub) return NULL; - google_protobuf_Struct_FieldsEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(google_protobuf_Value*)); } /* google.protobuf.Value */ UPB_INLINE google_protobuf_Value *google_protobuf_Value_new(upb_arena *arena) { - return (google_protobuf_Value *)upb_msg_new(&google_protobuf_Value_msginit, arena); + return (google_protobuf_Value *)_upb_msg_new(&google_protobuf_Value_msginit, arena); } UPB_INLINE google_protobuf_Value *google_protobuf_Value_parse(const char *buf, size_t size, upb_arena *arena) { @@ -157,7 +133,7 @@ UPB_INLINE void google_protobuf_Value_set_struct_value(google_protobuf_Value *ms UPB_INLINE struct google_protobuf_Struct* google_protobuf_Value_mutable_struct_value(google_protobuf_Value *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)google_protobuf_Value_struct_value(msg); if (sub == NULL) { - sub = (struct google_protobuf_Struct*)upb_msg_new(&google_protobuf_Struct_msginit, arena); + sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena); if (!sub) return NULL; google_protobuf_Value_set_struct_value(msg, sub); } @@ -169,7 +145,7 @@ UPB_INLINE void google_protobuf_Value_set_list_value(google_protobuf_Value *msg, UPB_INLINE struct google_protobuf_ListValue* google_protobuf_Value_mutable_list_value(google_protobuf_Value *msg, upb_arena *arena) { struct google_protobuf_ListValue* sub = (struct google_protobuf_ListValue*)google_protobuf_Value_list_value(msg); if (sub == NULL) { - sub = (struct google_protobuf_ListValue*)upb_msg_new(&google_protobuf_ListValue_msginit, arena); + sub = (struct google_protobuf_ListValue*)_upb_msg_new(&google_protobuf_ListValue_msginit, arena); if (!sub) return NULL; google_protobuf_Value_set_list_value(msg, sub); } @@ -179,7 +155,7 @@ UPB_INLINE struct google_protobuf_ListValue* google_protobuf_Value_mutable_list_ /* google.protobuf.ListValue */ UPB_INLINE google_protobuf_ListValue *google_protobuf_ListValue_new(upb_arena *arena) { - return (google_protobuf_ListValue *)upb_msg_new(&google_protobuf_ListValue_msginit, arena); + return (google_protobuf_ListValue *)_upb_msg_new(&google_protobuf_ListValue_msginit, arena); } UPB_INLINE google_protobuf_ListValue *google_protobuf_ListValue_parse(const char *buf, size_t size, upb_arena *arena) { @@ -196,10 +172,10 @@ UPB_INLINE google_protobuf_Value** google_protobuf_ListValue_mutable_values(goog return (google_protobuf_Value**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_Value** google_protobuf_ListValue_resize_values(google_protobuf_ListValue *msg, size_t len, upb_arena *arena) { - return (google_protobuf_Value**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_protobuf_Value**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_Value* google_protobuf_ListValue_add_values(google_protobuf_ListValue *msg, upb_arena *arena) { - struct google_protobuf_Value* sub = (struct google_protobuf_Value*)upb_msg_new(&google_protobuf_Value_msginit, arena); + struct google_protobuf_Value* sub = (struct google_protobuf_Value*)_upb_msg_new(&google_protobuf_Value_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; diff --git a/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h b/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h index ec4dfe9444a..7d4b1bcb0af 100644 --- a/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_ #define GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -28,7 +27,7 @@ extern const upb_msglayout google_protobuf_Timestamp_msginit; /* google.protobuf.Timestamp */ UPB_INLINE google_protobuf_Timestamp *google_protobuf_Timestamp_new(upb_arena *arena) { - return (google_protobuf_Timestamp *)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + return (google_protobuf_Timestamp *)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena); } UPB_INLINE google_protobuf_Timestamp *google_protobuf_Timestamp_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h b/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h index 589c21355bf..d59457f2def 100644 --- a/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ #define GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -52,7 +51,7 @@ extern const upb_msglayout google_protobuf_BytesValue_msginit; /* google.protobuf.DoubleValue */ UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_new(upb_arena *arena) { - return (google_protobuf_DoubleValue *)upb_msg_new(&google_protobuf_DoubleValue_msginit, arena); + return (google_protobuf_DoubleValue *)_upb_msg_new(&google_protobuf_DoubleValue_msginit, arena); } UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_parse(const char *buf, size_t size, upb_arena *arena) { @@ -72,7 +71,7 @@ UPB_INLINE void google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValu /* google.protobuf.FloatValue */ UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_new(upb_arena *arena) { - return (google_protobuf_FloatValue *)upb_msg_new(&google_protobuf_FloatValue_msginit, arena); + return (google_protobuf_FloatValue *)_upb_msg_new(&google_protobuf_FloatValue_msginit, arena); } UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_parse(const char *buf, size_t size, upb_arena *arena) { @@ -92,7 +91,7 @@ UPB_INLINE void google_protobuf_FloatValue_set_value(google_protobuf_FloatValue /* google.protobuf.Int64Value */ UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_new(upb_arena *arena) { - return (google_protobuf_Int64Value *)upb_msg_new(&google_protobuf_Int64Value_msginit, arena); + return (google_protobuf_Int64Value *)_upb_msg_new(&google_protobuf_Int64Value_msginit, arena); } UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_parse(const char *buf, size_t size, upb_arena *arena) { @@ -112,7 +111,7 @@ UPB_INLINE void google_protobuf_Int64Value_set_value(google_protobuf_Int64Value /* google.protobuf.UInt64Value */ UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_new(upb_arena *arena) { - return (google_protobuf_UInt64Value *)upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); + return (google_protobuf_UInt64Value *)_upb_msg_new(&google_protobuf_UInt64Value_msginit, arena); } UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_parse(const char *buf, size_t size, upb_arena *arena) { @@ -132,7 +131,7 @@ UPB_INLINE void google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Valu /* google.protobuf.Int32Value */ UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_new(upb_arena *arena) { - return (google_protobuf_Int32Value *)upb_msg_new(&google_protobuf_Int32Value_msginit, arena); + return (google_protobuf_Int32Value *)_upb_msg_new(&google_protobuf_Int32Value_msginit, arena); } UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_parse(const char *buf, size_t size, upb_arena *arena) { @@ -152,7 +151,7 @@ UPB_INLINE void google_protobuf_Int32Value_set_value(google_protobuf_Int32Value /* google.protobuf.UInt32Value */ UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_new(upb_arena *arena) { - return (google_protobuf_UInt32Value *)upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); + return (google_protobuf_UInt32Value *)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena); } UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_parse(const char *buf, size_t size, upb_arena *arena) { @@ -172,7 +171,7 @@ UPB_INLINE void google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Valu /* google.protobuf.BoolValue */ UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_new(upb_arena *arena) { - return (google_protobuf_BoolValue *)upb_msg_new(&google_protobuf_BoolValue_msginit, arena); + return (google_protobuf_BoolValue *)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena); } UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_parse(const char *buf, size_t size, upb_arena *arena) { @@ -192,7 +191,7 @@ UPB_INLINE void google_protobuf_BoolValue_set_value(google_protobuf_BoolValue *m /* google.protobuf.StringValue */ UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_new(upb_arena *arena) { - return (google_protobuf_StringValue *)upb_msg_new(&google_protobuf_StringValue_msginit, arena); + return (google_protobuf_StringValue *)_upb_msg_new(&google_protobuf_StringValue_msginit, arena); } UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_parse(const char *buf, size_t size, upb_arena *arena) { @@ -212,7 +211,7 @@ UPB_INLINE void google_protobuf_StringValue_set_value(google_protobuf_StringValu /* google.protobuf.BytesValue */ UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_new(upb_arena *arena) { - return (google_protobuf_BytesValue *)upb_msg_new(&google_protobuf_BytesValue_msginit, arena); + return (google_protobuf_BytesValue *)_upb_msg_new(&google_protobuf_BytesValue_msginit, arena); } UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/google/rpc/status.upb.h b/src/core/ext/upb-generated/google/rpc/status.upb.h index 6c35d83dc1d..3a61d726440 100644 --- a/src/core/ext/upb-generated/google/rpc/status.upb.h +++ b/src/core/ext/upb-generated/google/rpc/status.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_RPC_STATUS_PROTO_UPB_H_ #define GOOGLE_RPC_STATUS_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -30,7 +29,7 @@ extern const upb_msglayout google_protobuf_Any_msginit; /* google.rpc.Status */ UPB_INLINE google_rpc_Status *google_rpc_Status_new(upb_arena *arena) { - return (google_rpc_Status *)upb_msg_new(&google_rpc_Status_msginit, arena); + return (google_rpc_Status *)_upb_msg_new(&google_rpc_Status_msginit, arena); } UPB_INLINE google_rpc_Status *google_rpc_Status_parse(const char *buf, size_t size, upb_arena *arena) { @@ -55,10 +54,10 @@ UPB_INLINE struct google_protobuf_Any** google_rpc_Status_mutable_details(google return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE struct google_protobuf_Any** google_rpc_Status_resize_details(google_rpc_Status *msg, size_t len, upb_arena *arena) { - return (struct google_protobuf_Any**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct google_protobuf_Any**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_Any* google_rpc_Status_add_details(google_rpc_Status *msg, upb_arena *arena) { - struct google_protobuf_Any* sub = (struct google_protobuf_Any*)upb_msg_new(&google_protobuf_Any_msginit, arena); + struct google_protobuf_Any* sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c index 9ffd2fbb4c0..6da40eeadfd 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c @@ -25,7 +25,7 @@ static const upb_msglayout_field grpc_gcp_AltsContext__fields[7] = { {4, UPB_SIZE(24, 40), 0, 0, 9, 1}, {5, UPB_SIZE(32, 56), 0, 0, 9, 1}, {6, UPB_SIZE(40, 72), 0, 1, 11, 1}, - {7, UPB_SIZE(44, 80), 0, 0, 11, 3}, + {7, UPB_SIZE(44, 80), 0, 0, 11, 4}, }; const upb_msglayout grpc_gcp_AltsContext_msginit = { diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h index ce32864cbc3..44534b12a3b 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h @@ -9,7 +9,6 @@ #ifndef SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPB_H_ #define SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -33,7 +32,7 @@ extern const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit; /* grpc.gcp.AltsContext */ UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_new(upb_arena *arena) { - return (grpc_gcp_AltsContext *)upb_msg_new(&grpc_gcp_AltsContext_msginit, arena); + return (grpc_gcp_AltsContext *)_upb_msg_new(&grpc_gcp_AltsContext_msginit, arena); } UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_parse(const char *buf, size_t size, upb_arena *arena) { @@ -50,7 +49,9 @@ UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContex UPB_INLINE upb_strview grpc_gcp_AltsContext_peer_service_account(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 40)); } UPB_INLINE upb_strview grpc_gcp_AltsContext_local_service_account(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 56)); } UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, const struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(40, 72)); } -UPB_INLINE const grpc_gcp_AltsContext_PeerAttributesEntry* const* grpc_gcp_AltsContext_peer_attributes(const grpc_gcp_AltsContext *msg, size_t *len) { return (const grpc_gcp_AltsContext_PeerAttributesEntry* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); } +UPB_INLINE size_t grpc_gcp_AltsContext_peer_attributes_size(const grpc_gcp_AltsContext *msg) {return _upb_msg_map_size(msg, UPB_SIZE(44, 80)); } +UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_get(const grpc_gcp_AltsContext *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(44, 80), &key, 0, val, 0); } +UPB_INLINE const grpc_gcp_AltsContext_PeerAttributesEntry* grpc_gcp_AltsContext_peer_attributes_next(const grpc_gcp_AltsContext *msg, size_t* iter) { return (const grpc_gcp_AltsContext_PeerAttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 80), iter); } UPB_INLINE void grpc_gcp_AltsContext_set_application_protocol(grpc_gcp_AltsContext *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; @@ -73,48 +74,32 @@ UPB_INLINE void grpc_gcp_AltsContext_set_peer_rpc_versions(grpc_gcp_AltsContext UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_mutable_peer_rpc_versions(grpc_gcp_AltsContext *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_AltsContext_peer_rpc_versions(msg); if (sub == NULL) { - sub = (struct grpc_gcp_RpcProtocolVersions*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); + sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); if (!sub) return NULL; grpc_gcp_AltsContext_set_peer_rpc_versions(msg, sub); } return sub; } -UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry** grpc_gcp_AltsContext_mutable_peer_attributes(grpc_gcp_AltsContext *msg, size_t *len) { - return (grpc_gcp_AltsContext_PeerAttributesEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len); -} -UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry** grpc_gcp_AltsContext_resize_peer_attributes(grpc_gcp_AltsContext *msg, size_t len, upb_arena *arena) { - return (grpc_gcp_AltsContext_PeerAttributesEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct grpc_gcp_AltsContext_PeerAttributesEntry* grpc_gcp_AltsContext_add_peer_attributes(grpc_gcp_AltsContext *msg, upb_arena *arena) { - struct grpc_gcp_AltsContext_PeerAttributesEntry* sub = (struct grpc_gcp_AltsContext_PeerAttributesEntry*)upb_msg_new(&grpc_gcp_AltsContext_PeerAttributesEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void grpc_gcp_AltsContext_peer_attributes_clear(grpc_gcp_AltsContext *msg) { _upb_msg_map_clear(msg, UPB_SIZE(44, 80)); } +UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_set(grpc_gcp_AltsContext *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(44, 80), &key, 0, &val, 0, a); } +UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_delete(grpc_gcp_AltsContext *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(44, 80), &key, 0); } +UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry* grpc_gcp_AltsContext_peer_attributes_nextmutable(grpc_gcp_AltsContext *msg, size_t* iter) { return (grpc_gcp_AltsContext_PeerAttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 80), iter); } /* grpc.gcp.AltsContext.PeerAttributesEntry */ -UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry *grpc_gcp_AltsContext_PeerAttributesEntry_new(upb_arena *arena) { - return (grpc_gcp_AltsContext_PeerAttributesEntry *)upb_msg_new(&grpc_gcp_AltsContext_PeerAttributesEntry_msginit, arena); +UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_key(const grpc_gcp_AltsContext_PeerAttributesEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE grpc_gcp_AltsContext_PeerAttributesEntry *grpc_gcp_AltsContext_PeerAttributesEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - grpc_gcp_AltsContext_PeerAttributesEntry *ret = grpc_gcp_AltsContext_PeerAttributesEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &grpc_gcp_AltsContext_PeerAttributesEntry_msginit, arena)) ? ret : NULL; -} -UPB_INLINE char *grpc_gcp_AltsContext_PeerAttributesEntry_serialize(const grpc_gcp_AltsContext_PeerAttributesEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &grpc_gcp_AltsContext_PeerAttributesEntry_msginit, arena, len); +UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_value(const grpc_gcp_AltsContext_PeerAttributesEntry *msg) { + upb_strview ret; + _upb_msg_map_value(msg, &ret, 0); + return ret; } -UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_key(const grpc_gcp_AltsContext_PeerAttributesEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview grpc_gcp_AltsContext_PeerAttributesEntry_value(const grpc_gcp_AltsContext_PeerAttributesEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } - -UPB_INLINE void grpc_gcp_AltsContext_PeerAttributesEntry_set_key(grpc_gcp_AltsContext_PeerAttributesEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void grpc_gcp_AltsContext_PeerAttributesEntry_set_value(grpc_gcp_AltsContext_PeerAttributesEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + _upb_msg_map_set_value(msg, &value, 0); } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c index d30ef6c0c3a..cce3599f791 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c @@ -32,7 +32,7 @@ static const upb_msglayout *const grpc_gcp_Identity_submsgs[1] = { static const upb_msglayout_field grpc_gcp_Identity__fields[3] = { {1, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, {2, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, - {3, UPB_SIZE(0, 0), 0, 0, 11, 3}, + {3, UPB_SIZE(0, 0), 0, 0, 11, 4}, }; const upb_msglayout grpc_gcp_Identity_msginit = { @@ -100,7 +100,7 @@ static const upb_msglayout *const grpc_gcp_StartServerHandshakeReq_submsgs[4] = static const upb_msglayout_field grpc_gcp_StartServerHandshakeReq__fields[7] = { {1, UPB_SIZE(24, 48), 0, 0, 9, 3}, - {2, UPB_SIZE(28, 56), 0, 2, 11, 3}, + {2, UPB_SIZE(28, 56), 0, 2, 11, 4}, {3, UPB_SIZE(4, 8), 0, 0, 12, 1}, {4, UPB_SIZE(12, 24), 0, 0, 11, 1}, {5, UPB_SIZE(16, 32), 0, 0, 11, 1}, @@ -120,13 +120,13 @@ static const upb_msglayout *const grpc_gcp_StartServerHandshakeReq_HandshakePara static const upb_msglayout_field grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry__fields[2] = { {1, UPB_SIZE(0, 0), 0, 0, 5, 1}, - {2, UPB_SIZE(4, 8), 0, 0, 11, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, }; const upb_msglayout grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit = { &grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_submsgs[0], &grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry__fields[0], - UPB_SIZE(8, 16), 2, false, + UPB_SIZE(16, 32), 2, false, }; static const upb_msglayout_field grpc_gcp_NextHandshakeMessageReq__fields[1] = { diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h index aad1a9d1fc3..2291d29d974 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h @@ -9,7 +9,6 @@ #ifndef SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPB_H_ #define SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -75,7 +74,7 @@ typedef enum { /* grpc.gcp.Endpoint */ UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_new(upb_arena *arena) { - return (grpc_gcp_Endpoint *)upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); + return (grpc_gcp_Endpoint *)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); } UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_parse(const char *buf, size_t size, upb_arena *arena) { @@ -103,7 +102,7 @@ UPB_INLINE void grpc_gcp_Endpoint_set_protocol(grpc_gcp_Endpoint *msg, int32_t v /* grpc.gcp.Identity */ UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_new(upb_arena *arena) { - return (grpc_gcp_Identity *)upb_msg_new(&grpc_gcp_Identity_msginit, arena); + return (grpc_gcp_Identity *)_upb_msg_new(&grpc_gcp_Identity_msginit, arena); } UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_parse(const char *buf, size_t size, upb_arena *arena) { @@ -125,7 +124,9 @@ UPB_INLINE bool grpc_gcp_Identity_has_service_account(const grpc_gcp_Identity *m UPB_INLINE upb_strview grpc_gcp_Identity_service_account(const grpc_gcp_Identity *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 1, upb_strview_make("", strlen(""))); } UPB_INLINE bool grpc_gcp_Identity_has_hostname(const grpc_gcp_Identity *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE upb_strview grpc_gcp_Identity_hostname(const grpc_gcp_Identity *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE const grpc_gcp_Identity_AttributesEntry* const* grpc_gcp_Identity_attributes(const grpc_gcp_Identity *msg, size_t *len) { return (const grpc_gcp_Identity_AttributesEntry* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } +UPB_INLINE size_t grpc_gcp_Identity_attributes_size(const grpc_gcp_Identity *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); } +UPB_INLINE bool grpc_gcp_Identity_attributes_get(const grpc_gcp_Identity *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, 0); } +UPB_INLINE const grpc_gcp_Identity_AttributesEntry* grpc_gcp_Identity_attributes_next(const grpc_gcp_Identity *msg, size_t* iter) { return (const grpc_gcp_Identity_AttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } UPB_INLINE void grpc_gcp_Identity_set_service_account(grpc_gcp_Identity *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 1); @@ -133,48 +134,32 @@ UPB_INLINE void grpc_gcp_Identity_set_service_account(grpc_gcp_Identity *msg, up UPB_INLINE void grpc_gcp_Identity_set_hostname(grpc_gcp_Identity *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 2); } -UPB_INLINE grpc_gcp_Identity_AttributesEntry** grpc_gcp_Identity_mutable_attributes(grpc_gcp_Identity *msg, size_t *len) { - return (grpc_gcp_Identity_AttributesEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); -} -UPB_INLINE grpc_gcp_Identity_AttributesEntry** grpc_gcp_Identity_resize_attributes(grpc_gcp_Identity *msg, size_t len, upb_arena *arena) { - return (grpc_gcp_Identity_AttributesEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct grpc_gcp_Identity_AttributesEntry* grpc_gcp_Identity_add_attributes(grpc_gcp_Identity *msg, upb_arena *arena) { - struct grpc_gcp_Identity_AttributesEntry* sub = (struct grpc_gcp_Identity_AttributesEntry*)upb_msg_new(&grpc_gcp_Identity_AttributesEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void grpc_gcp_Identity_attributes_clear(grpc_gcp_Identity *msg) { _upb_msg_map_clear(msg, UPB_SIZE(0, 0)); } +UPB_INLINE bool grpc_gcp_Identity_attributes_set(grpc_gcp_Identity *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(0, 0), &key, 0, &val, 0, a); } +UPB_INLINE bool grpc_gcp_Identity_attributes_delete(grpc_gcp_Identity *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(0, 0), &key, 0); } +UPB_INLINE grpc_gcp_Identity_AttributesEntry* grpc_gcp_Identity_attributes_nextmutable(grpc_gcp_Identity *msg, size_t* iter) { return (grpc_gcp_Identity_AttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } /* grpc.gcp.Identity.AttributesEntry */ -UPB_INLINE grpc_gcp_Identity_AttributesEntry *grpc_gcp_Identity_AttributesEntry_new(upb_arena *arena) { - return (grpc_gcp_Identity_AttributesEntry *)upb_msg_new(&grpc_gcp_Identity_AttributesEntry_msginit, arena); -} -UPB_INLINE grpc_gcp_Identity_AttributesEntry *grpc_gcp_Identity_AttributesEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - grpc_gcp_Identity_AttributesEntry *ret = grpc_gcp_Identity_AttributesEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &grpc_gcp_Identity_AttributesEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview grpc_gcp_Identity_AttributesEntry_key(const grpc_gcp_Identity_AttributesEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *grpc_gcp_Identity_AttributesEntry_serialize(const grpc_gcp_Identity_AttributesEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &grpc_gcp_Identity_AttributesEntry_msginit, arena, len); +UPB_INLINE upb_strview grpc_gcp_Identity_AttributesEntry_value(const grpc_gcp_Identity_AttributesEntry *msg) { + upb_strview ret; + _upb_msg_map_value(msg, &ret, 0); + return ret; } -UPB_INLINE upb_strview grpc_gcp_Identity_AttributesEntry_key(const grpc_gcp_Identity_AttributesEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview grpc_gcp_Identity_AttributesEntry_value(const grpc_gcp_Identity_AttributesEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } - -UPB_INLINE void grpc_gcp_Identity_AttributesEntry_set_key(grpc_gcp_Identity_AttributesEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void grpc_gcp_Identity_AttributesEntry_set_value(grpc_gcp_Identity_AttributesEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + _upb_msg_map_set_value(msg, &value, 0); } /* grpc.gcp.StartClientHandshakeReq */ UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_new(upb_arena *arena) { - return (grpc_gcp_StartClientHandshakeReq *)upb_msg_new(&grpc_gcp_StartClientHandshakeReq_msginit, arena); + return (grpc_gcp_StartClientHandshakeReq *)_upb_msg_new(&grpc_gcp_StartClientHandshakeReq_msginit, arena); } UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_parse(const char *buf, size_t size, upb_arena *arena) { @@ -203,30 +188,30 @@ UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_application_pro return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len); } UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_resize_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_add_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(36, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(36, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len); } UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_resize_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_add_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(40, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(40, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE grpc_gcp_Identity** grpc_gcp_StartClientHandshakeReq_mutable_target_identities(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (grpc_gcp_Identity**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len); } UPB_INLINE grpc_gcp_Identity** grpc_gcp_StartClientHandshakeReq_resize_target_identities(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) { - return (grpc_gcp_Identity**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (grpc_gcp_Identity**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_add_target_identities(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { - struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)upb_msg_new(&grpc_gcp_Identity_msginit, arena); + struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -238,7 +223,7 @@ UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_identity(grpc_gcp_Sta UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_mutable_local_identity(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_StartClientHandshakeReq_local_identity(msg); if (sub == NULL) { - sub = (struct grpc_gcp_Identity*)upb_msg_new(&grpc_gcp_Identity_msginit, arena); + sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena); if (!sub) return NULL; grpc_gcp_StartClientHandshakeReq_set_local_identity(msg, sub); } @@ -250,7 +235,7 @@ UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_endpoint(grpc_gcp_Sta UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartClientHandshakeReq_local_endpoint(msg); if (sub == NULL) { - sub = (struct grpc_gcp_Endpoint*)upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); + sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); if (!sub) return NULL; grpc_gcp_StartClientHandshakeReq_set_local_endpoint(msg, sub); } @@ -262,7 +247,7 @@ UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(grpc_gcp_St UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartClientHandshakeReq_remote_endpoint(msg); if (sub == NULL) { - sub = (struct grpc_gcp_Endpoint*)upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); + sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); if (!sub) return NULL; grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(msg, sub); } @@ -277,7 +262,7 @@ UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_rpc_versions(grpc_gcp_Start UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_mutable_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartClientHandshakeReq_rpc_versions(msg); if (sub == NULL) { - sub = (struct grpc_gcp_RpcProtocolVersions*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); + sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); if (!sub) return NULL; grpc_gcp_StartClientHandshakeReq_set_rpc_versions(msg, sub); } @@ -290,7 +275,7 @@ UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_max_frame_size(grpc_gcp_Sta /* grpc.gcp.ServerHandshakeParameters */ UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_new(upb_arena *arena) { - return (grpc_gcp_ServerHandshakeParameters *)upb_msg_new(&grpc_gcp_ServerHandshakeParameters_msginit, arena); + return (grpc_gcp_ServerHandshakeParameters *)_upb_msg_new(&grpc_gcp_ServerHandshakeParameters_msginit, arena); } UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_parse(const char *buf, size_t size, upb_arena *arena) { @@ -308,20 +293,20 @@ UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_mutable_record_protoc return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_resize_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool grpc_gcp_ServerHandshakeParameters_add_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE grpc_gcp_Identity** grpc_gcp_ServerHandshakeParameters_mutable_local_identities(grpc_gcp_ServerHandshakeParameters *msg, size_t *len) { return (grpc_gcp_Identity**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE grpc_gcp_Identity** grpc_gcp_ServerHandshakeParameters_resize_local_identities(grpc_gcp_ServerHandshakeParameters *msg, size_t len, upb_arena *arena) { - return (grpc_gcp_Identity**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (grpc_gcp_Identity**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_ServerHandshakeParameters_add_local_identities(grpc_gcp_ServerHandshakeParameters *msg, upb_arena *arena) { - struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)upb_msg_new(&grpc_gcp_Identity_msginit, arena); + struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -331,7 +316,7 @@ UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_ServerHandshakeParameters_add_loca /* grpc.gcp.StartServerHandshakeReq */ UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_new(upb_arena *arena) { - return (grpc_gcp_StartServerHandshakeReq *)upb_msg_new(&grpc_gcp_StartServerHandshakeReq_msginit, arena); + return (grpc_gcp_StartServerHandshakeReq *)_upb_msg_new(&grpc_gcp_StartServerHandshakeReq_msginit, arena); } UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_parse(const char *buf, size_t size, upb_arena *arena) { @@ -343,7 +328,9 @@ UPB_INLINE char *grpc_gcp_StartServerHandshakeReq_serialize(const grpc_gcp_Start } UPB_INLINE upb_strview const* grpc_gcp_StartServerHandshakeReq_application_protocols(const grpc_gcp_StartServerHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } -UPB_INLINE const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* const* grpc_gcp_StartServerHandshakeReq_handshake_parameters(const grpc_gcp_StartServerHandshakeReq *msg, size_t *len) { return (const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } +UPB_INLINE size_t grpc_gcp_StartServerHandshakeReq_handshake_parameters_size(const grpc_gcp_StartServerHandshakeReq *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 56)); } +UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_get(const grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* *val) { return _upb_msg_map_get(msg, UPB_SIZE(28, 56), &key, sizeof(key), val, sizeof(*val)); } +UPB_INLINE const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_next(const grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); } UPB_INLINE upb_strview grpc_gcp_StartServerHandshakeReq_in_bytes(const grpc_gcp_StartServerHandshakeReq *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Endpoint*, UPB_SIZE(12, 24)); } UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Endpoint*, UPB_SIZE(16, 32)); } @@ -354,25 +341,16 @@ UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_mutable_application_pro return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_resize_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_add_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); -} -UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry** grpc_gcp_StartServerHandshakeReq_mutable_handshake_parameters(grpc_gcp_StartServerHandshakeReq *msg, size_t *len) { - return (grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); -} -UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry** grpc_gcp_StartServerHandshakeReq_resize_handshake_parameters(grpc_gcp_StartServerHandshakeReq *msg, size_t len, upb_arena *arena) { - return (grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_add_handshake_parameters(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) { - struct grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* sub = (struct grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)upb_msg_new(&grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; + return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } +UPB_INLINE void grpc_gcp_StartServerHandshakeReq_handshake_parameters_clear(grpc_gcp_StartServerHandshakeReq *msg) { _upb_msg_map_clear(msg, UPB_SIZE(28, 56)); } +UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_set(grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(28, 56), &key, sizeof(key), &val, sizeof(val), a); } +UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_delete(grpc_gcp_StartServerHandshakeReq *msg, int32_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(28, 56), &key, sizeof(key)); } +UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_nextmutable(grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); } UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_in_bytes(grpc_gcp_StartServerHandshakeReq *msg, upb_strview value) { UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; } @@ -382,7 +360,7 @@ UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_local_endpoint(grpc_gcp_Sta UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_local_endpoint(msg); if (sub == NULL) { - sub = (struct grpc_gcp_Endpoint*)upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); + sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); if (!sub) return NULL; grpc_gcp_StartServerHandshakeReq_set_local_endpoint(msg, sub); } @@ -394,7 +372,7 @@ UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(grpc_gcp_St UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_remote_endpoint(msg); if (sub == NULL) { - sub = (struct grpc_gcp_Endpoint*)upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); + sub = (struct grpc_gcp_Endpoint*)_upb_msg_new(&grpc_gcp_Endpoint_msginit, arena); if (!sub) return NULL; grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(msg, sub); } @@ -406,7 +384,7 @@ UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_rpc_versions(grpc_gcp_Start UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_mutable_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartServerHandshakeReq_rpc_versions(msg); if (sub == NULL) { - sub = (struct grpc_gcp_RpcProtocolVersions*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); + sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); if (!sub) return NULL; grpc_gcp_StartServerHandshakeReq_set_rpc_versions(msg, sub); } @@ -418,41 +396,25 @@ UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_max_frame_size(grpc_gcp_Sta /* grpc.gcp.StartServerHandshakeReq.HandshakeParametersEntry */ -UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_new(upb_arena *arena) { - return (grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *)upb_msg_new(&grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit, arena); +UPB_INLINE int32_t grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_key(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) { + int32_t ret; + _upb_msg_map_key(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *ret = grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE const grpc_gcp_ServerHandshakeParameters* grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) { + grpc_gcp_ServerHandshakeParameters* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE char *grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_serialize(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit, arena, len); -} - -UPB_INLINE int32_t grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_key(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const grpc_gcp_ServerHandshakeParameters* grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_ServerHandshakeParameters*, UPB_SIZE(4, 8)); } -UPB_INLINE void grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_set_key(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_set_value(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg, grpc_gcp_ServerHandshakeParameters* value) { - UPB_FIELD_AT(msg, grpc_gcp_ServerHandshakeParameters*, UPB_SIZE(4, 8)) = value; -} -UPB_INLINE struct grpc_gcp_ServerHandshakeParameters* grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_mutable_value(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg, upb_arena *arena) { - struct grpc_gcp_ServerHandshakeParameters* sub = (struct grpc_gcp_ServerHandshakeParameters*)grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value(msg); - if (sub == NULL) { - sub = (struct grpc_gcp_ServerHandshakeParameters*)upb_msg_new(&grpc_gcp_ServerHandshakeParameters_msginit, arena); - if (!sub) return NULL; - grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(grpc_gcp_ServerHandshakeParameters*)); } /* grpc.gcp.NextHandshakeMessageReq */ UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_new(upb_arena *arena) { - return (grpc_gcp_NextHandshakeMessageReq *)upb_msg_new(&grpc_gcp_NextHandshakeMessageReq_msginit, arena); + return (grpc_gcp_NextHandshakeMessageReq *)_upb_msg_new(&grpc_gcp_NextHandshakeMessageReq_msginit, arena); } UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_parse(const char *buf, size_t size, upb_arena *arena) { @@ -472,7 +434,7 @@ UPB_INLINE void grpc_gcp_NextHandshakeMessageReq_set_in_bytes(grpc_gcp_NextHands /* grpc.gcp.HandshakerReq */ UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_new(upb_arena *arena) { - return (grpc_gcp_HandshakerReq *)upb_msg_new(&grpc_gcp_HandshakerReq_msginit, arena); + return (grpc_gcp_HandshakerReq *)_upb_msg_new(&grpc_gcp_HandshakerReq_msginit, arena); } UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_parse(const char *buf, size_t size, upb_arena *arena) { @@ -504,7 +466,7 @@ UPB_INLINE void grpc_gcp_HandshakerReq_set_client_start(grpc_gcp_HandshakerReq * UPB_INLINE struct grpc_gcp_StartClientHandshakeReq* grpc_gcp_HandshakerReq_mutable_client_start(grpc_gcp_HandshakerReq *msg, upb_arena *arena) { struct grpc_gcp_StartClientHandshakeReq* sub = (struct grpc_gcp_StartClientHandshakeReq*)grpc_gcp_HandshakerReq_client_start(msg); if (sub == NULL) { - sub = (struct grpc_gcp_StartClientHandshakeReq*)upb_msg_new(&grpc_gcp_StartClientHandshakeReq_msginit, arena); + sub = (struct grpc_gcp_StartClientHandshakeReq*)_upb_msg_new(&grpc_gcp_StartClientHandshakeReq_msginit, arena); if (!sub) return NULL; grpc_gcp_HandshakerReq_set_client_start(msg, sub); } @@ -516,7 +478,7 @@ UPB_INLINE void grpc_gcp_HandshakerReq_set_server_start(grpc_gcp_HandshakerReq * UPB_INLINE struct grpc_gcp_StartServerHandshakeReq* grpc_gcp_HandshakerReq_mutable_server_start(grpc_gcp_HandshakerReq *msg, upb_arena *arena) { struct grpc_gcp_StartServerHandshakeReq* sub = (struct grpc_gcp_StartServerHandshakeReq*)grpc_gcp_HandshakerReq_server_start(msg); if (sub == NULL) { - sub = (struct grpc_gcp_StartServerHandshakeReq*)upb_msg_new(&grpc_gcp_StartServerHandshakeReq_msginit, arena); + sub = (struct grpc_gcp_StartServerHandshakeReq*)_upb_msg_new(&grpc_gcp_StartServerHandshakeReq_msginit, arena); if (!sub) return NULL; grpc_gcp_HandshakerReq_set_server_start(msg, sub); } @@ -528,7 +490,7 @@ UPB_INLINE void grpc_gcp_HandshakerReq_set_next(grpc_gcp_HandshakerReq *msg, grp UPB_INLINE struct grpc_gcp_NextHandshakeMessageReq* grpc_gcp_HandshakerReq_mutable_next(grpc_gcp_HandshakerReq *msg, upb_arena *arena) { struct grpc_gcp_NextHandshakeMessageReq* sub = (struct grpc_gcp_NextHandshakeMessageReq*)grpc_gcp_HandshakerReq_next(msg); if (sub == NULL) { - sub = (struct grpc_gcp_NextHandshakeMessageReq*)upb_msg_new(&grpc_gcp_NextHandshakeMessageReq_msginit, arena); + sub = (struct grpc_gcp_NextHandshakeMessageReq*)_upb_msg_new(&grpc_gcp_NextHandshakeMessageReq_msginit, arena); if (!sub) return NULL; grpc_gcp_HandshakerReq_set_next(msg, sub); } @@ -538,7 +500,7 @@ UPB_INLINE struct grpc_gcp_NextHandshakeMessageReq* grpc_gcp_HandshakerReq_mutab /* grpc.gcp.HandshakerResult */ UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_new(upb_arena *arena) { - return (grpc_gcp_HandshakerResult *)upb_msg_new(&grpc_gcp_HandshakerResult_msginit, arena); + return (grpc_gcp_HandshakerResult *)_upb_msg_new(&grpc_gcp_HandshakerResult_msginit, arena); } UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_parse(const char *buf, size_t size, upb_arena *arena) { @@ -573,7 +535,7 @@ UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_identity(grpc_gcp_HandshakerR UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_peer_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) { struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_peer_identity(msg); if (sub == NULL) { - sub = (struct grpc_gcp_Identity*)upb_msg_new(&grpc_gcp_Identity_msginit, arena); + sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena); if (!sub) return NULL; grpc_gcp_HandshakerResult_set_peer_identity(msg, sub); } @@ -585,7 +547,7 @@ UPB_INLINE void grpc_gcp_HandshakerResult_set_local_identity(grpc_gcp_Handshaker UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_local_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) { struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_local_identity(msg); if (sub == NULL) { - sub = (struct grpc_gcp_Identity*)upb_msg_new(&grpc_gcp_Identity_msginit, arena); + sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena); if (!sub) return NULL; grpc_gcp_HandshakerResult_set_local_identity(msg, sub); } @@ -600,7 +562,7 @@ UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_rpc_versions(grpc_gcp_Handsha UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_mutable_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_HandshakerResult_peer_rpc_versions(msg); if (sub == NULL) { - sub = (struct grpc_gcp_RpcProtocolVersions*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); + sub = (struct grpc_gcp_RpcProtocolVersions*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); if (!sub) return NULL; grpc_gcp_HandshakerResult_set_peer_rpc_versions(msg, sub); } @@ -613,7 +575,7 @@ UPB_INLINE void grpc_gcp_HandshakerResult_set_max_frame_size(grpc_gcp_Handshaker /* grpc.gcp.HandshakerStatus */ UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_new(upb_arena *arena) { - return (grpc_gcp_HandshakerStatus *)upb_msg_new(&grpc_gcp_HandshakerStatus_msginit, arena); + return (grpc_gcp_HandshakerStatus *)_upb_msg_new(&grpc_gcp_HandshakerStatus_msginit, arena); } UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_parse(const char *buf, size_t size, upb_arena *arena) { @@ -637,7 +599,7 @@ UPB_INLINE void grpc_gcp_HandshakerStatus_set_details(grpc_gcp_HandshakerStatus /* grpc.gcp.HandshakerResp */ UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_new(upb_arena *arena) { - return (grpc_gcp_HandshakerResp *)upb_msg_new(&grpc_gcp_HandshakerResp_msginit, arena); + return (grpc_gcp_HandshakerResp *)_upb_msg_new(&grpc_gcp_HandshakerResp_msginit, arena); } UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_parse(const char *buf, size_t size, upb_arena *arena) { @@ -665,7 +627,7 @@ UPB_INLINE void grpc_gcp_HandshakerResp_set_result(grpc_gcp_HandshakerResp *msg, UPB_INLINE struct grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_mutable_result(grpc_gcp_HandshakerResp *msg, upb_arena *arena) { struct grpc_gcp_HandshakerResult* sub = (struct grpc_gcp_HandshakerResult*)grpc_gcp_HandshakerResp_result(msg); if (sub == NULL) { - sub = (struct grpc_gcp_HandshakerResult*)upb_msg_new(&grpc_gcp_HandshakerResult_msginit, arena); + sub = (struct grpc_gcp_HandshakerResult*)_upb_msg_new(&grpc_gcp_HandshakerResult_msginit, arena); if (!sub) return NULL; grpc_gcp_HandshakerResp_set_result(msg, sub); } @@ -677,7 +639,7 @@ UPB_INLINE void grpc_gcp_HandshakerResp_set_status(grpc_gcp_HandshakerResp *msg, UPB_INLINE struct grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_mutable_status(grpc_gcp_HandshakerResp *msg, upb_arena *arena) { struct grpc_gcp_HandshakerStatus* sub = (struct grpc_gcp_HandshakerStatus*)grpc_gcp_HandshakerResp_status(msg); if (sub == NULL) { - sub = (struct grpc_gcp_HandshakerStatus*)upb_msg_new(&grpc_gcp_HandshakerStatus_msginit, arena); + sub = (struct grpc_gcp_HandshakerStatus*)_upb_msg_new(&grpc_gcp_HandshakerStatus_msginit, arena); if (!sub) return NULL; grpc_gcp_HandshakerResp_set_status(msg, sub); } diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h index 0e55e45f4fb..5e9233b6622 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h @@ -9,7 +9,6 @@ #ifndef SRC_PROTO_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PROTO_UPB_H_ #define SRC_PROTO_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -37,7 +36,7 @@ typedef enum { /* grpc.gcp.RpcProtocolVersions */ UPB_INLINE grpc_gcp_RpcProtocolVersions *grpc_gcp_RpcProtocolVersions_new(upb_arena *arena) { - return (grpc_gcp_RpcProtocolVersions *)upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); + return (grpc_gcp_RpcProtocolVersions *)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_msginit, arena); } UPB_INLINE grpc_gcp_RpcProtocolVersions *grpc_gcp_RpcProtocolVersions_parse(const char *buf, size_t size, upb_arena *arena) { @@ -57,7 +56,7 @@ UPB_INLINE void grpc_gcp_RpcProtocolVersions_set_max_rpc_version(grpc_gcp_RpcPro UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_mutable_max_rpc_version(grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions_Version* sub = (struct grpc_gcp_RpcProtocolVersions_Version*)grpc_gcp_RpcProtocolVersions_max_rpc_version(msg); if (sub == NULL) { - sub = (struct grpc_gcp_RpcProtocolVersions_Version*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena); + sub = (struct grpc_gcp_RpcProtocolVersions_Version*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena); if (!sub) return NULL; grpc_gcp_RpcProtocolVersions_set_max_rpc_version(msg, sub); } @@ -69,7 +68,7 @@ UPB_INLINE void grpc_gcp_RpcProtocolVersions_set_min_rpc_version(grpc_gcp_RpcPro UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_mutable_min_rpc_version(grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions_Version* sub = (struct grpc_gcp_RpcProtocolVersions_Version*)grpc_gcp_RpcProtocolVersions_min_rpc_version(msg); if (sub == NULL) { - sub = (struct grpc_gcp_RpcProtocolVersions_Version*)upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena); + sub = (struct grpc_gcp_RpcProtocolVersions_Version*)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena); if (!sub) return NULL; grpc_gcp_RpcProtocolVersions_set_min_rpc_version(msg, sub); } @@ -79,7 +78,7 @@ UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVers /* grpc.gcp.RpcProtocolVersions.Version */ UPB_INLINE grpc_gcp_RpcProtocolVersions_Version *grpc_gcp_RpcProtocolVersions_Version_new(upb_arena *arena) { - return (grpc_gcp_RpcProtocolVersions_Version *)upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena); + return (grpc_gcp_RpcProtocolVersions_Version *)_upb_msg_new(&grpc_gcp_RpcProtocolVersions_Version_msginit, arena); } UPB_INLINE grpc_gcp_RpcProtocolVersions_Version *grpc_gcp_RpcProtocolVersions_Version_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h b/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h index 103b4ddbafc..c23a25e2150 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h @@ -9,7 +9,6 @@ #ifndef SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPB_H_ #define SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -38,7 +37,7 @@ typedef enum { /* grpc.health.v1.HealthCheckRequest */ UPB_INLINE grpc_health_v1_HealthCheckRequest *grpc_health_v1_HealthCheckRequest_new(upb_arena *arena) { - return (grpc_health_v1_HealthCheckRequest *)upb_msg_new(&grpc_health_v1_HealthCheckRequest_msginit, arena); + return (grpc_health_v1_HealthCheckRequest *)_upb_msg_new(&grpc_health_v1_HealthCheckRequest_msginit, arena); } UPB_INLINE grpc_health_v1_HealthCheckRequest *grpc_health_v1_HealthCheckRequest_parse(const char *buf, size_t size, upb_arena *arena) { @@ -58,7 +57,7 @@ UPB_INLINE void grpc_health_v1_HealthCheckRequest_set_service(grpc_health_v1_Hea /* grpc.health.v1.HealthCheckResponse */ UPB_INLINE grpc_health_v1_HealthCheckResponse *grpc_health_v1_HealthCheckResponse_new(upb_arena *arena) { - return (grpc_health_v1_HealthCheckResponse *)upb_msg_new(&grpc_health_v1_HealthCheckResponse_msginit, arena); + return (grpc_health_v1_HealthCheckResponse *)_upb_msg_new(&grpc_health_v1_HealthCheckResponse_msginit, arena); } UPB_INLINE grpc_health_v1_HealthCheckResponse *grpc_health_v1_HealthCheckResponse_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h index d6331a5b515..c85fccb83f5 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h @@ -9,7 +9,6 @@ #ifndef SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_ #define SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -56,7 +55,7 @@ extern const upb_msglayout google_protobuf_Timestamp_msginit; /* grpc.lb.v1.LoadBalanceRequest */ UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_new(upb_arena *arena) { - return (grpc_lb_v1_LoadBalanceRequest *)upb_msg_new(&grpc_lb_v1_LoadBalanceRequest_msginit, arena); + return (grpc_lb_v1_LoadBalanceRequest *)_upb_msg_new(&grpc_lb_v1_LoadBalanceRequest_msginit, arena); } UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_parse(const char *buf, size_t size, upb_arena *arena) { @@ -85,7 +84,7 @@ UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_initial_request(grpc_lb_v1_Loa UPB_INLINE struct grpc_lb_v1_InitialLoadBalanceRequest* grpc_lb_v1_LoadBalanceRequest_mutable_initial_request(grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena) { struct grpc_lb_v1_InitialLoadBalanceRequest* sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)grpc_lb_v1_LoadBalanceRequest_initial_request(msg); if (sub == NULL) { - sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena); + sub = (struct grpc_lb_v1_InitialLoadBalanceRequest*)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena); if (!sub) return NULL; grpc_lb_v1_LoadBalanceRequest_set_initial_request(msg, sub); } @@ -97,7 +96,7 @@ UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_client_stats(grpc_lb_v1_LoadBa UPB_INLINE struct grpc_lb_v1_ClientStats* grpc_lb_v1_LoadBalanceRequest_mutable_client_stats(grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena) { struct grpc_lb_v1_ClientStats* sub = (struct grpc_lb_v1_ClientStats*)grpc_lb_v1_LoadBalanceRequest_client_stats(msg); if (sub == NULL) { - sub = (struct grpc_lb_v1_ClientStats*)upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena); + sub = (struct grpc_lb_v1_ClientStats*)_upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena); if (!sub) return NULL; grpc_lb_v1_LoadBalanceRequest_set_client_stats(msg, sub); } @@ -107,7 +106,7 @@ UPB_INLINE struct grpc_lb_v1_ClientStats* grpc_lb_v1_LoadBalanceRequest_mutable_ /* grpc.lb.v1.InitialLoadBalanceRequest */ UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_new(upb_arena *arena) { - return (grpc_lb_v1_InitialLoadBalanceRequest *)upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena); + return (grpc_lb_v1_InitialLoadBalanceRequest *)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena); } UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_parse(const char *buf, size_t size, upb_arena *arena) { @@ -127,7 +126,7 @@ UPB_INLINE void grpc_lb_v1_InitialLoadBalanceRequest_set_name(grpc_lb_v1_Initial /* grpc.lb.v1.ClientStatsPerToken */ UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_new(upb_arena *arena) { - return (grpc_lb_v1_ClientStatsPerToken *)upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena); + return (grpc_lb_v1_ClientStatsPerToken *)_upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena); } UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_parse(const char *buf, size_t size, upb_arena *arena) { @@ -151,7 +150,7 @@ UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_num_calls(grpc_lb_v1_ClientSt /* grpc.lb.v1.ClientStats */ UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_new(upb_arena *arena) { - return (grpc_lb_v1_ClientStats *)upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena); + return (grpc_lb_v1_ClientStats *)_upb_msg_new(&grpc_lb_v1_ClientStats_msginit, arena); } UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_parse(const char *buf, size_t size, upb_arena *arena) { @@ -175,7 +174,7 @@ UPB_INLINE void grpc_lb_v1_ClientStats_set_timestamp(grpc_lb_v1_ClientStats *msg UPB_INLINE struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_mutable_timestamp(grpc_lb_v1_ClientStats *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)grpc_lb_v1_ClientStats_timestamp(msg); if (sub == NULL) { - sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena); if (!sub) return NULL; grpc_lb_v1_ClientStats_set_timestamp(msg, sub); } @@ -197,10 +196,10 @@ UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_mutable_calls return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 40), len); } UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_resize_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t len, upb_arena *arena) { - return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 40), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct grpc_lb_v1_ClientStatsPerToken* grpc_lb_v1_ClientStats_add_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, upb_arena *arena) { - struct grpc_lb_v1_ClientStatsPerToken* sub = (struct grpc_lb_v1_ClientStatsPerToken*)upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena); + struct grpc_lb_v1_ClientStatsPerToken* sub = (struct grpc_lb_v1_ClientStatsPerToken*)_upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(36, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -210,7 +209,7 @@ UPB_INLINE struct grpc_lb_v1_ClientStatsPerToken* grpc_lb_v1_ClientStats_add_cal /* grpc.lb.v1.LoadBalanceResponse */ UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_new(upb_arena *arena) { - return (grpc_lb_v1_LoadBalanceResponse *)upb_msg_new(&grpc_lb_v1_LoadBalanceResponse_msginit, arena); + return (grpc_lb_v1_LoadBalanceResponse *)_upb_msg_new(&grpc_lb_v1_LoadBalanceResponse_msginit, arena); } UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_parse(const char *buf, size_t size, upb_arena *arena) { @@ -242,7 +241,7 @@ UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_initial_response(grpc_lb_v1_L UPB_INLINE struct grpc_lb_v1_InitialLoadBalanceResponse* grpc_lb_v1_LoadBalanceResponse_mutable_initial_response(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) { struct grpc_lb_v1_InitialLoadBalanceResponse* sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)grpc_lb_v1_LoadBalanceResponse_initial_response(msg); if (sub == NULL) { - sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena); + sub = (struct grpc_lb_v1_InitialLoadBalanceResponse*)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena); if (!sub) return NULL; grpc_lb_v1_LoadBalanceResponse_set_initial_response(msg, sub); } @@ -254,7 +253,7 @@ UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_server_list(grpc_lb_v1_LoadBa UPB_INLINE struct grpc_lb_v1_ServerList* grpc_lb_v1_LoadBalanceResponse_mutable_server_list(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) { struct grpc_lb_v1_ServerList* sub = (struct grpc_lb_v1_ServerList*)grpc_lb_v1_LoadBalanceResponse_server_list(msg); if (sub == NULL) { - sub = (struct grpc_lb_v1_ServerList*)upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena); + sub = (struct grpc_lb_v1_ServerList*)_upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena); if (!sub) return NULL; grpc_lb_v1_LoadBalanceResponse_set_server_list(msg, sub); } @@ -266,7 +265,7 @@ UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_fallback_response(grpc_lb_v1_ UPB_INLINE struct grpc_lb_v1_FallbackResponse* grpc_lb_v1_LoadBalanceResponse_mutable_fallback_response(grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena) { struct grpc_lb_v1_FallbackResponse* sub = (struct grpc_lb_v1_FallbackResponse*)grpc_lb_v1_LoadBalanceResponse_fallback_response(msg); if (sub == NULL) { - sub = (struct grpc_lb_v1_FallbackResponse*)upb_msg_new(&grpc_lb_v1_FallbackResponse_msginit, arena); + sub = (struct grpc_lb_v1_FallbackResponse*)_upb_msg_new(&grpc_lb_v1_FallbackResponse_msginit, arena); if (!sub) return NULL; grpc_lb_v1_LoadBalanceResponse_set_fallback_response(msg, sub); } @@ -276,7 +275,7 @@ UPB_INLINE struct grpc_lb_v1_FallbackResponse* grpc_lb_v1_LoadBalanceResponse_mu /* grpc.lb.v1.InitialLoadBalanceResponse */ UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_new(upb_arena *arena) { - return (grpc_lb_v1_InitialLoadBalanceResponse *)upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena); + return (grpc_lb_v1_InitialLoadBalanceResponse *)_upb_msg_new(&grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena); } UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_parse(const char *buf, size_t size, upb_arena *arena) { @@ -299,7 +298,7 @@ UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_in UPB_INLINE struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_mutable_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(msg, sub); } @@ -309,7 +308,7 @@ UPB_INLINE struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceRespons /* grpc.lb.v1.ServerList */ UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_new(upb_arena *arena) { - return (grpc_lb_v1_ServerList *)upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena); + return (grpc_lb_v1_ServerList *)_upb_msg_new(&grpc_lb_v1_ServerList_msginit, arena); } UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_parse(const char *buf, size_t size, upb_arena *arena) { @@ -326,10 +325,10 @@ UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_mutable_servers(grpc_lb_v1_ return (grpc_lb_v1_Server**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_resize_servers(grpc_lb_v1_ServerList *msg, size_t len, upb_arena *arena) { - return (grpc_lb_v1_Server**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (grpc_lb_v1_Server**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct grpc_lb_v1_Server* grpc_lb_v1_ServerList_add_servers(grpc_lb_v1_ServerList *msg, upb_arena *arena) { - struct grpc_lb_v1_Server* sub = (struct grpc_lb_v1_Server*)upb_msg_new(&grpc_lb_v1_Server_msginit, arena); + struct grpc_lb_v1_Server* sub = (struct grpc_lb_v1_Server*)_upb_msg_new(&grpc_lb_v1_Server_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -339,7 +338,7 @@ UPB_INLINE struct grpc_lb_v1_Server* grpc_lb_v1_ServerList_add_servers(grpc_lb_v /* grpc.lb.v1.Server */ UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_new(upb_arena *arena) { - return (grpc_lb_v1_Server *)upb_msg_new(&grpc_lb_v1_Server_msginit, arena); + return (grpc_lb_v1_Server *)_upb_msg_new(&grpc_lb_v1_Server_msginit, arena); } UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_parse(const char *buf, size_t size, upb_arena *arena) { @@ -371,7 +370,7 @@ UPB_INLINE void grpc_lb_v1_Server_set_drop(grpc_lb_v1_Server *msg, bool value) { /* grpc.lb.v1.FallbackResponse */ UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_new(upb_arena *arena) { - return (grpc_lb_v1_FallbackResponse *)upb_msg_new(&grpc_lb_v1_FallbackResponse_msginit, arena); + return (grpc_lb_v1_FallbackResponse *)_upb_msg_new(&grpc_lb_v1_FallbackResponse_msginit, arena); } UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_parse(const char *buf, size_t size, upb_arena *arena) { diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c index 05a1c8098a6..165de446923 100644 --- a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c @@ -22,8 +22,8 @@ static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport__fields[5] = { {1, UPB_SIZE(0, 0), 0, 0, 1, 1}, {2, UPB_SIZE(8, 8), 0, 0, 1, 1}, {3, UPB_SIZE(16, 16), 0, 0, 4, 1}, - {4, UPB_SIZE(24, 24), 0, 0, 11, 3}, - {5, UPB_SIZE(28, 32), 0, 1, 11, 3}, + {4, UPB_SIZE(24, 24), 0, 0, 11, 4}, + {5, UPB_SIZE(28, 32), 0, 1, 11, 4}, }; const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit = { @@ -33,7 +33,7 @@ const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit = { }; static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry__fields[2] = { - {1, UPB_SIZE(8, 8), 0, 0, 9, 1}, + {1, UPB_SIZE(8, 16), 0, 0, 9, 1}, {2, UPB_SIZE(0, 0), 0, 0, 1, 1}, }; @@ -44,7 +44,7 @@ const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit = }; static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry__fields[2] = { - {1, UPB_SIZE(8, 8), 0, 0, 9, 1}, + {1, UPB_SIZE(8, 16), 0, 0, 9, 1}, {2, UPB_SIZE(0, 0), 0, 0, 1, 1}, }; diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h index 279578b5ae4..5d3b38f2adf 100644 --- a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h @@ -9,7 +9,6 @@ #ifndef UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPB_H_ #define UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -34,7 +33,7 @@ extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msg /* udpa.data.orca.v1.OrcaLoadReport */ UPB_INLINE udpa_data_orca_v1_OrcaLoadReport *udpa_data_orca_v1_OrcaLoadReport_new(upb_arena *arena) { - return (udpa_data_orca_v1_OrcaLoadReport *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_msginit, arena); + return (udpa_data_orca_v1_OrcaLoadReport *)_upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_msginit, arena); } UPB_INLINE udpa_data_orca_v1_OrcaLoadReport *udpa_data_orca_v1_OrcaLoadReport_parse(const char *buf, size_t size, upb_arena *arena) { @@ -48,8 +47,12 @@ UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_serialize(const udpa_data_orca UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_cpu_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_mem_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); } UPB_INLINE uint64_t udpa_data_orca_v1_OrcaLoadReport_rps(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } -UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* const* udpa_data_orca_v1_OrcaLoadReport_request_cost(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { return (const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } -UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* const* udpa_data_orca_v1_OrcaLoadReport_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { return (const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } +UPB_INLINE size_t udpa_data_orca_v1_OrcaLoadReport_request_cost_size(const udpa_data_orca_v1_OrcaLoadReport *msg) {return _upb_msg_map_size(msg, UPB_SIZE(24, 24)); } +UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_request_cost_get(const udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key, double *val) { return _upb_msg_map_get(msg, UPB_SIZE(24, 24), &key, 0, val, sizeof(*val)); } +UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* udpa_data_orca_v1_OrcaLoadReport_request_cost_next(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t* iter) { return (const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 24), iter); } +UPB_INLINE size_t udpa_data_orca_v1_OrcaLoadReport_utilization_size(const udpa_data_orca_v1_OrcaLoadReport *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 32)); } +UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_utilization_get(const udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key, double *val) { return _upb_msg_map_get(msg, UPB_SIZE(28, 32), &key, 0, val, sizeof(*val)); } +UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* udpa_data_orca_v1_OrcaLoadReport_utilization_next(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t* iter) { return (const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 32), iter); } UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_cpu_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, double value) { UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; @@ -60,79 +63,47 @@ UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_mem_utilization(udpa_data_o UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_rps(udpa_data_orca_v1_OrcaLoadReport *msg, uint64_t value) { UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; } -UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry** udpa_data_orca_v1_OrcaLoadReport_mutable_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { - return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); -} -UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry** udpa_data_orca_v1_OrcaLoadReport_resize_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, size_t len, upb_arena *arena) { - return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* udpa_data_orca_v1_OrcaLoadReport_add_request_cost(udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena) { - struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* sub = (struct udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry*)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(24, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} -UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry** udpa_data_orca_v1_OrcaLoadReport_mutable_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, size_t *len) { - return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); -} -UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry** udpa_data_orca_v1_OrcaLoadReport_resize_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, size_t len, upb_arena *arena) { - return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* udpa_data_orca_v1_OrcaLoadReport_add_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena) { - struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* sub = (struct udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry*)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(28, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; -} +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_request_cost_clear(udpa_data_orca_v1_OrcaLoadReport *msg) { _upb_msg_map_clear(msg, UPB_SIZE(24, 24)); } +UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_request_cost_set(udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key, double val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(24, 24), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_request_cost_delete(udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(24, 24), &key, 0); } +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* udpa_data_orca_v1_OrcaLoadReport_request_cost_nextmutable(udpa_data_orca_v1_OrcaLoadReport *msg, size_t* iter) { return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 24), iter); } +UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_utilization_clear(udpa_data_orca_v1_OrcaLoadReport *msg) { _upb_msg_map_clear(msg, UPB_SIZE(28, 32)); } +UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_utilization_set(udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key, double val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(28, 32), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_utilization_delete(udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(28, 32), &key, 0); } +UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* udpa_data_orca_v1_OrcaLoadReport_utilization_nextmutable(udpa_data_orca_v1_OrcaLoadReport *msg, size_t* iter) { return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 32), iter); } /* udpa.data.orca.v1.OrcaLoadReport.RequestCostEntry */ -UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_new(upb_arena *arena) { - return (udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena); -} -UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *ret = udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_key(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_serialize(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, arena, len); +UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_value(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg) { + double ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_key(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_value(const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } - -UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_set_key(udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; -} UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_set_value(udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; + _upb_msg_map_set_value(msg, &value, sizeof(double)); } /* udpa.data.orca.v1.OrcaLoadReport.UtilizationEntry */ -UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_new(upb_arena *arena) { - return (udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *)upb_msg_new(&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena); -} -UPB_INLINE udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *ret = udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_key(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_serialize(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, arena, len); +UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_value(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg) { + double ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_key(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_value(const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } - -UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_set_key(udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; -} UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_set_value(udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; + _upb_msg_map_set_value(msg, &value, sizeof(double)); } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/validate/validate.upb.h b/src/core/ext/upb-generated/validate/validate.upb.h index cac68a3441f..bd1d19e8998 100644 --- a/src/core/ext/upb-generated/validate/validate.upb.h +++ b/src/core/ext/upb-generated/validate/validate.upb.h @@ -9,7 +9,6 @@ #ifndef VALIDATE_VALIDATE_PROTO_UPB_H_ #define VALIDATE_VALIDATE_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -98,7 +97,7 @@ extern const upb_msglayout google_protobuf_Timestamp_msginit; /* validate.FieldRules */ UPB_INLINE validate_FieldRules *validate_FieldRules_new(upb_arena *arena) { - return (validate_FieldRules *)upb_msg_new(&validate_FieldRules_msginit, arena); + return (validate_FieldRules *)_upb_msg_new(&validate_FieldRules_msginit, arena); } UPB_INLINE validate_FieldRules *validate_FieldRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -187,7 +186,7 @@ UPB_INLINE void validate_FieldRules_set_float(validate_FieldRules *msg, validate UPB_INLINE struct validate_FloatRules* validate_FieldRules_mutable_float(validate_FieldRules *msg, upb_arena *arena) { struct validate_FloatRules* sub = (struct validate_FloatRules*)validate_FieldRules_float(msg); if (sub == NULL) { - sub = (struct validate_FloatRules*)upb_msg_new(&validate_FloatRules_msginit, arena); + sub = (struct validate_FloatRules*)_upb_msg_new(&validate_FloatRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_float(msg, sub); } @@ -199,7 +198,7 @@ UPB_INLINE void validate_FieldRules_set_double(validate_FieldRules *msg, validat UPB_INLINE struct validate_DoubleRules* validate_FieldRules_mutable_double(validate_FieldRules *msg, upb_arena *arena) { struct validate_DoubleRules* sub = (struct validate_DoubleRules*)validate_FieldRules_double(msg); if (sub == NULL) { - sub = (struct validate_DoubleRules*)upb_msg_new(&validate_DoubleRules_msginit, arena); + sub = (struct validate_DoubleRules*)_upb_msg_new(&validate_DoubleRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_double(msg, sub); } @@ -211,7 +210,7 @@ UPB_INLINE void validate_FieldRules_set_int32(validate_FieldRules *msg, validate UPB_INLINE struct validate_Int32Rules* validate_FieldRules_mutable_int32(validate_FieldRules *msg, upb_arena *arena) { struct validate_Int32Rules* sub = (struct validate_Int32Rules*)validate_FieldRules_int32(msg); if (sub == NULL) { - sub = (struct validate_Int32Rules*)upb_msg_new(&validate_Int32Rules_msginit, arena); + sub = (struct validate_Int32Rules*)_upb_msg_new(&validate_Int32Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_int32(msg, sub); } @@ -223,7 +222,7 @@ UPB_INLINE void validate_FieldRules_set_int64(validate_FieldRules *msg, validate UPB_INLINE struct validate_Int64Rules* validate_FieldRules_mutable_int64(validate_FieldRules *msg, upb_arena *arena) { struct validate_Int64Rules* sub = (struct validate_Int64Rules*)validate_FieldRules_int64(msg); if (sub == NULL) { - sub = (struct validate_Int64Rules*)upb_msg_new(&validate_Int64Rules_msginit, arena); + sub = (struct validate_Int64Rules*)_upb_msg_new(&validate_Int64Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_int64(msg, sub); } @@ -235,7 +234,7 @@ UPB_INLINE void validate_FieldRules_set_uint32(validate_FieldRules *msg, validat UPB_INLINE struct validate_UInt32Rules* validate_FieldRules_mutable_uint32(validate_FieldRules *msg, upb_arena *arena) { struct validate_UInt32Rules* sub = (struct validate_UInt32Rules*)validate_FieldRules_uint32(msg); if (sub == NULL) { - sub = (struct validate_UInt32Rules*)upb_msg_new(&validate_UInt32Rules_msginit, arena); + sub = (struct validate_UInt32Rules*)_upb_msg_new(&validate_UInt32Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_uint32(msg, sub); } @@ -247,7 +246,7 @@ UPB_INLINE void validate_FieldRules_set_uint64(validate_FieldRules *msg, validat UPB_INLINE struct validate_UInt64Rules* validate_FieldRules_mutable_uint64(validate_FieldRules *msg, upb_arena *arena) { struct validate_UInt64Rules* sub = (struct validate_UInt64Rules*)validate_FieldRules_uint64(msg); if (sub == NULL) { - sub = (struct validate_UInt64Rules*)upb_msg_new(&validate_UInt64Rules_msginit, arena); + sub = (struct validate_UInt64Rules*)_upb_msg_new(&validate_UInt64Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_uint64(msg, sub); } @@ -259,7 +258,7 @@ UPB_INLINE void validate_FieldRules_set_sint32(validate_FieldRules *msg, validat UPB_INLINE struct validate_SInt32Rules* validate_FieldRules_mutable_sint32(validate_FieldRules *msg, upb_arena *arena) { struct validate_SInt32Rules* sub = (struct validate_SInt32Rules*)validate_FieldRules_sint32(msg); if (sub == NULL) { - sub = (struct validate_SInt32Rules*)upb_msg_new(&validate_SInt32Rules_msginit, arena); + sub = (struct validate_SInt32Rules*)_upb_msg_new(&validate_SInt32Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_sint32(msg, sub); } @@ -271,7 +270,7 @@ UPB_INLINE void validate_FieldRules_set_sint64(validate_FieldRules *msg, validat UPB_INLINE struct validate_SInt64Rules* validate_FieldRules_mutable_sint64(validate_FieldRules *msg, upb_arena *arena) { struct validate_SInt64Rules* sub = (struct validate_SInt64Rules*)validate_FieldRules_sint64(msg); if (sub == NULL) { - sub = (struct validate_SInt64Rules*)upb_msg_new(&validate_SInt64Rules_msginit, arena); + sub = (struct validate_SInt64Rules*)_upb_msg_new(&validate_SInt64Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_sint64(msg, sub); } @@ -283,7 +282,7 @@ UPB_INLINE void validate_FieldRules_set_fixed32(validate_FieldRules *msg, valida UPB_INLINE struct validate_Fixed32Rules* validate_FieldRules_mutable_fixed32(validate_FieldRules *msg, upb_arena *arena) { struct validate_Fixed32Rules* sub = (struct validate_Fixed32Rules*)validate_FieldRules_fixed32(msg); if (sub == NULL) { - sub = (struct validate_Fixed32Rules*)upb_msg_new(&validate_Fixed32Rules_msginit, arena); + sub = (struct validate_Fixed32Rules*)_upb_msg_new(&validate_Fixed32Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_fixed32(msg, sub); } @@ -295,7 +294,7 @@ UPB_INLINE void validate_FieldRules_set_fixed64(validate_FieldRules *msg, valida UPB_INLINE struct validate_Fixed64Rules* validate_FieldRules_mutable_fixed64(validate_FieldRules *msg, upb_arena *arena) { struct validate_Fixed64Rules* sub = (struct validate_Fixed64Rules*)validate_FieldRules_fixed64(msg); if (sub == NULL) { - sub = (struct validate_Fixed64Rules*)upb_msg_new(&validate_Fixed64Rules_msginit, arena); + sub = (struct validate_Fixed64Rules*)_upb_msg_new(&validate_Fixed64Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_fixed64(msg, sub); } @@ -307,7 +306,7 @@ UPB_INLINE void validate_FieldRules_set_sfixed32(validate_FieldRules *msg, valid UPB_INLINE struct validate_SFixed32Rules* validate_FieldRules_mutable_sfixed32(validate_FieldRules *msg, upb_arena *arena) { struct validate_SFixed32Rules* sub = (struct validate_SFixed32Rules*)validate_FieldRules_sfixed32(msg); if (sub == NULL) { - sub = (struct validate_SFixed32Rules*)upb_msg_new(&validate_SFixed32Rules_msginit, arena); + sub = (struct validate_SFixed32Rules*)_upb_msg_new(&validate_SFixed32Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_sfixed32(msg, sub); } @@ -319,7 +318,7 @@ UPB_INLINE void validate_FieldRules_set_sfixed64(validate_FieldRules *msg, valid UPB_INLINE struct validate_SFixed64Rules* validate_FieldRules_mutable_sfixed64(validate_FieldRules *msg, upb_arena *arena) { struct validate_SFixed64Rules* sub = (struct validate_SFixed64Rules*)validate_FieldRules_sfixed64(msg); if (sub == NULL) { - sub = (struct validate_SFixed64Rules*)upb_msg_new(&validate_SFixed64Rules_msginit, arena); + sub = (struct validate_SFixed64Rules*)_upb_msg_new(&validate_SFixed64Rules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_sfixed64(msg, sub); } @@ -331,7 +330,7 @@ UPB_INLINE void validate_FieldRules_set_bool(validate_FieldRules *msg, validate_ UPB_INLINE struct validate_BoolRules* validate_FieldRules_mutable_bool(validate_FieldRules *msg, upb_arena *arena) { struct validate_BoolRules* sub = (struct validate_BoolRules*)validate_FieldRules_bool(msg); if (sub == NULL) { - sub = (struct validate_BoolRules*)upb_msg_new(&validate_BoolRules_msginit, arena); + sub = (struct validate_BoolRules*)_upb_msg_new(&validate_BoolRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_bool(msg, sub); } @@ -343,7 +342,7 @@ UPB_INLINE void validate_FieldRules_set_string(validate_FieldRules *msg, validat UPB_INLINE struct validate_StringRules* validate_FieldRules_mutable_string(validate_FieldRules *msg, upb_arena *arena) { struct validate_StringRules* sub = (struct validate_StringRules*)validate_FieldRules_string(msg); if (sub == NULL) { - sub = (struct validate_StringRules*)upb_msg_new(&validate_StringRules_msginit, arena); + sub = (struct validate_StringRules*)_upb_msg_new(&validate_StringRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_string(msg, sub); } @@ -355,7 +354,7 @@ UPB_INLINE void validate_FieldRules_set_bytes(validate_FieldRules *msg, validate UPB_INLINE struct validate_BytesRules* validate_FieldRules_mutable_bytes(validate_FieldRules *msg, upb_arena *arena) { struct validate_BytesRules* sub = (struct validate_BytesRules*)validate_FieldRules_bytes(msg); if (sub == NULL) { - sub = (struct validate_BytesRules*)upb_msg_new(&validate_BytesRules_msginit, arena); + sub = (struct validate_BytesRules*)_upb_msg_new(&validate_BytesRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_bytes(msg, sub); } @@ -367,7 +366,7 @@ UPB_INLINE void validate_FieldRules_set_enum(validate_FieldRules *msg, validate_ UPB_INLINE struct validate_EnumRules* validate_FieldRules_mutable_enum(validate_FieldRules *msg, upb_arena *arena) { struct validate_EnumRules* sub = (struct validate_EnumRules*)validate_FieldRules_enum(msg); if (sub == NULL) { - sub = (struct validate_EnumRules*)upb_msg_new(&validate_EnumRules_msginit, arena); + sub = (struct validate_EnumRules*)_upb_msg_new(&validate_EnumRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_enum(msg, sub); } @@ -379,7 +378,7 @@ UPB_INLINE void validate_FieldRules_set_message(validate_FieldRules *msg, valida UPB_INLINE struct validate_MessageRules* validate_FieldRules_mutable_message(validate_FieldRules *msg, upb_arena *arena) { struct validate_MessageRules* sub = (struct validate_MessageRules*)validate_FieldRules_message(msg); if (sub == NULL) { - sub = (struct validate_MessageRules*)upb_msg_new(&validate_MessageRules_msginit, arena); + sub = (struct validate_MessageRules*)_upb_msg_new(&validate_MessageRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_message(msg, sub); } @@ -391,7 +390,7 @@ UPB_INLINE void validate_FieldRules_set_repeated(validate_FieldRules *msg, valid UPB_INLINE struct validate_RepeatedRules* validate_FieldRules_mutable_repeated(validate_FieldRules *msg, upb_arena *arena) { struct validate_RepeatedRules* sub = (struct validate_RepeatedRules*)validate_FieldRules_repeated(msg); if (sub == NULL) { - sub = (struct validate_RepeatedRules*)upb_msg_new(&validate_RepeatedRules_msginit, arena); + sub = (struct validate_RepeatedRules*)_upb_msg_new(&validate_RepeatedRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_repeated(msg, sub); } @@ -403,7 +402,7 @@ UPB_INLINE void validate_FieldRules_set_map(validate_FieldRules *msg, validate_M UPB_INLINE struct validate_MapRules* validate_FieldRules_mutable_map(validate_FieldRules *msg, upb_arena *arena) { struct validate_MapRules* sub = (struct validate_MapRules*)validate_FieldRules_map(msg); if (sub == NULL) { - sub = (struct validate_MapRules*)upb_msg_new(&validate_MapRules_msginit, arena); + sub = (struct validate_MapRules*)_upb_msg_new(&validate_MapRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_map(msg, sub); } @@ -415,7 +414,7 @@ UPB_INLINE void validate_FieldRules_set_any(validate_FieldRules *msg, validate_A UPB_INLINE struct validate_AnyRules* validate_FieldRules_mutable_any(validate_FieldRules *msg, upb_arena *arena) { struct validate_AnyRules* sub = (struct validate_AnyRules*)validate_FieldRules_any(msg); if (sub == NULL) { - sub = (struct validate_AnyRules*)upb_msg_new(&validate_AnyRules_msginit, arena); + sub = (struct validate_AnyRules*)_upb_msg_new(&validate_AnyRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_any(msg, sub); } @@ -427,7 +426,7 @@ UPB_INLINE void validate_FieldRules_set_duration(validate_FieldRules *msg, valid UPB_INLINE struct validate_DurationRules* validate_FieldRules_mutable_duration(validate_FieldRules *msg, upb_arena *arena) { struct validate_DurationRules* sub = (struct validate_DurationRules*)validate_FieldRules_duration(msg); if (sub == NULL) { - sub = (struct validate_DurationRules*)upb_msg_new(&validate_DurationRules_msginit, arena); + sub = (struct validate_DurationRules*)_upb_msg_new(&validate_DurationRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_duration(msg, sub); } @@ -439,7 +438,7 @@ UPB_INLINE void validate_FieldRules_set_timestamp(validate_FieldRules *msg, vali UPB_INLINE struct validate_TimestampRules* validate_FieldRules_mutable_timestamp(validate_FieldRules *msg, upb_arena *arena) { struct validate_TimestampRules* sub = (struct validate_TimestampRules*)validate_FieldRules_timestamp(msg); if (sub == NULL) { - sub = (struct validate_TimestampRules*)upb_msg_new(&validate_TimestampRules_msginit, arena); + sub = (struct validate_TimestampRules*)_upb_msg_new(&validate_TimestampRules_msginit, arena); if (!sub) return NULL; validate_FieldRules_set_timestamp(msg, sub); } @@ -449,7 +448,7 @@ UPB_INLINE struct validate_TimestampRules* validate_FieldRules_mutable_timestamp /* validate.FloatRules */ UPB_INLINE validate_FloatRules *validate_FloatRules_new(upb_arena *arena) { - return (validate_FloatRules *)upb_msg_new(&validate_FloatRules_msginit, arena); + return (validate_FloatRules *)_upb_msg_new(&validate_FloatRules_msginit, arena); } UPB_INLINE validate_FloatRules *validate_FloatRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -497,27 +496,27 @@ UPB_INLINE float* validate_FloatRules_mutable_in(validate_FloatRules *msg, size_ return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE float* validate_FloatRules_resize_in(validate_FloatRules *msg, size_t len, upb_arena *arena) { - return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_FLOAT, arena); + return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_FLOAT, arena); } UPB_INLINE bool validate_FloatRules_add_in(validate_FloatRules *msg, float val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val, + arena); } UPB_INLINE float* validate_FloatRules_mutable_not_in(validate_FloatRules *msg, size_t *len) { return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE float* validate_FloatRules_resize_not_in(validate_FloatRules *msg, size_t len, upb_arena *arena) { - return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_FLOAT, arena); + return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_FLOAT, arena); } UPB_INLINE bool validate_FloatRules_add_not_in(validate_FloatRules *msg, float val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val, + arena); } /* validate.DoubleRules */ UPB_INLINE validate_DoubleRules *validate_DoubleRules_new(upb_arena *arena) { - return (validate_DoubleRules *)upb_msg_new(&validate_DoubleRules_msginit, arena); + return (validate_DoubleRules *)_upb_msg_new(&validate_DoubleRules_msginit, arena); } UPB_INLINE validate_DoubleRules *validate_DoubleRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -565,27 +564,27 @@ UPB_INLINE double* validate_DoubleRules_mutable_in(validate_DoubleRules *msg, si return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE double* validate_DoubleRules_resize_in(validate_DoubleRules *msg, size_t len, upb_arena *arena) { - return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, arena); + return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_DOUBLE, arena); } UPB_INLINE bool validate_DoubleRules_add_in(validate_DoubleRules *msg, double val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val, + arena); } UPB_INLINE double* validate_DoubleRules_mutable_not_in(validate_DoubleRules *msg, size_t *len) { return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE double* validate_DoubleRules_resize_not_in(validate_DoubleRules *msg, size_t len, upb_arena *arena) { - return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, arena); + return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_DOUBLE, arena); } UPB_INLINE bool validate_DoubleRules_add_not_in(validate_DoubleRules *msg, double val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val, + arena); } /* validate.Int32Rules */ UPB_INLINE validate_Int32Rules *validate_Int32Rules_new(upb_arena *arena) { - return (validate_Int32Rules *)upb_msg_new(&validate_Int32Rules_msginit, arena); + return (validate_Int32Rules *)_upb_msg_new(&validate_Int32Rules_msginit, arena); } UPB_INLINE validate_Int32Rules *validate_Int32Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -633,27 +632,27 @@ UPB_INLINE int32_t* validate_Int32Rules_mutable_in(validate_Int32Rules *msg, siz return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t* validate_Int32Rules_resize_in(validate_Int32Rules *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool validate_Int32Rules_add_in(validate_Int32Rules *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE int32_t* validate_Int32Rules_mutable_not_in(validate_Int32Rules *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE int32_t* validate_Int32Rules_resize_not_in(validate_Int32Rules *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool validate_Int32Rules_add_not_in(validate_Int32Rules *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } /* validate.Int64Rules */ UPB_INLINE validate_Int64Rules *validate_Int64Rules_new(upb_arena *arena) { - return (validate_Int64Rules *)upb_msg_new(&validate_Int64Rules_msginit, arena); + return (validate_Int64Rules *)_upb_msg_new(&validate_Int64Rules_msginit, arena); } UPB_INLINE validate_Int64Rules *validate_Int64Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -701,27 +700,27 @@ UPB_INLINE int64_t* validate_Int64Rules_mutable_in(validate_Int64Rules *msg, siz return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t* validate_Int64Rules_resize_in(validate_Int64Rules *msg, size_t len, upb_arena *arena) { - return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_INT64, arena); } UPB_INLINE bool validate_Int64Rules_add_in(validate_Int64Rules *msg, int64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, + arena); } UPB_INLINE int64_t* validate_Int64Rules_mutable_not_in(validate_Int64Rules *msg, size_t *len) { return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE int64_t* validate_Int64Rules_resize_not_in(validate_Int64Rules *msg, size_t len, upb_arena *arena) { - return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_INT64, arena); } UPB_INLINE bool validate_Int64Rules_add_not_in(validate_Int64Rules *msg, int64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, + arena); } /* validate.UInt32Rules */ UPB_INLINE validate_UInt32Rules *validate_UInt32Rules_new(upb_arena *arena) { - return (validate_UInt32Rules *)upb_msg_new(&validate_UInt32Rules_msginit, arena); + return (validate_UInt32Rules *)_upb_msg_new(&validate_UInt32Rules_msginit, arena); } UPB_INLINE validate_UInt32Rules *validate_UInt32Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -769,27 +768,27 @@ UPB_INLINE uint32_t* validate_UInt32Rules_mutable_in(validate_UInt32Rules *msg, return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE uint32_t* validate_UInt32Rules_resize_in(validate_UInt32Rules *msg, size_t len, upb_arena *arena) { - return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_UINT32, arena); } UPB_INLINE bool validate_UInt32Rules_add_in(validate_UInt32Rules *msg, uint32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, + arena); } UPB_INLINE uint32_t* validate_UInt32Rules_mutable_not_in(validate_UInt32Rules *msg, size_t *len) { return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE uint32_t* validate_UInt32Rules_resize_not_in(validate_UInt32Rules *msg, size_t len, upb_arena *arena) { - return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_UINT32, arena); } UPB_INLINE bool validate_UInt32Rules_add_not_in(validate_UInt32Rules *msg, uint32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, + arena); } /* validate.UInt64Rules */ UPB_INLINE validate_UInt64Rules *validate_UInt64Rules_new(upb_arena *arena) { - return (validate_UInt64Rules *)upb_msg_new(&validate_UInt64Rules_msginit, arena); + return (validate_UInt64Rules *)_upb_msg_new(&validate_UInt64Rules_msginit, arena); } UPB_INLINE validate_UInt64Rules *validate_UInt64Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -837,27 +836,27 @@ UPB_INLINE uint64_t* validate_UInt64Rules_mutable_in(validate_UInt64Rules *msg, return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE uint64_t* validate_UInt64Rules_resize_in(validate_UInt64Rules *msg, size_t len, upb_arena *arena) { - return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_UINT64, arena); + return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_UINT64, arena); } UPB_INLINE bool validate_UInt64Rules_add_in(validate_UInt64Rules *msg, uint64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, + arena); } UPB_INLINE uint64_t* validate_UInt64Rules_mutable_not_in(validate_UInt64Rules *msg, size_t *len) { return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE uint64_t* validate_UInt64Rules_resize_not_in(validate_UInt64Rules *msg, size_t len, upb_arena *arena) { - return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_UINT64, arena); + return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_UINT64, arena); } UPB_INLINE bool validate_UInt64Rules_add_not_in(validate_UInt64Rules *msg, uint64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, + arena); } /* validate.SInt32Rules */ UPB_INLINE validate_SInt32Rules *validate_SInt32Rules_new(upb_arena *arena) { - return (validate_SInt32Rules *)upb_msg_new(&validate_SInt32Rules_msginit, arena); + return (validate_SInt32Rules *)_upb_msg_new(&validate_SInt32Rules_msginit, arena); } UPB_INLINE validate_SInt32Rules *validate_SInt32Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -905,27 +904,27 @@ UPB_INLINE int32_t* validate_SInt32Rules_mutable_in(validate_SInt32Rules *msg, s return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t* validate_SInt32Rules_resize_in(validate_SInt32Rules *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool validate_SInt32Rules_add_in(validate_SInt32Rules *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE int32_t* validate_SInt32Rules_mutable_not_in(validate_SInt32Rules *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE int32_t* validate_SInt32Rules_resize_not_in(validate_SInt32Rules *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool validate_SInt32Rules_add_not_in(validate_SInt32Rules *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } /* validate.SInt64Rules */ UPB_INLINE validate_SInt64Rules *validate_SInt64Rules_new(upb_arena *arena) { - return (validate_SInt64Rules *)upb_msg_new(&validate_SInt64Rules_msginit, arena); + return (validate_SInt64Rules *)_upb_msg_new(&validate_SInt64Rules_msginit, arena); } UPB_INLINE validate_SInt64Rules *validate_SInt64Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -973,27 +972,27 @@ UPB_INLINE int64_t* validate_SInt64Rules_mutable_in(validate_SInt64Rules *msg, s return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t* validate_SInt64Rules_resize_in(validate_SInt64Rules *msg, size_t len, upb_arena *arena) { - return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_INT64, arena); } UPB_INLINE bool validate_SInt64Rules_add_in(validate_SInt64Rules *msg, int64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, + arena); } UPB_INLINE int64_t* validate_SInt64Rules_mutable_not_in(validate_SInt64Rules *msg, size_t *len) { return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE int64_t* validate_SInt64Rules_resize_not_in(validate_SInt64Rules *msg, size_t len, upb_arena *arena) { - return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_INT64, arena); } UPB_INLINE bool validate_SInt64Rules_add_not_in(validate_SInt64Rules *msg, int64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, + arena); } /* validate.Fixed32Rules */ UPB_INLINE validate_Fixed32Rules *validate_Fixed32Rules_new(upb_arena *arena) { - return (validate_Fixed32Rules *)upb_msg_new(&validate_Fixed32Rules_msginit, arena); + return (validate_Fixed32Rules *)_upb_msg_new(&validate_Fixed32Rules_msginit, arena); } UPB_INLINE validate_Fixed32Rules *validate_Fixed32Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1041,27 +1040,27 @@ UPB_INLINE uint32_t* validate_Fixed32Rules_mutable_in(validate_Fixed32Rules *msg return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE uint32_t* validate_Fixed32Rules_resize_in(validate_Fixed32Rules *msg, size_t len, upb_arena *arena) { - return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_UINT32, arena); } UPB_INLINE bool validate_Fixed32Rules_add_in(validate_Fixed32Rules *msg, uint32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, + arena); } UPB_INLINE uint32_t* validate_Fixed32Rules_mutable_not_in(validate_Fixed32Rules *msg, size_t *len) { return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE uint32_t* validate_Fixed32Rules_resize_not_in(validate_Fixed32Rules *msg, size_t len, upb_arena *arena) { - return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_UINT32, arena); + return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_UINT32, arena); } UPB_INLINE bool validate_Fixed32Rules_add_not_in(validate_Fixed32Rules *msg, uint32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val, + arena); } /* validate.Fixed64Rules */ UPB_INLINE validate_Fixed64Rules *validate_Fixed64Rules_new(upb_arena *arena) { - return (validate_Fixed64Rules *)upb_msg_new(&validate_Fixed64Rules_msginit, arena); + return (validate_Fixed64Rules *)_upb_msg_new(&validate_Fixed64Rules_msginit, arena); } UPB_INLINE validate_Fixed64Rules *validate_Fixed64Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1109,27 +1108,27 @@ UPB_INLINE uint64_t* validate_Fixed64Rules_mutable_in(validate_Fixed64Rules *msg return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE uint64_t* validate_Fixed64Rules_resize_in(validate_Fixed64Rules *msg, size_t len, upb_arena *arena) { - return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_UINT64, arena); + return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_UINT64, arena); } UPB_INLINE bool validate_Fixed64Rules_add_in(validate_Fixed64Rules *msg, uint64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, + arena); } UPB_INLINE uint64_t* validate_Fixed64Rules_mutable_not_in(validate_Fixed64Rules *msg, size_t *len) { return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE uint64_t* validate_Fixed64Rules_resize_not_in(validate_Fixed64Rules *msg, size_t len, upb_arena *arena) { - return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_UINT64, arena); + return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_UINT64, arena); } UPB_INLINE bool validate_Fixed64Rules_add_not_in(validate_Fixed64Rules *msg, uint64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val, + arena); } /* validate.SFixed32Rules */ UPB_INLINE validate_SFixed32Rules *validate_SFixed32Rules_new(upb_arena *arena) { - return (validate_SFixed32Rules *)upb_msg_new(&validate_SFixed32Rules_msginit, arena); + return (validate_SFixed32Rules *)_upb_msg_new(&validate_SFixed32Rules_msginit, arena); } UPB_INLINE validate_SFixed32Rules *validate_SFixed32Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1177,27 +1176,27 @@ UPB_INLINE int32_t* validate_SFixed32Rules_mutable_in(validate_SFixed32Rules *ms return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t* validate_SFixed32Rules_resize_in(validate_SFixed32Rules *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool validate_SFixed32Rules_add_in(validate_SFixed32Rules *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE int32_t* validate_SFixed32Rules_mutable_not_in(validate_SFixed32Rules *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE int32_t* validate_SFixed32Rules_resize_not_in(validate_SFixed32Rules *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool validate_SFixed32Rules_add_not_in(validate_SFixed32Rules *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } /* validate.SFixed64Rules */ UPB_INLINE validate_SFixed64Rules *validate_SFixed64Rules_new(upb_arena *arena) { - return (validate_SFixed64Rules *)upb_msg_new(&validate_SFixed64Rules_msginit, arena); + return (validate_SFixed64Rules *)_upb_msg_new(&validate_SFixed64Rules_msginit, arena); } UPB_INLINE validate_SFixed64Rules *validate_SFixed64Rules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1245,27 +1244,27 @@ UPB_INLINE int64_t* validate_SFixed64Rules_mutable_in(validate_SFixed64Rules *ms return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t* validate_SFixed64Rules_resize_in(validate_SFixed64Rules *msg, size_t len, upb_arena *arena) { - return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_INT64, arena); } UPB_INLINE bool validate_SFixed64Rules_add_in(validate_SFixed64Rules *msg, int64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, + arena); } UPB_INLINE int64_t* validate_SFixed64Rules_mutable_not_in(validate_SFixed64Rules *msg, size_t *len) { return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE int64_t* validate_SFixed64Rules_resize_not_in(validate_SFixed64Rules *msg, size_t len, upb_arena *arena) { - return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_SIZE(8, 8), UPB_TYPE_INT64, arena); + return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_INT64, arena); } UPB_INLINE bool validate_SFixed64Rules_add_not_in(validate_SFixed64Rules *msg, int64_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val, + arena); } /* validate.BoolRules */ UPB_INLINE validate_BoolRules *validate_BoolRules_new(upb_arena *arena) { - return (validate_BoolRules *)upb_msg_new(&validate_BoolRules_msginit, arena); + return (validate_BoolRules *)_upb_msg_new(&validate_BoolRules_msginit, arena); } UPB_INLINE validate_BoolRules *validate_BoolRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1287,7 +1286,7 @@ UPB_INLINE void validate_BoolRules_set_const(validate_BoolRules *msg, bool value /* validate.StringRules */ UPB_INLINE validate_StringRules *validate_StringRules_new(upb_arena *arena) { - return (validate_StringRules *)upb_msg_new(&validate_StringRules_msginit, arena); + return (validate_StringRules *)_upb_msg_new(&validate_StringRules_msginit, arena); } UPB_INLINE validate_StringRules *validate_StringRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1389,21 +1388,21 @@ UPB_INLINE upb_strview* validate_StringRules_mutable_in(validate_StringRules *ms return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(96, 136), len); } UPB_INLINE upb_strview* validate_StringRules_resize_in(validate_StringRules *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(96, 136), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(96, 136), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool validate_StringRules_add_in(validate_StringRules *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(96, 136), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(96, 136), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* validate_StringRules_mutable_not_in(validate_StringRules *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 144), len); } UPB_INLINE upb_strview* validate_StringRules_resize_not_in(validate_StringRules *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(100, 144), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(100, 144), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool validate_StringRules_add_not_in(validate_StringRules *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(100, 144), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(100, 144), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void validate_StringRules_set_email(validate_StringRules *msg, bool value) { UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(104, 152), value, UPB_SIZE(108, 156), 12); @@ -1438,7 +1437,7 @@ UPB_INLINE void validate_StringRules_set_len_bytes(validate_StringRules *msg, ui /* validate.BytesRules */ UPB_INLINE validate_BytesRules *validate_BytesRules_new(upb_arena *arena) { - return (validate_BytesRules *)upb_msg_new(&validate_BytesRules_msginit, arena); + return (validate_BytesRules *)_upb_msg_new(&validate_BytesRules_msginit, arena); } UPB_INLINE validate_BytesRules *validate_BytesRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1514,21 +1513,21 @@ UPB_INLINE upb_strview* validate_BytesRules_mutable_in(validate_BytesRules *msg, return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(72, 112), len); } UPB_INLINE upb_strview* validate_BytesRules_resize_in(validate_BytesRules *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(72, 112), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(72, 112), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool validate_BytesRules_add_in(validate_BytesRules *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(72, 112), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(72, 112), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* validate_BytesRules_mutable_not_in(validate_BytesRules *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(76, 120), len); } UPB_INLINE upb_strview* validate_BytesRules_resize_not_in(validate_BytesRules *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(76, 120), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(76, 120), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool validate_BytesRules_add_not_in(validate_BytesRules *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(76, 120), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(76, 120), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE void validate_BytesRules_set_ip(validate_BytesRules *msg, bool value) { UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(80, 128), value, UPB_SIZE(84, 132), 10); @@ -1547,7 +1546,7 @@ UPB_INLINE void validate_BytesRules_set_len(validate_BytesRules *msg, uint64_t v /* validate.EnumRules */ UPB_INLINE validate_EnumRules *validate_EnumRules_new(upb_arena *arena) { - return (validate_EnumRules *)upb_msg_new(&validate_EnumRules_msginit, arena); + return (validate_EnumRules *)_upb_msg_new(&validate_EnumRules_msginit, arena); } UPB_INLINE validate_EnumRules *validate_EnumRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1577,27 +1576,27 @@ UPB_INLINE int32_t* validate_EnumRules_mutable_in(validate_EnumRules *msg, size_ return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len); } UPB_INLINE int32_t* validate_EnumRules_resize_in(validate_EnumRules *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(12, 16), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(12, 16), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool validate_EnumRules_add_in(validate_EnumRules *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(12, 16), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(12, 16), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } UPB_INLINE int32_t* validate_EnumRules_mutable_not_in(validate_EnumRules *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 24), len); } UPB_INLINE int32_t* validate_EnumRules_resize_not_in(validate_EnumRules *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 24), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 24), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool validate_EnumRules_add_not_in(validate_EnumRules *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(16, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(16, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } /* validate.MessageRules */ UPB_INLINE validate_MessageRules *validate_MessageRules_new(upb_arena *arena) { - return (validate_MessageRules *)upb_msg_new(&validate_MessageRules_msginit, arena); + return (validate_MessageRules *)_upb_msg_new(&validate_MessageRules_msginit, arena); } UPB_INLINE validate_MessageRules *validate_MessageRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1625,7 +1624,7 @@ UPB_INLINE void validate_MessageRules_set_required(validate_MessageRules *msg, b /* validate.RepeatedRules */ UPB_INLINE validate_RepeatedRules *validate_RepeatedRules_new(upb_arena *arena) { - return (validate_RepeatedRules *)upb_msg_new(&validate_RepeatedRules_msginit, arena); + return (validate_RepeatedRules *)_upb_msg_new(&validate_RepeatedRules_msginit, arena); } UPB_INLINE validate_RepeatedRules *validate_RepeatedRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1664,7 +1663,7 @@ UPB_INLINE void validate_RepeatedRules_set_items(validate_RepeatedRules *msg, va UPB_INLINE struct validate_FieldRules* validate_RepeatedRules_mutable_items(validate_RepeatedRules *msg, upb_arena *arena) { struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_RepeatedRules_items(msg); if (sub == NULL) { - sub = (struct validate_FieldRules*)upb_msg_new(&validate_FieldRules_msginit, arena); + sub = (struct validate_FieldRules*)_upb_msg_new(&validate_FieldRules_msginit, arena); if (!sub) return NULL; validate_RepeatedRules_set_items(msg, sub); } @@ -1674,7 +1673,7 @@ UPB_INLINE struct validate_FieldRules* validate_RepeatedRules_mutable_items(vali /* validate.MapRules */ UPB_INLINE validate_MapRules *validate_MapRules_new(upb_arena *arena) { - return (validate_MapRules *)upb_msg_new(&validate_MapRules_msginit, arena); + return (validate_MapRules *)_upb_msg_new(&validate_MapRules_msginit, arena); } UPB_INLINE validate_MapRules *validate_MapRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1715,7 +1714,7 @@ UPB_INLINE void validate_MapRules_set_keys(validate_MapRules *msg, validate_Fiel UPB_INLINE struct validate_FieldRules* validate_MapRules_mutable_keys(validate_MapRules *msg, upb_arena *arena) { struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_MapRules_keys(msg); if (sub == NULL) { - sub = (struct validate_FieldRules*)upb_msg_new(&validate_FieldRules_msginit, arena); + sub = (struct validate_FieldRules*)_upb_msg_new(&validate_FieldRules_msginit, arena); if (!sub) return NULL; validate_MapRules_set_keys(msg, sub); } @@ -1728,7 +1727,7 @@ UPB_INLINE void validate_MapRules_set_values(validate_MapRules *msg, validate_Fi UPB_INLINE struct validate_FieldRules* validate_MapRules_mutable_values(validate_MapRules *msg, upb_arena *arena) { struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_MapRules_values(msg); if (sub == NULL) { - sub = (struct validate_FieldRules*)upb_msg_new(&validate_FieldRules_msginit, arena); + sub = (struct validate_FieldRules*)_upb_msg_new(&validate_FieldRules_msginit, arena); if (!sub) return NULL; validate_MapRules_set_values(msg, sub); } @@ -1738,7 +1737,7 @@ UPB_INLINE struct validate_FieldRules* validate_MapRules_mutable_values(validate /* validate.AnyRules */ UPB_INLINE validate_AnyRules *validate_AnyRules_new(upb_arena *arena) { - return (validate_AnyRules *)upb_msg_new(&validate_AnyRules_msginit, arena); + return (validate_AnyRules *)_upb_msg_new(&validate_AnyRules_msginit, arena); } UPB_INLINE validate_AnyRules *validate_AnyRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1762,27 +1761,27 @@ UPB_INLINE upb_strview* validate_AnyRules_mutable_in(validate_AnyRules *msg, siz return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE upb_strview* validate_AnyRules_resize_in(validate_AnyRules *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool validate_AnyRules_add_in(validate_AnyRules *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(4, 8), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(4, 8), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } UPB_INLINE upb_strview* validate_AnyRules_mutable_not_in(validate_AnyRules *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE upb_strview* validate_AnyRules_resize_not_in(validate_AnyRules *msg, size_t len, upb_arena *arena) { - return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(8, 16), UPB_TYPE_STRING, arena); + return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_STRING, arena); } UPB_INLINE bool validate_AnyRules_add_not_in(validate_AnyRules *msg, upb_strview val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, arena); + return _upb_array_append_accessor(msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val, + arena); } /* validate.DurationRules */ UPB_INLINE validate_DurationRules *validate_DurationRules_new(upb_arena *arena) { - return (validate_DurationRules *)upb_msg_new(&validate_DurationRules_msginit, arena); + return (validate_DurationRules *)_upb_msg_new(&validate_DurationRules_msginit, arena); } UPB_INLINE validate_DurationRules *validate_DurationRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1819,7 +1818,7 @@ UPB_INLINE void validate_DurationRules_set_const(validate_DurationRules *msg, st UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_const(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_const(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; validate_DurationRules_set_const(msg, sub); } @@ -1832,7 +1831,7 @@ UPB_INLINE void validate_DurationRules_set_lt(validate_DurationRules *msg, struc UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_lt(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_lt(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; validate_DurationRules_set_lt(msg, sub); } @@ -1845,7 +1844,7 @@ UPB_INLINE void validate_DurationRules_set_lte(validate_DurationRules *msg, stru UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_lte(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_lte(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; validate_DurationRules_set_lte(msg, sub); } @@ -1858,7 +1857,7 @@ UPB_INLINE void validate_DurationRules_set_gt(validate_DurationRules *msg, struc UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_gt(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_gt(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; validate_DurationRules_set_gt(msg, sub); } @@ -1871,7 +1870,7 @@ UPB_INLINE void validate_DurationRules_set_gte(validate_DurationRules *msg, stru UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_gte(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_gte(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; validate_DurationRules_set_gte(msg, sub); } @@ -1881,10 +1880,10 @@ UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_mutable_in(v return (struct google_protobuf_Duration**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_resize_in(validate_DurationRules *msg, size_t len, upb_arena *arena) { - return (struct google_protobuf_Duration**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct google_protobuf_Duration**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_add_in(validate_DurationRules *msg, upb_arena *arena) { - struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1894,10 +1893,10 @@ UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_mutable_not_ return (struct google_protobuf_Duration**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_resize_not_in(validate_DurationRules *msg, size_t len, upb_arena *arena) { - return (struct google_protobuf_Duration**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (struct google_protobuf_Duration**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_add_not_in(validate_DurationRules *msg, upb_arena *arena) { - struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -1907,7 +1906,7 @@ UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_add_not_in(va /* validate.TimestampRules */ UPB_INLINE validate_TimestampRules *validate_TimestampRules_new(upb_arena *arena) { - return (validate_TimestampRules *)upb_msg_new(&validate_TimestampRules_msginit, arena); + return (validate_TimestampRules *)_upb_msg_new(&validate_TimestampRules_msginit, arena); } UPB_INLINE validate_TimestampRules *validate_TimestampRules_parse(const char *buf, size_t size, upb_arena *arena) { @@ -1948,7 +1947,7 @@ UPB_INLINE void validate_TimestampRules_set_const(validate_TimestampRules *msg, UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_const(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_const(msg); if (sub == NULL) { - sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena); if (!sub) return NULL; validate_TimestampRules_set_const(msg, sub); } @@ -1961,7 +1960,7 @@ UPB_INLINE void validate_TimestampRules_set_lt(validate_TimestampRules *msg, str UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lt(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_lt(msg); if (sub == NULL) { - sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena); if (!sub) return NULL; validate_TimestampRules_set_lt(msg, sub); } @@ -1974,7 +1973,7 @@ UPB_INLINE void validate_TimestampRules_set_lte(validate_TimestampRules *msg, st UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lte(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_lte(msg); if (sub == NULL) { - sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena); if (!sub) return NULL; validate_TimestampRules_set_lte(msg, sub); } @@ -1987,7 +1986,7 @@ UPB_INLINE void validate_TimestampRules_set_gt(validate_TimestampRules *msg, str UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gt(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_gt(msg); if (sub == NULL) { - sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena); if (!sub) return NULL; validate_TimestampRules_set_gt(msg, sub); } @@ -2000,7 +1999,7 @@ UPB_INLINE void validate_TimestampRules_set_gte(validate_TimestampRules *msg, st UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gte(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_gte(msg); if (sub == NULL) { - sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena); if (!sub) return NULL; validate_TimestampRules_set_gte(msg, sub); } @@ -2021,7 +2020,7 @@ UPB_INLINE void validate_TimestampRules_set_within(validate_TimestampRules *msg, UPB_INLINE struct google_protobuf_Duration* validate_TimestampRules_mutable_within(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_TimestampRules_within(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; validate_TimestampRules_set_within(msg, sub); } From 0aa8aaabbedc97b94009e3c0a7181f892e1aeb9a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 4 Feb 2020 10:47:14 -0800 Subject: [PATCH 003/239] fix bazel build rules --- bazel/grpc_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 55000cb89a1..f4c52fe82fa 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -234,9 +234,9 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "e9c136e56b98c8eb48ad1c9f8df4a6348e99f9f336ee6199c4259a312c2e3598", - strip_prefix = "upb-d8f3d6f9d415b31f3ce56d46791706c38fa311bc", - url = "https://github.com/protocolbuffers/upb/archive/d8f3d6f9d415b31f3ce56d46791706c38fa311bc.tar.gz", + sha256 = "b369e461aadd2f80a11409f7c2ab71e143cbaa69b592cddd2879f49a4b628cda", + strip_prefix = "upb-ce1a399a19f11683d58ba4c2569ec3fdd5a67621", + url = "https://github.com/protocolbuffers/upb/archive/ce1a399a19f11683d58ba4c2569ec3fdd5a67621.tar.gz", ) if "envoy_api" not in native.existing_rules(): http_archive( From 6637bbe47b241ea3741533f87390ced2a449310a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 4 Feb 2020 13:04:13 -0800 Subject: [PATCH 004/239] Update code to use new upb map API. --- .../filters/client_channel/backend_metric.cc | 18 ++++++++++-------- .../ext/filters/client_channel/xds/xds_api.cc | 9 +++------ .../alts/handshaker/alts_handshaker_client.cc | 9 ++------- .../handshaker/alts_handshaker_client_test.cc | 16 +++++----------- 4 files changed, 20 insertions(+), 32 deletions(-) diff --git a/src/core/ext/filters/client_channel/backend_metric.cc b/src/core/ext/filters/client_channel/backend_metric.cc index b36614f5b80..f0c7711b9ea 100644 --- a/src/core/ext/filters/client_channel/backend_metric.cc +++ b/src/core/ext/filters/client_channel/backend_metric.cc @@ -28,17 +28,19 @@ namespace { template std::map ParseMap( udpa_data_orca_v1_OrcaLoadReport* msg, - EntryType** (*entry_func)(udpa_data_orca_v1_OrcaLoadReport*, size_t*), + const EntryType* (*entry_func)(const udpa_data_orca_v1_OrcaLoadReport*, + size_t*), upb_strview (*key_func)(const EntryType*), double (*value_func)(const EntryType*), Arena* arena) { std::map result; - size_t size; - const auto* const* entries = entry_func(msg, &size); - for (size_t i = 0; i < size; ++i) { - upb_strview key_view = key_func(entries[i]); + size_t i = UPB_MAP_BEGIN; + while (true) { + const auto* entry = entry_func(msg, &i); + if (entry == nullptr) break; + upb_strview key_view = key_func(entry); char* key = static_cast(arena->Alloc(key_view.size + 1)); memcpy(key, key_view.data, key_view.size); - result[StringView(key, key_view.size)] = value_func(entries[i]); + result[StringView(key, key_view.size)] = value_func(entry); } return result; } @@ -64,12 +66,12 @@ const LoadBalancingPolicy::BackendMetricData* ParseBackendMetricData( udpa_data_orca_v1_OrcaLoadReport_rps(msg); backend_metric_data->request_cost = ParseMap( - msg, udpa_data_orca_v1_OrcaLoadReport_mutable_request_cost, + msg, udpa_data_orca_v1_OrcaLoadReport_request_cost_next, udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_key, udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_value, arena); backend_metric_data->utilization = ParseMap( - msg, udpa_data_orca_v1_OrcaLoadReport_mutable_utilization, + msg, udpa_data_orca_v1_OrcaLoadReport_utilization_next, udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_key, udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_value, arena); return backend_metric_data; diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc index a51256594fb..a4b2d10a0f7 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -120,13 +120,10 @@ void PopulateListValue(upb_arena* arena, google_protobuf_ListValue* list_value, void PopulateMetadata(upb_arena* arena, google_protobuf_Struct* metadata_pb, const Json::Object& metadata) { for (const auto& p : metadata) { - google_protobuf_Struct_FieldsEntry* field = - google_protobuf_Struct_add_fields(metadata_pb, arena); - google_protobuf_Struct_FieldsEntry_set_key( - field, upb_strview_makez(p.first.c_str())); - google_protobuf_Value* value = - google_protobuf_Struct_FieldsEntry_mutable_value(field, arena); + google_protobuf_Value* value = google_protobuf_Value_new(arena); PopulateMetadataValue(arena, value, p.second); + google_protobuf_Struct_fields_set( + metadata_pb, upb_strview_makez(p.first.c_str()), value, arena); } } diff --git a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc index ec17b962972..359764e6506 100644 --- a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +++ b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc @@ -545,17 +545,12 @@ static grpc_byte_buffer* get_serialized_start_server( grpc_gcp_HandshakerReq_mutable_server_start(req, arena.ptr()); grpc_gcp_StartServerHandshakeReq_add_application_protocols( start_server, upb_strview_makez(ALTS_APPLICATION_PROTOCOL), arena.ptr()); - grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* param = - grpc_gcp_StartServerHandshakeReq_add_handshake_parameters(start_server, - arena.ptr()); - grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_set_key( - param, grpc_gcp_ALTS); grpc_gcp_ServerHandshakeParameters* value = grpc_gcp_ServerHandshakeParameters_new(arena.ptr()); grpc_gcp_ServerHandshakeParameters_add_record_protocols( value, upb_strview_makez(ALTS_RECORD_PROTOCOL), arena.ptr()); - grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_set_value(param, - value); + grpc_gcp_StartServerHandshakeReq_handshake_parameters_set( + start_server, grpc_gcp_ALTS, value, arena.ptr()); grpc_gcp_StartServerHandshakeReq_set_in_bytes( start_server, upb_strview_make(reinterpret_cast( GRPC_SLICE_START_PTR(*bytes_received)), diff --git a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc index 0e1ab006728..06a61d11704 100644 --- a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc +++ b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc @@ -228,17 +228,11 @@ static grpc_call_error check_server_start_success(grpc_call* /*call*/, nullptr); GPR_ASSERT(upb_strview_eql(application_protocols[0], upb_strview_makez(ALTS_APPLICATION_PROTOCOL))); - size_t handshake_parameters_count; - const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* const* - handshake_parameters = - grpc_gcp_StartServerHandshakeReq_handshake_parameters( - server_start, &handshake_parameters_count); - GPR_ASSERT(handshake_parameters_count == 1); - GPR_ASSERT(grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_key( - handshake_parameters[0]) == grpc_gcp_ALTS); - const grpc_gcp_ServerHandshakeParameters* value = - grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value( - handshake_parameters[0]); + GPR_ASSERT(grpc_gcp_StartServerHandshakeReq_handshake_parameters_size( + server_start) == 1); + grpc_gcp_ServerHandshakeParameters* value; + GPR_ASSERT(grpc_gcp_StartServerHandshakeReq_handshake_parameters_get( + server_start, grpc_gcp_ALTS, &value)); upb_strview const* record_protocols = grpc_gcp_ServerHandshakeParameters_record_protocols(value, nullptr); GPR_ASSERT(upb_strview_eql(record_protocols[0], From 31bae1a592817db2a9e69b3ba55160ccb5370af5 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 6 Feb 2020 10:20:07 -0800 Subject: [PATCH 005/239] Squashed 'third_party/upb/' changes from ce1a399a19..3d955e684c 3d955e684c Added "extern C" blocks to textencode. (#244) ca512852f3 Fixed parsing for string->double maps. (#243) git-subtree-dir: third_party/upb git-subtree-split: 3d955e684c91feff188de1f2509e55aae291762a --- BUILD | 21 ++++++++++- tests/bindings/lua/main.c | 2 + tests/bindings/lua/test_upb.lua | 27 ++++++++++++++ tests/test.proto | 66 ++------------------------------- tests/test_generated_code.c | 21 +++++++++++ upb/def.c | 26 +++++++++++++ upb/textencode.h | 8 ++++ upbc/message_layout.cc | 23 +++++++----- 8 files changed, 121 insertions(+), 73 deletions(-) diff --git a/BUILD b/BUILD index ef2fcd23a2c..9d3ae348831 100644 --- a/BUILD +++ b/BUILD @@ -354,11 +354,24 @@ cc_test( ], ) +proto_library( + name = "test_proto", + testonly = 1, + srcs = ["tests/test.proto"], +) + +upb_proto_library( + name = "test_upbproto", + testonly = 1, + deps = [":test_proto"], +) + cc_test( name = "test_generated_code", srcs = ["tests/test_generated_code.c"], deps = [ ":test_messages_proto3_proto_upb", + ":test_upbproto", ":upb_test", ], ) @@ -657,6 +670,7 @@ cc_test( "@com_google_protobuf//:descriptor_proto", ":descriptor_proto_lua", ":test_messages_proto3_proto_lua", + ":test_proto_lua", "tests/bindings/lua/test_upb.lua", "third_party/lunit/console.lua", "third_party/lunit/lunit.lua", @@ -682,9 +696,14 @@ cc_binary( ], ) +lua_proto_library( + name = "test_proto_lua", + testonly = 1, + deps = [":test_proto"], +) + lua_proto_library( name = "descriptor_proto_lua", - visibility = ["//visibility:public"], deps = ["@com_google_protobuf//:descriptor_proto"], ) diff --git a/tests/bindings/lua/main.c b/tests/bindings/lua/main.c index 5b501738c15..f3714b5126c 100644 --- a/tests/bindings/lua/main.c +++ b/tests/bindings/lua/main.c @@ -27,8 +27,10 @@ const char *init = "./third_party/lunit/?.lua;" "external/com_google_protobuf/?.lua;" "external/com_google_protobuf/src/?.lua;" + "bazel-bin/?.lua;" "bazel-bin/external/com_google_protobuf/src/?.lua;" "bazel-bin/external/com_google_protobuf/?.lua;" + "bazel-bin/external/com_google_protobuf/?.lua;" "upb/bindings/lua/?.lua" "'"; diff --git a/tests/bindings/lua/test_upb.lua b/tests/bindings/lua/test_upb.lua index 25ec0c17218..fb76224e209 100644 --- a/tests/bindings/lua/test_upb.lua +++ b/tests/bindings/lua/test_upb.lua @@ -1,6 +1,7 @@ local upb = require "lupb" local lunit = require "lunit" +local upb_test = require "tests.test_pb" local test_messages_proto3 = require "google.protobuf.test_messages_proto3_pb" local descriptor = require "google.protobuf.descriptor_pb" @@ -68,6 +69,32 @@ function test_msg_map() assert_equal(12, msg2.map_int32_int32[6]) end +function test_string_double_map() + msg = upb_test.MapTest() + msg.map_string_double["one"] = 1.0 + msg.map_string_double["two point five"] = 2.5 + assert_equal(1, msg.map_string_double["one"]) + assert_equal(2.5, msg.map_string_double["two point five"]) + + -- Test overwrite. + msg.map_string_double["one"] = 2 + assert_equal(2, msg.map_string_double["one"]) + assert_equal(2.5, msg.map_string_double["two point five"]) + msg.map_string_double["one"] = 1.0 + + -- Test delete. + msg.map_string_double["one"] = nil + assert_nil(msg.map_string_double["one"]) + assert_equal(2.5, msg.map_string_double["two point five"]) + msg.map_string_double["one"] = 1 + + local serialized = upb.encode(msg) + assert_true(#serialized > 0) + local msg2 = upb.decode(upb_test.MapTest, serialized) + assert_equal(1, msg2.map_string_double["one"]) + assert_equal(2.5, msg2.map_string_double["two point five"]) +end + function test_msg_string_map() msg = test_messages_proto3.TestAllTypesProto3() msg.map_string_string["foo"] = "bar" diff --git a/tests/test.proto b/tests/test.proto index e790cbf06d7..c4b7e9c3dbd 100644 --- a/tests/test.proto +++ b/tests/test.proto @@ -1,68 +1,8 @@ -// A series of messages with various kinds of cycles in them. -// +-+---+ +---+ +---+ -// V | | V | V | -// A -> B-+-> C -> D---+--->E---+ -// ^ |`---|--------^ -// +----------+----+ F - syntax = "proto2"; -message A { - optional B b = 1; -} - -message B { - optional B b = 1; - optional C c = 2; -} - -message C { - optional A a = 1; - optional B b = 2; - optional D d = 3; - optional E e = 4; -} - -message D { - optional A a = 1; - optional D d = 2; - optional E e = 3; -} - -message E { - optional E e = 1; -} - -message F { - optional E e = 1; -} - -// A proto with a bunch of simple primitives. -message SimplePrimitives { - optional fixed64 u64 = 1; - optional fixed32 u32 = 2; - optional double dbl = 3; - optional float flt = 5; - optional sint64 i64 = 6; - optional sint32 i32 = 7; - optional bool b = 8; - optional string str = 9; - - oneof foo { - int32 oneof_int32 = 10; - string oneof_string = 11; - } - - oneof bar { - int64 oneof_int64 = 13; - bytes oneof_bytes = 14; - } +package upb_test; - message Nested { - oneof foo { - int32 oneof_int32 = 10; - string b = 11; - } - } +message MapTest { + map map_string_double = 1; } diff --git a/tests/test_generated_code.c b/tests/test_generated_code.c index 3d1f518b4c4..ef8575cf9dc 100644 --- a/tests/test_generated_code.c +++ b/tests/test_generated_code.c @@ -5,6 +5,7 @@ #include "src/google/protobuf/test_messages_proto3.upb.h" #include "tests/upb_test.h" +#include "tests/test.upb.h" const char test_str[] = "abcdefg"; const char test_str2[] = "12345678910"; @@ -114,6 +115,25 @@ static void check_string_map_one_entry( ASSERT(!const_ent); } +static void test_string_double_map() { + upb_arena *arena = upb_arena_new(); + upb_strview serialized; + upb_test_MapTest *msg = upb_test_MapTest_new(arena); + upb_test_MapTest *msg2; + double val; + + upb_test_MapTest_map_string_double_set(msg, test_str_view, 1.5, arena); + serialized.data = upb_test_MapTest_serialize(msg, arena, &serialized.size); + ASSERT(serialized.data); + + msg2 = upb_test_MapTest_parse(serialized.data, serialized.size, arena); + ASSERT(msg2); + ASSERT(upb_test_MapTest_map_string_double_get(msg2, test_str_view, &val)); + ASSERT(val == 1.5); + + upb_arena_free(arena); +} + static void test_string_map() { upb_arena *arena = upb_arena_new(); protobuf_test_messages_proto3_TestAllTypesProto3 *msg = @@ -323,6 +343,7 @@ void test_repeated() { int run_tests(int argc, char *argv[]) { test_scalars(); test_string_map(); + test_string_double_map(); test_int32_map(); test_repeated(); return 0; diff --git a/upb/def.c b/upb/def.c index f9de1a9f751..1b44aecbdf8 100644 --- a/upb/def.c +++ b/upb/def.c @@ -921,6 +921,32 @@ static bool make_layout(const upb_symtab *symtab, const upb_msgdef *m) { l->fields = fields; l->submsgs = submsgs; + if (upb_msgdef_mapentry(m)) { + /* TODO(haberman): refactor this method so this special case is more + * elegant. */ + const upb_fielddef *key = upb_msgdef_itof(m, 1); + const upb_fielddef *val = upb_msgdef_itof(m, 2); + fields[0].number = 1; + fields[1].number = 2; + fields[0].label = UPB_LABEL_OPTIONAL; + fields[1].label = UPB_LABEL_OPTIONAL; + fields[0].presence = 0; + fields[1].presence = 0; + fields[0].descriptortype = upb_fielddef_descriptortype(key); + fields[1].descriptortype = upb_fielddef_descriptortype(val); + fields[0].offset = 0; + fields[1].offset = sizeof(upb_strview); + fields[1].submsg_index = 0; + + if (upb_fielddef_type(val) == UPB_TYPE_MESSAGE) { + submsgs[0] = upb_fielddef_msgsubdef(val)->layout; + } + + l->field_count = 2; + l->size = 2 * sizeof(upb_strview);align_up(l->size, 8); + return true; + } + /* Allocate data offsets in three stages: * * 1. hasbits. diff --git a/upb/textencode.h b/upb/textencode.h index 87ceed0c062..526142421a5 100644 --- a/upb/textencode.h +++ b/upb/textencode.h @@ -4,6 +4,10 @@ #include "upb/def.h" +#ifdef __cplusplus +extern "C" { +#endif + enum { /* When set, prints everything on a single line. */ UPB_TXTENC_SINGLELINE = 1, @@ -24,4 +28,8 @@ size_t upb_textencode(const upb_msg *msg, const upb_msgdef *m, const upb_symtab *ext_pool, int options, char *buf, size_t size); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* UPB_TEXTENCODE_H_ */ diff --git a/upbc/message_layout.cc b/upbc/message_layout.cc index bf3eb2b3bd1..cb7f7f9c432 100644 --- a/upbc/message_layout.cc +++ b/upbc/message_layout.cc @@ -32,12 +32,7 @@ bool MessageLayout::HasHasbit(const protobuf::FieldDescriptor* field) { MessageLayout::SizeAndAlign MessageLayout::SizeOf( const protobuf::FieldDescriptor* field) { - if (field->containing_type()->options().map_entry()) { - // Map entries aren't actually stored, they are only used during parsing. - // For parsing, it helps a lot if all map entry messages have the same - // layout. - return {{8, 16}, {4, 8}}; // upb_stringview - } else if (field->is_repeated()) { + if (field->is_repeated()) { return {{4, 8}, {4, 8}}; // Pointer to array object. } else { return SizeOfUnwrapped(field); @@ -50,7 +45,7 @@ MessageLayout::SizeAndAlign MessageLayout::SizeOfUnwrapped( case protobuf::FieldDescriptor::CPPTYPE_MESSAGE: return {{4, 8}, {4, 8}}; // Pointer to message. case protobuf::FieldDescriptor::CPPTYPE_STRING: - return {{8, 16}, {4, 8}}; // upb_stringview + return {{8, 16}, {4, 8}}; // upb_strview case protobuf::FieldDescriptor::CPPTYPE_BOOL: return {{1, 1}, {1, 1}}; case protobuf::FieldDescriptor::CPPTYPE_FLOAT: @@ -111,8 +106,18 @@ int64_t MessageLayout::FieldLayoutRank(const protobuf::FieldDescriptor* field) { void MessageLayout::ComputeLayout(const protobuf::Descriptor* descriptor) { size_ = Size{0, 0}; maxalign_ = Size{0, 0}; - PlaceNonOneofFields(descriptor); - PlaceOneofFields(descriptor); + + if (descriptor->options().map_entry()) { + // Map entries aren't actually stored, they are only used during parsing. + // For parsing, it helps a lot if all map entry messages have the same + // layout. + SizeAndAlign size{{8, 16}, {4, 8}}; // upb_strview + field_offsets_[descriptor->FindFieldByNumber(1)] = Place(size); + field_offsets_[descriptor->FindFieldByNumber(2)] = Place(size); + } else { + PlaceNonOneofFields(descriptor); + PlaceOneofFields(descriptor); + } // Align overall size up to max size. size_.AlignUp(maxalign_); From 595df47b028da14de067b1ee950a26061720dc7e Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 6 Feb 2020 10:24:58 -0800 Subject: [PATCH 006/239] Ran gen_upb_api.sh --- .../udpa/data/orca/v1/orca_load_report.upb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c index 165de446923..1be40b6a17f 100644 --- a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c @@ -33,8 +33,8 @@ const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit = { }; static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry__fields[2] = { - {1, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {2, UPB_SIZE(0, 0), 0, 0, 1, 1}, + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 1, 1}, }; const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit = { @@ -44,8 +44,8 @@ const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit = }; static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry__fields[2] = { - {1, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {2, UPB_SIZE(0, 0), 0, 0, 1, 1}, + {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 1, 1}, }; const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit = { From 4813b665a64b020cb9f920d9638254e089d7f47a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 6 Feb 2020 10:26:21 -0800 Subject: [PATCH 007/239] update upb version in bazel deps --- bazel/grpc_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index f4c52fe82fa..f7c6fa4fe66 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -234,9 +234,9 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "b369e461aadd2f80a11409f7c2ab71e143cbaa69b592cddd2879f49a4b628cda", - strip_prefix = "upb-ce1a399a19f11683d58ba4c2569ec3fdd5a67621", - url = "https://github.com/protocolbuffers/upb/archive/ce1a399a19f11683d58ba4c2569ec3fdd5a67621.tar.gz", + sha256 = "d39bda5230ae665c3e653c8e1ba4de169f0a5879a1eda54a11750e9140ad9598", + strip_prefix = "upb-3d955e684c91feff188de1f2509e55aae291762a", + url = "https://github.com/protocolbuffers/upb/archive/3d955e684c91feff188de1f2509e55aae291762a.tar.gz", ) if "envoy_api" not in native.existing_rules(): http_archive( From 4f76446806ecc7dd4b1d70377fafd3508629196a Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 7 Feb 2020 07:46:18 -0800 Subject: [PATCH 008/239] Squashed 'third_party/upb/' changes from 3d955e684c..4c6dcc3c6b 4c6dcc3c6b [textformat]: added missing newline when a message opens. (#245) git-subtree-dir: third_party/upb git-subtree-split: 4c6dcc3c6bdb7039995768bf5f95ac2c4a6e9102 --- BUILD | 1 + tests/bindings/lua/test_upb.lua | 5 +++++ upb/bindings/lua/msg.c | 33 +++++++++++++++++++++++++++++++++ upb/reflection.c | 2 +- upb/textencode.c | 9 +++++---- 5 files changed, 45 insertions(+), 5 deletions(-) diff --git a/BUILD b/BUILD index 9d3ae348831..c5a3e977fc0 100644 --- a/BUILD +++ b/BUILD @@ -656,6 +656,7 @@ cc_library( ], deps = [ ":reflection", + ":textformat", ":upb", "@lua//:liblua", ], diff --git a/tests/bindings/lua/test_upb.lua b/tests/bindings/lua/test_upb.lua index fb76224e209..eaaf7e40859 100644 --- a/tests/bindings/lua/test_upb.lua +++ b/tests/bindings/lua/test_upb.lua @@ -458,6 +458,11 @@ function test_foo() assert_error_match("lupb.array expected", function () set.file = 1 end) set = upb.decode(FileDescriptorSet, descriptor) + + -- Test that we can at least call this without crashing. + set_textformat = tostring(set) + + -- print(set_textformat) assert_equal(#set.file, 1) assert_equal(set.file[1].name, "google/protobuf/descriptor.proto") end diff --git a/upb/bindings/lua/msg.c b/upb/bindings/lua/msg.c index 82d65e0fa67..aca4c32c641 100644 --- a/upb/bindings/lua/msg.c +++ b/upb/bindings/lua/msg.c @@ -13,6 +13,7 @@ #include "lauxlib.h" #include "upb/bindings/lua/upb.h" #include "upb/reflection.h" +#include "upb/textencode.h" #include "upb/port_def.inc" @@ -887,9 +888,41 @@ static int lupb_msg_newindex(lua_State *L) { return 1; } +/** + * lupb_msg_tostring() + * + * Handles: + * tostring(msg) + * print(msg) + * etc. + */ +static int lupb_msg_tostring(lua_State *L) { + upb_msg *msg = lupb_msg_check(L, 1); + const upb_msgdef *m; + char buf[1024]; + size_t size; + + lua_getiuservalue(L, 1, LUPB_MSGDEF_INDEX); + m = lupb_msgdef_check(L, -1); + + size = upb_textencode(msg, m, NULL, 0, buf, sizeof(buf)); + + if (size < sizeof(buf)) { + lua_pushlstring(L, buf, size); + } else { + char *ptr = malloc(size + 1); + upb_textencode(msg, m, NULL, 0, ptr, size + 1); + lua_pushlstring(L, ptr, size); + free(ptr); + } + + return 1; +} + static const struct luaL_Reg lupb_msg_mm[] = { {"__index", lupb_msg_index}, {"__newindex", lupb_msg_newindex}, + {"__tostring", lupb_msg_tostring}, {NULL, NULL} }; diff --git a/upb/reflection.c b/upb/reflection.c index b3bc883c777..09483ac8dad 100644 --- a/upb/reflection.c +++ b/upb/reflection.c @@ -82,7 +82,7 @@ bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f) { return *oneofcase(msg, field) == field->number; } else if (field->presence > 0) { uint32_t hasbit = field->presence; - return *PTR_AT(msg, hasbit / 8, char) | (1 << (hasbit % 8)); + return *PTR_AT(msg, hasbit / 8, char) & (1 << (hasbit % 8)); } else { UPB_ASSERT(field->descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE || field->descriptortype == UPB_DESCRIPTOR_TYPE_GROUP); diff --git a/upb/textencode.c b/upb/textencode.c index 8af78ffd4af..b1106642197 100644 --- a/upb/textencode.c +++ b/upb/textencode.c @@ -21,8 +21,6 @@ typedef struct { static void txtenc_msg(txtenc *e, const upb_msg *msg, const upb_msgdef *m); -#define CHK(x) do { if (!(x)) { return false; } } while(0) - static void txtenc_putbytes(txtenc *e, const void *data, size_t len) { size_t have = e->end - e->ptr; if (UPB_LIKELY(have >= len)) { @@ -159,6 +157,7 @@ static void txtenc_field(txtenc *e, upb_msgval val, const upb_fielddef *f) { break; case UPB_TYPE_MESSAGE: txtenc_putstr(e, "{"); + txtenc_endfield(e); e->indent_depth++; txtenc_msg(e, val.msg_val, upb_fielddef_msgsubdef(f)); e->indent_depth--; @@ -224,6 +223,8 @@ static void txtenc_map(txtenc *e, const upb_map *map, const upb_fielddef *f) { } } +#define CHK(x) do { if (!(x)) { return false; } } while(0) + static const char *txtenc_parsevarint(const char *ptr, const char *limit, uint64_t *val) { uint8_t byte; @@ -333,6 +334,8 @@ static const char *txtenc_unknown(txtenc *e, const char *ptr, const char *end, return groupnum == -1 ? ptr : NULL; } +#undef CHK + static void txtenc_msg(txtenc *e, const upb_msg *msg, const upb_msgdef *m) { size_t iter = UPB_MSG_BEGIN; @@ -389,5 +392,3 @@ size_t upb_textencode(const upb_msg *msg, const upb_msgdef *m, txtenc_msg(&e, msg, m); return txtenc_nullz(&e, size); } - -#undef CHK From cda13fd644a643b97a7b822c34426a3ea80bdecd Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 7 Feb 2020 07:47:23 -0800 Subject: [PATCH 009/239] upgrade upb commit in bazel deps --- bazel/grpc_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index f7c6fa4fe66..4920d7e5722 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -234,9 +234,9 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "d39bda5230ae665c3e653c8e1ba4de169f0a5879a1eda54a11750e9140ad9598", - strip_prefix = "upb-3d955e684c91feff188de1f2509e55aae291762a", - url = "https://github.com/protocolbuffers/upb/archive/3d955e684c91feff188de1f2509e55aae291762a.tar.gz", + sha256 = "e86fa13deecf0af4d919d109c0cca9d0604923fa6dbf31975ac642b2183af751", + strip_prefix = "upb-4c6dcc3c6bdb7039995768bf5f95ac2c4a6e9102", + url = "https://github.com/protocolbuffers/upb/archive/4c6dcc3c6bdb7039995768bf5f95ac2c4a6e9102.tar.gz", ) if "envoy_api" not in native.existing_rules(): http_archive( From 879ab14c8cc2987194d4a451c89be5a2ac69eed6 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 7 Feb 2020 07:56:43 -0800 Subject: [PATCH 010/239] clang-format --- test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc index 06a61d11704..7768d8de190 100644 --- a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc +++ b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc @@ -229,7 +229,7 @@ static grpc_call_error check_server_start_success(grpc_call* /*call*/, GPR_ASSERT(upb_strview_eql(application_protocols[0], upb_strview_makez(ALTS_APPLICATION_PROTOCOL))); GPR_ASSERT(grpc_gcp_StartServerHandshakeReq_handshake_parameters_size( - server_start) == 1); + server_start) == 1); grpc_gcp_ServerHandshakeParameters* value; GPR_ASSERT(grpc_gcp_StartServerHandshakeReq_handshake_parameters_get( server_start, grpc_gcp_ALTS, &value)); From b430f95ae08f94b63c94e46a1a160fc04eb3dd30 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 7 Feb 2020 08:43:14 -0800 Subject: [PATCH 011/239] fix build to remove file that no longer exists in upb --- gRPC-C++.podspec | 2 -- gRPC-Core.podspec | 2 -- grpc.gemspec | 1 - package.xml | 1 - src/upb/gen_build_yaml.py | 1 - 5 files changed, 7 deletions(-) diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 9901b8fd950..bdf66c13e0a 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -643,7 +643,6 @@ Pod::Spec.new do |s| 'src/cpp/util/time_cc.cc', 'third_party/upb/upb/decode.h', 'third_party/upb/upb/encode.h', - 'third_party/upb/upb/generated_util.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', @@ -1028,7 +1027,6 @@ Pod::Spec.new do |s| 'src/cpp/thread_manager/thread_manager.h', 'third_party/upb/upb/decode.h', 'third_party/upb/upb/encode.h', - 'third_party/upb/upb/generated_util.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index d0cc93747d7..9c164c9a731 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -970,7 +970,6 @@ Pod::Spec.new do |s| 'third_party/upb/upb/decode.h', 'third_party/upb/upb/encode.c', 'third_party/upb/upb/encode.h', - 'third_party/upb/upb/generated_util.h', 'third_party/upb/upb/msg.c', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/port.c', @@ -1346,7 +1345,6 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_interface.h', 'third_party/upb/upb/decode.h', 'third_party/upb/upb/encode.h', - 'third_party/upb/upb/generated_util.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', diff --git a/grpc.gemspec b/grpc.gemspec index 0818e352a27..f1cb8956daf 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1534,7 +1534,6 @@ Gem::Specification.new do |s| s.files += %w( third_party/upb/upb/decode.h ) s.files += %w( third_party/upb/upb/encode.c ) s.files += %w( third_party/upb/upb/encode.h ) - s.files += %w( third_party/upb/upb/generated_util.h ) s.files += %w( third_party/upb/upb/msg.c ) s.files += %w( third_party/upb/upb/msg.h ) s.files += %w( third_party/upb/upb/port.c ) diff --git a/package.xml b/package.xml index 898703c0c0b..91a88bc5488 100644 --- a/package.xml +++ b/package.xml @@ -1462,7 +1462,6 @@ - diff --git a/src/upb/gen_build_yaml.py b/src/upb/gen_build_yaml.py index f7b82993986..25af9fa762c 100755 --- a/src/upb/gen_build_yaml.py +++ b/src/upb/gen_build_yaml.py @@ -43,7 +43,6 @@ try: 'headers': [ "third_party/upb/upb/decode.h", "third_party/upb/upb/encode.h", - "third_party/upb/upb/generated_util.h", "third_party/upb/upb/msg.h", "third_party/upb/upb/port_def.inc", "third_party/upb/upb/port_undef.inc", From 6a2cb9b2f83577b81ca69e23069790b694017973 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 7 Feb 2020 10:13:17 -0800 Subject: [PATCH 012/239] Squashed 'third_party/upb/' changes from 4c6dcc3c6b..ca84145476 ca84145476 [decoder] fix for buf=NULL, size=0 case. (#246) git-subtree-dir: third_party/upb git-subtree-split: ca84145476ddd722c6d67d7cf985d1d0aefcd893 --- tests/test_generated_code.c | 12 ++++++++++++ upb/decode.c | 3 +++ 2 files changed, 15 insertions(+) diff --git a/tests/test_generated_code.c b/tests/test_generated_code.c index ef8575cf9dc..7fd958104e2 100644 --- a/tests/test_generated_code.c +++ b/tests/test_generated_code.c @@ -340,11 +340,23 @@ void test_repeated() { upb_arena_free(arena); } +void test_null_decode_buf() { + upb_arena *arena = upb_arena_new(); + protobuf_test_messages_proto3_TestAllTypesProto3 *msg = + protobuf_test_messages_proto3_TestAllTypesProto3_parse(NULL, 0, arena); + size_t size; + + ASSERT(msg); + protobuf_test_messages_proto3_TestAllTypesProto3_serialize(msg, arena, &size); + ASSERT(size == 0); +} + int run_tests(int argc, char *argv[]) { test_scalars(); test_string_map(); test_string_double_map(); test_int32_map(); test_repeated(); + test_null_decode_buf(); return 0; } diff --git a/upb/decode.c b/upb/decode.c index ce5552af40e..8a7f64d1453 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -622,6 +622,9 @@ bool upb_decode(const char *buf, size_t size, void *msg, const upb_msglayout *l, state.depth = 64; state.end_group = 0; + /* Early exit required for buf==NULL case. */ + if (size == 0) return true; + CHK(upb_decode_message(buf, l, msg, &state)); return state.end_group == 0; } From 7763564f7ceb66be86c337b45aa3e3706ca6c3de Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 7 Feb 2020 10:14:22 -0800 Subject: [PATCH 013/239] upgrade upb version in bazel deps --- bazel/grpc_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 4920d7e5722..7c994e1a707 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -234,9 +234,9 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "e86fa13deecf0af4d919d109c0cca9d0604923fa6dbf31975ac642b2183af751", - strip_prefix = "upb-4c6dcc3c6bdb7039995768bf5f95ac2c4a6e9102", - url = "https://github.com/protocolbuffers/upb/archive/4c6dcc3c6bdb7039995768bf5f95ac2c4a6e9102.tar.gz", + sha256 = "b6bfb6402ba4ed0294ae40e98333ac5fd04c6c242c44df43e2d5d9b62dbeca05", + strip_prefix = "upb-ca84145476ddd722c6d67d7cf985d1d0aefcd893", + url = "https://github.com/protocolbuffers/upb/archive/ca84145476ddd722c6d67d7cf985d1d0aefcd893.tar.gz", ) if "envoy_api" not in native.existing_rules(): http_archive( From 61360c754b70baa9db1fc8bfcdaff0bb75871abe Mon Sep 17 00:00:00 2001 From: Yushiro FURUKAWA Date: Mon, 10 Feb 2020 23:53:33 +0900 Subject: [PATCH 014/239] Remove trailing-spaces from doc/* --- doc/core/combiner-explainer.md | 10 +++---- doc/core/epoll-polling-engine.md | 2 +- ...grpc-client-server-polling-engine-usage.md | 2 +- doc/core/grpc-cq.md | 2 +- doc/core/moving-to-c++.md | 6 ++--- doc/environment_variables.md | 2 +- doc/fork_support.md | 2 +- doc/http2-interop-test-descriptions.md | 26 +++++++++---------- doc/internationalization.md | 2 +- doc/interop-test-descriptions.md | 10 +++---- doc/keepalive.md | 2 +- doc/python/server_reflection.md | 4 +-- doc/security_audit.md | 8 +++--- doc/unit_testing.md | 2 +- doc/versioning.md | 4 +-- 15 files changed, 42 insertions(+), 42 deletions(-) diff --git a/doc/core/combiner-explainer.md b/doc/core/combiner-explainer.md index 9e9d077273e..20b7f8df189 100644 --- a/doc/core/combiner-explainer.md +++ b/doc/core/combiner-explainer.md @@ -41,9 +41,9 @@ Instead, get a new property: class combiner { mpscq q; // multi-producer single-consumer queue can be made non-blocking state s; // is it empty or executing - + run(f) { - if (q.push(f)) { + if (q.push(f)) { // q.push returns true if it's the first thing while (q.pop(&f)) { // modulo some extra work to avoid races f(); @@ -73,9 +73,9 @@ class combiner { mpscq q; // multi-producer single-consumer queue can be made non-blocking state s; // is it empty or executing queue finally; // you can only do run_finally when you are already running something from the combiner - + run(f) { - if (q.push(f)) { + if (q.push(f)) { // q.push returns true if it's the first thing loop: while (q.pop(&f)) { // modulo some extra work to avoid races @@ -127,7 +127,7 @@ tries to spray events onto as many threads as possible to get as much concurrenc So `offload` really does: -``` +``` workqueue.run(continue_from_while_loop); break; ``` diff --git a/doc/core/epoll-polling-engine.md b/doc/core/epoll-polling-engine.md index e660a709384..8ce54a020d4 100644 --- a/doc/core/epoll-polling-engine.md +++ b/doc/core/epoll-polling-engine.md @@ -104,7 +104,7 @@ void grpc_use_signal(int signal_num) If the calling application does not provide a signal number, then the gRPC library will relegate to using a model similar to the current implementation (where every thread does a blocking `poll()` on its `wakeup_fd` and the `epoll_fd`). The function` psi_wait() `in figure 2 implements this logic. -**>> **(**NOTE**: Or alternatively, we can implement a turnstile polling (i.e having only one thread calling `epoll_wait()` on the epoll set at any time - which all other threads call poll on their `wakeup_fds`) +**>> **(**NOTE**: Or alternatively, we can implement a turnstile polling (i.e having only one thread calling `epoll_wait()` on the epoll set at any time - which all other threads call poll on their `wakeup_fds`) in case of not getting a signal number from the applications. diff --git a/doc/core/grpc-client-server-polling-engine-usage.md b/doc/core/grpc-client-server-polling-engine-usage.md index f66dcf09caa..3aa3cc16a78 100644 --- a/doc/core/grpc-client-server-polling-engine-usage.md +++ b/doc/core/grpc-client-server-polling-engine-usage.md @@ -7,7 +7,7 @@ This document talks about how polling engine is used in gRPC core (both on clien ## gRPC client -### Relation between Call, Channel (sub-channels), Completion queue, `grpc_pollset` +### Relation between Call, Channel (sub-channels), Completion queue, `grpc_pollset` - A gRPC Call is tied to a channel (more specifically a sub-channel) and a completion queue for the lifetime of the call. - Once a _sub-channel_ is picked for the call, the file-descriptor (socket fd in case of TCP channels) is added to the pollset corresponding to call's completion queue. (Recall that as per [grpc-cq](grpc-cq.md), a completion queue has a pollset by default) diff --git a/doc/core/grpc-cq.md b/doc/core/grpc-cq.md index b485c354566..e8338d880bb 100644 --- a/doc/core/grpc-cq.md +++ b/doc/core/grpc-cq.md @@ -61,4 +61,4 @@ grpc_cq_end_op(cq, tag) { } ``` - + diff --git a/doc/core/moving-to-c++.md b/doc/core/moving-to-c++.md index 49daf61aae3..410435c46a6 100644 --- a/doc/core/moving-to-c++.md +++ b/doc/core/moving-to-c++.md @@ -11,7 +11,7 @@ gRPC core was originally written in C89 for several reasons support, etc). Over time, this was changed to C99 as all relevant compilers in active use came to support C99 effectively. -gRPC started allowing to use C++ with a couple of exceptions not to +gRPC started allowing to use C++ with a couple of exceptions not to have C++ library linked such as `libstdc++.so`. (For more detail, see the [proposal](https://github.com/grpc/proposal/blob/master/L6-core-allow-cpp.md)) @@ -25,12 +25,12 @@ C++ compatible with ## Constraints -- Most of features available in C++11 are allowed to use but there are some exceptions +- Most of features available in C++11 are allowed to use but there are some exceptions because gRPC should support old systems. - Should be built with gcc 4.8, clang 3.3, and Visual C++ 2015. - Should be run on Linux system with libstdc++ 6.0.9 to support [manylinux1](https://www.python.org/dev/peps/pep-0513). -- This would limit us not to use modern C++11 standard library such as `filesystem`. +- This would limit us not to use modern C++11 standard library such as `filesystem`. You can easily see whether PR is free from this issue by checking the result of `Artifact Build Linux` test. - `thread_local` is not allowed to use on Apple's products because their old OSes diff --git a/doc/environment_variables.md b/doc/environment_variables.md index aef14a9842c..6b474da9599 100644 --- a/doc/environment_variables.md +++ b/doc/environment_variables.md @@ -69,7 +69,7 @@ some configuration as environment variables that can be set. completion queue - pick_first - traces the pick first load balancing policy - plugin_credentials - traces plugin credentials - - pollable_refcount - traces reference counting of 'pollable' objects (only + - pollable_refcount - traces reference counting of 'pollable' objects (only in DEBUG) - resource_quota - trace resource quota objects internals - round_robin - traces the round_robin load balancing policy diff --git a/doc/fork_support.md b/doc/fork_support.md index d0f59f25da3..ff1018ab2ea 100644 --- a/doc/fork_support.md +++ b/doc/fork_support.md @@ -25,7 +25,7 @@ A regression was noted in cases where users are doing fork/exec. This was due to ```pthread_atfork()``` handler that was added in 1.7 to partially support forking in gRPC. A deadlock can happen when pthread_atfork handler is running, and an application thread is calling into gRPC. -We have provided a workaround for this issue by allowing users to turn +We have provided a workaround for this issue by allowing users to turn off the handler using env flag ```GRPC_ENABLE_FORK_SUPPORT=False```. This should be set whenever a user expects to always call exec immediately following fork. It will disable the fork handlers. diff --git a/doc/http2-interop-test-descriptions.md b/doc/http2-interop-test-descriptions.md index 435a8de709c..c596f7c1637 100644 --- a/doc/http2-interop-test-descriptions.md +++ b/doc/http2-interop-test-descriptions.md @@ -8,7 +8,7 @@ Server ------ The code for the custom http2 server can be found [here](https://github.com/grpc/grpc/tree/master/test/http2_test). -It is responsible for handling requests and sending responses, and also for +It is responsible for handling requests and sending responses, and also for fulfilling the behavior of each particular test case. Server should accept these arguments: @@ -51,7 +51,7 @@ the user application having to do a thing. Client Procedure: 1. Client sends two UnaryCall requests (and sleeps for 1 second in-between). TODO: resolve [9300](https://github.com/grpc/grpc/issues/9300) and remove the 1 second sleep - + ``` { response_size: 314159 @@ -78,7 +78,7 @@ RST_STREAM immediately after sending headers to the client. Procedure: 1. Client sends UnaryCall with: - + ``` { response_size: 314159 @@ -93,7 +93,7 @@ Client asserts: Server Procedure: 1. Server sends a RST_STREAM with error code 0 after sending headers to the client. - + *At the moment the error code and message returned are not standardized throughout all languages. Those checks will be added once all client languages behave the same way. [#9142](https://github.com/grpc/grpc/issues/9142) is in flight.* @@ -104,7 +104,7 @@ RST_STREAM halfway through sending data to the client. Procedure: 1. Client sends UnaryCall with: - + ``` { response_size: 314159 @@ -118,7 +118,7 @@ Client asserts: * Call was not successful. Server Procedure: - 1. Server sends a RST_STREAM with error code 0 after sending half of + 1. Server sends a RST_STREAM with error code 0 after sending half of the requested data to the client. ### rst_after_data @@ -128,7 +128,7 @@ RST_STREAM after sending all of the data to the client. Procedure: 1. Client sends UnaryCall with: - + ``` { response_size: 314159 @@ -156,7 +156,7 @@ server. Procedure: 1. Client sends UnaryCall with: - + ``` { response_size: 314159 @@ -165,16 +165,16 @@ Procedure: } } ``` - + Client asserts: * call was successful. * response payload body is 314159 bytes in size. Server Procedure: - 1. Server tracks the number of outstanding pings (i.e. +1 when it sends a ping, and -1 + 1. Server tracks the number of outstanding pings (i.e. +1 when it sends a ping, and -1 when it receives an ack from the client). 2. Server sends pings before and after sending headers, also before and after sending data. - + Server Asserts: * Number of outstanding pings is 0 when the connection is lost. @@ -185,10 +185,10 @@ This test verifies that the client observes the MAX_CONCURRENT_STREAMS limit set Client Procedure: 1. Client sends initial UnaryCall to allow the server to update its MAX_CONCURRENT_STREAMS settings. 2. Client concurrently sends 10 UnaryCalls. - + Client Asserts: * All UnaryCalls were successful, and had the correct type and payload size. - + Server Procedure: 1. Sets MAX_CONCURRENT_STREAMS to one after the connection is made. diff --git a/doc/internationalization.md b/doc/internationalization.md index 1b614cbd264..6ff5894c8ba 100644 --- a/doc/internationalization.md +++ b/doc/internationalization.md @@ -1,7 +1,7 @@ gRPC Internationalization ========================= -As a universal RPC framework, gRPC needs to be fully usable within/across different international environments. +As a universal RPC framework, gRPC needs to be fully usable within/across different international environments. This document describes gRPC API and behavior specifics when used in a non-english environment. ## API Concepts diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 978c422d470..f7fbb48148a 100755 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -1007,21 +1007,21 @@ languages. Therefore they are not part of our interop matrix. #### rpc_soak -The client performs many large_unary RPCs in sequence over the same channel. +The client performs many large_unary RPCs in sequence over the same channel. The number of RPCs is configured by the experimental flag, `soak_iterations`. #### channel_soak -The client performs many large_unary RPCs in sequence. Before each RPC, it -tears down and rebuilds the channel. The number of RPCs is configured by +The client performs many large_unary RPCs in sequence. Before each RPC, it +tears down and rebuilds the channel. The number of RPCs is configured by the experimental flag, `soak_iterations`. -This tests puts stress on several gRPC components; the resolver, the load +This tests puts stress on several gRPC components; the resolver, the load balancer, and the RPC hotpath. #### long_lived_channel -The client performs a number of large_unary RPCs over a single long-lived +The client performs a number of large_unary RPCs over a single long-lived channel with a fixed but configurable interval between each RPC. ### TODO Tests diff --git a/doc/keepalive.md b/doc/keepalive.md index 4d0271ec181..5080364472a 100644 --- a/doc/keepalive.md +++ b/doc/keepalive.md @@ -14,7 +14,7 @@ The keepalive ping is controlled by two important channel arguments - The above two channel arguments should be sufficient for most users, but the following arguments can also be useful in certain use cases. * **GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS** - * This channel argument if set to 1 (0 : false; 1 : true), allows keepalive pings to be sent even if there are no calls in flight. + * This channel argument if set to 1 (0 : false; 1 : true), allows keepalive pings to be sent even if there are no calls in flight. * **GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA** * This channel argument controls the maximum number of pings that can be sent when there is no other data (data frame or header frame) to be sent. GRPC Core will not continue sending pings if we run over the limit. Setting it to 0 allows sending pings without sending data. * **GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS** diff --git a/doc/python/server_reflection.md b/doc/python/server_reflection.md index 8bffdaa5866..5e963ad1f1b 100644 --- a/doc/python/server_reflection.md +++ b/doc/python/server_reflection.md @@ -6,7 +6,7 @@ and more examples how to use server reflection. ## Enable server reflection in Python servers -gRPC Python Server Reflection is an add-on library. To use it, first install +gRPC Python Server Reflection is an add-on library. To use it, first install the [grpcio-reflection] PyPI package into your project. Note that with Python you need to manually register the service @@ -29,7 +29,7 @@ def serve(): server.start() ``` -Please see [greeter_server_with_reflection.py] in the examples directory for the full +Please see [greeter_server_with_reflection.py] in the examples directory for the full example, which extends the gRPC [Python `Greeter` example] on a reflection-enabled server. After starting the server, you can verify that the server reflection diff --git a/doc/security_audit.md b/doc/security_audit.md index 313a9e6b914..a7b935a2d1d 100644 --- a/doc/security_audit.md +++ b/doc/security_audit.md @@ -1,6 +1,6 @@ # gRPC Security Audit -A third-party security audit of gRPC C++ stack was performed by [Cure53](https://cure53.de) in October 2019. The full report can be found [here](https://github.com/grpc/grpc/tree/master/doc/grpc_security_audit.pdf). +A third-party security audit of gRPC C++ stack was performed by [Cure53](https://cure53.de) in October 2019. The full report can be found [here](https://github.com/grpc/grpc/tree/master/doc/grpc_security_audit.pdf). # Addressing grpc_security_audit @@ -21,7 +21,7 @@ Below is a list of alternatives that gRPC team considered. ### Alternative #1: Rewrite gpr_free to take void\*\* -One solution is to change the API of `gpr_free` so that it automatically nulls the given pointer after freeing it. +One solution is to change the API of `gpr_free` so that it automatically nulls the given pointer after freeing it. ``` gpr_free (void** ptr) { @@ -30,7 +30,7 @@ gpr_free (void** ptr) { } ``` -This defensive programming pattern would help protect gRPC from the potential exploits and latent dangling pointer bugs mentioned in the security report. +This defensive programming pattern would help protect gRPC from the potential exploits and latent dangling pointer bugs mentioned in the security report. However, performance would be a significant concern as we are now unconditionally adding a store to every gpr_free call, and there are potentially hundreds of these per RPC. At the RPC layer, this can add up to prohibitive costs. @@ -61,7 +61,7 @@ Because of performance and maintainability concerns, GRP-01-002 will be addresse ## GRP-01-003 Calls to malloc suffer from potential integer overflows The vulnerability, as defined by the report, is that calls to `gpr_malloc` in the C-core codebase may suffer from potential integer overflow in cases where we multiply the array element size by the size of the array. The penetration testers did not identify a concrete place where this occurred, but rather emphasized that the coding pattern itself had potential to lead to vulnerabilities. The report’s suggested solution for GRP-01-003 was to create a `calloc(size_t nmemb, size_t size)` wrapper that contains integer overflow checks. -However, gRPC team firmly believes that gRPC Core should only use integer overflow checks in the places where they’re needed; for example, any place where remote input influences the input to `gpr_malloc` in an unverified way. This is because bounds-checking is very expensive at the RPC layer. +However, gRPC team firmly believes that gRPC Core should only use integer overflow checks in the places where they’re needed; for example, any place where remote input influences the input to `gpr_malloc` in an unverified way. This is because bounds-checking is very expensive at the RPC layer. Determining exactly where bounds-checking is needed requires an audit of tracing each `gpr_malloc` (or `gpr_realloc` or `gpr_zalloc`) call up the stack to determine if the sufficient bounds-checking was performed. This kind of audit, done manually, is fairly expensive engineer-wise. diff --git a/doc/unit_testing.md b/doc/unit_testing.md index ca5648130ce..c83fa5cecf9 100644 --- a/doc/unit_testing.md +++ b/doc/unit_testing.md @@ -75,7 +75,7 @@ grpc_proto_library( ``` -By adding such a flag now a header file `echo_mock.grpc.pb.h` containing the mocked stub will also be generated. +By adding such a flag now a header file `echo_mock.grpc.pb.h` containing the mocked stub will also be generated. This header file can then be included in test files along with a gmock dependency. diff --git a/doc/versioning.md b/doc/versioning.md index 79f573526ee..3d6849c2ce9 100644 --- a/doc/versioning.md +++ b/doc/versioning.md @@ -3,7 +3,7 @@ ## Versioning Overview All gRPC implementations use a three-part version number (`vX.Y.Z`) and follow [semantic versioning](https://semver.org/), which defines the semantics of major, minor and patch components of the version number. In addition to that, gRPC versions evolve according to these rules: -- **Major version bumps** only happen on rare occasions. In order to qualify for a major version bump, certain criteria described later in this document need to be met. Most importantly, a major version increase must not break wire compatibility with other gRPC implementations so that existing gRPC libraries remain fully interoperable. +- **Major version bumps** only happen on rare occasions. In order to qualify for a major version bump, certain criteria described later in this document need to be met. Most importantly, a major version increase must not break wire compatibility with other gRPC implementations so that existing gRPC libraries remain fully interoperable. - **Minor version bumps** happen approx. every 6 weeks as part of the normal release cycle as defined by the gRPC release process. A new release branch named vMAJOR.MINOR.PATCH) is cut every 6 weeks based on the [release schedule](https://github.com/grpc/grpc/blob/master/doc/grpc_release_schedule.md). - **Patch version bump** corresponds to bugfixes done on release branch. @@ -24,7 +24,7 @@ There are also a few extra rules regarding adding new gRPC implementations (e.g. To avoid user confusion and simplify reasoning, the gRPC releases in different languages try to stay synchronized in terms of major and minor version (all languages follow the same release schedule). Nevertheless, because we also strictly follow semantic versioning, there are circumstances in which a gRPC implementation needs to break the version synchronicity and do a major version bump independently of other languages. ### Situations when it's ok to do a major version bump -- **change forced by the language ecosystem:** when the language itself or its standard libraries that we depend on make a breaking change (something which is out of our control), reacting with updating gRPC APIs may be the only adequate response. +- **change forced by the language ecosystem:** when the language itself or its standard libraries that we depend on make a breaking change (something which is out of our control), reacting with updating gRPC APIs may be the only adequate response. - **voluntary change:** Even in non-forced situations, there might be circumstances in which a breaking API change makes sense and represents a net win, but as a rule of thumb breaking changes are very disruptive for users, cause user fragmentation and incur high maintenance costs. Therefore, breaking API changes should be very rare events that need to be considered with extreme care and the bar for accepting such changes is intentionally set very high. Example scenarios where a breaking API change might be adequate: - fixing a security problem which requires changes to API (need to consider the non-breaking alternatives first) From 08435c678495c992912f5ec78cf9db8e02df647b Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 10 Feb 2020 14:33:12 -0800 Subject: [PATCH 015/239] Squashed 'third_party/upb/' changes from ca84145476..bb2db35464 bb2db35464 Fixing Windows build. (#247) git-subtree-dir: third_party/upb git-subtree-split: bb2db35464dec97d180a21c3fc4a890799fb7785 --- upb/msg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upb/msg.h b/upb/msg.h index 2b3274b6da9..2b6423a5bd0 100644 --- a/upb/msg.h +++ b/upb/msg.h @@ -108,13 +108,13 @@ UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t n /* Our internal representation for repeated fields. */ typedef struct { - uintptr_t data; /* Tagged ptr: low 2 bits of ptr are lg2(elem size). */ + uintptr_t data; /* Tagged ptr: low 3 bits of ptr are lg2(elem size). */ size_t len; /* Measured in elements. */ size_t size; /* Measured in elements. */ } upb_array; UPB_INLINE const void *_upb_array_constptr(const upb_array *arr) { - return (void*)((uintptr_t)arr->data & ~7UL); + return (void*)(arr->data & ~(uintptr_t)7); } UPB_INLINE void *_upb_array_ptr(upb_array *arr) { From 1dd3b7548efd38116bfe4f7bf226a23435caa21c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 10 Feb 2020 14:34:33 -0800 Subject: [PATCH 016/239] update upb version in bazel build deps --- bazel/grpc_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 7c994e1a707..cdeb65e96e4 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -234,9 +234,9 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "b6bfb6402ba4ed0294ae40e98333ac5fd04c6c242c44df43e2d5d9b62dbeca05", - strip_prefix = "upb-ca84145476ddd722c6d67d7cf985d1d0aefcd893", - url = "https://github.com/protocolbuffers/upb/archive/ca84145476ddd722c6d67d7cf985d1d0aefcd893.tar.gz", + sha256 = "ab646a69fcc13bb1fa187c0d35e44199e041b702488cf0e1adb7334f77436bdb", + strip_prefix = "upb-bb2db35464dec97d180a21c3fc4a890799fb7785", + url = "https://github.com/protocolbuffers/upb/archive/bb2db35464dec97d180a21c3fc4a890799fb7785.tar.gz", ) if "envoy_api" not in native.existing_rules(): http_archive( From 657bcfb5ad7501c1191d070bde98cdd9799c51b2 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 11 Feb 2020 09:06:12 -0800 Subject: [PATCH 017/239] Squashed 'third_party/upb/' changes from bb2db35464..02c89a8b15 02c89a8b15 Renamed textencode -> text_encode for greater readability. (#249) git-subtree-dir: third_party/upb git-subtree-split: 02c89a8b15d0ce2a4a75ef16fc398913827354fd --- BUILD | 4 ++-- CMakeLists.txt | 4 ++-- tests/conformance_upb.c | 8 ++++---- upb/bindings/lua/msg.c | 6 +++--- upb/{textencode.c => text_encode.c} | 8 ++++---- upb/{textencode.h => text_encode.h} | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) rename upb/{textencode.c => text_encode.c} (97%) rename upb/{textencode.h => text_encode.h} (82%) diff --git a/BUILD b/BUILD index c5a3e977fc0..7b93f22c850 100644 --- a/BUILD +++ b/BUILD @@ -145,10 +145,10 @@ cc_library( cc_library( name = "textformat", srcs = [ - "upb/textencode.c", + "upb/text_encode.c", ], hdrs = [ - "upb/textencode.h", + "upb/text_encode.h", ], visibility = ["//visibility:public"], deps = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 6ec61d69cba..1aa3ba4a9ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,8 +89,8 @@ target_link_libraries(reflection table upb) add_library(textformat - upb/textencode.c - upb/textencode.h) + upb/text_encode.c + upb/text_encode.h) target_link_libraries(textformat reflection) add_library(table INTERFACE) diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index 39614b03e44..f5d28c7aff8 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -15,7 +15,7 @@ #include "upb/decode.h" #include "upb/encode.h" #include "upb/reflection.h" -#include "upb/textencode.h" +#include "upb/text_encode.h" int test_count = 0; bool verbose = false; /* Set to true to get req/resp printed on stderr. */ @@ -87,9 +87,9 @@ void serialize_text(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { if (!conformance_ConformanceRequest_print_unknown_fields(c->request)) { opts |= UPB_TXTENC_SKIPUNKNOWN; } - len = upb_textencode(msg, m, c->symtab, opts, NULL, 0); + len = upb_text_encode(msg, m, c->symtab, opts, NULL, 0); data = upb_arena_malloc(c->arena, len + 1); - len2 = upb_textencode(msg, m, c->symtab, opts, data, len + 1); + len2 = upb_text_encode(msg, m, c->symtab, opts, data, len + 1); assert(len == len2); conformance_ConformanceResponse_set_text_payload( c->response, upb_strview_make(data, len)); @@ -153,7 +153,7 @@ void DoTest(const ctx* c) { void debug_print(const char *label, const upb_msg *msg, const upb_msgdef *m, const ctx *c) { char buf[512]; - upb_textencode(msg, m, c->symtab, UPB_TXTENC_SINGLELINE, buf, sizeof(buf)); + upb_text_encode(msg, m, c->symtab, UPB_TXTENC_SINGLELINE, buf, sizeof(buf)); fprintf(stderr, "%s: %s\n", label, buf); } diff --git a/upb/bindings/lua/msg.c b/upb/bindings/lua/msg.c index aca4c32c641..6bf393f7736 100644 --- a/upb/bindings/lua/msg.c +++ b/upb/bindings/lua/msg.c @@ -13,7 +13,7 @@ #include "lauxlib.h" #include "upb/bindings/lua/upb.h" #include "upb/reflection.h" -#include "upb/textencode.h" +#include "upb/text_encode.h" #include "upb/port_def.inc" @@ -905,13 +905,13 @@ static int lupb_msg_tostring(lua_State *L) { lua_getiuservalue(L, 1, LUPB_MSGDEF_INDEX); m = lupb_msgdef_check(L, -1); - size = upb_textencode(msg, m, NULL, 0, buf, sizeof(buf)); + size = upb_text_encode(msg, m, NULL, 0, buf, sizeof(buf)); if (size < sizeof(buf)) { lua_pushlstring(L, buf, size); } else { char *ptr = malloc(size + 1); - upb_textencode(msg, m, NULL, 0, ptr, size + 1); + upb_text_encode(msg, m, NULL, 0, ptr, size + 1); lua_pushlstring(L, ptr, size); free(ptr); } diff --git a/upb/textencode.c b/upb/text_encode.c similarity index 97% rename from upb/textencode.c rename to upb/text_encode.c index b1106642197..5c13c9b93a1 100644 --- a/upb/textencode.c +++ b/upb/text_encode.c @@ -1,5 +1,5 @@ -#include "upb/textencode.h" +#include "upb/text_encode.h" #include #include @@ -376,9 +376,9 @@ size_t txtenc_nullz(txtenc *e, size_t size) { return ret; } -size_t upb_textencode(const upb_msg *msg, const upb_msgdef *m, - const upb_symtab *ext_pool, int options, char *buf, - size_t size) { +size_t upb_text_encode(const upb_msg *msg, const upb_msgdef *m, + const upb_symtab *ext_pool, int options, char *buf, + size_t size) { txtenc e; e.buf = buf; diff --git a/upb/textencode.h b/upb/text_encode.h similarity index 82% rename from upb/textencode.h rename to upb/text_encode.h index 526142421a5..1a0003cb315 100644 --- a/upb/textencode.h +++ b/upb/text_encode.h @@ -24,9 +24,9 @@ enum { * size (excluding NULL) is returned. This means that a return value >= |size| * implies that the output was truncated. (These are the same semantics as * snprintf()). */ -size_t upb_textencode(const upb_msg *msg, const upb_msgdef *m, - const upb_symtab *ext_pool, int options, char *buf, - size_t size); +size_t upb_text_encode(const upb_msg *msg, const upb_msgdef *m, + const upb_symtab *ext_pool, int options, char *buf, + size_t size); #ifdef __cplusplus } /* extern "C" */ From 26818e2b04e97f2c7e02752df7ed3ffdc05d5f1c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 11 Feb 2020 09:09:21 -0800 Subject: [PATCH 018/239] upgrade upb commit in bazel build deps --- bazel/grpc_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index cdeb65e96e4..f8e6824deec 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -234,9 +234,9 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "ab646a69fcc13bb1fa187c0d35e44199e041b702488cf0e1adb7334f77436bdb", - strip_prefix = "upb-bb2db35464dec97d180a21c3fc4a890799fb7785", - url = "https://github.com/protocolbuffers/upb/archive/bb2db35464dec97d180a21c3fc4a890799fb7785.tar.gz", + sha256 = "3f992f2f9d81cfd8a06bb9fc313f35c4560adcf9ca6f44a6e615110fdb7863ee", + strip_prefix = "upb-02c89a8b15d0ce2a4a75ef16fc398913827354fd", + url = "https://github.com/protocolbuffers/upb/archive/02c89a8b15d0ce2a4a75ef16fc398913827354fd.tar.gz", ) if "envoy_api" not in native.existing_rules(): http_archive( From 615b44accf29f00419f0e8c1eec65d1f420fb702 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 20 Feb 2020 10:51:51 -0800 Subject: [PATCH 019/239] Update new code to use new upb map API. --- src/core/ext/filters/client_channel/xds/xds_api.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc index 1eb990ee0f1..65c6218baf6 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -201,14 +201,12 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, if (!server_name.empty()) { google_protobuf_Struct* metadata = envoy_api_v2_core_Node_mutable_metadata(node_msg, arena); - google_protobuf_Struct_FieldsEntry* field = - google_protobuf_Struct_add_fields(metadata, arena); - google_protobuf_Struct_FieldsEntry_set_key( - field, upb_strview_makez("PROXYLESS_CLIENT_HOSTNAME")); - google_protobuf_Value* value = - google_protobuf_Struct_FieldsEntry_mutable_value(field, arena); + google_protobuf_Value* value = google_protobuf_Value_new(arena); google_protobuf_Value_set_string_value( value, upb_strview_make(server_name.data(), server_name.size())); + google_protobuf_Struct_fields_set( + metadata, upb_strview_makez("PROXYLESS_CLIENT_HOSTNAME"), value, + arena); } if (!node->locality_region.empty() || !node->locality_zone.empty() || !node->locality_subzone.empty()) { From 7eafc04dde203ad17cb454c64dccbe1468f68cb2 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 21 Feb 2020 11:49:53 -0800 Subject: [PATCH 020/239] Squashed 'third_party/upb/' changes from 02c89a8b15..e70853d71f e70853d71f Merge pull request #251 from haberman/emptyfix b409f8cd85 Fixed code generator for upbdefs when a file has no messages. 58010a3f73 Another fix for google import. 4b8c04e521 Ran buildifier and fixed a few things for google3 import. 95fb9b2e38 Merge pull request #250 from haberman/jsonencode d7d72f0075 Updated CMakeLists.txt. 872f4ceb8f [json encoder] passes all conformance tests. 384cf15b0f [json encoder] passes almost all conformance tests. 6e9db7dafc Fixed JSON encoder so that it compiles. 43d8673623 Merge branch 'master' into jsonencode 60d0966a0b [jsonencoder]: wrote most of the code, haven't even compiled yet, let alone tested. 1da9cfde77 A few bugfixes. git-subtree-dir: third_party/upb git-subtree-split: e70853d71f3db513f3d19a7842e0703bfa56d6a5 --- BUILD | 97 ++++-- CMakeLists.txt | 14 +- tests/conformance_upb.c | 32 ++ tests/empty.proto | 2 + upb/json_encode.c | 655 ++++++++++++++++++++++++++++++++++++++++ upb/json_encode.h | 36 +++ upb/reflection.c | 7 + upb/text_encode.c | 1 + upbc/generator.cc | 18 +- 9 files changed, 821 insertions(+), 41 deletions(-) create mode 100644 tests/empty.proto create mode 100644 upb/json_encode.c create mode 100644 upb/json_encode.h diff --git a/BUILD b/BUILD index 7b93f22c850..61601a067e1 100644 --- a/BUILD +++ b/BUILD @@ -57,13 +57,13 @@ config_setting( cc_library( name = "port", + srcs = [ + "upb/port.c", + ], textual_hdrs = [ "upb/port_def.inc", "upb/port_undef.inc", ], - srcs = [ - "upb/port.c", - ], ) cc_library( @@ -84,7 +84,7 @@ cc_library( ], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }), visibility = ["//visibility:public"], deps = [":port"], @@ -105,10 +105,11 @@ cc_library( ], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }), visibility = ["//visibility:public"], deps = [ + ":table", ":upb", ], ) @@ -123,6 +124,7 @@ cc_library( name = "reflection", srcs = [ "upb/def.c", + "upb/msg.h", "upb/reflection.c", ], hdrs = [ @@ -131,7 +133,7 @@ cc_library( ], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }), visibility = ["//visibility:public"], deps = [ @@ -152,7 +154,23 @@ cc_library( ], visibility = ["//visibility:public"], deps = [ + ":port", + ":reflection", + ], +) + +cc_library( + name = "json", + srcs = [ + "upb/json_encode.c", + ], + hdrs = [ + "upb/json_encode.h", + ], + deps = [ + ":port", ":reflection", + ":upb", ], ) @@ -182,11 +200,11 @@ cc_library( ], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }), deps = [ - ":reflection", ":port", + ":reflection", ":table", ":upb", ], @@ -210,13 +228,13 @@ cc_library( ], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }), deps = [ ":descriptor_upbproto", ":handlers", - ":reflection", ":port", + ":reflection", ":table", ":upb", ], @@ -235,7 +253,7 @@ cc_library( ], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }), deps = [ ":upb", @@ -269,7 +287,7 @@ cc_library( hdrs = ["upbc/generator.h"], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), deps = [ "@com_google_absl//absl/base:core_headers", @@ -285,7 +303,7 @@ cc_binary( srcs = ["upbc/main.cc"], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), visibility = ["//visibility:public"], deps = [ @@ -327,7 +345,7 @@ cc_library( ], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), deps = [ ":handlers", @@ -344,7 +362,7 @@ cc_test( ], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }), deps = [ ":port", @@ -371,12 +389,24 @@ cc_test( srcs = ["tests/test_generated_code.c"], deps = [ ":test_messages_proto3_proto_upb", + ":empty_upbdefs_proto", ":test_upbproto", ":upb_test", ], ) +proto_library( + name = "empty_proto", + srcs = ["tests/empty.proto"], +) + upb_proto_reflection_library( + name = "empty_upbdefs_proto", + testonly = 1, + deps = [":empty_proto"], +) + +upb_proto_library( name = "test_messages_proto3_proto_upb", testonly = 1, deps = ["@com_google_protobuf//:test_messages_proto3_proto"], @@ -402,7 +432,7 @@ cc_test( ], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), deps = [ ":handlers", @@ -431,7 +461,7 @@ cc_test( srcs = ["tests/test_cpp.cc"], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), deps = [ ":handlers", @@ -449,7 +479,7 @@ cc_test( srcs = ["tests/test_table.cc"], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), deps = [ ":port", @@ -466,7 +496,7 @@ cc_binary( srcs = ["tests/file_descriptor_parsenew_fuzzer.cc"], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }) + select({ "//conditions:default": [], ":fuzz": ["-fsanitize=fuzzer,address"], @@ -487,7 +517,7 @@ cc_test( srcs = ["tests/pb/test_encoder.cc"], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), deps = [ ":descriptor_upbproto", @@ -532,7 +562,7 @@ cc_test( ], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), deps = [ ":test_json_upbproto", @@ -575,14 +605,15 @@ cc_binary( ], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }) + ["-Ibazel-out/k8-fastbuild/bin"], deps = [ ":conformance_proto_upb", ":conformance_proto_upbdefs", + ":json", + ":reflection", ":test_messages_proto2_upbdefs", ":test_messages_proto3_upbdefs", - ":reflection", ":textformat", ":upb", ], @@ -638,7 +669,7 @@ cc_library( hdrs = ["upb.h"], copts = select({ ":windows": [], - "//conditions:default": COPTS + "//conditions:default": COPTS, }), ) @@ -664,23 +695,23 @@ cc_library( cc_test( name = "test_lua", - linkstatic = 1, srcs = ["tests/bindings/lua/main.c"], data = [ - "@com_google_protobuf//:conformance_proto", - "@com_google_protobuf//:descriptor_proto", - ":descriptor_proto_lua", - ":test_messages_proto3_proto_lua", - ":test_proto_lua", "tests/bindings/lua/test_upb.lua", "third_party/lunit/console.lua", "third_party/lunit/lunit.lua", "upb/bindings/lua/upb.lua", + ":descriptor_proto_lua", + ":test_messages_proto3_proto_lua", + ":test_proto_lua", + "@com_google_protobuf//:conformance_proto", + "@com_google_protobuf//:descriptor_proto", ], + linkstatic = 1, deps = [ ":lupb", "@lua//:liblua", - ] + ], ) cc_binary( @@ -688,12 +719,12 @@ cc_binary( srcs = ["upb/bindings/lua/upbc.cc"], copts = select({ ":windows": [], - "//conditions:default": CPPOPTS + "//conditions:default": CPPOPTS, }), visibility = ["//visibility:public"], deps = [ "@com_google_absl//absl/strings", - "@com_google_protobuf//:protoc_lib" + "@com_google_protobuf//:protoc_lib", ], ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1aa3ba4a9ac..0f0b2420bb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,9 +77,11 @@ target_link_libraries(upb port) add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE) target_link_libraries(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE + table upb) add_library(reflection upb/def.c + upb/msg.h upb/reflection.c upb/def.h upb/reflection.h) @@ -92,7 +94,15 @@ add_library(textformat upb/text_encode.c upb/text_encode.h) target_link_libraries(textformat + port reflection) +add_library(json + upb/json_encode.c + upb/json_encode.h) +target_link_libraries(json + port + reflection + upb) add_library(table INTERFACE) target_link_libraries(table INTERFACE port @@ -104,8 +114,8 @@ add_library(handlers upb/handlers.h upb/sink.h) target_link_libraries(handlers - reflection port + reflection table upb) add_library(upb_pb @@ -122,8 +132,8 @@ add_library(upb_pb target_link_libraries(upb_pb descriptor_upbproto handlers - reflection port + reflection table upb) add_library(upb_json diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index f5d28c7aff8..8285242d3ed 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -15,6 +15,7 @@ #include "upb/decode.h" #include "upb/encode.h" #include "upb/reflection.h" +#include "upb/json_encode.h" #include "upb/text_encode.h" int test_count = 0; @@ -95,6 +96,34 @@ void serialize_text(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { c->response, upb_strview_make(data, len)); } +void serialize_json(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { + size_t len; + size_t len2; + int opts = 0; + char *data; + upb_status status; + + upb_status_clear(&status); + if (!conformance_ConformanceRequest_print_unknown_fields(c->request)) { + opts |= UPB_TXTENC_SKIPUNKNOWN; + } + + len = upb_json_encode(msg, m, c->symtab, opts, NULL, 0, &status); + + if (len == -1) { + static const char msg[] = "Error serializing."; + conformance_ConformanceResponse_set_serialize_error( + c->response, upb_strview_make(msg, strlen(msg))); + return; + } + + data = upb_arena_malloc(c->arena, len + 1); + len2 = upb_json_encode(msg, m, c->symtab, opts, data, len + 1, &status); + assert(len == len2); + conformance_ConformanceResponse_set_json_payload( + c->response, upb_strview_make(data, len)); +} + bool parse_input(upb_msg *msg, const upb_msgdef *m, const ctx* c) { switch (conformance_ConformanceRequest_payload_case(c->request)) { case conformance_ConformanceRequest_payload_protobuf_payload: @@ -122,6 +151,9 @@ void write_output(const upb_msg *msg, const upb_msgdef *m, const ctx* c) { case conformance_TEXT_FORMAT: serialize_text(msg, m, c); break; + case conformance_JSON: + serialize_json(msg, m, c); + break; default: { static const char msg[] = "Unsupported output format."; conformance_ConformanceResponse_set_skipped( diff --git a/tests/empty.proto b/tests/empty.proto new file mode 100644 index 00000000000..fb45796635b --- /dev/null +++ b/tests/empty.proto @@ -0,0 +1,2 @@ +syntax = "proto2"; + diff --git a/upb/json_encode.c b/upb/json_encode.c new file mode 100644 index 00000000000..d8adf1b722b --- /dev/null +++ b/upb/json_encode.c @@ -0,0 +1,655 @@ + +#include "upb/json_encode.h" + +#include +#include +#include +#include +#include +#include +#include + +#include "upb/decode.h" +#include "upb/reflection.h" + +#include "upb/port_def.inc" + +typedef struct { + char *buf, *ptr, *end; + size_t overflow; + int indent_depth; + int options; + const upb_symtab *ext_pool; + jmp_buf err; + upb_status *status; + upb_arena *arena; +} jsonenc; + +static void jsonenc_msg(jsonenc *e, const upb_msg *msg, const upb_msgdef *m); +static void jsonenc_scalar(jsonenc *e, upb_msgval val, const upb_fielddef *f); +static void jsonenc_msgfield(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m); +static void jsonenc_value(jsonenc *e, const upb_msg *msg, const upb_msgdef *m); + +static void jsonenc_err(jsonenc *e, const char *msg) { + upb_status_seterrmsg(e->status, msg); + longjmp(e->err, 1); +} + +static void jsonenc_putbytes(jsonenc *e, const void *data, size_t len) { + size_t have = e->end - e->ptr; + if (UPB_LIKELY(have >= len)) { + memcpy(e->ptr, data, len); + e->ptr += len; + } else { + memcpy(e->ptr, data, have); + e->ptr += have; + e->overflow += (len - have); + } +} + +static void jsonenc_putstr(jsonenc *e, const char *str) { + jsonenc_putbytes(e, str, strlen(str)); +} + +static void jsonenc_printf(jsonenc *e, const char *fmt, ...) { + size_t n; + size_t have = e->end - e->ptr; + va_list args; + + va_start(args, fmt); + n = _upb_vsnprintf(e->ptr, have, fmt, args); + va_end(args); + + if (UPB_LIKELY(have > n)) { + e->ptr += n; + } else { + e->ptr += have; + e->overflow += (n - have); + } +} + +static void jsonenc_nanos(jsonenc *e, int32_t nanos) { + const char zeros[3] = "000"; + + if (nanos == 0) return; + if (nanos < 0 || nanos >= 1000000000) { + jsonenc_err(e, "error formatting timestamp as JSON: invalid nanos"); + } + + jsonenc_printf(e, "%09" PRId32, nanos); + + /* Remove trailing zeros, 3 at a time. */ + while ((e->ptr - e->buf) >= 3 && memcmp(e->ptr, zeros, 3) == 0) { + e->ptr -= 3; + } +} + +static void jsonenc_timestamp(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m) { + const upb_fielddef *seconds_f = upb_msgdef_itof(m, 1); + const upb_fielddef *nanos_f = upb_msgdef_itof(m, 2); + int64_t seconds = upb_msg_get(msg, seconds_f).int64_val; + int32_t nanos = upb_msg_get(msg, nanos_f).int32_val; + int L, N, I, J, K, hour, min, sec; + + if (seconds < -62135596800) { + jsonenc_err(e, + "error formatting timestamp as JSON: minimum acceptable value " + "is 0001-01-01T00:00:00Z"); + } else if (seconds > 253402300799) { + jsonenc_err(e, + "error formatting timestamp as JSON: maximum acceptable value " + "is 9999-12-31T23:59:59Z"); + } + + /* Julian Day -> Y/M/D, Algorithm from: + * Fliegel, H. F., and Van Flandern, T. C., "A Machine Algorithm for + * Processing Calendar Dates," Communications of the Association of + * Computing Machines, vol. 11 (1968), p. 657. */ + L = (seconds / 86400) + 2440588; + N = 4 * L / 146097; + L = L - (146097 * N + 3) / 4; + I = 4000 * (L + 1) / 1461001; + L = L - 1461 * I / 4 + 31; + J = 80 * L / 2447; + K = L - 2447 * J / 80; + L = J / 11; + J = J + 2 - 12 * L; + I = 100 * (N - 49) + I + L; + + sec = seconds % 60; + min = (seconds / 60) % 60; + hour = (seconds / 3600) % 24; + + jsonenc_printf(e, "\"%04d-%02d-%02dT%02d:%02d:%02d", I, J, K, hour, min, sec); + jsonenc_nanos(e, nanos); + jsonenc_putstr(e, "Z\""); +} + +static void jsonenc_duration(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { + const upb_fielddef *seconds_f = upb_msgdef_itof(m, 1); + const upb_fielddef *nanos_f = upb_msgdef_itof(m, 2); + int64_t seconds = upb_msg_get(msg, seconds_f).int64_val; + int32_t nanos = upb_msg_get(msg, nanos_f).int32_val; + + if (seconds > 315576000000 || seconds < -315576000000 || + (seconds < 0) != (nanos < 0)) { + jsonenc_err(e, "bad duration"); + } + + jsonenc_printf(e, "\"%" PRId64, seconds); + jsonenc_nanos(e, nanos); + jsonenc_putstr(e, "s\""); +} + +static void jsonenc_enum(int32_t val, const upb_fielddef *f, jsonenc *e) { + const upb_enumdef *e_def = upb_fielddef_enumsubdef(f); + const char *name = upb_enumdef_iton(e_def, val); + + if (name) { + jsonenc_printf(e, "\"%s\"", name); + } else { + jsonenc_printf(e, "%" PRId32, val); + } +} + +static void jsonenc_bytes(jsonenc *e, upb_strview str) { + /* This is the regular base64, not the "web-safe" version. */ + static const char base64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + const char *ptr = str.data; + const char *end = ptr + str.size; + char buf[4]; + + jsonenc_putstr(e, "\""); + + while (end - ptr >= 3) { + buf[0] = base64[ptr[0] >> 2]; + buf[1] = base64[((ptr[0] & 0x3) << 4) | (ptr[1] >> 4)]; + buf[2] = base64[((ptr[1] & 0xf) << 2) | (ptr[2] >> 6)]; + buf[3] = base64[ptr[2] & 0x3f]; + jsonenc_putbytes(e, buf, 4); + ptr += 3; + } + + switch (end - ptr) { + case 2: + buf[0] = base64[ptr[0] >> 2]; + buf[1] = base64[((ptr[0] & 0x3) << 4) | (ptr[1] >> 4)]; + buf[2] = base64[(ptr[1] & 0xf) << 2]; + buf[3] = '='; + jsonenc_putbytes(e, buf, 4); + break; + case 1: + buf[0] = base64[ptr[0] >> 2]; + buf[1] = base64[((ptr[0] & 0x3) << 4)]; + buf[2] = '='; + buf[3] = '='; + jsonenc_putbytes(e, buf, 4); + break; + } + + jsonenc_putstr(e, "\""); +} + +static void jsonenc_stringbody(jsonenc *e, upb_strview str) { + const char *ptr = str.data; + const char *end = ptr + str.size; + + while (ptr < end) { + switch (*ptr) { + case '\n': + jsonenc_putstr(e, "\\n"); + break; + case '\r': + jsonenc_putstr(e, "\\r"); + break; + case '\t': + jsonenc_putstr(e, "\\t"); + break; + case '\"': + jsonenc_putstr(e, "\\\""); + break; + case '\f': + jsonenc_putstr(e, "\f'"); + break; + case '\b': + jsonenc_putstr(e, "\b'"); + break; + case '\\': + jsonenc_putstr(e, "\\\\"); + break; + default: + if ((uint8_t)*ptr < 0x20) { + jsonenc_printf(e, "\\u%04x", (int)(uint8_t)*ptr); + } else { + /* This could be a non-ASCII byte. We rely on the string being valid + * UTF-8. */ + jsonenc_putbytes(e, ptr, 1); + } + break; + } + ptr++; + } +} + +static void jsonenc_string(jsonenc *e, upb_strview str) { + jsonenc_putstr(e, "\""); + jsonenc_stringbody(e, str); + jsonenc_putstr(e, "\""); +} + +static void jsonenc_double(jsonenc *e, const char *fmt, double val) { + if (val == UPB_INFINITY) { + jsonenc_putstr(e, "\"Infinity\""); + } else if (val == -UPB_INFINITY) { + jsonenc_putstr(e, "\"-Infinity\""); + } else if (val != val) { + jsonenc_putstr(e, "\"NaN\""); + } else { + jsonenc_printf(e, fmt, val); + } +} + +static void jsonenc_wrapper(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m) { + const upb_fielddef *val_f = upb_msgdef_itof(m, 1); + upb_msgval val = upb_msg_get(m, val_f); + jsonenc_scalar(e, val, val_f); +} + +const upb_msgdef *jsonenc_getanymsg(jsonenc *e, upb_strview type_url) { + /* Find last '/', if any. */ + const char *end = type_url.data + type_url.size; + const char *ptr = end; + + if (!e->ext_pool || type_url.size == 0) return NULL; + + while (true) { + if (--ptr == type_url.data) { + /* Type URL must contain at least one '/', with host before. */ + return NULL; + } + if (*ptr == '/') { + ptr++; + break; + } + } + + return upb_symtab_lookupmsg2(e->ext_pool, ptr, end - ptr); +} + +static void jsonenc_any(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { + const upb_fielddef *type_url_f = upb_msgdef_itof(m, 1); + const upb_fielddef *value_f = upb_msgdef_itof(m, 1); + upb_strview type_url = upb_msg_get(msg, type_url_f).str_val; + upb_strview value = upb_msg_get(msg, value_f).str_val; + const upb_msgdef *any_m = jsonenc_getanymsg(e, type_url); + const upb_msglayout *any_layout = upb_msgdef_layout(any_m); + upb_msg *any = upb_msg_new(any_m, e->arena); + + if (!upb_decode(value.data, value.size, any, any_layout, e->arena)) { + jsonenc_err(e, "Error decoding message in Any"); + } + + jsonenc_putstr(e, "{\"@type\": "); + jsonenc_string(e, type_url); + jsonenc_putstr(e, ", "); + + if (upb_msgdef_wellknowntype(m) == UPB_WELLKNOWN_UNSPECIFIED) { + /* Regular messages: {"@type": "...", "foo": 1, "bar": 2} */ + jsonenc_msg(e, any, any_m); + } else { + /* Well-known type: {"@type": "...", "value": } */ + jsonenc_putstr(e, "value: "); + jsonenc_msgfield(e, any, any_m); + } + + jsonenc_putstr(e, "}"); +} + +static void jsonenc_putsep(jsonenc *e, const char *str, bool *first) { + if (*first) { + *first = false; + } else { + jsonenc_putstr(e, str); + } +} + +static void jsonenc_fieldpath(jsonenc *e, upb_strview path) { + const char *ptr = path.data; + const char *end = ptr + path.size; + + while (ptr < end) { + char ch = *ptr; + if (ch >= 'A' && ch <= 'Z') { + jsonenc_err(e, "Field mask element may not have upper-case letter."); + } else if (ch == '_') { + if (ptr == end - 1 || *(ptr + 1) < 'a' || *(ptr + 1) > 'z') { + jsonenc_err(e, "Underscore must be followed by a lowercase letter."); + } + } else { + jsonenc_putbytes(e, &ch, 1); + } + ptr++; + } +} + +static void jsonenc_fieldmask(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m) { + const upb_fielddef *paths_f = upb_msgdef_itof(m, 1); + const upb_array *paths = upb_msg_get(msg, paths_f).array_val; + bool first = true; + size_t i, n = 0; + + if (paths) n = upb_array_size(paths); + + jsonenc_putstr(e, "\""); + + for (i = 0; i < n; i++) { + jsonenc_putsep(e, ",", &first); + jsonenc_fieldpath(e, upb_array_get(paths, i).str_val); + } + + jsonenc_putstr(e, "\""); +} + +static void jsonenc_struct(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m) { + const upb_fielddef *fields_f = upb_msgdef_itof(m, 1); + const upb_map *fields = upb_msg_get(msg, fields_f).map_val; + const upb_msgdef *entry_m = upb_fielddef_msgsubdef(fields_f); + const upb_fielddef *value_f = upb_msgdef_itof(entry_m, 2); + size_t iter = UPB_MAP_BEGIN; + bool first = true; + + jsonenc_putstr(e, "{"); + + while (upb_mapiter_next(fields, &iter)) { + upb_msgval key = upb_mapiter_key(fields, iter); + upb_msgval val = upb_mapiter_value(fields, iter); + + jsonenc_putsep(e, ", ", &first); + jsonenc_string(e, key.str_val); + jsonenc_putstr(e, ": "); + jsonenc_value(e, val.msg_val, upb_fielddef_msgsubdef(value_f)); + } + + jsonenc_putstr(e, "}"); +} + +static void jsonenc_listvalue(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m) { + const upb_fielddef *values_f = upb_msgdef_itof(m, 1); + const upb_msgdef *values_m = upb_fielddef_msgsubdef(values_f); + const upb_array *values = upb_msg_get(msg, values_f).array_val; + const size_t size = upb_array_size(values); + size_t i; + bool first = true; + + jsonenc_putstr(e, "["); + + for (i = 0; i < size; i++) { + upb_msgval elem = upb_array_get(values, i); + + jsonenc_putsep(e, ", ", &first); + jsonenc_value(e, elem.msg_val, values_m); + } + + jsonenc_putstr(e, "]"); +} + +static void jsonenc_value(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { + /* TODO(haberman): do we want a reflection method to get oneof case? */ + size_t iter = UPB_MSG_BEGIN; + const upb_fielddef *f; + upb_msgval val; + + if (!upb_msg_next(msg, m, NULL, &f, &val, &iter)) { + jsonenc_err(e, "No value set in Value proto"); + } + + switch (upb_fielddef_number(f)) { + case 1: + jsonenc_putstr(e, "null"); + break; + case 2: + jsonenc_double(e, "%.17g", val.double_val); + break; + case 3: + jsonenc_string(e, val.str_val); + break; + case 4: + jsonenc_putstr(e, val.bool_val ? "true" : "false"); + break; + case 5: + jsonenc_struct(e, val.msg_val, upb_fielddef_msgsubdef(f)); + break; + case 6: + jsonenc_listvalue(e, val.msg_val, upb_fielddef_msgsubdef(f)); + break; + } +} + +static void jsonenc_msgfield(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m) { + switch (upb_msgdef_wellknowntype(m)) { + case UPB_WELLKNOWN_UNSPECIFIED: + jsonenc_msg(e, msg, m); + break; + case UPB_WELLKNOWN_ANY: + jsonenc_any(e, msg, m); + break; + case UPB_WELLKNOWN_FIELDMASK: + jsonenc_fieldmask(e, msg, m); + break; + case UPB_WELLKNOWN_DURATION: + jsonenc_duration(e, msg, m); + break; + case UPB_WELLKNOWN_TIMESTAMP: + jsonenc_timestamp(e, msg, m); + break; + case UPB_WELLKNOWN_DOUBLEVALUE: + case UPB_WELLKNOWN_FLOATVALUE: + case UPB_WELLKNOWN_INT64VALUE: + case UPB_WELLKNOWN_UINT64VALUE: + case UPB_WELLKNOWN_INT32VALUE: + case UPB_WELLKNOWN_UINT32VALUE: + case UPB_WELLKNOWN_STRINGVALUE: + case UPB_WELLKNOWN_BYTESVALUE: + case UPB_WELLKNOWN_BOOLVALUE: + jsonenc_wrapper(e, msg, m); + break; + case UPB_WELLKNOWN_VALUE: + jsonenc_value(e, msg, m); + break; + case UPB_WELLKNOWN_LISTVALUE: + jsonenc_listvalue(e, msg, m); + break; + case UPB_WELLKNOWN_STRUCT: + jsonenc_listvalue(e, msg, m); + break; + } +} + +static void jsonenc_scalar(jsonenc *e, upb_msgval val, const upb_fielddef *f) { + switch (upb_fielddef_type(f)) { + case UPB_TYPE_BOOL: + jsonenc_putstr(e, val.bool_val ? "true" : "false"); + break; + case UPB_TYPE_FLOAT: + jsonenc_double(e, "%.9g", val.float_val); + break; + case UPB_TYPE_DOUBLE: + jsonenc_double(e, "%.17g", val.double_val); + break; + case UPB_TYPE_INT32: + jsonenc_printf(e, "%" PRId32, val.int32_val); + break; + case UPB_TYPE_UINT32: + jsonenc_printf(e, "%" PRIu32, val.uint32_val); + break; + case UPB_TYPE_INT64: + jsonenc_printf(e, "\"%" PRId64 "\"", val.int64_val); + break; + case UPB_TYPE_UINT64: + jsonenc_printf(e, "\"%" PRIu64 "\"", val.uint64_val); + break; + case UPB_TYPE_STRING: + jsonenc_string(e, val.str_val); + break; + case UPB_TYPE_BYTES: + jsonenc_bytes(e, val.str_val); + break; + case UPB_TYPE_ENUM: + jsonenc_enum(val.int32_val, f, e); + break; + case UPB_TYPE_MESSAGE: + jsonenc_msgfield(e, val.msg_val, upb_fielddef_msgsubdef(f)); + break; + } +} + +static void jsonenc_mapkey(jsonenc *e, upb_msgval val, const upb_fielddef *f) { + jsonenc_putstr(e, "\""); + + switch (upb_fielddef_type(f)) { + case UPB_TYPE_BOOL: + jsonenc_putstr(e, val.bool_val ? "true" : "false"); + break; + case UPB_TYPE_INT32: + jsonenc_printf(e, "%" PRId32, val.int32_val); + break; + case UPB_TYPE_UINT32: + jsonenc_printf(e, "%" PRIu32, val.uint32_val); + break; + case UPB_TYPE_INT64: + jsonenc_printf(e, "%" PRId64, val.int64_val); + break; + case UPB_TYPE_UINT64: + jsonenc_printf(e, "%" PRIu64, val.uint64_val); + break; + case UPB_TYPE_STRING: + jsonenc_stringbody(e, val.str_val); + default: + UPB_UNREACHABLE(); + } + + jsonenc_putstr(e, "\": "); +} + +static void jsonenc_array(jsonenc *e, const upb_array *arr, + const upb_fielddef *f) { + size_t i; + size_t size = upb_array_size(arr); + bool first = true; + + jsonenc_putstr(e, "["); + + for (i = 0; i < size; i++) { + jsonenc_putsep(e, ", ", &first); + jsonenc_scalar(e, upb_array_get(arr, i), f); + } + + jsonenc_putstr(e, "]"); +} + +static void jsonenc_map(jsonenc *e, const upb_map *map, const upb_fielddef *f) { + const upb_msgdef *entry = upb_fielddef_msgsubdef(f); + const upb_fielddef *key_f = upb_msgdef_itof(entry, 1); + const upb_fielddef *val_f = upb_msgdef_itof(entry, 2); + size_t iter = UPB_MAP_BEGIN; + bool first = true; + + jsonenc_putstr(e, "{"); + + while (upb_mapiter_next(map, &iter)) { + jsonenc_putsep(e, ", ", &first); + jsonenc_mapkey(e, upb_mapiter_key(map, iter), key_f); + jsonenc_scalar(e, upb_mapiter_value(map, iter), val_f); + } + + jsonenc_putstr(e, "}"); +} + +static void jsonenc_fieldval(jsonenc *e, const upb_fielddef *f, + upb_msgval val, bool *first) { + char buf[128]; + const char *name; + + if (e->options & UPB_JSONENC_PROTONAMES) { + name = upb_fielddef_name(f); + } else { + /* TODO(haberman): we need a better JSON name API. */ + upb_fielddef_getjsonname(f, buf, sizeof(buf)); + name = buf; + } + + jsonenc_putsep(e, ", ", first); + jsonenc_printf(e, "\"%s\": ", name); + + if (upb_fielddef_ismap(f)) { + jsonenc_map(e, val.map_val, f); + } else if (upb_fielddef_isseq(f)) { + jsonenc_array(e, val.array_val, f); + } else { + jsonenc_scalar(e, val, f); + } +} + +static void jsonenc_msg(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { + upb_msgval val; + const upb_fielddef *f; + bool first = true; + + jsonenc_putstr(e, "{"); + + if (e->options & UPB_JSONENC_EMITDEFAULTS) { + /* Iterate over all fields. */ + upb_msg_field_iter i; + for (upb_msg_field_begin(&i, m); !upb_msg_field_done(&i); + upb_msg_field_next(&i)) { + f = upb_msg_iter_field(&i); + jsonenc_fieldval(e, f, upb_msg_get(msg, f), &first); + } + } else { + /* Iterate over non-empty fields. */ + size_t iter = UPB_MSG_BEGIN; + while (upb_msg_next(msg, m, e->ext_pool, &f, &val, &iter)) { + jsonenc_fieldval(e, f, val, &first); + } + } + + jsonenc_putstr(e, "}"); +} + +size_t jsonenc_nullz(jsonenc *e, size_t size) { + size_t ret = e->ptr - e->buf + e->overflow; + + if (size > 0) { + if (e->ptr == e->end) e->ptr--; + *e->ptr = '\0'; + } + + return ret; +} + +size_t upb_json_encode(const upb_msg *msg, const upb_msgdef *m, + const upb_symtab *ext_pool, int options, char *buf, + size_t size, upb_status *status) { + jsonenc e; + + e.buf = buf; + e.ptr = buf; + e.end = buf + size; + e.overflow = 0; + e.options = options; + e.ext_pool = ext_pool; + e.status = status; + + if (setjmp(e.err)) return -1; + + jsonenc_msg(&e, msg, m); + return jsonenc_nullz(&e, size); +} diff --git a/upb/json_encode.h b/upb/json_encode.h new file mode 100644 index 00000000000..8396fbf80f8 --- /dev/null +++ b/upb/json_encode.h @@ -0,0 +1,36 @@ + +#ifndef UPB_JSONENCODE_H_ +#define UPB_JSONENCODE_H_ + +#include "upb/def.h" + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + /* When set, emits 0/default values. TOOD(haberman): proto3 only? */ + UPB_JSONENC_EMITDEFAULTS = 1, + + /* When set, use normal (snake_caes) field names instead of JSON (camelCase) + names. */ + UPB_JSONENC_PROTONAMES = 2 +}; + +/* Encodes the given |msg| to JSON format. The message's reflection is given in + * |m|. The symtab in |symtab| is used to find extensions (if NULL, extensions + * will not be printed). + * + * Output is placed in the given buffer, and always NULL-terminated. The output + * size (excluding NULL) is returned. This means that a return value >= |size| + * implies that the output was truncated. (These are the same semantics as + * snprintf()). */ +size_t upb_json_encode(const upb_msg *msg, const upb_msgdef *m, + const upb_symtab *ext_pool, int options, char *buf, + size_t size, upb_status *status); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* UPB_JSONENCODE_H_ */ diff --git a/upb/reflection.c b/upb/reflection.c index 09483ac8dad..f6daa0d416d 100644 --- a/upb/reflection.c +++ b/upb/reflection.c @@ -186,6 +186,13 @@ bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m, } /* Continue if NULL or 0. */ if (memcmp(&test, &zero, sizeof(test)) == 0) continue; + + /* Continue on empty array or map. */ + if (upb_fielddef_ismap(f)) { + if (upb_map_size(test.map_val) == 0) continue; + } else if (upb_fielddef_isseq(f)) { + if (upb_array_size(test.array_val) == 0) continue; + } } *out_val = val; diff --git a/upb/text_encode.c b/upb/text_encode.c index 5c13c9b93a1..cb76f76253b 100644 --- a/upb/text_encode.c +++ b/upb/text_encode.c @@ -113,6 +113,7 @@ static void txtenc_string(txtenc *e, upb_strview str, bool bytes) { } else { txtenc_putbytes(e, ptr, 1); } + break; } ptr++; } diff --git a/upbc/generator.cc b/upbc/generator.cc index 50fb42d5647..47cc07ad10b 100644 --- a/upbc/generator.cc +++ b/upbc/generator.cc @@ -853,12 +853,14 @@ void WriteDefSource(const protobuf::FileDescriptor* file, Output& output) { } output("\n"); - output("static const upb_msglayout *layouts[$0] = {\n", file_messages.size()); - for (auto message : file_messages) { - output(" &$0,\n", MessageInit(message)); + if (!file_messages.empty()) { + output("static const upb_msglayout *layouts[$0] = {\n", file_messages.size()); + for (auto message : file_messages) { + output(" &$0,\n", MessageInit(message)); + } + output("};\n"); + output("\n"); } - output("};\n"); - output("\n"); protobuf::FileDescriptorProto file_proto; file->CopyTo(&file_proto); @@ -905,7 +907,11 @@ void WriteDefSource(const protobuf::FileDescriptor* file, Output& output) { output("upb_def_init $0 = {\n", DefInitSymbol(file)); output(" deps,\n"); - output(" layouts,\n"); + if (file_messages.empty()) { + output(" NULL,\n"); + } else { + output(" layouts,\n"); + } output(" \"$0\",\n", file->name()); output(" UPB_STRVIEW_INIT(descriptor, $0)\n", file_data.size()); output("};\n"); From 6a225b782f4f44a246e7a5532a00a19a454ccbfd Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 21 Feb 2020 11:51:28 -0800 Subject: [PATCH 021/239] update bazel upb build dep --- bazel/grpc_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index f8e6824deec..96f8d0dfc56 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -234,9 +234,9 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "3f992f2f9d81cfd8a06bb9fc313f35c4560adcf9ca6f44a6e615110fdb7863ee", - strip_prefix = "upb-02c89a8b15d0ce2a4a75ef16fc398913827354fd", - url = "https://github.com/protocolbuffers/upb/archive/02c89a8b15d0ce2a4a75ef16fc398913827354fd.tar.gz", + sha256 = "b2f7c03da0aef19baff9d10278443b560a96c8cbe3637685fe936e4a36925850", + strip_prefix = "upb-e70853d71f3db513f3d19a7842e0703bfa56d6a5", + url = "https://github.com/protocolbuffers/upb/archive/e70853d71f3db513f3d19a7842e0703bfa56d6a5.tar.gz", ) if "envoy_api" not in native.existing_rules(): http_archive( From 98c364f587935024d0d6cd06ad77394128d4eac5 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 27 Feb 2020 09:26:30 -0800 Subject: [PATCH 022/239] Squashed 'third_party/upb/' changes from e70853d71f..97bcd5276c 97bcd5276c Merge pull request #253 from haberman/warnings aacdcf8b91 The compile is now clean of -Wshorten-64-to-32 warnings. git-subtree-dir: third_party/upb git-subtree-split: 97bcd5276cf4597f52fe5f5b3baad8dc2cad7878 --- generated_for_cmake/upb/json/parser.c | 4 ++-- tests/pb/test_varint.c | 4 ++-- upb/def.c | 18 +++++++------- upb/handlers.c | 3 ++- upb/json/parser.rl | 4 ++-- upb/json/printer.c | 4 ++-- upb/pb/compile_decoder.c | 14 ++++++----- upb/pb/decoder.c | 34 ++++++++++++++------------- upb/pb/encoder.c | 2 +- upb/pb/varint.int.h | 3 ++- upb/reflection.c | 4 ++-- 11 files changed, 50 insertions(+), 44 deletions(-) diff --git a/generated_for_cmake/upb/json/parser.c b/generated_for_cmake/upb/json/parser.c index 0efc7301d17..33bb442f51b 100644 --- a/generated_for_cmake/upb/json/parser.c +++ b/generated_for_cmake/upb/json/parser.c @@ -970,7 +970,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, } else if (val > INT32_MAX || val < INT32_MIN) { return false; } else { - upb_sink_putint32(p->top->sink, parser_getsel(p), val); + upb_sink_putint32(p->top->sink, parser_getsel(p), (int32_t)val); return true; } } @@ -981,7 +981,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, } else if (val > UINT32_MAX || errno == ERANGE) { return false; } else { - upb_sink_putuint32(p->top->sink, parser_getsel(p), val); + upb_sink_putuint32(p->top->sink, parser_getsel(p), (uint32_t)val); return true; } } diff --git a/tests/pb/test_varint.c b/tests/pb/test_varint.c index cdae9dba473..45d8e47dcd8 100644 --- a/tests/pb/test_varint.c +++ b/tests/pb/test_varint.c @@ -16,7 +16,7 @@ static void test_varint_for_num(upb_decoderet (*decoder)(const char*), bytes = upb_vencode64(num, buf); if (num <= UINT32_MAX) { - uint64_t encoded = upb_vencode32(num); + uint64_t encoded = upb_vencode32((uint32_t)num); char buf2[16]; upb_decoderet r; @@ -44,7 +44,7 @@ static void test_varint_for_num(upb_decoderet (*decoder)(const char*), r = decoder(buf2); ASSERT(r.val == num); ASSERT(r.p == buf2 + upb_value_size(encoded)); - ASSERT(upb_zzenc_32(upb_zzdec_32(num)) == num); + ASSERT(upb_zzenc_32(upb_zzdec_32((uint32_t)num)) == num); } r = decoder(buf); diff --git a/upb/def.c b/upb/def.c index 1b44aecbdf8..8385e9638a4 100644 --- a/upb/def.c +++ b/upb/def.c @@ -353,7 +353,7 @@ int32_t upb_enumdef_default(const upb_enumdef *e) { } int upb_enumdef_numvals(const upb_enumdef *e) { - return upb_strtable_count(&e->ntoi); + return (int)upb_strtable_count(&e->ntoi); } void upb_enum_begin(upb_enum_iter *i, const upb_enumdef *e) { @@ -525,7 +525,7 @@ int64_t upb_fielddef_defaultint64(const upb_fielddef *f) { int32_t upb_fielddef_defaultint32(const upb_fielddef *f) { chkdefaulttype(f, UPB_TYPE_INT32); - return f->defaultval.sint; + return (int32_t)f->defaultval.sint; } uint64_t upb_fielddef_defaultuint64(const upb_fielddef *f) { @@ -535,7 +535,7 @@ uint64_t upb_fielddef_defaultuint64(const upb_fielddef *f) { uint32_t upb_fielddef_defaultuint32(const upb_fielddef *f) { chkdefaulttype(f, UPB_TYPE_UINT32); - return f->defaultval.uint; + return (uint32_t)f->defaultval.uint; } bool upb_fielddef_defaultbool(const upb_fielddef *f) { @@ -696,12 +696,12 @@ bool upb_msgdef_lookupname(const upb_msgdef *m, const char *name, size_t len, int upb_msgdef_numfields(const upb_msgdef *m) { /* The number table contains only fields. */ - return upb_inttable_count(&m->itof); + return (int)upb_inttable_count(&m->itof); } int upb_msgdef_numoneofs(const upb_msgdef *m) { /* The name table includes oneofs, and the number table does not. */ - return upb_strtable_count(&m->ntof) - upb_inttable_count(&m->itof); + return (int)(upb_strtable_count(&m->ntof) - upb_inttable_count(&m->itof)); } const upb_msglayout *upb_msgdef_layout(const upb_msgdef *m) { @@ -795,7 +795,7 @@ const upb_msgdef *upb_oneofdef_containingtype(const upb_oneofdef *o) { } int upb_oneofdef_numfields(const upb_oneofdef *o) { - return upb_strtable_count(&o->ntof); + return (int)upb_strtable_count(&o->ntof); } uint32_t upb_oneofdef_index(const upb_oneofdef *o) { @@ -885,8 +885,8 @@ static uint8_t upb_msg_fielddefsize(const upb_fielddef *f) { } } -static size_t upb_msglayout_place(upb_msglayout *l, size_t size) { - size_t ret; +static uint32_t upb_msglayout_place(upb_msglayout *l, size_t size) { + uint32_t ret; l->size = align_up(l->size, size); ret = l->size; @@ -1940,7 +1940,7 @@ const upb_filedef *upb_symtab_lookupfile(const upb_symtab *s, const char *name) } int upb_symtab_filecount(const upb_symtab *s) { - return upb_strtable_count(&s->files); + return (int)upb_strtable_count(&s->files); } static const upb_filedef *_upb_symtab_addfile( diff --git a/upb/handlers.c b/upb/handlers.c index 844a3601765..5cf7ccc0746 100644 --- a/upb/handlers.c +++ b/upb/handlers.c @@ -180,7 +180,8 @@ static upb_handlers *upb_handlers_new(const upb_msgdef *md, int extra; upb_handlers *h; - extra = sizeof(upb_handlers_tabent) * (upb_msgdef_selectorcount(md) - 1); + extra = + (int)(sizeof(upb_handlers_tabent) * (upb_msgdef_selectorcount(md) - 1)); h = upb_calloc(arena, sizeof(*h) + extra); if (!h) return NULL; diff --git a/upb/json/parser.rl b/upb/json/parser.rl index eefdadf5778..de381b25712 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -968,7 +968,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, } else if (val > INT32_MAX || val < INT32_MIN) { return false; } else { - upb_sink_putint32(p->top->sink, parser_getsel(p), val); + upb_sink_putint32(p->top->sink, parser_getsel(p), (int32_t)val); return true; } } @@ -979,7 +979,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, } else if (val > UINT32_MAX || errno == ERANGE) { return false; } else { - upb_sink_putuint32(p->top->sink, parser_getsel(p), val); + upb_sink_putuint32(p->top->sink, parser_getsel(p), (uint32_t)val); return true; } } diff --git a/upb/json/printer.c b/upb/json/printer.c index a3cb9bdb010..930ee441f6f 100644 --- a/upb/json/printer.c +++ b/upb/json/printer.c @@ -89,7 +89,7 @@ strpc *newstrpc_str(upb_handlers *h, const char * str) { /* ------------ JSON string printing: values, maps, arrays ------------------ */ static void print_data( - upb_json_printer *p, const char *buf, unsigned int len) { + upb_json_printer *p, const char *buf, size_t len) { /* TODO: Will need to change if we support pushback from the sink. */ size_t n = upb_bytessink_putbuf(p->output_, p->subc_, buf, len, NULL); UPB_ASSERT(n == len); @@ -129,7 +129,7 @@ UPB_INLINE const char* json_nice_escape(char c) { /* Write a properly escaped string chunk. The surrounding quotes are *not* * printed; this is so that the caller has the option of emitting the string * content in chunks. */ -static void putstring(upb_json_printer *p, const char *buf, unsigned int len) { +static void putstring(upb_json_printer *p, const char *buf, size_t len) { const char* unescaped_run = NULL; unsigned int i; for (i = 0; i < len; i++) { diff --git a/upb/pb/compile_decoder.c b/upb/pb/compile_decoder.c index 44b310fe3f9..454397bd1ff 100644 --- a/upb/pb/compile_decoder.c +++ b/upb/pb/compile_decoder.c @@ -156,7 +156,9 @@ static void setofs(uint32_t *instruction, int32_t ofs) { UPB_ASSERT(getofs(*instruction) == ofs); /* Would fail in cases of overflow. */ } -static uint32_t pcofs(compiler *c) { return c->pc - c->group->bytecode; } +static uint32_t pcofs(compiler *c) { + return (uint32_t)(c->pc - c->group->bytecode); +} /* Defines a local label at the current PC location. All previous forward * references are updated to point to this location. The location is noted @@ -170,7 +172,7 @@ static void label(compiler *c, unsigned int label) { codep = (val == EMPTYLABEL) ? NULL : c->group->bytecode + val; while (codep) { int ofs = getofs(*codep); - setofs(codep, c->pc - codep - instruction_len(*codep)); + setofs(codep, (int32_t)(c->pc - codep - instruction_len(*codep))); codep = ofs ? codep + ofs : NULL; } c->fwd_labels[label] = EMPTYLABEL; @@ -192,7 +194,7 @@ static int32_t labelref(compiler *c, int label) { return 0; } else if (label < 0) { /* Backward local label. Relative to the next instruction. */ - uint32_t from = (c->pc + 1) - c->group->bytecode; + uint32_t from = (uint32_t)((c->pc + 1) - c->group->bytecode); return c->back_labels[-label] - from; } else { /* Forward local label: prepend to (possibly-empty) linked list. */ @@ -226,7 +228,7 @@ static void putop(compiler *c, int op, ...) { case OP_SETDISPATCH: { uintptr_t ptr = (uintptr_t)va_arg(ap, void*); put32(c, OP_SETDISPATCH); - put32(c, ptr); + put32(c, (uint32_t)ptr); if (sizeof(uintptr_t) > sizeof(uint32_t)) put32(c, (uint64_t)ptr >> 32); break; @@ -285,7 +287,7 @@ static void putop(compiler *c, int op, ...) { case OP_TAG2: { int label = va_arg(ap, int); uint64_t tag = va_arg(ap, uint64_t); - uint32_t instruction = op | (tag << 16); + uint32_t instruction = (uint32_t)(op | (tag << 16)); UPB_ASSERT(tag <= 0xffff); setofs(&instruction, labelref(c, label)); put32(c, instruction); @@ -297,7 +299,7 @@ static void putop(compiler *c, int op, ...) { uint32_t instruction = op | (upb_value_size(tag) << 16); setofs(&instruction, labelref(c, label)); put32(c, instruction); - put32(c, tag); + put32(c, (uint32_t)tag); put32(c, tag >> 32); break; } diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c index ba2b7700981..8cdb234526a 100644 --- a/upb/pb/decoder.c +++ b/upb/pb/decoder.c @@ -185,7 +185,7 @@ static int32_t skip(upb_pbdecoder *d, size_t bytes) { UPB_ASSERT(d->skip == 0); if (bytes > delim_remaining(d)) { seterr(d, "Skipped value extended beyond enclosing submessage."); - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } else if (bufleft(d) >= bytes) { /* Skipped data is all in current buffer, and more is still available. */ advance(d, bytes); @@ -198,7 +198,7 @@ static int32_t skip(upb_pbdecoder *d, size_t bytes) { d->bufstart_ofs += (d->end - d->buf); d->residual_end = d->residual; switchtobuf(d, d->residual, d->residual_end); - return d->size_param + d->skip; + return (int32_t)(d->size_param + d->skip); } } @@ -238,7 +238,7 @@ int32_t upb_pbdecoder_resume(upb_pbdecoder *d, void *p, const char *buf, /* NULL buf is ok if its entire span is covered by the "skip" above, but * by this point we know that "skip" doesn't cover the buffer. */ seterr(d, "Passed NULL buffer over non-skippable region."); - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } if (d->residual_end > d->residual) { @@ -348,9 +348,9 @@ UPB_NOINLINE static int32_t getbytes_slow(upb_pbdecoder *d, void *buf, return DECODE_OK; } else if (d->data_end == d->delim_end) { seterr(d, "Submessage ended in the middle of a value or group"); - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } else { - return suspend_save(d); + return (int32_t)suspend_save(d); } } @@ -406,7 +406,7 @@ UPB_NOINLINE int32_t upb_pbdecoder_decode_varint_slow(upb_pbdecoder *d, } if(bitpos == 70 && (byte & 0x80)) { seterr(d, kUnterminatedVarint); - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } return DECODE_OK; } @@ -423,7 +423,7 @@ UPB_FORCEINLINE static int32_t decode_varint(upb_pbdecoder *d, uint64_t *u64) { upb_decoderet r = upb_vdecode_fast(d->ptr); if (r.p == NULL) { seterr(d, kUnterminatedVarint); - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } advance(d, r.p - d->ptr); *u64 = r.val; @@ -447,9 +447,9 @@ UPB_FORCEINLINE static int32_t decode_v32(upb_pbdecoder *d, uint32_t *u32) { * Right now the size_t -> int32_t can overflow and produce negative values. */ *u32 = 0; - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } - *u32 = u64; + *u32 = (uint32_t)u64; return DECODE_OK; } @@ -525,7 +525,7 @@ UPB_NOINLINE int32_t upb_pbdecoder_checktag_slow(upb_pbdecoder *d, UPB_ASSERT(ok < 0); return DECODE_OK; } else if (read < bytes && memcmp(&data, &expected, read) == 0) { - return suspend_save(d); + return (int32_t)suspend_save(d); } else { return DECODE_MISMATCH; } @@ -545,7 +545,7 @@ int32_t upb_pbdecoder_skipunknown(upb_pbdecoder *d, int32_t fieldnum, have_tag: if (fieldnum == 0) { seterr(d, "Saw invalid field number (0)"); - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } switch (wire_type) { @@ -567,7 +567,9 @@ have_tag: break; } case UPB_WIRE_TYPE_START_GROUP: - CHECK_SUSPEND(pushtagdelim(d, -fieldnum)); + if (!pushtagdelim(d, -fieldnum)) { + return (int32_t)upb_pbdecoder_suspend(d); + } break; case UPB_WIRE_TYPE_END_GROUP: if (fieldnum == -d->top->groupnum) { @@ -576,12 +578,12 @@ have_tag: return DECODE_ENDGROUP; } else { seterr(d, "Unmatched ENDGROUP tag."); - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } break; default: seterr(d, "Invalid wire type"); - return upb_pbdecoder_suspend(d); + return (int32_t)upb_pbdecoder_suspend(d); } if (d->top->groupnum >= 0) { @@ -753,7 +755,7 @@ size_t run_decoder_vm(upb_pbdecoder *d, const mgroup *group, CHECK_SUSPEND(upb_sink_endsubmsg(d->top->sink, subsink, arg)); ) VMCASE(OP_STARTSTR, - uint32_t len = delim_remaining(d); + uint32_t len = (uint32_t)delim_remaining(d); upb_pbdecoder_frame *outer = outer_frame(d); CHECK_SUSPEND(upb_sink_startstr(outer->sink, arg, len, &d->top->sink)); if (len == 0) { @@ -761,7 +763,7 @@ size_t run_decoder_vm(upb_pbdecoder *d, const mgroup *group, } ) VMCASE(OP_STRING, - uint32_t len = curbufleft(d); + uint32_t len = (uint32_t)curbufleft(d); size_t n = upb_sink_putstring(d->top->sink, arg, d->ptr, len, handle); if (n > len) { if (n > delim_remaining(d)) { diff --git a/upb/pb/encoder.c b/upb/pb/encoder.c index d108a643d30..257e1474ca3 100644 --- a/upb/pb/encoder.c +++ b/upb/pb/encoder.c @@ -248,7 +248,7 @@ static bool start_delim(upb_pb_encoder *e) { e->runbegin = e->ptr; } - *e->top = e->segptr - e->segbuf; + *e->top = (int)(e->segptr - e->segbuf); e->segptr->seglen = 0; e->segptr->msglen = 0; diff --git a/upb/pb/varint.int.h b/upb/pb/varint.int.h index 293067a5cb8..59158d3b753 100644 --- a/upb/pb/varint.int.h +++ b/upb/pb/varint.int.h @@ -40,7 +40,8 @@ UPB_INLINE uint64_t byteswap64(uint64_t val) { /* Zig-zag encoding/decoding **************************************************/ -UPB_INLINE int32_t upb_zzdec_32(uint32_t n) { +UPB_INLINE int32_t upb_zzdec_32(uint64_t _n) { + uint32_t n = (uint32_t)_n; return (n >> 1) ^ -(int32_t)(n & 1); } UPB_INLINE int64_t upb_zzdec_64(uint64_t n) { diff --git a/upb/reflection.c b/upb/reflection.c index f6daa0d416d..89a801266f8 100644 --- a/upb/reflection.c +++ b/upb/reflection.c @@ -169,10 +169,10 @@ void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m, const upb_symtab *ext_pool, const upb_fielddef **out_f, upb_msgval *out_val, size_t *iter) { - int i = *iter; + size_t i = *iter; const upb_msgval zero = {0}; const upb_fielddef *f; - while ((f = _upb_msgdef_field(m, ++i)) != NULL) { + while ((f = _upb_msgdef_field(m, (int)++i)) != NULL) { upb_msgval val = _upb_msg_getraw(msg, f); /* Skip field if unset or empty. */ From 8ea36891f650c4402fcbb6332dfd71afe61d3eb1 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 27 Feb 2020 09:28:50 -0800 Subject: [PATCH 023/239] update bazel build deps --- bazel/grpc_deps.bzl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 25defe10feb..58a55149ba8 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -231,13 +231,15 @@ def grpc_deps(): strip_prefix = "opencensus-cpp-c9a4da319bc669a772928ffc55af4a61be1a1176", url = "https://github.com/census-instrumentation/opencensus-cpp/archive/c9a4da319bc669a772928ffc55af4a61be1a1176.tar.gz", ) + if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "b2f7c03da0aef19baff9d10278443b560a96c8cbe3637685fe936e4a36925850", - strip_prefix = "upb-e70853d71f3db513f3d19a7842e0703bfa56d6a5", - url = "https://github.com/protocolbuffers/upb/archive/e70853d71f3db513f3d19a7842e0703bfa56d6a5.tar.gz", + sha256 = "60509df0f77ba6e28842316e3db89699f31ac96f0cd8bf35db36e319153e383e", + strip_prefix = "upb-97bcd5276cf4597f52fe5f5b3baad8dc2cad7878", + url = "https://github.com/protocolbuffers/upb/archive/97bcd5276cf4597f52fe5f5b3baad8dc2cad7878.tar.gz", ) + if "envoy_api" not in native.existing_rules(): http_archive( name = "envoy_api", From 4df91612df87d4fc96e7cfa3203f4e08a7d13e1b Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 12 Mar 2020 09:09:06 -0700 Subject: [PATCH 024/239] Squashed 'third_party/upb/' changes from 97bcd5276c..4e2505edaa 4e2505edaa Merge pull request #259 from haberman/rmsubmodule 91fd76cc9c Merge pull request #258 from haberman/bazel_version d0d5339620 Removed .gitmodules, we don't use submodules any more. 6c5d5afc43 Remove compatibility code for old Bazel versions. c1357afb2e Merge pull request #230 from moroten/maybe-deps a3d693544b Merge pull request #257 from haberman/warnings2 63e673383b Fixed narrowing warnings in text_encode.c. 39bc93a527 Merge pull request #252 from haberman/jsondecode 0fdd65f223 Merge branch 'master' into jsondecode 82af3d661c Merge pull request #255 from protocolbuffers/const-array 90b3a20af0 Making sure _upb_fieldtype_to_sizelg2 is readonly 5667a7a806 Removed stray assert, causing C90 build errors. 23a5af3513 [json] fixed all remaining conformance bugs. 6ec4df82c1 Updated other parts of upb for new JSON name API. a292261aeb Added JSON decoder to conformance tests, and fixed tons of bugs. d49c1db6c2 New JSON decoder, string->msg using reflection. f593289087 Merge branch 'master' into maybe-deps 0c2046f732 Make workspace_deps.bzl overridable using maybe() git-subtree-dir: third_party/upb git-subtree-split: 4e2505edaa325bcf0ffd69eefa7cb810d6dde861 --- .gitmodules | 3 - BUILD | 2 + CMakeLists.txt | 2 + bazel/repository_defs.bzl | 15 - bazel/upb_proto_library.bzl | 33 - bazel/workspace_deps.bzl | 18 +- generated_for_cmake/upb/json/parser.c | 10 +- tests/conformance_upb.c | 46 +- upb/def.c | 168 ++- upb/def.h | 30 +- upb/json/parser.rl | 10 +- upb/json/printer.c | 8 +- upb/json_decode.c | 1405 +++++++++++++++++++++++++ upb/json_decode.h | 24 + upb/json_encode.c | 96 +- upb/msg.c | 2 +- upb/reflection.c | 22 +- upb/reflection.h | 3 + upb/text_encode.c | 2 +- 19 files changed, 1697 insertions(+), 202 deletions(-) delete mode 100644 .gitmodules delete mode 100644 bazel/repository_defs.bzl create mode 100644 upb/json_decode.c create mode 100644 upb/json_decode.h diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 8b52c1d2165..00000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "third_party/protobuf"] - path = third_party/protobuf - url = https://github.com/google/protobuf.git diff --git a/BUILD b/BUILD index 61601a067e1..cddda82d18c 100644 --- a/BUILD +++ b/BUILD @@ -162,9 +162,11 @@ cc_library( cc_library( name = "json", srcs = [ + "upb/json_decode.c", "upb/json_encode.c", ], hdrs = [ + "upb/json_decode.h", "upb/json_encode.h", ], deps = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f0b2420bb4..1f6004543fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,9 @@ target_link_libraries(textformat port reflection) add_library(json + upb/json_decode.c upb/json_encode.c + upb/json_decode.h upb/json_encode.h) target_link_libraries(json port diff --git a/bazel/repository_defs.bzl b/bazel/repository_defs.bzl deleted file mode 100644 index 7b6e78e8b83..00000000000 --- a/bazel/repository_defs.bzl +++ /dev/null @@ -1,15 +0,0 @@ -# A hacky way to work around the fact that native.bazel_version is only -# available from WORKSPACE macros, not BUILD macros or rules. -# -# Hopefully we can remove this if/when this is fixed: -# https://github.com/bazelbuild/bazel/issues/8305 - -def _impl(repository_ctx): - s = "bazel_version = \"" + native.bazel_version + "\"" - repository_ctx.file("bazel_version.bzl", s) - repository_ctx.file("BUILD", "") - -bazel_version_repository = repository_rule( - implementation = _impl, - local = True, -) diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index 9ad578f96f6..596b9c4c41a 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -6,11 +6,6 @@ load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") -# copybara:strip_for_google3_begin -load("@bazel_skylib//lib:versions.bzl", "versions") -load("@upb_bazel_version//:bazel_version.bzl", "bazel_version") -# copybara:strip_end - # Generic support code ######################################################### _is_bazel = not hasattr(native, "genmpm") @@ -79,34 +74,6 @@ def _cc_library_func(ctx, name, hdrs, srcs, dep_ccinfos): unsupported_features = ctx.disabled_features, ) - # copybara:strip_for_google3_begin - if bazel_version == "0.24.1": - # Compatibility code until gRPC is on 0.25.2 or later. - compilation_info = cc_common.compile( - ctx = ctx, - feature_configuration = feature_configuration, - cc_toolchain = toolchain, - srcs = srcs, - hdrs = hdrs, - compilation_contexts = compilation_contexts, - ) - linking_info = cc_common.link( - ctx = ctx, - feature_configuration = feature_configuration, - cc_toolchain = toolchain, - cc_compilation_outputs = compilation_info.cc_compilation_outputs, - linking_contexts = linking_contexts, - ) - return CcInfo( - compilation_context = compilation_info.compilation_context, - linking_context = linking_info.linking_context, - ) - - if not versions.is_at_least("0.25.2", bazel_version): - fail("upb requires Bazel >=0.25.2 or 0.24.1") - - # copybara:strip_end - blaze_only_args = {} if not _is_bazel: diff --git a/bazel/workspace_deps.bzl b/bazel/workspace_deps.bzl index a03a643a324..2a7f88f495f 100644 --- a/bazel/workspace_deps.bzl +++ b/bazel/workspace_deps.bzl @@ -1,33 +1,33 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") -load("//bazel:repository_defs.bzl", "bazel_version_repository") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") def upb_deps(): - bazel_version_repository( - name = "upb_bazel_version", - ) - - git_repository( + maybe( + git_repository, name = "com_google_absl", commit = "070f6e47b33a2909d039e620c873204f78809492", remote = "https://github.com/abseil/abseil-cpp.git", shallow_since = "1541627663 -0500", ) - git_repository( + maybe( + git_repository, name = "com_google_protobuf", remote = "https://github.com/protocolbuffers/protobuf.git", commit = "d41002663fd04325ead28439dfd5ce2822b0d6fb", ) - http_archive( + maybe( + http_archive, name = "bazel_skylib", strip_prefix = "bazel-skylib-master", urls = ["https://github.com/bazelbuild/bazel-skylib/archive/master.tar.gz"], ) - http_archive( + maybe( + http_archive, name = "zlib", build_file = "@com_google_protobuf//:third_party/zlib.BUILD", sha256 = "629380c90a77b964d896ed37163f5c3a34f6e6d897311f1df2a7016355c45eff", diff --git a/generated_for_cmake/upb/json/parser.c b/generated_for_cmake/upb/json/parser.c index 33bb442f51b..03087845d5f 100644 --- a/generated_for_cmake/upb/json/parser.c +++ b/generated_for_cmake/upb/json/parser.c @@ -3311,15 +3311,13 @@ static upb_json_parsermethod *parsermethod_new(upb_json_codecache *c, upb_msg_field_next(&i)) { const upb_fielddef *f = upb_msg_iter_field(&i); upb_value v = upb_value_constptr(f); - char *buf; + const char *name; /* Add an entry for the JSON name. */ - size_t len = upb_fielddef_getjsonname(f, NULL, 0); - buf = upb_malloc(alloc, len); - upb_fielddef_getjsonname(f, buf, len); - upb_strtable_insert3(&m->name_table, buf, strlen(buf), v, alloc); + name = upb_fielddef_jsonname(f); + upb_strtable_insert3(&m->name_table, name, strlen(name), v, alloc); - if (strcmp(buf, upb_fielddef_name(f)) != 0) { + if (strcmp(name, upb_fielddef_name(f)) != 0) { /* Since the JSON name is different from the regular field name, add an * entry for the raw name (compliant proto3 JSON parsers must accept * both). */ diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index 8285242d3ed..1d87060095f 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -15,6 +15,7 @@ #include "upb/decode.h" #include "upb/encode.h" #include "upb/reflection.h" +#include "upb/json_decode.h" #include "upb/json_encode.h" #include "upb/text_encode.h" @@ -85,9 +86,11 @@ void serialize_text(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { size_t len2; int opts = 0; char *data; + if (!conformance_ConformanceRequest_print_unknown_fields(c->request)) { opts |= UPB_TXTENC_SKIPUNKNOWN; } + len = upb_text_encode(msg, m, c->symtab, opts, NULL, 0); data = upb_arena_malloc(c->arena, len + 1); len2 = upb_text_encode(msg, m, c->symtab, opts, data, len + 1); @@ -96,6 +99,33 @@ void serialize_text(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { c->response, upb_strview_make(data, len)); } +bool parse_json(upb_msg *msg, const upb_msgdef *m, const ctx* c) { + upb_strview json = + conformance_ConformanceRequest_json_payload(c->request); + upb_status status; + int opts = 0; + + if (conformance_ConformanceRequest_test_category(c->request) == + conformance_JSON_IGNORE_UNKNOWN_PARSING_TEST) { + opts |= UPB_JSONDEC_IGNOREUNKNOWN; + } + + upb_status_clear(&status); + if (upb_json_decode(json.data, json.size, msg, m, c->symtab, opts, c->arena, + &status)) { + return true; + } else { + const char *inerr = upb_status_errmsg(&status); + size_t len = strlen(inerr); + char *err = upb_arena_malloc(c->arena, len + 1); + memcpy(err, inerr, strlen(inerr)); + err[len] = '\0'; + conformance_ConformanceResponse_set_parse_error(c->response, + upb_strview_makez(err)); + return false; + } +} + void serialize_json(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { size_t len; size_t len2; @@ -104,16 +134,16 @@ void serialize_json(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { upb_status status; upb_status_clear(&status); - if (!conformance_ConformanceRequest_print_unknown_fields(c->request)) { - opts |= UPB_TXTENC_SKIPUNKNOWN; - } - len = upb_json_encode(msg, m, c->symtab, opts, NULL, 0, &status); if (len == -1) { - static const char msg[] = "Error serializing."; - conformance_ConformanceResponse_set_serialize_error( - c->response, upb_strview_make(msg, strlen(msg))); + const char *inerr = upb_status_errmsg(&status); + size_t len = strlen(inerr); + char *err = upb_arena_malloc(c->arena, len + 1); + memcpy(err, inerr, strlen(inerr)); + err[len] = '\0'; + conformance_ConformanceResponse_set_serialize_error(c->response, + upb_strview_makez(err)); return; } @@ -128,6 +158,8 @@ bool parse_input(upb_msg *msg, const upb_msgdef *m, const ctx* c) { switch (conformance_ConformanceRequest_payload_case(c->request)) { case conformance_ConformanceRequest_payload_protobuf_payload: return parse_proto(msg, m, c); + case conformance_ConformanceRequest_payload_json_payload: + return parse_json(msg, m, c); case conformance_ConformanceRequest_payload_NOT_SET: fprintf(stderr, "conformance_upb: Request didn't have payload.\n"); return false; diff --git a/upb/def.c b/upb/def.c index 8385e9638a4..f1b477bdc90 100644 --- a/upb/def.c +++ b/upb/def.c @@ -27,6 +27,7 @@ struct upb_fielddef { const upb_filedef *file; const upb_msgdef *msgdef; const char *full_name; + const char *json_name; union { int64_t sint; uint64_t uint; @@ -117,10 +118,15 @@ struct upb_symtab { /* Inside a symtab we store tagged pointers to specific def types. */ typedef enum { - UPB_DEFTYPE_MSG = 0, - UPB_DEFTYPE_ENUM = 1, - UPB_DEFTYPE_FIELD = 2, - UPB_DEFTYPE_ONEOF = 3 + UPB_DEFTYPE_FIELD = 0, + + /* Only inside symtab table. */ + UPB_DEFTYPE_MSG = 1, + UPB_DEFTYPE_ENUM = 2, + + /* Only inside message table. */ + UPB_DEFTYPE_ONEOF = 1, + UPB_DEFTYPE_FIELD_JSONNAME = 2 } upb_deftype_t; static const void *unpack_def(upb_value v, upb_deftype_t type) { @@ -462,47 +468,12 @@ const char *upb_fielddef_name(const upb_fielddef *f) { return shortdefname(f->full_name); } -uint32_t upb_fielddef_selectorbase(const upb_fielddef *f) { - return f->selector_base; +const char *upb_fielddef_jsonname(const upb_fielddef *f) { + return f->json_name; } -size_t upb_fielddef_getjsonname(const upb_fielddef *f, char *buf, size_t len) { - const char *name = upb_fielddef_name(f); - size_t src, dst = 0; - bool ucase_next = false; - -#define WRITE(byte) \ - ++dst; \ - if (dst < len) buf[dst - 1] = byte; \ - else if (dst == len) buf[dst - 1] = '\0' - - if (!name) { - WRITE('\0'); - return 0; - } - - /* Implement the transformation as described in the spec: - * 1. upper case all letters after an underscore. - * 2. remove all underscores. - */ - for (src = 0; name[src]; src++) { - if (name[src] == '_') { - ucase_next = true; - continue; - } - - if (ucase_next) { - WRITE(toupper(name[src])); - ucase_next = false; - } else { - WRITE(name[src]); - } - } - - WRITE('\0'); - return dst; - -#undef WRITE +uint32_t upb_fielddef_selectorbase(const upb_fielddef *f) { + return f->selector_base; } const upb_msgdef *upb_fielddef_containingtype(const upb_fielddef *f) { @@ -690,18 +661,30 @@ bool upb_msgdef_lookupname(const upb_msgdef *m, const char *name, size_t len, *o = unpack_def(val, UPB_DEFTYPE_ONEOF); *f = unpack_def(val, UPB_DEFTYPE_FIELD); - UPB_ASSERT((*o != NULL) ^ (*f != NULL)); /* Exactly one of the two should be set. */ - return true; + return *o || *f; /* False if this was a JSON name. */ +} + +const upb_fielddef *upb_msgdef_lookupjsonname(const upb_msgdef *m, + const char *name, size_t len) { + upb_value val; + const upb_fielddef* f; + + if (!upb_strtable_lookup2(&m->ntof, name, len, &val)) { + return NULL; + } + + f = unpack_def(val, UPB_DEFTYPE_FIELD); + if (!f) f = unpack_def(val, UPB_DEFTYPE_FIELD_JSONNAME); + + return f; } int upb_msgdef_numfields(const upb_msgdef *m) { - /* The number table contains only fields. */ - return (int)upb_inttable_count(&m->itof); + return m->field_count; } int upb_msgdef_numoneofs(const upb_msgdef *m) { - /* The name table includes oneofs, and the number table does not. */ - return (int)(upb_strtable_count(&m->ntof) - upb_inttable_count(&m->itof)); + return m->oneof_count; } const upb_msglayout *upb_msgdef_layout(const upb_msgdef *m) { @@ -1098,6 +1081,51 @@ static const char *makefullname(const symtab_addctx *ctx, const char *prefix, } } +size_t getjsonname(const char *name, char *buf, size_t len) { + size_t src, dst = 0; + bool ucase_next = false; + +#define WRITE(byte) \ + ++dst; \ + if (dst < len) buf[dst - 1] = byte; \ + else if (dst == len) buf[dst - 1] = '\0' + + if (!name) { + WRITE('\0'); + return 0; + } + + /* Implement the transformation as described in the spec: + * 1. upper case all letters after an underscore. + * 2. remove all underscores. + */ + for (src = 0; name[src]; src++) { + if (name[src] == '_') { + ucase_next = true; + continue; + } + + if (ucase_next) { + WRITE(toupper(name[src])); + ucase_next = false; + } else { + WRITE(name[src]); + } + } + + WRITE('\0'); + return dst; + +#undef WRITE +} + +static char* makejsonname(const char* name, upb_alloc *alloc) { + size_t size = getjsonname(name, NULL, 0); + char* json_name = upb_malloc(alloc, size); + getjsonname(name, json_name, size); + return json_name; +} + static bool symtab_add(const symtab_addctx *ctx, const char *name, upb_value v) { upb_value tmp; @@ -1311,6 +1339,7 @@ static bool create_fielddef( const google_protobuf_FieldOptions *options; upb_strview name; const char *full_name; + const char *json_name; const char *shortname; uint32_t field_number; @@ -1324,6 +1353,13 @@ static bool create_fielddef( full_name = makefullname(ctx, prefix, name); shortname = shortdefname(full_name); + if (google_protobuf_FieldDescriptorProto_has_json_name(field_proto)) { + json_name = strviewdup( + ctx, google_protobuf_FieldDescriptorProto_json_name(field_proto)); + } else { + json_name = makejsonname(shortname, ctx->alloc); + } + field_number = google_protobuf_FieldDescriptorProto_number(field_proto); if (field_number == 0 || field_number > UPB_MAX_FIELDNUMBER) { @@ -1333,26 +1369,42 @@ static bool create_fielddef( if (m) { /* direct message field. */ - upb_value v, packed_v; + upb_value v, field_v, json_v; + size_t json_size; f = (upb_fielddef*)&m->fields[m->field_count++]; f->msgdef = m; f->is_extension_ = false; - packed_v = pack_def(f, UPB_DEFTYPE_FIELD); - v = upb_value_constptr(f); - - if (!upb_strtable_insert3(&m->ntof, name.data, name.size, packed_v, alloc)) { + if (upb_strtable_lookup(&m->ntof, shortname, NULL)) { upb_status_seterrf(ctx->status, "duplicate field name (%s)", shortname); return false; } - if (!upb_inttable_insert2(&m->itof, field_number, v, alloc)) { + if (upb_strtable_lookup(&m->ntof, json_name, NULL)) { + upb_status_seterrf(ctx->status, "duplicate json_name (%s)", json_name); + return false; + } + + if (upb_inttable_lookup(&m->itof, field_number, NULL)) { upb_status_seterrf(ctx->status, "duplicate field number (%u)", field_number); return false; } + field_v = pack_def(f, UPB_DEFTYPE_FIELD); + json_v = pack_def(f, UPB_DEFTYPE_FIELD_JSONNAME); + v = upb_value_constptr(f); + json_size = strlen(json_name); + + CHK_OOM( + upb_strtable_insert3(&m->ntof, name.data, name.size, field_v, alloc)); + CHK_OOM(upb_inttable_insert2(&m->itof, field_number, v, alloc)); + + if (strcmp(shortname, json_name) != 0) { + upb_strtable_insert3(&m->ntof, json_name, json_size, json_v, alloc); + } + if (ctx->layouts) { const upb_msglayout_field *fields = m->layout->fields; int count = m->layout->field_count; @@ -1369,12 +1421,13 @@ static bool create_fielddef( } } else { /* extension field. */ - f = (upb_fielddef*)&ctx->file->exts[ctx->file->ext_count]; + f = (upb_fielddef*)&ctx->file->exts[ctx->file->ext_count++]; f->is_extension_ = true; CHK_OOM(symtab_add(ctx, full_name, pack_def(f, UPB_DEFTYPE_FIELD))); } f->full_name = full_name; + f->json_name = json_name; f->file = ctx->file; f->type_ = (int)google_protobuf_FieldDescriptorProto_type(field_proto); f->label_ = (int)google_protobuf_FieldDescriptorProto_label(field_proto); @@ -1741,7 +1794,8 @@ static bool build_filedef( } else if (streql_view(syntax, "proto3")) { file->syntax = UPB_SYNTAX_PROTO3; } else { - upb_status_seterrf(ctx->status, "Invalid syntax '%s'", syntax); + upb_status_seterrf(ctx->status, "Invalid syntax '" UPB_STRVIEW_FORMAT "'", + UPB_STRVIEW_ARGS(syntax)); return false; } } else { diff --git a/upb/def.h b/upb/def.h index 5bc361e28bc..48e113dffee 100644 --- a/upb/def.h +++ b/upb/def.h @@ -99,10 +99,10 @@ upb_descriptortype_t upb_fielddef_descriptortype(const upb_fielddef *f); upb_label_t upb_fielddef_label(const upb_fielddef *f); uint32_t upb_fielddef_number(const upb_fielddef *f); const char *upb_fielddef_name(const upb_fielddef *f); +const char *upb_fielddef_jsonname(const upb_fielddef *f); bool upb_fielddef_isextension(const upb_fielddef *f); bool upb_fielddef_lazy(const upb_fielddef *f); bool upb_fielddef_packed(const upb_fielddef *f); -size_t upb_fielddef_getjsonname(const upb_fielddef *f, char *buf, size_t len); const upb_msgdef *upb_fielddef_containingtype(const upb_fielddef *f); const upb_oneofdef *upb_fielddef_containingoneof(const upb_fielddef *f); uint32_t upb_fielddef_index(const upb_fielddef *f); @@ -151,32 +151,10 @@ class upb::FieldDefPtr { Type type() const { return upb_fielddef_type(ptr_); } Label label() const { return upb_fielddef_label(ptr_); } const char* name() const { return upb_fielddef_name(ptr_); } + const char* json_name() const { return upb_fielddef_jsonname(ptr_); } uint32_t number() const { return upb_fielddef_number(ptr_); } bool is_extension() const { return upb_fielddef_isextension(ptr_); } - /* Copies the JSON name for this field into the given buffer. Returns the - * actual size of the JSON name, including the NULL terminator. If the - * return value is 0, the JSON name is unset. If the return value is - * greater than len, the JSON name was truncated. The buffer is always - * NULL-terminated if len > 0. - * - * The JSON name always defaults to a camelCased version of the regular - * name. However if the regular name is unset, the JSON name will be unset - * also. - */ - size_t GetJsonName(char *buf, size_t len) const { - return upb_fielddef_getjsonname(ptr_, buf, len); - } - - /* Convenience version of the above function which copies the JSON name - * into the given string, returning false if the name is not set. */ - template - bool GetJsonName(T* str) { - str->resize(GetJsonName(NULL, 0)); - GetJsonName(&(*str)[0], str->size()); - return str->size() > 0; - } - /* For UPB_TYPE_MESSAGE fields only where is_tag_delimited() == false, * indicates whether this field should have lazy parsing handlers that yield * the unparsed string for the submessage. @@ -455,6 +433,10 @@ UPB_INLINE bool upb_msgdef_lookupnamez(const upb_msgdef *m, const char *name, return upb_msgdef_lookupname(m, name, strlen(name), f, o); } +/* Returns a field by either JSON name or regular proto name. */ +const upb_fielddef *upb_msgdef_lookupjsonname(const upb_msgdef *m, + const char *name, size_t len); + /* Iteration over fields and oneofs. For example: * * upb_msg_field_iter i; diff --git a/upb/json/parser.rl b/upb/json/parser.rl index de381b25712..19022df298a 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -2874,15 +2874,13 @@ static upb_json_parsermethod *parsermethod_new(upb_json_codecache *c, upb_msg_field_next(&i)) { const upb_fielddef *f = upb_msg_iter_field(&i); upb_value v = upb_value_constptr(f); - char *buf; + const char *name; /* Add an entry for the JSON name. */ - size_t len = upb_fielddef_getjsonname(f, NULL, 0); - buf = upb_malloc(alloc, len); - upb_fielddef_getjsonname(f, buf, len); - upb_strtable_insert3(&m->name_table, buf, strlen(buf), v, alloc); + name = upb_fielddef_jsonname(f); + upb_strtable_insert3(&m->name_table, name, strlen(name), v, alloc); - if (strcmp(buf, upb_fielddef_name(f)) != 0) { + if (strcmp(name, upb_fielddef_name(f)) != 0) { /* Since the JSON name is different from the regular field name, add an * entry for the raw name (compliant proto3 JSON parsers must accept * both). */ diff --git a/upb/json/printer.c b/upb/json/printer.c index 930ee441f6f..b0030e0e525 100644 --- a/upb/json/printer.c +++ b/upb/json/printer.c @@ -65,12 +65,8 @@ strpc *newstrpc(upb_handlers *h, const upb_fielddef *f, ret->ptr = upb_gstrdup(upb_fielddef_name(f)); ret->len = strlen(ret->ptr); } else { - size_t len; - ret->len = upb_fielddef_getjsonname(f, NULL, 0); - ret->ptr = upb_gmalloc(ret->len); - len = upb_fielddef_getjsonname(f, ret->ptr, ret->len); - UPB_ASSERT(len == ret->len); - ret->len--; /* NULL */ + ret->ptr = upb_gstrdup(upb_fielddef_jsonname(f)); + ret->len = strlen(ret->ptr); } upb_handlers_addcleanup(h, ret, freestrpc); diff --git a/upb/json_decode.c b/upb/json_decode.c new file mode 100644 index 00000000000..54a55ad135c --- /dev/null +++ b/upb/json_decode.c @@ -0,0 +1,1405 @@ + +#include "upb/json_decode.h" + +#include +#include +#include +#include +#include +#include + +#include "upb/encode.h" +#include "upb/reflection.h" + +/* Special header, must be included last. */ +#include "upb/port_def.inc" + +typedef struct { + const char *ptr, *end; + upb_arena *arena; /* TODO: should we have a tmp arena for tmp data? */ + const upb_symtab *any_pool; + int depth; + upb_status *status; + jmp_buf err; + int line; + const char *line_begin; + bool is_first; + int options; + const upb_fielddef *debug_field; +} jsondec; + +enum { JD_OBJECT, JD_ARRAY, JD_STRING, JD_NUMBER, JD_TRUE, JD_FALSE, JD_NULL }; + +/* Forward declarations of mutually-recursive functions. */ +static void jsondec_wellknown(jsondec *d, upb_msg *msg, const upb_msgdef *m); +static upb_msgval jsondec_value(jsondec *d, const upb_fielddef *f); +static void jsondec_wellknownvalue(jsondec *d, upb_msg *msg, + const upb_msgdef *m); +static void jsondec_object(jsondec *d, upb_msg *msg, const upb_msgdef *m); + +static bool jsondec_streql(upb_strview str, const char *lit) { + return str.size == strlen(lit) && memcmp(str.data, lit, str.size) == 0; +} + +UPB_NORETURN static void jsondec_err(jsondec *d, const char *msg) { + upb_status_seterrmsg(d->status, msg); + longjmp(d->err, 1); +} + +UPB_NORETURN static void jsondec_errf(jsondec *d, const char *fmt, ...) { + va_list argp; + va_start(argp, fmt); + upb_status_vseterrf(d->status, fmt, argp); + va_end(argp); + longjmp(d->err, 1); +} + +static void jsondec_skipws(jsondec *d) { + while (d->ptr != d->end) { + switch (*d->ptr) { + case '\n': + d->line++; + d->line_begin = d->ptr; + /* Fallthrough. */ + case '\r': + case '\t': + case ' ': + d->ptr++; + break; + default: + return; + } + } + jsondec_err(d, "Unexpected EOF"); +} + +static bool jsondec_tryparsech(jsondec *d, char ch) { + if (d->ptr == d->end || *d->ptr != ch) return false; + d->ptr++; + return true; +} + +static void jsondec_parselit(jsondec *d, const char *lit) { + size_t len = strlen(lit); + if (d->end - d->ptr < len || memcmp(d->ptr, lit, len) != 0) { + jsondec_errf(d, "Expected: '%s'", lit); + } + d->ptr += len; +} + +static void jsondec_wsch(jsondec *d, char ch) { + jsondec_skipws(d); + if (!jsondec_tryparsech(d, ch)) { + jsondec_errf(d, "Expected: '%c'", ch); + } +} + +static void jsondec_true(jsondec *d) { jsondec_parselit(d, "true"); } +static void jsondec_false(jsondec *d) { jsondec_parselit(d, "false"); } +static void jsondec_null(jsondec *d) { jsondec_parselit(d, "null"); } + +static void jsondec_entrysep(jsondec *d) { + jsondec_skipws(d); + jsondec_parselit(d, ":"); +} + +static int jsondec_rawpeek(jsondec *d) { + switch (*d->ptr) { + case '{': + return JD_OBJECT; + case '[': + return JD_ARRAY; + case '"': + return JD_STRING; + case '-': + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + return JD_NUMBER; + case 't': + return JD_TRUE; + case 'f': + return JD_FALSE; + case 'n': + return JD_NULL; + default: + jsondec_errf(d, "Unexpected character: '%c'", *d->ptr); + } +} + +/* JSON object/array **********************************************************/ + +/* These are used like so: + * + * jsondec_objstart(d); + * while (jsondec_objnext(d)) { + * ... + * } + * jsondec_objend(d) */ + +static int jsondec_peek(jsondec *d) { + jsondec_skipws(d); + return jsondec_rawpeek(d); +} + +static void jsondec_push(jsondec *d) { + if (--d->depth < 0) { + jsondec_err(d, "Recursion limit exceeded"); + } + d->is_first = true; +} + +static bool jsondec_seqnext(jsondec *d, char end_ch) { + jsondec_skipws(d); + if (*d->ptr == end_ch) return false; + + if (d->is_first) { + d->is_first = false; + } else { + jsondec_parselit(d, ","); + } + + return true; +} + +static void jsondec_arrstart(jsondec *d) { + jsondec_push(d); + jsondec_wsch(d, '['); +} + +static void jsondec_arrend(jsondec *d) { + d->depth++; + jsondec_wsch(d, ']'); +} + +static bool jsondec_arrnext(jsondec *d) { + return jsondec_seqnext(d, ']'); +} + +static void jsondec_objstart(jsondec *d) { + jsondec_push(d); + jsondec_wsch(d, '{'); +} + +static void jsondec_objend(jsondec *d) { + d->depth++; + jsondec_wsch(d, '}'); +} + +static bool jsondec_objnext(jsondec *d) { + if (!jsondec_seqnext(d, '}')) return false; + if (jsondec_peek(d) != JD_STRING) { + jsondec_err(d, "Object must start with string"); + } + return true; +} + +/* JSON number ****************************************************************/ + +static bool jsondec_tryskipdigits(jsondec *d) { + const char *start = d->ptr; + + while (d->ptr < d->end) { + if (*d->ptr < '0' || *d->ptr > '9') { + break; + } + d->ptr++; + } + + return d->ptr != start; +} + +static void jsondec_skipdigits(jsondec *d) { + if (!jsondec_tryskipdigits(d)) { + jsondec_err(d, "Expected one or more digits"); + } +} + +static double jsondec_number(jsondec *d) { + const char *start = d->ptr; + + assert(jsondec_rawpeek(d) == JD_NUMBER); + + /* Skip over the syntax of a number, as specified by JSON. */ + if (*d->ptr == '-') d->ptr++; + + if (jsondec_tryparsech(d, '0')) { + if (jsondec_tryskipdigits(d)) { + jsondec_err(d, "number cannot have leading zero"); + } + } else { + jsondec_skipdigits(d); + } + + if (d->ptr == d->end) goto parse; + if (jsondec_tryparsech(d, '.')) { + jsondec_skipdigits(d); + } + if (d->ptr == d->end) goto parse; + + if (*d->ptr == 'e' || *d->ptr == 'E') { + d->ptr++; + if (d->ptr == d->end) { + jsondec_err(d, "Unexpected EOF in number"); + } + if (*d->ptr == '+' || *d->ptr == '-') { + d->ptr++; + } + jsondec_skipdigits(d); + } + +parse: + /* Having verified the syntax of a JSON number, use strtod() to parse + * (strtod() accepts a superset of JSON syntax). */ + errno = 0; + { + char* end; + double val = strtod(start, &end); + assert(end == d->ptr); + + /* Currently the min/max-val conformance tests fail if we check this. Does + * this mean the conformance tests are wrong or strtod() is wrong, or + * something else? Investigate further. */ + /* + if (errno == ERANGE) { + jsondec_err(d, "Number out of range"); + } + */ + + if (val > DBL_MAX || val < -DBL_MAX) { + jsondec_err(d, "Number out of range"); + } + + return val; + } +} + +/* JSON string ****************************************************************/ + +static char jsondec_escape(jsondec *d) { + switch (*d->ptr++) { + case '"': + return '\"'; + case '\\': + return '\\'; + case '/': + return '/'; + case 'b': + return '\b'; + case 'f': + return '\f'; + case 'n': + return '\n'; + case 'r': + return '\r'; + case 't': + return '\t'; + default: + jsondec_err(d, "Invalid escape char"); + } +} + +static uint32_t jsondec_codepoint(jsondec *d) { + uint32_t cp = 0; + const char *end; + + if (d->end - d->ptr < 4) { + jsondec_err(d, "EOF inside string"); + } + + end = d->ptr + 4; + while (d->ptr < end) { + char ch = *d->ptr++; + if (ch >= '0' && ch <= '9') { + ch -= '0'; + } else if (ch >= 'a' && ch <= 'f') { + ch = ch - 'a' + 10; + } else if (ch >= 'A' && ch <= 'F') { + ch = ch - 'A' + 10; + } else { + jsondec_err(d, "Invalid hex digit"); + } + cp = (cp << 4) | ch; + } + + return cp; +} + +/* Parses a \uXXXX unicode escape (possibly a surrogate pair). */ +static size_t jsondec_unicode(jsondec *d, char* out) { + uint32_t cp = jsondec_codepoint(d); + if (cp >= 0xd800 && cp <= 0xdbff) { + /* Surrogate pair: two 16-bit codepoints become a 32-bit codepoint. */ + uint32_t high = cp; + uint32_t low; + jsondec_parselit(d, "\\u"); + low = jsondec_codepoint(d); + if (low < 0xdc00 || low > 0xdfff) { + jsondec_err(d, "Invalid low surrogate"); + } + cp = (high & 0x3ff) << 10; + cp |= (low & 0x3ff); + cp += 0x10000; + } else if (cp >= 0xdc00 && cp <= 0xdfff) { + jsondec_err(d, "Unpaired low surrogate"); + } + + /* Write to UTF-8 */ + if (cp <= 0x7f) { + out[0] = cp; + return 1; + } else if (cp <= 0x07FF) { + out[0] = ((cp >> 6) & 0x1F) | 0xC0; + out[1] = ((cp >> 0) & 0x3F) | 0x80; + return 2; + } else if (cp <= 0xFFFF) { + out[0] = ((cp >> 12) & 0x0F) | 0xE0; + out[1] = ((cp >> 6) & 0x3F) | 0x80; + out[2] = ((cp >> 0) & 0x3F) | 0x80; + return 3; + } else if (cp < 0x10FFFF) { + out[0] = ((cp >> 18) & 0x07) | 0xF0; + out[1] = ((cp >> 12) & 0x3f) | 0x80; + out[2] = ((cp >> 6) & 0x3f) | 0x80; + out[3] = ((cp >> 0) & 0x3f) | 0x80; + return 4; + } else { + jsondec_err(d, "Invalid codepoint"); + } +} + +static void jsondec_resize(jsondec *d, char **buf, char **end, char **buf_end) { + size_t oldsize = *buf_end - *buf; + size_t len = *end - *buf; + size_t size = UPB_MAX(8, 2 * oldsize); + + *buf = upb_arena_realloc(d->arena, *buf, len, size); + *end = *buf + len; + *buf_end = *buf + size; +} + +static upb_strview jsondec_string(jsondec *d) { + char *buf = NULL; + char *end = NULL; + char *buf_end = NULL; + + jsondec_skipws(d); + + if (*d->ptr++ != '"') { + jsondec_err(d, "Expected string"); + } + + while (d->ptr < d->end) { + char ch = *d->ptr++; + + if (end == buf_end) { + jsondec_resize(d, &buf, &end, &buf_end); + } + + switch (ch) { + case '"': { + upb_strview ret = {buf, end - buf}; + return ret; + } + case '\\': + if (d->ptr == d->end) goto eof; + if (*d->ptr == 'u') { + d->ptr++; + if (buf_end - end < 4) { + // Allow space for maximum-sized code point (4 bytes). + jsondec_resize(d, &buf, &end, &buf_end); + } + end += jsondec_unicode(d, end); + } else { + *end++ = jsondec_escape(d); + } + break; + default: + if ((unsigned char)*d->ptr < 0x20) { + jsondec_err(d, "Invalid char in JSON string"); + } + *end++ = ch; + break; + } + } + +eof: + jsondec_err(d, "EOF inside string"); +} + +static void jsondec_skipval(jsondec *d) { + switch (jsondec_peek(d)) { + case JD_OBJECT: + jsondec_objstart(d); + while (jsondec_objnext(d)) { + jsondec_string(d); + jsondec_entrysep(d); + jsondec_skipval(d); + } + jsondec_objend(d); + break; + case JD_ARRAY: + jsondec_arrstart(d); + while (jsondec_arrnext(d)) { + jsondec_skipval(d); + } + jsondec_arrend(d); + break; + case JD_TRUE: + jsondec_true(d); + break; + case JD_FALSE: + jsondec_false(d); + break; + case JD_NULL: + jsondec_null(d); + break; + case JD_STRING: + jsondec_string(d); + break; + case JD_NUMBER: + jsondec_number(d); + break; + } +} + +/* Base64 decoding for bytes fields. ******************************************/ + +static int jsondec_base64_tablelookup(const char ch) { + /* Table includes the normal base64 chars plus the URL-safe variant. */ + const signed char table[256] = { + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, 62 /*+*/, -1, 62 /*-*/, -1, 63 /*/ */, 52 /*0*/, + 53 /*1*/, 54 /*2*/, 55 /*3*/, 56 /*4*/, 57 /*5*/, 58 /*6*/, 59 /*7*/, + 60 /*8*/, 61 /*9*/, -1, -1, -1, -1, -1, + -1, -1, 0 /*A*/, 1 /*B*/, 2 /*C*/, 3 /*D*/, 4 /*E*/, + 5 /*F*/, 6 /*G*/, 07 /*H*/, 8 /*I*/, 9 /*J*/, 10 /*K*/, 11 /*L*/, + 12 /*M*/, 13 /*N*/, 14 /*O*/, 15 /*P*/, 16 /*Q*/, 17 /*R*/, 18 /*S*/, + 19 /*T*/, 20 /*U*/, 21 /*V*/, 22 /*W*/, 23 /*X*/, 24 /*Y*/, 25 /*Z*/, + -1, -1, -1, -1, 63 /*_*/, -1, 26 /*a*/, + 27 /*b*/, 28 /*c*/, 29 /*d*/, 30 /*e*/, 31 /*f*/, 32 /*g*/, 33 /*h*/, + 34 /*i*/, 35 /*j*/, 36 /*k*/, 37 /*l*/, 38 /*m*/, 39 /*n*/, 40 /*o*/, + 41 /*p*/, 42 /*q*/, 43 /*r*/, 44 /*s*/, 45 /*t*/, 46 /*u*/, 47 /*v*/, + 48 /*w*/, 49 /*x*/, 50 /*y*/, 51 /*z*/, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1}; + + /* Sign-extend return value so high bit will be set on any unexpected char. */ + return table[(unsigned)ch]; +} + +static char *jsondec_partialbase64(jsondec *d, const char *ptr, const char *end, + char *out) { + int32_t val = -1; + + switch (end - ptr) { + case 2: + val = jsondec_base64_tablelookup(ptr[0]) << 18 | + jsondec_base64_tablelookup(ptr[1]) << 12; + out[0] = val >> 16; + out += 1; + break; + case 3: + val = jsondec_base64_tablelookup(ptr[0]) << 18 | + jsondec_base64_tablelookup(ptr[1]) << 12 | + jsondec_base64_tablelookup(ptr[2]) << 6; + out[0] = val >> 16; + out[1] = (val >> 8) & 0xff; + out += 2; + break; + } + + if (val < 0) { + jsondec_err(d, "Corrupt base64"); + } + + return out; +} + +static size_t jsondec_base64(jsondec *d, upb_strview str) { + /* We decode in place. This is safe because this is a new buffer (not + * aliasing the input) and because base64 decoding shrinks 4 bytes into 3. */ + char *out = (char*)str.data; + const char *ptr = str.data; + const char *end = ptr + str.size; + const char *end4 = ptr + (str.size & -4); /* Round down to multiple of 4. */ + + for (; ptr < end4; ptr += 4, out += 3) { + int val = jsondec_base64_tablelookup(ptr[0]) << 18 | + jsondec_base64_tablelookup(ptr[1]) << 12 | + jsondec_base64_tablelookup(ptr[2]) << 6 | + jsondec_base64_tablelookup(ptr[3]) << 0; + + if (val < 0) { + /* Junk chars or padding. Remove trailing padding, if any. */ + if (end - ptr == 4 && ptr[3] == '=') { + if (ptr[2] == '=') { + end -= 2; + } else { + end -= 1; + } + } + break; + } + + out[0] = val >> 16; + out[1] = (val >> 8) & 0xff; + out[2] = val & 0xff; + } + + if (ptr < end) { + /* Process remaining chars. We do not require padding. */ + out = jsondec_partialbase64(d, ptr, end, out); + } + + return out - str.data; +} + +/* Low-level integer parsing **************************************************/ + +/* We use these hand-written routines instead of strto[u]l() because the "long + * long" variants aren't in c89. Also our version allows setting a ptr limit. */ + +static const char *jsondec_buftouint64(jsondec *d, const char *ptr, + const char *end, uint64_t *val) { + uint64_t u64 = 0; + while (ptr < end) { + unsigned ch = *ptr - '0'; + if (ch >= 10) break; + if (u64 > UINT64_MAX / 10 || u64 * 10 > UINT64_MAX - ch) { + jsondec_err(d, "Integer overflow"); + } + u64 *= 10; + u64 += ch; + ptr++; + } + + *val = u64; + return ptr; +} + +static const char *jsondec_buftoint64(jsondec *d, const char *ptr, + const char *end, int64_t *val) { + bool neg = false; + uint64_t u64; + + if (ptr != end && *ptr == '-') { + ptr++; + neg = true; + } + + ptr = jsondec_buftouint64(d, ptr, end, &u64); + if (u64 > (uint64_t)INT64_MAX + neg) { + jsondec_err(d, "Integer overflow"); + } + + *val = neg ? -u64 : u64; + return ptr; +} + +static uint64_t jsondec_strtouint64(jsondec *d, upb_strview str) { + const char *end = str.data + str.size; + uint64_t ret; + if (jsondec_buftouint64(d, str.data, end, &ret) != end) { + jsondec_err(d, "Non-number characters in quoted integer"); + } + return ret; +} + +static int64_t jsondec_strtoint64(jsondec *d, upb_strview str) { + const char *end = str.data + str.size; + int64_t ret; + if (jsondec_buftoint64(d, str.data, end, &ret) != end) { + jsondec_err(d, "Non-number characters in quoted integer"); + } + return ret; +} + +/* Primitive value types ******************************************************/ + +/* Parse INT32 or INT64 value. */ +static upb_msgval jsondec_int(jsondec *d, const upb_fielddef *f) { + upb_msgval val; + + switch (jsondec_peek(d)) { + case JD_NUMBER: { + double dbl = jsondec_number(d); + if (dbl > 9223372036854774784.0 || dbl < -9223372036854775808.0) { + jsondec_err(d, "JSON number is out of range."); + } + val.int64_val = dbl; /* must be guarded, overflow here is UB */ + if (val.int64_val != dbl) { + jsondec_errf(d, "JSON number was not integral (%d != %" PRId64 ")", dbl, + val.int64_val); + } + break; + } + case JD_STRING: { + upb_strview str = jsondec_string(d); + val.int64_val = jsondec_strtoint64(d, str); + break; + } + default: + jsondec_err(d, "Expected number or string"); + } + + if (upb_fielddef_type(f) == UPB_TYPE_INT32) { + if (val.int64_val > INT32_MAX || val.int64_val < INT32_MIN) { + jsondec_err(d, "Integer out of range."); + } + val.int32_val = val.int64_val; + } + + return val; +} + +/* Parse UINT32 or UINT64 value. */ +static upb_msgval jsondec_uint(jsondec *d, const upb_fielddef *f) { + upb_msgval val; + + switch (jsondec_peek(d)) { + case JD_NUMBER: { + double dbl = jsondec_number(d); + if (dbl > 18446744073709549568.0 || dbl < 0) { + jsondec_err(d, "JSON number is out of range."); + } + val.uint64_val = dbl; /* must be guarded, overflow here is UB */ + if (val.uint64_val != dbl) { + jsondec_errf(d, "JSON number was not integral (%d != %" PRIu64 ")", dbl, + val.uint64_val); + } + break; + } + case JD_STRING: { + upb_strview str = jsondec_string(d); + val.uint64_val = jsondec_strtouint64(d, str); + break; + } + default: + jsondec_err(d, "Expected number or string"); + } + + if (upb_fielddef_type(f) == UPB_TYPE_UINT32) { + if (val.uint64_val > UINT32_MAX) { + jsondec_err(d, "Integer out of range."); + } + val.uint32_val = val.uint64_val; + } + + return val; +} + +/* Parse DOUBLE or FLOAT value. */ +static upb_msgval jsondec_double(jsondec *d, const upb_fielddef *f) { + upb_strview str; + upb_msgval val; + + switch (jsondec_peek(d)) { + case JD_NUMBER: + val.double_val = jsondec_number(d); + break; + case JD_STRING: + str = jsondec_string(d); + if (jsondec_streql(str, "NaN")) { + val.double_val = 0.0 / 0.0; + } else if (jsondec_streql(str, "Infinity")) { + val.double_val = UPB_INFINITY; + } else if (jsondec_streql(str, "-Infinity")) { + val.double_val = -UPB_INFINITY; + } else { + val.double_val = strtod(str.data, NULL); + } + break; + default: + jsondec_err(d, "Expected number or string"); + } + + if (upb_fielddef_type(f) == UPB_TYPE_FLOAT) { + if (val.double_val != UPB_INFINITY && val.double_val != -UPB_INFINITY && + (val.double_val > FLT_MAX || val.double_val < -FLT_MAX)) { + jsondec_err(d, "Float out of range"); + } + val.float_val = val.double_val; + } + + return val; +} + +/* Parse STRING or BYTES value. */ +static upb_msgval jsondec_strfield(jsondec *d, const upb_fielddef *f) { + upb_msgval val; + val.str_val = jsondec_string(d); + if (upb_fielddef_type(f) == UPB_TYPE_BYTES) { + val.str_val.size = jsondec_base64(d, val.str_val); + } + return val; +} + +static upb_msgval jsondec_enum(jsondec *d, const upb_fielddef *f) { + if (jsondec_peek(d) == JD_STRING) { + const upb_enumdef *e = upb_fielddef_enumsubdef(f); + upb_strview str = jsondec_string(d); + upb_msgval val; + if (!upb_enumdef_ntoi(e, str.data, str.size, &val.int32_val)) { + jsondec_err(d, "Unknown enumerator"); + } + return val; + } else { + return jsondec_int(d, f); + } +} + +static upb_msgval jsondec_bool(jsondec *d, const upb_fielddef *f) { + bool is_map_key = upb_fielddef_number(f) == 1 && + upb_msgdef_mapentry(upb_fielddef_containingtype(f)); + upb_msgval val; + + if (is_map_key) { + upb_strview str = jsondec_string(d); + if (jsondec_streql(str, "true")) { + val.bool_val = true; + } else if (jsondec_streql(str, "false")) { + val.bool_val = false; + } else { + jsondec_err(d, "Invalid boolean map key"); + } + } else { + switch (jsondec_peek(d)) { + case JD_TRUE: + val.bool_val = true; + jsondec_true(d); + break; + case JD_FALSE: + val.bool_val = false; + jsondec_false(d); + break; + default: + jsondec_err(d, "Expected true or false"); + } + } + + return val; +} + +/* Composite types (array/message/map) ****************************************/ + +static void jsondec_array(jsondec *d, upb_msg *msg, const upb_fielddef *f) { + upb_array *arr = upb_msg_mutable(msg, f, d->arena).array; + + jsondec_arrstart(d); + while (jsondec_arrnext(d)) { + upb_msgval elem = jsondec_value(d, f); + upb_array_append(arr, elem, d->arena); + } + jsondec_arrend(d); +} + +static void jsondec_map(jsondec *d, upb_msg *msg, const upb_fielddef *f) { + upb_map *map = upb_msg_mutable(msg, f, d->arena).map; + const upb_msgdef *entry = upb_fielddef_msgsubdef(f); + const upb_fielddef *key_f = upb_msgdef_itof(entry, 1); + const upb_fielddef *val_f = upb_msgdef_itof(entry, 2); + + jsondec_objstart(d); + while (jsondec_objnext(d)) { + upb_msgval key, val; + key = jsondec_value(d, key_f); + jsondec_entrysep(d); + val = jsondec_value(d, val_f); + upb_map_set(map, key, val, d->arena); + } + jsondec_objend(d); +} + +static void jsondec_tomsg(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + if (upb_msgdef_wellknowntype(m) == UPB_WELLKNOWN_UNSPECIFIED) { + jsondec_object(d, msg, m); + } else { + jsondec_wellknown(d, msg, m); + } +} + +static upb_msgval jsondec_msg(jsondec *d, const upb_fielddef *f) { + const upb_msgdef *m = upb_fielddef_msgsubdef(f); + upb_msg *msg = upb_msg_new(m, d->arena); + upb_msgval val; + + jsondec_tomsg(d, msg, m); + val.msg_val = msg; + return val; +} + +static bool jsondec_isvalue(const upb_fielddef *f) { + return upb_fielddef_type(f) == UPB_TYPE_MESSAGE && + upb_msgdef_wellknowntype(upb_fielddef_msgsubdef(f)) == + UPB_WELLKNOWN_VALUE; +} + +static void jsondec_field(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + upb_strview name; + const upb_fielddef *f; + const upb_fielddef *preserved; + + name = jsondec_string(d); + jsondec_entrysep(d); + f = upb_msgdef_lookupjsonname(m, name.data, name.size); + + if (!f) { + if ((d->options & UPB_JSONDEC_IGNOREUNKNOWN) == 0) { + jsondec_err(d, "Unknown field"); + } + jsondec_skipval(d); + return; + } + + if (upb_fielddef_containingoneof(f) && + upb_msg_hasoneof(msg, upb_fielddef_containingoneof(f))) { + jsondec_err(d, "More than one field for this oneof."); + } + + if (jsondec_peek(d) == JD_NULL && !jsondec_isvalue(f)) { + /* JSON "null" indicates a default value, so no need to set anything. */ + return jsondec_null(d); + } + + preserved = d->debug_field; + d->debug_field = f; + + if (upb_fielddef_ismap(f)) { + jsondec_map(d, msg, f); + } else if (upb_fielddef_isseq(f)) { + jsondec_array(d, msg, f); + } else if (upb_fielddef_issubmsg(f)) { + upb_msg *submsg = upb_msg_mutable(msg, f, d->arena).msg; + const upb_msgdef *subm = upb_fielddef_msgsubdef(f); + jsondec_tomsg(d, submsg, subm); + } else { + upb_msgval val = jsondec_value(d, f); + upb_msg_set(msg, f, val, d->arena); + } + + d->debug_field = preserved; +} + +static void jsondec_object(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + jsondec_objstart(d); + while (jsondec_objnext(d)) jsondec_field(d, msg, m); + jsondec_objend(d); +} + +static upb_msgval jsondec_value(jsondec *d, const upb_fielddef *f) { + switch (upb_fielddef_type(f)) { + case UPB_TYPE_BOOL: + return jsondec_bool(d, f); + case UPB_TYPE_FLOAT: + case UPB_TYPE_DOUBLE: + return jsondec_double(d, f); + case UPB_TYPE_UINT32: + case UPB_TYPE_UINT64: + return jsondec_uint(d, f); + case UPB_TYPE_INT32: + case UPB_TYPE_INT64: + return jsondec_int(d, f); + case UPB_TYPE_STRING: + case UPB_TYPE_BYTES: + return jsondec_strfield(d, f); + case UPB_TYPE_ENUM: + return jsondec_enum(d, f); + case UPB_TYPE_MESSAGE: + return jsondec_msg(d, f); + default: + UPB_UNREACHABLE(); + } +} + +/* Well-known types ***********************************************************/ + +static int jsondec_tsdigits(jsondec *d, const char **ptr, size_t digits, + const char *after) { + uint64_t val; + const char *p = *ptr; + const char *end = p + digits; + size_t after_len = after ? strlen(after) : 0; + + assert(digits <= 9); /* int can't overflow. */ + + if (jsondec_buftouint64(d, p, end, &val) != end || + (after_len && memcmp(end, after, after_len) != 0)) { + jsondec_err(d, "Malformed timestamp"); + } + + *ptr = end + after_len; + return val; +} + +static int jsondec_nanos(jsondec *d, const char **ptr, const char *end) { + uint64_t nanos = 0; + const char *p = *ptr; + + if (p != end && *p == '.') { + const char *nano_end = jsondec_buftouint64(d, p + 1, end, &nanos); + int digits = nano_end - p - 1; + int exp_lg10 = 9 - digits; + if (digits > 9) { + jsondec_err(d, "Too many digits for partial seconds"); + } + while (exp_lg10--) nanos *= 10; + *ptr = nano_end; + } + + return nanos; +} + +// jsondec_epochdays(1970, 1, 1) == 1970-01-01 == 0 +static int jsondec_epochdays(int y, int m, int d) { + unsigned year_base = 4800; /* Before minimum year, divisible by 100 & 400 */ + unsigned epoch = 2472632; /* Days between year_base and 1970 (Unix epoch) */ + unsigned carry = (unsigned)m - 3 > m; + unsigned m_adj = m - 3 + (carry ? 12 : 0); /* Month, counting from March */ + unsigned y_adj = y + year_base - carry; /* Year, positive and March-based */ + unsigned base_days = (365 * 4 + 1) * y_adj / 4; /* Approx days for year */ + unsigned centuries = y_adj / 100; + unsigned extra_leap_days = (3 * centuries + 3) / 4; /* base_days correction */ + unsigned year_days = (367 * (m_adj + 1)) / 12 - 30; /* Counting from March */ + return base_days - extra_leap_days + year_days + (d - 1) - epoch; +} + +static int64_t jsondec_unixtime(int y, int m, int d, int h, int min, int s) { + return (int64_t)jsondec_epochdays(y, m, d) * 86400 + h * 3600 + min * 60 + s; +} + +static void jsondec_timestamp(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + upb_msgval seconds; + upb_msgval nanos; + upb_strview str = jsondec_string(d); + const char *ptr = str.data; + const char *end = ptr + str.size; + + if (str.size < 20) goto malformed; + + { + // 1972-01-01T01:00:00 + int year = jsondec_tsdigits(d, &ptr, 4, "-"); + int mon = jsondec_tsdigits(d, &ptr, 2, "-"); + int day = jsondec_tsdigits(d, &ptr, 2, "T"); + int hour = jsondec_tsdigits(d, &ptr, 2, ":"); + int min = jsondec_tsdigits(d, &ptr, 2, ":"); + int sec = jsondec_tsdigits(d, &ptr, 2, NULL); + + seconds.int64_val = jsondec_unixtime(year, mon, day, hour, min, sec); + } + + nanos.int32_val = jsondec_nanos(d, &ptr, end); + + { + // [+-]08:00 or Z + int ofs = 0; + bool neg = false; + + if (ptr == end) goto malformed; + + switch (*ptr++) { + case '-': + neg = true; + /* Fallthrough intended. */ + case '+': + if ((end - ptr) != 5) goto malformed; + ofs = jsondec_tsdigits(d, &ptr, 2, ":00"); + ofs *= 60 * 60; + seconds.int64_val += (neg ? ofs : -ofs); + break; + case 'Z': + if (ptr != end) goto malformed; + break; + default: + goto malformed; + } + } + + if (seconds.int64_val < -62135596800) { + jsondec_err(d, "Timestamp out of range"); + } + + upb_msg_set(msg, upb_msgdef_itof(m, 1), seconds, d->arena); + upb_msg_set(msg, upb_msgdef_itof(m, 2), nanos, d->arena); + return; + +malformed: + jsondec_err(d, "Malformed timestamp"); +} + +static void jsondec_duration(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + upb_msgval seconds; + upb_msgval nanos; + upb_strview str = jsondec_string(d); + const char *ptr = str.data; + const char *end = ptr + str.size; + + // "3.000000001s", "3s", etc. + ptr = jsondec_buftoint64(d, ptr, end, &seconds.int64_val); + nanos.int32_val = jsondec_nanos(d, &ptr, end); + + if (end - ptr != 1 || *ptr != 's') { + jsondec_err(d, "Malformed duration"); + } + + if (seconds.int64_val < -315576000000LL || seconds.int64_val > 315576000000LL) { + jsondec_err(d, "Duration out of range"); + } + + if (seconds.int64_val < 0) { + nanos.int32_val = - nanos.int32_val; + } + + upb_msg_set(msg, upb_msgdef_itof(m, 1), seconds, d->arena); + upb_msg_set(msg, upb_msgdef_itof(m, 2), nanos, d->arena); +} + +static void jsondec_listvalue(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + const upb_fielddef *values_f = upb_msgdef_itof(m, 1); + const upb_msgdef *value_m = upb_fielddef_msgsubdef(values_f); + upb_array *values = upb_msg_mutable(msg, values_f, d->arena).array; + + jsondec_arrstart(d); + while (jsondec_arrnext(d)) { + upb_msg *value_msg = upb_msg_new(value_m, d->arena); + upb_msgval value; + value.msg_val = value_msg; + upb_array_append(values, value, d->arena); + jsondec_wellknownvalue(d, value_msg, value_m); + } + jsondec_arrend(d); +} + +static void jsondec_struct(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + const upb_fielddef *fields_f = upb_msgdef_itof(m, 1); + const upb_msgdef *entry_m = upb_fielddef_msgsubdef(fields_f); + const upb_fielddef *value_f = upb_msgdef_itof(entry_m, 2); + const upb_msgdef *value_m = upb_fielddef_msgsubdef(value_f); + upb_map *fields = upb_msg_mutable(msg, fields_f, d->arena).map; + + jsondec_objstart(d); + while (jsondec_objnext(d)) { + upb_msgval key, value; + upb_msg *value_msg = upb_msg_new(value_m, d->arena); + key.str_val = jsondec_string(d); + value.msg_val = value_msg; + upb_map_set(fields, key, value, d->arena); + jsondec_entrysep(d); + jsondec_wellknownvalue(d, value_msg, value_m); + } + jsondec_objend(d); +} + +static void jsondec_wellknownvalue(jsondec *d, upb_msg *msg, + const upb_msgdef *m) { + upb_msgval val; + const upb_fielddef *f; + upb_msg *submsg; + + switch (jsondec_peek(d)) { + case JD_NUMBER: + /* double number_value = 2; */ + f = upb_msgdef_itof(m, 2); + val.double_val = jsondec_number(d); + break; + case JD_STRING: + /* string string_value = 3; */ + f = upb_msgdef_itof(m, 3); + val.str_val = jsondec_string(d); + break; + case JD_FALSE: + /* bool bool_value = 4; */ + f = upb_msgdef_itof(m, 4); + val.bool_val = false; + jsondec_false(d); + break; + case JD_TRUE: + /* bool bool_value = 4; */ + f = upb_msgdef_itof(m, 4); + val.bool_val = true; + jsondec_true(d); + break; + case JD_NULL: + /* NullValue null_value = 1; */ + f = upb_msgdef_itof(m, 1); + val.int32_val = 0; + jsondec_null(d); + break; + /* Note: these cases return, because upb_msg_mutable() is enough. */ + case JD_OBJECT: + /* Struct struct_value = 5; */ + f = upb_msgdef_itof(m, 5); + submsg = upb_msg_mutable(msg, f, d->arena).msg; + jsondec_struct(d, submsg, upb_fielddef_msgsubdef(f)); + return; + case JD_ARRAY: + /* ListValue list_value = 6; */ + f = upb_msgdef_itof(m, 6); + submsg = upb_msg_mutable(msg, f, d->arena).msg; + jsondec_listvalue(d, submsg, upb_fielddef_msgsubdef(f)); + return; + default: + UPB_UNREACHABLE(); + } + + upb_msg_set(msg, f, val, d->arena); +} + +static upb_strview jsondec_mask(jsondec *d, const char *buf, const char *end) { + /* FieldMask fields grow due to inserted '_' characters, so we can't do the + * transform in place. */ + const char *ptr = buf; + upb_strview ret; + char *out; + + ret.size = end - ptr; + while (ptr < end) { + ret.size += (*ptr >= 'A' && *ptr <= 'Z'); + ptr++; + } + + out = upb_arena_malloc(d->arena, ret.size); + ptr = buf; + ret.data = out; + + while (ptr < end) { + char ch = *ptr++; + if (ch >= 'A' && ch <= 'Z') { + *out++ = '_'; + *out++ = ch + 32; + } else if (ch == '_') { + jsondec_err(d, "field mask may not contain '_'"); + } else { + *out++ = ch; + } + } + + return ret; +} + +static void jsondec_fieldmask(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + /* repeated string paths = 1; */ + const upb_fielddef *paths_f = upb_msgdef_itof(m, 1); + upb_array *arr = upb_msg_mutable(msg, paths_f, d->arena).array; + upb_strview str = jsondec_string(d); + const char *ptr = str.data; + const char *end = ptr + str.size; + upb_msgval val; + + while (ptr < end) { + const char *elem_end = memchr(ptr, ',', end - ptr); + if (elem_end) { + val.str_val = jsondec_mask(d, ptr, elem_end); + ptr = elem_end + 1; + } else { + val.str_val = jsondec_mask(d, ptr, end); + ptr = end; + } + upb_array_append(arr, val, d->arena); + } +} + +static void jsondec_anyfield(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + if (upb_msgdef_wellknowntype(m) == UPB_WELLKNOWN_UNSPECIFIED) { + /* For regular types: {"@type": "[user type]", "f1": , "f2": } + * where f1, f2, etc. are the normal fields of this type. */ + jsondec_field(d, msg, m); + } else { + /* For well-known types: {"@type": "[well-known type]", "value": } + * where is whatever encoding the WKT normally uses. */ + upb_strview str = jsondec_string(d); + jsondec_entrysep(d); + if (!jsondec_streql(str, "value")) { + jsondec_err(d, "Key for well-known type must be 'value'"); + } + jsondec_wellknown(d, msg, m); + } +} + +static const upb_msgdef *jsondec_typeurl(jsondec *d, upb_msg *msg, + const upb_msgdef *m) { + const upb_fielddef *type_url_f = upb_msgdef_itof(m, 1); + const upb_msgdef *type_m; + upb_strview type_url = jsondec_string(d); + const char *end = type_url.data + type_url.size; + const char *ptr = end; + upb_msgval val; + + val.str_val = type_url; + upb_msg_set(msg, type_url_f, val, d->arena); + + /* Find message name after the last '/' */ + while (ptr > type_url.data && *--ptr != '/') {} + + if (ptr == type_url.data || ptr == end) { + jsondec_err(d, "Type url must have at least one '/' and non-empty host"); + } + + ptr++; + type_m = upb_symtab_lookupmsg2(d->any_pool, ptr, end - ptr); + + if (!type_m) { + jsondec_err(d, "Type was not found"); + } + + return type_m; +} + +static void jsondec_any(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + /* string type_url = 1; + * bytes value = 2; */ + const upb_fielddef *value_f = upb_msgdef_itof(m, 2); + upb_msg *any_msg; + const upb_msgdef *any_m = NULL; + const char *pre_type_data = NULL; + const char *pre_type_end = NULL; + upb_msgval encoded; + + jsondec_objstart(d); + + /* Scan looking for "@type", which is not necessarily first. */ + while (!any_m && jsondec_objnext(d)) { + const char *start = d->ptr; + upb_strview name = jsondec_string(d); + jsondec_entrysep(d); + if (jsondec_streql(name, "@type")) { + any_m = jsondec_typeurl(d, msg, m); + if (pre_type_data) { + pre_type_end = start; + while (*pre_type_end != ',') pre_type_end--; + } + } else { + if (!pre_type_data) pre_type_data = start; + jsondec_skipval(d); + } + } + + if (!any_m) { + jsondec_err(d, "Any object didn't contain a '@type' field"); + } + + any_msg = upb_msg_new(any_m, d->arena); + + if (pre_type_data) { + size_t len = pre_type_end - pre_type_data + 1; + char *tmp = upb_arena_malloc(d->arena, len); + memcpy(tmp, pre_type_data, len - 1); + tmp[len - 1] = '}'; + const char *saved_ptr = d->ptr; + const char *saved_end = d->end; + d->ptr = tmp; + d->end = tmp + len; + d->is_first = true; + while (jsondec_objnext(d)) { + jsondec_anyfield(d, any_msg, any_m); + } + d->ptr = saved_ptr; + d->end = saved_end; + } + + while (jsondec_objnext(d)) { + jsondec_anyfield(d, any_msg, any_m); + } + + jsondec_objend(d); + + encoded.str_val.data = upb_encode(any_msg, upb_msgdef_layout(any_m), d->arena, + &encoded.str_val.size); + upb_msg_set(msg, value_f, encoded, d->arena); +} + +static void jsondec_wrapper(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + const upb_fielddef *value_f = upb_msgdef_itof(m, 1); + upb_msgval val = jsondec_value(d, value_f); + upb_msg_set(msg, value_f, val, d->arena); +} + +static void jsondec_wellknown(jsondec *d, upb_msg *msg, const upb_msgdef *m) { + switch (upb_msgdef_wellknowntype(m)) { + case UPB_WELLKNOWN_ANY: + jsondec_any(d, msg, m); + break; + case UPB_WELLKNOWN_FIELDMASK: + jsondec_fieldmask(d, msg, m); + break; + case UPB_WELLKNOWN_DURATION: + jsondec_duration(d, msg, m); + break; + case UPB_WELLKNOWN_TIMESTAMP: + jsondec_timestamp(d, msg, m); + break; + case UPB_WELLKNOWN_VALUE: + jsondec_wellknownvalue(d, msg, m); + break; + case UPB_WELLKNOWN_LISTVALUE: + jsondec_listvalue(d, msg, m); + break; + case UPB_WELLKNOWN_STRUCT: + jsondec_struct(d, msg, m); + break; + case UPB_WELLKNOWN_DOUBLEVALUE: + case UPB_WELLKNOWN_FLOATVALUE: + case UPB_WELLKNOWN_INT64VALUE: + case UPB_WELLKNOWN_UINT64VALUE: + case UPB_WELLKNOWN_INT32VALUE: + case UPB_WELLKNOWN_UINT32VALUE: + case UPB_WELLKNOWN_STRINGVALUE: + case UPB_WELLKNOWN_BYTESVALUE: + case UPB_WELLKNOWN_BOOLVALUE: + jsondec_wrapper(d, msg, m); + break; + default: + UPB_UNREACHABLE(); + } +} + +bool upb_json_decode(const char *buf, size_t size, upb_msg *msg, + const upb_msgdef *m, const upb_symtab *any_pool, + int options, upb_arena *arena, upb_status *status) { + jsondec d; + d.ptr = buf; + d.end = buf + size; + d.arena = arena; + d.any_pool = any_pool; + d.status = status; + d.options = options; + d.depth = 64; + d.line = 1; + d.debug_field = NULL; + d.is_first = false; + + if (setjmp(d.err)) return false; + + jsondec_object(&d, msg, m); + return true; +} diff --git a/upb/json_decode.h b/upb/json_decode.h new file mode 100644 index 00000000000..01ab9580f05 --- /dev/null +++ b/upb/json_decode.h @@ -0,0 +1,24 @@ + +#ifndef UPB_JSONDECODE_H_ +#define UPB_JSONDECODE_H_ + +#include "upb/def.h" +#include "upb/msg.h" + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + UPB_JSONDEC_IGNOREUNKNOWN = 1 +}; + +bool upb_json_decode(const char *buf, size_t size, upb_msg *msg, + const upb_msgdef *m, const upb_symtab *any_pool, + int options, upb_arena *arena, upb_status *status); + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* UPB_JSONDECODE_H_ */ diff --git a/upb/json_encode.c b/upb/json_encode.c index d8adf1b722b..285bcecea5f 100644 --- a/upb/json_encode.c +++ b/upb/json_encode.c @@ -29,13 +29,23 @@ static void jsonenc_msg(jsonenc *e, const upb_msg *msg, const upb_msgdef *m); static void jsonenc_scalar(jsonenc *e, upb_msgval val, const upb_fielddef *f); static void jsonenc_msgfield(jsonenc *e, const upb_msg *msg, const upb_msgdef *m); +static void jsonenc_msgfields(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m); static void jsonenc_value(jsonenc *e, const upb_msg *msg, const upb_msgdef *m); -static void jsonenc_err(jsonenc *e, const char *msg) { +UPB_NORETURN static void jsonenc_err(jsonenc *e, const char *msg) { upb_status_seterrmsg(e->status, msg); longjmp(e->err, 1); } +static upb_arena *jsonenc_arena(jsonenc *e) { + /* Create lazily, since it's only needed for Any */ + if (!e->arena) { + e->arena = upb_arena_new(); + } + return e->arena; +} + static void jsonenc_putbytes(jsonenc *e, const void *data, size_t len) { size_t have = e->end - e->ptr; if (UPB_LIKELY(have >= len)) { @@ -70,19 +80,19 @@ static void jsonenc_printf(jsonenc *e, const char *fmt, ...) { } static void jsonenc_nanos(jsonenc *e, int32_t nanos) { - const char zeros[3] = "000"; + int digits = 9; if (nanos == 0) return; if (nanos < 0 || nanos >= 1000000000) { jsonenc_err(e, "error formatting timestamp as JSON: invalid nanos"); } - jsonenc_printf(e, "%09" PRId32, nanos); - - /* Remove trailing zeros, 3 at a time. */ - while ((e->ptr - e->buf) >= 3 && memcmp(e->ptr, zeros, 3) == 0) { - e->ptr -= 3; + while (nanos % 1000 == 0) { + nanos /= 1000; + digits -= 3; } + + jsonenc_printf(e, ".%0.*" PRId32, digits, nanos); } static void jsonenc_timestamp(jsonenc *e, const upb_msg *msg, @@ -107,7 +117,7 @@ static void jsonenc_timestamp(jsonenc *e, const upb_msg *msg, * Fliegel, H. F., and Van Flandern, T. C., "A Machine Algorithm for * Processing Calendar Dates," Communications of the Association of * Computing Machines, vol. 11 (1968), p. 657. */ - L = (seconds / 86400) + 2440588; + L = (seconds / 86400) + 68569 + 2440588; N = 4 * L / 146097; L = L - (146097 * N + 3) / 4; I = 4000 * (L + 1) / 1461001; @@ -138,6 +148,10 @@ static void jsonenc_duration(jsonenc *e, const upb_msg *msg, const upb_msgdef *m jsonenc_err(e, "bad duration"); } + if (nanos < 0) { + nanos = -nanos; + } + jsonenc_printf(e, "\"%" PRId64, seconds); jsonenc_nanos(e, nanos); jsonenc_putstr(e, "s\""); @@ -158,8 +172,8 @@ static void jsonenc_bytes(jsonenc *e, upb_strview str) { /* This is the regular base64, not the "web-safe" version. */ static const char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - const char *ptr = str.data; - const char *end = ptr + str.size; + const unsigned char *ptr = (unsigned char*)str.data; + const unsigned char *end = ptr + str.size; char buf[4]; jsonenc_putstr(e, "\""); @@ -212,10 +226,10 @@ static void jsonenc_stringbody(jsonenc *e, upb_strview str) { jsonenc_putstr(e, "\\\""); break; case '\f': - jsonenc_putstr(e, "\f'"); + jsonenc_putstr(e, "\\f"); break; case '\b': - jsonenc_putstr(e, "\b'"); + jsonenc_putstr(e, "\\b"); break; case '\\': jsonenc_putstr(e, "\\\\"); @@ -255,21 +269,22 @@ static void jsonenc_double(jsonenc *e, const char *fmt, double val) { static void jsonenc_wrapper(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { const upb_fielddef *val_f = upb_msgdef_itof(m, 1); - upb_msgval val = upb_msg_get(m, val_f); + upb_msgval val = upb_msg_get(msg, val_f); jsonenc_scalar(e, val, val_f); } -const upb_msgdef *jsonenc_getanymsg(jsonenc *e, upb_strview type_url) { +static const upb_msgdef *jsonenc_getanymsg(jsonenc *e, upb_strview type_url) { /* Find last '/', if any. */ const char *end = type_url.data + type_url.size; const char *ptr = end; + const upb_msgdef *ret; - if (!e->ext_pool || type_url.size == 0) return NULL; + if (!e->ext_pool || type_url.size == 0) goto badurl; while (true) { if (--ptr == type_url.data) { /* Type URL must contain at least one '/', with host before. */ - return NULL; + goto badurl; } if (*ptr == '/') { ptr++; @@ -277,19 +292,29 @@ const upb_msgdef *jsonenc_getanymsg(jsonenc *e, upb_strview type_url) { } } - return upb_symtab_lookupmsg2(e->ext_pool, ptr, end - ptr); + ret = upb_symtab_lookupmsg2(e->ext_pool, ptr, end - ptr); + + if (!ret) { + jsonenc_err(e, "Couldn't find Any type"); + } + + return ret; + +badurl: + jsonenc_err(e, "Bad type URL"); } static void jsonenc_any(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { const upb_fielddef *type_url_f = upb_msgdef_itof(m, 1); - const upb_fielddef *value_f = upb_msgdef_itof(m, 1); + const upb_fielddef *value_f = upb_msgdef_itof(m, 2); upb_strview type_url = upb_msg_get(msg, type_url_f).str_val; upb_strview value = upb_msg_get(msg, value_f).str_val; const upb_msgdef *any_m = jsonenc_getanymsg(e, type_url); const upb_msglayout *any_layout = upb_msgdef_layout(any_m); - upb_msg *any = upb_msg_new(any_m, e->arena); + upb_arena *arena = jsonenc_arena(e); + upb_msg *any = upb_msg_new(any_m, arena); - if (!upb_decode(value.data, value.size, any, any_layout, e->arena)) { + if (!upb_decode(value.data, value.size, any, any_layout, arena)) { jsonenc_err(e, "Error decoding message in Any"); } @@ -297,9 +322,9 @@ static void jsonenc_any(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { jsonenc_string(e, type_url); jsonenc_putstr(e, ", "); - if (upb_msgdef_wellknowntype(m) == UPB_WELLKNOWN_UNSPECIFIED) { + if (upb_msgdef_wellknowntype(any_m) == UPB_WELLKNOWN_UNSPECIFIED) { /* Regular messages: {"@type": "...", "foo": 1, "bar": 2} */ - jsonenc_msg(e, any, any_m); + jsonenc_msgfields(e, any, any_m); } else { /* Well-known type: {"@type": "...", "value": } */ jsonenc_putstr(e, "value: "); @@ -323,15 +348,17 @@ static void jsonenc_fieldpath(jsonenc *e, upb_strview path) { while (ptr < end) { char ch = *ptr; + if (ch >= 'A' && ch <= 'Z') { jsonenc_err(e, "Field mask element may not have upper-case letter."); } else if (ch == '_') { if (ptr == end - 1 || *(ptr + 1) < 'a' || *(ptr + 1) > 'z') { jsonenc_err(e, "Underscore must be followed by a lowercase letter."); } - } else { - jsonenc_putbytes(e, &ch, 1); + ch = *++ptr - 32; } + + jsonenc_putbytes(e, &ch, 1); ptr++; } } @@ -468,7 +495,7 @@ static void jsonenc_msgfield(jsonenc *e, const upb_msg *msg, jsonenc_listvalue(e, msg, m); break; case UPB_WELLKNOWN_STRUCT: - jsonenc_listvalue(e, msg, m); + jsonenc_struct(e, msg, m); break; } } @@ -532,6 +559,7 @@ static void jsonenc_mapkey(jsonenc *e, upb_msgval val, const upb_fielddef *f) { break; case UPB_TYPE_STRING: jsonenc_stringbody(e, val.str_val); + break; default: UPB_UNREACHABLE(); } @@ -575,15 +603,12 @@ static void jsonenc_map(jsonenc *e, const upb_map *map, const upb_fielddef *f) { static void jsonenc_fieldval(jsonenc *e, const upb_fielddef *f, upb_msgval val, bool *first) { - char buf[128]; const char *name; if (e->options & UPB_JSONENC_PROTONAMES) { name = upb_fielddef_name(f); } else { - /* TODO(haberman): we need a better JSON name API. */ - upb_fielddef_getjsonname(f, buf, sizeof(buf)); - name = buf; + name = upb_fielddef_jsonname(f); } jsonenc_putsep(e, ", ", first); @@ -598,13 +623,12 @@ static void jsonenc_fieldval(jsonenc *e, const upb_fielddef *f, } } -static void jsonenc_msg(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { +static void jsonenc_msgfields(jsonenc *e, const upb_msg *msg, + const upb_msgdef *m) { upb_msgval val; const upb_fielddef *f; bool first = true; - jsonenc_putstr(e, "{"); - if (e->options & UPB_JSONENC_EMITDEFAULTS) { /* Iterate over all fields. */ upb_msg_field_iter i; @@ -620,11 +644,15 @@ static void jsonenc_msg(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { jsonenc_fieldval(e, f, val, &first); } } +} +static void jsonenc_msg(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { + jsonenc_putstr(e, "{"); + jsonenc_msgfields(e, msg, m); jsonenc_putstr(e, "}"); } -size_t jsonenc_nullz(jsonenc *e, size_t size) { +static size_t jsonenc_nullz(jsonenc *e, size_t size) { size_t ret = e->ptr - e->buf + e->overflow; if (size > 0) { @@ -647,9 +675,11 @@ size_t upb_json_encode(const upb_msg *msg, const upb_msgdef *m, e.options = options; e.ext_pool = ext_pool; e.status = status; + e.arena = NULL; if (setjmp(e.err)) return -1; jsonenc_msg(&e, msg, m); + if (e.arena) upb_arena_free(e.arena); return jsonenc_nullz(&e, size); } diff --git a/upb/msg.c b/upb/msg.c index 6c6d3008aa4..8df9d7a1f76 100644 --- a/upb/msg.c +++ b/upb/msg.c @@ -9,7 +9,7 @@ /** upb_msg *******************************************************************/ -static char _upb_fieldtype_to_sizelg2[12] = { +static const char _upb_fieldtype_to_sizelg2[12] = { 0, 0, /* UPB_TYPE_BOOL */ 2, /* UPB_TYPE_FLOAT */ diff --git a/upb/reflection.c b/upb/reflection.c index 89a801266f8..d032eccee40 100644 --- a/upb/reflection.c +++ b/upb/reflection.c @@ -90,6 +90,18 @@ bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f) { } } +bool upb_msg_hasoneof(const upb_msg *msg, const upb_oneofdef *o) { + upb_oneof_iter i; + const upb_fielddef *f; + const upb_msglayout_field *field; + + upb_oneof_begin(&i, o); + if (upb_oneof_done(&i)) return false; + f = upb_oneof_iter_field(&i); + field = upb_fielddef_layout(f); + return *oneofcase(msg, field) != 0; +} + upb_msgval upb_msg_get(const upb_msg *msg, const upb_fielddef *f) { if (!upb_fielddef_haspresence(f) || upb_msg_has(msg, f)) { return _upb_msg_getraw(msg, f); @@ -136,8 +148,11 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, const upb_msglayout_field *field = upb_fielddef_layout(f); upb_mutmsgval ret; char *mem = PTR_AT(msg, field->offset, char); + bool wrong_oneof = in_oneof(field) && *oneofcase(msg, field) != field->number; + memcpy(&ret, mem, sizeof(void*)); - if (a && !ret.msg) { + + if (a && (!ret.msg || wrong_oneof)) { if (upb_fielddef_ismap(f)) { const upb_msgdef *entry = upb_fielddef_msgsubdef(f); const upb_fielddef *key = upb_msgdef_itof(entry, UPB_MAPENTRY_KEY); @@ -149,7 +164,12 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, UPB_ASSERT(upb_fielddef_issubmsg(f)); ret.msg = upb_msg_new(upb_fielddef_msgsubdef(f), a); } + memcpy(mem, &ret, sizeof(void*)); + + if (wrong_oneof) { + *oneofcase(msg, field) = field->number; + } } return ret; } diff --git a/upb/reflection.h b/upb/reflection.h index 95156b7d76b..c55fe4a2e61 100644 --- a/upb/reflection.h +++ b/upb/reflection.h @@ -44,6 +44,9 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, upb_arena *a) /* May only be called for fields where upb_fielddef_haspresence(f) == true. */ bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f); +/* Returns whether any field is set in the oneof. */ +bool upb_msg_hasoneof(const upb_msg *msg, const upb_oneofdef *o); + /* Sets the given field to the given value. For a msg/array/map/string, the * value must be in the same arena. */ void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, diff --git a/upb/text_encode.c b/upb/text_encode.c index cb76f76253b..d426e67ea27 100644 --- a/upb/text_encode.c +++ b/upb/text_encode.c @@ -260,7 +260,7 @@ static const char *txtenc_unknown(txtenc *e, const char *ptr, const char *end, uint32_t tag; CHK(ptr = txtenc_parsevarint(ptr, end, &tag_64)); CHK(tag_64 < UINT32_MAX); - tag = tag_64; + tag = (uint32_t)tag_64; if ((tag & 7) == UPB_WIRE_TYPE_END_GROUP) { CHK((tag >> 3) == groupnum); From 184b1f974b6350c966a949e4e1b5a6035f299ff5 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 12 Mar 2020 09:14:07 -0700 Subject: [PATCH 025/239] update bazel build dep for upb --- bazel/grpc_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 615b2988677..4bdf636aa33 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -235,9 +235,9 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "60509df0f77ba6e28842316e3db89699f31ac96f0cd8bf35db36e319153e383e", - strip_prefix = "upb-97bcd5276cf4597f52fe5f5b3baad8dc2cad7878", - url = "https://github.com/protocolbuffers/upb/archive/97bcd5276cf4597f52fe5f5b3baad8dc2cad7878.tar.gz", + sha256 = "f5b4ab137bb02dee66e456d88677fdda8e35f72ac50af19f519f5e2ba3ea0114", + strip_prefix = "upb-4e2505edaa325bcf0ffd69eefa7cb810d6dde861", + url = "https://github.com/protocolbuffers/upb/archive/4e2505edaa325bcf0ffd69eefa7cb810d6dde861.tar.gz", ) if "envoy_api" not in native.existing_rules(): From d7311d7d12ae631e483a3197f8eb13f0aff10468 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 25 Mar 2020 09:46:22 -0700 Subject: [PATCH 026/239] update new code to use new upb map API --- src/core/ext/filters/client_channel/xds/xds_api.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc index f391f4703a9..2237749e408 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -330,18 +330,18 @@ void AddNodeLogFields(const envoy_api_v2_core_Node* node, envoy_api_v2_core_Node_metadata(node); if (metadata != nullptr) { fields->emplace_back(" metadata {"); - size_t num_entries; - const google_protobuf_Struct_FieldsEntry* const* entries = - google_protobuf_Struct_fields(metadata, &num_entries); - for (size_t i = 0; i < num_entries; ++i) { + size_t entry_idx = UPB_MAP_BEGIN; + while (true) { + const google_protobuf_Struct_FieldsEntry* entry = + google_protobuf_Struct_fields_next(metadata, &entry_idx); + if (entry == nullptr) break; fields->emplace_back(" field {"); // key - AddStringField(" key", - google_protobuf_Struct_FieldsEntry_key(entries[i]), + AddStringField(" key", google_protobuf_Struct_FieldsEntry_key(entry), fields); // value const google_protobuf_Value* value = - google_protobuf_Struct_FieldsEntry_value(entries[i]); + google_protobuf_Struct_FieldsEntry_value(entry); if (value != nullptr) { std::string value_str; if (google_protobuf_Value_has_string_value(value)) { From bdb3f860649bb4c136ba36bad3d9363fccbd29fa Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 1 Apr 2020 09:16:02 +0900 Subject: [PATCH 027/239] Fix wrong version in gRPCConfigVersion.cmake and grpc++*.pc They use PACKAGE_VERSION to generate version information but PACKAGE_VERSION may be overridden by find_package(). For example, -DgRPC_CARES_PROVIDER=package with c-ares 1.16.0 overrides PACKAGE_VERSION to 1.16.0. Because c-ares-config-version.cmake has the following line: set(PACKAGE_VERSION "1.16.0") Setting PACKAGE_VERSION in version.cmake is a common CMake convention: https://cmake.org/cmake/help/latest/command/find_package.html#version-selection > PACKAGE_VERSION > > full provided version string So we should use gRPC_CPP_VERSION not PACKAGE_VERSION to generate gRPCConfigVersion.cmake and grpc++*.pc. --- CMakeLists.txt | 6 +++--- templates/CMakeLists.txt.template | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a52205e480..9593412ce16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15161,7 +15161,7 @@ include(CMakePackageConfigHelpers) configure_file(cmake/gRPCConfig.cmake.in gRPCConfig.cmake @ONLY) write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/gRPCConfigVersion.cmake - VERSION ${PACKAGE_VERSION} + VERSION ${gRPC_CPP_VERSION} COMPATIBILITY AnyNewerVersion) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gRPCConfig.cmake @@ -15228,7 +15228,7 @@ generate_pkgconfig( generate_pkgconfig( "gRPC++" "C++ wrapper for gRPC" - "${PACKAGE_VERSION}" + "${gRPC_CPP_VERSION}" "grpc" "-lgrpc++ -labsl_bad_optional_access -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" "" @@ -15238,7 +15238,7 @@ generate_pkgconfig( generate_pkgconfig( "gRPC++ unsecure" "C++ wrapper for gRPC without SSL" - "${PACKAGE_VERSION}" + "${gRPC_CPP_VERSION}" "grpc_unsecure" "-lgrpc++_unsecure -labsl_bad_optional_access -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" "" diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index e6fc6c034ab..40d265ec866 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -673,7 +673,7 @@ configure_file(cmake/gRPCConfig.cmake.in gRPCConfig.cmake @ONLY) write_basic_package_version_file(<%text>${CMAKE_CURRENT_BINARY_DIR}/gRPCConfigVersion.cmake - VERSION <%text>${PACKAGE_VERSION} + VERSION <%text>${gRPC_CPP_VERSION} COMPATIBILITY AnyNewerVersion) install(FILES <%text>${CMAKE_CURRENT_BINARY_DIR}/gRPCConfig.cmake @@ -740,7 +740,7 @@ generate_pkgconfig( "gRPC++" "C++ wrapper for gRPC" - "<%text>${PACKAGE_VERSION}" + "<%text>${gRPC_CPP_VERSION}" "grpc" "${" ".join(("-l" + l) for l in ["grpc++",] + list_absl_lib_files_for("grpc++"))}" "" @@ -750,7 +750,7 @@ generate_pkgconfig( "gRPC++ unsecure" "C++ wrapper for gRPC without SSL" - "<%text>${PACKAGE_VERSION}" + "<%text>${gRPC_CPP_VERSION}" "grpc_unsecure" "${" ".join(("-l" + l) for l in ["grpc++_unsecure",] + list_absl_lib_files_for("grpc++_unsecure"))}" "" From 99367a7f98c7117eb0d874235be57a6464036ec0 Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Tue, 28 Apr 2020 18:19:15 -0700 Subject: [PATCH 028/239] Fix plugin initializers Previous code not threadsafe nor idiomatic --- src/cpp/ext/proto_server_reflection_plugin.cc | 9 +++++---- src/cpp/server/channelz/channelz_service_plugin.cc | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc index 306e96a4464..a82136618f3 100644 --- a/src/cpp/ext/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -64,10 +64,11 @@ static std::unique_ptr< ::grpc::ServerBuilderPlugin> CreateProtoReflection() { } void InitProtoReflectionServerBuilderPlugin() { - static bool already_here = false; - if (already_here) return; - already_here = true; - ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); + static struct Initialize { + Initialize() { + ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); + } + } initializer; } // Force InitProtoReflectionServerBuilderPlugin() to be called at static diff --git a/src/cpp/server/channelz/channelz_service_plugin.cc b/src/cpp/server/channelz/channelz_service_plugin.cc index 5892b9b8eed..8862cb9fb55 100644 --- a/src/cpp/server/channelz/channelz_service_plugin.cc +++ b/src/cpp/server/channelz/channelz_service_plugin.cc @@ -76,11 +76,12 @@ namespace channelz { namespace experimental { void InitChannelzService() { - static bool already_here = false; - if (already_here) return; - already_here = true; - ::grpc::ServerBuilder::InternalAddPluginFactory( - &grpc::channelz::experimental::CreateChannelzServicePlugin); + static struct Initializer { + Initializer() { + ::grpc::ServerBuilder::InternalAddPluginFactory( + &grpc::channelz::experimental::CreateChannelzServicePlugin); + } + } initialize; } } // namespace experimental From d9e3a49fe1abfec70d8a3251f6a492db7e45f4ba Mon Sep 17 00:00:00 2001 From: Mehrdad Afshari Date: Tue, 28 Apr 2020 20:18:01 -0700 Subject: [PATCH 029/239] Fix server_builder_plugin_test --- test/cpp/end2end/server_builder_plugin_test.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index 5f3c5cefd89..fe8db566c8f 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -121,17 +121,12 @@ std::unique_ptr CreateTestServerBuilderPlugin() { return std::unique_ptr(new TestServerBuilderPlugin()); } -void AddTestServerBuilderPlugin() { - static bool already_here = false; - if (already_here) return; - already_here = true; - ::grpc::ServerBuilder::InternalAddPluginFactory( - &CreateTestServerBuilderPlugin); -} - // Force AddServerBuilderPlugin() to be called at static initialization time. struct StaticTestPluginInitializer { - StaticTestPluginInitializer() { AddTestServerBuilderPlugin(); } + StaticTestPluginInitializer() { + ::grpc::ServerBuilder::InternalAddPluginFactory( + &CreateTestServerBuilderPlugin); + } } static_plugin_initializer_test_; // When the param boolean is true, the ServerBuilder plugin will be added at the From 5ea40b7d6cceea3f3d16773592d552f307da6548 Mon Sep 17 00:00:00 2001 From: Tal Kedar Date: Wed, 20 May 2020 12:05:09 -0400 Subject: [PATCH 030/239] Move implementation of ~grpc_server_security_connector() = default to .cc file When the implementation is in the header file, there's an "incomplete type" error caused by grpc_server_credentials. Compiling with clang version 11.0.0 (https://github.com/llvm/llvm-project.git 8697d443ab24d1652d09393efca768cdf4c22b39), Target: x86_64-apple-darwin19.4.0 through cmake's add_subdirectory( lib/grpc ) in a parent project [...] Building CXX object lib/grpc/CMakeFiles/grpc.dir/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc.o FAILED: lib/grpc/CMakeFiles/grpc.dir/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc.o /usr/local/opt/llvm/latest/bin/clang++ -DCARES_STATICLIB -D__CLANG_SUPPORT_DYN_ANNOTATION__ -I../../lib/grpc/third_party/zlib -I../../lib/grpc/include -I../../lib/grpc -I../../lib/grpc/third_party/address_sorting/include -I../../lib/grpc/third_party/boringssl-with-bazel/src/include -I../../lib/grpc/src/core/ext/upb-generated -I../../lib/grpc/third_party/upb -Ilib/grpc/third_party/zlib -Ilib/grpc/third_party/cares/cares -I../../lib/grpc/third_party/cares/cares -I../../lib/grpc/third_party/abseil-cpp -stdlib=libc++ -nostdinc++ -ibuiltininc -I /usr/local/opt/llvm/latest/include/c++/v1 -fcxx-exceptions -fassociative-math -freciprocal-math -march=native -mtune=native -fforce-emit-vtables -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.15 -fPIC -std=c++2a -MD -MT lib/grpc/CMakeFiles/grpc.dir/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc.o -MF lib/grpc/CMakeFiles/grpc.dir/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc.o.d -o lib/grpc/CMakeFiles/grpc.dir/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc.o -c ../../lib/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc In file included from ../../lib/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc:21: In file included from ../../lib/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h:28: In file included from ../../lib/grpc/src/core/lib/gprpp/ref_counted.h:36: ../../lib/grpc/src/core/lib/gprpp/ref_counted_ptr.h:103:34: error: member access into incomplete type 'grpc_server_credentials' if (value_ != nullptr) value_->Unref(); ^ ../../lib/grpc/src/core/lib/security/security_connector/security_connector.h:154:3: note: in instantiation of member function 'grpc_core::RefCountedPtr::~RefCountedPtr' requested here ~grpc_server_security_connector() override = default; ^ ../../lib/grpc/include/grpc/grpc_security.h:465:16: note: forward declaration of 'grpc_server_credentials' typedef struct grpc_server_credentials grpc_server_credentials; --- src/core/lib/security/security_connector/security_connector.cc | 2 ++ src/core/lib/security/security_connector/security_connector.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/lib/security/security_connector/security_connector.cc b/src/core/lib/security/security_connector/security_connector.cc index 3d9b077b633..0400ad6fb8d 100644 --- a/src/core/lib/security/security_connector/security_connector.cc +++ b/src/core/lib/security/security_connector/security_connector.cc @@ -46,6 +46,8 @@ grpc_server_security_connector::grpc_server_security_connector( : grpc_security_connector(url_scheme), server_creds_(std::move(server_creds)) {} +grpc_server_security_connector::~grpc_server_security_connector() = default; + grpc_channel_security_connector::grpc_channel_security_connector( const char* url_scheme, grpc_core::RefCountedPtr channel_creds, diff --git a/src/core/lib/security/security_connector/security_connector.h b/src/core/lib/security/security_connector/security_connector.h index 0f1ac64a44f..2ddd9db7a3c 100644 --- a/src/core/lib/security/security_connector/security_connector.h +++ b/src/core/lib/security/security_connector/security_connector.h @@ -151,7 +151,7 @@ class grpc_server_security_connector : public grpc_security_connector { grpc_server_security_connector( const char* url_scheme, grpc_core::RefCountedPtr server_creds); - ~grpc_server_security_connector() override = default; + ~grpc_server_security_connector() override; virtual void add_handshakers(const grpc_channel_args* args, grpc_pollset_set* interested_parties, From 8e25c7c539676a06ad8406c1ccb8f48e022f3eb2 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 2 Jun 2020 14:33:19 -0700 Subject: [PATCH 031/239] Squashed 'third_party/upb/' changes from 4e2505edaa..543a0ce8f2 543a0ce8f2 Fixes for PHP. (#286) 93e2a40881 MSVC 2019 Fixes (#285) a1c2caeb25 More arena tests. (#279) 16facab490 Created an amalgamation without handlers, and fixed some bugs. (#283) 22182e6e54 Simplified epoch day algorithm. (#282) 55f5bcd62c Add upb_symtab_lookupfile2 (#281) c26e8db53d Ignore Unknown Enum Value (#280) 6c4acba610 Implemented upb_arena_fuse() (#278) 2b1e7dc1cc Arena refactor: moves cleanup list into regular blocks (#277) a0ae30bd16 Remove bytes allocated measurement functions. (#276) 025cc2ec3d New arena benchmarks that actually hit the heap. (#275) cef720e9b0 Parser bugfix and updated generated file. (#273) 262bcbcada Updated generated files. (#274) 0842f88211 Support for proto3 optional. (#270) d638d74d1b Add load statements for @rules_proto (#271) 2559e78aa3 Separated C++ wrappers into separate files in a backward-compatible way. (#265) 9bd23dab42 Changed upb status to suit GCC10's warning about strncpy(). (#268) 38a1045975 Added a has_foo() generated method for proto3 submessage fields. (#266) ef25ea5281 Added Kokoro verification of the ASAN build. (#220) 378cbbc3cc Updated to new protobuf version, and added support for packed=false. (#264) 08b6d2d6fd Rewrite of the decoder (#263) git-subtree-dir: third_party/upb git-subtree-split: 543a0ce8f21709fe7e65ac5a53cc4136d7b4216c --- BUILD | 80 +- CMakeLists.txt | 10 +- bazel/build_defs.bzl | 5 +- bazel/upb_proto_library.bzl | 1 + bazel/workspace_deps.bzl | 17 +- benchmark.py | 32 + examples/bazel/BUILD | 2 +- .../google/protobuf/descriptor.upb.c | 23 +- .../google/protobuf/descriptor.upb.h | 409 ++++---- generated_for_cmake/upb/json/parser.c | 175 ++-- kokoro/ubuntu/build.sh | 6 + tests/benchmark.cc | 34 +- tests/bindings/lua/test_upb.lua | 30 + tests/conformance_upb.c | 6 +- tests/file_descriptor_parsenew_fuzzer.cc | 2 +- tests/json/test_json.cc | 101 +- tests/pb/test_encoder.cc | 9 +- tests/test_cpp.cc | 26 + tests/test_generated_code.c | 38 + tools/amalgamate.py | 37 +- tools/make_cmakelists.py | 4 +- upb/bindings/lua/msg.c | 99 +- upb/decode.c | 947 ++++++++---------- upb/def.c | 122 ++- upb/def.h | 603 +---------- upb/def.hpp | 525 ++++++++++ upb/encode.c | 73 +- upb/handlers.h | 1 + upb/json/parser.rl | 37 +- upb/json/printer.c | 7 - upb/json_decode.c | 69 +- upb/json_encode.c | 50 +- upb/msg.c | 64 +- upb/msg.h | 54 +- upb/pb/decoder.c | 6 - upb/pb/encoder.c | 6 - upb/port_def.inc | 23 +- upb/port_undef.inc | 6 +- upb/reflection.c | 117 ++- upb/reflection.h | 16 +- upb/table.c | 2 +- upb/upb.c | 261 ++--- upb/upb.h | 198 ++-- upb/upb.hpp | 86 ++ upbc/generator.cc | 98 +- 45 files changed, 2445 insertions(+), 2072 deletions(-) create mode 100755 benchmark.py create mode 100644 upb/def.hpp create mode 100644 upb/upb.hpp diff --git a/BUILD b/BUILD index cddda82d18c..202154c9d05 100644 --- a/BUILD +++ b/BUILD @@ -1,3 +1,7 @@ +load( + "@rules_proto//proto:defs.bzl", + "proto_library", +) load( "//bazel:build_defs.bzl", "generated_file_staleness_test", @@ -81,6 +85,7 @@ cc_library( "upb/decode.h", "upb/encode.h", "upb/upb.h", + "upb/upb.hpp", ], copts = select({ ":windows": [], @@ -115,7 +120,13 @@ cc_library( ) upb_proto_library( - name = "descriptor_upbproto", + name = "descriptor_upb_proto", + visibility = ["//visibility:public"], + deps = ["@com_google_protobuf//:descriptor_proto"], +) + +upb_proto_reflection_library( + name = "descriptor_upb_proto_reflection", visibility = ["//visibility:public"], deps = ["@com_google_protobuf//:descriptor_proto"], ) @@ -129,6 +140,7 @@ cc_library( ], hdrs = [ "upb/def.h", + "upb/def.hpp", "upb/reflection.h", ], copts = select({ @@ -137,7 +149,7 @@ cc_library( }), visibility = ["//visibility:public"], deps = [ - ":descriptor_upbproto", + ":descriptor_upb_proto", ":port", ":table", ":upb", @@ -233,7 +245,7 @@ cc_library( "//conditions:default": COPTS, }), deps = [ - ":descriptor_upbproto", + ":descriptor_upb_proto", ":handlers", ":port", ":reflection", @@ -270,7 +282,7 @@ cc_library( "upb/bindings/stdc++/string.h", ], deps = [ - ":descriptor_upbproto", + ":descriptor_upb_proto", ":handlers", ":port", ":upb", @@ -329,7 +341,7 @@ cc_binary( testonly = 1, srcs = ["tests/benchmark.cc"], deps = [ - ":descriptor_upbproto", + ":descriptor_upb_proto", ":descriptor_upbreflection", "@com_github_google_benchmark//:benchmark_main", ], @@ -381,7 +393,7 @@ proto_library( ) upb_proto_library( - name = "test_upbproto", + name = "test_upb_proto", testonly = 1, deps = [":test_proto"], ) @@ -392,7 +404,7 @@ cc_test( deps = [ ":test_messages_proto3_proto_upb", ":empty_upbdefs_proto", - ":test_upbproto", + ":test_upb_proto", ":upb_test", ], ) @@ -422,7 +434,7 @@ proto_library( ) upb_proto_reflection_library( - name = "test_decoder_upbproto", + name = "test_decoder_upb_proto", deps = [":test_decoder_proto"], ) @@ -439,7 +451,7 @@ cc_test( deps = [ ":handlers", ":port", - ":test_decoder_upbproto", + ":test_decoder_upb_proto", ":upb", ":upb_pb", ":upb_test", @@ -454,7 +466,7 @@ proto_library( ) upb_proto_reflection_library( - name = "test_cpp_upbproto", + name = "test_cpp_upb_proto", deps = ["test_cpp_proto"], ) @@ -469,7 +481,7 @@ cc_test( ":handlers", ":port", ":reflection", - ":test_cpp_upbproto", + ":test_cpp_upb_proto", ":upb", ":upb_pb", ":upb_test", @@ -508,7 +520,7 @@ cc_binary( ":fuzz": ["HAVE_FUZZER"], }), deps = [ - ":descriptor_upbproto", + ":descriptor_upb_proto", ":upb", ], ) @@ -522,7 +534,7 @@ cc_test( "//conditions:default": CPPOPTS, }), deps = [ - ":descriptor_upbproto", + ":descriptor_upb_proto", ":descriptor_upbreflection", ":upb", ":upb_cc_bindings", @@ -543,17 +555,17 @@ proto_library( ) upb_proto_reflection_library( - name = "test_json_upbprotoreflection", + name = "test_json_upb_proto_reflection", deps = ["test_json_proto"], ) upb_proto_library( - name = "test_json_enum_from_separate_upbproto", + name = "test_json_enum_from_separate_upb_proto", deps = [":test_json_enum_from_separate"], ) upb_proto_library( - name = "test_json_upbproto", + name = "test_json_upb_proto", deps = [":test_json_proto"], ) @@ -567,8 +579,8 @@ cc_test( "//conditions:default": CPPOPTS, }), deps = [ - ":test_json_upbproto", - ":test_json_upbprotoreflection", + ":test_json_upb_proto", + ":test_json_upb_proto_reflection", ":upb_json", ":upb_test", ], @@ -656,7 +668,7 @@ upb_amalgamation( amalgamator = ":amalgamate", libs = [ ":upb", - ":descriptor_upbproto", + ":descriptor_upb_proto", ":reflection", ":handlers", ":port", @@ -675,6 +687,34 @@ cc_library( }), ) +upb_amalgamation( + name = "gen_php_amalgamation", + prefix = "php-", + outs = [ + "php-upb.c", + "php-upb.h", + ], + amalgamator = ":amalgamate", + libs = [ + ":upb", + ":descriptor_upb_proto", + ":descriptor_upb_proto_reflection", + ":reflection", + ":port", + ":json", + ], +) + +cc_library( + name = "php_amalgamation", + srcs = ["php-upb.c"], + hdrs = ["php-upb.h"], + copts = select({ + ":windows": [], + "//conditions:default": COPTS, + }), +) + # Lua ########################################################################## cc_library( @@ -818,7 +858,7 @@ genrule( genrule( name = "copy_protos", - srcs = [":descriptor_upbproto"], + srcs = [":descriptor_upb_proto"], outs = [ "generated-in/generated_for_cmake/google/protobuf/descriptor.upb.c", "generated-in/generated_for_cmake/google/protobuf/descriptor.upb.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f6004543fe..4dd64543213 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,8 @@ add_library(upb upb/upb.c upb/decode.h upb/encode.h - upb/upb.h) + upb/upb.h + upb/upb.hpp) target_link_libraries(upb port) add_library(generated_code_support__only_for_generated_code_do_not_use__i_give_permission_to_break_me INTERFACE) @@ -84,9 +85,10 @@ add_library(reflection upb/msg.h upb/reflection.c upb/def.h + upb/def.hpp upb/reflection.h) target_link_libraries(reflection - descriptor_upbproto + descriptor_upb_proto port table upb) @@ -132,7 +134,7 @@ add_library(upb_pb upb/pb/encoder.h upb/pb/textprinter.h) target_link_libraries(upb_pb - descriptor_upbproto + descriptor_upb_proto handlers port reflection @@ -148,7 +150,7 @@ target_link_libraries(upb_json upb_pb) add_library(upb_cc_bindings INTERFACE) target_link_libraries(upb_cc_bindings INTERFACE - descriptor_upbproto + descriptor_upb_proto handlers port upb) diff --git a/bazel/build_defs.bzl b/bazel/build_defs.bzl index 7544e125175..c51aded057d 100644 --- a/bazel/build_defs.bzl +++ b/bazel/build_defs.bzl @@ -135,7 +135,7 @@ def _upb_amalgamation(ctx): ctx.actions.run( inputs = inputs, outputs = ctx.outputs.outs, - arguments = [ctx.bin_dir.path + "/"] + [f.path for f in srcs] + ["-I" + root for root in _get_real_roots(inputs)], + arguments = [ctx.bin_dir.path + "/", ctx.attr.prefix] + [f.path for f in srcs] + ["-I" + root for root in _get_real_roots(inputs)], progress_message = "Making amalgamation", executable = ctx.executable.amalgamator, ) @@ -147,6 +147,9 @@ upb_amalgamation = rule( executable = True, cfg = "host", ), + "prefix": attr.string( + default = "", + ), "libs": attr.label_list(aspects = [_file_list_aspect]), "outs": attr.output_list(), }, diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index 596b9c4c41a..3499ea94860 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -5,6 +5,7 @@ load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") +load("@rules_proto//proto:defs.bzl", "ProtoInfo") # Generic support code ######################################################### diff --git a/bazel/workspace_deps.bzl b/bazel/workspace_deps.bzl index 2a7f88f495f..5e3e8a69005 100644 --- a/bazel/workspace_deps.bzl +++ b/bazel/workspace_deps.bzl @@ -7,16 +7,27 @@ def upb_deps(): maybe( git_repository, name = "com_google_absl", - commit = "070f6e47b33a2909d039e620c873204f78809492", + commit = "df3ea785d8c30a9503321a3d35ee7d35808f190d", # LTS 2020-02-25 remote = "https://github.com/abseil/abseil-cpp.git", - shallow_since = "1541627663 -0500", + shallow_since = "1583355457 -0500" ) maybe( git_repository, name = "com_google_protobuf", remote = "https://github.com/protocolbuffers/protobuf.git", - commit = "d41002663fd04325ead28439dfd5ce2822b0d6fb", + commit = "62832897c3cf14c93b91c412f7e64086cd272cb7", # Need to use Git until proto3 optional is released + ) + + maybe( + http_archive, + name = "rules_python", + sha256 = "e5470e92a18aa51830db99a4d9c492cc613761d5bdb7131c04bd92b9834380f6", + strip_prefix = "rules_python-4b84ad270387a7c439ebdccfd530e2339601ef27", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz", + "https://github.com/bazelbuild/rules_python/archive/4b84ad270387a7c439ebdccfd530e2339601ef27.tar.gz", + ], ) maybe( diff --git a/benchmark.py b/benchmark.py new file mode 100755 index 00000000000..9c596743bf3 --- /dev/null +++ b/benchmark.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python3 + +import json +import subprocess +import re + +def Run(cmd): + subprocess.check_call(cmd, shell=True) + +def RunAgainstBranch(branch, outfile, runs=12): + tmpfile = "/tmp/bench-output.json" + Run("rm -rf {}".format(tmpfile)) + Run("git checkout {}".format(branch)) + Run("bazel build -c opt :benchmark") + + Run("./bazel-bin/benchmark --benchmark_out_format=json --benchmark_out={} --benchmark_repetitions={}".format(tmpfile, runs)) + + with open(tmpfile) as f: + bench_json = json.load(f) + + with open(outfile, "w") as f: + for run in bench_json["benchmarks"]: + name = re.sub(r'^BM_', 'Benchmark', run["name"]) + if name.endswith("_mean") or name.endswith("_median") or name.endswith("_stddev"): + continue + values = (name, run["iterations"], run["cpu_time"]) + print("{} {} {} ns/op".format(*values), file=f) + +RunAgainstBranch("master", "/tmp/old.txt") +RunAgainstBranch("decoder", "/tmp/new.txt") + +Run("~/go/bin/benchstat /tmp/old.txt /tmp/new.txt") diff --git a/examples/bazel/BUILD b/examples/bazel/BUILD index 94bcfe64d4f..9fb5c1f4a64 100644 --- a/examples/bazel/BUILD +++ b/examples/bazel/BUILD @@ -1,4 +1,4 @@ - +load("@rules_proto//proto:defs.bzl", "proto_library") load("@upb//bazel:upb_proto_library.bzl", "upb_proto_library") proto_library( diff --git a/generated_for_cmake/google/protobuf/descriptor.upb.c b/generated_for_cmake/google/protobuf/descriptor.upb.c index 61b9299bb43..3c7363922e9 100644 --- a/generated_for_cmake/google/protobuf/descriptor.upb.c +++ b/generated_for_cmake/google/protobuf/descriptor.upb.c @@ -130,23 +130,24 @@ static const upb_msglayout *const google_protobuf_FieldDescriptorProto_submsgs[1 &google_protobuf_FieldOptions_msginit, }; -static const upb_msglayout_field google_protobuf_FieldDescriptorProto__fields[10] = { - {1, UPB_SIZE(32, 32), 5, 0, 9, 1}, - {2, UPB_SIZE(40, 48), 6, 0, 9, 1}, +static const upb_msglayout_field google_protobuf_FieldDescriptorProto__fields[11] = { + {1, UPB_SIZE(36, 40), 6, 0, 9, 1}, + {2, UPB_SIZE(44, 56), 7, 0, 9, 1}, {3, UPB_SIZE(24, 24), 3, 0, 5, 1}, {4, UPB_SIZE(8, 8), 1, 0, 14, 1}, {5, UPB_SIZE(16, 16), 2, 0, 14, 1}, - {6, UPB_SIZE(48, 64), 7, 0, 9, 1}, - {7, UPB_SIZE(56, 80), 8, 0, 9, 1}, - {8, UPB_SIZE(72, 112), 10, 0, 11, 1}, + {6, UPB_SIZE(52, 72), 8, 0, 9, 1}, + {7, UPB_SIZE(60, 88), 9, 0, 9, 1}, + {8, UPB_SIZE(76, 120), 11, 0, 11, 1}, {9, UPB_SIZE(28, 28), 4, 0, 5, 1}, - {10, UPB_SIZE(64, 96), 9, 0, 9, 1}, + {10, UPB_SIZE(68, 104), 10, 0, 9, 1}, + {17, UPB_SIZE(32, 32), 5, 0, 8, 1}, }; const upb_msglayout google_protobuf_FieldDescriptorProto_msginit = { &google_protobuf_FieldDescriptorProto_submsgs[0], &google_protobuf_FieldDescriptorProto__fields[0], - UPB_SIZE(80, 128), 10, false, + UPB_SIZE(80, 128), 11, false, }; static const upb_msglayout *const google_protobuf_OneofDescriptorProto_submsgs[1] = { @@ -441,8 +442,8 @@ const upb_msglayout google_protobuf_SourceCodeInfo_msginit = { }; static const upb_msglayout_field google_protobuf_SourceCodeInfo_Location__fields[5] = { - {1, UPB_SIZE(20, 40), 0, 0, 5, 3}, - {2, UPB_SIZE(24, 48), 0, 0, 5, 3}, + {1, UPB_SIZE(20, 40), 0, 0, 5, _UPB_LABEL_PACKED}, + {2, UPB_SIZE(24, 48), 0, 0, 5, _UPB_LABEL_PACKED}, {3, UPB_SIZE(4, 8), 1, 0, 9, 1}, {4, UPB_SIZE(12, 24), 2, 0, 9, 1}, {6, UPB_SIZE(28, 56), 0, 0, 9, 3}, @@ -469,7 +470,7 @@ const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit = { }; static const upb_msglayout_field google_protobuf_GeneratedCodeInfo_Annotation__fields[4] = { - {1, UPB_SIZE(20, 32), 0, 0, 5, 3}, + {1, UPB_SIZE(20, 32), 0, 0, 5, _UPB_LABEL_PACKED}, {2, UPB_SIZE(12, 16), 3, 0, 9, 1}, {3, UPB_SIZE(4, 4), 1, 0, 5, 1}, {4, UPB_SIZE(8, 8), 2, 0, 5, 1}, diff --git a/generated_for_cmake/google/protobuf/descriptor.upb.h b/generated_for_cmake/google/protobuf/descriptor.upb.h index 5baad088109..5316dd30516 100644 --- a/generated_for_cmake/google/protobuf/descriptor.upb.h +++ b/generated_for_cmake/google/protobuf/descriptor.upb.h @@ -167,6 +167,7 @@ UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protob return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len); } +UPB_INLINE bool google_protobuf_FileDescriptorSet_has_file(const google_protobuf_FileDescriptorSet *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg, size_t *len) { return (const google_protobuf_FileDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet *msg, size_t *len) { @@ -198,30 +199,34 @@ UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_prot } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE upb_strview const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); } UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_FileOptions*, UPB_SIZE(28, 56)); } +UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_FileOptions*); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_SourceCodeInfo*, UPB_SIZE(32, 64)); } +UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_protobuf_SourceCodeInfo*); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(56, 112), len); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(60, 120), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); } +UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value; } UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); @@ -287,7 +292,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDesc } UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, google_protobuf_FileOptions*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_FileOptions*) = value; } UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); @@ -300,7 +305,7 @@ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorPro } UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, google_protobuf_SourceCodeInfo*, UPB_SIZE(32, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_protobuf_SourceCodeInfo*) = value; } UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); @@ -333,7 +338,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value; } /* google.protobuf.DescriptorProto */ @@ -351,21 +356,28 @@ UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf } UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_MessageOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_MessageOptions*); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE upb_strview const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto *msg, size_t *len) { return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); @@ -434,7 +446,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript } UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, google_protobuf_MessageOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_MessageOptions*) = value; } UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto *msg, upb_arena *arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); @@ -497,23 +509,23 @@ UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, const google_protobuf_ExtensionRangeOptions*, UPB_SIZE(12, 16)); } +UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const google_protobuf_ExtensionRangeOptions*); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, google_protobuf_ExtensionRangeOptions*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), google_protobuf_ExtensionRangeOptions*) = value; } UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); @@ -540,17 +552,17 @@ UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const g } UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } /* google.protobuf.ExtensionRangeOptions */ @@ -567,6 +579,7 @@ UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_pr return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len); } +UPB_INLINE bool google_protobuf_ExtensionRangeOptions_has_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t *len) { @@ -597,58 +610,60 @@ UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_pro return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)); } +UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int32_t); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 10); } -UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_FieldOptions*, UPB_SIZE(72, 112)); } +UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), upb_strview); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 11); } +UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const google_protobuf_FieldOptions*); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 9); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)); } +UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), int32_t); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 10); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), upb_strview); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool); } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value; + _upb_sethas(msg, 6); + *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value; + _upb_sethas(msg, 7); + *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 7); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value; + _upb_sethas(msg, 8); + *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 8); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)) = value; + _upb_sethas(msg, 9); + *UPB_PTR_AT(msg, UPB_SIZE(60, 88), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { - _upb_sethas(msg, 10); - UPB_FIELD_AT(msg, google_protobuf_FieldOptions*, UPB_SIZE(72, 112)) = value; + _upb_sethas(msg, 11); + *UPB_PTR_AT(msg, UPB_SIZE(76, 120), google_protobuf_FieldOptions*) = value; } UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); @@ -661,11 +676,15 @@ UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorP } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 28), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { - _upb_sethas(msg, 9); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)) = value; + _upb_sethas(msg, 10); + *UPB_PTR_AT(msg, UPB_SIZE(68, 104), upb_strview) = value; +} +UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) { + _upb_sethas(msg, 5); + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool) = value; } /* google.protobuf.OneofDescriptorProto */ @@ -683,17 +702,17 @@ UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_pro } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_OneofOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_OneofOptions*); } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, google_protobuf_OneofOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_OneofOptions*) = value; } UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); @@ -720,16 +739,18 @@ UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_prot } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_EnumOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_EnumOptions*); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE upb_strview const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); @@ -746,7 +767,7 @@ UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_Enum } UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, google_protobuf_EnumOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_EnumOptions*) = value; } UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); @@ -796,17 +817,17 @@ UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize } UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } /* google.protobuf.EnumValueDescriptorProto */ @@ -824,23 +845,23 @@ UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } +UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_EnumValueOptions*, UPB_SIZE(16, 24)); } +UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_protobuf_EnumValueOptions*); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, google_protobuf_EnumValueOptions*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), google_protobuf_EnumValueOptions*) = value; } UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); @@ -867,14 +888,15 @@ UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_p } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len) { return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_ServiceOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_ServiceOptions*); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto *msg, size_t *len) { return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); @@ -891,7 +913,7 @@ UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_Service } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, google_protobuf_ServiceOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_ServiceOptions*) = value; } UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); @@ -918,33 +940,33 @@ UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_pr } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); } +UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_MethodOptions*, UPB_SIZE(28, 56)); } +UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_MethodOptions*); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, google_protobuf_MethodOptions*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_MethodOptions*) = value; } UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); @@ -957,11 +979,11 @@ UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescripto } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } /* google.protobuf.FileOptions */ @@ -979,126 +1001,127 @@ UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_Fil } UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 11); } -UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 12); } -UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); } +UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 13); } -UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 64)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)); } +UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)); } +UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)); } +UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)); } +UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 7); } -UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)); } +UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 8); } -UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)); } +UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 9); } -UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)); } +UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 14); } -UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 80)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 15); } -UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 96)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 16); } -UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 112)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 17); } -UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 128)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 18); } -UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 144)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 144), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 10); } -UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } +UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 19); } -UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(92, 160)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 160), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 20); } -UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(100, 176)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 176), upb_strview); } +UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 192)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(108, 192), len); } UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 11); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 12); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 13); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 7); - UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 8); - UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 9); - UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 14); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 80), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 15); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 16); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 112), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 17); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(76, 128), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 18); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 144)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(84, 144), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 10); - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 19); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(92, 160)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(92, 160), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 20); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(100, 176)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(100, 176), upb_strview) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 192), len); @@ -1129,30 +1152,31 @@ UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_ } UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); } +UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); } UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); } +UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } +UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const google_protobuf_MessageOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); } UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value; } UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); @@ -1183,42 +1207,43 @@ UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_Fi } UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } +UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)); } +UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); } UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); } +UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); } UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)); } +UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool); } +UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 32)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); @@ -1248,6 +1273,7 @@ UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_On return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len); } +UPB_INLINE bool google_protobuf_OneofOptions_has_uninterpreted_option(const google_protobuf_OneofOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t *len) { @@ -1279,18 +1305,19 @@ UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_Enu } UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } +UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const google_protobuf_EnumOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -1321,12 +1348,13 @@ UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobu } UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } +UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const google_protobuf_EnumValueOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -1357,12 +1385,13 @@ UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ } UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } +UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const google_protobuf_ServiceOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -1393,18 +1422,19 @@ UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_M } UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); } +UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } +UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); } UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value; } UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); @@ -1434,19 +1464,20 @@ UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_prot return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); } UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(56, 80), len); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); } +UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } +UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)); } +UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); } +UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); } +UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len) { return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 80), len); @@ -1463,27 +1494,27 @@ UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_ } UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_strview value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_strview value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_strview value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview) = value; } /* google.protobuf.UninterpretedOption.NamePart */ @@ -1501,17 +1532,17 @@ UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const go } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } /* google.protobuf.SourceCodeInfo */ @@ -1528,6 +1559,7 @@ UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_ return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len); } +UPB_INLINE bool google_protobuf_SourceCodeInfo_has_location(const google_protobuf_SourceCodeInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg, size_t *len) { return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo *msg, size_t *len) { @@ -1561,9 +1593,9 @@ UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_ UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE upb_strview const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { @@ -1588,11 +1620,11 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value; } UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); @@ -1619,6 +1651,7 @@ UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protob return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len); } +UPB_INLINE bool google_protobuf_GeneratedCodeInfo_has_annotation(const google_protobuf_GeneratedCodeInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg, size_t *len) { return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t *len) { @@ -1651,11 +1684,11 @@ UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const go UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } +UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len); @@ -1669,15 +1702,15 @@ UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_pro } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value; } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } #ifdef __cplusplus diff --git a/generated_for_cmake/upb/json/parser.c b/generated_for_cmake/upb/json/parser.c index 03087845d5f..1423add9c53 100644 --- a/generated_for_cmake/upb/json/parser.c +++ b/generated_for_cmake/upb/json/parser.c @@ -735,7 +735,9 @@ static bool multipart_text(upb_json_parser *p, const char *buf, size_t len, /* Note: this invalidates the accumulate buffer! Call only after reading its * contents. */ static void multipart_end(upb_json_parser *p) { - UPB_ASSERT(p->multipart_state != MULTIPART_INACTIVE); + /* This is false sometimes. Probably a bug of some sort, but this code is + * intended for deletion soon. */ + /* UPB_ASSERT(p->multipart_state != MULTIPART_INACTIVE); */ p->multipart_state = MULTIPART_INACTIVE; accumulate_clear(p); } @@ -1370,7 +1372,12 @@ static bool end_stringval_nontop(upb_json_parser *p) { upb_selector_t sel = parser_getsel(p); upb_sink_putint32(p->top->sink, sel, int_val); } else { - upb_status_seterrf(p->status, "Enum value unknown: '%.*s'", len, buf); + if (p->ignore_json_unknown) { + ok = true; + /* TODO(teboring): Should also clean this field. */ + } else { + upb_status_seterrf(p->status, "Enum value unknown: '%.*s'", len, buf); + } } break; @@ -1689,24 +1696,15 @@ static void start_timestamp_zone(upb_json_parser *p, const char *ptr) { capture_begin(p, ptr); } -static int div_round_up2(int n, int d) { - return (n + d - 1) / d; -} - /* epoch_days(1970, 1, 1) == 1970-01-01 == 0. */ static int epoch_days(int year, int month, int day) { static const uint16_t month_yday[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; - int febs_since_0 = month > 2 ? year + 1 : year; - int leap_days_since_0 = div_round_up2(febs_since_0, 4) - - div_round_up2(febs_since_0, 100) + - div_round_up2(febs_since_0, 400); - int days_since_0 = - 365 * year + month_yday[month - 1] + (day - 1) + leap_days_since_0; - - /* Convert from 0-epoch (0001-01-01 BC) to Unix Epoch (1970-01-01 AD). - * Since the "BC" system does not have a year zero, 1 BC == year zero. */ - return days_since_0 - 719528; + uint32_t year_adj = year + 4800; /* Ensure positive year, multiple of 400. */ + uint32_t febs = year_adj - (month <= 2 ? 1 : 0); /* Februaries since base. */ + uint32_t leap_days = 1 + (febs / 4) - (febs / 100) + (febs / 400); + uint32_t days = 365 * year_adj + leap_days + month_yday[month - 1] + day - 1; + return days - 2472692; /* Adjust to Unix epoch. */ } static int64_t upb_timegm(const struct tm *tp) { @@ -2575,11 +2573,11 @@ static bool does_fieldmask_end(upb_json_parser *p) { * final state once, when the closing '"' is seen. */ -#line 2780 "upb/json/parser.rl" +#line 2778 "upb/json/parser.rl" -#line 2583 "upb/json/parser.c" +#line 2581 "upb/json/parser.c" static const char _json_actions[] = { 0, 1, 0, 1, 1, 1, 3, 1, 4, 1, 6, 1, 7, 1, 8, 1, @@ -2834,7 +2832,7 @@ static const int json_en_value_machine = 78; static const int json_en_main = 1; -#line 2783 "upb/json/parser.rl" +#line 2781 "upb/json/parser.rl" size_t parse(void *closure, const void *hd, const char *buf, size_t size, const upb_bufhandle *handle) { @@ -2857,7 +2855,7 @@ size_t parse(void *closure, const void *hd, const char *buf, size_t size, capture_resume(parser, buf); -#line 2861 "upb/json/parser.c" +#line 2859 "upb/json/parser.c" { int _klen; unsigned int _trans; @@ -2932,147 +2930,147 @@ _match: switch ( *_acts++ ) { case 1: -#line 2588 "upb/json/parser.rl" +#line 2586 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 2: -#line 2590 "upb/json/parser.rl" +#line 2588 "upb/json/parser.rl" { p--; {stack[top++] = cs; cs = 23;goto _again;} } break; case 3: -#line 2594 "upb/json/parser.rl" +#line 2592 "upb/json/parser.rl" { start_text(parser, p); } break; case 4: -#line 2595 "upb/json/parser.rl" +#line 2593 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_text(parser, p)); } break; case 5: -#line 2601 "upb/json/parser.rl" +#line 2599 "upb/json/parser.rl" { start_hex(parser); } break; case 6: -#line 2602 "upb/json/parser.rl" +#line 2600 "upb/json/parser.rl" { hexdigit(parser, p); } break; case 7: -#line 2603 "upb/json/parser.rl" +#line 2601 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_hex(parser)); } break; case 8: -#line 2609 "upb/json/parser.rl" +#line 2607 "upb/json/parser.rl" { CHECK_RETURN_TOP(escape(parser, p)); } break; case 9: -#line 2615 "upb/json/parser.rl" +#line 2613 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 10: -#line 2620 "upb/json/parser.rl" +#line 2618 "upb/json/parser.rl" { start_year(parser, p); } break; case 11: -#line 2621 "upb/json/parser.rl" +#line 2619 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_year(parser, p)); } break; case 12: -#line 2625 "upb/json/parser.rl" +#line 2623 "upb/json/parser.rl" { start_month(parser, p); } break; case 13: -#line 2626 "upb/json/parser.rl" +#line 2624 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_month(parser, p)); } break; case 14: -#line 2630 "upb/json/parser.rl" +#line 2628 "upb/json/parser.rl" { start_day(parser, p); } break; case 15: -#line 2631 "upb/json/parser.rl" +#line 2629 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_day(parser, p)); } break; case 16: -#line 2635 "upb/json/parser.rl" +#line 2633 "upb/json/parser.rl" { start_hour(parser, p); } break; case 17: -#line 2636 "upb/json/parser.rl" +#line 2634 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_hour(parser, p)); } break; case 18: -#line 2640 "upb/json/parser.rl" +#line 2638 "upb/json/parser.rl" { start_minute(parser, p); } break; case 19: -#line 2641 "upb/json/parser.rl" +#line 2639 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_minute(parser, p)); } break; case 20: -#line 2645 "upb/json/parser.rl" +#line 2643 "upb/json/parser.rl" { start_second(parser, p); } break; case 21: -#line 2646 "upb/json/parser.rl" +#line 2644 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_second(parser, p)); } break; case 22: -#line 2651 "upb/json/parser.rl" +#line 2649 "upb/json/parser.rl" { start_duration_base(parser, p); } break; case 23: -#line 2652 "upb/json/parser.rl" +#line 2650 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_duration_base(parser, p)); } break; case 24: -#line 2654 "upb/json/parser.rl" +#line 2652 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 25: -#line 2659 "upb/json/parser.rl" +#line 2657 "upb/json/parser.rl" { start_timestamp_base(parser); } break; case 26: -#line 2661 "upb/json/parser.rl" +#line 2659 "upb/json/parser.rl" { start_timestamp_fraction(parser, p); } break; case 27: -#line 2662 "upb/json/parser.rl" +#line 2660 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_timestamp_fraction(parser, p)); } break; case 28: -#line 2664 "upb/json/parser.rl" +#line 2662 "upb/json/parser.rl" { start_timestamp_zone(parser, p); } break; case 29: -#line 2665 "upb/json/parser.rl" +#line 2663 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_timestamp_zone(parser, p)); } break; case 30: -#line 2667 "upb/json/parser.rl" +#line 2665 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 31: -#line 2672 "upb/json/parser.rl" +#line 2670 "upb/json/parser.rl" { start_fieldmask_path_text(parser, p); } break; case 32: -#line 2673 "upb/json/parser.rl" +#line 2671 "upb/json/parser.rl" { end_fieldmask_path_text(parser, p); } break; case 33: -#line 2678 "upb/json/parser.rl" +#line 2676 "upb/json/parser.rl" { start_fieldmask_path(parser); } break; case 34: -#line 2679 "upb/json/parser.rl" +#line 2677 "upb/json/parser.rl" { end_fieldmask_path(parser); } break; case 35: -#line 2685 "upb/json/parser.rl" +#line 2683 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 36: -#line 2690 "upb/json/parser.rl" +#line 2688 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_TIMESTAMP)) { {stack[top++] = cs; cs = 47;goto _again;} @@ -3086,11 +3084,11 @@ _match: } break; case 37: -#line 2703 "upb/json/parser.rl" +#line 2701 "upb/json/parser.rl" { p--; {stack[top++] = cs; cs = 78;goto _again;} } break; case 38: -#line 2708 "upb/json/parser.rl" +#line 2706 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { start_any_member(parser, p); @@ -3100,11 +3098,11 @@ _match: } break; case 39: -#line 2715 "upb/json/parser.rl" +#line 2713 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_membername(parser)); } break; case 40: -#line 2718 "upb/json/parser.rl" +#line 2716 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { end_any_member(parser, p); @@ -3114,7 +3112,7 @@ _match: } break; case 41: -#line 2729 "upb/json/parser.rl" +#line 2727 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { start_any_object(parser, p); @@ -3124,7 +3122,7 @@ _match: } break; case 42: -#line 2738 "upb/json/parser.rl" +#line 2736 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { CHECK_RETURN_TOP(end_any_object(parser, p)); @@ -3134,54 +3132,54 @@ _match: } break; case 43: -#line 2750 "upb/json/parser.rl" +#line 2748 "upb/json/parser.rl" { CHECK_RETURN_TOP(start_array(parser)); } break; case 44: -#line 2754 "upb/json/parser.rl" +#line 2752 "upb/json/parser.rl" { end_array(parser); } break; case 45: -#line 2759 "upb/json/parser.rl" +#line 2757 "upb/json/parser.rl" { CHECK_RETURN_TOP(start_number(parser, p)); } break; case 46: -#line 2760 "upb/json/parser.rl" +#line 2758 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_number(parser, p)); } break; case 47: -#line 2762 "upb/json/parser.rl" +#line 2760 "upb/json/parser.rl" { CHECK_RETURN_TOP(start_stringval(parser)); } break; case 48: -#line 2763 "upb/json/parser.rl" +#line 2761 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_stringval(parser)); } break; case 49: -#line 2765 "upb/json/parser.rl" +#line 2763 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_bool(parser, true)); } break; case 50: -#line 2767 "upb/json/parser.rl" +#line 2765 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_bool(parser, false)); } break; case 51: -#line 2769 "upb/json/parser.rl" +#line 2767 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_null(parser)); } break; case 52: -#line 2771 "upb/json/parser.rl" +#line 2769 "upb/json/parser.rl" { CHECK_RETURN_TOP(start_subobject_full(parser)); } break; case 53: -#line 2772 "upb/json/parser.rl" +#line 2770 "upb/json/parser.rl" { end_subobject_full(parser); } break; case 54: -#line 2777 "upb/json/parser.rl" +#line 2775 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; -#line 3185 "upb/json/parser.c" +#line 3183 "upb/json/parser.c" } } @@ -3198,32 +3196,32 @@ _again: while ( __nacts-- > 0 ) { switch ( *__acts++ ) { case 0: -#line 2586 "upb/json/parser.rl" +#line 2584 "upb/json/parser.rl" { p--; {cs = stack[--top]; if ( p == pe ) goto _test_eof; goto _again;} } break; case 46: -#line 2760 "upb/json/parser.rl" +#line 2758 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_number(parser, p)); } break; case 49: -#line 2765 "upb/json/parser.rl" +#line 2763 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_bool(parser, true)); } break; case 50: -#line 2767 "upb/json/parser.rl" +#line 2765 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_bool(parser, false)); } break; case 51: -#line 2769 "upb/json/parser.rl" +#line 2767 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_null(parser)); } break; case 53: -#line 2772 "upb/json/parser.rl" +#line 2770 "upb/json/parser.rl" { end_subobject_full(parser); } break; -#line 3227 "upb/json/parser.c" +#line 3225 "upb/json/parser.c" } } } @@ -3231,7 +3229,7 @@ goto _again;} } _out: {} } -#line 2805 "upb/json/parser.rl" +#line 2803 "upb/json/parser.rl" if (p != pe) { upb_status_seterrf(parser->status, "Parse error at '%.*s'\n", pe - p, p); @@ -3274,13 +3272,13 @@ static void json_parser_reset(upb_json_parser *p) { /* Emit Ragel initialization of the parser. */ -#line 3278 "upb/json/parser.c" +#line 3276 "upb/json/parser.c" { cs = json_start; top = 0; } -#line 2847 "upb/json/parser.rl" +#line 2845 "upb/json/parser.rl" p->current_state = cs; p->parser_top = top; accumulate_clear(p); @@ -3337,9 +3335,6 @@ upb_json_parser *upb_json_parser_create(upb_arena *arena, upb_sink output, upb_status *status, bool ignore_json_unknown) { -#ifndef NDEBUG - const size_t size_before = upb_arena_bytesallocated(arena); -#endif upb_json_parser *p = upb_arena_malloc(arena, sizeof(upb_json_parser)); if (!p) return false; @@ -3366,10 +3361,6 @@ upb_json_parser *upb_json_parser_create(upb_arena *arena, p->ignore_json_unknown = ignore_json_unknown; - /* If this fails, uncomment and increase the value in parser.h. */ - /* fprintf(stderr, "%zd\n", upb_arena_bytesallocated(arena) - size_before); */ - UPB_ASSERT_DEBUGVAR(upb_arena_bytesallocated(arena) - size_before <= - UPB_JSON_PARSER_SIZE); return p; } diff --git a/kokoro/ubuntu/build.sh b/kokoro/ubuntu/build.sh index ad8122b1bdb..e73deef0ab8 100644 --- a/kokoro/ubuntu/build.sh +++ b/kokoro/ubuntu/build.sh @@ -14,3 +14,9 @@ bazel version cd $(dirname $0)/../.. bazel test --test_output=errors :all + +if [[ $(uname) = "Linux" ]]; then + # Verify the ASAN build. Have to exclude test_conformance_upb as protobuf + # currently leaks memory in the conformance test runner. + bazel test --copt=-fsanitize=address --linkopt=-fsanitize=address --test_output=errors -- :all -:test_conformance_upb +fi diff --git a/tests/benchmark.cc b/tests/benchmark.cc index bcb4ec78b63..c1d6e063d64 100644 --- a/tests/benchmark.cc +++ b/tests/benchmark.cc @@ -9,15 +9,25 @@ upb_strview descriptor = google_protobuf_descriptor_proto_upbdefinit.descriptor; /* A buffer big enough to parse descriptor.proto without going to heap. */ char buf[65535]; -static void BM_CreateArena(benchmark::State& state) { +static void BM_ArenaOneAlloc(benchmark::State& state) { + for (auto _ : state) { + upb_arena* arena = upb_arena_new(); + upb_arena_malloc(arena, 1); + upb_arena_free(arena); + } +} +BENCHMARK(BM_ArenaOneAlloc); + +static void BM_ArenaInitialBlockOneAlloc(benchmark::State& state) { for (auto _ : state) { upb_arena* arena = upb_arena_init(buf, sizeof(buf), NULL); + upb_arena_malloc(arena, 1); upb_arena_free(arena); } } -BENCHMARK(BM_CreateArena); +BENCHMARK(BM_ArenaInitialBlockOneAlloc); -static void BM_ParseDescriptor(benchmark::State& state) { +static void BM_ParseDescriptorNoHeap(benchmark::State& state) { size_t bytes = 0; for (auto _ : state) { upb_arena* arena = upb_arena_init(buf, sizeof(buf), NULL); @@ -33,4 +43,22 @@ static void BM_ParseDescriptor(benchmark::State& state) { } state.SetBytesProcessed(state.iterations() * descriptor.size); } +BENCHMARK(BM_ParseDescriptorNoHeap); + +static void BM_ParseDescriptor(benchmark::State& state) { + size_t bytes = 0; + for (auto _ : state) { + upb_arena* arena = upb_arena_new(); + google_protobuf_FileDescriptorProto* set = + google_protobuf_FileDescriptorProto_parse(descriptor.data, + descriptor.size, arena); + if (!set) { + printf("Failed to parse.\n"); + exit(1); + } + bytes += descriptor.size; + upb_arena_free(arena); + } + state.SetBytesProcessed(state.iterations() * descriptor.size); +} BENCHMARK(BM_ParseDescriptor); diff --git a/tests/bindings/lua/test_upb.lua b/tests/bindings/lua/test_upb.lua index eaaf7e40859..d1c32b16746 100644 --- a/tests/bindings/lua/test_upb.lua +++ b/tests/bindings/lua/test_upb.lua @@ -467,6 +467,36 @@ function test_foo() assert_equal(set.file[1].name, "google/protobuf/descriptor.proto") end +function test_gc() + local top = test_messages_proto3.TestAllTypesProto3() + local n = 100 + local m + + for i=1,n do + local inner = test_messages_proto3.TestAllTypesProto3() + m = inner + for j=1,n do + local tmp = m + m = test_messages_proto3.TestAllTypesProto3() + -- This will cause the arenas to fuse. But we stop referring to the child, + -- so the Lua object is eligible for collection (and therefore its original + -- arena can be collected too). Only the fusing will keep the C mem alivd. + m.recursive_message = tmp + + end + top.recursive_message = m + end + + collectgarbage() + + for i=1,n do + -- Verify we can touch all the messages again and without accessing freed + -- memory. + m = m.recursive_message + assert_not_nil(m) + end +end + local stats = lunit.main() if stats.failed > 0 or stats.errors > 0 then diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index 1d87060095f..4a04adf8e49 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -19,6 +19,8 @@ #include "upb/json_encode.h" #include "upb/text_encode.h" +#include "upb/port_def.inc" + int test_count = 0; bool verbose = false; /* Set to true to get req/resp printed on stderr. */ @@ -94,7 +96,7 @@ void serialize_text(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { len = upb_text_encode(msg, m, c->symtab, opts, NULL, 0); data = upb_arena_malloc(c->arena, len + 1); len2 = upb_text_encode(msg, m, c->symtab, opts, data, len + 1); - assert(len == len2); + UPB_ASSERT(len == len2); conformance_ConformanceResponse_set_text_payload( c->response, upb_strview_make(data, len)); } @@ -149,7 +151,7 @@ void serialize_json(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { data = upb_arena_malloc(c->arena, len + 1); len2 = upb_json_encode(msg, m, c->symtab, opts, data, len + 1, &status); - assert(len == len2); + UPB_ASSERT(len == len2); conformance_ConformanceResponse_set_json_payload( c->response, upb_strview_make(data, len)); } diff --git a/tests/file_descriptor_parsenew_fuzzer.cc b/tests/file_descriptor_parsenew_fuzzer.cc index 057e62d8bf8..966a468063a 100644 --- a/tests/file_descriptor_parsenew_fuzzer.cc +++ b/tests/file_descriptor_parsenew_fuzzer.cc @@ -1,7 +1,7 @@ #include #include "google/protobuf/descriptor.upb.h" -#include "upb/upb.h" +#include "upb/upb.hpp" extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { upb::Arena arena; diff --git a/tests/json/test_json.cc b/tests/json/test_json.cc index 66508179b3f..e5f01035842 100644 --- a/tests/json/test_json.cc +++ b/tests/json/test_json.cc @@ -3,18 +3,18 @@ * A set of tests for JSON parsing and serialization. */ +#include + +#include "tests/json/test.upb.h" // Test that it compiles for C++. #include "tests/json/test.upbdefs.h" -#include "tests/json/test.upb.h" // Test that it compiles for C++. #include "tests/test_util.h" #include "tests/upb_test.h" +#include "upb/def.hpp" #include "upb/handlers.h" #include "upb/json/parser.h" #include "upb/json/printer.h" -#include "upb/upb.h" - -#include - #include "upb/port_def.inc" +#include "upb/upb.h" // Macros for readability in test case list: allows us to give TEST("...") / // EXPECT("...") pairs. @@ -138,6 +138,21 @@ static TestCase kTestRoundtripMessagesPreserve[] = { TEST_SENTINEL }; +static TestCase kTestSkipUnknown[] = { + { + TEST("{\"optionalEnum\":\"UNKNOWN_ENUM_VALUE\"}"), + EXPECT("{}"), + }, + TEST_SENTINEL +}; + +static TestCase kTestFailure[] = { + { + TEST("{\"optionalEnum\":\"UNKNOWN_ENUM_VALUE\"}"), + }, + TEST_SENTINEL +}; + class StringSink { public: StringSink() { @@ -173,13 +188,15 @@ void test_json_roundtrip_message(const char* json_src, const char* json_expected, const upb::Handlers* serialize_handlers, const upb::json::ParserMethodPtr parser_method, - int seam) { + int seam, + bool ignore_unknown) { VerboseParserEnvironment env(verbose); StringSink data_sink; upb::json::PrinterPtr printer = upb::json::PrinterPtr::Create( env.arena(), serialize_handlers, data_sink.Sink()); upb::json::ParserPtr parser = upb::json::ParserPtr::Create( - env.arena(), parser_method, NULL, printer.input(), env.status(), false); + env.arena(), parser_method, NULL, printer.input(), + env.status(), ignore_unknown); env.ResetBytesSink(parser.input()); env.Reset(json_src, strlen(json_src), false, false); @@ -196,8 +213,8 @@ void test_json_roundtrip_message(const char* json_src, data_sink.Data().size())) { fprintf(stderr, "JSON parse/serialize roundtrip result differs:\n" - "Original:\n%s\nParsed/Serialized:\n%s\n", - json_src, data_sink.Data().c_str()); + "Expected:\n%s\nParsed/Serialized:\n%s\n", + json_expected, data_sink.Data().c_str()); abort(); } } @@ -225,7 +242,23 @@ void test_json_roundtrip() { for (size_t i = 0; i < strlen(test_case->input); i++) { test_json_roundtrip_message(test_case->input, expected, - serialize_handlers, parser_method, i); + serialize_handlers, parser_method, i, + false); + } + } + + // Tests ignore unknown. + for (const TestCase* test_case = kTestSkipUnknown; + test_case->input != NULL; test_case++) { + const char *expected = + (test_case->expected == EXPECT_SAME) ? + test_case->input : + test_case->expected; + + for (size_t i = 0; i < strlen(test_case->input); i++) { + test_json_roundtrip_message(test_case->input, expected, + serialize_handlers, parser_method, i, + true); } } @@ -241,7 +274,52 @@ void test_json_roundtrip() { for (size_t i = 0; i < strlen(test_case->input); i++) { test_json_roundtrip_message(test_case->input, expected, - serialize_handlers, parser_method, i); + serialize_handlers, parser_method, i, + false); + } + } +} + +void test_json_parse_failure(const char* json_src, + const upb::Handlers* serialize_handlers, + const upb::json::ParserMethodPtr parser_method, + int seam) { + VerboseParserEnvironment env(verbose); + StringSink data_sink; + upb::json::PrinterPtr printer = upb::json::PrinterPtr::Create( + env.arena(), serialize_handlers, data_sink.Sink()); + upb::json::ParserPtr parser = upb::json::ParserPtr::Create( + env.arena(), parser_method, NULL, printer.input(), env.status(), false); + env.ResetBytesSink(parser.input()); + env.Reset(json_src, strlen(json_src), false, true); + + bool ok = env.Start() && + env.ParseBuffer(seam) && + env.ParseBuffer(-1) && + env.End(); + + ASSERT(!ok); + ASSERT(env.CheckConsistency()); +} + +// Starts with a proto message in JSON format, parses and expects failre. +void test_json_failure() { + upb::SymbolTable symtab; + upb::HandlerCache serialize_handlercache( + upb::json::PrinterPtr::NewCache(false)); + upb::json::CodeCache parse_codecache; + + upb::MessageDefPtr md(upb_test_json_TestMessage_getmsgdef(symtab.ptr())); + ASSERT(md); + const upb::Handlers* serialize_handlers = serialize_handlercache.Get(md); + const upb::json::ParserMethodPtr parser_method = parse_codecache.Get(md); + ASSERT(serialize_handlers); + + for (const TestCase* test_case = kTestFailure; + test_case->input != NULL; test_case++) { + for (size_t i = 0; i < strlen(test_case->input); i++) { + test_json_parse_failure(test_case->input, serialize_handlers, + parser_method, i); } } } @@ -251,6 +329,7 @@ int run_tests(int argc, char *argv[]) { UPB_UNUSED(argc); UPB_UNUSED(argv); test_json_roundtrip(); + test_json_failure(); return 0; } } diff --git a/tests/pb/test_encoder.cc b/tests/pb/test_encoder.cc index c6544beea57..aeca1b39caa 100644 --- a/tests/pb/test_encoder.cc +++ b/tests/pb/test_encoder.cc @@ -1,14 +1,15 @@ +#include + +#include "google/protobuf/descriptor.upb.h" +#include "google/protobuf/descriptor.upbdefs.h" #include "tests/test_util.h" #include "tests/upb_test.h" #include "upb/bindings/stdc++/string.h" -#include "google/protobuf/descriptor.upb.h" -#include "google/protobuf/descriptor.upbdefs.h" #include "upb/pb/decoder.h" #include "upb/pb/encoder.h" - #include "upb/port_def.inc" -#include +#include "upb/upb.hpp" void test_pb_roundtrip() { std::string input( diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index abbafdabc8f..55cc077c880 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -914,6 +914,31 @@ void TestIteration() { ASSERT(oneof_count == md.oneof_count()); } +void TestArena() { + int n = 100000; + + struct Decrementer { + Decrementer(int* _p) : p(_p) {} + ~Decrementer() { (*p)--; } + int* p; + }; + + { + upb::Arena arena; + for (int i = 0; i < n; i++) { + arena.Own(new Decrementer(&n)); + + // Intersperse allocation and ensure we can write to it. + int* val = static_cast(upb_arena_malloc(arena.ptr(), sizeof(int))); + *val = i; + } + + // Test a large allocation. + upb_arena_malloc(arena.ptr(), 1000000); + } + ASSERT(n == 0); +} + extern "C" { int run_tests(int argc, char *argv[]) { @@ -950,6 +975,7 @@ int run_tests(int argc, char *argv[]) { TestHandlerDataDestruction(); TestIteration(); + TestArena(); return 0; } diff --git a/tests/test_generated_code.c b/tests/test_generated_code.c index 7fd958104e2..25fbf77ce8d 100644 --- a/tests/test_generated_code.c +++ b/tests/test_generated_code.c @@ -7,6 +7,8 @@ #include "tests/upb_test.h" #include "tests/test.upb.h" +#define MIN(x, y) ((x) < (y) ? (x) : (y)) + const char test_str[] = "abcdefg"; const char test_str2[] = "12345678910"; const char test_str3[] = "rstlnezxcvbnm"; @@ -123,6 +125,11 @@ static void test_string_double_map() { double val; upb_test_MapTest_map_string_double_set(msg, test_str_view, 1.5, arena); + ASSERT(msg); + ASSERT(upb_test_MapTest_map_string_double_get(msg, test_str_view, &val)); + ASSERT(val == 1.5); + val = 0; + serialized.data = upb_test_MapTest_serialize(msg, arena, &serialized.size); ASSERT(serialized.data); @@ -349,6 +356,36 @@ void test_null_decode_buf() { ASSERT(msg); protobuf_test_messages_proto3_TestAllTypesProto3_serialize(msg, arena, &size); ASSERT(size == 0); + upb_arena_free(arena); +} + +void test_status_truncation() { + int i, j; + upb_status status; + upb_status status2; + for (i = 0; i < UPB_STATUS_MAX_MESSAGE + 20; i++) { + char *msg = malloc(i + 1); + int end; + char ch = (i % 96) + 33; /* Cycle through printable chars. */ + + for (j = 0; j < i; j++) { + msg[j] = ch; + } + msg[i] = '\0'; + + upb_status_seterrmsg(&status, msg); + upb_status_seterrf(&status2, "%s", msg); + end = MIN(i, UPB_STATUS_MAX_MESSAGE - 1); + ASSERT(strlen(status.msg) == end); + ASSERT(strlen(status2.msg) == end); + + for (j = 0; j < end; j++) { + ASSERT(status.msg[j] == ch); + ASSERT(status2.msg[j] == ch); + } + + free(msg); + } } int run_tests(int argc, char *argv[]) { @@ -358,5 +395,6 @@ int run_tests(int argc, char *argv[]) { test_int32_map(); test_repeated(); test_null_decode_buf(); + test_status_truncation(); return 0; } diff --git a/tools/amalgamate.py b/tools/amalgamate.py index bc083b38962..b244eff8e86 100755 --- a/tools/amalgamate.py +++ b/tools/amalgamate.py @@ -11,14 +11,14 @@ def parse_include(line): return match.groups()[0] if match else None class Amalgamator: - def __init__(self, output_path): + def __init__(self, output_path, prefix): self.include_paths = ["."] self.included = set(["upb/port_def.inc", "upb/port_undef.inc"]) - self.output_h = open(output_path + "upb.h", "w") - self.output_c = open(output_path + "upb.c", "w") + self.output_h = open(output_path + prefix + "upb.h", "w") + self.output_c = open(output_path + prefix + "upb.c", "w") self.output_c.write("/* Amalgamated source file */\n") - self.output_c.write('#include "upb.h"\n') + self.output_c.write('#include "%supb.h"\n' % (prefix)) self.output_c.write(open("upb/port_def.inc").read()) self.output_h.write("/* Amalgamated source file */\n") @@ -45,15 +45,25 @@ class Amalgamator: raise RuntimeError("Couldn't open file " + infile_name) for line in file: - include = parse_include(line) - if include is not None and (include.startswith("upb") or - include.startswith("google")): - if include not in self.included: - self.included.add(include) - self._add_header(include) - else: + if not self._process_include(line, outfile): outfile.write(line) + def _process_include(self, line, outfile): + include = parse_include(line) + if not include: + return False + if not (include.startswith("upb") or include.startswith("google")): + return False + if include.endswith("hpp"): + # Skip, we don't support the amalgamation from C++. + return True + else: + # Include this upb header inline. + if include not in self.included: + self.included.add(include) + self._add_header(include) + return True + def _add_header(self, filename): self._process_file(filename, self.output_h) @@ -63,10 +73,11 @@ class Amalgamator: # ---- main ---- output_path = sys.argv[1] -amalgamator = Amalgamator(output_path) +prefix = sys.argv[2] +amalgamator = Amalgamator(output_path, prefix) files = [] -for arg in sys.argv[2:]: +for arg in sys.argv[3:]: arg = arg.strip() if arg.startswith("-I"): amalgamator.add_include_path(arg[2:]) diff --git a/tools/make_cmakelists.py b/tools/make_cmakelists.py index 76e3ee15981..c31b413a898 100755 --- a/tools/make_cmakelists.py +++ b/tools/make_cmakelists.py @@ -36,7 +36,9 @@ class BuildFileFunctions(object): pass def cc_library(self, **kwargs): - if kwargs["name"] == "amalgamation" or kwargs["name"] == "upbc_generator": + if kwargs["name"].endswith("amalgamation"): + return + if kwargs["name"] == "upbc_generator": return if kwargs["name"] == "lupb": return diff --git a/upb/bindings/lua/msg.c b/upb/bindings/lua/msg.c index 6bf393f7736..df9f009d768 100644 --- a/upb/bindings/lua/msg.c +++ b/upb/bindings/lua/msg.c @@ -42,34 +42,29 @@ * the wrappers can be collected if they are no longer needed. A new wrapper * object can always be recreated later. * - * arena - * +->group - * | - * V +-----+ + * +-----+ * lupb_arena |cache|-weak-+ * | ^ +-----+ | * | | V * Lua level | +------------lupb_msg - * ----------------|-----------------|------------------------------------------- + * ----------------|-----------------|------------------------------------------ * upb level | | * | +----V------------------------------+ * +->upb_arena | upb_msg ...(empty arena storage) | * +-----------------------------------+ * * If the user creates a reference between two objects that have different - * arenas, we need to merge the arenas into a single, bigger arena group. The - * arena group will reference both arenas, and will inherit the longest lifetime - * of anything in the arena. + * arenas, we need to fuse the two arenas together, so that the blocks will + * outlive both arenas. * - * arena - * +--------------------------->group<-----------------+ + * +-------------------------->(fused)<----------------+ * | | * V +-----+ V * lupb_arena +-weak-|cache|-weak-+ lupb_arena * | ^ | +-----+ | ^ | * | | V V | | * Lua level | +------------lupb_msg lupb_msg----+ | - * ----------------|-----------------|-------------------------|---------|------- + * ----------------|-----------------|-------------------------|---------|------ * upb level | | | | * | +----V----+ +----V----+ V * +->upb_arena | upb_msg | | upb_msg | upb_arena @@ -77,7 +72,7 @@ * +---------------------+ * Key invariants: * 1. every wrapper references the arena that contains it. - * 2. every arena group references all arenas that own upb objects reachable + * 2. every fused arena includes all arenas that own upb objects reachable * from that arena. In other words, when a wrapper references an arena, * this is sufficient to ensure that any upb object reachable from that * wrapper will stay alive. @@ -85,12 +80,6 @@ * Additionally, every message object contains a strong reference to the * corresponding Descriptor object. Likewise, array/map objects reference a * Descriptor object if they are typed to store message values. - * - * (The object cache could be per-arena-group. This would keep individual cache - * tables smaller, and when an arena group is freed the entire cache table(s) could - * be collected in one fell swoop. However this makes merging another arena - * into the group an O(n) operation, since all entries would need to be copied - * from the existing cache table.) */ #define LUPB_ARENA "lupb.arena" @@ -170,14 +159,8 @@ static void lupb_cacheset(lua_State *L, const void *key) { /* lupb_arena only exists to wrap a upb_arena. It is never exposed to users; it * is an internal memory management detail. Other wrapper objects refer to this * object from their userdata to keep the arena-owned data alive. - * - * The arena userval is a table representing the arena group. Every arena in - * the group points to the same table, and the table references all arenas in - * the group. */ -#define LUPB_ARENAGROUP_INDEX 1 - typedef struct { upb_arena *arena; } lupb_arena; @@ -190,63 +173,18 @@ static upb_arena *lupb_arena_check(lua_State *L, int narg) { upb_arena *lupb_arena_pushnew(lua_State *L) { lupb_arena *a = lupb_newuserdata(L, sizeof(lupb_arena), 1, LUPB_ARENA); a->arena = upb_arena_new(); - - /* Create arena group table and add this arena to it. */ - lua_createtable(L, 0, 1); - lua_pushvalue(L, -2); - lua_rawseti(L, -2, 1); - - /* Set arena group as this object's userval. */ - lua_setiuservalue(L, -2, LUPB_ARENAGROUP_INDEX); - return a->arena; } /** - * lupb_arena_merge() + * lupb_arena_fuse() * * Merges |from| into |to| so that there is a single arena group that contains * both, and both arenas will point at this new table. */ -static void lupb_arena_merge(lua_State *L, int to, int from) { - int i, from_count, to_count; - lua_getiuservalue(L, to, LUPB_ARENAGROUP_INDEX); - lua_getiuservalue(L, from, LUPB_ARENAGROUP_INDEX); - - if (lua_rawequal(L, -1, -2)) { - /* These arenas are already in the same group. */ - lua_pop(L, 2); - return; - } - - to_count = lua_rawlen(L, -2); - from_count = lua_rawlen(L, -1); - - /* Add everything in |from|'s arena group. */ - for (i = 1; i <= from_count; i++) { - lua_rawgeti(L, -1, i); - lua_rawseti(L, -3, i + to_count); - } - - /* Make |from| point to |to|'s table. */ - lua_pop(L, 1); - lua_setiuservalue(L, from, LUPB_ARENAGROUP_INDEX); -} - -/** - * lupb_arena_addobj() - * - * Creates a reference from the arena in |narg| to the object at the top of the - * stack, and pops it. This will guarantee that the object lives as long as - * the arena. - * - * This is mainly useful for pinning strings we have parsed protobuf data from. - * It will allow us to point directly to string data in the original string. */ -static void lupb_arena_addobj(lua_State *L, int narg) { - lua_getiuservalue(L, narg, LUPB_ARENAGROUP_INDEX); - int n = lua_rawlen(L, -1); - lua_pushvalue(L, -2); - lua_rawseti(L, -2, n + 1); - lua_pop(L, 2); /* obj, arena group. */ +static void lupb_arena_fuse(lua_State *L, int to, int from) { + upb_arena *to_arena = lupb_arena_check(L, to); + upb_arena *from_arena = lupb_arena_check(L, from); + upb_arena_fuse(to_arena, from_arena); } static int lupb_arena_gc(lua_State *L) { @@ -877,7 +815,7 @@ static int lupb_msg_newindex(lua_State *L) { if (merge_arenas) { lua_getiuservalue(L, 1, LUPB_ARENA_INDEX); lua_getiuservalue(L, 3, LUPB_ARENA_INDEX); - lupb_arena_merge(L, lua_absindex(L, -2), lua_absindex(L, -1)); + lupb_arena_fuse(L, lua_absindex(L, -2), lua_absindex(L, -1)); lua_pop(L, 2); } @@ -940,6 +878,7 @@ static int lupb_decode(lua_State *L) { const upb_msgdef *m = lupb_msgdef_check(L, 1); const char *pb = lua_tolstring(L, 2, &len); const upb_msglayout *layout = upb_msgdef_layout(m); + char *buf; upb_msg *msg; upb_arena *arena; bool ok; @@ -952,13 +891,13 @@ static int lupb_decode(lua_State *L) { lua_getiuservalue(L, -1, LUPB_ARENA_INDEX); arena = lupb_arena_check(L, -1); - - /* Pin string data so we can reference it. */ - lua_pushvalue(L, 2); - lupb_arena_addobj(L, -2); lua_pop(L, 1); - ok = upb_decode(pb, len, msg, layout, arena); + /* Copy input data to arena, message will reference it. */ + buf = upb_arena_malloc(arena, len); + memcpy(buf, pb, len); + + ok = upb_decode(buf, len, msg, layout, arena); if (!ok) { lua_pushstring(L, "Error decoding protobuf."); diff --git a/upb/decode.c b/upb/decode.c index 8a7f64d1453..b78451c9dff 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -1,616 +1,553 @@ +#include #include -#include "upb/upb.h" + #include "upb/decode.h" +#include "upb/upb.h" #include "upb/port_def.inc" /* Maps descriptor type -> upb field type. */ static const uint8_t desctype_to_fieldtype[] = { - -1, /* invalid descriptor type */ - UPB_TYPE_DOUBLE, /* DOUBLE */ - UPB_TYPE_FLOAT, /* FLOAT */ - UPB_TYPE_INT64, /* INT64 */ - UPB_TYPE_UINT64, /* UINT64 */ - UPB_TYPE_INT32, /* INT32 */ - UPB_TYPE_UINT64, /* FIXED64 */ - UPB_TYPE_UINT32, /* FIXED32 */ - UPB_TYPE_BOOL, /* BOOL */ - UPB_TYPE_STRING, /* STRING */ - UPB_TYPE_MESSAGE, /* GROUP */ - UPB_TYPE_MESSAGE, /* MESSAGE */ - UPB_TYPE_BYTES, /* BYTES */ - UPB_TYPE_UINT32, /* UINT32 */ - UPB_TYPE_ENUM, /* ENUM */ - UPB_TYPE_INT32, /* SFIXED32 */ - UPB_TYPE_INT64, /* SFIXED64 */ - UPB_TYPE_INT32, /* SINT32 */ - UPB_TYPE_INT64, /* SINT64 */ + -1, /* invalid descriptor type */ + UPB_TYPE_DOUBLE, /* DOUBLE */ + UPB_TYPE_FLOAT, /* FLOAT */ + UPB_TYPE_INT64, /* INT64 */ + UPB_TYPE_UINT64, /* UINT64 */ + UPB_TYPE_INT32, /* INT32 */ + UPB_TYPE_UINT64, /* FIXED64 */ + UPB_TYPE_UINT32, /* FIXED32 */ + UPB_TYPE_BOOL, /* BOOL */ + UPB_TYPE_STRING, /* STRING */ + UPB_TYPE_MESSAGE, /* GROUP */ + UPB_TYPE_MESSAGE, /* MESSAGE */ + UPB_TYPE_BYTES, /* BYTES */ + UPB_TYPE_UINT32, /* UINT32 */ + UPB_TYPE_ENUM, /* ENUM */ + UPB_TYPE_INT32, /* SFIXED32 */ + UPB_TYPE_INT64, /* SFIXED64 */ + UPB_TYPE_INT32, /* SINT32 */ + UPB_TYPE_INT64, /* SINT64 */ }; /* Maps descriptor type -> upb map size. */ static const uint8_t desctype_to_mapsize[] = { - -1, /* invalid descriptor type */ - 8, /* DOUBLE */ - 4, /* FLOAT */ - 8, /* INT64 */ - 8, /* UINT64 */ - 4, /* INT32 */ - 8, /* FIXED64 */ - 4, /* FIXED32 */ - 1, /* BOOL */ - UPB_MAPTYPE_STRING, /* STRING */ - sizeof(void*), /* GROUP */ - sizeof(void*), /* MESSAGE */ - UPB_MAPTYPE_STRING, /* BYTES */ - 4, /* UINT32 */ - 4, /* ENUM */ - 4, /* SFIXED32 */ - 8, /* SFIXED64 */ - 4, /* SINT32 */ - 8, /* SINT64 */ + -1, /* invalid descriptor type */ + 8, /* DOUBLE */ + 4, /* FLOAT */ + 8, /* INT64 */ + 8, /* UINT64 */ + 4, /* INT32 */ + 8, /* FIXED64 */ + 4, /* FIXED32 */ + 1, /* BOOL */ + UPB_MAPTYPE_STRING, /* STRING */ + sizeof(void *), /* GROUP */ + sizeof(void *), /* MESSAGE */ + UPB_MAPTYPE_STRING, /* BYTES */ + 4, /* UINT32 */ + 4, /* ENUM */ + 4, /* SFIXED32 */ + 8, /* SFIXED64 */ + 4, /* SINT32 */ + 8, /* SINT64 */ +}; + +static const unsigned fixed32_ok = (1 << UPB_DTYPE_FLOAT) | + (1 << UPB_DTYPE_FIXED32) | + (1 << UPB_DTYPE_SFIXED32); + +static const unsigned fixed64_ok = (1 << UPB_DTYPE_DOUBLE) | + (1 << UPB_DTYPE_FIXED64) | + (1 << UPB_DTYPE_SFIXED64); + +/* Op: an action to be performed for a wire-type/field-type combination. */ +#define OP_SCALAR_LG2(n) (n) +#define OP_FIXPCK_LG2(n) (n + 4) +#define OP_VARPCK_LG2(n) (n + 8) +#define OP_STRING 4 +#define OP_SUBMSG 5 + +static const int8_t varint_ops[19] = { + -1, /* field not found */ + -1, /* DOUBLE */ + -1, /* FLOAT */ + OP_SCALAR_LG2(3), /* INT64 */ + OP_SCALAR_LG2(3), /* UINT64 */ + OP_SCALAR_LG2(2), /* INT32 */ + -1, /* FIXED64 */ + -1, /* FIXED32 */ + OP_SCALAR_LG2(0), /* BOOL */ + -1, /* STRING */ + -1, /* GROUP */ + -1, /* MESSAGE */ + -1, /* BYTES */ + OP_SCALAR_LG2(2), /* UINT32 */ + OP_SCALAR_LG2(2), /* ENUM */ + -1, /* SFIXED32 */ + -1, /* SFIXED64 */ + OP_SCALAR_LG2(2), /* SINT32 */ + OP_SCALAR_LG2(3), /* SINT64 */ +}; + +static const int8_t delim_ops[37] = { + /* For non-repeated field type. */ + -1, /* field not found */ + -1, /* DOUBLE */ + -1, /* FLOAT */ + -1, /* INT64 */ + -1, /* UINT64 */ + -1, /* INT32 */ + -1, /* FIXED64 */ + -1, /* FIXED32 */ + -1, /* BOOL */ + OP_STRING, /* STRING */ + -1, /* GROUP */ + OP_SUBMSG, /* MESSAGE */ + OP_STRING, /* BYTES */ + -1, /* UINT32 */ + -1, /* ENUM */ + -1, /* SFIXED32 */ + -1, /* SFIXED64 */ + -1, /* SINT32 */ + -1, /* SINT64 */ + /* For repeated field type. */ + OP_FIXPCK_LG2(3), /* REPEATED DOUBLE */ + OP_FIXPCK_LG2(2), /* REPEATED FLOAT */ + OP_VARPCK_LG2(3), /* REPEATED INT64 */ + OP_VARPCK_LG2(3), /* REPEATED UINT64 */ + OP_VARPCK_LG2(2), /* REPEATED INT32 */ + OP_FIXPCK_LG2(3), /* REPEATED FIXED64 */ + OP_FIXPCK_LG2(2), /* REPEATED FIXED32 */ + OP_VARPCK_LG2(0), /* REPEATED BOOL */ + OP_STRING, /* REPEATED STRING */ + OP_SUBMSG, /* REPEATED GROUP */ + OP_SUBMSG, /* REPEATED MESSAGE */ + OP_STRING, /* REPEATED BYTES */ + OP_VARPCK_LG2(2), /* REPEATED UINT32 */ + OP_VARPCK_LG2(2), /* REPEATED ENUM */ + OP_FIXPCK_LG2(2), /* REPEATED SFIXED32 */ + OP_FIXPCK_LG2(3), /* REPEATED SFIXED64 */ + OP_VARPCK_LG2(2), /* REPEATED SINT32 */ + OP_VARPCK_LG2(3), /* REPEATED SINT64 */ }; /* Data pertaining to the parse. */ typedef struct { - const char *field_start; /* Start of this field. */ - const char *limit; /* End of delimited region or end of buffer. */ + const char *limit; /* End of delimited region or end of buffer. */ upb_arena *arena; int depth; - uint32_t end_group; /* Set to field number of END_GROUP tag, if any. */ + uint32_t end_group; /* Set to field number of END_GROUP tag, if any. */ + jmp_buf err; } upb_decstate; -#define CHK(x) if (!(x)) { return 0; } -#define PTR_AT(msg, ofs, type) (type*)((const char*)msg + ofs) +typedef union { + bool bool_val; + int32_t int32_val; + int64_t int64_val; + uint32_t uint32_val; + uint64_t uint64_val; + upb_strview str_val; +} wireval; + +static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg, + const upb_msglayout *layout); + +UPB_NORETURN static void decode_err(upb_decstate *d) { longjmp(d->err, 1); } -static const char *upb_decode_message(const char *ptr, const upb_msglayout *l, - upb_msg *msg, upb_decstate *d); +static bool decode_reserve(upb_decstate *d, upb_array *arr, int elem) { + bool need_realloc = arr->size - arr->len < elem; + if (need_realloc && !_upb_array_realloc(arr, arr->len + elem, d->arena)) { + decode_err(d); + } + return need_realloc; +} -static const char *upb_decode_varint(const char *ptr, const char *limit, - uint64_t *val) { +UPB_NOINLINE +static const char *decode_longvarint64(upb_decstate *d, const char *ptr, + const char *limit, uint64_t *val) { uint8_t byte; int bitpos = 0; - *val = 0; + uint64_t out = 0; do { - CHK(bitpos < 70 && ptr < limit); + if (bitpos >= 70 || ptr == limit) decode_err(d); byte = *ptr; - *val |= (uint64_t)(byte & 0x7F) << bitpos; + out |= (uint64_t)(byte & 0x7F) << bitpos; ptr++; bitpos += 7; } while (byte & 0x80); + *val = out; return ptr; } -static const char *upb_decode_varint32(const char *ptr, const char *limit, - uint32_t *val) { - uint64_t u64; - CHK(ptr = upb_decode_varint(ptr, limit, &u64)) - CHK(u64 <= UINT32_MAX); - *val = (uint32_t)u64; - return ptr; -} - -static const char *upb_decode_64bit(const char *ptr, const char *limit, - uint64_t *val) { - CHK(limit - ptr >= 8); - memcpy(val, ptr, 8); - return ptr + 8; -} - -static const char *upb_decode_32bit(const char *ptr, const char *limit, - uint32_t *val) { - CHK(limit - ptr >= 4); - memcpy(val, ptr, 4); - return ptr + 4; -} - -static int32_t upb_zzdecode_32(uint32_t n) { - return (n >> 1) ^ -(int32_t)(n & 1); -} - -static int64_t upb_zzdecode_64(uint64_t n) { - return (n >> 1) ^ -(int64_t)(n & 1); -} - -static const char *upb_decode_string(const char *ptr, const char *limit, - int *outlen) { - uint32_t len; - - CHK(ptr = upb_decode_varint32(ptr, limit, &len)); - CHK(len < INT32_MAX); - CHK(limit - ptr >= (int32_t)len); - - *outlen = len; - return ptr; -} - -static void upb_set32(void *msg, size_t ofs, uint32_t val) { - memcpy((char*)msg + ofs, &val, sizeof(val)); +UPB_FORCEINLINE +static const char *decode_varint64(upb_decstate *d, const char *ptr, + const char *limit, uint64_t *val) { + if (UPB_LIKELY(ptr < limit && (*ptr & 0x80) == 0)) { + *val = (uint8_t)*ptr; + return ptr + 1; + } else { + return decode_longvarint64(d, ptr, limit, val); + } } -static const char *upb_append_unknown(const char *ptr, upb_msg *msg, - upb_decstate *d) { - upb_msg_addunknown(msg, d->field_start, ptr - d->field_start, d->arena); +static const char *decode_varint32(upb_decstate *d, const char *ptr, + const char *limit, uint32_t *val) { + uint64_t u64; + ptr = decode_varint64(d, ptr, limit, &u64); + if (u64 > UINT32_MAX) decode_err(d); + *val = (uint32_t)u64; return ptr; } -static const char *upb_skip_unknownfielddata(const char *ptr, upb_decstate *d, - uint32_t tag) { - switch (tag & 7) { - case UPB_WIRE_TYPE_VARINT: { - uint64_t val; - return upb_decode_varint(ptr, d->limit, &val); - } - case UPB_WIRE_TYPE_32BIT: { - uint32_t val; - return upb_decode_32bit(ptr, d->limit, &val); - } - case UPB_WIRE_TYPE_64BIT: { - uint64_t val; - return upb_decode_64bit(ptr, d->limit, &val); - } - case UPB_WIRE_TYPE_DELIMITED: { - int len; - CHK(ptr = upb_decode_string(ptr, d->limit, &len)); - return ptr + len; +static void decode_munge(int type, wireval *val) { + switch (type) { + case UPB_DESCRIPTOR_TYPE_BOOL: + val->bool_val = val->uint64_val != 0; + break; + case UPB_DESCRIPTOR_TYPE_SINT32: { + uint32_t n = val->uint32_val; + val->int32_val = (n >> 1) ^ -(int32_t)(n & 1); + break; } - case UPB_WIRE_TYPE_START_GROUP: { - uint32_t field_number = tag >> 3; - while (ptr < d->limit && d->end_group == 0) { - uint32_t tag = 0; - CHK(ptr = upb_decode_varint32(ptr, d->limit, &tag)); - CHK(ptr = upb_skip_unknownfielddata(ptr, d, tag)); - } - CHK(d->end_group == field_number); - d->end_group = 0; - return ptr; + case UPB_DESCRIPTOR_TYPE_SINT64: { + uint64_t n = val->uint64_val; + val->int64_val = (n >> 1) ^ -(int64_t)(n & 1); + break; } - case UPB_WIRE_TYPE_END_GROUP: - d->end_group = tag >> 3; - return ptr; - } - return false; -} - -static void *upb_array_reserve(upb_array *arr, size_t elements, - size_t elem_size, upb_arena *arena) { - if (arr->size - arr->len < elements) { - CHK(_upb_array_realloc(arr, arr->len + elements, arena)); } - return (char*)_upb_array_ptr(arr) + (arr->len * elem_size); } -bool upb_array_add(upb_array *arr, size_t elements, size_t elem_size, - const void *data, upb_arena *arena) { - void *dest = upb_array_reserve(arr, elements, elem_size, arena); - - CHK(dest); - arr->len += elements; - memcpy(dest, data, elements * elem_size); - - return true; -} - -static upb_array *upb_getarr(upb_msg *msg, const upb_msglayout_field *field) { - UPB_ASSERT(field->label == UPB_LABEL_REPEATED); - return *PTR_AT(msg, field->offset, upb_array*); -} - -static upb_array *upb_getorcreatearr(upb_msg *msg, - const upb_msglayout_field *field, - upb_decstate *d) { - upb_array *arr = upb_getarr(msg, field); - - if (!arr) { - upb_fieldtype_t type = desctype_to_fieldtype[field->descriptortype]; - arr = _upb_array_new(d->arena, type); - CHK(arr); - *PTR_AT(msg, field->offset, upb_array*) = arr; - } - - return arr; -} - -static upb_msg *upb_getorcreatemsg(upb_msg *msg, - const upb_msglayout_field *field, - const upb_msglayout *layout, - upb_decstate *d) { - upb_msg **submsg = PTR_AT(msg, field->offset, upb_msg*); - - UPB_ASSERT(field->label != UPB_LABEL_REPEATED); - - if (!*submsg) { - *submsg = _upb_msg_new(layout, d->arena); - CHK(*submsg); - } - - return *submsg; -} - -static upb_msg *upb_addmsg(upb_msg *msg, - const upb_msglayout_field *field, - const upb_msglayout *layout, - upb_decstate *d) { - upb_msg *submsg; - upb_array *arr = upb_getorcreatearr(msg, field, d); - - UPB_ASSERT(field->label == UPB_LABEL_REPEATED); - UPB_ASSERT(field->descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE || - field->descriptortype == UPB_DESCRIPTOR_TYPE_GROUP); - - submsg = _upb_msg_new(layout, d->arena); - CHK(submsg); - upb_array_add(arr, 1, sizeof(submsg), &submsg, d->arena); - - return submsg; -} - -static void upb_sethasbit(upb_msg *msg, const upb_msglayout_field *field) { - int32_t hasbit = field->presence; - UPB_ASSERT(field->presence > 0); - *PTR_AT(msg, hasbit / 8, char) |= (1 << (hasbit % 8)); -} - -static void upb_setoneofcase(upb_msg *msg, const upb_msglayout_field *field) { - UPB_ASSERT(field->presence < 0); - upb_set32(msg, ~field->presence, field->number); -} - -static bool upb_decode_addval(upb_msg *msg, const upb_msglayout_field *field, - void *val, size_t size, upb_decstate *d) { - char *field_mem = PTR_AT(msg, field->offset, char); - upb_array *arr; +static const upb_msglayout_field *upb_find_field(const upb_msglayout *l, + uint32_t field_number) { + static upb_msglayout_field none = {0}; - if (field->label == UPB_LABEL_REPEATED) { - arr = upb_getorcreatearr(msg, field, d); - CHK(arr); - field_mem = upb_array_reserve(arr, 1, size, d->arena); - CHK(field_mem); + /* Lots of optimization opportunities here. */ + int i; + if (l == NULL) return &none; + for (i = 0; i < l->field_count; i++) { + if (l->fields[i].number == field_number) { + return &l->fields[i]; + } } - memcpy(field_mem, val, size); - return true; + return &none; /* Unknown field. */ } -static void upb_decode_setpresent(upb_msg *msg, - const upb_msglayout_field *field) { - if (field->label == UPB_LABEL_REPEATED) { - upb_array *arr = upb_getarr(msg, field); - UPB_ASSERT(arr->len < arr->size); - arr->len++; - } else if (field->presence < 0) { - upb_setoneofcase(msg, field); - } else if (field->presence > 0) { - upb_sethasbit(msg, field); - } +static upb_msg *decode_newsubmsg(upb_decstate *d, const upb_msglayout *layout, + const upb_msglayout_field *field) { + const upb_msglayout *subl = layout->submsgs[field->submsg_index]; + return _upb_msg_new(subl, d->arena); } -static const char *upb_decode_msgfield(const char *ptr, - const upb_msglayout *layout, int limit, - upb_msg *msg, upb_decstate *d) { - const char* saved_limit = d->limit; - d->limit = ptr + limit; - CHK(--d->depth >= 0); - ptr = upb_decode_message(ptr, layout, msg, d); - d->depth++; +static void decode_tosubmsg(upb_decstate *d, upb_msg *submsg, + const upb_msglayout *layout, + const upb_msglayout_field *field, upb_strview val) { + const upb_msglayout *subl = layout->submsgs[field->submsg_index]; + const char *saved_limit = d->limit; + if (--d->depth < 0) decode_err(d); + d->limit = val.data + val.size; + decode_msg(d, val.data, submsg, subl); d->limit = saved_limit; - CHK(d->end_group == 0); - return ptr; + if (d->end_group != 0) decode_err(d); + d->depth++; } -static const char *upb_decode_groupfield(const char *ptr, - const upb_msglayout *layout, - int field_number, upb_msg *msg, - upb_decstate *d) { - CHK(--d->depth >= 0); - ptr = upb_decode_message(ptr, layout, msg, d); - d->depth++; - CHK(d->end_group == field_number); +static const char *decode_group(upb_decstate *d, const char *ptr, + upb_msg *submsg, const upb_msglayout *subl, + uint32_t number) { + if (--d->depth < 0) decode_err(d); + ptr = decode_msg(d, ptr, submsg, subl); + if (d->end_group != number) decode_err(d); d->end_group = 0; + d->depth++; return ptr; } -static const char *upb_decode_varintfield(const char *ptr, upb_msg *msg, - const upb_msglayout_field *field, - upb_decstate *d) { - uint64_t val; - CHK(ptr = upb_decode_varint(ptr, d->limit, &val)); - - switch (field->descriptortype) { - case UPB_DESCRIPTOR_TYPE_INT64: - case UPB_DESCRIPTOR_TYPE_UINT64: - CHK(upb_decode_addval(msg, field, &val, sizeof(val), d)); - break; - case UPB_DESCRIPTOR_TYPE_INT32: - case UPB_DESCRIPTOR_TYPE_UINT32: - case UPB_DESCRIPTOR_TYPE_ENUM: { - uint32_t val32 = (uint32_t)val; - CHK(upb_decode_addval(msg, field, &val32, sizeof(val32), d)); - break; - } - case UPB_DESCRIPTOR_TYPE_BOOL: { - bool valbool = val != 0; - CHK(upb_decode_addval(msg, field, &valbool, sizeof(valbool), d)); - break; - } - case UPB_DESCRIPTOR_TYPE_SINT32: { - int32_t decoded = upb_zzdecode_32((uint32_t)val); - CHK(upb_decode_addval(msg, field, &decoded, sizeof(decoded), d)); - break; - } - case UPB_DESCRIPTOR_TYPE_SINT64: { - int64_t decoded = upb_zzdecode_64(val); - CHK(upb_decode_addval(msg, field, &decoded, sizeof(decoded), d)); - break; - } - default: - return upb_append_unknown(ptr, msg, d); - } - - upb_decode_setpresent(msg, field); - return ptr; +static const char *decode_togroup(upb_decstate *d, const char *ptr, + upb_msg *submsg, const upb_msglayout *layout, + const upb_msglayout_field *field) { + const upb_msglayout *subl = layout->submsgs[field->submsg_index]; + return decode_group(d, ptr, submsg, subl, field->number); } -static const char *upb_decode_64bitfield(const char *ptr, - const upb_msglayout_field *field, - upb_msg *msg, upb_decstate *d) { - uint64_t val; - CHK(ptr = upb_decode_64bit(ptr, d->limit, &val)); - - switch (field->descriptortype) { - case UPB_DESCRIPTOR_TYPE_DOUBLE: - case UPB_DESCRIPTOR_TYPE_FIXED64: - case UPB_DESCRIPTOR_TYPE_SFIXED64: - CHK(upb_decode_addval(msg, field, &val, sizeof(val), d)); - break; - default: - return upb_append_unknown(ptr, msg, d); - } - - upb_decode_setpresent(msg, field); - return ptr; -} +static const char *decode_toarray(upb_decstate *d, const char *ptr, + upb_msg *msg, const upb_msglayout *layout, + const upb_msglayout_field *field, wireval val, + int op) { + upb_array **arrp = UPB_PTR_AT(msg, field->offset, void); + upb_array *arr = *arrp; + void *mem; -static const char *upb_decode_32bitfield(const char *ptr, - const upb_msglayout_field *field, - upb_msg *msg, upb_decstate *d) { - uint32_t val; - CHK(ptr = upb_decode_32bit(ptr, d->limit, &val)); - - switch (field->descriptortype) { - case UPB_DESCRIPTOR_TYPE_FLOAT: - case UPB_DESCRIPTOR_TYPE_FIXED32: - case UPB_DESCRIPTOR_TYPE_SFIXED32: - CHK(upb_decode_addval(msg, field, &val, sizeof(val), d)); - break; - default: - return upb_append_unknown(ptr, msg, d); + if (!arr) { + upb_fieldtype_t type = desctype_to_fieldtype[field->descriptortype]; + arr = _upb_array_new(d->arena, type); + if (!arr) decode_err(d); + *arrp = arr; } - upb_decode_setpresent(msg, field); - return ptr; -} - -static const char *upb_decode_fixedpacked(const char *ptr, upb_decstate *d, - upb_array *arr, uint32_t len, - int elem_size) { - size_t elements = len / elem_size; - - CHK((size_t)(elements * elem_size) == len); - CHK(upb_array_add(arr, elements, elem_size, ptr, d->arena)); - return ptr + len; -} - -static const char *upb_decode_strfield(const char *ptr, upb_decstate *d, - uint32_t len, upb_strview *str) { - str->data = ptr; - str->size = len; - return ptr + len; -} + decode_reserve(d, arr, 1); -static const char *upb_decode_toarray(const char *ptr, - const upb_msglayout *layout, - const upb_msglayout_field *field, int len, - upb_msg *msg, upb_decstate *d) { - upb_array *arr = upb_getorcreatearr(msg, field, d); - CHK(arr); - -#define VARINT_CASE(ctype, decode) \ - VARINT_CASE_EX(ctype, decode, decode) - -#define VARINT_CASE_EX(ctype, decode, dtype) \ - { \ - const char *limit = ptr + len; \ - while (ptr < limit) { \ - uint64_t val; \ - ctype decoded; \ - CHK(ptr = upb_decode_varint(ptr, limit, &val)); \ - decoded = (decode)((dtype)val); \ - CHK(upb_array_add(arr, 1, sizeof(decoded), &decoded, d->arena)); \ - } \ - return ptr; \ - } - - switch (field->descriptortype) { - case UPB_DESCRIPTOR_TYPE_STRING: - case UPB_DESCRIPTOR_TYPE_BYTES: { - upb_strview str; - ptr = upb_decode_strfield(ptr, d, len, &str); - CHK(upb_array_add(arr, 1, sizeof(str), &str, d->arena)); + switch (op) { + case OP_SCALAR_LG2(0): + case OP_SCALAR_LG2(2): + case OP_SCALAR_LG2(3): + /* Append scalar value. */ + mem = UPB_PTR_AT(_upb_array_ptr(arr), arr->len << op, void); + arr->len++; + memcpy(mem, &val, 1 << op); + return ptr; + case OP_STRING: + /* Append string. */ + mem = + UPB_PTR_AT(_upb_array_ptr(arr), arr->len * sizeof(upb_strview), void); + arr->len++; + memcpy(mem, &val, sizeof(upb_strview)); + return ptr; + case OP_SUBMSG: { + /* Append submessage / group. */ + upb_msg *submsg = decode_newsubmsg(d, layout, field); + *UPB_PTR_AT(_upb_array_ptr(arr), arr->len * sizeof(void *), upb_msg *) = + submsg; + arr->len++; + if (UPB_UNLIKELY(field->descriptortype == UPB_DTYPE_GROUP)) { + ptr = decode_togroup(d, ptr, submsg, layout, field); + } else { + decode_tosubmsg(d, submsg, layout, field, val.str_val); + } return ptr; } - case UPB_DESCRIPTOR_TYPE_FLOAT: - case UPB_DESCRIPTOR_TYPE_FIXED32: - case UPB_DESCRIPTOR_TYPE_SFIXED32: - return upb_decode_fixedpacked(ptr, d, arr, len, sizeof(int32_t)); - case UPB_DESCRIPTOR_TYPE_DOUBLE: - case UPB_DESCRIPTOR_TYPE_FIXED64: - case UPB_DESCRIPTOR_TYPE_SFIXED64: - return upb_decode_fixedpacked(ptr, d, arr, len, sizeof(int64_t)); - case UPB_DESCRIPTOR_TYPE_INT32: - case UPB_DESCRIPTOR_TYPE_UINT32: - case UPB_DESCRIPTOR_TYPE_ENUM: - VARINT_CASE(uint32_t, uint32_t); - case UPB_DESCRIPTOR_TYPE_INT64: - case UPB_DESCRIPTOR_TYPE_UINT64: - VARINT_CASE(uint64_t, uint64_t); - case UPB_DESCRIPTOR_TYPE_BOOL: - VARINT_CASE(bool, bool); - case UPB_DESCRIPTOR_TYPE_SINT32: - VARINT_CASE_EX(int32_t, upb_zzdecode_32, uint32_t); - case UPB_DESCRIPTOR_TYPE_SINT64: - VARINT_CASE_EX(int64_t, upb_zzdecode_64, uint64_t); - case UPB_DESCRIPTOR_TYPE_MESSAGE: { - const upb_msglayout *subl = layout->submsgs[field->submsg_index]; - upb_msg *submsg = upb_addmsg(msg, field, subl, d); - CHK(submsg); - return upb_decode_msgfield(ptr, subl, len, submsg, d); + case OP_FIXPCK_LG2(2): + case OP_FIXPCK_LG2(3): { + /* Fixed packed. */ + int lg2 = op - OP_FIXPCK_LG2(0); + int mask = (1 << lg2) - 1; + int count = val.str_val.size >> lg2; + if ((val.str_val.size & mask) != 0) { + decode_err(d); /* Length isn't a round multiple of elem size. */ + } + decode_reserve(d, arr, count); + mem = UPB_PTR_AT(_upb_array_ptr(arr), arr->len << lg2, void); + arr->len += count; + memcpy(mem, val.str_val.data, val.str_val.size); + return ptr; + } + case OP_VARPCK_LG2(0): + case OP_VARPCK_LG2(2): + case OP_VARPCK_LG2(3): { + /* Varint packed. */ + int lg2 = op - OP_VARPCK_LG2(0); + int scale = 1 << lg2; + const char *ptr = val.str_val.data; + const char *end = ptr + val.str_val.size; + char *out = UPB_PTR_AT(_upb_array_ptr(arr), arr->len << lg2, void); + while (ptr < end) { + wireval elem; + ptr = decode_varint64(d, ptr, end, &elem.uint64_val); + decode_munge(field->descriptortype, &elem); + if (decode_reserve(d, arr, 1)) { + out = UPB_PTR_AT(_upb_array_ptr(arr), arr->len << lg2, void); + } + arr->len++; + memcpy(out, &elem, scale); + out += scale; + } + if (ptr != end) decode_err(d); + return ptr; } - case UPB_DESCRIPTOR_TYPE_GROUP: - return upb_append_unknown(ptr, msg, d); + default: + UPB_UNREACHABLE(); } -#undef VARINT_CASE - UPB_UNREACHABLE(); } -static const char *upb_decode_mapfield(const char *ptr, - const upb_msglayout *layout, - const upb_msglayout_field *field, - int len, upb_msg *msg, upb_decstate *d) { - upb_map *map = *PTR_AT(msg, field->offset, upb_map*); - const upb_msglayout *entry = layout->submsgs[field->submsg_index]; +static void decode_tomap(upb_decstate *d, upb_msg *msg, + const upb_msglayout *layout, + const upb_msglayout_field *field, wireval val) { + upb_map **map_p = UPB_PTR_AT(msg, field->offset, upb_map *); + upb_map *map = *map_p; upb_map_entry ent; + const upb_msglayout *entry = layout->submsgs[field->submsg_index]; if (!map) { /* Lazily create map. */ + const upb_msglayout *entry = layout->submsgs[field->submsg_index]; const upb_msglayout_field *key_field = &entry->fields[0]; const upb_msglayout_field *val_field = &entry->fields[1]; char key_size = desctype_to_mapsize[key_field->descriptortype]; char val_size = desctype_to_mapsize[val_field->descriptortype]; - UPB_ASSERT(key_field->number == 1); - UPB_ASSERT(val_field->number == 2); UPB_ASSERT(key_field->offset == 0); UPB_ASSERT(val_field->offset == sizeof(upb_strview)); map = _upb_map_new(d->arena, key_size, val_size); - *PTR_AT(msg, field->offset, upb_map*) = map; + *map_p = map; } /* Parse map entry. */ memset(&ent, 0, sizeof(ent)); - CHK(ptr = upb_decode_msgfield(ptr, entry, len, &ent.k, d)); + + if (entry->fields[1].descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE || + entry->fields[1].descriptortype == UPB_DESCRIPTOR_TYPE_GROUP) { + /* Create proactively to handle the case where it doesn't appear. */ + ent.v.val.val = (uint64_t)_upb_msg_new(entry->submsgs[0], d->arena); + } + + decode_tosubmsg(d, &ent.k, layout, field, val.str_val); /* Insert into map. */ _upb_map_set(map, &ent.k, map->key_size, &ent.v, map->val_size, d->arena); - return ptr; } -static const char *upb_decode_delimitedfield(const char *ptr, - const upb_msglayout *layout, - const upb_msglayout_field *field, - upb_msg *msg, upb_decstate *d) { - int len; - - CHK(ptr = upb_decode_string(ptr, d->limit, &len)); +static const char *decode_tomsg(upb_decstate *d, const char *ptr, upb_msg *msg, + const upb_msglayout *layout, + const upb_msglayout_field *field, wireval val, + int op) { + void *mem = UPB_PTR_AT(msg, field->offset, void); + int type = field->descriptortype; - if (field->label == UPB_LABEL_REPEATED) { - return upb_decode_toarray(ptr, layout, field, len, msg, d); - } else if (field->label == UPB_LABEL_MAP) { - return upb_decode_mapfield(ptr, layout, field, len, msg, d); - } else { - switch (field->descriptortype) { - case UPB_DESCRIPTOR_TYPE_STRING: - case UPB_DESCRIPTOR_TYPE_BYTES: { - upb_strview str; - ptr = upb_decode_strfield(ptr, d, len, &str); - CHK(upb_decode_addval(msg, field, &str, sizeof(str), d)); - break; - } - case UPB_DESCRIPTOR_TYPE_MESSAGE: { - const upb_msglayout *subl = layout->submsgs[field->submsg_index]; - upb_msg *submsg = upb_getorcreatemsg(msg, field, subl, d); - CHK(submsg); - CHK(ptr = upb_decode_msgfield(ptr, subl, len, submsg, d)); - break; - } - default: - /* TODO(haberman): should we accept the last element of a packed? */ - return upb_append_unknown(ptr + len, msg, d); + /* Set presence if necessary. */ + if (field->presence < 0) { + /* Oneof case */ + int32_t *oneof_case = UPB_PTR_AT(msg, -field->presence, int32_t); + if (op == OP_SUBMSG && *oneof_case != field->number) { + memset(mem, 0, sizeof(void*)); } - upb_decode_setpresent(msg, field); - return ptr; + *oneof_case = field->number; + } else if (field->presence > 0) { + /* Hasbit */ + uint32_t hasbit = field->presence; + *UPB_PTR_AT(msg, hasbit / 8, uint8_t) |= (1 << (hasbit % 8)); } -} -static const upb_msglayout_field *upb_find_field(const upb_msglayout *l, - uint32_t field_number) { - /* Lots of optimization opportunities here. */ - int i; - for (i = 0; i < l->field_count; i++) { - if (l->fields[i].number == field_number) { - return &l->fields[i]; + /* Store into message. */ + switch (op) { + case OP_SUBMSG: { + upb_msg **submsgp = mem; + upb_msg *submsg = *submsgp; + if (!submsg) { + submsg = decode_newsubmsg(d, layout, field); + *submsgp = submsg; + } + if (UPB_UNLIKELY(type == UPB_DTYPE_GROUP)) { + ptr = decode_togroup(d, ptr, submsg, layout, field); + } else { + decode_tosubmsg(d, submsg, layout, field, val.str_val); + } + break; } + case OP_STRING: + memcpy(mem, &val, sizeof(upb_strview)); + break; + case OP_SCALAR_LG2(3): + memcpy(mem, &val, 8); + break; + case OP_SCALAR_LG2(2): + memcpy(mem, &val, 4); + break; + case OP_SCALAR_LG2(0): + memcpy(mem, &val, 1); + break; + default: + UPB_UNREACHABLE(); } - return NULL; /* Unknown field. */ + return ptr; } -static const char *upb_decode_field(const char *ptr, - const upb_msglayout *layout, upb_msg *msg, - upb_decstate *d) { - uint32_t tag; - const upb_msglayout_field *field; - int field_number; +static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg, + const upb_msglayout *layout) { + while (ptr < d->limit) { + uint32_t tag; + const upb_msglayout_field *field; + int field_number; + int wire_type; + const char *field_start = ptr; + wireval val; + int op; + + ptr = decode_varint32(d, ptr, d->limit, &tag); + field_number = tag >> 3; + wire_type = tag & 7; - d->field_start = ptr; - CHK(ptr = upb_decode_varint32(ptr, d->limit, &tag)); - field_number = tag >> 3; - field = upb_find_field(layout, field_number); + field = upb_find_field(layout, field_number); - if (field) { - switch (tag & 7) { + switch (wire_type) { case UPB_WIRE_TYPE_VARINT: - return upb_decode_varintfield(ptr, msg, field, d); + ptr = decode_varint64(d, ptr, d->limit, &val.uint64_val); + op = varint_ops[field->descriptortype]; + decode_munge(field->descriptortype, &val); + break; case UPB_WIRE_TYPE_32BIT: - return upb_decode_32bitfield(ptr, field, msg, d); + if (d->limit - ptr < 4) decode_err(d); + memcpy(&val, ptr, 4); + ptr += 4; + op = OP_SCALAR_LG2(2); + if (((1 << field->descriptortype) & fixed32_ok) == 0) goto unknown; + break; case UPB_WIRE_TYPE_64BIT: - return upb_decode_64bitfield(ptr, field, msg, d); - case UPB_WIRE_TYPE_DELIMITED: - return upb_decode_delimitedfield(ptr, layout, field, msg, d); - case UPB_WIRE_TYPE_START_GROUP: { - const upb_msglayout *subl = layout->submsgs[field->submsg_index]; - upb_msg *group; - - if (field->label == UPB_LABEL_REPEATED) { - group = upb_addmsg(msg, field, subl, d); - } else { - group = upb_getorcreatemsg(msg, field, subl, d); + if (d->limit - ptr < 8) decode_err(d); + memcpy(&val, ptr, 8); + ptr += 8; + op = OP_SCALAR_LG2(3); + if (((1 << field->descriptortype) & fixed64_ok) == 0) goto unknown; + break; + case UPB_WIRE_TYPE_DELIMITED: { + uint32_t size; + int ndx = field->descriptortype; + if (_upb_isrepeated(field)) ndx += 18; + ptr = decode_varint32(d, ptr, d->limit, &size); + if (size >= INT32_MAX || (size_t)(d->limit - ptr) < size) { + decode_err(d); /* Length overflow. */ } - - return upb_decode_groupfield(ptr, subl, field_number, group, d); + val.str_val.data = ptr; + val.str_val.size = size; + ptr += size; + op = delim_ops[ndx]; + break; } + case UPB_WIRE_TYPE_START_GROUP: + val.int32_val = field_number; + op = OP_SUBMSG; + if (field->descriptortype != UPB_DTYPE_GROUP) goto unknown; + break; case UPB_WIRE_TYPE_END_GROUP: d->end_group = field_number; return ptr; default: - CHK(false); + decode_err(d); } - } else { - CHK(field_number != 0); - CHK(ptr = upb_skip_unknownfielddata(ptr, d, tag)); - CHK(ptr = upb_append_unknown(ptr, msg, d)); - return ptr; - } - UPB_UNREACHABLE(); -} -static const char *upb_decode_message(const char *ptr, const upb_msglayout *l, - upb_msg *msg, upb_decstate *d) { - while (ptr < d->limit) { - CHK(ptr = upb_decode_field(ptr, l, msg, d)); + if (op >= 0) { + /* Parse, using op for dispatch. */ + switch (field->label) { + case UPB_LABEL_REPEATED: + case _UPB_LABEL_PACKED: + ptr = decode_toarray(d, ptr, msg, layout, field, val, op); + break; + case _UPB_LABEL_MAP: + decode_tomap(d, msg, layout, field, val); + break; + default: + ptr = decode_tomsg(d, ptr, msg, layout, field, val, op); + break; + } + } else { + unknown: + /* Skip unknown field. */ + if (field_number == 0) decode_err(d); + if (wire_type == UPB_WIRE_TYPE_START_GROUP) { + ptr = decode_group(d, ptr, NULL, NULL, field_number); + } + if (msg) { + if (!_upb_msg_addunknown(msg, field_start, ptr - field_start, + d->arena)) { + decode_err(d); + } + } + } } + if (ptr != d->limit) decode_err(d); return ptr; } @@ -622,12 +559,16 @@ bool upb_decode(const char *buf, size_t size, void *msg, const upb_msglayout *l, state.depth = 64; state.end_group = 0; - /* Early exit required for buf==NULL case. */ + if (setjmp(state.err)) return false; + if (size == 0) return true; + decode_msg(&state, buf, msg, l); - CHK(upb_decode_message(buf, l, msg, &state)); return state.end_group == 0; } -#undef CHK -#undef PTR_AT +#undef OP_SCALAR_LG2 +#undef OP_FIXPCK_LG2 +#undef OP_VARPCK_LG2 +#undef OP_STRING +#undef OP_SUBMSG diff --git a/upb/def.c b/upb/def.c index f1b477bdc90..50dccd8ff1e 100644 --- a/upb/def.c +++ b/upb/def.c @@ -49,6 +49,7 @@ struct upb_fielddef { bool is_extension_; bool lazy_; bool packed_; + bool proto3_optional_; upb_descriptortype_t type_; upb_label_t label_; }; @@ -68,6 +69,7 @@ struct upb_msgdef { const upb_oneofdef *oneofs; int field_count; int oneof_count; + int real_oneof_count; /* Is this a map-entry message? */ bool map_entry; @@ -239,11 +241,14 @@ static uint32_t upb_handlers_selectorcount(const upb_fielddef *f) { return ret; } +static void upb_status_setoom(upb_status *status) { + upb_status_seterrmsg(status, "out of memory"); +} + static bool assign_msg_indices(upb_msgdef *m, upb_status *s) { /* Sort fields. upb internally relies on UPB_TYPE_MESSAGE fields having the * lowest indexes, but we do not publicly guarantee this. */ upb_msg_field_iter j; - upb_msg_oneof_iter k; int i; uint32_t selector; int n = upb_msgdef_numfields(m); @@ -284,14 +289,38 @@ static bool assign_msg_indices(upb_msgdef *m, upb_status *s) { } m->selector_count = selector; - for(upb_msg_oneof_begin(&k, m), i = 0; - !upb_msg_oneof_done(&k); - upb_msg_oneof_next(&k), i++) { - upb_oneofdef *o = (upb_oneofdef*)upb_msg_iter_oneof(&k); - o->index = i; + upb_gfree(fields); + return true; +} + +static bool check_oneofs(upb_msgdef *m, upb_status *s) { + int i; + int first_synthetic = -1; + upb_oneofdef *mutable_oneofs = (upb_oneofdef*)m->oneofs; + + for (i = 0; i < m->oneof_count; i++) { + mutable_oneofs[i].index = i; + + if (upb_oneofdef_issynthetic(&mutable_oneofs[i])) { + if (first_synthetic == -1) { + first_synthetic = i; + } + } else { + if (first_synthetic != -1) { + upb_status_seterrf( + s, "Synthetic oneofs must be after all other oneofs: %s", + upb_oneofdef_name(&mutable_oneofs[i])); + return false; + } + } + } + + if (first_synthetic == -1) { + m->real_oneof_count = m->oneof_count; + } else { + m->real_oneof_count = first_synthetic; } - upb_gfree(fields); return true; } @@ -476,6 +505,10 @@ uint32_t upb_fielddef_selectorbase(const upb_fielddef *f) { return f->selector_base; } +const upb_filedef *upb_fielddef_file(const upb_fielddef *f) { + return f->file; +} + const upb_msgdef *upb_fielddef_containingtype(const upb_fielddef *f) { return f->msgdef; } @@ -484,6 +517,11 @@ const upb_oneofdef *upb_fielddef_containingoneof(const upb_fielddef *f) { return f->oneof; } +const upb_oneofdef *upb_fielddef_realcontainingoneof(const upb_fielddef *f) { + if (!f->oneof || upb_oneofdef_issynthetic(f->oneof)) return NULL; + return f->oneof; +} + static void chkdefaulttype(const upb_fielddef *f, int ctype) { UPB_UNUSED(f); UPB_UNUSED(ctype); @@ -539,13 +577,11 @@ const char *upb_fielddef_defaultstr(const upb_fielddef *f, size_t *len) { } const upb_msgdef *upb_fielddef_msgsubdef(const upb_fielddef *f) { - UPB_ASSERT(upb_fielddef_type(f) == UPB_TYPE_MESSAGE); - return f->sub.msgdef; + return upb_fielddef_type(f) == UPB_TYPE_MESSAGE ? f->sub.msgdef : NULL; } const upb_enumdef *upb_fielddef_enumsubdef(const upb_fielddef *f) { - UPB_ASSERT(upb_fielddef_type(f) == UPB_TYPE_ENUM); - return f->sub.enumdef; + return upb_fielddef_type(f) == UPB_TYPE_ENUM ? f->sub.enumdef : NULL; } const upb_msglayout_field *upb_fielddef_layout(const upb_fielddef *f) { @@ -580,9 +616,8 @@ bool upb_fielddef_hassubdef(const upb_fielddef *f) { bool upb_fielddef_haspresence(const upb_fielddef *f) { if (upb_fielddef_isseq(f)) return false; - if (upb_fielddef_issubmsg(f)) return true; - if (upb_fielddef_containingoneof(f)) return true; - return f->file->syntax == UPB_SYNTAX_PROTO2; + return upb_fielddef_issubmsg(f) || upb_fielddef_containingoneof(f) || + f->file->syntax == UPB_SYNTAX_PROTO2; } static bool between(int32_t x, int32_t low, int32_t high) { @@ -687,6 +722,10 @@ int upb_msgdef_numoneofs(const upb_msgdef *m) { return m->oneof_count; } +int upb_msgdef_numrealoneofs(const upb_msgdef *m) { + return m->real_oneof_count; +} + const upb_msglayout *upb_msgdef_layout(const upb_msgdef *m) { return m->layout; } @@ -710,6 +749,12 @@ bool upb_msgdef_isnumberwrapper(const upb_msgdef *m) { type <= UPB_WELLKNOWN_UINT32VALUE; } +bool upb_msgdef_iswrapper(const upb_msgdef *m) { + upb_wellknowntype_t type = upb_msgdef_wellknowntype(m); + return type >= UPB_WELLKNOWN_DOUBLEVALUE && + type <= UPB_WELLKNOWN_BOOLVALUE; +} + void upb_msg_field_begin(upb_msg_field_iter *iter, const upb_msgdef *m) { upb_inttable_begin(iter, &m->itof); } @@ -785,6 +830,16 @@ uint32_t upb_oneofdef_index(const upb_oneofdef *o) { return o->index; } +bool upb_oneofdef_issynthetic(const upb_oneofdef *o) { + upb_inttable_iter iter; + const upb_fielddef *f; + upb_inttable_begin(&iter, &o->itof); + if (upb_oneofdef_numfields(o) != 1) return false; + f = upb_value_getptr(upb_inttable_iter_value(&iter)); + UPB_ASSERT(f); + return f->proto3_optional_; +} + const upb_fielddef *upb_oneofdef_ntof(const upb_oneofdef *o, const char *name, size_t length) { upb_value val; @@ -820,16 +875,6 @@ void upb_oneof_iter_setdone(upb_oneof_iter *iter) { /* Dynamic Layout Generation. *************************************************/ -static bool is_power_of_two(size_t val) { - return (val & (val - 1)) == 0; -} - -/* Align up to the given power of 2. */ -static size_t align_up(size_t val, size_t align) { - UPB_ASSERT(is_power_of_two(align)); - return (val + align - 1) & ~(align - 1); -} - static size_t div_round_up(size_t n, size_t d) { return (n + d - 1) / d; } @@ -871,7 +916,7 @@ static uint8_t upb_msg_fielddefsize(const upb_fielddef *f) { static uint32_t upb_msglayout_place(upb_msglayout *l, size_t size) { uint32_t ret; - l->size = align_up(l->size, size); + l->size = UPB_ALIGN_UP(l->size, size); ret = l->size; l->size += size; return ret; @@ -926,7 +971,8 @@ static bool make_layout(const upb_symtab *symtab, const upb_msgdef *m) { } l->field_count = 2; - l->size = 2 * sizeof(upb_strview);align_up(l->size, 8); + l->size = 2 * sizeof(upb_strview); + l->size = UPB_ALIGN_UP(l->size, 8); return true; } @@ -952,7 +998,9 @@ static bool make_layout(const upb_symtab *symtab, const upb_msgdef *m) { field->label = upb_fielddef_label(f); if (upb_fielddef_ismap(f)) { - field->label = UPB_LABEL_MAP; + field->label = _UPB_LABEL_MAP; + } else if (upb_fielddef_packed(f)) { + field->label = _UPB_LABEL_PACKED; } /* TODO: we probably should sort the fields by field number to match the @@ -965,7 +1013,7 @@ static bool make_layout(const upb_symtab *symtab, const upb_msgdef *m) { submsgs[field->submsg_index] = subm->layout; } - if (upb_fielddef_haspresence(f) && !upb_fielddef_containingoneof(f)) { + if (upb_fielddef_haspresence(f) && !upb_fielddef_realcontainingoneof(f)) { /* We don't use hasbit 0, so that 0 can indicate "no presence" in the * table. This wastes one hasbit, but we don't worry about it for now. */ field->presence = ++hasbit; @@ -984,7 +1032,7 @@ static bool make_layout(const upb_symtab *symtab, const upb_msgdef *m) { size_t field_size = upb_msg_fielddefsize(f); size_t index = upb_fielddef_index(f); - if (upb_fielddef_containingoneof(f)) { + if (upb_fielddef_realcontainingoneof(f)) { /* Oneofs are handled separately below. */ continue; } @@ -1004,6 +1052,8 @@ static bool make_layout(const upb_symtab *symtab, const upb_msgdef *m) { uint32_t case_offset; uint32_t data_offset; + if (upb_oneofdef_issynthetic(o)) continue; + /* Calculate field size: the max of all field sizes. */ for (upb_oneof_begin(&fit, o); !upb_oneof_done(&fit); @@ -1027,7 +1077,7 @@ static bool make_layout(const upb_symtab *symtab, const upb_msgdef *m) { /* Size of the entire structure should be a multiple of its greatest * alignment. TODO: track overall alignment for real? */ - l->size = align_up(l->size, 8); + l->size = UPB_ALIGN_UP(l->size, 8); return true; } @@ -1145,7 +1195,7 @@ static bool resolvename(const upb_strtable *t, const upb_fielddef *f, const char *base, upb_strview sym, upb_deftype_t type, upb_status *status, const void **def) { - if(sym.size == 0) return NULL; + if(sym.size == 0) return false; if(sym.data[0] == '.') { /* Symbols starting with '.' are absolute, so we do a single lookup. * Slice to omit the leading '.' */ @@ -1433,6 +1483,8 @@ static bool create_fielddef( f->label_ = (int)google_protobuf_FieldDescriptorProto_label(field_proto); f->number_ = field_number; f->oneof = NULL; + f->proto3_optional_ = + google_protobuf_FieldDescriptorProto_proto3_optional(field_proto); /* We can't resolve the subdef or (in the case of extensions) the containing * message yet, because it may not have been defined yet. We stash a pointer @@ -1609,6 +1661,7 @@ static bool create_msgdef(symtab_addctx *ctx, const char *prefix, } CHK(assign_msg_indices(m, ctx->status)); + CHK(check_oneofs(m, ctx->status)); assign_msg_wellknowntype(m); upb_inttable_compact2(&m->itof, ctx->alloc); @@ -1993,6 +2046,13 @@ const upb_filedef *upb_symtab_lookupfile(const upb_symtab *s, const char *name) : NULL; } +const upb_filedef *upb_symtab_lookupfile2( + const upb_symtab *s, const char *name, size_t len) { + upb_value v; + return upb_strtable_lookup2(&s->files, name, len, &v) ? + upb_value_getconstptr(v) : NULL; +} + int upb_symtab_filecount(const upb_symtab *s) { return (int)upb_strtable_count(&s->files); } diff --git a/upb/def.h b/upb/def.h index 48e113dffee..a7ce5d0b3c7 100644 --- a/upb/def.h +++ b/upb/def.h @@ -2,16 +2,13 @@ ** Defs are upb's internal representation of the constructs that can appear ** in a .proto file: ** -** - upb::MessageDefPtr (upb_msgdef): describes a "message" construct. -** - upb::FieldDefPtr (upb_fielddef): describes a message field. -** - upb::FileDefPtr (upb_filedef): describes a .proto file and its defs. -** - upb::EnumDefPtr (upb_enumdef): describes an enum. -** - upb::OneofDefPtr (upb_oneofdef): describes a oneof. +** - upb_msgdef: describes a "message" construct. +** - upb_fielddef: describes a message field. +** - upb_filedef: describes a .proto file and its defs. +** - upb_enumdef: describes an enum. +** - upb_oneofdef: describes a oneof. ** ** TODO: definitions of services. -** -** This is a mixed C/C++ interface that offers a full API to both languages. -** See the top-level README for more information. */ #ifndef UPB_DEF_H_ @@ -21,24 +18,12 @@ #include "upb/table.int.h" #include "google/protobuf/descriptor.upb.h" -#ifdef __cplusplus -#include -#include -#include -#include - -namespace upb { -class EnumDefPtr; -class FieldDefPtr; -class FileDefPtr; -class MessageDefPtr; -class OneofDefPtr; -class SymbolTable; -} -#endif - #include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + struct upb_enumdef; typedef struct upb_enumdef upb_enumdef; struct upb_fielddef; @@ -89,10 +74,6 @@ typedef enum { * protobuf wire format. */ #define UPB_MAX_FIELDNUMBER ((1 << 29) - 1) -#ifdef __cplusplus -extern "C" { -#endif - const char *upb_fielddef_fullname(const upb_fielddef *f); upb_fieldtype_t upb_fielddef_type(const upb_fielddef *f); upb_descriptortype_t upb_fielddef_descriptortype(const upb_fielddef *f); @@ -103,8 +84,10 @@ const char *upb_fielddef_jsonname(const upb_fielddef *f); bool upb_fielddef_isextension(const upb_fielddef *f); bool upb_fielddef_lazy(const upb_fielddef *f); bool upb_fielddef_packed(const upb_fielddef *f); +const upb_filedef *upb_fielddef_file(const upb_fielddef *f); const upb_msgdef *upb_fielddef_containingtype(const upb_fielddef *f); const upb_oneofdef *upb_fielddef_containingoneof(const upb_fielddef *f); +const upb_oneofdef *upb_fielddef_realcontainingoneof(const upb_fielddef *f); uint32_t upb_fielddef_index(const upb_fielddef *f); bool upb_fielddef_issubmsg(const upb_fielddef *f); bool upb_fielddef_isstring(const upb_fielddef *f); @@ -128,129 +111,15 @@ const upb_msglayout_field *upb_fielddef_layout(const upb_fielddef *f); /* Internal only. */ uint32_t upb_fielddef_selectorbase(const upb_fielddef *f); -#ifdef __cplusplus -} /* extern "C" */ - -/* A upb_fielddef describes a single field in a message. It is most often - * found as a part of a upb_msgdef, but can also stand alone to represent - * an extension. */ -class upb::FieldDefPtr { - public: - FieldDefPtr() : ptr_(nullptr) {} - explicit FieldDefPtr(const upb_fielddef *ptr) : ptr_(ptr) {} - - const upb_fielddef* ptr() const { return ptr_; } - explicit operator bool() const { return ptr_ != nullptr; } - - typedef upb_fieldtype_t Type; - typedef upb_label_t Label; - typedef upb_descriptortype_t DescriptorType; - - const char* full_name() const { return upb_fielddef_fullname(ptr_); } - - Type type() const { return upb_fielddef_type(ptr_); } - Label label() const { return upb_fielddef_label(ptr_); } - const char* name() const { return upb_fielddef_name(ptr_); } - const char* json_name() const { return upb_fielddef_jsonname(ptr_); } - uint32_t number() const { return upb_fielddef_number(ptr_); } - bool is_extension() const { return upb_fielddef_isextension(ptr_); } - - /* For UPB_TYPE_MESSAGE fields only where is_tag_delimited() == false, - * indicates whether this field should have lazy parsing handlers that yield - * the unparsed string for the submessage. - * - * TODO(haberman): I think we want to move this into a FieldOptions container - * when we add support for custom options (the FieldOptions struct will - * contain both regular FieldOptions like "lazy" *and* custom options). */ - bool lazy() const { return upb_fielddef_lazy(ptr_); } - - /* For non-string, non-submessage fields, this indicates whether binary - * protobufs are encoded in packed or non-packed format. - * - * TODO(haberman): see note above about putting options like this into a - * FieldOptions container. */ - bool packed() const { return upb_fielddef_packed(ptr_); } - - /* An integer that can be used as an index into an array of fields for - * whatever message this field belongs to. Guaranteed to be less than - * f->containing_type()->field_count(). May only be accessed once the def has - * been finalized. */ - uint32_t index() const { return upb_fielddef_index(ptr_); } - - /* The MessageDef to which this field belongs. - * - * If this field has been added to a MessageDef, that message can be retrieved - * directly (this is always the case for frozen FieldDefs). - * - * If the field has not yet been added to a MessageDef, you can set the name - * of the containing type symbolically instead. This is mostly useful for - * extensions, where the extension is declared separately from the message. */ - MessageDefPtr containing_type() const; - - /* The OneofDef to which this field belongs, or NULL if this field is not part - * of a oneof. */ - OneofDefPtr containing_oneof() const; - - /* The field's type according to the enum in descriptor.proto. This is not - * the same as UPB_TYPE_*, because it distinguishes between (for example) - * INT32 and SINT32, whereas our "type" enum does not. This return of - * descriptor_type() is a function of type(), integer_format(), and - * is_tag_delimited(). */ - DescriptorType descriptor_type() const { - return upb_fielddef_descriptortype(ptr_); - } - - /* Convenient field type tests. */ - bool IsSubMessage() const { return upb_fielddef_issubmsg(ptr_); } - bool IsString() const { return upb_fielddef_isstring(ptr_); } - bool IsSequence() const { return upb_fielddef_isseq(ptr_); } - bool IsPrimitive() const { return upb_fielddef_isprimitive(ptr_); } - bool IsMap() const { return upb_fielddef_ismap(ptr_); } - - /* Returns the non-string default value for this fielddef, which may either - * be something the client set explicitly or the "default default" (0 for - * numbers, empty for strings). The field's type indicates the type of the - * returned value, except for enum fields that are still mutable. - * - * Requires that the given function matches the field's current type. */ - int64_t default_int64() const { return upb_fielddef_defaultint64(ptr_); } - int32_t default_int32() const { return upb_fielddef_defaultint32(ptr_); } - uint64_t default_uint64() const { return upb_fielddef_defaultuint64(ptr_); } - uint32_t default_uint32() const { return upb_fielddef_defaultuint32(ptr_); } - bool default_bool() const { return upb_fielddef_defaultbool(ptr_); } - float default_float() const { return upb_fielddef_defaultfloat(ptr_); } - double default_double() const { return upb_fielddef_defaultdouble(ptr_); } - - /* The resulting string is always NULL-terminated. If non-NULL, the length - * will be stored in *len. */ - const char *default_string(size_t * len) const { - return upb_fielddef_defaultstr(ptr_, len); - } - - /* Returns the enum or submessage def for this field, if any. The field's - * type must match (ie. you may only call enum_subdef() for fields where - * type() == UPB_TYPE_ENUM). */ - EnumDefPtr enum_subdef() const; - MessageDefPtr message_subdef() const; - - private: - const upb_fielddef *ptr_; -}; - -#endif /* __cplusplus */ - /* upb_oneofdef ***************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - typedef upb_inttable_iter upb_oneof_iter; const char *upb_oneofdef_name(const upb_oneofdef *o); const upb_msgdef *upb_oneofdef_containingtype(const upb_oneofdef *o); int upb_oneofdef_numfields(const upb_oneofdef *o); uint32_t upb_oneofdef_index(const upb_oneofdef *o); +bool upb_oneofdef_issynthetic(const upb_oneofdef *o); /* Oneof lookups: * - ntof: look up a field by name. @@ -277,92 +146,6 @@ void upb_oneof_iter_setdone(upb_oneof_iter *iter); bool upb_oneof_iter_isequal(const upb_oneof_iter *iter1, const upb_oneof_iter *iter2); -#ifdef __cplusplus -} /* extern "C" */ - -/* Class that represents a oneof. */ -class upb::OneofDefPtr { - public: - OneofDefPtr() : ptr_(nullptr) {} - explicit OneofDefPtr(const upb_oneofdef *ptr) : ptr_(ptr) {} - - const upb_oneofdef* ptr() const { return ptr_; } - explicit operator bool() { return ptr_ != nullptr; } - - /* Returns the MessageDef that owns this OneofDef. */ - MessageDefPtr containing_type() const; - - /* Returns the name of this oneof. This is the name used to look up the oneof - * by name once added to a message def. */ - const char* name() const { return upb_oneofdef_name(ptr_); } - - /* Returns the number of fields currently defined in the oneof. */ - int field_count() const { return upb_oneofdef_numfields(ptr_); } - - /* Looks up by name. */ - FieldDefPtr FindFieldByName(const char *name, size_t len) const { - return FieldDefPtr(upb_oneofdef_ntof(ptr_, name, len)); - } - FieldDefPtr FindFieldByName(const char* name) const { - return FieldDefPtr(upb_oneofdef_ntofz(ptr_, name)); - } - - template - FieldDefPtr FindFieldByName(const T& str) const { - return FindFieldByName(str.c_str(), str.size()); - } - - /* Looks up by tag number. */ - FieldDefPtr FindFieldByNumber(uint32_t num) const { - return FieldDefPtr(upb_oneofdef_itof(ptr_, num)); - } - - class const_iterator - : public std::iterator { - public: - void operator++() { upb_oneof_next(&iter_); } - - FieldDefPtr operator*() const { - return FieldDefPtr(upb_oneof_iter_field(&iter_)); - } - - bool operator!=(const const_iterator& other) const { - return !upb_oneof_iter_isequal(&iter_, &other.iter_); - } - - bool operator==(const const_iterator& other) const { - return upb_oneof_iter_isequal(&iter_, &other.iter_); - } - - private: - friend class OneofDefPtr; - - const_iterator() {} - explicit const_iterator(OneofDefPtr o) { - upb_oneof_begin(&iter_, o.ptr()); - } - static const_iterator end() { - const_iterator iter; - upb_oneof_iter_setdone(&iter.iter_); - return iter; - } - - upb_oneof_iter iter_; - }; - - const_iterator begin() const { return const_iterator(*this); } - const_iterator end() const { return const_iterator::end(); } - - private: - const upb_oneofdef *ptr_; -}; - -inline upb::OneofDefPtr upb::FieldDefPtr::containing_oneof() const { - return OneofDefPtr(upb_fielddef_containingoneof(ptr_)); -} - -#endif /* __cplusplus */ - /* upb_msgdef *****************************************************************/ typedef upb_inttable_iter upb_msg_field_iter; @@ -384,26 +167,22 @@ typedef upb_strtable_iter upb_msg_oneof_iter; #define UPB_TIMESTAMP_SECONDS 1 #define UPB_TIMESTAMP_NANOS 2 -#ifdef __cplusplus -extern "C" { -#endif - const char *upb_msgdef_fullname(const upb_msgdef *m); const upb_filedef *upb_msgdef_file(const upb_msgdef *m); const char *upb_msgdef_name(const upb_msgdef *m); +int upb_msgdef_numfields(const upb_msgdef *m); int upb_msgdef_numoneofs(const upb_msgdef *m); +int upb_msgdef_numrealoneofs(const upb_msgdef *m); upb_syntax_t upb_msgdef_syntax(const upb_msgdef *m); bool upb_msgdef_mapentry(const upb_msgdef *m); upb_wellknowntype_t upb_msgdef_wellknowntype(const upb_msgdef *m); +bool upb_msgdef_iswrapper(const upb_msgdef *m); bool upb_msgdef_isnumberwrapper(const upb_msgdef *m); -bool upb_msgdef_setsyntax(upb_msgdef *m, upb_syntax_t syntax); const upb_fielddef *upb_msgdef_itof(const upb_msgdef *m, uint32_t i); const upb_fielddef *upb_msgdef_ntof(const upb_msgdef *m, const char *name, size_t len); const upb_oneofdef *upb_msgdef_ntoo(const upb_msgdef *m, const char *name, size_t len); -int upb_msgdef_numfields(const upb_msgdef *m); -int upb_msgdef_numoneofs(const upb_msgdef *m); const upb_msglayout *upb_msgdef_layout(const upb_msgdef *m); const upb_fielddef *_upb_msgdef_field(const upb_msgdef *m, int i); @@ -468,194 +247,6 @@ void upb_msg_oneof_iter_setdone(upb_msg_oneof_iter * iter); bool upb_msg_oneof_iter_isequal(const upb_msg_oneof_iter *iter1, const upb_msg_oneof_iter *iter2); -#ifdef __cplusplus -} /* extern "C" */ - -/* Structure that describes a single .proto message type. */ -class upb::MessageDefPtr { - public: - MessageDefPtr() : ptr_(nullptr) {} - explicit MessageDefPtr(const upb_msgdef *ptr) : ptr_(ptr) {} - - const upb_msgdef *ptr() const { return ptr_; } - explicit operator bool() const { return ptr_ != nullptr; } - - const char* full_name() const { return upb_msgdef_fullname(ptr_); } - const char* name() const { return upb_msgdef_name(ptr_); } - - /* The number of fields that belong to the MessageDef. */ - int field_count() const { return upb_msgdef_numfields(ptr_); } - - /* The number of oneofs that belong to the MessageDef. */ - int oneof_count() const { return upb_msgdef_numoneofs(ptr_); } - - upb_syntax_t syntax() const { return upb_msgdef_syntax(ptr_); } - - /* These return null pointers if the field is not found. */ - FieldDefPtr FindFieldByNumber(uint32_t number) const { - return FieldDefPtr(upb_msgdef_itof(ptr_, number)); - } - FieldDefPtr FindFieldByName(const char* name, size_t len) const { - return FieldDefPtr(upb_msgdef_ntof(ptr_, name, len)); - } - FieldDefPtr FindFieldByName(const char *name) const { - return FieldDefPtr(upb_msgdef_ntofz(ptr_, name)); - } - - template - FieldDefPtr FindFieldByName(const T& str) const { - return FindFieldByName(str.c_str(), str.size()); - } - - OneofDefPtr FindOneofByName(const char* name, size_t len) const { - return OneofDefPtr(upb_msgdef_ntoo(ptr_, name, len)); - } - - OneofDefPtr FindOneofByName(const char *name) const { - return OneofDefPtr(upb_msgdef_ntooz(ptr_, name)); - } - - template - OneofDefPtr FindOneofByName(const T &str) const { - return FindOneofByName(str.c_str(), str.size()); - } - - /* Is this message a map entry? */ - bool mapentry() const { return upb_msgdef_mapentry(ptr_); } - - /* Return the type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for - * non-well-known message. */ - upb_wellknowntype_t wellknowntype() const { - return upb_msgdef_wellknowntype(ptr_); - } - - /* Whether is a number wrapper. */ - bool isnumberwrapper() const { return upb_msgdef_isnumberwrapper(ptr_); } - - /* Iteration over fields. The order is undefined. */ - class const_field_iterator - : public std::iterator { - public: - void operator++() { upb_msg_field_next(&iter_); } - - FieldDefPtr operator*() const { - return FieldDefPtr(upb_msg_iter_field(&iter_)); - } - - bool operator!=(const const_field_iterator &other) const { - return !upb_msg_field_iter_isequal(&iter_, &other.iter_); - } - - bool operator==(const const_field_iterator &other) const { - return upb_msg_field_iter_isequal(&iter_, &other.iter_); - } - - private: - friend class MessageDefPtr; - - explicit const_field_iterator() {} - - explicit const_field_iterator(MessageDefPtr msg) { - upb_msg_field_begin(&iter_, msg.ptr()); - } - - static const_field_iterator end() { - const_field_iterator iter; - upb_msg_field_iter_setdone(&iter.iter_); - return iter; - } - - upb_msg_field_iter iter_; - }; - - /* Iteration over oneofs. The order is undefined. */ - class const_oneof_iterator - : public std::iterator { - public: - - void operator++() { upb_msg_oneof_next(&iter_); } - - OneofDefPtr operator*() const { - return OneofDefPtr(upb_msg_iter_oneof(&iter_)); - } - - bool operator!=(const const_oneof_iterator& other) const { - return !upb_msg_oneof_iter_isequal(&iter_, &other.iter_); - } - - bool operator==(const const_oneof_iterator &other) const { - return upb_msg_oneof_iter_isequal(&iter_, &other.iter_); - } - - private: - friend class MessageDefPtr; - - const_oneof_iterator() {} - - explicit const_oneof_iterator(MessageDefPtr msg) { - upb_msg_oneof_begin(&iter_, msg.ptr()); - } - - static const_oneof_iterator end() { - const_oneof_iterator iter; - upb_msg_oneof_iter_setdone(&iter.iter_); - return iter; - } - - upb_msg_oneof_iter iter_; - }; - - class ConstFieldAccessor { - public: - explicit ConstFieldAccessor(const upb_msgdef* md) : md_(md) {} - const_field_iterator begin() { return MessageDefPtr(md_).field_begin(); } - const_field_iterator end() { return MessageDefPtr(md_).field_end(); } - private: - const upb_msgdef* md_; - }; - - class ConstOneofAccessor { - public: - explicit ConstOneofAccessor(const upb_msgdef* md) : md_(md) {} - const_oneof_iterator begin() { return MessageDefPtr(md_).oneof_begin(); } - const_oneof_iterator end() { return MessageDefPtr(md_).oneof_end(); } - private: - const upb_msgdef* md_; - }; - - const_field_iterator field_begin() const { - return const_field_iterator(*this); - } - - const_field_iterator field_end() const { return const_field_iterator::end(); } - - const_oneof_iterator oneof_begin() const { - return const_oneof_iterator(*this); - } - - const_oneof_iterator oneof_end() const { return const_oneof_iterator::end(); } - - ConstFieldAccessor fields() const { return ConstFieldAccessor(ptr()); } - ConstOneofAccessor oneofs() const { return ConstOneofAccessor(ptr()); } - - private: - const upb_msgdef* ptr_; -}; - -inline upb::MessageDefPtr upb::FieldDefPtr::message_subdef() const { - return MessageDefPtr(upb_fielddef_msgsubdef(ptr_)); -} - -inline upb::MessageDefPtr upb::FieldDefPtr::containing_type() const { - return MessageDefPtr(upb_fielddef_containingtype(ptr_)); -} - -inline upb::MessageDefPtr upb::OneofDefPtr::containing_type() const { - return MessageDefPtr(upb_oneofdef_containingtype(ptr_)); -} - -#endif /* __cplusplus */ - /* upb_enumdef ****************************************************************/ typedef upb_strtable_iter upb_enum_iter; @@ -690,75 +281,8 @@ bool upb_enum_done(upb_enum_iter *iter); const char *upb_enum_iter_name(upb_enum_iter *iter); int32_t upb_enum_iter_number(upb_enum_iter *iter); -#ifdef __cplusplus - -class upb::EnumDefPtr { - public: - EnumDefPtr() : ptr_(nullptr) {} - explicit EnumDefPtr(const upb_enumdef* ptr) : ptr_(ptr) {} - - const upb_enumdef* ptr() const { return ptr_; } - explicit operator bool() const { return ptr_ != nullptr; } - - const char* full_name() const { return upb_enumdef_fullname(ptr_); } - const char* name() const { return upb_enumdef_name(ptr_); } - - /* The value that is used as the default when no field default is specified. - * If not set explicitly, the first value that was added will be used. - * The default value must be a member of the enum. - * Requires that value_count() > 0. */ - int32_t default_value() const { return upb_enumdef_default(ptr_); } - - /* Returns the number of values currently defined in the enum. Note that - * multiple names can refer to the same number, so this may be greater than - * the total number of unique numbers. */ - int value_count() const { return upb_enumdef_numvals(ptr_); } - - /* Lookups from name to integer, returning true if found. */ - bool FindValueByName(const char *name, int32_t *num) const { - return upb_enumdef_ntoiz(ptr_, name, num); - } - - /* Finds the name corresponding to the given number, or NULL if none was - * found. If more than one name corresponds to this number, returns the - * first one that was added. */ - const char *FindValueByNumber(int32_t num) const { - return upb_enumdef_iton(ptr_, num); - } - - /* Iteration over name/value pairs. The order is undefined. - * Adding an enum val invalidates any iterators. - * - * TODO: make compatible with range-for, with elements as pairs? */ - class Iterator { - public: - explicit Iterator(EnumDefPtr e) { upb_enum_begin(&iter_, e.ptr()); } - - int32_t number() { return upb_enum_iter_number(&iter_); } - const char *name() { return upb_enum_iter_name(&iter_); } - bool Done() { return upb_enum_done(&iter_); } - void Next() { return upb_enum_next(&iter_); } - - private: - upb_enum_iter iter_; - }; - - private: - const upb_enumdef *ptr_; -}; - -inline upb::EnumDefPtr upb::FieldDefPtr::enum_subdef() const { - return EnumDefPtr(upb_fielddef_enumsubdef(ptr_)); -} - -#endif /* __cplusplus */ - /* upb_filedef ****************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - const char *upb_filedef_name(const upb_filedef *f); const char *upb_filedef_package(const upb_filedef *f); const char *upb_filedef_phpprefix(const upb_filedef *f); @@ -771,57 +295,8 @@ const upb_filedef *upb_filedef_dep(const upb_filedef *f, int i); const upb_msgdef *upb_filedef_msg(const upb_filedef *f, int i); const upb_enumdef *upb_filedef_enum(const upb_filedef *f, int i); -#ifdef __cplusplus -} /* extern "C" */ - -/* Class that represents a .proto file with some things defined in it. - * - * Many users won't care about FileDefs, but they are necessary if you want to - * read the values of file-level options. */ -class upb::FileDefPtr { - public: - explicit FileDefPtr(const upb_filedef *ptr) : ptr_(ptr) {} - - const upb_filedef* ptr() const { return ptr_; } - explicit operator bool() const { return ptr_ != nullptr; } - - /* Get/set name of the file (eg. "foo/bar.proto"). */ - const char* name() const { return upb_filedef_name(ptr_); } - - /* Package name for definitions inside the file (eg. "foo.bar"). */ - const char* package() const { return upb_filedef_package(ptr_); } - - /* Sets the php class prefix which is prepended to all php generated classes - * from this .proto. Default is empty. */ - const char* phpprefix() const { return upb_filedef_phpprefix(ptr_); } - - /* Use this option to change the namespace of php generated classes. Default - * is empty. When this option is empty, the package name will be used for - * determining the namespace. */ - const char* phpnamespace() const { return upb_filedef_phpnamespace(ptr_); } - - /* Syntax for the file. Defaults to proto2. */ - upb_syntax_t syntax() const { return upb_filedef_syntax(ptr_); } - - /* Get the list of dependencies from the file. These are returned in the - * order that they were added to the FileDefPtr. */ - int dependency_count() const { return upb_filedef_depcount(ptr_); } - const FileDefPtr dependency(int index) const { - return FileDefPtr(upb_filedef_dep(ptr_, index)); - } - - private: - const upb_filedef* ptr_; -}; - -#endif /* __cplusplus */ - /* upb_symtab *****************************************************************/ -#ifdef __cplusplus -extern "C" { -#endif - upb_symtab *upb_symtab_new(void); void upb_symtab_free(upb_symtab* s); const upb_msgdef *upb_symtab_lookupmsg(const upb_symtab *s, const char *sym); @@ -829,6 +304,8 @@ const upb_msgdef *upb_symtab_lookupmsg2( const upb_symtab *s, const char *sym, size_t len); const upb_enumdef *upb_symtab_lookupenum(const upb_symtab *s, const char *sym); const upb_filedef *upb_symtab_lookupfile(const upb_symtab *s, const char *name); +const upb_filedef *upb_symtab_lookupfile2( + const upb_symtab *s, const char *name, size_t len); int upb_symtab_filecount(const upb_symtab *s); const upb_filedef *upb_symtab_addfile( upb_symtab *s, const google_protobuf_FileDescriptorProto *file, @@ -844,52 +321,10 @@ typedef struct upb_def_init { bool _upb_symtab_loaddefinit(upb_symtab *s, const upb_def_init *init); +#include "upb/port_undef.inc" + #ifdef __cplusplus } /* extern "C" */ - -/* Non-const methods in upb::SymbolTable are NOT thread-safe. */ -class upb::SymbolTable { - public: - SymbolTable() : ptr_(upb_symtab_new(), upb_symtab_free) {} - explicit SymbolTable(upb_symtab* s) : ptr_(s, upb_symtab_free) {} - - const upb_symtab* ptr() const { return ptr_.get(); } - upb_symtab* ptr() { return ptr_.get(); } - - /* Finds an entry in the symbol table with this exact name. If not found, - * returns NULL. */ - MessageDefPtr LookupMessage(const char *sym) const { - return MessageDefPtr(upb_symtab_lookupmsg(ptr_.get(), sym)); - } - - EnumDefPtr LookupEnum(const char *sym) const { - return EnumDefPtr(upb_symtab_lookupenum(ptr_.get(), sym)); - } - - FileDefPtr LookupFile(const char *name) const { - return FileDefPtr(upb_symtab_lookupfile(ptr_.get(), name)); - } - - /* TODO: iteration? */ - - /* Adds the given serialized FileDescriptorProto to the pool. */ - FileDefPtr AddFile(const google_protobuf_FileDescriptorProto *file_proto, - Status *status) { - return FileDefPtr( - upb_symtab_addfile(ptr_.get(), file_proto, status->ptr())); - } - - private: - std::unique_ptr ptr_; -}; - -UPB_INLINE const char* upb_safecstr(const std::string& str) { - UPB_ASSERT(str.size() == std::strlen(str.c_str())); - return str.c_str(); -} - #endif /* __cplusplus */ -#include "upb/port_undef.inc" - #endif /* UPB_DEF_H_ */ diff --git a/upb/def.hpp b/upb/def.hpp new file mode 100644 index 00000000000..62d06bba6d2 --- /dev/null +++ b/upb/def.hpp @@ -0,0 +1,525 @@ + +#ifndef UPB_DEF_HPP_ +#define UPB_DEF_HPP_ + +#include +#include +#include +#include + +#include "upb/def.h" +#include "upb/upb.hpp" + +namespace upb { + +class EnumDefPtr; +class MessageDefPtr; +class OneofDefPtr; + +// A upb::FieldDefPtr describes a single field in a message. It is most often +// found as a part of a upb_msgdef, but can also stand alone to represent +// an extension. +class FieldDefPtr { + public: + FieldDefPtr() : ptr_(nullptr) {} + explicit FieldDefPtr(const upb_fielddef* ptr) : ptr_(ptr) {} + + const upb_fielddef* ptr() const { return ptr_; } + explicit operator bool() const { return ptr_ != nullptr; } + + typedef upb_fieldtype_t Type; + typedef upb_label_t Label; + typedef upb_descriptortype_t DescriptorType; + + const char* full_name() const { return upb_fielddef_fullname(ptr_); } + + Type type() const { return upb_fielddef_type(ptr_); } + Label label() const { return upb_fielddef_label(ptr_); } + const char* name() const { return upb_fielddef_name(ptr_); } + const char* json_name() const { return upb_fielddef_jsonname(ptr_); } + uint32_t number() const { return upb_fielddef_number(ptr_); } + bool is_extension() const { return upb_fielddef_isextension(ptr_); } + + // For UPB_TYPE_MESSAGE fields only where is_tag_delimited() == false, + // indicates whether this field should have lazy parsing handlers that yield + // the unparsed string for the submessage. + // + // TODO(haberman): I think we want to move this into a FieldOptions container + // when we add support for custom options (the FieldOptions struct will + // contain both regular FieldOptions like "lazy" *and* custom options). + bool lazy() const { return upb_fielddef_lazy(ptr_); } + + // For non-string, non-submessage fields, this indicates whether binary + // protobufs are encoded in packed or non-packed format. + // + // TODO(haberman): see note above about putting options like this into a + // FieldOptions container. + bool packed() const { return upb_fielddef_packed(ptr_); } + + // An integer that can be used as an index into an array of fields for + // whatever message this field belongs to. Guaranteed to be less than + // f->containing_type()->field_count(). May only be accessed once the def has + // been finalized. + uint32_t index() const { return upb_fielddef_index(ptr_); } + + // The MessageDef to which this field belongs. + // + // If this field has been added to a MessageDef, that message can be retrieved + // directly (this is always the case for frozen FieldDefs). + // + // If the field has not yet been added to a MessageDef, you can set the name + // of the containing type symbolically instead. This is mostly useful for + // extensions, where the extension is declared separately from the message. + MessageDefPtr containing_type() const; + + // The OneofDef to which this field belongs, or NULL if this field is not part + // of a oneof. + OneofDefPtr containing_oneof() const; + + // The field's type according to the enum in descriptor.proto. This is not + // the same as UPB_TYPE_*, because it distinguishes between (for example) + // INT32 and SINT32, whereas our "type" enum does not. This return of + // descriptor_type() is a function of type(), integer_format(), and + // is_tag_delimited(). + DescriptorType descriptor_type() const { + return upb_fielddef_descriptortype(ptr_); + } + + // Convenient field type tests. + bool IsSubMessage() const { return upb_fielddef_issubmsg(ptr_); } + bool IsString() const { return upb_fielddef_isstring(ptr_); } + bool IsSequence() const { return upb_fielddef_isseq(ptr_); } + bool IsPrimitive() const { return upb_fielddef_isprimitive(ptr_); } + bool IsMap() const { return upb_fielddef_ismap(ptr_); } + + // Returns the non-string default value for this fielddef, which may either + // be something the client set explicitly or the "default default" (0 for + // numbers, empty for strings). The field's type indicates the type of the + // returned value, except for enum fields that are still mutable. + // + // Requires that the given function matches the field's current type. + int64_t default_int64() const { return upb_fielddef_defaultint64(ptr_); } + int32_t default_int32() const { return upb_fielddef_defaultint32(ptr_); } + uint64_t default_uint64() const { return upb_fielddef_defaultuint64(ptr_); } + uint32_t default_uint32() const { return upb_fielddef_defaultuint32(ptr_); } + bool default_bool() const { return upb_fielddef_defaultbool(ptr_); } + float default_float() const { return upb_fielddef_defaultfloat(ptr_); } + double default_double() const { return upb_fielddef_defaultdouble(ptr_); } + + // The resulting string is always NULL-terminated. If non-NULL, the length + // will be stored in *len. + const char* default_string(size_t* len) const { + return upb_fielddef_defaultstr(ptr_, len); + } + + // Returns the enum or submessage def for this field, if any. The field's + // type must match (ie. you may only call enum_subdef() for fields where + // type() == UPB_TYPE_ENUM). + EnumDefPtr enum_subdef() const; + MessageDefPtr message_subdef() const; + + private: + const upb_fielddef* ptr_; +}; + +// Class that represents a oneof. +class OneofDefPtr { + public: + OneofDefPtr() : ptr_(nullptr) {} + explicit OneofDefPtr(const upb_oneofdef* ptr) : ptr_(ptr) {} + + const upb_oneofdef* ptr() const { return ptr_; } + explicit operator bool() { return ptr_ != nullptr; } + + // Returns the MessageDef that owns this OneofDef. + MessageDefPtr containing_type() const; + + // Returns the name of this oneof. This is the name used to look up the oneof + // by name once added to a message def. + const char* name() const { return upb_oneofdef_name(ptr_); } + + // Returns the number of fields currently defined in the oneof. + int field_count() const { return upb_oneofdef_numfields(ptr_); } + + // Looks up by name. + FieldDefPtr FindFieldByName(const char* name, size_t len) const { + return FieldDefPtr(upb_oneofdef_ntof(ptr_, name, len)); + } + FieldDefPtr FindFieldByName(const char* name) const { + return FieldDefPtr(upb_oneofdef_ntofz(ptr_, name)); + } + + template + FieldDefPtr FindFieldByName(const T& str) const { + return FindFieldByName(str.c_str(), str.size()); + } + + // Looks up by tag number. + FieldDefPtr FindFieldByNumber(uint32_t num) const { + return FieldDefPtr(upb_oneofdef_itof(ptr_, num)); + } + + class const_iterator + : public std::iterator { + public: + void operator++() { upb_oneof_next(&iter_); } + + FieldDefPtr operator*() const { + return FieldDefPtr(upb_oneof_iter_field(&iter_)); + } + + bool operator!=(const const_iterator& other) const { + return !upb_oneof_iter_isequal(&iter_, &other.iter_); + } + + bool operator==(const const_iterator& other) const { + return upb_oneof_iter_isequal(&iter_, &other.iter_); + } + + private: + friend class OneofDefPtr; + + const_iterator() {} + explicit const_iterator(OneofDefPtr o) { upb_oneof_begin(&iter_, o.ptr()); } + static const_iterator end() { + const_iterator iter; + upb_oneof_iter_setdone(&iter.iter_); + return iter; + } + + upb_oneof_iter iter_; + }; + + const_iterator begin() const { return const_iterator(*this); } + const_iterator end() const { return const_iterator::end(); } + + private: + const upb_oneofdef* ptr_; +}; + +// Structure that describes a single .proto message type. +class MessageDefPtr { + public: + MessageDefPtr() : ptr_(nullptr) {} + explicit MessageDefPtr(const upb_msgdef* ptr) : ptr_(ptr) {} + + const upb_msgdef* ptr() const { return ptr_; } + explicit operator bool() const { return ptr_ != nullptr; } + + const char* full_name() const { return upb_msgdef_fullname(ptr_); } + const char* name() const { return upb_msgdef_name(ptr_); } + + // The number of fields that belong to the MessageDef. + int field_count() const { return upb_msgdef_numfields(ptr_); } + + // The number of oneofs that belong to the MessageDef. + int oneof_count() const { return upb_msgdef_numoneofs(ptr_); } + + upb_syntax_t syntax() const { return upb_msgdef_syntax(ptr_); } + + // These return null pointers if the field is not found. + FieldDefPtr FindFieldByNumber(uint32_t number) const { + return FieldDefPtr(upb_msgdef_itof(ptr_, number)); + } + FieldDefPtr FindFieldByName(const char* name, size_t len) const { + return FieldDefPtr(upb_msgdef_ntof(ptr_, name, len)); + } + FieldDefPtr FindFieldByName(const char* name) const { + return FieldDefPtr(upb_msgdef_ntofz(ptr_, name)); + } + + template + FieldDefPtr FindFieldByName(const T& str) const { + return FindFieldByName(str.c_str(), str.size()); + } + + OneofDefPtr FindOneofByName(const char* name, size_t len) const { + return OneofDefPtr(upb_msgdef_ntoo(ptr_, name, len)); + } + + OneofDefPtr FindOneofByName(const char* name) const { + return OneofDefPtr(upb_msgdef_ntooz(ptr_, name)); + } + + template + OneofDefPtr FindOneofByName(const T& str) const { + return FindOneofByName(str.c_str(), str.size()); + } + + // Is this message a map entry? + bool mapentry() const { return upb_msgdef_mapentry(ptr_); } + + // Return the type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for + // non-well-known message. + upb_wellknowntype_t wellknowntype() const { + return upb_msgdef_wellknowntype(ptr_); + } + + // Whether is a number wrapper. + bool isnumberwrapper() const { return upb_msgdef_isnumberwrapper(ptr_); } + + // Iteration over fields. The order is undefined. + class const_field_iterator + : public std::iterator { + public: + void operator++() { upb_msg_field_next(&iter_); } + + FieldDefPtr operator*() const { + return FieldDefPtr(upb_msg_iter_field(&iter_)); + } + + bool operator!=(const const_field_iterator& other) const { + return !upb_msg_field_iter_isequal(&iter_, &other.iter_); + } + + bool operator==(const const_field_iterator& other) const { + return upb_msg_field_iter_isequal(&iter_, &other.iter_); + } + + private: + friend class MessageDefPtr; + + explicit const_field_iterator() {} + + explicit const_field_iterator(MessageDefPtr msg) { + upb_msg_field_begin(&iter_, msg.ptr()); + } + + static const_field_iterator end() { + const_field_iterator iter; + upb_msg_field_iter_setdone(&iter.iter_); + return iter; + } + + upb_msg_field_iter iter_; + }; + + // Iteration over oneofs. The order is undefined. + class const_oneof_iterator + : public std::iterator { + public: + void operator++() { upb_msg_oneof_next(&iter_); } + + OneofDefPtr operator*() const { + return OneofDefPtr(upb_msg_iter_oneof(&iter_)); + } + + bool operator!=(const const_oneof_iterator& other) const { + return !upb_msg_oneof_iter_isequal(&iter_, &other.iter_); + } + + bool operator==(const const_oneof_iterator& other) const { + return upb_msg_oneof_iter_isequal(&iter_, &other.iter_); + } + + private: + friend class MessageDefPtr; + + const_oneof_iterator() {} + + explicit const_oneof_iterator(MessageDefPtr msg) { + upb_msg_oneof_begin(&iter_, msg.ptr()); + } + + static const_oneof_iterator end() { + const_oneof_iterator iter; + upb_msg_oneof_iter_setdone(&iter.iter_); + return iter; + } + + upb_msg_oneof_iter iter_; + }; + + class ConstFieldAccessor { + public: + explicit ConstFieldAccessor(const upb_msgdef* md) : md_(md) {} + const_field_iterator begin() { return MessageDefPtr(md_).field_begin(); } + const_field_iterator end() { return MessageDefPtr(md_).field_end(); } + + private: + const upb_msgdef* md_; + }; + + class ConstOneofAccessor { + public: + explicit ConstOneofAccessor(const upb_msgdef* md) : md_(md) {} + const_oneof_iterator begin() { return MessageDefPtr(md_).oneof_begin(); } + const_oneof_iterator end() { return MessageDefPtr(md_).oneof_end(); } + + private: + const upb_msgdef* md_; + }; + + const_field_iterator field_begin() const { + return const_field_iterator(*this); + } + + const_field_iterator field_end() const { return const_field_iterator::end(); } + + const_oneof_iterator oneof_begin() const { + return const_oneof_iterator(*this); + } + + const_oneof_iterator oneof_end() const { return const_oneof_iterator::end(); } + + ConstFieldAccessor fields() const { return ConstFieldAccessor(ptr()); } + ConstOneofAccessor oneofs() const { return ConstOneofAccessor(ptr()); } + + private: + const upb_msgdef* ptr_; +}; + +class EnumDefPtr { + public: + EnumDefPtr() : ptr_(nullptr) {} + explicit EnumDefPtr(const upb_enumdef* ptr) : ptr_(ptr) {} + + const upb_enumdef* ptr() const { return ptr_; } + explicit operator bool() const { return ptr_ != nullptr; } + + const char* full_name() const { return upb_enumdef_fullname(ptr_); } + const char* name() const { return upb_enumdef_name(ptr_); } + + // The value that is used as the default when no field default is specified. + // If not set explicitly, the first value that was added will be used. + // The default value must be a member of the enum. + // Requires that value_count() > 0. + int32_t default_value() const { return upb_enumdef_default(ptr_); } + + // Returns the number of values currently defined in the enum. Note that + // multiple names can refer to the same number, so this may be greater than + // the total number of unique numbers. + int value_count() const { return upb_enumdef_numvals(ptr_); } + + // Lookups from name to integer, returning true if found. + bool FindValueByName(const char* name, int32_t* num) const { + return upb_enumdef_ntoiz(ptr_, name, num); + } + + // Finds the name corresponding to the given number, or NULL if none was + // found. If more than one name corresponds to this number, returns the + // first one that was added. + const char* FindValueByNumber(int32_t num) const { + return upb_enumdef_iton(ptr_, num); + } + + // Iteration over name/value pairs. The order is undefined. + // Adding an enum val invalidates any iterators. + // + // TODO: make compatible with range-for, with elements as pairs? + class Iterator { + public: + explicit Iterator(EnumDefPtr e) { upb_enum_begin(&iter_, e.ptr()); } + + int32_t number() { return upb_enum_iter_number(&iter_); } + const char* name() { return upb_enum_iter_name(&iter_); } + bool Done() { return upb_enum_done(&iter_); } + void Next() { return upb_enum_next(&iter_); } + + private: + upb_enum_iter iter_; + }; + + private: + const upb_enumdef* ptr_; +}; + +// Class that represents a .proto file with some things defined in it. +// +// Many users won't care about FileDefs, but they are necessary if you want to +// read the values of file-level options. +class FileDefPtr { + public: + explicit FileDefPtr(const upb_filedef* ptr) : ptr_(ptr) {} + + const upb_filedef* ptr() const { return ptr_; } + explicit operator bool() const { return ptr_ != nullptr; } + + // Get/set name of the file (eg. "foo/bar.proto"). + const char* name() const { return upb_filedef_name(ptr_); } + + // Package name for definitions inside the file (eg. "foo.bar"). + const char* package() const { return upb_filedef_package(ptr_); } + + // Sets the php class prefix which is prepended to all php generated classes + // from this .proto. Default is empty. + const char* phpprefix() const { return upb_filedef_phpprefix(ptr_); } + + // Use this option to change the namespace of php generated classes. Default + // is empty. When this option is empty, the package name will be used for + // determining the namespace. + const char* phpnamespace() const { return upb_filedef_phpnamespace(ptr_); } + + // Syntax for the file. Defaults to proto2. + upb_syntax_t syntax() const { return upb_filedef_syntax(ptr_); } + + // Get the list of dependencies from the file. These are returned in the + // order that they were added to the FileDefPtr. + int dependency_count() const { return upb_filedef_depcount(ptr_); } + const FileDefPtr dependency(int index) const { + return FileDefPtr(upb_filedef_dep(ptr_, index)); + } + + private: + const upb_filedef* ptr_; +}; + +// Non-const methods in upb::SymbolTable are NOT thread-safe. +class SymbolTable { + public: + SymbolTable() : ptr_(upb_symtab_new(), upb_symtab_free) {} + explicit SymbolTable(upb_symtab* s) : ptr_(s, upb_symtab_free) {} + + const upb_symtab* ptr() const { return ptr_.get(); } + upb_symtab* ptr() { return ptr_.get(); } + + // Finds an entry in the symbol table with this exact name. If not found, + // returns NULL. + MessageDefPtr LookupMessage(const char* sym) const { + return MessageDefPtr(upb_symtab_lookupmsg(ptr_.get(), sym)); + } + + EnumDefPtr LookupEnum(const char* sym) const { + return EnumDefPtr(upb_symtab_lookupenum(ptr_.get(), sym)); + } + + FileDefPtr LookupFile(const char* name) const { + return FileDefPtr(upb_symtab_lookupfile(ptr_.get(), name)); + } + + // TODO: iteration? + + // Adds the given serialized FileDescriptorProto to the pool. + FileDefPtr AddFile(const google_protobuf_FileDescriptorProto* file_proto, + Status* status) { + return FileDefPtr( + upb_symtab_addfile(ptr_.get(), file_proto, status->ptr())); + } + + private: + std::unique_ptr ptr_; +}; + +inline MessageDefPtr FieldDefPtr::message_subdef() const { + return MessageDefPtr(upb_fielddef_msgsubdef(ptr_)); +} + +inline MessageDefPtr FieldDefPtr::containing_type() const { + return MessageDefPtr(upb_fielddef_containingtype(ptr_)); +} + +inline MessageDefPtr OneofDefPtr::containing_type() const { + return MessageDefPtr(upb_oneofdef_containingtype(ptr_)); +} + +inline OneofDefPtr FieldDefPtr::containing_oneof() const { + return OneofDefPtr(upb_fielddef_containingoneof(ptr_)); +} + +inline EnumDefPtr FieldDefPtr::enum_subdef() const { + return EnumDefPtr(upb_fielddef_enumsubdef(ptr_)); +} + +} // namespace upb + +#endif // UPB_DEF_HPP_ diff --git a/upb/encode.c b/upb/encode.c index d9adbff596f..28a5602b239 100644 --- a/upb/encode.c +++ b/upb/encode.c @@ -113,15 +113,14 @@ static bool upb_put_float(upb_encstate *e, float d) { static uint32_t upb_readcase(const char *msg, const upb_msglayout_field *f) { uint32_t ret; - uint32_t offset = ~f->presence; - memcpy(&ret, msg + offset, sizeof(ret)); + memcpy(&ret, msg - f->presence, sizeof(ret)); return ret; } static bool upb_readhasbit(const char *msg, const upb_msglayout_field *f) { uint32_t hasbit = f->presence; UPB_ASSERT(f->presence > 0); - return msg[hasbit / 8] & (1 << (hasbit % 8)); + return (*UPB_PTR_AT(msg, hasbit / 8, uint8_t)) & (1 << (hasbit % 8)); } static bool upb_put_tag(upb_encstate *e, int field_number, int wire_type) { @@ -129,10 +128,20 @@ static bool upb_put_tag(upb_encstate *e, int field_number, int wire_type) { } static bool upb_put_fixedarray(upb_encstate *e, const upb_array *arr, - size_t size) { - size_t bytes = arr->len * size; - const void* data = _upb_array_constptr(arr); - return upb_put_bytes(e, data, bytes) && upb_put_varint(e, bytes); + size_t elem_size, uint32_t tag) { + size_t bytes = arr->len * elem_size; + const char* data = _upb_array_constptr(arr); + const char* ptr = data + bytes - elem_size; + if (tag) { + while (true) { + CHK(upb_put_bytes(e, ptr, elem_size) && upb_put_varint(e, tag)); + if (ptr == data) break; + ptr -= elem_size; + } + return true; + } else { + return upb_put_bytes(e, data, bytes) && upb_put_varint(e, bytes); + } } bool upb_encode_message(upb_encstate *e, const char *msg, @@ -218,38 +227,46 @@ static bool upb_encode_array(upb_encstate *e, const char *field_mem, const upb_msglayout *m, const upb_msglayout_field *f) { const upb_array *arr = *(const upb_array**)field_mem; + bool packed = f->label == _UPB_LABEL_PACKED; if (arr == NULL || arr->len == 0) { return true; } -#define VARINT_CASE(ctype, encode) { \ - const ctype *start = _upb_array_constptr(arr); \ - const ctype *ptr = start + arr->len; \ - size_t pre_len = e->limit - e->ptr; \ - do { \ - ptr--; \ - CHK(upb_put_varint(e, encode)); \ - } while (ptr != start); \ - CHK(upb_put_varint(e, e->limit - e->ptr - pre_len)); \ -} \ -break; \ -do { ; } while(0) +#define VARINT_CASE(ctype, encode) \ + { \ + const ctype *start = _upb_array_constptr(arr); \ + const ctype *ptr = start + arr->len; \ + size_t pre_len = e->limit - e->ptr; \ + uint32_t tag = packed ? 0 : (f->number << 3) | UPB_WIRE_TYPE_VARINT; \ + do { \ + ptr--; \ + CHK(upb_put_varint(e, encode)); \ + if (tag) CHK(upb_put_varint(e, tag)); \ + } while (ptr != start); \ + if (!tag) CHK(upb_put_varint(e, e->limit - e->ptr - pre_len)); \ + } \ + break; \ + do { \ + ; \ + } while (0) + +#define TAG(wire_type) (packed ? 0 : (f->number << 3 | wire_type)) switch (f->descriptortype) { case UPB_DESCRIPTOR_TYPE_DOUBLE: - CHK(upb_put_fixedarray(e, arr, sizeof(double))); + CHK(upb_put_fixedarray(e, arr, sizeof(double), TAG(UPB_WIRE_TYPE_64BIT))); break; case UPB_DESCRIPTOR_TYPE_FLOAT: - CHK(upb_put_fixedarray(e, arr, sizeof(float))); + CHK(upb_put_fixedarray(e, arr, sizeof(float), TAG(UPB_WIRE_TYPE_32BIT))); break; case UPB_DESCRIPTOR_TYPE_SFIXED64: case UPB_DESCRIPTOR_TYPE_FIXED64: - CHK(upb_put_fixedarray(e, arr, sizeof(uint64_t))); + CHK(upb_put_fixedarray(e, arr, sizeof(uint64_t), TAG(UPB_WIRE_TYPE_64BIT))); break; case UPB_DESCRIPTOR_TYPE_FIXED32: case UPB_DESCRIPTOR_TYPE_SFIXED32: - CHK(upb_put_fixedarray(e, arr, sizeof(uint32_t))); + CHK(upb_put_fixedarray(e, arr, sizeof(uint32_t), TAG(UPB_WIRE_TYPE_32BIT))); break; case UPB_DESCRIPTOR_TYPE_INT64: case UPB_DESCRIPTOR_TYPE_UINT64: @@ -306,9 +323,9 @@ do { ; } while(0) } #undef VARINT_CASE - /* We encode all primitive arrays as packed, regardless of what was specified - * in the .proto file. Could special case 1-sized arrays. */ - CHK(upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED)); + if (packed) { + CHK(upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED)); + } return true; } @@ -362,9 +379,9 @@ bool upb_encode_message(upb_encstate *e, const char *msg, for (i = m->field_count - 1; i >= 0; i--) { const upb_msglayout_field *f = &m->fields[i]; - if (f->label == UPB_LABEL_REPEATED) { + if (_upb_isrepeated(f)) { CHK(upb_encode_array(e, msg + f->offset, m, f)); - } else if (f->label == UPB_LABEL_MAP) { + } else if (f->label == _UPB_LABEL_MAP) { CHK(upb_encode_map(e, msg + f->offset, m, f)); } else { bool skip_empty = false; diff --git a/upb/handlers.h b/upb/handlers.h index 2d2380b634b..9ed70e959c6 100644 --- a/upb/handlers.h +++ b/upb/handlers.h @@ -25,6 +25,7 @@ #include "upb/port_def.inc" #ifdef __cplusplus +#include "upb/def.hpp" namespace upb { class HandlersPtr; class HandlerCache; diff --git a/upb/json/parser.rl b/upb/json/parser.rl index 19022df298a..eccd53039ff 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -733,7 +733,9 @@ static bool multipart_text(upb_json_parser *p, const char *buf, size_t len, /* Note: this invalidates the accumulate buffer! Call only after reading its * contents. */ static void multipart_end(upb_json_parser *p) { - UPB_ASSERT(p->multipart_state != MULTIPART_INACTIVE); + /* This is false sometimes. Probably a bug of some sort, but this code is + * intended for deletion soon. */ + /* UPB_ASSERT(p->multipart_state != MULTIPART_INACTIVE); */ p->multipart_state = MULTIPART_INACTIVE; accumulate_clear(p); } @@ -1368,7 +1370,12 @@ static bool end_stringval_nontop(upb_json_parser *p) { upb_selector_t sel = parser_getsel(p); upb_sink_putint32(p->top->sink, sel, int_val); } else { - upb_status_seterrf(p->status, "Enum value unknown: '%.*s'", len, buf); + if (p->ignore_json_unknown) { + ok = true; + /* TODO(teboring): Should also clean this field. */ + } else { + upb_status_seterrf(p->status, "Enum value unknown: '%.*s'", len, buf); + } } break; @@ -1687,24 +1694,15 @@ static void start_timestamp_zone(upb_json_parser *p, const char *ptr) { capture_begin(p, ptr); } -static int div_round_up2(int n, int d) { - return (n + d - 1) / d; -} - /* epoch_days(1970, 1, 1) == 1970-01-01 == 0. */ static int epoch_days(int year, int month, int day) { static const uint16_t month_yday[12] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334}; - int febs_since_0 = month > 2 ? year + 1 : year; - int leap_days_since_0 = div_round_up2(febs_since_0, 4) - - div_round_up2(febs_since_0, 100) + - div_round_up2(febs_since_0, 400); - int days_since_0 = - 365 * year + month_yday[month - 1] + (day - 1) + leap_days_since_0; - - /* Convert from 0-epoch (0001-01-01 BC) to Unix Epoch (1970-01-01 AD). - * Since the "BC" system does not have a year zero, 1 BC == year zero. */ - return days_since_0 - 719528; + uint32_t year_adj = year + 4800; /* Ensure positive year, multiple of 400. */ + uint32_t febs = year_adj - (month <= 2 ? 1 : 0); /* Februaries since base. */ + uint32_t leap_days = 1 + (febs / 4) - (febs / 100) + (febs / 400); + uint32_t days = 365 * year_adj + leap_days + month_yday[month - 1] + day - 1; + return days - 2472692; /* Adjust to Unix epoch. */ } static int64_t upb_timegm(const struct tm *tp) { @@ -2900,9 +2898,6 @@ upb_json_parser *upb_json_parser_create(upb_arena *arena, upb_sink output, upb_status *status, bool ignore_json_unknown) { -#ifndef NDEBUG - const size_t size_before = upb_arena_bytesallocated(arena); -#endif upb_json_parser *p = upb_arena_malloc(arena, sizeof(upb_json_parser)); if (!p) return false; @@ -2929,10 +2924,6 @@ upb_json_parser *upb_json_parser_create(upb_arena *arena, p->ignore_json_unknown = ignore_json_unknown; - /* If this fails, uncomment and increase the value in parser.h. */ - /* fprintf(stderr, "%zd\n", upb_arena_bytesallocated(arena) - size_before); */ - UPB_ASSERT_DEBUGVAR(upb_arena_bytesallocated(arena) - size_before <= - UPB_JSON_PARSER_SIZE); return p; } diff --git a/upb/json/printer.c b/upb/json/printer.c index b0030e0e525..3a8821982f2 100644 --- a/upb/json/printer.c +++ b/upb/json/printer.c @@ -1367,10 +1367,6 @@ static void json_printer_reset(upb_json_printer *p) { upb_json_printer *upb_json_printer_create(upb_arena *a, const upb_handlers *h, upb_bytessink output) { -#ifndef NDEBUG - size_t size_before = upb_arena_bytesallocated(a); -#endif - upb_json_printer *p = upb_arena_malloc(a, sizeof(upb_json_printer)); if (!p) return NULL; @@ -1380,9 +1376,6 @@ upb_json_printer *upb_json_printer_create(upb_arena *a, const upb_handlers *h, p->seconds = 0; p->nanos = 0; - /* If this fails, increase the value in printer.h. */ - UPB_ASSERT_DEBUGVAR(upb_arena_bytesallocated(a) - size_before <= - UPB_JSON_PRINTER_SIZE); return p; } diff --git a/upb/json_decode.c b/upb/json_decode.c index 54a55ad135c..2949e2d237e 100644 --- a/upb/json_decode.c +++ b/upb/json_decode.c @@ -157,15 +157,11 @@ static void jsondec_push(jsondec *d) { } static bool jsondec_seqnext(jsondec *d, char end_ch) { + bool is_first = d->is_first; + d->is_first = false; jsondec_skipws(d); if (*d->ptr == end_ch) return false; - - if (d->is_first) { - d->is_first = false; - } else { - jsondec_parselit(d, ","); - } - + if (!is_first) jsondec_parselit(d, ","); return true; } @@ -405,7 +401,9 @@ static upb_strview jsondec_string(jsondec *d) { switch (ch) { case '"': { - upb_strview ret = {buf, end - buf}; + upb_strview ret; + ret.data = buf; + ret.size = end - buf; return ret; } case '\\': @@ -413,7 +411,7 @@ static upb_strview jsondec_string(jsondec *d) { if (*d->ptr == 'u') { d->ptr++; if (buf_end - end < 4) { - // Allow space for maximum-sized code point (4 bytes). + /* Allow space for maximum-sized code point (4 bytes). */ jsondec_resize(d, &buf, &end, &buf_end); } end += jsondec_unicode(d, end); @@ -770,7 +768,12 @@ static upb_msgval jsondec_enum(jsondec *d, const upb_fielddef *f) { upb_strview str = jsondec_string(d); upb_msgval val; if (!upb_enumdef_ntoi(e, str.data, str.size, &val.int32_val)) { - jsondec_err(d, "Unknown enumerator"); + if (d->options & UPB_JSONDEC_IGNOREUNKNOWN) { + val.int32_val = 0; + } else { + jsondec_errf(d, "Unknown enumerator: '" UPB_STRVIEW_FORMAT "'", + UPB_STRVIEW_ARGS(str)); + } } return val; } else { @@ -875,20 +878,22 @@ static void jsondec_field(jsondec *d, upb_msg *msg, const upb_msgdef *m) { if (!f) { if ((d->options & UPB_JSONDEC_IGNOREUNKNOWN) == 0) { - jsondec_err(d, "Unknown field"); + jsondec_errf(d, "Unknown field: '" UPB_STRVIEW_FORMAT "'", + UPB_STRVIEW_ARGS(name)); } jsondec_skipval(d); return; } if (upb_fielddef_containingoneof(f) && - upb_msg_hasoneof(msg, upb_fielddef_containingoneof(f))) { + upb_msg_whichoneof(msg, upb_fielddef_containingoneof(f))) { jsondec_err(d, "More than one field for this oneof."); } if (jsondec_peek(d) == JD_NULL && !jsondec_isvalue(f)) { /* JSON "null" indicates a default value, so no need to set anything. */ - return jsondec_null(d); + jsondec_null(d); + return; } preserved = d->debug_field; @@ -912,7 +917,9 @@ static void jsondec_field(jsondec *d, upb_msg *msg, const upb_msgdef *m) { static void jsondec_object(jsondec *d, upb_msg *msg, const upb_msgdef *m) { jsondec_objstart(d); - while (jsondec_objnext(d)) jsondec_field(d, msg, m); + while (jsondec_objnext(d)) { + jsondec_field(d, msg, m); + } jsondec_objend(d); } @@ -979,18 +986,16 @@ static int jsondec_nanos(jsondec *d, const char **ptr, const char *end) { return nanos; } -// jsondec_epochdays(1970, 1, 1) == 1970-01-01 == 0 -static int jsondec_epochdays(int y, int m, int d) { - unsigned year_base = 4800; /* Before minimum year, divisible by 100 & 400 */ - unsigned epoch = 2472632; /* Days between year_base and 1970 (Unix epoch) */ - unsigned carry = (unsigned)m - 3 > m; - unsigned m_adj = m - 3 + (carry ? 12 : 0); /* Month, counting from March */ - unsigned y_adj = y + year_base - carry; /* Year, positive and March-based */ - unsigned base_days = (365 * 4 + 1) * y_adj / 4; /* Approx days for year */ - unsigned centuries = y_adj / 100; - unsigned extra_leap_days = (3 * centuries + 3) / 4; /* base_days correction */ - unsigned year_days = (367 * (m_adj + 1)) / 12 - 30; /* Counting from March */ - return base_days - extra_leap_days + year_days + (d - 1) - epoch; +/* jsondec_epochdays(1970, 1, 1) == 1970-01-01 == 0. */ +int jsondec_epochdays(int y, int m, int d) { + const uint32_t year_base = 4800; /* Before min year, multiple of 400. */ + const uint32_t m_adj = m - 3; /* March-based month. */ + const uint32_t carry = m_adj > m ? 1 : 0; + const uint32_t adjust = carry ? 12 : 0; + const uint32_t y_adj = y + year_base - carry; + const uint32_t month_days = ((m_adj + adjust) * 62719 + 769) / 2048; + const uint32_t leap_days = y_adj / 4 - y_adj / 100 + y_adj / 400; + return y_adj * 365 + leap_days + month_days + (d - 1) - 2472632; } static int64_t jsondec_unixtime(int y, int m, int d, int h, int min, int s) { @@ -1007,7 +1012,7 @@ static void jsondec_timestamp(jsondec *d, upb_msg *msg, const upb_msgdef *m) { if (str.size < 20) goto malformed; { - // 1972-01-01T01:00:00 + /* 1972-01-01T01:00:00 */ int year = jsondec_tsdigits(d, &ptr, 4, "-"); int mon = jsondec_tsdigits(d, &ptr, 2, "-"); int day = jsondec_tsdigits(d, &ptr, 2, "T"); @@ -1021,7 +1026,7 @@ static void jsondec_timestamp(jsondec *d, upb_msg *msg, const upb_msgdef *m) { nanos.int32_val = jsondec_nanos(d, &ptr, end); { - // [+-]08:00 or Z + /* [+-]08:00 or Z */ int ofs = 0; bool neg = false; @@ -1064,7 +1069,7 @@ static void jsondec_duration(jsondec *d, upb_msg *msg, const upb_msgdef *m) { const char *ptr = str.data; const char *end = ptr + str.size; - // "3.000000001s", "3s", etc. + /* "3.000000001s", "3s", etc. */ ptr = jsondec_buftoint64(d, ptr, end, &seconds.int64_val); nanos.int32_val = jsondec_nanos(d, &ptr, end); @@ -1313,10 +1318,10 @@ static void jsondec_any(jsondec *d, upb_msg *msg, const upb_msgdef *m) { if (pre_type_data) { size_t len = pre_type_end - pre_type_data + 1; char *tmp = upb_arena_malloc(d->arena, len); - memcpy(tmp, pre_type_data, len - 1); - tmp[len - 1] = '}'; const char *saved_ptr = d->ptr; const char *saved_end = d->end; + memcpy(tmp, pre_type_data, len - 1); + tmp[len - 1] = '}'; d->ptr = tmp; d->end = tmp + len; d->is_first = true; @@ -1400,6 +1405,6 @@ bool upb_json_decode(const char *buf, size_t size, upb_msg *msg, if (setjmp(d.err)) return false; - jsondec_object(&d, msg, m); + jsondec_tomsg(&d, msg, m); return true; } diff --git a/upb/json_encode.c b/upb/json_encode.c index 285bcecea5f..04c9594ed7b 100644 --- a/upb/json_encode.c +++ b/upb/json_encode.c @@ -318,16 +318,16 @@ static void jsonenc_any(jsonenc *e, const upb_msg *msg, const upb_msgdef *m) { jsonenc_err(e, "Error decoding message in Any"); } - jsonenc_putstr(e, "{\"@type\": "); + jsonenc_putstr(e, "{\"@type\":"); jsonenc_string(e, type_url); - jsonenc_putstr(e, ", "); + jsonenc_putstr(e, ","); if (upb_msgdef_wellknowntype(any_m) == UPB_WELLKNOWN_UNSPECIFIED) { - /* Regular messages: {"@type": "...", "foo": 1, "bar": 2} */ + /* Regular messages: {"@type": "...","foo": 1, "bar": 2} */ jsonenc_msgfields(e, any, any_m); } else { - /* Well-known type: {"@type": "...", "value": } */ - jsonenc_putstr(e, "value: "); + /* Well-known type: {"@type": "...","value": } */ + jsonenc_putstr(e, "\"value\":"); jsonenc_msgfield(e, any, any_m); } @@ -393,14 +393,16 @@ static void jsonenc_struct(jsonenc *e, const upb_msg *msg, jsonenc_putstr(e, "{"); - while (upb_mapiter_next(fields, &iter)) { - upb_msgval key = upb_mapiter_key(fields, iter); - upb_msgval val = upb_mapiter_value(fields, iter); + if (fields) { + while (upb_mapiter_next(fields, &iter)) { + upb_msgval key = upb_mapiter_key(fields, iter); + upb_msgval val = upb_mapiter_value(fields, iter); - jsonenc_putsep(e, ", ", &first); - jsonenc_string(e, key.str_val); - jsonenc_putstr(e, ": "); - jsonenc_value(e, val.msg_val, upb_fielddef_msgsubdef(value_f)); + jsonenc_putsep(e, ",", &first); + jsonenc_string(e, key.str_val); + jsonenc_putstr(e, ":"); + jsonenc_value(e, val.msg_val, upb_fielddef_msgsubdef(value_f)); + } } jsonenc_putstr(e, "}"); @@ -411,17 +413,19 @@ static void jsonenc_listvalue(jsonenc *e, const upb_msg *msg, const upb_fielddef *values_f = upb_msgdef_itof(m, 1); const upb_msgdef *values_m = upb_fielddef_msgsubdef(values_f); const upb_array *values = upb_msg_get(msg, values_f).array_val; - const size_t size = upb_array_size(values); size_t i; bool first = true; jsonenc_putstr(e, "["); - for (i = 0; i < size; i++) { - upb_msgval elem = upb_array_get(values, i); + if (values) { + const size_t size = upb_array_size(values); + for (i = 0; i < size; i++) { + upb_msgval elem = upb_array_get(values, i); - jsonenc_putsep(e, ", ", &first); - jsonenc_value(e, elem.msg_val, values_m); + jsonenc_putsep(e, ",", &first); + jsonenc_value(e, elem.msg_val, values_m); + } } jsonenc_putstr(e, "]"); @@ -564,7 +568,7 @@ static void jsonenc_mapkey(jsonenc *e, upb_msgval val, const upb_fielddef *f) { UPB_UNREACHABLE(); } - jsonenc_putstr(e, "\": "); + jsonenc_putstr(e, "\":"); } static void jsonenc_array(jsonenc *e, const upb_array *arr, @@ -576,7 +580,7 @@ static void jsonenc_array(jsonenc *e, const upb_array *arr, jsonenc_putstr(e, "["); for (i = 0; i < size; i++) { - jsonenc_putsep(e, ", ", &first); + jsonenc_putsep(e, ",", &first); jsonenc_scalar(e, upb_array_get(arr, i), f); } @@ -593,7 +597,7 @@ static void jsonenc_map(jsonenc *e, const upb_map *map, const upb_fielddef *f) { jsonenc_putstr(e, "{"); while (upb_mapiter_next(map, &iter)) { - jsonenc_putsep(e, ", ", &first); + jsonenc_putsep(e, ",", &first); jsonenc_mapkey(e, upb_mapiter_key(map, iter), key_f); jsonenc_scalar(e, upb_mapiter_value(map, iter), val_f); } @@ -611,8 +615,8 @@ static void jsonenc_fieldval(jsonenc *e, const upb_fielddef *f, name = upb_fielddef_jsonname(f); } - jsonenc_putsep(e, ", ", first); - jsonenc_printf(e, "\"%s\": ", name); + jsonenc_putsep(e, ",", first); + jsonenc_printf(e, "\"%s\":", name); if (upb_fielddef_ismap(f)) { jsonenc_map(e, val.map_val, f); @@ -679,7 +683,7 @@ size_t upb_json_encode(const upb_msg *msg, const upb_msgdef *m, if (setjmp(e.err)) return -1; - jsonenc_msg(&e, msg, m); + jsonenc_msgfield(&e, msg, m); if (e.arena) upb_arena_free(e.arena); return jsonenc_nullz(&e, size); } diff --git a/upb/msg.c b/upb/msg.c index 8df9d7a1f76..fd6c59b0b2d 100644 --- a/upb/msg.c +++ b/upb/msg.c @@ -5,8 +5,6 @@ #include "upb/port_def.inc" -#define VOIDPTR_AT(msg, ofs) (void*)((char*)msg + (int)ofs) - /** upb_msg *******************************************************************/ static const char _upb_fieldtype_to_sizelg2[12] = { @@ -38,59 +36,52 @@ static size_t upb_msg_sizeof(const upb_msglayout *l) { } static upb_msg_internal *upb_msg_getinternal(upb_msg *msg) { - return VOIDPTR_AT(msg, -sizeof(upb_msg_internal)); + return UPB_PTR_AT(msg, -sizeof(upb_msg_internal), upb_msg_internal); } static const upb_msg_internal *upb_msg_getinternal_const(const upb_msg *msg) { - return VOIDPTR_AT(msg, -sizeof(upb_msg_internal)); + return UPB_PTR_AT(msg, -sizeof(upb_msg_internal), upb_msg_internal); } -static upb_msg_internal_withext *upb_msg_getinternalwithext( - upb_msg *msg, const upb_msglayout *l) { - UPB_ASSERT(l->extendable); - return VOIDPTR_AT(msg, -sizeof(upb_msg_internal_withext)); +void _upb_msg_clear(upb_msg *msg, const upb_msglayout *l) { + size_t internal = upb_msg_internalsize(l); + void *mem = UPB_PTR_AT(msg, -internal, char); + memset(mem, 0, l->size + internal); } upb_msg *_upb_msg_new(const upb_msglayout *l, upb_arena *a) { - upb_alloc *alloc = upb_arena_alloc(a); - void *mem = upb_malloc(alloc, upb_msg_sizeof(l)); - upb_msg_internal *in; + void *mem = upb_arena_malloc(a, upb_msg_sizeof(l)); upb_msg *msg; if (!mem) { return NULL; } - msg = VOIDPTR_AT(mem, upb_msg_internalsize(l)); - - /* Initialize normal members. */ - memset(msg, 0, l->size); - - /* Initialize internal members. */ - in = upb_msg_getinternal(msg); - in->unknown = NULL; - in->unknown_len = 0; - in->unknown_size = 0; - - if (l->extendable) { - upb_msg_getinternalwithext(msg, l)->extdict = NULL; - } - + msg = UPB_PTR_AT(mem, upb_msg_internalsize(l), upb_msg); + _upb_msg_clear(msg, l); return msg; } -void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, - upb_arena *arena) { +bool _upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, + upb_arena *arena) { upb_msg_internal *in = upb_msg_getinternal(msg); if (len > in->unknown_size - in->unknown_len) { upb_alloc *alloc = upb_arena_alloc(arena); size_t need = in->unknown_size + len; size_t newsize = UPB_MAX(in->unknown_size * 2, need); - in->unknown = upb_realloc(alloc, in->unknown, in->unknown_size, newsize); + void *mem = upb_realloc(alloc, in->unknown, in->unknown_size, newsize); + if (!mem) return false; + in->unknown = mem; in->unknown_size = newsize; } memcpy(in->unknown + in->unknown_len, data, len); in->unknown_len += len; + return true; +} + +void _upb_msg_discardunknown_shallow(upb_msg *msg) { + upb_msg_internal *in = upb_msg_getinternal(msg); + in->unknown_len = 0; } const char *upb_msg_getunknown(const upb_msg *msg, size_t *len) { @@ -148,19 +139,10 @@ static upb_array *getorcreate_array(upb_array **arr_ptr, upb_fieldtype_t type, return arr; } -static bool resize_array(upb_array *arr, size_t size, upb_arena *arena) { - if (size > arr->size && !_upb_array_realloc(arr, size, arena)) { - return false; - } - - arr->len = size; - return true; -} - void *_upb_array_resize_fallback(upb_array **arr_ptr, size_t size, upb_fieldtype_t type, upb_arena *arena) { upb_array *arr = getorcreate_array(arr_ptr, type, arena); - return arr && resize_array(arr, size, arena) ? _upb_array_ptr(arr) : NULL; + return arr && _upb_array_resize(arr, size, arena) ? _upb_array_ptr(arr) : NULL; } bool _upb_array_append_fallback(upb_array **arr_ptr, const void *value, @@ -170,7 +152,7 @@ bool _upb_array_append_fallback(upb_array **arr_ptr, const void *value, int lg2 = _upb_fieldtype_to_sizelg2[type]; char *data; - if (!arr || !resize_array(arr, elem + 1, arena)) return false; + if (!arr || !_upb_array_resize(arr, elem + 1, arena)) return false; data = _upb_array_ptr(arr); memcpy(data + (elem << lg2), value, 1 << lg2); @@ -192,5 +174,3 @@ upb_map *_upb_map_new(upb_arena *a, size_t key_size, size_t value_size) { return map; } - -#undef VOIDPTR_AT diff --git a/upb/msg.h b/upb/msg.h index 2b6423a5bd0..dad54c2b7f1 100644 --- a/upb/msg.h +++ b/upb/msg.h @@ -30,16 +30,17 @@ typedef void upb_msg; * members are public so generated code can initialize them, but users MUST NOT * read or write any of its members. */ -/* This isn't a real label according to descriptor.proto, but in the table we - * use this for map fields instead of UPB_LABEL_REPEATED. */ +/* These aren't real labels according to descriptor.proto, but in the table we + * use these for map/packed fields instead of UPB_LABEL_REPEATED. */ enum { - UPB_LABEL_MAP = 4 + _UPB_LABEL_MAP = 4, + _UPB_LABEL_PACKED = 7 /* Low 3 bits are common with UPB_LABEL_REPEATED. */ }; typedef struct { uint32_t number; uint16_t offset; - int16_t presence; /* If >0, hasbit_index+1. If <0, oneof_index+1. */ + int16_t presence; /* If >0, hasbit_index. If <0, -oneof_index. */ uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */ uint8_t descriptortype; uint8_t label; @@ -80,10 +81,16 @@ extern char _upb_fieldtype_to_size[12]; /* Creates a new messages with the given layout on the given arena. */ upb_msg *_upb_msg_new(const upb_msglayout *l, upb_arena *a); +/* Clears the given message. */ +void _upb_msg_clear(upb_msg *msg, const upb_msglayout *l); + +/* Discards the unknown fields for this message only. */ +void _upb_msg_discardunknown_shallow(upb_msg *msg); + /* Adds unknown data (serialized protobuf data) to the given message. The data * is copied into the message instance. */ -void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, - upb_arena *arena); +bool _upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, + upb_arena *arena); /* Returns a reference to the message's unknown data. */ const char *upb_msg_getunknown(const upb_msg *msg, size_t *len); @@ -104,6 +111,14 @@ UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t n return *PTR_AT(msg, case_ofs, int32_t) == num; } +UPB_INLINE bool _upb_has_submsg_nohasbit(const void *msg, size_t ofs) { + return *PTR_AT(msg, ofs, const void*) != NULL; +} + +UPB_INLINE bool _upb_isrepeated(const upb_msglayout_field *field) { + return (field->label & 3) == UPB_LABEL_REPEATED; +} + /** upb_array *****************************************************************/ /* Our internal representation for repeated fields. */ @@ -133,6 +148,19 @@ void *_upb_array_resize_fallback(upb_array **arr_ptr, size_t size, bool _upb_array_append_fallback(upb_array **arr_ptr, const void *value, upb_fieldtype_t type, upb_arena *arena); +UPB_INLINE bool _upb_array_reserve(upb_array *arr, size_t size, + upb_arena *arena) { + if (arr->size < size) return _upb_array_realloc(arr, size, arena); + return true; +} + +UPB_INLINE bool _upb_array_resize(upb_array *arr, size_t size, + upb_arena *arena) { + if (!_upb_array_reserve(arr, size, arena)) return false; + arr->len = size; + return true; +} + UPB_INLINE const void *_upb_array_accessor(const void *msg, size_t ofs, size_t *size) { const upb_array *arr = *PTR_AT(msg, ofs, const upb_array*); @@ -276,7 +304,7 @@ UPB_INLINE bool _upb_map_get(const upb_map *map, const void *key, upb_value tabval; upb_strview k = _upb_map_tokey(key, key_size); bool ret = upb_strtable_lookup2(&map->table, k.data, k.size, &tabval); - if (ret) { + if (ret && val) { _upb_map_fromvalue(tabval, val, val_size); } return ret; @@ -287,8 +315,8 @@ UPB_INLINE void* _upb_map_next(const upb_map *map, size_t *iter) { it.t = &map->table; it.index = *iter; upb_strtable_next(&it); - if (upb_strtable_done(&it)) return NULL; *iter = it.index; + if (upb_strtable_done(&it)) return NULL; return (void*)str_tabent(&it); } @@ -315,21 +343,21 @@ UPB_INLINE void _upb_map_clear(upb_map *map) { /* Message map operations, these get the map from the message first. */ UPB_INLINE size_t _upb_msg_map_size(const upb_msg *msg, size_t ofs) { - upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + upb_map *map = *UPB_PTR_AT(msg, ofs, upb_map *); return map ? _upb_map_size(map) : 0; } UPB_INLINE bool _upb_msg_map_get(const upb_msg *msg, size_t ofs, const void *key, size_t key_size, void *val, size_t val_size) { - upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + upb_map *map = *UPB_PTR_AT(msg, ofs, upb_map *); if (!map) return false; return _upb_map_get(map, key, key_size, val, val_size); } UPB_INLINE void *_upb_msg_map_next(const upb_msg *msg, size_t ofs, size_t *iter) { - upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + upb_map *map = *UPB_PTR_AT(msg, ofs, upb_map *); if (!map) return NULL; return _upb_map_next(map, iter); } @@ -346,13 +374,13 @@ UPB_INLINE bool _upb_msg_map_set(upb_msg *msg, size_t ofs, const void *key, UPB_INLINE bool _upb_msg_map_delete(upb_msg *msg, size_t ofs, const void *key, size_t key_size) { - upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + upb_map *map = *UPB_PTR_AT(msg, ofs, upb_map *); if (!map) return false; return _upb_map_delete(map, key, key_size); } UPB_INLINE void _upb_msg_map_clear(upb_msg *msg, size_t ofs) { - upb_map *map = UPB_FIELD_AT(msg, upb_map *, ofs); + upb_map *map = *UPB_PTR_AT(msg, ofs, upb_map *); if (!map) return; _upb_map_clear(map); } diff --git a/upb/pb/decoder.c b/upb/pb/decoder.c index 8cdb234526a..4f40eed4bed 100644 --- a/upb/pb/decoder.c +++ b/upb/pb/decoder.c @@ -969,9 +969,6 @@ void upb_pbdecoder_reset(upb_pbdecoder *d) { upb_pbdecoder *upb_pbdecoder_create(upb_arena *a, const upb_pbdecodermethod *m, upb_sink sink, upb_status *status) { const size_t default_max_nesting = 64; -#ifndef NDEBUG - size_t size_before = upb_arena_bytesallocated(a); -#endif upb_pbdecoder *d = upb_arena_malloc(a, sizeof(upb_pbdecoder)); if (!d) return NULL; @@ -997,9 +994,6 @@ upb_pbdecoder *upb_pbdecoder_create(upb_arena *a, const upb_pbdecodermethod *m, } d->top->sink = sink; - /* If this fails, increase the value in decoder.h. */ - UPB_ASSERT_DEBUGVAR(upb_arena_bytesallocated(a) - size_before <= - UPB_PB_DECODER_SIZE); return d; } diff --git a/upb/pb/encoder.c b/upb/pb/encoder.c index 257e1474ca3..ea4859ec117 100644 --- a/upb/pb/encoder.c +++ b/upb/pb/encoder.c @@ -534,9 +534,6 @@ upb_pb_encoder *upb_pb_encoder_create(upb_arena *arena, const upb_handlers *h, const size_t initial_segbufsize = 16; /* TODO(haberman): make this configurable. */ const size_t stack_size = 64; -#ifndef NDEBUG - const size_t size_before = upb_arena_bytesallocated(arena); -#endif upb_pb_encoder *e = upb_arena_malloc(arena, sizeof(upb_pb_encoder)); if (!e) return NULL; @@ -561,9 +558,6 @@ upb_pb_encoder *upb_pb_encoder_create(upb_arena *arena, const upb_handlers *h, e->subc = output.closure; e->ptr = e->buf; - /* If this fails, increase the value in encoder.h. */ - UPB_ASSERT_DEBUGVAR(upb_arena_bytesallocated(arena) - size_before <= - UPB_PB_ENCODER_SIZE); return e; } diff --git a/upb/port_def.inc b/upb/port_def.inc index 51f8eac96f6..61675d37c05 100644 --- a/upb/port_def.inc +++ b/upb/port_def.inc @@ -21,6 +21,7 @@ * This file is private and must not be included by users! */ #include +#include #if UINTPTR_MAX == 0xffffffff #define UPB_SIZE(size32, size64) size32 @@ -28,20 +29,19 @@ #define UPB_SIZE(size32, size64) size64 #endif -/* These macros aren't really "port", they are helper macros that we don't want - * to leak. +/* If we always read/write as a consistent type to each address, this shouldn't + * violate aliasing. */ -#define UPB_FIELD_AT(msg, fieldtype, offset) \ - *(fieldtype*)((const char*)(msg) + offset) +#define UPB_PTR_AT(msg, ofs, type) ((type*)((char*)(msg) + (ofs))) #define UPB_READ_ONEOF(msg, fieldtype, offset, case_offset, case_val, default) \ - UPB_FIELD_AT(msg, int, case_offset) == case_val \ - ? UPB_FIELD_AT(msg, fieldtype, offset) \ + *UPB_PTR_AT(msg, case_offset, int) == case_val \ + ? *UPB_PTR_AT(msg, offset, fieldtype) \ : default #define UPB_WRITE_ONEOF(msg, fieldtype, offset, value, case_offset, case_val) \ - UPB_FIELD_AT(msg, int, case_offset) = case_val; \ - UPB_FIELD_AT(msg, fieldtype, offset) = value; + *UPB_PTR_AT(msg, case_offset, int) = case_val; \ + *UPB_PTR_AT(msg, offset, fieldtype) = value; #define UPB_MAPTYPE_STRING 0 @@ -54,6 +54,11 @@ #define UPB_INLINE static #endif +#define UPB_ALIGN_UP(size, align) (((size) + (align) - 1) / (align) * (align)) +#define UPB_ALIGN_DOWN(size, align) ((size) / (align) * (align)) +#define UPB_ALIGN_MALLOC(size) UPB_ALIGN_UP(size, 16) +#define UPB_ALIGN_OF(type) offsetof (struct { char c; type member; }, member) + /* Hints to the compiler about likely/unlikely branches. */ #if defined (__GNUC__) || defined(__clang__) #define UPB_LIKELY(x) __builtin_expect((x),1) @@ -133,6 +138,8 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg); #ifdef NDEBUG #ifdef __GNUC__ #define UPB_ASSUME(expr) if (!(expr)) __builtin_unreachable() +#elif defined _MSC_VER +#define UPB_ASSUME(expr) if (!(expr)) __assume(0) #else #define UPB_ASSUME(expr) do {} if (false && (expr)) #endif diff --git a/upb/port_undef.inc b/upb/port_undef.inc index e91e9644bb1..c322d471608 100644 --- a/upb/port_undef.inc +++ b/upb/port_undef.inc @@ -2,10 +2,14 @@ #undef UPB_MAPTYPE_STRING #undef UPB_SIZE -#undef UPB_FIELD_AT +#undef UPB_PTR_AT #undef UPB_READ_ONEOF #undef UPB_WRITE_ONEOF #undef UPB_INLINE +#undef UPB_ALIGN_UP +#undef UPB_ALIGN_DOWN +#undef UPB_ALIGN_MALLOC +#undef UPB_ALIGN_OF #undef UPB_FORCEINLINE #undef UPB_NOINLINE #undef UPB_NORETURN diff --git a/upb/reflection.c b/upb/reflection.c index d032eccee40..a23129c2cef 100644 --- a/upb/reflection.c +++ b/upb/reflection.c @@ -47,11 +47,6 @@ static char _upb_fieldtype_to_mapsize[12] = { /** upb_msg *******************************************************************/ -/* If we always read/write as a consistent type to each address, this shouldn't - * violate aliasing. - */ -#define PTR_AT(msg, ofs, type) (type*)((char*)msg + ofs) - upb_msg *upb_msg_new(const upb_msgdef *m, upb_arena *a) { return _upb_msg_new(upb_msgdef_layout(m), a); } @@ -63,12 +58,12 @@ static bool in_oneof(const upb_msglayout_field *field) { static uint32_t *oneofcase(const upb_msg *msg, const upb_msglayout_field *field) { UPB_ASSERT(in_oneof(field)); - return PTR_AT(msg, ~field->presence, uint32_t); + return UPB_PTR_AT(msg, -field->presence, uint32_t); } static upb_msgval _upb_msg_getraw(const upb_msg *msg, const upb_fielddef *f) { const upb_msglayout_field *field = upb_fielddef_layout(f); - const char *mem = PTR_AT(msg, field->offset, char); + const char *mem = UPB_PTR_AT(msg, field->offset, char); upb_msgval val = {0}; int size = upb_fielddef_isseq(f) ? sizeof(void *) : field_size[field->descriptortype]; @@ -82,7 +77,7 @@ bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f) { return *oneofcase(msg, field) == field->number; } else if (field->presence > 0) { uint32_t hasbit = field->presence; - return *PTR_AT(msg, hasbit / 8, char) & (1 << (hasbit % 8)); + return *UPB_PTR_AT(msg, hasbit / 8, uint8_t) & (1 << (hasbit % 8)); } else { UPB_ASSERT(field->descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE || field->descriptortype == UPB_DESCRIPTOR_TYPE_GROUP); @@ -90,16 +85,22 @@ bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f) { } } -bool upb_msg_hasoneof(const upb_msg *msg, const upb_oneofdef *o) { +const upb_fielddef *upb_msg_whichoneof(const upb_msg *msg, + const upb_oneofdef *o) { upb_oneof_iter i; const upb_fielddef *f; const upb_msglayout_field *field; + const upb_msgdef *m = upb_oneofdef_containingtype(o); + uint32_t oneof_case; + /* This is far from optimal. */ upb_oneof_begin(&i, o); if (upb_oneof_done(&i)) return false; f = upb_oneof_iter_field(&i); field = upb_fielddef_layout(f); - return *oneofcase(msg, field) != 0; + oneof_case = *oneofcase(msg, field); + + return oneof_case ? upb_msgdef_itof(m, oneof_case) : NULL; } upb_msgval upb_msg_get(const upb_msg *msg, const upb_fielddef *f) { @@ -147,7 +148,7 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, upb_arena *a) { const upb_msglayout_field *field = upb_fielddef_layout(f); upb_mutmsgval ret; - char *mem = PTR_AT(msg, field->offset, char); + char *mem = UPB_PTR_AT(msg, field->offset, char); bool wrong_oneof = in_oneof(field) && *oneofcase(msg, field) != field->number; memcpy(&ret, mem, sizeof(void*)); @@ -169,6 +170,9 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, if (wrong_oneof) { *oneofcase(msg, field) = field->number; + } else if (field->presence > 0) { + uint32_t hasbit = field->presence; + *UPB_PTR_AT(msg, hasbit / 8, uint8_t) |= (1 << (hasbit % 8)); } } return ret; @@ -177,15 +181,40 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, upb_arena *a) { const upb_msglayout_field *field = upb_fielddef_layout(f); - char *mem = PTR_AT(msg, field->offset, char); + char *mem = UPB_PTR_AT(msg, field->offset, char); int size = upb_fielddef_isseq(f) ? sizeof(void *) : field_size[field->descriptortype]; memcpy(mem, &val, size); - if (in_oneof(field)) { + if (field->presence > 0) { + uint32_t hasbit = field->presence; + *UPB_PTR_AT(msg, hasbit / 8, uint8_t) |= (1 << (hasbit % 8)); + } else if (in_oneof(field)) { *oneofcase(msg, field) = field->number; } } +void upb_msg_clearfield(upb_msg *msg, const upb_fielddef *f) { + const upb_msglayout_field *field = upb_fielddef_layout(f); + char *mem = UPB_PTR_AT(msg, field->offset, char); + int size = upb_fielddef_isseq(f) ? sizeof(void *) + : field_size[field->descriptortype]; + + if (field->presence > 0) { + uint32_t hasbit = field->presence; + *UPB_PTR_AT(msg, hasbit / 8, uint8_t) &= ~(1 << (hasbit % 8)); + } else if (in_oneof(field)) { + uint32_t *oneof_case = oneofcase(msg, field); + if (*oneof_case != field->number) return; + *oneof_case = 0; + } + + memset(mem, 0, size); +} + +void upb_msg_clear(upb_msg *msg, const upb_msgdef *m) { + _upb_msg_clear(msg, upb_msgdef_layout(m)); +} + bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m, const upb_symtab *ext_pool, const upb_fielddef **out_f, upb_msgval *out_val, size_t *iter) { @@ -224,6 +253,56 @@ bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m, return false; } +bool _upb_msg_discardunknown(upb_msg *msg, const upb_msgdef *m, int depth) { + size_t iter = UPB_MSG_BEGIN; + const upb_fielddef *f; + upb_msgval val; + bool ret = true; + + if (--depth == 0) return false; + + _upb_msg_discardunknown_shallow(msg); + + while (upb_msg_next(msg, m, NULL /*ext_pool*/, &f, &val, &iter)) { + const upb_msgdef *subm = upb_fielddef_msgsubdef(f); + if (!subm) continue; + if (upb_fielddef_ismap(f)) { + const upb_fielddef *val_f = upb_msgdef_itof(subm, 2); + const upb_msgdef *val_m = upb_fielddef_msgsubdef(val_f); + upb_map *map = (upb_map*)val.map_val; + size_t iter = UPB_MAP_BEGIN; + + if (!val_m) continue; + + while (upb_mapiter_next(map, &iter)) { + upb_msgval map_val = upb_mapiter_value(map, iter); + if (!_upb_msg_discardunknown((upb_msg*)map_val.msg_val, val_m, depth)) { + ret = false; + } + } + } else if (upb_fielddef_isseq(f)) { + const upb_array *arr = val.array_val; + size_t i, n = upb_array_size(arr); + for (i = 0; i < n; i++) { + upb_msgval elem = upb_array_get(arr, i); + if (!_upb_msg_discardunknown((upb_msg*)elem.msg_val, subm, depth)) { + ret = false; + } + } + } else { + if (!_upb_msg_discardunknown((upb_msg*)val.msg_val, subm, depth)) { + ret = false; + } + } + } + + return ret; +} + +bool upb_msg_discardunknown(upb_msg *msg, const upb_msgdef *m, int maxdepth) { + return _upb_msg_discardunknown(msg, m, maxdepth); +} + /** upb_array *****************************************************************/ upb_array *upb_array_new(upb_arena *a, upb_fieldtype_t type) { @@ -259,10 +338,8 @@ bool upb_array_append(upb_array *arr, upb_msgval val, upb_arena *arena) { return true; } -/* Resizes the array to the given size, reallocating if necessary, and returns a - * pointer to the new array elements. */ bool upb_array_resize(upb_array *arr, size_t size, upb_arena *arena) { - return _upb_array_realloc(arr, size, arena); + return _upb_array_resize(arr, size, arena); } /** upb_map *******************************************************************/ @@ -294,6 +371,14 @@ bool upb_mapiter_next(const upb_map *map, size_t *iter) { return _upb_map_next(map, iter); } +bool upb_mapiter_done(const upb_map *map, size_t iter) { + upb_strtable_iter i; + UPB_ASSERT(iter != UPB_MAP_BEGIN); + i.t = &map->table; + i.index = iter; + return upb_strtable_done(&i); +} + /* Returns the key and value for this entry of the map. */ upb_msgval upb_mapiter_key(const upb_map *map, size_t iter) { upb_strtable_iter i; diff --git a/upb/reflection.h b/upb/reflection.h index c55fe4a2e61..0133630c58d 100644 --- a/upb/reflection.h +++ b/upb/reflection.h @@ -44,8 +44,9 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, upb_arena *a) /* May only be called for fields where upb_fielddef_haspresence(f) == true. */ bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f); -/* Returns whether any field is set in the oneof. */ -bool upb_msg_hasoneof(const upb_msg *msg, const upb_oneofdef *o); +/* Returns the field that is set in the oneof, or NULL if none are set. */ +const upb_fielddef *upb_msg_whichoneof(const upb_msg *msg, + const upb_oneofdef *o); /* Sets the given field to the given value. For a msg/array/map/string, the * value must be in the same arena. */ @@ -55,6 +56,9 @@ void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, /* Clears any field presence and sets the value back to its default. */ void upb_msg_clearfield(upb_msg *msg, const upb_fielddef *f); +/* Clear all data and unknown fields. */ +void upb_msg_clear(upb_msg *msg, const upb_msgdef *m); + /* Iterate over present fields. * * size_t iter = UPB_MSG_BEGIN; @@ -79,6 +83,9 @@ bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m, void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, upb_arena *arena); +/* Clears all unknown field data from this message and all submessages. */ +bool upb_msg_discardunknown(upb_msg *msg, const upb_msgdef *m, int maxdepth); + /* Returns a reference to the message's unknown data. */ const char *upb_msg_getunknown(const upb_msg *msg, size_t *len); @@ -143,6 +150,11 @@ bool upb_map_delete(upb_map *map, upb_msgval key); /* Advances to the next entry. Returns false if no more entries are present. */ bool upb_mapiter_next(const upb_map *map, size_t *iter); +/* Returns true if the iterator still points to a valid entry, or false if the + * iterator is past the last element. It is an error to call this function with + * UPB_MAP_BEGIN (you must call next() at least once first). */ +bool upb_mapiter_done(const upb_map *map, size_t iter); + /* Returns the key and value for this entry of the map. */ upb_msgval upb_mapiter_key(const upb_map *map, size_t iter); upb_msgval upb_mapiter_value(const upb_map *map, size_t iter); diff --git a/upb/table.c b/upb/table.c index 21f8fcf6f87..c5ca3ac49bd 100644 --- a/upb/table.c +++ b/upb/table.c @@ -243,7 +243,7 @@ static bool rm(upb_table *t, lookupkey_t key, upb_value *val, static size_t next(const upb_table *t, size_t i) { do { if (++i >= upb_table_size(t)) - return SIZE_MAX; + return SIZE_MAX - 1; /* Distinct from -1. */ } while(upb_tabent_isempty(&t->entries[i])); return i; diff --git a/upb/upb.c b/upb/upb.c index 266ea7d7f98..cccf4489402 100644 --- a/upb/upb.c +++ b/upb/upb.c @@ -11,17 +11,6 @@ #include "upb/port_def.inc" -/* Guarantee null-termination and provide ellipsis truncation. - * It may be tempting to "optimize" this by initializing these final - * four bytes up-front and then being careful never to overwrite them, - * this is safer and simpler. */ -static void nullz(upb_status *status) { - const char *ellipsis = "..."; - size_t len = strlen(ellipsis); - UPB_ASSERT(sizeof(status->msg) > len); - memcpy(status->msg + sizeof(status->msg) - len, ellipsis, len); -} - /* upb_status *****************************************************************/ void upb_status_clear(upb_status *status) { @@ -37,8 +26,8 @@ const char *upb_status_errmsg(const upb_status *status) { return status->msg; } void upb_status_seterrmsg(upb_status *status, const char *msg) { if (!status) return; status->ok = false; - strncpy(status->msg, msg, sizeof(status->msg)); - nullz(status); + strncpy(status->msg, msg, UPB_STATUS_MAX_MESSAGE - 1); + status->msg[UPB_STATUS_MAX_MESSAGE - 1] = '\0'; } void upb_status_seterrf(upb_status *status, const char *fmt, ...) { @@ -52,7 +41,7 @@ void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args) { if (!status) return; status->ok = false; _upb_vsnprintf(status->msg, sizeof(status->msg), fmt, args); - nullz(status); + status->msg[UPB_STATUS_MAX_MESSAGE - 1] = '\0'; } /* upb_alloc ******************************************************************/ @@ -74,188 +63,214 @@ upb_alloc upb_alloc_global = {&upb_global_allocfunc}; /* upb_arena ******************************************************************/ /* Be conservative and choose 16 in case anyone is using SSE. */ -static const size_t maxalign = 16; -static size_t align_up_max(size_t size) { - return ((size + maxalign - 1) / maxalign) * maxalign; -} +typedef struct mem_block { + struct mem_block *next; + uint32_t size; + uint32_t cleanups; + /* Data follows. */ +} mem_block; + +typedef struct cleanup_ent { + upb_cleanup_func *cleanup; + void *ud; +} cleanup_ent; struct upb_arena { - /* We implement the allocator interface. - * This must be the first member of upb_arena! */ - upb_alloc alloc; + _upb_arena_head head; + uint32_t *cleanups; /* Allocator to allocate arena blocks. We are responsible for freeing these * when we are destroyed. */ upb_alloc *block_alloc; + uint32_t last_size; - size_t bytes_allocated; - size_t next_block_size; - size_t max_block_size; + /* When multiple arenas are fused together, each arena points to a parent + * arena (root points to itself). The root tracks how many live arenas + * reference it. */ + uint32_t refcount; /* Only used when a->parent == a */ + struct upb_arena *parent; - /* Linked list of blocks. Points to an arena_block, defined in env.c */ - void *block_head; - - /* Cleanup entries. Pointer to a cleanup_ent, defined in env.c */ - void *cleanup_head; + /* Linked list of blocks to free/cleanup. */ + mem_block *freelist, *freelist_tail; }; -typedef struct mem_block { - struct mem_block *next; - size_t size; - size_t used; - bool owned; - /* Data follows. */ -} mem_block; - -typedef struct cleanup_ent { - struct cleanup_ent *next; - upb_cleanup_func *cleanup; - void *ud; -} cleanup_ent; +static const size_t memblock_reserve = UPB_ALIGN_UP(sizeof(mem_block), 16); -static void upb_arena_addblock(upb_arena *a, void *ptr, size_t size, - bool owned) { +static void upb_arena_addblock(upb_arena *a, void *ptr, size_t size) { mem_block *block = ptr; - block->next = a->block_head; + block->next = a->freelist; block->size = size; - block->used = align_up_max(sizeof(mem_block)); - block->owned = owned; + block->cleanups = 0; + a->freelist = block; + a->last_size = size; + if (!a->freelist_tail) a->freelist_tail = block; - a->block_head = block; + a->head.ptr = UPB_PTR_AT(block, memblock_reserve, char); + a->head.end = UPB_PTR_AT(block, size, char); + a->cleanups = &block->cleanups; /* TODO(haberman): ASAN poison. */ } -static mem_block *upb_arena_allocblock(upb_arena *a, size_t size) { - size_t block_size = UPB_MAX(size, a->next_block_size) + sizeof(mem_block); +static bool upb_arena_allocblock(upb_arena *a, size_t size) { + size_t block_size = UPB_MAX(size, a->last_size * 2) + memblock_reserve; mem_block *block = upb_malloc(a->block_alloc, block_size); - if (!block) { - return NULL; - } + if (!block) return false; + upb_arena_addblock(a, block, block_size); + return true; +} - upb_arena_addblock(a, block, block_size, true); - a->next_block_size = UPB_MIN(block_size * 2, a->max_block_size); +static bool arena_has(upb_arena *a, size_t size) { + _upb_arena_head *h = (_upb_arena_head*)a; + return (size_t)(h->end - h->ptr) >= size; +} - return block; +void *_upb_arena_slowmalloc(upb_arena *a, size_t size) { + if (!upb_arena_allocblock(a, size)) return NULL; /* Out of memory. */ + UPB_ASSERT(arena_has(a, size)); + return upb_arena_malloc(a, size); } static void *upb_arena_doalloc(upb_alloc *alloc, void *ptr, size_t oldsize, size_t size) { upb_arena *a = (upb_arena*)alloc; /* upb_alloc is initial member. */ - mem_block *block = a->block_head; - void *ret; + return upb_arena_realloc(a, ptr, oldsize, size); +} - if (size == 0) { - return NULL; /* We are an arena, don't need individual frees. */ +static upb_arena *arena_findroot(upb_arena *a) { + /* Path splitting keeps time complexity down, see: + * https://en.wikipedia.org/wiki/Disjoint-set_data_structure */ + while (a->parent != a) { + upb_arena *next = a->parent; + a->parent = next->parent; + a = next; } + return a; +} - size = align_up_max(size); - - /* TODO(haberman): special-case if this is a realloc of the last alloc? */ +/* Public Arena API ***********************************************************/ - if (!block || block->size - block->used < size) { - /* Slow path: have to allocate a new block. */ - block = upb_arena_allocblock(a, size); +upb_arena *arena_initslow(void *mem, size_t n, upb_alloc *alloc) { + const size_t first_block_overhead = sizeof(upb_arena) + memblock_reserve; + upb_arena *a; - if (!block) { - return NULL; /* Out of memory. */ - } + /* We need to malloc the initial block. */ + n = first_block_overhead + 256; + if (!alloc || !(mem = upb_malloc(alloc, n))) { + return NULL; } - ret = (char*)block + block->used; - block->used += size; + a = UPB_PTR_AT(mem, n - sizeof(*a), upb_arena); + n -= sizeof(*a); - if (oldsize > 0) { - memcpy(ret, ptr, oldsize); /* Preserve existing data. */ - } + a->head.alloc.func = &upb_arena_doalloc; + a->block_alloc = alloc; + a->parent = a; + a->refcount = 1; + a->freelist = NULL; + a->freelist_tail = NULL; - /* TODO(haberman): ASAN unpoison. */ + upb_arena_addblock(a, mem, n); - a->bytes_allocated += size; - return ret; + return a; } -/* Public Arena API ***********************************************************/ - -#define upb_alignof(type) offsetof (struct { char c; type member; }, member) - upb_arena *upb_arena_init(void *mem, size_t n, upb_alloc *alloc) { - const size_t first_block_overhead = sizeof(upb_arena) + sizeof(mem_block); upb_arena *a; - bool owned = false; /* Round block size down to alignof(*a) since we will allocate the arena * itself at the end. */ - n &= ~(upb_alignof(upb_arena) - 1); - - if (n < first_block_overhead) { - /* We need to malloc the initial block. */ - n = first_block_overhead + 256; - owned = true; - if (!alloc || !(mem = upb_malloc(alloc, n))) { - return NULL; - } + n = UPB_ALIGN_DOWN(n, UPB_ALIGN_OF(upb_arena)); + + if (UPB_UNLIKELY(n < sizeof(upb_arena))) { + return arena_initslow(mem, n, alloc); } - a = (void*)((char*)mem + n - sizeof(*a)); + a = UPB_PTR_AT(mem, n - sizeof(*a), upb_arena); n -= sizeof(*a); - a->alloc.func = &upb_arena_doalloc; - a->block_alloc = &upb_alloc_global; - a->bytes_allocated = 0; - a->next_block_size = 256; - a->max_block_size = 16384; - a->cleanup_head = NULL; - a->block_head = NULL; + a->head.alloc.func = &upb_arena_doalloc; a->block_alloc = alloc; - - upb_arena_addblock(a, mem, n, owned); + a->parent = a; + a->refcount = 1; + a->last_size = 128; + a->head.ptr = mem; + a->head.end = UPB_PTR_AT(mem, n, char); + a->freelist = NULL; + a->cleanups = NULL; return a; } -#undef upb_alignof +static void arena_dofree(upb_arena *a) { + mem_block *block = a->freelist; + UPB_ASSERT(a->parent == a); + UPB_ASSERT(a->refcount == 0); -void upb_arena_free(upb_arena *a) { - cleanup_ent *ent = a->cleanup_head; - mem_block *block = a->block_head; - - while (ent) { - ent->cleanup(ent->ud); - ent = ent->next; - } - - /* Must do this after running cleanup functions, because this will delete - * the memory we store our cleanup entries in! */ while (block) { /* Load first since we are deleting block. */ mem_block *next = block->next; - if (block->owned) { - upb_free(a->block_alloc, block); + if (block->cleanups > 0) { + cleanup_ent *end = UPB_PTR_AT(block, block->size, void); + cleanup_ent *ptr = end - block->cleanups; + + for (; ptr < end; ptr++) { + ptr->cleanup(ptr->ud); + } } + upb_free(a->block_alloc, block); block = next; } } +void upb_arena_free(upb_arena *a) { + a = arena_findroot(a); + if (--a->refcount == 0) arena_dofree(a); +} + bool upb_arena_addcleanup(upb_arena *a, void *ud, upb_cleanup_func *func) { - cleanup_ent *ent = upb_malloc(&a->alloc, sizeof(cleanup_ent)); - if (!ent) { - return false; /* Out of memory. */ + cleanup_ent *ent; + + if (!a->cleanups || !arena_has(a, sizeof(cleanup_ent))) { + if (!upb_arena_allocblock(a, 128)) return false; /* Out of memory. */ + UPB_ASSERT(arena_has(a, sizeof(cleanup_ent))); } + a->head.end -= sizeof(cleanup_ent); + ent = (cleanup_ent*)a->head.end; + (*a->cleanups)++; + ent->cleanup = func; ent->ud = ud; - ent->next = a->cleanup_head; - a->cleanup_head = ent; return true; } -size_t upb_arena_bytesallocated(const upb_arena *a) { - return a->bytes_allocated; +void upb_arena_fuse(upb_arena *a1, upb_arena *a2) { + upb_arena *r1 = arena_findroot(a1); + upb_arena *r2 = arena_findroot(a2); + + if (r1 == r2) return; /* Already fused. */ + + /* We want to join the smaller tree to the larger tree. + * So swap first if they are backwards. */ + if (r1->refcount < r2->refcount) { + upb_arena *tmp = r1; + r1 = r2; + r2 = tmp; + } + + /* r1 takes over r2's freelist and refcount. */ + r1->refcount += r2->refcount; + if (r2->freelist_tail) { + UPB_ASSERT(r2->freelist_tail->next == NULL); + r2->freelist_tail->next = r1->freelist; + r1->freelist = r2->freelist; + } + r2->parent = r1; } diff --git a/upb/upb.h b/upb/upb.h index 011103d949a..7ad3b1fdc1d 100644 --- a/upb/upb.h +++ b/upb/upb.h @@ -1,8 +1,5 @@ /* ** This file contains shared definitions that are widely used across upb. -** -** This is a mixed C/C++ interface that offers a full API to both languages. -** See the top-level README for more information. */ #ifndef UPB_H_ @@ -15,24 +12,14 @@ #include #include +#include "upb/port_def.inc" + #ifdef __cplusplus -#include -namespace upb { -class Arena; -class Status; -template class InlinedArena; -} +extern "C" { #endif -#include "upb/port_def.inc" - /* upb_status *****************************************************************/ -/* upb_status represents a success or failure status and error message. - * It owns no resources and allocates no memory, so it should work - * even in OOM situations. */ - -/* The maximum length of an error message before it will get truncated. */ #define UPB_STATUS_MAX_MESSAGE 127 typedef struct { @@ -40,59 +27,15 @@ typedef struct { char msg[UPB_STATUS_MAX_MESSAGE]; /* Error message; NULL-terminated. */ } upb_status; -#ifdef __cplusplus -extern "C" { -#endif - const char *upb_status_errmsg(const upb_status *status); bool upb_ok(const upb_status *status); -/* Any of the functions that write to a status object allow status to be NULL, - * to support use cases where the function's caller does not care about the - * status message. */ +/* These are no-op if |status| is NULL. */ void upb_status_clear(upb_status *status); void upb_status_seterrmsg(upb_status *status, const char *msg); void upb_status_seterrf(upb_status *status, const char *fmt, ...); void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args); -UPB_INLINE void upb_status_setoom(upb_status *status) { - upb_status_seterrmsg(status, "out of memory"); -} - -#ifdef __cplusplus -} /* extern "C" */ - -class upb::Status { - public: - Status() { upb_status_clear(&status_); } - - upb_status* ptr() { return &status_; } - - /* Returns true if there is no error. */ - bool ok() const { return upb_ok(&status_); } - - /* Guaranteed to be NULL-terminated. */ - const char *error_message() const { return upb_status_errmsg(&status_); } - - /* The error message will be truncated if it is longer than - * UPB_STATUS_MAX_MESSAGE-4. */ - void SetErrorMessage(const char *msg) { upb_status_seterrmsg(&status_, msg); } - void SetFormattedErrorMessage(const char *fmt, ...) { - va_list args; - va_start(args, fmt); - upb_status_vseterrf(&status_, fmt, args); - va_end(args); - } - - /* Resets the status to a successful state with no message. */ - void Clear() { upb_status_clear(&status_); } - - private: - upb_status status_; -}; - -#endif /* __cplusplus */ - /** upb_strview ************************************************************/ typedef struct { @@ -159,16 +102,8 @@ UPB_INLINE void upb_free(upb_alloc *alloc, void *ptr) { /* The global allocator used by upb. Uses the standard malloc()/free(). */ -#ifdef __cplusplus -extern "C" { -#endif - extern upb_alloc upb_alloc_global; -#ifdef __cplusplus -} /* extern "C" */ -#endif - /* Functions that hard-code the global malloc. * * We still get benefit because we can put custom logic into our global @@ -205,9 +140,14 @@ typedef void upb_cleanup_func(void *ud); struct upb_arena; typedef struct upb_arena upb_arena; -#ifdef __cplusplus -extern "C" { -#endif +typedef struct { + /* We implement the allocator interface. + * This must be the first member of upb_arena! + * TODO(haberman): remove once handlers are gone. */ + upb_alloc alloc; + + char *ptr, *end; +} _upb_arena_head; /* Creates an arena from the given initial block (if any -- n may be 0). * Additional blocks will be allocated from |alloc|. If |alloc| is NULL, this @@ -215,83 +155,40 @@ extern "C" { upb_arena *upb_arena_init(void *mem, size_t n, upb_alloc *alloc); void upb_arena_free(upb_arena *a); bool upb_arena_addcleanup(upb_arena *a, void *ud, upb_cleanup_func *func); -size_t upb_arena_bytesallocated(const upb_arena *a); +void upb_arena_fuse(upb_arena *a, upb_arena *b); +void *_upb_arena_slowmalloc(upb_arena *a, size_t size); UPB_INLINE upb_alloc *upb_arena_alloc(upb_arena *a) { return (upb_alloc*)a; } -/* Convenience wrappers around upb_alloc functions. */ - UPB_INLINE void *upb_arena_malloc(upb_arena *a, size_t size) { - return upb_malloc(upb_arena_alloc(a), size); + _upb_arena_head *h = (_upb_arena_head*)a; + void* ret; + size = UPB_ALIGN_MALLOC(size); + + if (UPB_UNLIKELY((size_t)(h->end - h->ptr) < size)) { + return _upb_arena_slowmalloc(a, size); + } + + ret = h->ptr; + h->ptr += size; + return ret; } UPB_INLINE void *upb_arena_realloc(upb_arena *a, void *ptr, size_t oldsize, size_t size) { - return upb_realloc(upb_arena_alloc(a), ptr, oldsize, size); + void *ret = upb_arena_malloc(a, size); + + if (ret && oldsize > 0) { + memcpy(ret, ptr, oldsize); + } + + return ret; } UPB_INLINE upb_arena *upb_arena_new(void) { return upb_arena_init(NULL, 0, &upb_alloc_global); } -#ifdef __cplusplus -} /* extern "C" */ - -class upb::Arena { - public: - /* A simple arena with no initial memory block and the default allocator. */ - Arena() : ptr_(upb_arena_new(), upb_arena_free) {} - - upb_arena* ptr() { return ptr_.get(); } - - /* Allows this arena to be used as a generic allocator. - * - * The arena does not need free() calls so when using Arena as an allocator - * it is safe to skip them. However they are no-ops so there is no harm in - * calling free() either. */ - upb_alloc *allocator() { return upb_arena_alloc(ptr_.get()); } - - /* Add a cleanup function to run when the arena is destroyed. - * Returns false on out-of-memory. */ - bool AddCleanup(void *ud, upb_cleanup_func* func) { - return upb_arena_addcleanup(ptr_.get(), ud, func); - } - - /* Total number of bytes that have been allocated. It is undefined what - * Realloc() does to &arena_ counter. */ - size_t BytesAllocated() const { return upb_arena_bytesallocated(ptr_.get()); } - - private: - std::unique_ptr ptr_; -}; - -#endif - -/* upb::InlinedArena **********************************************************/ - -/* upb::InlinedArena seeds the arenas with a predefined amount of memory. No - * heap memory will be allocated until the initial block is exceeded. - * - * These types only exist in C++ */ - -#ifdef __cplusplus - -template class upb::InlinedArena : public upb::Arena { - public: - InlinedArena() : ptr_(upb_arena_new(&initial_block_, N, &upb_alloc_global)) {} - - upb_arena* ptr() { return ptr_.get(); } - - private: - InlinedArena(const InlinedArena*) = delete; - InlinedArena& operator=(const InlinedArena*) = delete; - - std::unique_ptr ptr_; - char initial_block_[N]; -}; - -#endif /* __cplusplus */ - /* Constants ******************************************************************/ /* Generic function type. */ @@ -311,20 +208,15 @@ typedef enum { * types defined in descriptor.proto, which gives INT32 and SINT32 separate * types (we distinguish the two with the "integer encoding" enum below). */ typedef enum { - /* Types stored in 1 byte. */ UPB_TYPE_BOOL = 1, - /* Types stored in 4 bytes. */ UPB_TYPE_FLOAT = 2, UPB_TYPE_INT32 = 3, UPB_TYPE_UINT32 = 4, UPB_TYPE_ENUM = 5, /* Enum values are int32. */ - /* Types stored as void* (probably 4 or 8 bytes). */ UPB_TYPE_MESSAGE = 6, - /* Types stored as 8 bytes. */ UPB_TYPE_DOUBLE = 7, UPB_TYPE_INT64 = 8, UPB_TYPE_UINT64 = 9, - /* Types stored as upb_strview (2 * void*) (probably 8 or 16 bytes). */ UPB_TYPE_STRING = 10, UPB_TYPE_BYTES = 11 } upb_fieldtype_t; @@ -338,6 +230,7 @@ typedef enum { /* Descriptor types, as defined in descriptor.proto. */ typedef enum { + /* Old (long) names. TODO(haberman): remove */ UPB_DESCRIPTOR_TYPE_DOUBLE = 1, UPB_DESCRIPTOR_TYPE_FLOAT = 2, UPB_DESCRIPTOR_TYPE_INT64 = 3, @@ -355,11 +248,34 @@ typedef enum { UPB_DESCRIPTOR_TYPE_SFIXED32 = 15, UPB_DESCRIPTOR_TYPE_SFIXED64 = 16, UPB_DESCRIPTOR_TYPE_SINT32 = 17, - UPB_DESCRIPTOR_TYPE_SINT64 = 18 + UPB_DESCRIPTOR_TYPE_SINT64 = 18, + + UPB_DTYPE_DOUBLE = 1, + UPB_DTYPE_FLOAT = 2, + UPB_DTYPE_INT64 = 3, + UPB_DTYPE_UINT64 = 4, + UPB_DTYPE_INT32 = 5, + UPB_DTYPE_FIXED64 = 6, + UPB_DTYPE_FIXED32 = 7, + UPB_DTYPE_BOOL = 8, + UPB_DTYPE_STRING = 9, + UPB_DTYPE_GROUP = 10, + UPB_DTYPE_MESSAGE = 11, + UPB_DTYPE_BYTES = 12, + UPB_DTYPE_UINT32 = 13, + UPB_DTYPE_ENUM = 14, + UPB_DTYPE_SFIXED32 = 15, + UPB_DTYPE_SFIXED64 = 16, + UPB_DTYPE_SINT32 = 17, + UPB_DTYPE_SINT64 = 18 } upb_descriptortype_t; #define UPB_MAP_BEGIN -1 #include "upb/port_undef.inc" +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* UPB_H_ */ diff --git a/upb/upb.hpp b/upb/upb.hpp new file mode 100644 index 00000000000..60ef29b2966 --- /dev/null +++ b/upb/upb.hpp @@ -0,0 +1,86 @@ + +#ifndef UPB_HPP_ +#define UPB_HPP_ + +#include + +#include "upb/upb.h" + +namespace upb { + +class Status { + public: + Status() { upb_status_clear(&status_); } + + upb_status* ptr() { return &status_; } + + // Returns true if there is no error. + bool ok() const { return upb_ok(&status_); } + + // Guaranteed to be NULL-terminated. + const char *error_message() const { return upb_status_errmsg(&status_); } + + // The error message will be truncated if it is longer than + // UPB_STATUS_MAX_MESSAGE-4. + void SetErrorMessage(const char *msg) { upb_status_seterrmsg(&status_, msg); } + void SetFormattedErrorMessage(const char *fmt, ...) { + va_list args; + va_start(args, fmt); + upb_status_vseterrf(&status_, fmt, args); + va_end(args); + } + + // Resets the status to a successful state with no message. + void Clear() { upb_status_clear(&status_); } + + private: + upb_status status_; +}; + +class Arena { + public: + // A simple arena with no initial memory block and the default allocator. + Arena() : ptr_(upb_arena_new(), upb_arena_free) {} + + upb_arena* ptr() { return ptr_.get(); } + + // Allows this arena to be used as a generic allocator. + // + // The arena does not need free() calls so when using Arena as an allocator + // it is safe to skip them. However they are no-ops so there is no harm in + // calling free() either. + upb_alloc *allocator() { return upb_arena_alloc(ptr_.get()); } + + // Add a cleanup function to run when the arena is destroyed. + // Returns false on out-of-memory. + template + bool Own(T *obj) { + return upb_arena_addcleanup(ptr_.get(), obj, [](void* obj) { + delete static_cast(obj); + }); + } + + private: + std::unique_ptr ptr_; +}; + +// InlinedArena seeds the arenas with a predefined amount of memory. No +// heap memory will be allocated until the initial block is exceeded. +template +class InlinedArena : public Arena { + public: + InlinedArena() : ptr_(upb_arena_new(&initial_block_, N, &upb_alloc_global)) {} + + upb_arena* ptr() { return ptr_.get(); } + + private: + InlinedArena(const InlinedArena*) = delete; + InlinedArena& operator=(const InlinedArena*) = delete; + + std::unique_ptr ptr_; + char initial_block_[N]; +}; + +} // namespace upb + +#endif // UPB_HPP_ diff --git a/upbc/generator.cc b/upbc/generator.cc index 47cc07ad10b..3ae64232624 100644 --- a/upbc/generator.cc +++ b/upbc/generator.cc @@ -87,7 +87,9 @@ class Generator : public protoc::CodeGenerator { bool Generate(const protobuf::FileDescriptor* file, const std::string& parameter, protoc::GeneratorContext* context, std::string* error) const override; - + uint64_t GetSupportedFeatures() const override { + return FEATURE_PROTO3_OPTIONAL; + } }; void AddMessages(const protobuf::Descriptor* message, @@ -350,7 +352,7 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output MessageName(message), MessageInit(message)); } - for (int i = 0; i < message->oneof_decl_count(); i++) { + for (int i = 0; i < message->real_oneof_decl_count(); i++) { const protobuf::OneofDescriptor* oneof = message->oneof_decl(i); std::string fullname = ToCIdent(oneof->full_name()); output("typedef enum {\n"); @@ -364,7 +366,7 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output fullname); output( "UPB_INLINE $0_oneofcases $1_$2_case(const $1* msg) { " - "return ($0_oneofcases)UPB_FIELD_AT(msg, int32_t, $3); }\n" + "return ($0_oneofcases)*UPB_PTR_AT(msg, $3, int32_t); }\n" "\n", fullname, msgname, oneof->name(), GetSizeInit(layout.GetOneofCaseOffset(oneof))); @@ -379,13 +381,19 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output "UPB_INLINE bool $0_has_$1(const $0 *msg) { " "return _upb_has_field(msg, $2); }\n", msgname, field->name(), layout.GetHasbitIndex(field)); - } else if (field->containing_oneof()) { + } else if (field->real_containing_oneof()) { output( "UPB_INLINE bool $0_has_$1(const $0 *msg) { " "return _upb_has_oneof_field(msg, $2, $3); }\n", msgname, field->name(), - GetSizeInit(layout.GetOneofCaseOffset(field->containing_oneof())), + GetSizeInit( + layout.GetOneofCaseOffset(field->real_containing_oneof())), field->number()); + } else if (field->message_type()) { + output( + "UPB_INLINE bool $0_has_$1(const $0 *msg) { " + "return _upb_has_submsg_nohasbit(msg, $2); }\n", + msgname, field->name(), GetSizeInit(layout.GetFieldOffset(field))); } // Generate getter. @@ -430,18 +438,18 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output "return ($0 const*)_upb_array_accessor(msg, $3, len); }\n", CTypeConst(field), msgname, field->name(), GetSizeInit(layout.GetFieldOffset(field))); - } else if (field->containing_oneof()) { + } else if (field->real_containing_oneof()) { output( "UPB_INLINE $0 $1_$2(const $1 *msg) { " "return UPB_READ_ONEOF(msg, $0, $3, $4, $5, $6); }\n", CTypeConst(field), msgname, field->name(), GetSizeInit(layout.GetFieldOffset(field)), - GetSizeInit(layout.GetOneofCaseOffset(field->containing_oneof())), + GetSizeInit(layout.GetOneofCaseOffset(field->real_containing_oneof())), field->number(), FieldDefault(field)); } else { output( "UPB_INLINE $0 $1_$2(const $1 *msg) { " - "return UPB_FIELD_AT(msg, $0, $3); }\n", + "return *UPB_PTR_AT(msg, $3, $0); }\n", CTypeConst(field), msgname, field->name(), GetSizeInit(layout.GetFieldOffset(field))); } @@ -544,19 +552,20 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output field->cpp_type() == protobuf::FieldDescriptor::CPPTYPE_STRING ? "0" : "sizeof(" + CType(field) + ")"); - } else if (field->containing_oneof()) { + } else if (field->real_containing_oneof()) { output( " UPB_WRITE_ONEOF(msg, $0, $1, value, $2, $3);\n" "}\n", CType(field), GetSizeInit(layout.GetFieldOffset(field)), - GetSizeInit(layout.GetOneofCaseOffset(field->containing_oneof())), + GetSizeInit( + layout.GetOneofCaseOffset(field->real_containing_oneof())), field->number()); } else { if (MessageLayout::HasHasbit(field)) { output(" _upb_sethas(msg, $0);\n", layout.GetHasbitIndex(field)); } output( - " UPB_FIELD_AT(msg, $0, $1) = value;\n" + " *UPB_PTR_AT(msg, $1, $0) = value;\n" "}\n", CType(field), GetSizeInit(layout.GetFieldOffset(field))); } @@ -699,7 +708,6 @@ void WriteSource(const protobuf::FileDescriptor* file, Output& output) { std::string msgname = ToCIdent(message->full_name()); std::string fields_array_ref = "NULL"; std::string submsgs_array_ref = "NULL"; - std::string oneofs_array_ref = "NULL"; absl::flat_hash_map submsg_indexes; MessageLayout layout(message); std::vector sorted_submsgs = @@ -742,18 +750,29 @@ void WriteSource(const protobuf::FileDescriptor* file, Output& output) { } if (MessageLayout::HasHasbit(field)) { - presence = absl::StrCat(layout.GetHasbitIndex(field)); - } else if (field->containing_oneof()) { + int index = layout.GetHasbitIndex(field); + assert(index != 0); + presence = absl::StrCat(index); + } else if (field->real_containing_oneof()) { MessageLayout::Size case_offset = - layout.GetOneofCaseOffset(field->containing_oneof()); + layout.GetOneofCaseOffset(field->real_containing_oneof()); - // Our encoding that distinguishes oneofs from presence-having fields. - case_offset.size32 = -case_offset.size32 - 1; - case_offset.size64 = -case_offset.size64 - 1; + // We encode as negative to distinguish from hasbits. + case_offset.size32 = -case_offset.size32; + case_offset.size64 = -case_offset.size64; + assert(case_offset.size32 != 0); + assert(case_offset.size64 != 0); presence = GetSizeInit(case_offset); } - // Sync '4' with UPB_LABEL_MAP in upb/msg.h. - int label = field->is_map() ? 4 : field->label(); + + std::string label; + if (field->is_map()) { + label = "_UPB_LABEL_MAP"; + } else if (field->is_packed()) { + label = "_UPB_LABEL_PACKED"; + } else { + label = absl::StrCat(field->label()); + } output(" {$0, $1, $2, $3, $4, $5},\n", field->number(), @@ -839,6 +858,7 @@ void WriteDefSource(const protobuf::FileDescriptor* file, Output& output) { EmitFileWarning(file, output); output("#include \"upb/def.h\"\n"); + output("#include \"$0\"\n", DefHeaderFilename(file->name())); output("\n"); for (int i = 0; i < file->dependency_count(); i++) { @@ -867,35 +887,19 @@ void WriteDefSource(const protobuf::FileDescriptor* file, Output& output) { std::string file_data; file_proto.SerializeToString(&file_data); - output("static const char descriptor[$0] =", file_data.size()); - - { - if (file_data.size() > 65535) { - // Workaround for MSVC: "Error C1091: compiler limit: string exceeds - // 65535 bytes in length". Declare a static array of chars rather than - // use a string literal. Only write 25 bytes per line. - static const size_t kBytesPerLine = 25; - output("{ "); - for (size_t i = 0; i < file_data.size();) { - for (size_t j = 0; j < kBytesPerLine && i < file_data.size(); ++i, ++j) { - output("'$0', ", absl::CEscape(file_data.substr(i, 1))); - } - output("\n"); - } - output("'\\0' }"); // null-terminate - } else { - // Only write 40 bytes per line. - static const size_t kBytesPerLine = 40; - for (size_t i = 0; i < file_data.size(); i += kBytesPerLine) { - output("\n"); - output( - " \"$0\"", - EscapeTrigraphs(absl::CEscape(file_data.substr(i, kBytesPerLine)))); - } + output("static const char descriptor[$0] = {", file_data.size()); + + // C90 only guarantees that strings can be up to 509 characters, and some + // implementations have limits here (for example, MSVC only allows 64k: + // https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/fatal-error-c1091. + // So we always emit an array instead of a string. + for (size_t i = 0; i < file_data.size();) { + for (size_t j = 0; j < 25 && i < file_data.size(); ++i, ++j) { + output("'$0', ", absl::CEscape(file_data.substr(i, 1))); } - output(";\n"); + output("\n"); } - output("\n"); + output("};\n\n"); output("static upb_def_init *deps[$0] = {\n", file->dependency_count() + 1); for (int i = 0; i < file->dependency_count(); i++) { From cc6414893cc09de4e413d892dc1c6391c4255c83 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 2 Jun 2020 14:48:50 -0700 Subject: [PATCH 032/239] update bazel build dep, regenerate upb files, and add missing includes --- bazel/grpc_deps.bzl | 8 +- .../filters/client_channel/backend_metric.cc | 1 + .../health/health_check_client.cc | 2 + .../client_channel/lb_policy/grpclb/grpclb.cc | 2 + .../ext/filters/client_channel/xds/xds_api.cc | 2 + .../envoy/annotations/resource.upb.h | 4 +- .../envoy/api/v2/auth/common.upb.c | 4 +- .../envoy/api/v2/auth/common.upb.h | 70 ++- .../envoy/api/v2/auth/secret.upb.c | 8 +- .../envoy/api/v2/auth/secret.upb.h | 20 +- .../upb-generated/envoy/api/v2/auth/tls.upb.c | 12 +- .../upb-generated/envoy/api/v2/auth/tls.upb.h | 59 +- .../upb-generated/envoy/api/v2/cluster.upb.c | 18 +- .../upb-generated/envoy/api/v2/cluster.upb.h | 331 ++++++----- .../api/v2/cluster/circuit_breaker.upb.h | 49 +- .../envoy/api/v2/cluster/filter.upb.h | 9 +- .../api/v2/cluster/outlier_detection.upb.h | 99 ++-- .../envoy/api/v2/core/address.upb.c | 8 +- .../envoy/api/v2/core/address.upb.h | 63 ++- .../envoy/api/v2/core/backoff.upb.h | 10 +- .../envoy/api/v2/core/base.upb.c | 20 +- .../envoy/api/v2/core/base.upb.h | 168 +++--- .../envoy/api/v2/core/config_source.upb.c | 8 +- .../envoy/api/v2/core/config_source.upb.h | 49 +- .../api/v2/core/event_service_config.upb.c | 2 +- .../api/v2/core/event_service_config.upb.h | 2 +- .../envoy/api/v2/core/grpc_service.upb.c | 28 +- .../envoy/api/v2/core/grpc_service.upb.h | 112 ++-- .../envoy/api/v2/core/health_check.upb.c | 16 +- .../envoy/api/v2/core/health_check.upb.h | 149 ++--- .../envoy/api/v2/core/http_uri.upb.c | 2 +- .../envoy/api/v2/core/http_uri.upb.h | 11 +- .../envoy/api/v2/core/protocol.upb.c | 2 +- .../envoy/api/v2/core/protocol.upb.h | 129 +++-- .../envoy/api/v2/core/socket_option.upb.c | 4 +- .../envoy/api/v2/core/socket_option.upb.h | 18 +- .../envoy/api/v2/discovery.upb.c | 2 +- .../envoy/api/v2/discovery.upb.h | 89 +-- .../upb-generated/envoy/api/v2/endpoint.upb.c | 2 +- .../upb-generated/envoy/api/v2/endpoint.upb.h | 36 +- .../api/v2/endpoint/endpoint_components.upb.c | 4 +- .../api/v2/endpoint/endpoint_components.upb.h | 58 +- .../envoy/api/v2/endpoint/load_report.upb.h | 93 +-- .../upb-generated/envoy/api/v2/listener.upb.c | 2 +- .../upb-generated/envoy/api/v2/listener.upb.h | 91 +-- .../api/v2/listener/listener_components.upb.c | 20 +- .../api/v2/listener/listener_components.upb.h | 74 ++- .../api/v2/listener/udp_listener_config.upb.c | 4 +- .../api/v2/listener/udp_listener_config.upb.h | 6 +- .../upb-generated/envoy/api/v2/route.upb.h | 26 +- .../envoy/api/v2/route/route_components.upb.c | 102 ++-- .../envoy/api/v2/route/route_components.upb.h | 529 ++++++++++-------- .../envoy/api/v2/scoped_route.upb.c | 2 +- .../envoy/api/v2/scoped_route.upb.h | 16 +- .../filter/accesslog/v2/accesslog.upb.c | 32 +- .../filter/accesslog/v2/accesslog.upb.h | 62 +- .../v2/http_connection_manager.upb.c | 20 +- .../v2/http_connection_manager.upb.h | 270 +++++---- .../config/listener/v2/api_listener.upb.h | 5 +- .../envoy/config/trace/v2/http_tracer.upb.c | 4 +- .../envoy/config/trace/v2/http_tracer.upb.h | 11 +- .../envoy/service/load_stats/v2/lrs.upb.h | 19 +- .../envoy/type/matcher/regex.upb.c | 2 +- .../envoy/type/matcher/regex.upb.h | 20 +- .../envoy/type/matcher/string.upb.c | 10 +- .../envoy/type/matcher/string.upb.h | 7 +- .../envoy/type/metadata/v2/metadata.upb.c | 10 +- .../envoy/type/metadata/v2/metadata.upb.h | 9 +- .../upb-generated/envoy/type/percent.upb.h | 12 +- .../ext/upb-generated/envoy/type/range.upb.h | 24 +- .../envoy/type/semantic_version.upb.h | 12 +- .../envoy/type/tracing/v2/custom_tag.upb.c | 8 +- .../envoy/type/tracing/v2/custom_tag.upb.h | 40 +- .../ext/upb-generated/google/api/http.upb.c | 12 +- .../ext/upb-generated/google/api/http.upb.h | 28 +- .../upb-generated/google/protobuf/any.upb.h | 8 +- .../google/protobuf/descriptor.upb.c | 6 +- .../google/protobuf/descriptor.upb.h | 383 +++++++------ .../google/protobuf/duration.upb.h | 8 +- .../google/protobuf/struct.upb.c | 14 +- .../google/protobuf/struct.upb.h | 5 +- .../google/protobuf/timestamp.upb.h | 8 +- .../google/protobuf/wrappers.upb.h | 36 +- .../ext/upb-generated/google/rpc/status.upb.h | 9 +- .../src/proto/grpc/gcp/altscontext.upb.c | 2 +- .../src/proto/grpc/gcp/altscontext.upb.h | 26 +- .../src/proto/grpc/gcp/handshaker.upb.c | 14 +- .../src/proto/grpc/gcp/handshaker.upb.h | 141 +++-- .../grpc/gcp/transport_security_common.upb.h | 18 +- .../src/proto/grpc/health/v1/health.upb.h | 8 +- .../src/proto/grpc/lb/v1/load_balancer.upb.c | 10 +- .../src/proto/grpc/lb/v1/load_balancer.upb.h | 64 ++- .../udpa/annotations/migrate.upb.h | 16 +- .../udpa/annotations/status.upb.h | 8 +- .../udpa/data/orca/v1/orca_load_report.upb.c | 4 +- .../udpa/data/orca/v1/orca_load_report.upb.h | 14 +- .../ext/upb-generated/validate/validate.upb.c | 68 +-- .../ext/upb-generated/validate/validate.upb.h | 456 +++++++-------- .../alts/handshaker/alts_handshaker_client.cc | 2 + .../alts/handshaker/alts_tsi_handshaker.cc | 2 + .../transport_security_common_api.cc | 2 + src/cpp/common/alts_util.cc | 2 + .../health/default_health_check_service.cc | 3 + test/core/nanopb/fuzzer_response.cc | 2 + .../handshaker/alts_handshaker_client_test.cc | 2 + .../handshaker/alts_tsi_handshaker_test.cc | 2 + .../alts/handshaker/alts_tsi_utils_test.cc | 2 + test/cpp/common/alts_util_test.cc | 2 + test/cpp/grpclb/grpclb_api_test.cc | 4 +- 109 files changed, 2561 insertions(+), 2062 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 88e37960471..f7aba770c1a 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -267,11 +267,11 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "f5b4ab137bb02dee66e456d88677fdda8e35f72ac50af19f519f5e2ba3ea0114", - strip_prefix = "upb-4e2505edaa325bcf0ffd69eefa7cb810d6dde861", + sha256 = "2384fcce8b72dfb602177f8b90c697f99e9c6ba192163443bacf588d4eb46f71", + strip_prefix = "upb-543a0ce8f21709fe7e65ac5a53cc4136d7b4216c", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/4e2505edaa325bcf0ffd69eefa7cb810d6dde861.tar.gz", - "https://github.com/protocolbuffers/upb/archive/4e2505edaa325bcf0ffd69eefa7cb810d6dde861.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/543a0ce8f21709fe7e65ac5a53cc4136d7b4216c.tar.gz", + "https://github.com/protocolbuffers/upb/archive/543a0ce8f21709fe7e65ac5a53cc4136d7b4216c.tar.gz", ], ) diff --git a/src/core/ext/filters/client_channel/backend_metric.cc b/src/core/ext/filters/client_channel/backend_metric.cc index 405f51a563f..4d108aa9824 100644 --- a/src/core/ext/filters/client_channel/backend_metric.cc +++ b/src/core/ext/filters/client_channel/backend_metric.cc @@ -21,6 +21,7 @@ #include "absl/strings/string_view.h" #include "udpa/data/orca/v1/orca_load_report.upb.h" +#include "upb/upb.hpp" #include "src/core/lib/gprpp/map.h" diff --git a/src/core/ext/filters/client_channel/health/health_check_client.cc b/src/core/ext/filters/client_channel/health/health_check_client.cc index a17d49953bf..e708a59c571 100644 --- a/src/core/ext/filters/client_channel/health/health_check_client.cc +++ b/src/core/ext/filters/client_channel/health/health_check_client.cc @@ -23,6 +23,8 @@ #include "src/core/ext/filters/client_channel/health/health_check_client.h" +#include "upb/upb.hpp" + #include "src/core/lib/debug/trace.h" #include "src/core/lib/gprpp/sync.h" #include "src/core/lib/slice/slice_internal.h" diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index d2423571295..c39bf8e28be 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -68,6 +68,8 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" +#include "upb/upb.hpp" + #include #include #include diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc index 3b715fd7789..21ad3609475 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -26,6 +26,8 @@ #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" +#include "upb/upb.hpp" + #include #include #include diff --git a/src/core/ext/upb-generated/envoy/annotations/resource.upb.h b/src/core/ext/upb-generated/envoy/annotations/resource.upb.h index 1c92f972d34..ed6660a2d8a 100644 --- a/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +++ b/src/core/ext/upb-generated/envoy/annotations/resource.upb.h @@ -38,10 +38,10 @@ UPB_INLINE char *envoy_annotations_ResourceAnnotation_serialize(const envoy_anno return upb_encode(msg, &envoy_annotations_ResourceAnnotation_msginit, arena, len); } -UPB_INLINE upb_strview envoy_annotations_ResourceAnnotation_type(const envoy_annotations_ResourceAnnotation *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_annotations_ResourceAnnotation_type(const envoy_annotations_ResourceAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_annotations_ResourceAnnotation_set_type(envoy_annotations_ResourceAnnotation *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c index 9903593ac99..8330590d109 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c @@ -41,8 +41,8 @@ static const upb_msglayout *const envoy_api_v2_auth_PrivateKeyProvider_submsgs[2 static const upb_msglayout_field envoy_api_v2_auth_PrivateKeyProvider__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_auth_PrivateKeyProvider_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h index f9870e63382..94983e7af0b 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h @@ -73,16 +73,16 @@ UPB_INLINE char *envoy_api_v2_auth_TlsParameters_serialize(const envoy_api_v2_au return upb_encode(msg, &envoy_api_v2_auth_TlsParameters_msginit, arena, len); } -UPB_INLINE int32_t envoy_api_v2_auth_TlsParameters_tls_minimum_protocol_version(const envoy_api_v2_auth_TlsParameters *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE int32_t envoy_api_v2_auth_TlsParameters_tls_maximum_protocol_version(const envoy_api_v2_auth_TlsParameters *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t envoy_api_v2_auth_TlsParameters_tls_minimum_protocol_version(const envoy_api_v2_auth_TlsParameters *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE int32_t envoy_api_v2_auth_TlsParameters_tls_maximum_protocol_version(const envoy_api_v2_auth_TlsParameters *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE upb_strview const* envoy_api_v2_auth_TlsParameters_cipher_suites(const envoy_api_v2_auth_TlsParameters *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(16, 16), len); } UPB_INLINE upb_strview const* envoy_api_v2_auth_TlsParameters_ecdh_curves(const envoy_api_v2_auth_TlsParameters *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); } UPB_INLINE void envoy_api_v2_auth_TlsParameters_set_tls_minimum_protocol_version(envoy_api_v2_auth_TlsParameters *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_api_v2_auth_TlsParameters_set_tls_maximum_protocol_version(envoy_api_v2_auth_TlsParameters *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE upb_strview* envoy_api_v2_auth_TlsParameters_mutable_cipher_suites(envoy_api_v2_auth_TlsParameters *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 16), len); @@ -124,16 +124,16 @@ typedef enum { envoy_api_v2_auth_PrivateKeyProvider_config_type_typed_config = 3, envoy_api_v2_auth_PrivateKeyProvider_config_type_NOT_SET = 0 } envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases; -UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases envoy_api_v2_auth_PrivateKeyProvider_config_type_case(const envoy_api_v2_auth_PrivateKeyProvider* msg) { return (envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases envoy_api_v2_auth_PrivateKeyProvider_config_type_case(const envoy_api_v2_auth_PrivateKeyProvider* msg) { return (envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_auth_PrivateKeyProvider_provider_name(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_auth_PrivateKeyProvider_provider_name(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_auth_PrivateKeyProvider_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_auth_PrivateKeyProvider_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_provider_name(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_config(envoy_api_v2_auth_PrivateKeyProvider *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); @@ -174,15 +174,21 @@ UPB_INLINE char *envoy_api_v2_auth_TlsCertificate_serialize(const envoy_api_v2_a return upb_encode(msg, &envoy_api_v2_auth_TlsCertificate_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_certificate_chain(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_private_key(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_password(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_ocsp_staple(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_api_v2_auth_TlsCertificate_has_certificate_chain(const envoy_api_v2_auth_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_certificate_chain(const envoy_api_v2_auth_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_DataSource*); } +UPB_INLINE bool envoy_api_v2_auth_TlsCertificate_has_private_key(const envoy_api_v2_auth_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_private_key(const envoy_api_v2_auth_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_api_v2_core_DataSource*); } +UPB_INLINE bool envoy_api_v2_auth_TlsCertificate_has_password(const envoy_api_v2_auth_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_password(const envoy_api_v2_auth_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_DataSource*); } +UPB_INLINE bool envoy_api_v2_auth_TlsCertificate_has_ocsp_staple(const envoy_api_v2_auth_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_ocsp_staple(const envoy_api_v2_auth_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_api_v2_core_DataSource*); } +UPB_INLINE bool envoy_api_v2_auth_TlsCertificate_has_signed_certificate_timestamp(const envoy_api_v2_auth_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const struct envoy_api_v2_core_DataSource* const* envoy_api_v2_auth_TlsCertificate_signed_certificate_timestamp(const envoy_api_v2_auth_TlsCertificate *msg, size_t *len) { return (const struct envoy_api_v2_core_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } -UPB_INLINE const envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCertificate_private_key_provider(const envoy_api_v2_auth_TlsCertificate *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_auth_PrivateKeyProvider*, UPB_SIZE(16, 32)); } +UPB_INLINE bool envoy_api_v2_auth_TlsCertificate_has_private_key_provider(const envoy_api_v2_auth_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCertificate_private_key_provider(const envoy_api_v2_auth_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_api_v2_auth_PrivateKeyProvider*); } UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_certificate_chain(envoy_api_v2_auth_TlsCertificate *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_mutable_certificate_chain(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_TlsCertificate_certificate_chain(msg); @@ -194,7 +200,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate return sub; } UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_private_key(envoy_api_v2_auth_TlsCertificate *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_mutable_private_key(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_TlsCertificate_private_key(msg); @@ -206,7 +212,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate return sub; } UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_password(envoy_api_v2_auth_TlsCertificate *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_mutable_password(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_TlsCertificate_password(msg); @@ -218,7 +224,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate return sub; } UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_ocsp_staple(envoy_api_v2_auth_TlsCertificate *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate_mutable_ocsp_staple(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_TlsCertificate_ocsp_staple(msg); @@ -243,7 +249,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_TlsCertificate return sub; } UPB_INLINE void envoy_api_v2_auth_TlsCertificate_set_private_key_provider(envoy_api_v2_auth_TlsCertificate *msg, envoy_api_v2_auth_PrivateKeyProvider* value) { - UPB_FIELD_AT(msg, envoy_api_v2_auth_PrivateKeyProvider*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_api_v2_auth_PrivateKeyProvider*) = value; } UPB_INLINE struct envoy_api_v2_auth_PrivateKeyProvider* envoy_api_v2_auth_TlsCertificate_mutable_private_key_provider(envoy_api_v2_auth_TlsCertificate *msg, upb_arena *arena) { struct envoy_api_v2_auth_PrivateKeyProvider* sub = (struct envoy_api_v2_auth_PrivateKeyProvider*)envoy_api_v2_auth_TlsCertificate_private_key_provider(msg); @@ -269,6 +275,7 @@ UPB_INLINE char *envoy_api_v2_auth_TlsSessionTicketKeys_serialize(const envoy_ap return upb_encode(msg, &envoy_api_v2_auth_TlsSessionTicketKeys_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_auth_TlsSessionTicketKeys_has_keys(const envoy_api_v2_auth_TlsSessionTicketKeys *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const struct envoy_api_v2_core_DataSource* const* envoy_api_v2_auth_TlsSessionTicketKeys_keys(const envoy_api_v2_auth_TlsSessionTicketKeys *msg, size_t *len) { return (const struct envoy_api_v2_core_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE struct envoy_api_v2_core_DataSource** envoy_api_v2_auth_TlsSessionTicketKeys_mutable_keys(envoy_api_v2_auth_TlsSessionTicketKeys *msg, size_t *len) { @@ -299,19 +306,24 @@ UPB_INLINE char *envoy_api_v2_auth_CertificateValidationContext_serialize(const return upb_encode(msg, &envoy_api_v2_auth_CertificateValidationContext_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateValidationContext_trusted_ca(const envoy_api_v2_auth_CertificateValidationContext *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(12, 16)); } +UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_has_trusted_ca(const envoy_api_v2_auth_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateValidationContext_trusted_ca(const envoy_api_v2_auth_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct envoy_api_v2_core_DataSource*); } UPB_INLINE upb_strview const* envoy_api_v2_auth_CertificateValidationContext_verify_certificate_hash(const envoy_api_v2_auth_CertificateValidationContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); } UPB_INLINE upb_strview const* envoy_api_v2_auth_CertificateValidationContext_verify_certificate_spki(const envoy_api_v2_auth_CertificateValidationContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); } UPB_INLINE upb_strview const* envoy_api_v2_auth_CertificateValidationContext_verify_subject_alt_name(const envoy_api_v2_auth_CertificateValidationContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValidationContext_require_ocsp_staple(const envoy_api_v2_auth_CertificateValidationContext *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(16, 24)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValidationContext_require_signed_certificate_timestamp(const envoy_api_v2_auth_CertificateValidationContext *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(20, 32)); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateValidationContext_crl(const envoy_api_v2_auth_CertificateValidationContext *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(24, 40)); } -UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_allow_expired_certificate(const envoy_api_v2_auth_CertificateValidationContext *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_has_require_ocsp_staple(const envoy_api_v2_auth_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValidationContext_require_ocsp_staple(const envoy_api_v2_auth_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_has_require_signed_certificate_timestamp(const envoy_api_v2_auth_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValidationContext_require_signed_certificate_timestamp(const envoy_api_v2_auth_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_has_crl(const envoy_api_v2_auth_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateValidationContext_crl(const envoy_api_v2_auth_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct envoy_api_v2_core_DataSource*); } +UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_allow_expired_certificate(const envoy_api_v2_auth_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } +UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_has_match_subject_alt_names(const envoy_api_v2_auth_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); } UPB_INLINE const struct envoy_type_matcher_StringMatcher* const* envoy_api_v2_auth_CertificateValidationContext_match_subject_alt_names(const envoy_api_v2_auth_CertificateValidationContext *msg, size_t *len) { return (const struct envoy_type_matcher_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); } -UPB_INLINE int32_t envoy_api_v2_auth_CertificateValidationContext_trust_chain_verification(const envoy_api_v2_auth_CertificateValidationContext *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t envoy_api_v2_auth_CertificateValidationContext_trust_chain_verification(const envoy_api_v2_auth_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_trusted_ca(envoy_api_v2_auth_CertificateValidationContext *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateValidationContext_mutable_trusted_ca(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_CertificateValidationContext_trusted_ca(msg); @@ -353,7 +365,7 @@ UPB_INLINE bool envoy_api_v2_auth_CertificateValidationContext_add_verify_subjec arena); } UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_require_ocsp_staple(envoy_api_v2_auth_CertificateValidationContext *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValidationContext_mutable_require_ocsp_staple(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_auth_CertificateValidationContext_require_ocsp_staple(msg); @@ -365,7 +377,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValida return sub; } UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_require_signed_certificate_timestamp(envoy_api_v2_auth_CertificateValidationContext *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValidationContext_mutable_require_signed_certificate_timestamp(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_auth_CertificateValidationContext_require_signed_certificate_timestamp(msg); @@ -377,7 +389,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_CertificateValida return sub; } UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_crl(envoy_api_v2_auth_CertificateValidationContext *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateValidationContext_mutable_crl(envoy_api_v2_auth_CertificateValidationContext *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_CertificateValidationContext_crl(msg); @@ -389,7 +401,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_CertificateVal return sub; } UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_allow_expired_certificate(envoy_api_v2_auth_CertificateValidationContext *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } UPB_INLINE struct envoy_type_matcher_StringMatcher** envoy_api_v2_auth_CertificateValidationContext_mutable_match_subject_alt_names(envoy_api_v2_auth_CertificateValidationContext *msg, size_t *len) { return (struct envoy_type_matcher_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len); @@ -405,7 +417,7 @@ UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_api_v2_auth_Certificat return sub; } UPB_INLINE void envoy_api_v2_auth_CertificateValidationContext_set_trust_chain_verification(envoy_api_v2_auth_CertificateValidationContext *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c index d34d2257cdf..50c30992939 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c @@ -56,10 +56,10 @@ static const upb_msglayout *const envoy_api_v2_auth_Secret_submsgs[4] = { static const upb_msglayout_field envoy_api_v2_auth_Secret__fields[5] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 3, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, - {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 2, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 3, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {5, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, }; const upb_msglayout envoy_api_v2_auth_Secret_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h index d56a1b3d777..2774db5b057 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h @@ -54,10 +54,11 @@ UPB_INLINE char *envoy_api_v2_auth_GenericSecret_serialize(const envoy_api_v2_au return upb_encode(msg, &envoy_api_v2_auth_GenericSecret_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_GenericSecret_secret(const envoy_api_v2_auth_GenericSecret *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_auth_GenericSecret_has_secret(const envoy_api_v2_auth_GenericSecret *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_GenericSecret_secret(const envoy_api_v2_auth_GenericSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_DataSource*); } UPB_INLINE void envoy_api_v2_auth_GenericSecret_set_secret(envoy_api_v2_auth_GenericSecret *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_auth_GenericSecret_mutable_secret(envoy_api_v2_auth_GenericSecret *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_auth_GenericSecret_secret(msg); @@ -83,14 +84,15 @@ UPB_INLINE char *envoy_api_v2_auth_SdsSecretConfig_serialize(const envoy_api_v2_ return upb_encode(msg, &envoy_api_v2_auth_SdsSecretConfig_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_auth_SdsSecretConfig_name(const envoy_api_v2_auth_SdsSecretConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_auth_SdsSecretConfig_sds_config(const envoy_api_v2_auth_SdsSecretConfig *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_auth_SdsSecretConfig_name(const envoy_api_v2_auth_SdsSecretConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_auth_SdsSecretConfig_has_sds_config(const envoy_api_v2_auth_SdsSecretConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_auth_SdsSecretConfig_sds_config(const envoy_api_v2_auth_SdsSecretConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_ConfigSource*); } UPB_INLINE void envoy_api_v2_auth_SdsSecretConfig_set_name(envoy_api_v2_auth_SdsSecretConfig *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_auth_SdsSecretConfig_set_sds_config(envoy_api_v2_auth_SdsSecretConfig *msg, struct envoy_api_v2_core_ConfigSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_api_v2_core_ConfigSource*) = value; } UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_auth_SdsSecretConfig_mutable_sds_config(envoy_api_v2_auth_SdsSecretConfig *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_auth_SdsSecretConfig_sds_config(msg); @@ -123,9 +125,9 @@ typedef enum { envoy_api_v2_auth_Secret_type_generic_secret = 5, envoy_api_v2_auth_Secret_type_NOT_SET = 0 } envoy_api_v2_auth_Secret_type_oneofcases; -UPB_INLINE envoy_api_v2_auth_Secret_type_oneofcases envoy_api_v2_auth_Secret_type_case(const envoy_api_v2_auth_Secret* msg) { return (envoy_api_v2_auth_Secret_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_auth_Secret_type_oneofcases envoy_api_v2_auth_Secret_type_case(const envoy_api_v2_auth_Secret* msg) { return (envoy_api_v2_auth_Secret_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_auth_Secret_name(const envoy_api_v2_auth_Secret *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_auth_Secret_name(const envoy_api_v2_auth_Secret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_auth_Secret_has_tls_certificate(const envoy_api_v2_auth_Secret *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct envoy_api_v2_auth_TlsCertificate* envoy_api_v2_auth_Secret_tls_certificate(const envoy_api_v2_auth_Secret *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_TlsCertificate*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_auth_Secret_has_session_ticket_keys(const envoy_api_v2_auth_Secret *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } @@ -136,7 +138,7 @@ UPB_INLINE bool envoy_api_v2_auth_Secret_has_generic_secret(const envoy_api_v2_a UPB_INLINE const envoy_api_v2_auth_GenericSecret* envoy_api_v2_auth_Secret_generic_secret(const envoy_api_v2_auth_Secret *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_auth_GenericSecret*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); } UPB_INLINE void envoy_api_v2_auth_Secret_set_name(envoy_api_v2_auth_Secret *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_auth_Secret_set_tls_certificate(envoy_api_v2_auth_Secret *msg, struct envoy_api_v2_auth_TlsCertificate* value) { UPB_WRITE_ONEOF(msg, struct envoy_api_v2_auth_TlsCertificate*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c index 67cc1492b92..dc894f8490b 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c @@ -49,10 +49,10 @@ static const upb_msglayout_field envoy_api_v2_auth_DownstreamTlsContext__fields[ {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, {2, UPB_SIZE(4, 8), 0, 3, 11, 1}, {3, UPB_SIZE(8, 16), 0, 3, 11, 1}, - {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, - {5, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, + {4, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 2, 11, 1}, + {5, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 1, 11, 1}, {6, UPB_SIZE(12, 24), 0, 4, 11, 1}, - {7, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 8, 1}, + {7, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 0, 8, 1}, }; const upb_msglayout envoy_api_v2_auth_DownstreamTlsContext_msginit = { @@ -72,11 +72,11 @@ static const upb_msglayout *const envoy_api_v2_auth_CommonTlsContext_submsgs[6] static const upb_msglayout_field envoy_api_v2_auth_CommonTlsContext__fields[7] = { {1, UPB_SIZE(0, 0), 0, 4, 11, 1}, {2, UPB_SIZE(4, 8), 0, 3, 11, 3}, - {3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 11, 1}, + {3, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 0, 11, 1}, {4, UPB_SIZE(8, 16), 0, 0, 9, 3}, {6, UPB_SIZE(12, 24), 0, 2, 11, 3}, - {7, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, - {8, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, + {7, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 2, 11, 1}, + {8, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 1, 11, 1}, }; const upb_msglayout envoy_api_v2_auth_CommonTlsContext_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h index 6a345e511f4..ea027e17071 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h @@ -63,13 +63,15 @@ UPB_INLINE char *envoy_api_v2_auth_UpstreamTlsContext_serialize(const envoy_api_ return upb_encode(msg, &envoy_api_v2_auth_UpstreamTlsContext_msginit, arena, len); } -UPB_INLINE const envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_UpstreamTlsContext_common_tls_context(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_auth_CommonTlsContext*, UPB_SIZE(12, 24)); } -UPB_INLINE upb_strview envoy_api_v2_auth_UpstreamTlsContext_sni(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } -UPB_INLINE bool envoy_api_v2_auth_UpstreamTlsContext_allow_renegotiation(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_auth_UpstreamTlsContext_max_session_keys(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); } +UPB_INLINE bool envoy_api_v2_auth_UpstreamTlsContext_has_common_tls_context(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_UpstreamTlsContext_common_tls_context(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_api_v2_auth_CommonTlsContext*); } +UPB_INLINE upb_strview envoy_api_v2_auth_UpstreamTlsContext_sni(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool envoy_api_v2_auth_UpstreamTlsContext_allow_renegotiation(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE bool envoy_api_v2_auth_UpstreamTlsContext_has_max_session_keys(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_auth_UpstreamTlsContext_max_session_keys(const envoy_api_v2_auth_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_auth_UpstreamTlsContext_set_common_tls_context(envoy_api_v2_auth_UpstreamTlsContext *msg, envoy_api_v2_auth_CommonTlsContext* value) { - UPB_FIELD_AT(msg, envoy_api_v2_auth_CommonTlsContext*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_api_v2_auth_CommonTlsContext*) = value; } UPB_INLINE struct envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_UpstreamTlsContext_mutable_common_tls_context(envoy_api_v2_auth_UpstreamTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_CommonTlsContext* sub = (struct envoy_api_v2_auth_CommonTlsContext*)envoy_api_v2_auth_UpstreamTlsContext_common_tls_context(msg); @@ -81,13 +83,13 @@ UPB_INLINE struct envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_Upstream return sub; } UPB_INLINE void envoy_api_v2_auth_UpstreamTlsContext_set_sni(envoy_api_v2_auth_UpstreamTlsContext *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_auth_UpstreamTlsContext_set_allow_renegotiation(envoy_api_v2_auth_UpstreamTlsContext *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_auth_UpstreamTlsContext_set_max_session_keys(envoy_api_v2_auth_UpstreamTlsContext *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_auth_UpstreamTlsContext_mutable_max_session_keys(envoy_api_v2_auth_UpstreamTlsContext *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_auth_UpstreamTlsContext_max_session_keys(msg); @@ -119,21 +121,25 @@ typedef enum { envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_disable_stateless_session_resumption = 7, envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_NOT_SET = 0 } envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_oneofcases; -UPB_INLINE envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_oneofcases envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_case(const envoy_api_v2_auth_DownstreamTlsContext* msg) { return (envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } +UPB_INLINE envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_oneofcases envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_case(const envoy_api_v2_auth_DownstreamTlsContext* msg) { return (envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } -UPB_INLINE const envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_DownstreamTlsContext_common_tls_context(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_auth_CommonTlsContext*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_require_client_certificate(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_require_sni(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_common_tls_context(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_DownstreamTlsContext_common_tls_context(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_api_v2_auth_CommonTlsContext*); } +UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_require_client_certificate(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_require_client_certificate(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_require_sni(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_require_sni(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); } UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_session_ticket_keys(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } UPB_INLINE const struct envoy_api_v2_auth_TlsSessionTicketKeys* envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_TlsSessionTicketKeys*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); } UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_session_ticket_keys_sds_secret_config(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 5); } UPB_INLINE const struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_sds_secret_config(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 5, NULL); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_auth_DownstreamTlsContext_session_timeout(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_session_timeout(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_auth_DownstreamTlsContext_session_timeout(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); } UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_disable_stateless_session_resumption(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 7); } UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_disable_stateless_session_resumption(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 7, false); } UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_common_tls_context(envoy_api_v2_auth_DownstreamTlsContext *msg, envoy_api_v2_auth_CommonTlsContext* value) { - UPB_FIELD_AT(msg, envoy_api_v2_auth_CommonTlsContext*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_api_v2_auth_CommonTlsContext*) = value; } UPB_INLINE struct envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_DownstreamTlsContext_mutable_common_tls_context(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_CommonTlsContext* sub = (struct envoy_api_v2_auth_CommonTlsContext*)envoy_api_v2_auth_DownstreamTlsContext_common_tls_context(msg); @@ -145,7 +151,7 @@ UPB_INLINE struct envoy_api_v2_auth_CommonTlsContext* envoy_api_v2_auth_Downstre return sub; } UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_require_client_certificate(envoy_api_v2_auth_DownstreamTlsContext *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_mutable_require_client_certificate(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_auth_DownstreamTlsContext_require_client_certificate(msg); @@ -157,7 +163,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsCont return sub; } UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_require_sni(envoy_api_v2_auth_DownstreamTlsContext *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_mutable_require_sni(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_auth_DownstreamTlsContext_require_sni(msg); @@ -193,7 +199,7 @@ UPB_INLINE struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_Downstrea return sub; } UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_session_timeout(envoy_api_v2_auth_DownstreamTlsContext *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_auth_DownstreamTlsContext_mutable_session_timeout(envoy_api_v2_auth_DownstreamTlsContext *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_auth_DownstreamTlsContext_session_timeout(msg); @@ -228,13 +234,16 @@ typedef enum { envoy_api_v2_auth_CommonTlsContext_validation_context_type_combined_validation_context = 8, envoy_api_v2_auth_CommonTlsContext_validation_context_type_NOT_SET = 0 } envoy_api_v2_auth_CommonTlsContext_validation_context_type_oneofcases; -UPB_INLINE envoy_api_v2_auth_CommonTlsContext_validation_context_type_oneofcases envoy_api_v2_auth_CommonTlsContext_validation_context_type_case(const envoy_api_v2_auth_CommonTlsContext* msg) { return (envoy_api_v2_auth_CommonTlsContext_validation_context_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } +UPB_INLINE envoy_api_v2_auth_CommonTlsContext_validation_context_type_oneofcases envoy_api_v2_auth_CommonTlsContext_validation_context_type_case(const envoy_api_v2_auth_CommonTlsContext* msg) { return (envoy_api_v2_auth_CommonTlsContext_validation_context_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } -UPB_INLINE const struct envoy_api_v2_auth_TlsParameters* envoy_api_v2_auth_CommonTlsContext_tls_params(const envoy_api_v2_auth_CommonTlsContext *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_auth_TlsParameters*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_tls_params(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_auth_TlsParameters* envoy_api_v2_auth_CommonTlsContext_tls_params(const envoy_api_v2_auth_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_auth_TlsParameters*); } +UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_tls_certificates(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const struct envoy_api_v2_auth_TlsCertificate* const* envoy_api_v2_auth_CommonTlsContext_tls_certificates(const envoy_api_v2_auth_CommonTlsContext *msg, size_t *len) { return (const struct envoy_api_v2_auth_TlsCertificate* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 3); } UPB_INLINE const struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_CertificateValidationContext*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, NULL); } UPB_INLINE upb_strview const* envoy_api_v2_auth_CommonTlsContext_alpn_protocols(const envoy_api_v2_auth_CommonTlsContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } +UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_tls_certificate_sds_secret_configs(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const struct envoy_api_v2_auth_SdsSecretConfig* const* envoy_api_v2_auth_CommonTlsContext_tls_certificate_sds_secret_configs(const envoy_api_v2_auth_CommonTlsContext *msg, size_t *len) { return (const struct envoy_api_v2_auth_SdsSecretConfig* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_validation_context_sds_secret_config(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 7); } UPB_INLINE const struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTlsContext_validation_context_sds_secret_config(const envoy_api_v2_auth_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 7, NULL); } @@ -242,7 +251,7 @@ UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_combined_validation_conte UPB_INLINE const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_combined_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 8, NULL); } UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_set_tls_params(envoy_api_v2_auth_CommonTlsContext *msg, struct envoy_api_v2_auth_TlsParameters* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_auth_TlsParameters*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_auth_TlsParameters*) = value; } UPB_INLINE struct envoy_api_v2_auth_TlsParameters* envoy_api_v2_auth_CommonTlsContext_mutable_tls_params(envoy_api_v2_auth_CommonTlsContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_TlsParameters* sub = (struct envoy_api_v2_auth_TlsParameters*)envoy_api_v2_auth_CommonTlsContext_tls_params(msg); @@ -340,11 +349,13 @@ UPB_INLINE char *envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidatio return upb_encode(msg, &envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_auth_CertificateValidationContext*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_validation_context_sds_secret_config(const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_has_default_validation_context(const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_auth_CertificateValidationContext*); } +UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_has_validation_context_sds_secret_config(const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_validation_context_sds_secret_config(const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_api_v2_auth_SdsSecretConfig*); } UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_set_default_validation_context(envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg, struct envoy_api_v2_auth_CertificateValidationContext* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_auth_CertificateValidationContext*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_auth_CertificateValidationContext*) = value; } UPB_INLINE struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_mutable_default_validation_context(envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_CertificateValidationContext* sub = (struct envoy_api_v2_auth_CertificateValidationContext*)envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(msg); @@ -356,7 +367,7 @@ UPB_INLINE struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_a return sub; } UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_set_validation_context_sds_secret_config(envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg, struct envoy_api_v2_auth_SdsSecretConfig* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_api_v2_auth_SdsSecretConfig*) = value; } UPB_INLINE struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_mutable_validation_context_sds_secret_config(envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena) { struct envoy_api_v2_auth_SdsSecretConfig* sub = (struct envoy_api_v2_auth_SdsSecretConfig*)envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_validation_context_sds_secret_config(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c index fdecae3463c..185fc136437 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c @@ -66,7 +66,7 @@ static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[34] = { static const upb_msglayout_field envoy_api_v2_Cluster__fields[45] = { {1, UPB_SIZE(32, 32), 0, 0, 9, 1}, - {2, UPB_SIZE(168, 304), UPB_SIZE(-177, -313), 0, 14, 1}, + {2, UPB_SIZE(168, 304), UPB_SIZE(-176, -312), 0, 14, 1}, {3, UPB_SIZE(48, 64), 0, 2, 11, 1}, {4, UPB_SIZE(52, 72), 0, 28, 11, 1}, {5, UPB_SIZE(56, 80), 0, 29, 11, 1}, @@ -85,7 +85,7 @@ static const upb_msglayout_field envoy_api_v2_Cluster__fields[45] = { {20, UPB_SIZE(88, 144), 0, 28, 11, 1}, {21, UPB_SIZE(92, 152), 0, 19, 11, 1}, {22, UPB_SIZE(96, 160), 0, 4, 11, 1}, - {23, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 8, 11, 1}, + {23, UPB_SIZE(180, 320), UPB_SIZE(-184, -328), 8, 11, 1}, {24, UPB_SIZE(100, 168), 0, 26, 11, 1}, {25, UPB_SIZE(104, 176), 0, 25, 11, 1}, {26, UPB_SIZE(16, 16), 0, 0, 14, 1}, @@ -96,11 +96,11 @@ static const upb_msglayout_field envoy_api_v2_Cluster__fields[45] = { {31, UPB_SIZE(24, 24), 0, 0, 8, 1}, {32, UPB_SIZE(25, 25), 0, 0, 8, 1}, {33, UPB_SIZE(120, 208), 0, 11, 11, 1}, - {34, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 6, 11, 1}, - {35, UPB_SIZE(152, 272), 0, 3, 11, 4}, - {36, UPB_SIZE(156, 280), 0, 10, 11, 4}, - {37, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 5, 11, 1}, - {38, UPB_SIZE(168, 304), UPB_SIZE(-177, -313), 1, 11, 1}, + {34, UPB_SIZE(180, 320), UPB_SIZE(-184, -328), 6, 11, 1}, + {35, UPB_SIZE(152, 272), 0, 3, 11, _UPB_LABEL_MAP}, + {36, UPB_SIZE(156, 280), 0, 10, 11, _UPB_LABEL_MAP}, + {37, UPB_SIZE(180, 320), UPB_SIZE(-184, -328), 5, 11, 1}, + {38, UPB_SIZE(168, 304), UPB_SIZE(-176, -312), 1, 11, 1}, {39, UPB_SIZE(26, 26), 0, 0, 8, 1}, {40, UPB_SIZE(160, 288), 0, 16, 11, 3}, {41, UPB_SIZE(124, 216), 0, 12, 11, 1}, @@ -248,8 +248,8 @@ static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_submsgs[5] static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig__fields[7] = { {1, UPB_SIZE(4, 8), 0, 3, 11, 1}, - {2, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, - {3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, + {2, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 2, 11, 1}, + {3, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 1, 11, 1}, {4, UPB_SIZE(8, 16), 0, 4, 11, 1}, {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, {6, UPB_SIZE(1, 1), 0, 0, 8, 1}, diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h index 1eda3027e74..b5664d7f1b1 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h @@ -193,7 +193,7 @@ typedef enum { envoy_api_v2_Cluster_cluster_discovery_type_cluster_type = 38, envoy_api_v2_Cluster_cluster_discovery_type_NOT_SET = 0 } envoy_api_v2_Cluster_cluster_discovery_type_oneofcases; -UPB_INLINE envoy_api_v2_Cluster_cluster_discovery_type_oneofcases envoy_api_v2_Cluster_cluster_discovery_type_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_cluster_discovery_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(176, 312)); } +UPB_INLINE envoy_api_v2_Cluster_cluster_discovery_type_oneofcases envoy_api_v2_Cluster_cluster_discovery_type_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_cluster_discovery_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(176, 312), int32_t); } typedef enum { envoy_api_v2_Cluster_lb_config_ring_hash_lb_config = 23, @@ -201,46 +201,70 @@ typedef enum { envoy_api_v2_Cluster_lb_config_least_request_lb_config = 37, envoy_api_v2_Cluster_lb_config_NOT_SET = 0 } envoy_api_v2_Cluster_lb_config_oneofcases; -UPB_INLINE envoy_api_v2_Cluster_lb_config_oneofcases envoy_api_v2_Cluster_lb_config_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_lb_config_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(184, 328)); } +UPB_INLINE envoy_api_v2_Cluster_lb_config_oneofcases envoy_api_v2_Cluster_lb_config_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_lb_config_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(184, 328), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_Cluster_name(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); } +UPB_INLINE upb_strview envoy_api_v2_Cluster_name(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); } UPB_INLINE bool envoy_api_v2_Cluster_has_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(176, 312), 2); } UPB_INLINE int32_t envoy_api_v2_Cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(168, 304), UPB_SIZE(176, 312), 2, envoy_api_v2_Cluster_STATIC); } -UPB_INLINE const envoy_api_v2_Cluster_EdsClusterConfig* envoy_api_v2_Cluster_eds_cluster_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_EdsClusterConfig*, UPB_SIZE(48, 64)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_connect_timeout(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(52, 72)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_per_connection_buffer_limit_bytes(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(56, 80)); } -UPB_INLINE int32_t envoy_api_v2_Cluster_lb_policy(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Cluster_has_eds_cluster_config(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 64)); } +UPB_INLINE const envoy_api_v2_Cluster_EdsClusterConfig* envoy_api_v2_Cluster_eds_cluster_config(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), const envoy_api_v2_Cluster_EdsClusterConfig*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_connect_timeout(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 72)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_connect_timeout(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_per_connection_buffer_limit_bytes(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_per_connection_buffer_limit_bytes(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 80), const struct google_protobuf_UInt32Value*); } +UPB_INLINE int32_t envoy_api_v2_Cluster_lb_policy(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_Cluster_has_hosts(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(140, 248)); } UPB_INLINE const struct envoy_api_v2_core_Address* const* envoy_api_v2_Cluster_hosts(const envoy_api_v2_Cluster *msg, size_t *len) { return (const struct envoy_api_v2_core_Address* const*)_upb_array_accessor(msg, UPB_SIZE(140, 248), len); } +UPB_INLINE bool envoy_api_v2_Cluster_has_health_checks(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(144, 256)); } UPB_INLINE const struct envoy_api_v2_core_HealthCheck* const* envoy_api_v2_Cluster_health_checks(const envoy_api_v2_Cluster *msg, size_t *len) { return (const struct envoy_api_v2_core_HealthCheck* const*)_upb_array_accessor(msg, UPB_SIZE(144, 256), len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_max_requests_per_connection(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(60, 88)); } -UPB_INLINE const struct envoy_api_v2_cluster_CircuitBreakers* envoy_api_v2_Cluster_circuit_breakers(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_cluster_CircuitBreakers*, UPB_SIZE(64, 96)); } -UPB_INLINE const struct envoy_api_v2_auth_UpstreamTlsContext* envoy_api_v2_Cluster_tls_context(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_auth_UpstreamTlsContext*, UPB_SIZE(68, 104)); } -UPB_INLINE const struct envoy_api_v2_core_Http1ProtocolOptions* envoy_api_v2_Cluster_http_protocol_options(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Http1ProtocolOptions*, UPB_SIZE(72, 112)); } -UPB_INLINE const struct envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_Cluster_http2_protocol_options(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Http2ProtocolOptions*, UPB_SIZE(76, 120)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_dns_refresh_rate(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(80, 128)); } -UPB_INLINE int32_t envoy_api_v2_Cluster_dns_lookup_family(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_api_v2_Cluster_has_max_requests_per_connection(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 88)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_max_requests_per_connection(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_circuit_breakers(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 96)); } +UPB_INLINE const struct envoy_api_v2_cluster_CircuitBreakers* envoy_api_v2_Cluster_circuit_breakers(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 96), const struct envoy_api_v2_cluster_CircuitBreakers*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_tls_context(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 104)); } +UPB_INLINE const struct envoy_api_v2_auth_UpstreamTlsContext* envoy_api_v2_Cluster_tls_context(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), const struct envoy_api_v2_auth_UpstreamTlsContext*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_http_protocol_options(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 112)); } +UPB_INLINE const struct envoy_api_v2_core_Http1ProtocolOptions* envoy_api_v2_Cluster_http_protocol_options(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 112), const struct envoy_api_v2_core_Http1ProtocolOptions*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_http2_protocol_options(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 120)); } +UPB_INLINE const struct envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_Cluster_http2_protocol_options(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const struct envoy_api_v2_core_Http2ProtocolOptions*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_dns_refresh_rate(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 128)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_dns_refresh_rate(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 128), const struct google_protobuf_Duration*); } +UPB_INLINE int32_t envoy_api_v2_Cluster_dns_lookup_family(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } +UPB_INLINE bool envoy_api_v2_Cluster_has_dns_resolvers(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(148, 264)); } UPB_INLINE const struct envoy_api_v2_core_Address* const* envoy_api_v2_Cluster_dns_resolvers(const envoy_api_v2_Cluster *msg, size_t *len) { return (const struct envoy_api_v2_core_Address* const*)_upb_array_accessor(msg, UPB_SIZE(148, 264), len); } -UPB_INLINE const struct envoy_api_v2_cluster_OutlierDetection* envoy_api_v2_Cluster_outlier_detection(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_cluster_OutlierDetection*, UPB_SIZE(84, 136)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_cleanup_interval(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(88, 144)); } -UPB_INLINE const struct envoy_api_v2_core_BindConfig* envoy_api_v2_Cluster_upstream_bind_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_BindConfig*, UPB_SIZE(92, 152)); } -UPB_INLINE const envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_lb_subset_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_LbSubsetConfig*, UPB_SIZE(96, 160)); } +UPB_INLINE bool envoy_api_v2_Cluster_has_outlier_detection(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 136)); } +UPB_INLINE const struct envoy_api_v2_cluster_OutlierDetection* envoy_api_v2_Cluster_outlier_detection(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 136), const struct envoy_api_v2_cluster_OutlierDetection*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_cleanup_interval(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 144)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_cleanup_interval(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(88, 144), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_upstream_bind_config(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 152)); } +UPB_INLINE const struct envoy_api_v2_core_BindConfig* envoy_api_v2_Cluster_upstream_bind_config(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 152), const struct envoy_api_v2_core_BindConfig*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_lb_subset_config(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 160)); } +UPB_INLINE const envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_lb_subset_config(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(96, 160), const envoy_api_v2_Cluster_LbSubsetConfig*); } UPB_INLINE bool envoy_api_v2_Cluster_has_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(184, 328), 23); } UPB_INLINE const envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 23, NULL); } -UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_transport_socket(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(100, 168)); } -UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_Cluster_metadata(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(104, 176)); } -UPB_INLINE int32_t envoy_api_v2_Cluster_protocol_selection(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } -UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig* envoy_api_v2_Cluster_common_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_CommonLbConfig*, UPB_SIZE(108, 184)); } -UPB_INLINE upb_strview envoy_api_v2_Cluster_alt_stat_name(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); } -UPB_INLINE const struct envoy_api_v2_core_HttpProtocolOptions* envoy_api_v2_Cluster_common_http_protocol_options(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_HttpProtocolOptions*, UPB_SIZE(112, 192)); } -UPB_INLINE const envoy_api_v2_UpstreamConnectionOptions* envoy_api_v2_Cluster_upstream_connection_options(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_UpstreamConnectionOptions*, UPB_SIZE(116, 200)); } -UPB_INLINE bool envoy_api_v2_Cluster_close_connections_on_host_health_failure(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } -UPB_INLINE bool envoy_api_v2_Cluster_drain_connections_on_host_removal(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)); } -UPB_INLINE const struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_load_assignment(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_ClusterLoadAssignment*, UPB_SIZE(120, 208)); } +UPB_INLINE bool envoy_api_v2_Cluster_has_transport_socket(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 168)); } +UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_transport_socket(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 168), const struct envoy_api_v2_core_TransportSocket*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_metadata(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(104, 176)); } +UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_Cluster_metadata(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(104, 176), const struct envoy_api_v2_core_Metadata*); } +UPB_INLINE int32_t envoy_api_v2_Cluster_protocol_selection(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } +UPB_INLINE bool envoy_api_v2_Cluster_has_common_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 184)); } +UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig* envoy_api_v2_Cluster_common_lb_config(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(108, 184), const envoy_api_v2_Cluster_CommonLbConfig*); } +UPB_INLINE upb_strview envoy_api_v2_Cluster_alt_stat_name(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); } +UPB_INLINE bool envoy_api_v2_Cluster_has_common_http_protocol_options(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(112, 192)); } +UPB_INLINE const struct envoy_api_v2_core_HttpProtocolOptions* envoy_api_v2_Cluster_common_http_protocol_options(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(112, 192), const struct envoy_api_v2_core_HttpProtocolOptions*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_upstream_connection_options(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(116, 200)); } +UPB_INLINE const envoy_api_v2_UpstreamConnectionOptions* envoy_api_v2_Cluster_upstream_connection_options(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(116, 200), const envoy_api_v2_UpstreamConnectionOptions*); } +UPB_INLINE bool envoy_api_v2_Cluster_close_connections_on_host_health_failure(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_drain_connections_on_host_removal(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_has_load_assignment(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(120, 208)); } +UPB_INLINE const struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_load_assignment(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(120, 208), const struct envoy_api_v2_ClusterLoadAssignment*); } UPB_INLINE bool envoy_api_v2_Cluster_has_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(184, 328), 34); } UPB_INLINE const envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 34, NULL); } +UPB_INLINE bool envoy_api_v2_Cluster_has_extension_protocol_options(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(152, 272)); } UPB_INLINE size_t envoy_api_v2_Cluster_extension_protocol_options_size(const envoy_api_v2_Cluster *msg) {return _upb_msg_map_size(msg, UPB_SIZE(152, 272)); } UPB_INLINE bool envoy_api_v2_Cluster_extension_protocol_options_get(const envoy_api_v2_Cluster *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(152, 272), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_extension_protocol_options_next(const envoy_api_v2_Cluster *msg, size_t* iter) { return (const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(152, 272), iter); } +UPB_INLINE bool envoy_api_v2_Cluster_has_typed_extension_protocol_options(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(156, 280)); } UPB_INLINE size_t envoy_api_v2_Cluster_typed_extension_protocol_options_size(const envoy_api_v2_Cluster *msg) {return _upb_msg_map_size(msg, UPB_SIZE(156, 280)); } UPB_INLINE bool envoy_api_v2_Cluster_typed_extension_protocol_options_get(const envoy_api_v2_Cluster *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(156, 280), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_typed_extension_protocol_options_next(const envoy_api_v2_Cluster *msg, size_t* iter) { return (const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(156, 280), iter); } @@ -248,24 +272,30 @@ UPB_INLINE bool envoy_api_v2_Cluster_has_least_request_lb_config(const envoy_api UPB_INLINE const envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 37, NULL); } UPB_INLINE bool envoy_api_v2_Cluster_has_cluster_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(176, 312), 38); } UPB_INLINE const envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(168, 304), UPB_SIZE(176, 312), 38, NULL); } -UPB_INLINE bool envoy_api_v2_Cluster_respect_dns_ttl(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); } +UPB_INLINE bool envoy_api_v2_Cluster_respect_dns_ttl(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_has_filters(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(160, 288)); } UPB_INLINE const struct envoy_api_v2_cluster_Filter* const* envoy_api_v2_Cluster_filters(const envoy_api_v2_Cluster *msg, size_t *len) { return (const struct envoy_api_v2_cluster_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(160, 288), len); } -UPB_INLINE const envoy_api_v2_LoadBalancingPolicy* envoy_api_v2_Cluster_load_balancing_policy(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_LoadBalancingPolicy*, UPB_SIZE(124, 216)); } -UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_lrs_server(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(128, 224)); } +UPB_INLINE bool envoy_api_v2_Cluster_has_load_balancing_policy(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(124, 216)); } +UPB_INLINE const envoy_api_v2_LoadBalancingPolicy* envoy_api_v2_Cluster_load_balancing_policy(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(124, 216), const envoy_api_v2_LoadBalancingPolicy*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_lrs_server(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(128, 224)); } +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_lrs_server(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(128, 224), const struct envoy_api_v2_core_ConfigSource*); } +UPB_INLINE bool envoy_api_v2_Cluster_has_transport_socket_matches(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(164, 296)); } UPB_INLINE const envoy_api_v2_Cluster_TransportSocketMatch* const* envoy_api_v2_Cluster_transport_socket_matches(const envoy_api_v2_Cluster *msg, size_t *len) { return (const envoy_api_v2_Cluster_TransportSocketMatch* const*)_upb_array_accessor(msg, UPB_SIZE(164, 296), len); } -UPB_INLINE const envoy_api_v2_Cluster_RefreshRate* envoy_api_v2_Cluster_dns_failure_refresh_rate(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_RefreshRate*, UPB_SIZE(132, 232)); } -UPB_INLINE bool envoy_api_v2_Cluster_use_tcp_for_dns_lookups(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)); } -UPB_INLINE const struct envoy_api_v2_core_UpstreamHttpProtocolOptions* envoy_api_v2_Cluster_upstream_http_protocol_options(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_UpstreamHttpProtocolOptions*, UPB_SIZE(136, 240)); } -UPB_INLINE bool envoy_api_v2_Cluster_track_timeout_budgets(const envoy_api_v2_Cluster *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(28, 28)); } +UPB_INLINE bool envoy_api_v2_Cluster_has_dns_failure_refresh_rate(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(132, 232)); } +UPB_INLINE const envoy_api_v2_Cluster_RefreshRate* envoy_api_v2_Cluster_dns_failure_refresh_rate(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(132, 232), const envoy_api_v2_Cluster_RefreshRate*); } +UPB_INLINE bool envoy_api_v2_Cluster_use_tcp_for_dns_lookups(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_has_upstream_http_protocol_options(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(136, 240)); } +UPB_INLINE const struct envoy_api_v2_core_UpstreamHttpProtocolOptions* envoy_api_v2_Cluster_upstream_http_protocol_options(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(136, 240), const struct envoy_api_v2_core_UpstreamHttpProtocolOptions*); } +UPB_INLINE bool envoy_api_v2_Cluster_track_timeout_budgets(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), bool); } UPB_INLINE void envoy_api_v2_Cluster_set_name(envoy_api_v2_Cluster *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview) = value; } UPB_INLINE void envoy_api_v2_Cluster_set_type(envoy_api_v2_Cluster *msg, int32_t value) { UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(168, 304), value, UPB_SIZE(176, 312), 2); } UPB_INLINE void envoy_api_v2_Cluster_set_eds_cluster_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_EdsClusterConfig* value) { - UPB_FIELD_AT(msg, envoy_api_v2_Cluster_EdsClusterConfig*, UPB_SIZE(48, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 64), envoy_api_v2_Cluster_EdsClusterConfig*) = value; } UPB_INLINE struct envoy_api_v2_Cluster_EdsClusterConfig* envoy_api_v2_Cluster_mutable_eds_cluster_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_EdsClusterConfig* sub = (struct envoy_api_v2_Cluster_EdsClusterConfig*)envoy_api_v2_Cluster_eds_cluster_config(msg); @@ -277,7 +307,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_EdsClusterConfig* envoy_api_v2_Cluster_mu return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_connect_timeout(envoy_api_v2_Cluster *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(52, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 72), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_connect_timeout(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_connect_timeout(msg); @@ -289,7 +319,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_connect return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_per_connection_buffer_limit_bytes(envoy_api_v2_Cluster *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(56, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 80), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_mutable_per_connection_buffer_limit_bytes(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Cluster_per_connection_buffer_limit_bytes(msg); @@ -301,7 +331,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_mutable_per_ return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_lb_policy(envoy_api_v2_Cluster *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE struct envoy_api_v2_core_Address** envoy_api_v2_Cluster_mutable_hosts(envoy_api_v2_Cluster *msg, size_t *len) { return (struct envoy_api_v2_core_Address**)_upb_array_mutable_accessor(msg, UPB_SIZE(140, 248), len); @@ -330,7 +360,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck* envoy_api_v2_Cluster_add_health return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_max_requests_per_connection(envoy_api_v2_Cluster *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(60, 88)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 88), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_mutable_max_requests_per_connection(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Cluster_max_requests_per_connection(msg); @@ -342,7 +372,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_mutable_max_ return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_circuit_breakers(envoy_api_v2_Cluster *msg, struct envoy_api_v2_cluster_CircuitBreakers* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_cluster_CircuitBreakers*, UPB_SIZE(64, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 96), struct envoy_api_v2_cluster_CircuitBreakers*) = value; } UPB_INLINE struct envoy_api_v2_cluster_CircuitBreakers* envoy_api_v2_Cluster_mutable_circuit_breakers(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_cluster_CircuitBreakers* sub = (struct envoy_api_v2_cluster_CircuitBreakers*)envoy_api_v2_Cluster_circuit_breakers(msg); @@ -354,7 +384,7 @@ UPB_INLINE struct envoy_api_v2_cluster_CircuitBreakers* envoy_api_v2_Cluster_mut return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_tls_context(envoy_api_v2_Cluster *msg, struct envoy_api_v2_auth_UpstreamTlsContext* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_auth_UpstreamTlsContext*, UPB_SIZE(68, 104)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 104), struct envoy_api_v2_auth_UpstreamTlsContext*) = value; } UPB_INLINE struct envoy_api_v2_auth_UpstreamTlsContext* envoy_api_v2_Cluster_mutable_tls_context(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_auth_UpstreamTlsContext* sub = (struct envoy_api_v2_auth_UpstreamTlsContext*)envoy_api_v2_Cluster_tls_context(msg); @@ -366,7 +396,7 @@ UPB_INLINE struct envoy_api_v2_auth_UpstreamTlsContext* envoy_api_v2_Cluster_mut return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_http_protocol_options(envoy_api_v2_Cluster *msg, struct envoy_api_v2_core_Http1ProtocolOptions* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Http1ProtocolOptions*, UPB_SIZE(72, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(72, 112), struct envoy_api_v2_core_Http1ProtocolOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions* envoy_api_v2_Cluster_mutable_http_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_Http1ProtocolOptions* sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)envoy_api_v2_Cluster_http_protocol_options(msg); @@ -378,7 +408,7 @@ UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions* envoy_api_v2_Cluster_m return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_http2_protocol_options(envoy_api_v2_Cluster *msg, struct envoy_api_v2_core_Http2ProtocolOptions* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Http2ProtocolOptions*, UPB_SIZE(76, 120)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(76, 120), struct envoy_api_v2_core_Http2ProtocolOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_Cluster_mutable_http2_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_Http2ProtocolOptions* sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)envoy_api_v2_Cluster_http2_protocol_options(msg); @@ -390,7 +420,7 @@ UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_Cluster_m return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_dns_refresh_rate(envoy_api_v2_Cluster *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(80, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(80, 128), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_dns_refresh_rate(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_dns_refresh_rate(msg); @@ -402,7 +432,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_dns_ref return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_dns_lookup_family(envoy_api_v2_Cluster *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE struct envoy_api_v2_core_Address** envoy_api_v2_Cluster_mutable_dns_resolvers(envoy_api_v2_Cluster *msg, size_t *len) { return (struct envoy_api_v2_core_Address**)_upb_array_mutable_accessor(msg, UPB_SIZE(148, 264), len); @@ -418,7 +448,7 @@ UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_Cluster_add_dns_resolv return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_outlier_detection(envoy_api_v2_Cluster *msg, struct envoy_api_v2_cluster_OutlierDetection* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_cluster_OutlierDetection*, UPB_SIZE(84, 136)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(84, 136), struct envoy_api_v2_cluster_OutlierDetection*) = value; } UPB_INLINE struct envoy_api_v2_cluster_OutlierDetection* envoy_api_v2_Cluster_mutable_outlier_detection(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_cluster_OutlierDetection* sub = (struct envoy_api_v2_cluster_OutlierDetection*)envoy_api_v2_Cluster_outlier_detection(msg); @@ -430,7 +460,7 @@ UPB_INLINE struct envoy_api_v2_cluster_OutlierDetection* envoy_api_v2_Cluster_mu return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_cleanup_interval(envoy_api_v2_Cluster *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(88, 144)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(88, 144), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_cleanup_interval(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_cleanup_interval(msg); @@ -442,7 +472,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_mutable_cleanup return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_upstream_bind_config(envoy_api_v2_Cluster *msg, struct envoy_api_v2_core_BindConfig* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_BindConfig*, UPB_SIZE(92, 152)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(92, 152), struct envoy_api_v2_core_BindConfig*) = value; } UPB_INLINE struct envoy_api_v2_core_BindConfig* envoy_api_v2_Cluster_mutable_upstream_bind_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_BindConfig* sub = (struct envoy_api_v2_core_BindConfig*)envoy_api_v2_Cluster_upstream_bind_config(msg); @@ -454,7 +484,7 @@ UPB_INLINE struct envoy_api_v2_core_BindConfig* envoy_api_v2_Cluster_mutable_ups return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_lb_subset_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_LbSubsetConfig* value) { - UPB_FIELD_AT(msg, envoy_api_v2_Cluster_LbSubsetConfig*, UPB_SIZE(96, 160)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(96, 160), envoy_api_v2_Cluster_LbSubsetConfig*) = value; } UPB_INLINE struct envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_mutable_lb_subset_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_LbSubsetConfig* sub = (struct envoy_api_v2_Cluster_LbSubsetConfig*)envoy_api_v2_Cluster_lb_subset_config(msg); @@ -478,7 +508,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_mu return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_transport_socket(envoy_api_v2_Cluster *msg, struct envoy_api_v2_core_TransportSocket* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(100, 168)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(100, 168), struct envoy_api_v2_core_TransportSocket*) = value; } UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_mutable_transport_socket(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_TransportSocket* sub = (struct envoy_api_v2_core_TransportSocket*)envoy_api_v2_Cluster_transport_socket(msg); @@ -490,7 +520,7 @@ UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_mutabl return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_metadata(envoy_api_v2_Cluster *msg, struct envoy_api_v2_core_Metadata* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(104, 176)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(104, 176), struct envoy_api_v2_core_Metadata*) = value; } UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_Cluster_mutable_metadata(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_Cluster_metadata(msg); @@ -502,10 +532,10 @@ UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_Cluster_mutable_metad return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_protocol_selection(envoy_api_v2_Cluster *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void envoy_api_v2_Cluster_set_common_lb_config(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_CommonLbConfig* value) { - UPB_FIELD_AT(msg, envoy_api_v2_Cluster_CommonLbConfig*, UPB_SIZE(108, 184)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(108, 184), envoy_api_v2_Cluster_CommonLbConfig*) = value; } UPB_INLINE struct envoy_api_v2_Cluster_CommonLbConfig* envoy_api_v2_Cluster_mutable_common_lb_config(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_CommonLbConfig* sub = (struct envoy_api_v2_Cluster_CommonLbConfig*)envoy_api_v2_Cluster_common_lb_config(msg); @@ -517,10 +547,10 @@ UPB_INLINE struct envoy_api_v2_Cluster_CommonLbConfig* envoy_api_v2_Cluster_muta return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_alt_stat_name(envoy_api_v2_Cluster *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview) = value; } UPB_INLINE void envoy_api_v2_Cluster_set_common_http_protocol_options(envoy_api_v2_Cluster *msg, struct envoy_api_v2_core_HttpProtocolOptions* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_HttpProtocolOptions*, UPB_SIZE(112, 192)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(112, 192), struct envoy_api_v2_core_HttpProtocolOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_HttpProtocolOptions* envoy_api_v2_Cluster_mutable_common_http_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_HttpProtocolOptions* sub = (struct envoy_api_v2_core_HttpProtocolOptions*)envoy_api_v2_Cluster_common_http_protocol_options(msg); @@ -532,7 +562,7 @@ UPB_INLINE struct envoy_api_v2_core_HttpProtocolOptions* envoy_api_v2_Cluster_mu return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_upstream_connection_options(envoy_api_v2_Cluster *msg, envoy_api_v2_UpstreamConnectionOptions* value) { - UPB_FIELD_AT(msg, envoy_api_v2_UpstreamConnectionOptions*, UPB_SIZE(116, 200)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(116, 200), envoy_api_v2_UpstreamConnectionOptions*) = value; } UPB_INLINE struct envoy_api_v2_UpstreamConnectionOptions* envoy_api_v2_Cluster_mutable_upstream_connection_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_UpstreamConnectionOptions* sub = (struct envoy_api_v2_UpstreamConnectionOptions*)envoy_api_v2_Cluster_upstream_connection_options(msg); @@ -544,13 +574,13 @@ UPB_INLINE struct envoy_api_v2_UpstreamConnectionOptions* envoy_api_v2_Cluster_m return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_close_connections_on_host_health_failure(envoy_api_v2_Cluster *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value; } UPB_INLINE void envoy_api_v2_Cluster_set_drain_connections_on_host_removal(envoy_api_v2_Cluster *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool) = value; } UPB_INLINE void envoy_api_v2_Cluster_set_load_assignment(envoy_api_v2_Cluster *msg, struct envoy_api_v2_ClusterLoadAssignment* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_ClusterLoadAssignment*, UPB_SIZE(120, 208)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(120, 208), struct envoy_api_v2_ClusterLoadAssignment*) = value; } UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_mutable_load_assignment(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_ClusterLoadAssignment* sub = (struct envoy_api_v2_ClusterLoadAssignment*)envoy_api_v2_Cluster_load_assignment(msg); @@ -606,7 +636,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_m return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_respect_dns_ttl(envoy_api_v2_Cluster *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool) = value; } UPB_INLINE struct envoy_api_v2_cluster_Filter** envoy_api_v2_Cluster_mutable_filters(envoy_api_v2_Cluster *msg, size_t *len) { return (struct envoy_api_v2_cluster_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(160, 288), len); @@ -622,7 +652,7 @@ UPB_INLINE struct envoy_api_v2_cluster_Filter* envoy_api_v2_Cluster_add_filters( return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_load_balancing_policy(envoy_api_v2_Cluster *msg, envoy_api_v2_LoadBalancingPolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_LoadBalancingPolicy*, UPB_SIZE(124, 216)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(124, 216), envoy_api_v2_LoadBalancingPolicy*) = value; } UPB_INLINE struct envoy_api_v2_LoadBalancingPolicy* envoy_api_v2_Cluster_mutable_load_balancing_policy(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_LoadBalancingPolicy* sub = (struct envoy_api_v2_LoadBalancingPolicy*)envoy_api_v2_Cluster_load_balancing_policy(msg); @@ -634,7 +664,7 @@ UPB_INLINE struct envoy_api_v2_LoadBalancingPolicy* envoy_api_v2_Cluster_mutable return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_lrs_server(envoy_api_v2_Cluster *msg, struct envoy_api_v2_core_ConfigSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(128, 224)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(128, 224), struct envoy_api_v2_core_ConfigSource*) = value; } UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_mutable_lrs_server(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_Cluster_lrs_server(msg); @@ -659,7 +689,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_TransportSocketMatch* envoy_api_v2_Cluste return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_dns_failure_refresh_rate(envoy_api_v2_Cluster *msg, envoy_api_v2_Cluster_RefreshRate* value) { - UPB_FIELD_AT(msg, envoy_api_v2_Cluster_RefreshRate*, UPB_SIZE(132, 232)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(132, 232), envoy_api_v2_Cluster_RefreshRate*) = value; } UPB_INLINE struct envoy_api_v2_Cluster_RefreshRate* envoy_api_v2_Cluster_mutable_dns_failure_refresh_rate(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_RefreshRate* sub = (struct envoy_api_v2_Cluster_RefreshRate*)envoy_api_v2_Cluster_dns_failure_refresh_rate(msg); @@ -671,10 +701,10 @@ UPB_INLINE struct envoy_api_v2_Cluster_RefreshRate* envoy_api_v2_Cluster_mutable return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_use_tcp_for_dns_lookups(envoy_api_v2_Cluster *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool) = value; } UPB_INLINE void envoy_api_v2_Cluster_set_upstream_http_protocol_options(envoy_api_v2_Cluster *msg, struct envoy_api_v2_core_UpstreamHttpProtocolOptions* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_UpstreamHttpProtocolOptions*, UPB_SIZE(136, 240)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(136, 240), struct envoy_api_v2_core_UpstreamHttpProtocolOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_UpstreamHttpProtocolOptions* envoy_api_v2_Cluster_mutable_upstream_http_protocol_options(envoy_api_v2_Cluster *msg, upb_arena *arena) { struct envoy_api_v2_core_UpstreamHttpProtocolOptions* sub = (struct envoy_api_v2_core_UpstreamHttpProtocolOptions*)envoy_api_v2_Cluster_upstream_http_protocol_options(msg); @@ -686,7 +716,7 @@ UPB_INLINE struct envoy_api_v2_core_UpstreamHttpProtocolOptions* envoy_api_v2_Cl return sub; } UPB_INLINE void envoy_api_v2_Cluster_set_track_timeout_budgets(envoy_api_v2_Cluster *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(28, 28)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 28), bool) = value; } /* envoy.api.v2.Cluster.TransportSocketMatch */ @@ -703,15 +733,17 @@ UPB_INLINE char *envoy_api_v2_Cluster_TransportSocketMatch_serialize(const envoy return upb_encode(msg, &envoy_api_v2_Cluster_TransportSocketMatch_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_Cluster_TransportSocketMatch_name(const envoy_api_v2_Cluster_TransportSocketMatch *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_Cluster_TransportSocketMatch_match(const envoy_api_v2_Cluster_TransportSocketMatch *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_TransportSocketMatch_transport_socket(const envoy_api_v2_Cluster_TransportSocketMatch *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview envoy_api_v2_Cluster_TransportSocketMatch_name(const envoy_api_v2_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_Cluster_TransportSocketMatch_has_match(const envoy_api_v2_Cluster_TransportSocketMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_Cluster_TransportSocketMatch_match(const envoy_api_v2_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Struct*); } +UPB_INLINE bool envoy_api_v2_Cluster_TransportSocketMatch_has_transport_socket(const envoy_api_v2_Cluster_TransportSocketMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_TransportSocketMatch_transport_socket(const envoy_api_v2_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_api_v2_core_TransportSocket*); } UPB_INLINE void envoy_api_v2_Cluster_TransportSocketMatch_set_name(envoy_api_v2_Cluster_TransportSocketMatch *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_Cluster_TransportSocketMatch_set_match(envoy_api_v2_Cluster_TransportSocketMatch *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Struct*) = value; } UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_Cluster_TransportSocketMatch_mutable_match(envoy_api_v2_Cluster_TransportSocketMatch *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_Cluster_TransportSocketMatch_match(msg); @@ -723,7 +755,7 @@ UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_Cluster_TransportSocketMa return sub; } UPB_INLINE void envoy_api_v2_Cluster_TransportSocketMatch_set_transport_socket(envoy_api_v2_Cluster_TransportSocketMatch *msg, struct envoy_api_v2_core_TransportSocket* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_api_v2_core_TransportSocket*) = value; } UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_TransportSocketMatch_mutable_transport_socket(envoy_api_v2_Cluster_TransportSocketMatch *msg, upb_arena *arena) { struct envoy_api_v2_core_TransportSocket* sub = (struct envoy_api_v2_core_TransportSocket*)envoy_api_v2_Cluster_TransportSocketMatch_transport_socket(msg); @@ -749,14 +781,15 @@ UPB_INLINE char *envoy_api_v2_Cluster_CustomClusterType_serialize(const envoy_ap return upb_encode(msg, &envoy_api_v2_Cluster_CustomClusterType_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_Cluster_CustomClusterType_name(const envoy_api_v2_Cluster_CustomClusterType *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_Cluster_CustomClusterType_typed_config(const envoy_api_v2_Cluster_CustomClusterType *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_Cluster_CustomClusterType_name(const envoy_api_v2_Cluster_CustomClusterType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_Cluster_CustomClusterType_has_typed_config(const envoy_api_v2_Cluster_CustomClusterType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_Cluster_CustomClusterType_typed_config(const envoy_api_v2_Cluster_CustomClusterType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Any*); } UPB_INLINE void envoy_api_v2_Cluster_CustomClusterType_set_name(envoy_api_v2_Cluster_CustomClusterType *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_Cluster_CustomClusterType_set_typed_config(envoy_api_v2_Cluster_CustomClusterType *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_api_v2_Cluster_CustomClusterType_mutable_typed_config(envoy_api_v2_Cluster_CustomClusterType *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_Cluster_CustomClusterType_typed_config(msg); @@ -782,11 +815,12 @@ UPB_INLINE char *envoy_api_v2_Cluster_EdsClusterConfig_serialize(const envoy_api return upb_encode(msg, &envoy_api_v2_Cluster_EdsClusterConfig_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_EdsClusterConfig_eds_config(const envoy_api_v2_Cluster_EdsClusterConfig *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_Cluster_EdsClusterConfig_service_name(const envoy_api_v2_Cluster_EdsClusterConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Cluster_EdsClusterConfig_has_eds_config(const envoy_api_v2_Cluster_EdsClusterConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_EdsClusterConfig_eds_config(const envoy_api_v2_Cluster_EdsClusterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_ConfigSource*); } +UPB_INLINE upb_strview envoy_api_v2_Cluster_EdsClusterConfig_service_name(const envoy_api_v2_Cluster_EdsClusterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_Cluster_EdsClusterConfig_set_eds_config(envoy_api_v2_Cluster_EdsClusterConfig *msg, struct envoy_api_v2_core_ConfigSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_api_v2_core_ConfigSource*) = value; } UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_EdsClusterConfig_mutable_eds_config(envoy_api_v2_Cluster_EdsClusterConfig *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_Cluster_EdsClusterConfig_eds_config(msg); @@ -798,7 +832,7 @@ UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Cluster_EdsCluste return sub; } UPB_INLINE void envoy_api_v2_Cluster_EdsClusterConfig_set_service_name(envoy_api_v2_Cluster_EdsClusterConfig *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.Cluster.LbSubsetConfig */ @@ -815,19 +849,21 @@ UPB_INLINE char *envoy_api_v2_Cluster_LbSubsetConfig_serialize(const envoy_api_v return upb_encode(msg, &envoy_api_v2_Cluster_LbSubsetConfig_msginit, arena, len); } -UPB_INLINE int32_t envoy_api_v2_Cluster_LbSubsetConfig_fallback_policy(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_Cluster_LbSubsetConfig_default_subset(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(12, 16)); } +UPB_INLINE int32_t envoy_api_v2_Cluster_LbSubsetConfig_fallback_policy(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_has_default_subset(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_Cluster_LbSubsetConfig_default_subset(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_Struct*); } +UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_has_subset_selectors(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); } UPB_INLINE const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector* const* envoy_api_v2_Cluster_LbSubsetConfig_subset_selectors(const envoy_api_v2_Cluster_LbSubsetConfig *msg, size_t *len) { return (const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector* const*)_upb_array_accessor(msg, UPB_SIZE(16, 24), len); } -UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_locality_weight_aware(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } -UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_scale_locality_weight(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(9, 9)); } -UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_panic_mode_any(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(10, 10)); } -UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_list_as_any(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(11, 11)); } +UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_locality_weight_aware(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_scale_locality_weight(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_panic_mode_any(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_list_as_any(const envoy_api_v2_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool); } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_fallback_policy(envoy_api_v2_Cluster_LbSubsetConfig *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_default_subset(envoy_api_v2_Cluster_LbSubsetConfig *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_Struct*) = value; } UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_Cluster_LbSubsetConfig_mutable_default_subset(envoy_api_v2_Cluster_LbSubsetConfig *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_Cluster_LbSubsetConfig_default_subset(msg); @@ -852,16 +888,16 @@ UPB_INLINE struct envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector* envoy_ap return sub; } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_locality_weight_aware(envoy_api_v2_Cluster_LbSubsetConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_scale_locality_weight(envoy_api_v2_Cluster_LbSubsetConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(9, 9)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = value; } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_panic_mode_any(envoy_api_v2_Cluster_LbSubsetConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(10, 10)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool) = value; } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_set_list_as_any(envoy_api_v2_Cluster_LbSubsetConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(11, 11)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool) = value; } /* envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector */ @@ -879,7 +915,7 @@ UPB_INLINE char *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_serialize( } UPB_INLINE upb_strview const* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_keys(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); } -UPB_INLINE int32_t envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_fallback_policy(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_fallback_policy(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE upb_strview const* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_fallback_keys_subset(const envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); } UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_mutable_keys(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { @@ -893,7 +929,7 @@ UPB_INLINE bool envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_add_keys(en arena); } UPB_INLINE void envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_set_fallback_policy(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE upb_strview* envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_mutable_fallback_keys_subset(envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len); @@ -920,10 +956,11 @@ UPB_INLINE char *envoy_api_v2_Cluster_LeastRequestLbConfig_serialize(const envoy return upb_encode(msg, &envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_LeastRequestLbConfig_choice_count(const envoy_api_v2_Cluster_LeastRequestLbConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Cluster_LeastRequestLbConfig_has_choice_count(const envoy_api_v2_Cluster_LeastRequestLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_LeastRequestLbConfig_choice_count(const envoy_api_v2_Cluster_LeastRequestLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_Cluster_LeastRequestLbConfig_set_choice_count(envoy_api_v2_Cluster_LeastRequestLbConfig *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Cluster_LeastRequestLbConfig_mutable_choice_count(envoy_api_v2_Cluster_LeastRequestLbConfig *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Cluster_LeastRequestLbConfig_choice_count(msg); @@ -949,12 +986,14 @@ UPB_INLINE char *envoy_api_v2_Cluster_RingHashLbConfig_serialize(const envoy_api return upb_encode(msg, &envoy_api_v2_Cluster_RingHashLbConfig_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbConfig_minimum_ring_size(const envoy_api_v2_Cluster_RingHashLbConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt64Value*, UPB_SIZE(8, 8)); } -UPB_INLINE int32_t envoy_api_v2_Cluster_RingHashLbConfig_hash_function(const envoy_api_v2_Cluster_RingHashLbConfig *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbConfig_maximum_ring_size(const envoy_api_v2_Cluster_RingHashLbConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt64Value*, UPB_SIZE(12, 16)); } +UPB_INLINE bool envoy_api_v2_Cluster_RingHashLbConfig_has_minimum_ring_size(const envoy_api_v2_Cluster_RingHashLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } +UPB_INLINE const struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbConfig_minimum_ring_size(const envoy_api_v2_Cluster_RingHashLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_UInt64Value*); } +UPB_INLINE int32_t envoy_api_v2_Cluster_RingHashLbConfig_hash_function(const envoy_api_v2_Cluster_RingHashLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_Cluster_RingHashLbConfig_has_maximum_ring_size(const envoy_api_v2_Cluster_RingHashLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); } +UPB_INLINE const struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbConfig_maximum_ring_size(const envoy_api_v2_Cluster_RingHashLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt64Value*); } UPB_INLINE void envoy_api_v2_Cluster_RingHashLbConfig_set_minimum_ring_size(envoy_api_v2_Cluster_RingHashLbConfig *msg, struct google_protobuf_UInt64Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt64Value*, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_UInt64Value*) = value; } UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbConfig_mutable_minimum_ring_size(envoy_api_v2_Cluster_RingHashLbConfig *msg, upb_arena *arena) { struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_api_v2_Cluster_RingHashLbConfig_minimum_ring_size(msg); @@ -966,10 +1005,10 @@ UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbCo return sub; } UPB_INLINE void envoy_api_v2_Cluster_RingHashLbConfig_set_hash_function(envoy_api_v2_Cluster_RingHashLbConfig *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_api_v2_Cluster_RingHashLbConfig_set_maximum_ring_size(envoy_api_v2_Cluster_RingHashLbConfig *msg, struct google_protobuf_UInt64Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt64Value*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt64Value*) = value; } UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_RingHashLbConfig_mutable_maximum_ring_size(envoy_api_v2_Cluster_RingHashLbConfig *msg, upb_arena *arena) { struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_api_v2_Cluster_RingHashLbConfig_maximum_ring_size(msg); @@ -995,10 +1034,10 @@ UPB_INLINE char *envoy_api_v2_Cluster_OriginalDstLbConfig_serialize(const envoy_ return upb_encode(msg, &envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, arena, len); } -UPB_INLINE bool envoy_api_v2_Cluster_OriginalDstLbConfig_use_http_header(const envoy_api_v2_Cluster_OriginalDstLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Cluster_OriginalDstLbConfig_use_http_header(const envoy_api_v2_Cluster_OriginalDstLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_api_v2_Cluster_OriginalDstLbConfig_set_use_http_header(envoy_api_v2_Cluster_OriginalDstLbConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.api.v2.Cluster.CommonLbConfig */ @@ -1020,20 +1059,23 @@ typedef enum { envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_locality_weighted_lb_config = 3, envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_NOT_SET = 0 } envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_oneofcases; -UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_oneofcases envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_case(const envoy_api_v2_Cluster_CommonLbConfig* msg) { return (envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } +UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_oneofcases envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_case(const envoy_api_v2_Cluster_CommonLbConfig* msg) { return (envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } -UPB_INLINE const struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_healthy_panic_threshold(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_healthy_panic_threshold(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_healthy_panic_threshold(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_Percent*); } UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_zone_aware_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 2); } UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig* envoy_api_v2_Cluster_CommonLbConfig_zone_aware_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 2, NULL); } UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_locality_weighted_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 3); } UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* envoy_api_v2_Cluster_CommonLbConfig_locality_weighted_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, NULL); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_update_merge_window(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } -UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ignore_new_hosts_until_first_hc(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_close_connections_on_host_set_change(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } -UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig* envoy_api_v2_Cluster_CommonLbConfig_consistent_hashing_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_update_merge_window(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_update_merge_window(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ignore_new_hosts_until_first_hc(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_close_connections_on_host_set_change(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_consistent_hashing_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig* envoy_api_v2_Cluster_CommonLbConfig_consistent_hashing_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig*); } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_healthy_panic_threshold(envoy_api_v2_Cluster_CommonLbConfig *msg, struct envoy_type_Percent* value) { - UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_Percent*) = value; } UPB_INLINE struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_mutable_healthy_panic_threshold(envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_api_v2_Cluster_CommonLbConfig_healthy_panic_threshold(msg); @@ -1069,7 +1111,7 @@ UPB_INLINE struct envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* return sub; } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_update_merge_window(envoy_api_v2_Cluster_CommonLbConfig *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_mutable_update_merge_window(envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_CommonLbConfig_update_merge_window(msg); @@ -1081,13 +1123,13 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_ return sub; } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_ignore_new_hosts_until_first_hc(envoy_api_v2_Cluster_CommonLbConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_close_connections_on_host_set_change(envoy_api_v2_Cluster_CommonLbConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_set_consistent_hashing_lb_config(envoy_api_v2_Cluster_CommonLbConfig *msg, envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig* value) { - UPB_FIELD_AT(msg, envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig*) = value; } UPB_INLINE struct envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig* envoy_api_v2_Cluster_CommonLbConfig_mutable_consistent_hashing_lb_config(envoy_api_v2_Cluster_CommonLbConfig *msg, upb_arena *arena) { struct envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig* sub = (struct envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig*)envoy_api_v2_Cluster_CommonLbConfig_consistent_hashing_lb_config(msg); @@ -1113,12 +1155,14 @@ UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_serialize return upb_encode(msg, &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena, len); } -UPB_INLINE const struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_routing_enabled(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_min_cluster_size(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt64Value*, UPB_SIZE(8, 16)); } -UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_fail_traffic_on_panic(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_has_routing_enabled(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_routing_enabled(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_Percent*); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_has_min_cluster_size(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_min_cluster_size(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt64Value*); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_fail_traffic_on_panic(const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_routing_enabled(envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, struct envoy_type_Percent* value) { - UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_Percent*) = value; } UPB_INLINE struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_mutable_routing_enabled(envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_routing_enabled(msg); @@ -1130,7 +1174,7 @@ UPB_INLINE struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_ZoneAw return sub; } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_min_cluster_size(envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, struct google_protobuf_UInt64Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt64Value*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt64Value*) = value; } UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_mutable_min_cluster_size(envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena) { struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_min_cluster_size(msg); @@ -1142,7 +1186,7 @@ UPB_INLINE struct google_protobuf_UInt64Value* envoy_api_v2_Cluster_CommonLbConf return sub; } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_fail_traffic_on_panic(envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig */ @@ -1175,10 +1219,10 @@ UPB_INLINE char *envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig_s return upb_encode(msg, &envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit, arena, len); } -UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig_use_hostname_for_hashing(const envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig_use_hostname_for_hashing(const envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig_set_use_hostname_for_hashing(envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.api.v2.Cluster.RefreshRate */ @@ -1195,11 +1239,13 @@ UPB_INLINE char *envoy_api_v2_Cluster_RefreshRate_serialize(const envoy_api_v2_C return upb_encode(msg, &envoy_api_v2_Cluster_RefreshRate_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_base_interval(const envoy_api_v2_Cluster_RefreshRate *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_max_interval(const envoy_api_v2_Cluster_RefreshRate *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_Cluster_RefreshRate_has_base_interval(const envoy_api_v2_Cluster_RefreshRate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_base_interval(const envoy_api_v2_Cluster_RefreshRate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_Cluster_RefreshRate_has_max_interval(const envoy_api_v2_Cluster_RefreshRate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_max_interval(const envoy_api_v2_Cluster_RefreshRate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); } UPB_INLINE void envoy_api_v2_Cluster_RefreshRate_set_base_interval(envoy_api_v2_Cluster_RefreshRate *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_mutable_base_interval(envoy_api_v2_Cluster_RefreshRate *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_RefreshRate_base_interval(msg); @@ -1211,7 +1257,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_mut return sub; } UPB_INLINE void envoy_api_v2_Cluster_RefreshRate_set_max_interval(envoy_api_v2_Cluster_RefreshRate *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Cluster_RefreshRate_mutable_max_interval(envoy_api_v2_Cluster_RefreshRate *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Cluster_RefreshRate_max_interval(msg); @@ -1230,6 +1276,7 @@ UPB_INLINE upb_strview envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_key(co _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_has_value(const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_value(const envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry *msg) { struct google_protobuf_Struct* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -1247,6 +1294,7 @@ UPB_INLINE upb_strview envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_k _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_has_value(const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_value(const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry *msg) { struct google_protobuf_Any* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -1271,6 +1319,7 @@ UPB_INLINE char *envoy_api_v2_LoadBalancingPolicy_serialize(const envoy_api_v2_L return upb_encode(msg, &envoy_api_v2_LoadBalancingPolicy_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_LoadBalancingPolicy_has_policies(const envoy_api_v2_LoadBalancingPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_api_v2_LoadBalancingPolicy_Policy* const* envoy_api_v2_LoadBalancingPolicy_policies(const envoy_api_v2_LoadBalancingPolicy *msg, size_t *len) { return (const envoy_api_v2_LoadBalancingPolicy_Policy* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_LoadBalancingPolicy_Policy** envoy_api_v2_LoadBalancingPolicy_mutable_policies(envoy_api_v2_LoadBalancingPolicy *msg, size_t *len) { @@ -1301,15 +1350,17 @@ UPB_INLINE char *envoy_api_v2_LoadBalancingPolicy_Policy_serialize(const envoy_a return upb_encode(msg, &envoy_api_v2_LoadBalancingPolicy_Policy_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_LoadBalancingPolicy_Policy_name(const envoy_api_v2_LoadBalancingPolicy_Policy *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_LoadBalancingPolicy_Policy_config(const envoy_api_v2_LoadBalancingPolicy_Policy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_LoadBalancingPolicy_Policy_typed_config(const envoy_api_v2_LoadBalancingPolicy_Policy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview envoy_api_v2_LoadBalancingPolicy_Policy_name(const envoy_api_v2_LoadBalancingPolicy_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_LoadBalancingPolicy_Policy_has_config(const envoy_api_v2_LoadBalancingPolicy_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_LoadBalancingPolicy_Policy_config(const envoy_api_v2_LoadBalancingPolicy_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Struct*); } +UPB_INLINE bool envoy_api_v2_LoadBalancingPolicy_Policy_has_typed_config(const envoy_api_v2_LoadBalancingPolicy_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_LoadBalancingPolicy_Policy_typed_config(const envoy_api_v2_LoadBalancingPolicy_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); } UPB_INLINE void envoy_api_v2_LoadBalancingPolicy_Policy_set_name(envoy_api_v2_LoadBalancingPolicy_Policy *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_LoadBalancingPolicy_Policy_set_config(envoy_api_v2_LoadBalancingPolicy_Policy *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Struct*) = value; } UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_LoadBalancingPolicy_Policy_mutable_config(envoy_api_v2_LoadBalancingPolicy_Policy *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_LoadBalancingPolicy_Policy_config(msg); @@ -1321,7 +1372,7 @@ UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_LoadBalancingPolicy_Polic return sub; } UPB_INLINE void envoy_api_v2_LoadBalancingPolicy_Policy_set_typed_config(envoy_api_v2_LoadBalancingPolicy_Policy *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_api_v2_LoadBalancingPolicy_Policy_mutable_typed_config(envoy_api_v2_LoadBalancingPolicy_Policy *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_LoadBalancingPolicy_Policy_typed_config(msg); @@ -1347,10 +1398,11 @@ UPB_INLINE char *envoy_api_v2_UpstreamBindConfig_serialize(const envoy_api_v2_Up return upb_encode(msg, &envoy_api_v2_UpstreamBindConfig_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_UpstreamBindConfig_source_address(const envoy_api_v2_UpstreamBindConfig *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Address*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_UpstreamBindConfig_has_source_address(const envoy_api_v2_UpstreamBindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_UpstreamBindConfig_source_address(const envoy_api_v2_UpstreamBindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_Address*); } UPB_INLINE void envoy_api_v2_UpstreamBindConfig_set_source_address(envoy_api_v2_UpstreamBindConfig *msg, struct envoy_api_v2_core_Address* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Address*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_Address*) = value; } UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_UpstreamBindConfig_mutable_source_address(envoy_api_v2_UpstreamBindConfig *msg, upb_arena *arena) { struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_UpstreamBindConfig_source_address(msg); @@ -1376,10 +1428,11 @@ UPB_INLINE char *envoy_api_v2_UpstreamConnectionOptions_serialize(const envoy_ap return upb_encode(msg, &envoy_api_v2_UpstreamConnectionOptions_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_TcpKeepalive* envoy_api_v2_UpstreamConnectionOptions_tcp_keepalive(const envoy_api_v2_UpstreamConnectionOptions *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_TcpKeepalive*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_UpstreamConnectionOptions_has_tcp_keepalive(const envoy_api_v2_UpstreamConnectionOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_TcpKeepalive* envoy_api_v2_UpstreamConnectionOptions_tcp_keepalive(const envoy_api_v2_UpstreamConnectionOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_TcpKeepalive*); } UPB_INLINE void envoy_api_v2_UpstreamConnectionOptions_set_tcp_keepalive(envoy_api_v2_UpstreamConnectionOptions *msg, struct envoy_api_v2_core_TcpKeepalive* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_TcpKeepalive*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_TcpKeepalive*) = value; } UPB_INLINE struct envoy_api_v2_core_TcpKeepalive* envoy_api_v2_UpstreamConnectionOptions_mutable_tcp_keepalive(envoy_api_v2_UpstreamConnectionOptions *msg, upb_arena *arena) { struct envoy_api_v2_core_TcpKeepalive* sub = (struct envoy_api_v2_core_TcpKeepalive*)envoy_api_v2_UpstreamConnectionOptions_tcp_keepalive(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h index 67dfbcd44a1..2df0a471074 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h @@ -48,6 +48,7 @@ UPB_INLINE char *envoy_api_v2_cluster_CircuitBreakers_serialize(const envoy_api_ return upb_encode(msg, &envoy_api_v2_cluster_CircuitBreakers_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_has_thresholds(const envoy_api_v2_cluster_CircuitBreakers *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_api_v2_cluster_CircuitBreakers_Thresholds* const* envoy_api_v2_cluster_CircuitBreakers_thresholds(const envoy_api_v2_cluster_CircuitBreakers *msg, size_t *len) { return (const envoy_api_v2_cluster_CircuitBreakers_Thresholds* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_cluster_CircuitBreakers_Thresholds** envoy_api_v2_cluster_CircuitBreakers_mutable_thresholds(envoy_api_v2_cluster_CircuitBreakers *msg, size_t *len) { @@ -78,20 +79,26 @@ UPB_INLINE char *envoy_api_v2_cluster_CircuitBreakers_Thresholds_serialize(const return upb_encode(msg, &envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit, arena, len); } -UPB_INLINE int32_t envoy_api_v2_cluster_CircuitBreakers_Thresholds_priority(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connections(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(12, 16)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_pending_requests(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 24)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_requests(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 32)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_retries(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)); } -UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_track_remaining(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connection_pools(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)); } -UPB_INLINE const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget* envoy_api_v2_cluster_CircuitBreakers_Thresholds_retry_budget(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget*, UPB_SIZE(32, 56)); } +UPB_INLINE int32_t envoy_api_v2_cluster_CircuitBreakers_Thresholds_priority(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_has_max_connections(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connections(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_has_max_pending_requests(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_pending_requests(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_has_max_requests(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_requests(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_has_max_retries(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_retries(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_track_remaining(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_has_max_connection_pools(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connection_pools(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_has_retry_budget(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); } +UPB_INLINE const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget* envoy_api_v2_cluster_CircuitBreakers_Thresholds_retry_budget(const envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget*); } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_priority(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_connections(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_connections(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connections(msg); @@ -103,7 +110,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreak return sub; } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_pending_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_pending_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_pending_requests(msg); @@ -115,7 +122,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreak return sub; } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_requests(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_requests(msg); @@ -127,7 +134,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreak return sub; } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_retries(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_retries(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_retries(msg); @@ -139,10 +146,10 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreak return sub; } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_track_remaining(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_max_connection_pools(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_max_connection_pools(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_max_connection_pools(msg); @@ -154,7 +161,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreak return sub; } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_set_retry_budget(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget* value) { - UPB_FIELD_AT(msg, envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget*, UPB_SIZE(32, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 56), envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget*) = value; } UPB_INLINE struct envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget* envoy_api_v2_cluster_CircuitBreakers_Thresholds_mutable_retry_budget(envoy_api_v2_cluster_CircuitBreakers_Thresholds *msg, upb_arena *arena) { struct envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget* sub = (struct envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_retry_budget(msg); @@ -180,11 +187,13 @@ UPB_INLINE char *envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_ser return upb_encode(msg, &envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_msginit, arena, len); } -UPB_INLINE const struct envoy_type_Percent* envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_budget_percent(const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_has_budget_percent(const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_type_Percent* envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_budget_percent(const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_Percent*); } +UPB_INLINE bool envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_has_min_retry_concurrency(const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(const envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_set_budget_percent(envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg, struct envoy_type_Percent* value) { - UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_Percent*) = value; } UPB_INLINE struct envoy_type_Percent* envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_mutable_budget_percent(envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_budget_percent(msg); @@ -196,7 +205,7 @@ UPB_INLINE struct envoy_type_Percent* envoy_api_v2_cluster_CircuitBreakers_Thres return sub; } UPB_INLINE void envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_set_min_retry_concurrency(envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_mutable_min_retry_concurrency(envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h index 426ba467eb3..558a6032a77 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h @@ -40,14 +40,15 @@ UPB_INLINE char *envoy_api_v2_cluster_Filter_serialize(const envoy_api_v2_cluste return upb_encode(msg, &envoy_api_v2_cluster_Filter_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_cluster_Filter_name(const envoy_api_v2_cluster_Filter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_cluster_Filter_typed_config(const envoy_api_v2_cluster_Filter *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_cluster_Filter_name(const envoy_api_v2_cluster_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_cluster_Filter_has_typed_config(const envoy_api_v2_cluster_Filter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_cluster_Filter_typed_config(const envoy_api_v2_cluster_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Any*); } UPB_INLINE void envoy_api_v2_cluster_Filter_set_name(envoy_api_v2_cluster_Filter *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_cluster_Filter_set_typed_config(envoy_api_v2_cluster_Filter *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_api_v2_cluster_Filter_mutable_typed_config(envoy_api_v2_cluster_Filter *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_cluster_Filter_typed_config(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h index ab98c645a63..c615cdadb11 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h @@ -42,29 +42,48 @@ UPB_INLINE char *envoy_api_v2_cluster_OutlierDetection_serialize(const envoy_api return upb_encode(msg, &envoy_api_v2_cluster_OutlierDetection_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_interval(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_base_ejection_time(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 24)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(44, 88)); } -UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_split_external_local_origin_errors(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(48, 96)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(52, 104)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_local_origin_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(56, 112)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_failure_percentage_threshold(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(60, 120)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_failure_percentage(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(64, 128)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_failure_percentage_local_origin(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(68, 136)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_failure_percentage_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(72, 144)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_failure_percentage_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(76, 152)); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_interval(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_interval(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_base_ejection_time(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_base_ejection_time(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_max_ejection_percent(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_enforcing_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_enforcing_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_success_rate_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_success_rate_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_success_rate_stdev_factor(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_enforcing_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 88), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_split_external_local_origin_errors(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 96), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_enforcing_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_local_origin_failure(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 104), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_enforcing_local_origin_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 112)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_local_origin_success_rate(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 112), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_failure_percentage_threshold(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 120)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_failure_percentage_threshold(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 120), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_enforcing_failure_percentage(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 128)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_failure_percentage(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 128), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_enforcing_failure_percentage_local_origin(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 136)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_enforcing_failure_percentage_local_origin(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 136), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_failure_percentage_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 144)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_failure_percentage_minimum_hosts(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 144), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_cluster_OutlierDetection_has_failure_percentage_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 152)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_failure_percentage_request_volume(const envoy_api_v2_cluster_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 152), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_5xx(msg); @@ -76,7 +95,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_interval(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_mutable_interval(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_cluster_OutlierDetection_interval(msg); @@ -88,7 +107,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetectio return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_base_ejection_time(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetection_mutable_base_ejection_time(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_cluster_OutlierDetection_base_ejection_time(msg); @@ -100,7 +119,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_cluster_OutlierDetectio return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_max_ejection_percent(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_max_ejection_percent(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_max_ejection_percent(msg); @@ -112,7 +131,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_5xx(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_5xx(msg); @@ -124,7 +143,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_success_rate(msg); @@ -136,7 +155,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_minimum_hosts(msg); @@ -148,7 +167,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_request_volume(msg); @@ -160,7 +179,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_success_rate_stdev_factor(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 72), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_success_rate_stdev_factor(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_success_rate_stdev_factor(msg); @@ -172,7 +191,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(40, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 80), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_gateway_failure(msg); @@ -184,7 +203,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(44, 88)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 88), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_gateway_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_gateway_failure(msg); @@ -196,10 +215,10 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_split_external_local_origin_errors(envoy_api_v2_cluster_OutlierDetection *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(48, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 96), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_consecutive_local_origin_failure(msg); @@ -211,7 +230,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(52, 104)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 104), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_consecutive_local_origin_failure(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_consecutive_local_origin_failure(msg); @@ -223,7 +242,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_local_origin_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(56, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 112), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_local_origin_success_rate(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_local_origin_success_rate(msg); @@ -235,7 +254,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_threshold(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(60, 120)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 120), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_failure_percentage_threshold(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_failure_percentage_threshold(msg); @@ -247,7 +266,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_failure_percentage(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(64, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 128), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_failure_percentage(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_failure_percentage(msg); @@ -259,7 +278,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_enforcing_failure_percentage_local_origin(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(68, 136)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 136), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_enforcing_failure_percentage_local_origin(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_enforcing_failure_percentage_local_origin(msg); @@ -271,7 +290,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(72, 144)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(72, 144), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_failure_percentage_minimum_hosts(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_failure_percentage_minimum_hosts(msg); @@ -283,7 +302,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetec return sub; } UPB_INLINE void envoy_api_v2_cluster_OutlierDetection_set_failure_percentage_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(76, 152)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(76, 152), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_cluster_OutlierDetection_mutable_failure_percentage_request_volume(envoy_api_v2_cluster_OutlierDetection *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_cluster_OutlierDetection_failure_percentage_request_volume(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c index 7e9fae2e5b8..d02c20ca972 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c @@ -31,8 +31,8 @@ const upb_msglayout envoy_api_v2_core_Pipe_msginit = { static const upb_msglayout_field envoy_api_v2_core_SocketAddress__fields[6] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, {2, UPB_SIZE(12, 16), 0, 0, 9, 1}, - {3, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 13, 1}, - {4, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 9, 1}, + {3, UPB_SIZE(28, 48), UPB_SIZE(-36, -64), 0, 13, 1}, + {4, UPB_SIZE(28, 48), UPB_SIZE(-36, -64), 0, 9, 1}, {5, UPB_SIZE(20, 32), 0, 0, 9, 1}, {6, UPB_SIZE(8, 8), 0, 0, 8, 1}, }; @@ -83,8 +83,8 @@ static const upb_msglayout *const envoy_api_v2_core_Address_submsgs[2] = { }; static const upb_msglayout_field envoy_api_v2_core_Address__fields[2] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_Address_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h index 079b39b7074..cd84e98d3a5 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h @@ -64,14 +64,14 @@ UPB_INLINE char *envoy_api_v2_core_Pipe_serialize(const envoy_api_v2_core_Pipe * return upb_encode(msg, &envoy_api_v2_core_Pipe_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_Pipe_path(const envoy_api_v2_core_Pipe *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } -UPB_INLINE uint32_t envoy_api_v2_core_Pipe_mode(const envoy_api_v2_core_Pipe *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_Pipe_path(const envoy_api_v2_core_Pipe *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE uint32_t envoy_api_v2_core_Pipe_mode(const envoy_api_v2_core_Pipe *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } UPB_INLINE void envoy_api_v2_core_Pipe_set_path(envoy_api_v2_core_Pipe *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Pipe_set_mode(envoy_api_v2_core_Pipe *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } /* envoy.api.v2.core.SocketAddress */ @@ -93,22 +93,22 @@ typedef enum { envoy_api_v2_core_SocketAddress_port_specifier_named_port = 4, envoy_api_v2_core_SocketAddress_port_specifier_NOT_SET = 0 } envoy_api_v2_core_SocketAddress_port_specifier_oneofcases; -UPB_INLINE envoy_api_v2_core_SocketAddress_port_specifier_oneofcases envoy_api_v2_core_SocketAddress_port_specifier_case(const envoy_api_v2_core_SocketAddress* msg) { return (envoy_api_v2_core_SocketAddress_port_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(36, 64)); } +UPB_INLINE envoy_api_v2_core_SocketAddress_port_specifier_oneofcases envoy_api_v2_core_SocketAddress_port_specifier_case(const envoy_api_v2_core_SocketAddress* msg) { return (envoy_api_v2_core_SocketAddress_port_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 64), int32_t); } -UPB_INLINE int32_t envoy_api_v2_core_SocketAddress_protocol(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_address(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } +UPB_INLINE int32_t envoy_api_v2_core_SocketAddress_protocol(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_address(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_port_value(const envoy_api_v2_core_SocketAddress *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 64), 3); } UPB_INLINE uint32_t envoy_api_v2_core_SocketAddress_port_value(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 3, 0); } UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_named_port(const envoy_api_v2_core_SocketAddress *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 64), 4); } UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_named_port(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 4, upb_strview_make("", strlen(""))); } -UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_resolver_name(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 32)); } -UPB_INLINE bool envoy_api_v2_core_SocketAddress_ipv4_compat(const envoy_api_v2_core_SocketAddress *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } +UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_resolver_name(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_SocketAddress_ipv4_compat(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } UPB_INLINE void envoy_api_v2_core_SocketAddress_set_protocol(envoy_api_v2_core_SocketAddress *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_api_v2_core_SocketAddress_set_address(envoy_api_v2_core_SocketAddress *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_SocketAddress_set_port_value(envoy_api_v2_core_SocketAddress *msg, uint32_t value) { UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 3); @@ -117,10 +117,10 @@ UPB_INLINE void envoy_api_v2_core_SocketAddress_set_named_port(envoy_api_v2_core UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 4); } UPB_INLINE void envoy_api_v2_core_SocketAddress_set_resolver_name(envoy_api_v2_core_SocketAddress *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_SocketAddress_set_ipv4_compat(envoy_api_v2_core_SocketAddress *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } /* envoy.api.v2.core.TcpKeepalive */ @@ -137,12 +137,15 @@ UPB_INLINE char *envoy_api_v2_core_TcpKeepalive_serialize(const envoy_api_v2_cor return upb_encode(msg, &envoy_api_v2_core_TcpKeepalive_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_probes(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_time(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_interval(const envoy_api_v2_core_TcpKeepalive *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_core_TcpKeepalive_has_keepalive_probes(const envoy_api_v2_core_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_probes(const envoy_api_v2_core_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_TcpKeepalive_has_keepalive_time(const envoy_api_v2_core_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_time(const envoy_api_v2_core_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_TcpKeepalive_has_keepalive_interval(const envoy_api_v2_core_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_keepalive_interval(const envoy_api_v2_core_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_probes(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_probes(msg); @@ -154,7 +157,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mu return sub; } UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_time(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_time(msg); @@ -166,7 +169,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mu return sub; } UPB_INLINE void envoy_api_v2_core_TcpKeepalive_set_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_TcpKeepalive_mutable_keepalive_interval(envoy_api_v2_core_TcpKeepalive *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_TcpKeepalive_keepalive_interval(msg); @@ -192,12 +195,15 @@ UPB_INLINE char *envoy_api_v2_core_BindConfig_serialize(const envoy_api_v2_core_ return upb_encode(msg, &envoy_api_v2_core_BindConfig_msginit, arena, len); } -UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_source_address(const envoy_api_v2_core_BindConfig *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_freebind(const envoy_api_v2_core_BindConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_core_BindConfig_has_source_address(const envoy_api_v2_core_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_source_address(const envoy_api_v2_core_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_api_v2_core_SocketAddress*); } +UPB_INLINE bool envoy_api_v2_core_BindConfig_has_freebind(const envoy_api_v2_core_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_freebind(const envoy_api_v2_core_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_core_BindConfig_has_socket_options(const envoy_api_v2_core_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct envoy_api_v2_core_SocketOption* const* envoy_api_v2_core_BindConfig_socket_options(const envoy_api_v2_core_BindConfig *msg, size_t *len) { return (const struct envoy_api_v2_core_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE void envoy_api_v2_core_BindConfig_set_source_address(envoy_api_v2_core_BindConfig *msg, envoy_api_v2_core_SocketAddress* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_api_v2_core_SocketAddress*) = value; } UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_mutable_source_address(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) { struct envoy_api_v2_core_SocketAddress* sub = (struct envoy_api_v2_core_SocketAddress*)envoy_api_v2_core_BindConfig_source_address(msg); @@ -209,7 +215,7 @@ UPB_INLINE struct envoy_api_v2_core_SocketAddress* envoy_api_v2_core_BindConfig_ return sub; } UPB_INLINE void envoy_api_v2_core_BindConfig_set_freebind(envoy_api_v2_core_BindConfig *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_BindConfig_mutable_freebind(envoy_api_v2_core_BindConfig *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_BindConfig_freebind(msg); @@ -253,7 +259,7 @@ typedef enum { envoy_api_v2_core_Address_address_pipe = 2, envoy_api_v2_core_Address_address_NOT_SET = 0 } envoy_api_v2_core_Address_address_oneofcases; -UPB_INLINE envoy_api_v2_core_Address_address_oneofcases envoy_api_v2_core_Address_address_case(const envoy_api_v2_core_Address* msg) { return (envoy_api_v2_core_Address_address_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_api_v2_core_Address_address_oneofcases envoy_api_v2_core_Address_address_case(const envoy_api_v2_core_Address* msg) { return (envoy_api_v2_core_Address_address_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_api_v2_core_Address_has_socket_address(const envoy_api_v2_core_Address *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_socket_address(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -299,14 +305,15 @@ UPB_INLINE char *envoy_api_v2_core_CidrRange_serialize(const envoy_api_v2_core_C return upb_encode(msg, &envoy_api_v2_core_CidrRange_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_CidrRange_address_prefix(const envoy_api_v2_core_CidrRange *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_prefix_len(const envoy_api_v2_core_CidrRange *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_core_CidrRange_address_prefix(const envoy_api_v2_core_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_CidrRange_has_prefix_len(const envoy_api_v2_core_CidrRange *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_prefix_len(const envoy_api_v2_core_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_core_CidrRange_set_address_prefix(envoy_api_v2_core_CidrRange *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_CidrRange_set_prefix_len(envoy_api_v2_core_CidrRange *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_CidrRange_mutable_prefix_len(envoy_api_v2_core_CidrRange *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_CidrRange_prefix_len(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h index 61708ef1b4e..166eddca4ac 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h @@ -40,11 +40,13 @@ UPB_INLINE char *envoy_api_v2_core_BackoffStrategy_serialize(const envoy_api_v2_ return upb_encode(msg, &envoy_api_v2_core_BackoffStrategy_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_BackoffStrategy_base_interval(const envoy_api_v2_core_BackoffStrategy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_BackoffStrategy_max_interval(const envoy_api_v2_core_BackoffStrategy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_core_BackoffStrategy_has_base_interval(const envoy_api_v2_core_BackoffStrategy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_BackoffStrategy_base_interval(const envoy_api_v2_core_BackoffStrategy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_BackoffStrategy_has_max_interval(const envoy_api_v2_core_BackoffStrategy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_BackoffStrategy_max_interval(const envoy_api_v2_core_BackoffStrategy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); } UPB_INLINE void envoy_api_v2_core_BackoffStrategy_set_base_interval(envoy_api_v2_core_BackoffStrategy *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_BackoffStrategy_mutable_base_interval(envoy_api_v2_core_BackoffStrategy *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_BackoffStrategy_base_interval(msg); @@ -56,7 +58,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_BackoffStrategy_mu return sub; } UPB_INLINE void envoy_api_v2_core_BackoffStrategy_set_max_interval(envoy_api_v2_core_BackoffStrategy *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_BackoffStrategy_mutable_max_interval(envoy_api_v2_core_BackoffStrategy *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_BackoffStrategy_max_interval(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c index 41d43a7ccb8..224418d653d 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c @@ -86,8 +86,8 @@ static const upb_msglayout_field envoy_api_v2_core_Node__fields[11] = { {4, UPB_SIZE(36, 72), 0, 3, 11, 1}, {5, UPB_SIZE(16, 32), 0, 0, 9, 1}, {6, UPB_SIZE(24, 48), 0, 0, 9, 1}, - {7, UPB_SIZE(52, 104), UPB_SIZE(-61, -121), 0, 9, 1}, - {8, UPB_SIZE(52, 104), UPB_SIZE(-61, -121), 1, 11, 1}, + {7, UPB_SIZE(52, 104), UPB_SIZE(-60, -120), 0, 9, 1}, + {8, UPB_SIZE(52, 104), UPB_SIZE(-60, -120), 1, 11, 1}, {9, UPB_SIZE(40, 80), 0, 2, 11, 3}, {10, UPB_SIZE(44, 88), 0, 0, 9, 3}, {11, UPB_SIZE(48, 96), 0, 0, 11, 3}, @@ -104,7 +104,7 @@ static const upb_msglayout *const envoy_api_v2_core_Metadata_submsgs[1] = { }; static const upb_msglayout_field envoy_api_v2_core_Metadata__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 4}, + {1, UPB_SIZE(0, 0), 0, 0, 11, _UPB_LABEL_MAP}, }; const upb_msglayout envoy_api_v2_core_Metadata_msginit = { @@ -207,9 +207,9 @@ const upb_msglayout envoy_api_v2_core_HeaderMap_msginit = { }; static const upb_msglayout_field envoy_api_v2_core_DataSource__fields[3] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 12, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 12, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, }; const upb_msglayout envoy_api_v2_core_DataSource_msginit = { @@ -257,8 +257,8 @@ static const upb_msglayout *const envoy_api_v2_core_AsyncDataSource_submsgs[2] = }; static const upb_msglayout_field envoy_api_v2_core_AsyncDataSource__fields[2] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, }; const upb_msglayout envoy_api_v2_core_AsyncDataSource_msginit = { @@ -274,8 +274,8 @@ static const upb_msglayout *const envoy_api_v2_core_TransportSocket_submsgs[2] = static const upb_msglayout_field envoy_api_v2_core_TransportSocket__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_TransportSocket_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h index b9463ada5ac..a7f01d8d825 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h @@ -137,18 +137,18 @@ UPB_INLINE char *envoy_api_v2_core_Locality_serialize(const envoy_api_v2_core_Lo return upb_encode(msg, &envoy_api_v2_core_Locality_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_Locality_region(const envoy_api_v2_core_Locality *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_Locality_zone(const envoy_api_v2_core_Locality *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_core_Locality_sub_zone(const envoy_api_v2_core_Locality *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } +UPB_INLINE upb_strview envoy_api_v2_core_Locality_region(const envoy_api_v2_core_Locality *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_Locality_zone(const envoy_api_v2_core_Locality *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_Locality_sub_zone(const envoy_api_v2_core_Locality *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } UPB_INLINE void envoy_api_v2_core_Locality_set_region(envoy_api_v2_core_Locality *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Locality_set_zone(envoy_api_v2_core_Locality *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Locality_set_sub_zone(envoy_api_v2_core_Locality *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value; } /* envoy.api.v2.core.BuildVersion */ @@ -165,11 +165,13 @@ UPB_INLINE char *envoy_api_v2_core_BuildVersion_serialize(const envoy_api_v2_cor return upb_encode(msg, &envoy_api_v2_core_BuildVersion_msginit, arena, len); } -UPB_INLINE const struct envoy_type_SemanticVersion* envoy_api_v2_core_BuildVersion_version(const envoy_api_v2_core_BuildVersion *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_SemanticVersion*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_BuildVersion_metadata(const envoy_api_v2_core_BuildVersion *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_core_BuildVersion_has_version(const envoy_api_v2_core_BuildVersion *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_type_SemanticVersion* envoy_api_v2_core_BuildVersion_version(const envoy_api_v2_core_BuildVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_SemanticVersion*); } +UPB_INLINE bool envoy_api_v2_core_BuildVersion_has_metadata(const envoy_api_v2_core_BuildVersion *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_BuildVersion_metadata(const envoy_api_v2_core_BuildVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Struct*); } UPB_INLINE void envoy_api_v2_core_BuildVersion_set_version(envoy_api_v2_core_BuildVersion *msg, struct envoy_type_SemanticVersion* value) { - UPB_FIELD_AT(msg, struct envoy_type_SemanticVersion*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_SemanticVersion*) = value; } UPB_INLINE struct envoy_type_SemanticVersion* envoy_api_v2_core_BuildVersion_mutable_version(envoy_api_v2_core_BuildVersion *msg, upb_arena *arena) { struct envoy_type_SemanticVersion* sub = (struct envoy_type_SemanticVersion*)envoy_api_v2_core_BuildVersion_version(msg); @@ -181,7 +183,7 @@ UPB_INLINE struct envoy_type_SemanticVersion* envoy_api_v2_core_BuildVersion_mut return sub; } UPB_INLINE void envoy_api_v2_core_BuildVersion_set_metadata(envoy_api_v2_core_BuildVersion *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Struct*) = value; } UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_BuildVersion_mutable_metadata(envoy_api_v2_core_BuildVersion *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_BuildVersion_metadata(msg); @@ -207,23 +209,24 @@ UPB_INLINE char *envoy_api_v2_core_Extension_serialize(const envoy_api_v2_core_E return upb_encode(msg, &envoy_api_v2_core_Extension_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_Extension_name(const envoy_api_v2_core_Extension *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } -UPB_INLINE upb_strview envoy_api_v2_core_Extension_category(const envoy_api_v2_core_Extension *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } -UPB_INLINE upb_strview envoy_api_v2_core_Extension_type_descriptor(const envoy_api_v2_core_Extension *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); } -UPB_INLINE const envoy_api_v2_core_BuildVersion* envoy_api_v2_core_Extension_version(const envoy_api_v2_core_Extension *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_BuildVersion*, UPB_SIZE(28, 56)); } -UPB_INLINE bool envoy_api_v2_core_Extension_disabled(const envoy_api_v2_core_Extension *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_Extension_name(const envoy_api_v2_core_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_Extension_category(const envoy_api_v2_core_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_Extension_type_descriptor(const envoy_api_v2_core_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_Extension_has_version(const envoy_api_v2_core_Extension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } +UPB_INLINE const envoy_api_v2_core_BuildVersion* envoy_api_v2_core_Extension_version(const envoy_api_v2_core_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const envoy_api_v2_core_BuildVersion*); } +UPB_INLINE bool envoy_api_v2_core_Extension_disabled(const envoy_api_v2_core_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_api_v2_core_Extension_set_name(envoy_api_v2_core_Extension *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Extension_set_category(envoy_api_v2_core_Extension *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Extension_set_type_descriptor(envoy_api_v2_core_Extension *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Extension_set_version(envoy_api_v2_core_Extension *msg, envoy_api_v2_core_BuildVersion* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_BuildVersion*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), envoy_api_v2_core_BuildVersion*) = value; } UPB_INLINE struct envoy_api_v2_core_BuildVersion* envoy_api_v2_core_Extension_mutable_version(envoy_api_v2_core_Extension *msg, upb_arena *arena) { struct envoy_api_v2_core_BuildVersion* sub = (struct envoy_api_v2_core_BuildVersion*)envoy_api_v2_core_Extension_version(msg); @@ -235,7 +238,7 @@ UPB_INLINE struct envoy_api_v2_core_BuildVersion* envoy_api_v2_core_Extension_mu return sub; } UPB_INLINE void envoy_api_v2_core_Extension_set_disabled(envoy_api_v2_core_Extension *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.api.v2.core.Node */ @@ -257,30 +260,34 @@ typedef enum { envoy_api_v2_core_Node_user_agent_version_type_user_agent_build_version = 8, envoy_api_v2_core_Node_user_agent_version_type_NOT_SET = 0 } envoy_api_v2_core_Node_user_agent_version_type_oneofcases; -UPB_INLINE envoy_api_v2_core_Node_user_agent_version_type_oneofcases envoy_api_v2_core_Node_user_agent_version_type_case(const envoy_api_v2_core_Node* msg) { return (envoy_api_v2_core_Node_user_agent_version_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(60, 120)); } - -UPB_INLINE upb_strview envoy_api_v2_core_Node_id(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_Node_cluster(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_Node_metadata(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(32, 64)); } -UPB_INLINE const envoy_api_v2_core_Locality* envoy_api_v2_core_Node_locality(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_Locality*, UPB_SIZE(36, 72)); } -UPB_INLINE upb_strview envoy_api_v2_core_Node_build_version(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } -UPB_INLINE upb_strview envoy_api_v2_core_Node_user_agent_name(const envoy_api_v2_core_Node *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 48)); } +UPB_INLINE envoy_api_v2_core_Node_user_agent_version_type_oneofcases envoy_api_v2_core_Node_user_agent_version_type_case(const envoy_api_v2_core_Node* msg) { return (envoy_api_v2_core_Node_user_agent_version_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(60, 120), int32_t); } + +UPB_INLINE upb_strview envoy_api_v2_core_Node_id(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_Node_cluster(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_Node_has_metadata(const envoy_api_v2_core_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_Node_metadata(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_Struct*); } +UPB_INLINE bool envoy_api_v2_core_Node_has_locality(const envoy_api_v2_core_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } +UPB_INLINE const envoy_api_v2_core_Locality* envoy_api_v2_core_Node_locality(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const envoy_api_v2_core_Locality*); } +UPB_INLINE upb_strview envoy_api_v2_core_Node_build_version(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_Node_user_agent_name(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview); } UPB_INLINE bool envoy_api_v2_core_Node_has_user_agent_version(const envoy_api_v2_core_Node *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(60, 120), 7); } UPB_INLINE upb_strview envoy_api_v2_core_Node_user_agent_version(const envoy_api_v2_core_Node *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(52, 104), UPB_SIZE(60, 120), 7, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_core_Node_has_user_agent_build_version(const envoy_api_v2_core_Node *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(60, 120), 8); } UPB_INLINE const envoy_api_v2_core_BuildVersion* envoy_api_v2_core_Node_user_agent_build_version(const envoy_api_v2_core_Node *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_BuildVersion*, UPB_SIZE(52, 104), UPB_SIZE(60, 120), 8, NULL); } +UPB_INLINE bool envoy_api_v2_core_Node_has_extensions(const envoy_api_v2_core_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } UPB_INLINE const envoy_api_v2_core_Extension* const* envoy_api_v2_core_Node_extensions(const envoy_api_v2_core_Node *msg, size_t *len) { return (const envoy_api_v2_core_Extension* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE upb_strview const* envoy_api_v2_core_Node_client_features(const envoy_api_v2_core_Node *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } +UPB_INLINE bool envoy_api_v2_core_Node_has_listening_addresses(const envoy_api_v2_core_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); } UPB_INLINE const struct envoy_api_v2_core_Address* const* envoy_api_v2_core_Node_listening_addresses(const envoy_api_v2_core_Node *msg, size_t *len) { return (const struct envoy_api_v2_core_Address* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); } UPB_INLINE void envoy_api_v2_core_Node_set_id(envoy_api_v2_core_Node *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Node_set_cluster(envoy_api_v2_core_Node *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Node_set_metadata(envoy_api_v2_core_Node *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(32, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_Struct*) = value; } UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_Node_mutable_metadata(envoy_api_v2_core_Node *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_Node_metadata(msg); @@ -292,7 +299,7 @@ UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_Node_mutable_metadat return sub; } UPB_INLINE void envoy_api_v2_core_Node_set_locality(envoy_api_v2_core_Node *msg, envoy_api_v2_core_Locality* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_Locality*, UPB_SIZE(36, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 72), envoy_api_v2_core_Locality*) = value; } UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_core_Node_mutable_locality(envoy_api_v2_core_Node *msg, upb_arena *arena) { struct envoy_api_v2_core_Locality* sub = (struct envoy_api_v2_core_Locality*)envoy_api_v2_core_Node_locality(msg); @@ -304,10 +311,10 @@ UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_core_Node_mutable_loc return sub; } UPB_INLINE void envoy_api_v2_core_Node_set_build_version(envoy_api_v2_core_Node *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Node_set_user_agent_name(envoy_api_v2_core_Node *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Node_set_user_agent_version(envoy_api_v2_core_Node *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(52, 104), value, UPB_SIZE(60, 120), 7); @@ -375,6 +382,7 @@ UPB_INLINE char *envoy_api_v2_core_Metadata_serialize(const envoy_api_v2_core_Me return upb_encode(msg, &envoy_api_v2_core_Metadata_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_core_Metadata_has_filter_metadata(const envoy_api_v2_core_Metadata *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE size_t envoy_api_v2_core_Metadata_filter_metadata_size(const envoy_api_v2_core_Metadata *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); } UPB_INLINE bool envoy_api_v2_core_Metadata_filter_metadata_get(const envoy_api_v2_core_Metadata *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_core_Metadata_FilterMetadataEntry* envoy_api_v2_core_Metadata_filter_metadata_next(const envoy_api_v2_core_Metadata *msg, size_t* iter) { return (const envoy_api_v2_core_Metadata_FilterMetadataEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } @@ -391,6 +399,7 @@ UPB_INLINE upb_strview envoy_api_v2_core_Metadata_FilterMetadataEntry_key(const _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_core_Metadata_FilterMetadataEntry_has_value(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_Metadata_FilterMetadataEntry_value(const envoy_api_v2_core_Metadata_FilterMetadataEntry *msg) { struct google_protobuf_Struct* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -415,14 +424,14 @@ UPB_INLINE char *envoy_api_v2_core_RuntimeUInt32_serialize(const envoy_api_v2_co return upb_encode(msg, &envoy_api_v2_core_RuntimeUInt32_msginit, arena, len); } -UPB_INLINE uint32_t envoy_api_v2_core_RuntimeUInt32_default_value(const envoy_api_v2_core_RuntimeUInt32 *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_RuntimeUInt32_runtime_key(const envoy_api_v2_core_RuntimeUInt32 *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE uint32_t envoy_api_v2_core_RuntimeUInt32_default_value(const envoy_api_v2_core_RuntimeUInt32 *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE upb_strview envoy_api_v2_core_RuntimeUInt32_runtime_key(const envoy_api_v2_core_RuntimeUInt32 *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE void envoy_api_v2_core_RuntimeUInt32_set_default_value(envoy_api_v2_core_RuntimeUInt32 *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void envoy_api_v2_core_RuntimeUInt32_set_runtime_key(envoy_api_v2_core_RuntimeUInt32 *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } /* envoy.api.v2.core.RuntimeDouble */ @@ -439,14 +448,14 @@ UPB_INLINE char *envoy_api_v2_core_RuntimeDouble_serialize(const envoy_api_v2_co return upb_encode(msg, &envoy_api_v2_core_RuntimeDouble_msginit, arena, len); } -UPB_INLINE double envoy_api_v2_core_RuntimeDouble_default_value(const envoy_api_v2_core_RuntimeDouble *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_RuntimeDouble_runtime_key(const envoy_api_v2_core_RuntimeDouble *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } +UPB_INLINE double envoy_api_v2_core_RuntimeDouble_default_value(const envoy_api_v2_core_RuntimeDouble *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); } +UPB_INLINE upb_strview envoy_api_v2_core_RuntimeDouble_runtime_key(const envoy_api_v2_core_RuntimeDouble *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } UPB_INLINE void envoy_api_v2_core_RuntimeDouble_set_default_value(envoy_api_v2_core_RuntimeDouble *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value; } UPB_INLINE void envoy_api_v2_core_RuntimeDouble_set_runtime_key(envoy_api_v2_core_RuntimeDouble *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } /* envoy.api.v2.core.RuntimeFeatureFlag */ @@ -463,11 +472,12 @@ UPB_INLINE char *envoy_api_v2_core_RuntimeFeatureFlag_serialize(const envoy_api_ return upb_encode(msg, &envoy_api_v2_core_RuntimeFeatureFlag_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_RuntimeFeatureFlag_default_value(const envoy_api_v2_core_RuntimeFeatureFlag *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_core_RuntimeFeatureFlag_runtime_key(const envoy_api_v2_core_RuntimeFeatureFlag *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_RuntimeFeatureFlag_has_default_value(const envoy_api_v2_core_RuntimeFeatureFlag *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_RuntimeFeatureFlag_default_value(const envoy_api_v2_core_RuntimeFeatureFlag *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); } +UPB_INLINE upb_strview envoy_api_v2_core_RuntimeFeatureFlag_runtime_key(const envoy_api_v2_core_RuntimeFeatureFlag *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_core_RuntimeFeatureFlag_set_default_value(envoy_api_v2_core_RuntimeFeatureFlag *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_RuntimeFeatureFlag_mutable_default_value(envoy_api_v2_core_RuntimeFeatureFlag *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_RuntimeFeatureFlag_default_value(msg); @@ -479,7 +489,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_RuntimeFeatureFla return sub; } UPB_INLINE void envoy_api_v2_core_RuntimeFeatureFlag_set_runtime_key(envoy_api_v2_core_RuntimeFeatureFlag *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.core.HeaderValue */ @@ -496,14 +506,14 @@ UPB_INLINE char *envoy_api_v2_core_HeaderValue_serialize(const envoy_api_v2_core return upb_encode(msg, &envoy_api_v2_core_HeaderValue_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_HeaderValue_key(const envoy_api_v2_core_HeaderValue *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_HeaderValue_value(const envoy_api_v2_core_HeaderValue *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_core_HeaderValue_key(const envoy_api_v2_core_HeaderValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_HeaderValue_value(const envoy_api_v2_core_HeaderValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void envoy_api_v2_core_HeaderValue_set_key(envoy_api_v2_core_HeaderValue *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_HeaderValue_set_value(envoy_api_v2_core_HeaderValue *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* envoy.api.v2.core.HeaderValueOption */ @@ -520,11 +530,13 @@ UPB_INLINE char *envoy_api_v2_core_HeaderValueOption_serialize(const envoy_api_v return upb_encode(msg, &envoy_api_v2_core_HeaderValueOption_msginit, arena, len); } -UPB_INLINE const envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderValueOption_header(const envoy_api_v2_core_HeaderValueOption *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HeaderValue*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_HeaderValueOption_append(const envoy_api_v2_core_HeaderValueOption *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_core_HeaderValueOption_has_header(const envoy_api_v2_core_HeaderValueOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderValueOption_header(const envoy_api_v2_core_HeaderValueOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_api_v2_core_HeaderValue*); } +UPB_INLINE bool envoy_api_v2_core_HeaderValueOption_has_append(const envoy_api_v2_core_HeaderValueOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_HeaderValueOption_append(const envoy_api_v2_core_HeaderValueOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); } UPB_INLINE void envoy_api_v2_core_HeaderValueOption_set_header(envoy_api_v2_core_HeaderValueOption *msg, envoy_api_v2_core_HeaderValue* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_HeaderValue*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_api_v2_core_HeaderValue*) = value; } UPB_INLINE struct envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderValueOption_mutable_header(envoy_api_v2_core_HeaderValueOption *msg, upb_arena *arena) { struct envoy_api_v2_core_HeaderValue* sub = (struct envoy_api_v2_core_HeaderValue*)envoy_api_v2_core_HeaderValueOption_header(msg); @@ -536,7 +548,7 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValue* envoy_api_v2_core_HeaderValueOp return sub; } UPB_INLINE void envoy_api_v2_core_HeaderValueOption_set_append(envoy_api_v2_core_HeaderValueOption *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_HeaderValueOption_mutable_append(envoy_api_v2_core_HeaderValueOption *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_HeaderValueOption_append(msg); @@ -562,6 +574,7 @@ UPB_INLINE char *envoy_api_v2_core_HeaderMap_serialize(const envoy_api_v2_core_H return upb_encode(msg, &envoy_api_v2_core_HeaderMap_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_core_HeaderMap_has_headers(const envoy_api_v2_core_HeaderMap *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_api_v2_core_HeaderValue* const* envoy_api_v2_core_HeaderMap_headers(const envoy_api_v2_core_HeaderMap *msg, size_t *len) { return (const envoy_api_v2_core_HeaderValue* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_core_HeaderValue** envoy_api_v2_core_HeaderMap_mutable_headers(envoy_api_v2_core_HeaderMap *msg, size_t *len) { @@ -598,7 +611,7 @@ typedef enum { envoy_api_v2_core_DataSource_specifier_inline_string = 3, envoy_api_v2_core_DataSource_specifier_NOT_SET = 0 } envoy_api_v2_core_DataSource_specifier_oneofcases; -UPB_INLINE envoy_api_v2_core_DataSource_specifier_oneofcases envoy_api_v2_core_DataSource_specifier_case(const envoy_api_v2_core_DataSource* msg) { return (envoy_api_v2_core_DataSource_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } +UPB_INLINE envoy_api_v2_core_DataSource_specifier_oneofcases envoy_api_v2_core_DataSource_specifier_case(const envoy_api_v2_core_DataSource* msg) { return (envoy_api_v2_core_DataSource_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } UPB_INLINE bool envoy_api_v2_core_DataSource_has_filename(const envoy_api_v2_core_DataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } UPB_INLINE upb_strview envoy_api_v2_core_DataSource_filename(const envoy_api_v2_core_DataSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } @@ -631,11 +644,13 @@ UPB_INLINE char *envoy_api_v2_core_RetryPolicy_serialize(const envoy_api_v2_core return upb_encode(msg, &envoy_api_v2_core_RetryPolicy_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_BackoffStrategy* envoy_api_v2_core_RetryPolicy_retry_back_off(const envoy_api_v2_core_RetryPolicy *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_BackoffStrategy*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_RetryPolicy_num_retries(const envoy_api_v2_core_RetryPolicy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_core_RetryPolicy_has_retry_back_off(const envoy_api_v2_core_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_BackoffStrategy* envoy_api_v2_core_RetryPolicy_retry_back_off(const envoy_api_v2_core_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_BackoffStrategy*); } +UPB_INLINE bool envoy_api_v2_core_RetryPolicy_has_num_retries(const envoy_api_v2_core_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_RetryPolicy_num_retries(const envoy_api_v2_core_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_core_RetryPolicy_set_retry_back_off(envoy_api_v2_core_RetryPolicy *msg, struct envoy_api_v2_core_BackoffStrategy* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_BackoffStrategy*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_BackoffStrategy*) = value; } UPB_INLINE struct envoy_api_v2_core_BackoffStrategy* envoy_api_v2_core_RetryPolicy_mutable_retry_back_off(envoy_api_v2_core_RetryPolicy *msg, upb_arena *arena) { struct envoy_api_v2_core_BackoffStrategy* sub = (struct envoy_api_v2_core_BackoffStrategy*)envoy_api_v2_core_RetryPolicy_retry_back_off(msg); @@ -647,7 +662,7 @@ UPB_INLINE struct envoy_api_v2_core_BackoffStrategy* envoy_api_v2_core_RetryPoli return sub; } UPB_INLINE void envoy_api_v2_core_RetryPolicy_set_num_retries(envoy_api_v2_core_RetryPolicy *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_RetryPolicy_mutable_num_retries(envoy_api_v2_core_RetryPolicy *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_RetryPolicy_num_retries(msg); @@ -673,12 +688,14 @@ UPB_INLINE char *envoy_api_v2_core_RemoteDataSource_serialize(const envoy_api_v2 return upb_encode(msg, &envoy_api_v2_core_RemoteDataSource_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_http_uri(const envoy_api_v2_core_RemoteDataSource *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_HttpUri*, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_core_RemoteDataSource_sha256(const envoy_api_v2_core_RemoteDataSource *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const envoy_api_v2_core_RetryPolicy* envoy_api_v2_core_RemoteDataSource_retry_policy(const envoy_api_v2_core_RemoteDataSource *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_RetryPolicy*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_api_v2_core_RemoteDataSource_has_http_uri(const envoy_api_v2_core_RemoteDataSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_http_uri(const envoy_api_v2_core_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_HttpUri*); } +UPB_INLINE upb_strview envoy_api_v2_core_RemoteDataSource_sha256(const envoy_api_v2_core_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_RemoteDataSource_has_retry_policy(const envoy_api_v2_core_RemoteDataSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const envoy_api_v2_core_RetryPolicy* envoy_api_v2_core_RemoteDataSource_retry_policy(const envoy_api_v2_core_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_api_v2_core_RetryPolicy*); } UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_http_uri(envoy_api_v2_core_RemoteDataSource *msg, struct envoy_api_v2_core_HttpUri* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_HttpUri*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_api_v2_core_HttpUri*) = value; } UPB_INLINE struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_mutable_http_uri(envoy_api_v2_core_RemoteDataSource *msg, upb_arena *arena) { struct envoy_api_v2_core_HttpUri* sub = (struct envoy_api_v2_core_HttpUri*)envoy_api_v2_core_RemoteDataSource_http_uri(msg); @@ -690,10 +707,10 @@ UPB_INLINE struct envoy_api_v2_core_HttpUri* envoy_api_v2_core_RemoteDataSource_ return sub; } UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_sha256(envoy_api_v2_core_RemoteDataSource *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_RemoteDataSource_set_retry_policy(envoy_api_v2_core_RemoteDataSource *msg, envoy_api_v2_core_RetryPolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_RetryPolicy*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_api_v2_core_RetryPolicy*) = value; } UPB_INLINE struct envoy_api_v2_core_RetryPolicy* envoy_api_v2_core_RemoteDataSource_mutable_retry_policy(envoy_api_v2_core_RemoteDataSource *msg, upb_arena *arena) { struct envoy_api_v2_core_RetryPolicy* sub = (struct envoy_api_v2_core_RetryPolicy*)envoy_api_v2_core_RemoteDataSource_retry_policy(msg); @@ -724,7 +741,7 @@ typedef enum { envoy_api_v2_core_AsyncDataSource_specifier_remote = 2, envoy_api_v2_core_AsyncDataSource_specifier_NOT_SET = 0 } envoy_api_v2_core_AsyncDataSource_specifier_oneofcases; -UPB_INLINE envoy_api_v2_core_AsyncDataSource_specifier_oneofcases envoy_api_v2_core_AsyncDataSource_specifier_case(const envoy_api_v2_core_AsyncDataSource* msg) { return (envoy_api_v2_core_AsyncDataSource_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_api_v2_core_AsyncDataSource_specifier_oneofcases envoy_api_v2_core_AsyncDataSource_specifier_case(const envoy_api_v2_core_AsyncDataSource* msg) { return (envoy_api_v2_core_AsyncDataSource_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_local(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_api_v2_core_DataSource* envoy_api_v2_core_AsyncDataSource_local(const envoy_api_v2_core_AsyncDataSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -775,16 +792,16 @@ typedef enum { envoy_api_v2_core_TransportSocket_config_type_typed_config = 3, envoy_api_v2_core_TransportSocket_config_type_NOT_SET = 0 } envoy_api_v2_core_TransportSocket_config_type_oneofcases; -UPB_INLINE envoy_api_v2_core_TransportSocket_config_type_oneofcases envoy_api_v2_core_TransportSocket_config_type_case(const envoy_api_v2_core_TransportSocket* msg) { return (envoy_api_v2_core_TransportSocket_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_core_TransportSocket_config_type_oneofcases envoy_api_v2_core_TransportSocket_config_type_case(const envoy_api_v2_core_TransportSocket* msg) { return (envoy_api_v2_core_TransportSocket_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_core_TransportSocket_name(const envoy_api_v2_core_TransportSocket *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_TransportSocket_name(const envoy_api_v2_core_TransportSocket *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_core_TransportSocket_has_config(const envoy_api_v2_core_TransportSocket *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_TransportSocket_config(const envoy_api_v2_core_TransportSocket *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_core_TransportSocket_has_typed_config(const envoy_api_v2_core_TransportSocket *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_core_TransportSocket_typed_config(const envoy_api_v2_core_TransportSocket *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_core_TransportSocket_set_name(envoy_api_v2_core_TransportSocket *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_TransportSocket_set_config(envoy_api_v2_core_TransportSocket *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); @@ -825,11 +842,12 @@ UPB_INLINE char *envoy_api_v2_core_RuntimeFractionalPercent_serialize(const envo return upb_encode(msg, &envoy_api_v2_core_RuntimeFractionalPercent_msginit, arena, len); } -UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_core_RuntimeFractionalPercent_default_value(const envoy_api_v2_core_RuntimeFractionalPercent *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_core_RuntimeFractionalPercent_runtime_key(const envoy_api_v2_core_RuntimeFractionalPercent *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_RuntimeFractionalPercent_has_default_value(const envoy_api_v2_core_RuntimeFractionalPercent *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_core_RuntimeFractionalPercent_default_value(const envoy_api_v2_core_RuntimeFractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_FractionalPercent*); } +UPB_INLINE upb_strview envoy_api_v2_core_RuntimeFractionalPercent_runtime_key(const envoy_api_v2_core_RuntimeFractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_core_RuntimeFractionalPercent_set_default_value(envoy_api_v2_core_RuntimeFractionalPercent *msg, struct envoy_type_FractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_FractionalPercent*) = value; } UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_core_RuntimeFractionalPercent_mutable_default_value(envoy_api_v2_core_RuntimeFractionalPercent *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_core_RuntimeFractionalPercent_default_value(msg); @@ -841,7 +859,7 @@ UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_core_RuntimeFractio return sub; } UPB_INLINE void envoy_api_v2_core_RuntimeFractionalPercent_set_runtime_key(envoy_api_v2_core_RuntimeFractionalPercent *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.core.ControlPlane */ @@ -858,10 +876,10 @@ UPB_INLINE char *envoy_api_v2_core_ControlPlane_serialize(const envoy_api_v2_cor return upb_encode(msg, &envoy_api_v2_core_ControlPlane_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_ControlPlane_identifier(const envoy_api_v2_core_ControlPlane *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_ControlPlane_identifier(const envoy_api_v2_core_ControlPlane *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_core_ControlPlane_set_identifier(envoy_api_v2_core_ControlPlane *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c index 3f0fc4c16a2..0e186f97758 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c @@ -78,11 +78,11 @@ static const upb_msglayout *const envoy_api_v2_core_ConfigSource_submsgs[4] = { }; static const upb_msglayout_field envoy_api_v2_core_ConfigSource__fields[6] = { - {1, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 0, 9, 1}, - {2, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 1, 11, 1}, - {3, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 0, 11, 1}, + {1, UPB_SIZE(12, 16), UPB_SIZE(-20, -32), 0, 9, 1}, + {2, UPB_SIZE(12, 16), UPB_SIZE(-20, -32), 1, 11, 1}, + {3, UPB_SIZE(12, 16), UPB_SIZE(-20, -32), 0, 11, 1}, {4, UPB_SIZE(8, 8), 0, 3, 11, 1}, - {5, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 2, 11, 1}, + {5, UPB_SIZE(12, 16), UPB_SIZE(-20, -32), 2, 11, 1}, {6, UPB_SIZE(0, 0), 0, 0, 14, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h index a50f68f4710..dbde01c55b2 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h @@ -71,17 +71,21 @@ UPB_INLINE char *envoy_api_v2_core_ApiConfigSource_serialize(const envoy_api_v2_ return upb_encode(msg, &envoy_api_v2_core_ApiConfigSource_msginit, arena, len); } -UPB_INLINE int32_t envoy_api_v2_core_ApiConfigSource_api_type(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t envoy_api_v2_core_ApiConfigSource_api_type(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE upb_strview const* envoy_api_v2_core_ApiConfigSource_cluster_names(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 48), len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(20, 24)); } +UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_has_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_refresh_delay(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_has_grpc_services(const envoy_api_v2_core_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 56)); } UPB_INLINE const struct envoy_api_v2_core_GrpcService* const* envoy_api_v2_core_ApiConfigSource_grpc_services(const envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (const struct envoy_api_v2_core_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(36, 56), len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(24, 32)); } -UPB_INLINE const envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(28, 40)); } -UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_set_node_on_first_message_only(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); } -UPB_INLINE int32_t envoy_api_v2_core_ApiConfigSource_transport_api_version(const envoy_api_v2_core_ApiConfigSource *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_has_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 32)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_request_timeout(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_has_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 40)); } +UPB_INLINE const envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_rate_limit_settings(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), const envoy_api_v2_core_RateLimitSettings*); } +UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_set_node_on_first_message_only(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } +UPB_INLINE int32_t envoy_api_v2_core_ApiConfigSource_transport_api_version(const envoy_api_v2_core_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_api_type(envoy_api_v2_core_ApiConfigSource *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE upb_strview* envoy_api_v2_core_ApiConfigSource_mutable_cluster_names(envoy_api_v2_core_ApiConfigSource *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 48), len); @@ -94,7 +98,7 @@ UPB_INLINE bool envoy_api_v2_core_ApiConfigSource_add_cluster_names(envoy_api_v2 arena); } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(20, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 24), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_refresh_delay(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_refresh_delay(msg); @@ -119,7 +123,7 @@ UPB_INLINE struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_ApiConfigSour return sub; } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(24, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 32), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mutable_request_timeout(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ApiConfigSource_request_timeout(msg); @@ -131,7 +135,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ApiConfigSource_mu return sub; } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, envoy_api_v2_core_RateLimitSettings* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_RateLimitSettings*, UPB_SIZE(28, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 40), envoy_api_v2_core_RateLimitSettings*) = value; } UPB_INLINE struct envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConfigSource_mutable_rate_limit_settings(envoy_api_v2_core_ApiConfigSource *msg, upb_arena *arena) { struct envoy_api_v2_core_RateLimitSettings* sub = (struct envoy_api_v2_core_RateLimitSettings*)envoy_api_v2_core_ApiConfigSource_rate_limit_settings(msg); @@ -143,10 +147,10 @@ UPB_INLINE struct envoy_api_v2_core_RateLimitSettings* envoy_api_v2_core_ApiConf return sub; } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_set_node_on_first_message_only(envoy_api_v2_core_ApiConfigSource *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value; } UPB_INLINE void envoy_api_v2_core_ApiConfigSource_set_transport_api_version(envoy_api_v2_core_ApiConfigSource *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } /* envoy.api.v2.core.AggregatedConfigSource */ @@ -195,11 +199,13 @@ UPB_INLINE char *envoy_api_v2_core_RateLimitSettings_serialize(const envoy_api_v return upb_encode(msg, &envoy_api_v2_core_RateLimitSettings_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_RateLimitSettings_max_tokens(const envoy_api_v2_core_RateLimitSettings *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_DoubleValue* envoy_api_v2_core_RateLimitSettings_fill_rate(const envoy_api_v2_core_RateLimitSettings *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_DoubleValue*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_core_RateLimitSettings_has_max_tokens(const envoy_api_v2_core_RateLimitSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_RateLimitSettings_max_tokens(const envoy_api_v2_core_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_RateLimitSettings_has_fill_rate(const envoy_api_v2_core_RateLimitSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_DoubleValue* envoy_api_v2_core_RateLimitSettings_fill_rate(const envoy_api_v2_core_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_DoubleValue*); } UPB_INLINE void envoy_api_v2_core_RateLimitSettings_set_max_tokens(envoy_api_v2_core_RateLimitSettings *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_RateLimitSettings_mutable_max_tokens(envoy_api_v2_core_RateLimitSettings *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_RateLimitSettings_max_tokens(msg); @@ -211,7 +217,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_RateLimitSettin return sub; } UPB_INLINE void envoy_api_v2_core_RateLimitSettings_set_fill_rate(envoy_api_v2_core_RateLimitSettings *msg, struct google_protobuf_DoubleValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_DoubleValue*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_DoubleValue*) = value; } UPB_INLINE struct google_protobuf_DoubleValue* envoy_api_v2_core_RateLimitSettings_mutable_fill_rate(envoy_api_v2_core_RateLimitSettings *msg, upb_arena *arena) { struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_api_v2_core_RateLimitSettings_fill_rate(msg); @@ -244,7 +250,7 @@ typedef enum { envoy_api_v2_core_ConfigSource_config_source_specifier_self = 5, envoy_api_v2_core_ConfigSource_config_source_specifier_NOT_SET = 0 } envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases; -UPB_INLINE envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases envoy_api_v2_core_ConfigSource_config_source_specifier_case(const envoy_api_v2_core_ConfigSource* msg) { return (envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 32)); } +UPB_INLINE envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases envoy_api_v2_core_ConfigSource_config_source_specifier_case(const envoy_api_v2_core_ConfigSource* msg) { return (envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 32), int32_t); } UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_path(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 1); } UPB_INLINE upb_strview envoy_api_v2_core_ConfigSource_path(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 1, upb_strview_make("", strlen(""))); } @@ -252,10 +258,11 @@ UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_api_config_source(const envoy UPB_INLINE const envoy_api_v2_core_ApiConfigSource* envoy_api_v2_core_ConfigSource_api_config_source(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_ApiConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 2, NULL); } UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_ads(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 3); } UPB_INLINE const envoy_api_v2_core_AggregatedConfigSource* envoy_api_v2_core_ConfigSource_ads(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_AggregatedConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 3, NULL); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ConfigSource_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ConfigSource_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Duration*); } UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_self(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 5); } UPB_INLINE const envoy_api_v2_core_SelfConfigSource* envoy_api_v2_core_ConfigSource_self(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_SelfConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 5, NULL); } -UPB_INLINE int32_t envoy_api_v2_core_ConfigSource_resource_api_version(const envoy_api_v2_core_ConfigSource *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t envoy_api_v2_core_ConfigSource_resource_api_version(const envoy_api_v2_core_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void envoy_api_v2_core_ConfigSource_set_path(envoy_api_v2_core_ConfigSource *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 1); @@ -285,7 +292,7 @@ UPB_INLINE struct envoy_api_v2_core_AggregatedConfigSource* envoy_api_v2_core_Co return sub; } UPB_INLINE void envoy_api_v2_core_ConfigSource_set_initial_fetch_timeout(envoy_api_v2_core_ConfigSource *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_ConfigSource_mutable_initial_fetch_timeout(envoy_api_v2_core_ConfigSource *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_ConfigSource_initial_fetch_timeout(msg); @@ -309,7 +316,7 @@ UPB_INLINE struct envoy_api_v2_core_SelfConfigSource* envoy_api_v2_core_ConfigSo return sub; } UPB_INLINE void envoy_api_v2_core_ConfigSource_set_resource_api_version(envoy_api_v2_core_ConfigSource *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c index 5c7d8abef18..62f14929669 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c @@ -21,7 +21,7 @@ static const upb_msglayout *const envoy_api_v2_core_EventServiceConfig_submsgs[1 }; static const upb_msglayout_field envoy_api_v2_core_EventServiceConfig__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_EventServiceConfig_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h index 5129a686834..6f67fb08a54 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h @@ -44,7 +44,7 @@ typedef enum { envoy_api_v2_core_EventServiceConfig_config_source_specifier_grpc_service = 1, envoy_api_v2_core_EventServiceConfig_config_source_specifier_NOT_SET = 0 } envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases; -UPB_INLINE envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases envoy_api_v2_core_EventServiceConfig_config_source_specifier_case(const envoy_api_v2_core_EventServiceConfig* msg) { return (envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases envoy_api_v2_core_EventServiceConfig_config_source_specifier_case(const envoy_api_v2_core_EventServiceConfig* msg) { return (envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_api_v2_core_EventServiceConfig_has_grpc_service(const envoy_api_v2_core_EventServiceConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_EventServiceConfig_grpc_service(const envoy_api_v2_core_EventServiceConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_GrpcService*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c index bcf33a0744a..68c2c7bbc46 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c @@ -29,8 +29,8 @@ static const upb_msglayout *const envoy_api_v2_core_GrpcService_submsgs[4] = { }; static const upb_msglayout_field envoy_api_v2_core_GrpcService__fields[4] = { - {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {1, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, {3, UPB_SIZE(0, 0), 0, 3, 11, 1}, {5, UPB_SIZE(4, 8), 0, 2, 11, 3}, }; @@ -101,9 +101,9 @@ static const upb_msglayout *const envoy_api_v2_core_GrpcService_GoogleGrpc_Chann }; static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials__fields[3] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_msginit = { @@ -121,13 +121,13 @@ static const upb_msglayout *const envoy_api_v2_core_GrpcService_GoogleGrpc_CallC }; static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials__fields[7] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 4, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 2, 11, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 1, 11, 1}, - {7, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 3, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 4, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 2, 11, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 1, 11, 1}, + {7, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 3, 11, 1}, }; const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_msginit = { @@ -165,8 +165,8 @@ static const upb_msglayout *const envoy_api_v2_core_GrpcService_GoogleGrpc_CallC static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h index f63b7829c5f..0d12135838a 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h @@ -85,13 +85,15 @@ typedef enum { envoy_api_v2_core_GrpcService_target_specifier_google_grpc = 2, envoy_api_v2_core_GrpcService_target_specifier_NOT_SET = 0 } envoy_api_v2_core_GrpcService_target_specifier_oneofcases; -UPB_INLINE envoy_api_v2_core_GrpcService_target_specifier_oneofcases envoy_api_v2_core_GrpcService_target_specifier_case(const envoy_api_v2_core_GrpcService* msg) { return (envoy_api_v2_core_GrpcService_target_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_core_GrpcService_target_specifier_oneofcases envoy_api_v2_core_GrpcService_target_specifier_case(const envoy_api_v2_core_GrpcService* msg) { return (envoy_api_v2_core_GrpcService_target_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE bool envoy_api_v2_core_GrpcService_has_envoy_grpc(const envoy_api_v2_core_GrpcService *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } UPB_INLINE const envoy_api_v2_core_GrpcService_EnvoyGrpc* envoy_api_v2_core_GrpcService_envoy_grpc(const envoy_api_v2_core_GrpcService *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_EnvoyGrpc*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); } UPB_INLINE bool envoy_api_v2_core_GrpcService_has_google_grpc(const envoy_api_v2_core_GrpcService *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc* envoy_api_v2_core_GrpcService_google_grpc(const envoy_api_v2_core_GrpcService *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_GrpcService_timeout(const envoy_api_v2_core_GrpcService *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_has_timeout(const envoy_api_v2_core_GrpcService *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_GrpcService_timeout(const envoy_api_v2_core_GrpcService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_has_initial_metadata(const envoy_api_v2_core_GrpcService *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValue* const* envoy_api_v2_core_GrpcService_initial_metadata(const envoy_api_v2_core_GrpcService *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValue* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void envoy_api_v2_core_GrpcService_set_envoy_grpc(envoy_api_v2_core_GrpcService *msg, envoy_api_v2_core_GrpcService_EnvoyGrpc* value) { @@ -119,7 +121,7 @@ UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc* envoy_api_v2_core_Gr return sub; } UPB_INLINE void envoy_api_v2_core_GrpcService_set_timeout(envoy_api_v2_core_GrpcService *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_GrpcService_mutable_timeout(envoy_api_v2_core_GrpcService *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_GrpcService_timeout(msg); @@ -158,10 +160,10 @@ UPB_INLINE char *envoy_api_v2_core_GrpcService_EnvoyGrpc_serialize(const envoy_a return upb_encode(msg, &envoy_api_v2_core_GrpcService_EnvoyGrpc_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_EnvoyGrpc_cluster_name(const envoy_api_v2_core_GrpcService_EnvoyGrpc *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_EnvoyGrpc_cluster_name(const envoy_api_v2_core_GrpcService_EnvoyGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_core_GrpcService_EnvoyGrpc_set_cluster_name(envoy_api_v2_core_GrpcService_EnvoyGrpc *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.core.GrpcService.GoogleGrpc */ @@ -178,18 +180,21 @@ UPB_INLINE char *envoy_api_v2_core_GrpcService_GoogleGrpc_serialize(const envoy_ return upb_encode(msg, &envoy_api_v2_core_GrpcService_GoogleGrpc_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_target_uri(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_channel_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials*, UPB_SIZE(24, 48)); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_target_uri(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_has_channel_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } +UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_channel_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials*); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_has_call_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* const* envoy_api_v2_core_GrpcService_GoogleGrpc_call_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg, size_t *len) { return (const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_stat_prefix(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_credentials_factory_name(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_GrpcService_GoogleGrpc_config(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(28, 56)); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_stat_prefix(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_credentials_factory_name(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_has_config(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_GrpcService_GoogleGrpc_config(const envoy_api_v2_core_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_Struct*); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_set_target_uri(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_set_channel_credentials(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials*, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials*) = value; } UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_mutable_channel_credentials(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, upb_arena *arena) { struct envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* sub = (struct envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials*)envoy_api_v2_core_GrpcService_GoogleGrpc_channel_credentials(msg); @@ -214,13 +219,13 @@ UPB_INLINE struct envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* envo return sub; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_set_stat_prefix(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_set_credentials_factory_name(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_set_config(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_Struct*) = value; } UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_core_GrpcService_GoogleGrpc_mutable_config(envoy_api_v2_core_GrpcService_GoogleGrpc *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_core_GrpcService_GoogleGrpc_config(msg); @@ -246,12 +251,15 @@ UPB_INLINE char *envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_seriali return upb_encode(msg, &envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_root_certs(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_private_key(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_cert_chain(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_has_root_certs(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_root_certs(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_DataSource*); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_has_private_key(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_private_key(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_api_v2_core_DataSource*); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_has_cert_chain(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_cert_chain(const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_DataSource*); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_root_certs(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_mutable_root_certs(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_root_certs(msg); @@ -263,7 +271,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_Go return sub; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_private_key(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_mutable_private_key(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_private_key(msg); @@ -275,7 +283,7 @@ UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_Go return sub; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_set_cert_chain(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_mutable_cert_chain(envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_cert_chain(msg); @@ -323,7 +331,7 @@ typedef enum { envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_local_credentials = 3, envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_NOT_SET = 0 } envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_oneofcases; -UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_has_ssl_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_ssl_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -393,7 +401,7 @@ typedef enum { envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_sts_service = 7, envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_NOT_SET = 0 } envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_oneofcases; -UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } +UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_access_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_access_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } @@ -491,14 +499,14 @@ UPB_INLINE char *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_Servic return upb_encode(msg, &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_json_key(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE uint64_t envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_token_lifetime_seconds(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_json_key(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE uint64_t envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_token_lifetime_seconds(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_set_json_key(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_set_token_lifetime_seconds(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value; } /* envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials */ @@ -515,14 +523,14 @@ UPB_INLINE char *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_Google return upb_encode(msg, &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_authorization_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_authority_selector(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_authorization_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_authority_selector(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_set_authorization_token(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_set_authority_selector(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin */ @@ -544,16 +552,16 @@ typedef enum { envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_typed_config = 3, envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_NOT_SET = 0 } envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_oneofcases; -UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_name(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_name(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_has_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_has_typed_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_typed_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_set_name(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_set_config(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); @@ -594,42 +602,42 @@ UPB_INLINE char *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsSer return upb_encode(msg, &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_token_exchange_service_uri(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_resource(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_audience(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_scope(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 48)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_requested_token_type(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 64)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_subject_token_path(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 80)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_subject_token_type(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 96)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_actor_token_path(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 112)); } -UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_actor_token_type(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 128)); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_token_exchange_service_uri(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_resource(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_audience(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_scope(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_requested_token_type(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_subject_token_path(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_subject_token_type(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 96), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_actor_token_path(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 112), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_actor_token_type(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 128), upb_strview); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_token_exchange_service_uri(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_resource(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_audience(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_scope(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_requested_token_type(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 64), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_subject_token_path(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 80), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_subject_token_type(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 96), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_actor_token_path(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 112), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_set_actor_token_type(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 128), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c index f62e741d480..0cb8947f054 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c @@ -45,11 +45,11 @@ static const upb_msglayout_field envoy_api_v2_core_HealthCheck__fields[21] = { {5, UPB_SIZE(32, 56), 0, 8, 11, 1}, {6, UPB_SIZE(36, 64), 0, 8, 11, 1}, {7, UPB_SIZE(40, 72), 0, 6, 11, 1}, - {8, UPB_SIZE(72, 136), UPB_SIZE(-77, -145), 3, 11, 1}, - {9, UPB_SIZE(72, 136), UPB_SIZE(-77, -145), 4, 11, 1}, - {11, UPB_SIZE(72, 136), UPB_SIZE(-77, -145), 2, 11, 1}, + {8, UPB_SIZE(72, 136), UPB_SIZE(-76, -144), 3, 11, 1}, + {9, UPB_SIZE(72, 136), UPB_SIZE(-76, -144), 4, 11, 1}, + {11, UPB_SIZE(72, 136), UPB_SIZE(-76, -144), 2, 11, 1}, {12, UPB_SIZE(44, 80), 0, 7, 11, 1}, - {13, UPB_SIZE(72, 136), UPB_SIZE(-77, -145), 1, 11, 1}, + {13, UPB_SIZE(72, 136), UPB_SIZE(-76, -144), 1, 11, 1}, {14, UPB_SIZE(48, 88), 0, 7, 11, 1}, {15, UPB_SIZE(52, 96), 0, 7, 11, 1}, {16, UPB_SIZE(56, 104), 0, 7, 11, 1}, @@ -68,8 +68,8 @@ const upb_msglayout envoy_api_v2_core_HealthCheck_msginit = { }; static const upb_msglayout_field envoy_api_v2_core_HealthCheck_Payload__fields[2] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 12, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 12, 1}, }; const upb_msglayout envoy_api_v2_core_HealthCheck_Payload_msginit = { @@ -148,8 +148,8 @@ static const upb_msglayout *const envoy_api_v2_core_HealthCheck_CustomHealthChec static const upb_msglayout_field envoy_api_v2_core_HealthCheck_CustomHealthCheck__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h index 1e118b7335f..663c1002fc4 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h @@ -93,36 +93,50 @@ typedef enum { envoy_api_v2_core_HealthCheck_health_checker_custom_health_check = 13, envoy_api_v2_core_HealthCheck_health_checker_NOT_SET = 0 } envoy_api_v2_core_HealthCheck_health_checker_oneofcases; -UPB_INLINE envoy_api_v2_core_HealthCheck_health_checker_oneofcases envoy_api_v2_core_HealthCheck_health_checker_case(const envoy_api_v2_core_HealthCheck* msg) { return (envoy_api_v2_core_HealthCheck_health_checker_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(76, 144)); } - -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_timeout(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(16, 24)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(20, 32)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_interval_jitter(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(24, 40)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_unhealthy_threshold(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_healthy_threshold(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 56)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_alt_port(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 64)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_HealthCheck_reuse_connection(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(40, 72)); } +UPB_INLINE envoy_api_v2_core_HealthCheck_health_checker_oneofcases envoy_api_v2_core_HealthCheck_health_checker_case(const envoy_api_v2_core_HealthCheck* msg) { return (envoy_api_v2_core_HealthCheck_health_checker_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(76, 144), int32_t); } + +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_timeout(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_timeout(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_interval(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_interval(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_interval_jitter(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_interval_jitter(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_unhealthy_threshold(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_unhealthy_threshold(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_healthy_threshold(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_healthy_threshold(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_alt_port(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_alt_port(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_reuse_connection(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_HealthCheck_reuse_connection(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct google_protobuf_BoolValue*); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_http_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(76, 144), 8); } UPB_INLINE const envoy_api_v2_core_HealthCheck_HttpHealthCheck* envoy_api_v2_core_HealthCheck_http_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_HttpHealthCheck*, UPB_SIZE(72, 136), UPB_SIZE(76, 144), 8, NULL); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_tcp_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(76, 144), 9); } UPB_INLINE const envoy_api_v2_core_HealthCheck_TcpHealthCheck* envoy_api_v2_core_HealthCheck_tcp_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_TcpHealthCheck*, UPB_SIZE(72, 136), UPB_SIZE(76, 144), 9, NULL); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_grpc_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(76, 144), 11); } UPB_INLINE const envoy_api_v2_core_HealthCheck_GrpcHealthCheck* envoy_api_v2_core_HealthCheck_grpc_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_GrpcHealthCheck*, UPB_SIZE(72, 136), UPB_SIZE(76, 144), 11, NULL); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_no_traffic_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(44, 80)); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_no_traffic_interval(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_no_traffic_interval(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const struct google_protobuf_Duration*); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_custom_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(76, 144), 13); } UPB_INLINE const envoy_api_v2_core_HealthCheck_CustomHealthCheck* envoy_api_v2_core_HealthCheck_custom_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_CustomHealthCheck*, UPB_SIZE(72, 136), UPB_SIZE(76, 144), 13, NULL); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_unhealthy_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(48, 88)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_unhealthy_edge_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(52, 96)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_healthy_edge_interval(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(56, 104)); } -UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_event_log_path(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE uint32_t envoy_api_v2_core_HealthCheck_interval_jitter_percent(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_always_log_health_check_failures(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_initial_jitter(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(60, 112)); } -UPB_INLINE const envoy_api_v2_core_HealthCheck_TlsOptions* envoy_api_v2_core_HealthCheck_tls_options(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HealthCheck_TlsOptions*, UPB_SIZE(64, 120)); } -UPB_INLINE const struct envoy_api_v2_core_EventServiceConfig* envoy_api_v2_core_HealthCheck_event_service(const envoy_api_v2_core_HealthCheck *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_EventServiceConfig*, UPB_SIZE(68, 128)); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_unhealthy_interval(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 88)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_unhealthy_interval(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 88), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_unhealthy_edge_interval(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 96)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_unhealthy_edge_interval(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 96), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_healthy_edge_interval(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 104)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_healthy_edge_interval(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 104), const struct google_protobuf_Duration*); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_event_log_path(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE uint32_t envoy_api_v2_core_HealthCheck_interval_jitter_percent(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_always_log_health_check_failures(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_initial_jitter(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 112)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_initial_jitter(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 112), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_tls_options(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 120)); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_TlsOptions* envoy_api_v2_core_HealthCheck_tls_options(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 120), const envoy_api_v2_core_HealthCheck_TlsOptions*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_event_service(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 128)); } +UPB_INLINE const struct envoy_api_v2_core_EventServiceConfig* envoy_api_v2_core_HealthCheck_event_service(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 128), const struct envoy_api_v2_core_EventServiceConfig*); } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_timeout(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_timeout(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_timeout(msg); @@ -134,7 +148,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_interval(msg); @@ -146,7 +160,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_interval_jitter(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_interval_jitter(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_interval_jitter(msg); @@ -158,7 +172,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_threshold(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_unhealthy_threshold(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_unhealthy_threshold(msg); @@ -170,7 +184,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mut return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_healthy_threshold(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_healthy_threshold(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_healthy_threshold(msg); @@ -182,7 +196,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mut return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_alt_port(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 64), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mutable_alt_port(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HealthCheck_alt_port(msg); @@ -194,7 +208,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_mut return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_reuse_connection(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(40, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_HealthCheck_mutable_reuse_connection(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_HealthCheck_reuse_connection(msg); @@ -242,7 +256,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck_GrpcHealthCheck* envoy_api_v2_co return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_no_traffic_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(44, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 80), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_no_traffic_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_no_traffic_interval(msg); @@ -266,7 +280,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck_CustomHealthCheck* envoy_api_v2_ return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(48, 88)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 88), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_unhealthy_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_unhealthy_interval(msg); @@ -278,7 +292,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_unhealthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(52, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 96), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_unhealthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_unhealthy_edge_interval(msg); @@ -290,7 +304,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_healthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(56, 104)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 104), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_healthy_edge_interval(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_healthy_edge_interval(msg); @@ -302,16 +316,16 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_event_log_path(envoy_api_v2_core_HealthCheck *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_interval_jitter_percent(envoy_api_v2_core_HealthCheck *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_always_log_health_check_failures(envoy_api_v2_core_HealthCheck *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_initial_jitter(envoy_api_v2_core_HealthCheck *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(60, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 112), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutable_initial_jitter(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HealthCheck_initial_jitter(msg); @@ -323,7 +337,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_mutabl return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_tls_options(envoy_api_v2_core_HealthCheck *msg, envoy_api_v2_core_HealthCheck_TlsOptions* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_HealthCheck_TlsOptions*, UPB_SIZE(64, 120)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 120), envoy_api_v2_core_HealthCheck_TlsOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_HealthCheck_TlsOptions* envoy_api_v2_core_HealthCheck_mutable_tls_options(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_TlsOptions* sub = (struct envoy_api_v2_core_HealthCheck_TlsOptions*)envoy_api_v2_core_HealthCheck_tls_options(msg); @@ -335,7 +349,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck_TlsOptions* envoy_api_v2_core_He return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_set_event_service(envoy_api_v2_core_HealthCheck *msg, struct envoy_api_v2_core_EventServiceConfig* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_EventServiceConfig*, UPB_SIZE(68, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 128), struct envoy_api_v2_core_EventServiceConfig*) = value; } UPB_INLINE struct envoy_api_v2_core_EventServiceConfig* envoy_api_v2_core_HealthCheck_mutable_event_service(envoy_api_v2_core_HealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_EventServiceConfig* sub = (struct envoy_api_v2_core_EventServiceConfig*)envoy_api_v2_core_HealthCheck_event_service(msg); @@ -366,7 +380,7 @@ typedef enum { envoy_api_v2_core_HealthCheck_Payload_payload_binary = 2, envoy_api_v2_core_HealthCheck_Payload_payload_NOT_SET = 0 } envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases; -UPB_INLINE envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases envoy_api_v2_core_HealthCheck_Payload_payload_case(const envoy_api_v2_core_HealthCheck_Payload* msg) { return (envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } +UPB_INLINE envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases envoy_api_v2_core_HealthCheck_Payload_payload_case(const envoy_api_v2_core_HealthCheck_Payload* msg) { return (envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_Payload_has_text(const envoy_api_v2_core_HealthCheck_Payload *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_Payload_text(const envoy_api_v2_core_HealthCheck_Payload *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } @@ -394,26 +408,31 @@ UPB_INLINE char *envoy_api_v2_core_HealthCheck_HttpHealthCheck_serialize(const e return upb_encode(msg, &envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_host(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } -UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_path(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 32)); } -UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_send(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(36, 64)); } -UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_receive(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(40, 72)); } -UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_service_name(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 48)); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_host(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_path(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_has_send(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_send(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const envoy_api_v2_core_HealthCheck_Payload*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_has_receive(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_receive(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const envoy_api_v2_core_HealthCheck_Payload*); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_HttpHealthCheck_service_name(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_has_request_headers_to_add(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 88)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_core_HealthCheck_HttpHealthCheck_request_headers_to_add(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(48, 88), len); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_use_http2(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_use_http2(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } UPB_INLINE upb_strview const* envoy_api_v2_core_HealthCheck_HttpHealthCheck_request_headers_to_remove(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(52, 96), len); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_has_expected_statuses(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 104)); } UPB_INLINE const struct envoy_type_Int64Range* const* envoy_api_v2_core_HealthCheck_HttpHealthCheck_expected_statuses(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (const struct envoy_type_Int64Range* const*)_upb_array_accessor(msg, UPB_SIZE(56, 104), len); } -UPB_INLINE int32_t envoy_api_v2_core_HealthCheck_HttpHealthCheck_codec_client_type(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_api_v2_core_HealthCheck_HttpHealthCheck_service_name_matcher(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(44, 80)); } +UPB_INLINE int32_t envoy_api_v2_core_HealthCheck_HttpHealthCheck_codec_client_type(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_HttpHealthCheck_has_service_name_matcher(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); } +UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_api_v2_core_HealthCheck_HttpHealthCheck_service_name_matcher(const envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const struct envoy_type_matcher_StringMatcher*); } UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_host(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_path(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_send(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, envoy_api_v2_core_HealthCheck_Payload* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(36, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 64), envoy_api_v2_core_HealthCheck_Payload*) = value; } UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_send(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_HttpHealthCheck_send(msg); @@ -425,7 +444,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_Healt return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_receive(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, envoy_api_v2_core_HealthCheck_Payload* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(40, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 72), envoy_api_v2_core_HealthCheck_Payload*) = value; } UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_receive(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_HttpHealthCheck_receive(msg); @@ -437,7 +456,7 @@ UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_Healt return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_service_name(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_strview) = value; } UPB_INLINE struct envoy_api_v2_core_HeaderValueOption** envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_request_headers_to_add(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (struct envoy_api_v2_core_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len); @@ -453,7 +472,7 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_core_HealthC return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_use_http2(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } UPB_INLINE upb_strview* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_request_headers_to_remove(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 96), len); @@ -479,10 +498,10 @@ UPB_INLINE struct envoy_type_Int64Range* envoy_api_v2_core_HealthCheck_HttpHealt return sub; } UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_codec_client_type(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_api_v2_core_HealthCheck_HttpHealthCheck_set_service_name_matcher(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, struct envoy_type_matcher_StringMatcher* value) { - UPB_FIELD_AT(msg, struct envoy_type_matcher_StringMatcher*, UPB_SIZE(44, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 80), struct envoy_type_matcher_StringMatcher*) = value; } UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_api_v2_core_HealthCheck_HttpHealthCheck_mutable_service_name_matcher(envoy_api_v2_core_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) { struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)envoy_api_v2_core_HealthCheck_HttpHealthCheck_service_name_matcher(msg); @@ -508,11 +527,13 @@ UPB_INLINE char *envoy_api_v2_core_HealthCheck_TcpHealthCheck_serialize(const en return upb_encode(msg, &envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, arena, len); } -UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_TcpHealthCheck_send(const envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_TcpHealthCheck_has_send(const envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_TcpHealthCheck_send(const envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_api_v2_core_HealthCheck_Payload*); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_TcpHealthCheck_has_receive(const envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const envoy_api_v2_core_HealthCheck_Payload* const* envoy_api_v2_core_HealthCheck_TcpHealthCheck_receive(const envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, size_t *len) { return (const envoy_api_v2_core_HealthCheck_Payload* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void envoy_api_v2_core_HealthCheck_TcpHealthCheck_set_send(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, envoy_api_v2_core_HealthCheck_Payload* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_HealthCheck_Payload*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_api_v2_core_HealthCheck_Payload*) = value; } UPB_INLINE struct envoy_api_v2_core_HealthCheck_Payload* envoy_api_v2_core_HealthCheck_TcpHealthCheck_mutable_send(envoy_api_v2_core_HealthCheck_TcpHealthCheck *msg, upb_arena *arena) { struct envoy_api_v2_core_HealthCheck_Payload* sub = (struct envoy_api_v2_core_HealthCheck_Payload*)envoy_api_v2_core_HealthCheck_TcpHealthCheck_send(msg); @@ -551,10 +572,10 @@ UPB_INLINE char *envoy_api_v2_core_HealthCheck_RedisHealthCheck_serialize(const return upb_encode(msg, &envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_RedisHealthCheck_key(const envoy_api_v2_core_HealthCheck_RedisHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_RedisHealthCheck_key(const envoy_api_v2_core_HealthCheck_RedisHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_core_HealthCheck_RedisHealthCheck_set_key(envoy_api_v2_core_HealthCheck_RedisHealthCheck *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.core.HealthCheck.GrpcHealthCheck */ @@ -571,14 +592,14 @@ UPB_INLINE char *envoy_api_v2_core_HealthCheck_GrpcHealthCheck_serialize(const e return upb_encode(msg, &envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_GrpcHealthCheck_service_name(const envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_GrpcHealthCheck_authority(const envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_GrpcHealthCheck_service_name(const envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_GrpcHealthCheck_authority(const envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void envoy_api_v2_core_HealthCheck_GrpcHealthCheck_set_service_name(envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_HealthCheck_GrpcHealthCheck_set_authority(envoy_api_v2_core_HealthCheck_GrpcHealthCheck *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* envoy.api.v2.core.HealthCheck.CustomHealthCheck */ @@ -600,16 +621,16 @@ typedef enum { envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_typed_config = 3, envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_NOT_SET = 0 } envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases; -UPB_INLINE envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_case(const envoy_api_v2_core_HealthCheck_CustomHealthCheck* msg) { return (envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_case(const envoy_api_v2_core_HealthCheck_CustomHealthCheck* msg) { return (envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_CustomHealthCheck_name(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_CustomHealthCheck_name(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_CustomHealthCheck_has_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_HealthCheck_CustomHealthCheck_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_CustomHealthCheck_has_typed_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_core_HealthCheck_CustomHealthCheck_typed_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_name(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_config(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c index 34e945c39f9..ad1e0dcc35c 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c @@ -22,7 +22,7 @@ static const upb_msglayout *const envoy_api_v2_core_HttpUri_submsgs[1] = { static const upb_msglayout_field envoy_api_v2_core_HttpUri__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, + {2, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h index aa62b81df31..324785f32fa 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h @@ -44,21 +44,22 @@ typedef enum { envoy_api_v2_core_HttpUri_http_upstream_type_cluster = 2, envoy_api_v2_core_HttpUri_http_upstream_type_NOT_SET = 0 } envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases; -UPB_INLINE envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases envoy_api_v2_core_HttpUri_http_upstream_type_case(const envoy_api_v2_core_HttpUri* msg) { return (envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } +UPB_INLINE envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases envoy_api_v2_core_HttpUri_http_upstream_type_case(const envoy_api_v2_core_HttpUri* msg) { return (envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_uri(const envoy_api_v2_core_HttpUri *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_uri(const envoy_api_v2_core_HttpUri *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_core_HttpUri_has_cluster(const envoy_api_v2_core_HttpUri *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 2); } UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_cluster(const envoy_api_v2_core_HttpUri *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_timeout(const envoy_api_v2_core_HttpUri *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_core_HttpUri_has_timeout(const envoy_api_v2_core_HttpUri *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_timeout(const envoy_api_v2_core_HttpUri *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } UPB_INLINE void envoy_api_v2_core_HttpUri_set_uri(envoy_api_v2_core_HttpUri *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_HttpUri_set_cluster(envoy_api_v2_core_HttpUri *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 2); } UPB_INLINE void envoy_api_v2_core_HttpUri_set_timeout(envoy_api_v2_core_HttpUri *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_mutable_timeout(envoy_api_v2_core_HttpUri *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpUri_timeout(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c index 07d783c2b58..829a68440c1 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c @@ -77,7 +77,7 @@ static const upb_msglayout *const envoy_api_v2_core_Http1ProtocolOptions_HeaderK }; static const upb_msglayout_field envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h index cf18a88436a..6267256322c 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h @@ -90,14 +90,14 @@ UPB_INLINE char *envoy_api_v2_core_UpstreamHttpProtocolOptions_serialize(const e return upb_encode(msg, &envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit, arena, len); } -UPB_INLINE bool envoy_api_v2_core_UpstreamHttpProtocolOptions_auto_sni(const envoy_api_v2_core_UpstreamHttpProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE bool envoy_api_v2_core_UpstreamHttpProtocolOptions_auto_san_validation(const envoy_api_v2_core_UpstreamHttpProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool envoy_api_v2_core_UpstreamHttpProtocolOptions_auto_sni(const envoy_api_v2_core_UpstreamHttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE bool envoy_api_v2_core_UpstreamHttpProtocolOptions_auto_san_validation(const envoy_api_v2_core_UpstreamHttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE void envoy_api_v2_core_UpstreamHttpProtocolOptions_set_auto_sni(envoy_api_v2_core_UpstreamHttpProtocolOptions *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_core_UpstreamHttpProtocolOptions_set_auto_san_validation(envoy_api_v2_core_UpstreamHttpProtocolOptions *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } /* envoy.api.v2.core.HttpProtocolOptions */ @@ -114,14 +114,18 @@ UPB_INLINE char *envoy_api_v2_core_HttpProtocolOptions_serialize(const envoy_api return upb_encode(msg, &envoy_api_v2_core_HttpProtocolOptions_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_idle_timeout(const envoy_api_v2_core_HttpProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 8)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HttpProtocolOptions_max_headers_count(const envoy_api_v2_core_HttpProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(12, 16)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_max_connection_duration(const envoy_api_v2_core_HttpProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(16, 24)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_max_stream_duration(const envoy_api_v2_core_HttpProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(20, 32)); } -UPB_INLINE int32_t envoy_api_v2_core_HttpProtocolOptions_headers_with_underscores_action(const envoy_api_v2_core_HttpProtocolOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_HttpProtocolOptions_has_idle_timeout(const envoy_api_v2_core_HttpProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_idle_timeout(const envoy_api_v2_core_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_HttpProtocolOptions_has_max_headers_count(const envoy_api_v2_core_HttpProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HttpProtocolOptions_max_headers_count(const envoy_api_v2_core_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_HttpProtocolOptions_has_max_connection_duration(const envoy_api_v2_core_HttpProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_max_connection_duration(const envoy_api_v2_core_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_core_HttpProtocolOptions_has_max_stream_duration(const envoy_api_v2_core_HttpProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_max_stream_duration(const envoy_api_v2_core_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Duration*); } +UPB_INLINE int32_t envoy_api_v2_core_HttpProtocolOptions_headers_with_underscores_action(const envoy_api_v2_core_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void envoy_api_v2_core_HttpProtocolOptions_set_idle_timeout(envoy_api_v2_core_HttpProtocolOptions *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_mutable_idle_timeout(envoy_api_v2_core_HttpProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpProtocolOptions_idle_timeout(msg); @@ -133,7 +137,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOption return sub; } UPB_INLINE void envoy_api_v2_core_HttpProtocolOptions_set_max_headers_count(envoy_api_v2_core_HttpProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HttpProtocolOptions_mutable_max_headers_count(envoy_api_v2_core_HttpProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_HttpProtocolOptions_max_headers_count(msg); @@ -145,7 +149,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_HttpProtocolOpt return sub; } UPB_INLINE void envoy_api_v2_core_HttpProtocolOptions_set_max_connection_duration(envoy_api_v2_core_HttpProtocolOptions *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_mutable_max_connection_duration(envoy_api_v2_core_HttpProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpProtocolOptions_max_connection_duration(msg); @@ -157,7 +161,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOption return sub; } UPB_INLINE void envoy_api_v2_core_HttpProtocolOptions_set_max_stream_duration(envoy_api_v2_core_HttpProtocolOptions *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOptions_mutable_max_stream_duration(envoy_api_v2_core_HttpProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_core_HttpProtocolOptions_max_stream_duration(msg); @@ -169,7 +173,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_core_HttpProtocolOption return sub; } UPB_INLINE void envoy_api_v2_core_HttpProtocolOptions_set_headers_with_underscores_action(envoy_api_v2_core_HttpProtocolOptions *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } /* envoy.api.v2.core.Http1ProtocolOptions */ @@ -186,14 +190,16 @@ UPB_INLINE char *envoy_api_v2_core_Http1ProtocolOptions_serialize(const envoy_ap return upb_encode(msg, &envoy_api_v2_core_Http1ProtocolOptions_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_Http1ProtocolOptions_allow_absolute_url(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(12, 24)); } -UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_accept_http_10(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_core_Http1ProtocolOptions_default_host_for_http_10(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } -UPB_INLINE const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* envoy_api_v2_core_Http1ProtocolOptions_header_key_format(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat*, UPB_SIZE(16, 32)); } -UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_enable_trailers(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_has_allow_absolute_url(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_Http1ProtocolOptions_allow_absolute_url(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_accept_http_10(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE upb_strview envoy_api_v2_core_Http1ProtocolOptions_default_host_for_http_10(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_has_header_key_format(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* envoy_api_v2_core_Http1ProtocolOptions_header_key_format(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat*); } +UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_enable_trailers(const envoy_api_v2_core_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_set_allow_absolute_url(envoy_api_v2_core_Http1ProtocolOptions *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_Http1ProtocolOptions_mutable_allow_absolute_url(envoy_api_v2_core_Http1ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_core_Http1ProtocolOptions_allow_absolute_url(msg); @@ -205,13 +211,13 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_core_Http1ProtocolOpti return sub; } UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_set_accept_http_10(envoy_api_v2_core_Http1ProtocolOptions *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_set_default_host_for_http_10(envoy_api_v2_core_Http1ProtocolOptions *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_set_header_key_format(envoy_api_v2_core_Http1ProtocolOptions *msg, envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat*) = value; } UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* envoy_api_v2_core_Http1ProtocolOptions_mutable_header_key_format(envoy_api_v2_core_Http1ProtocolOptions *msg, upb_arena *arena) { struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* sub = (struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat*)envoy_api_v2_core_Http1ProtocolOptions_header_key_format(msg); @@ -223,7 +229,7 @@ UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* envoy_ return sub; } UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_set_enable_trailers(envoy_api_v2_core_Http1ProtocolOptions *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } /* envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat */ @@ -244,7 +250,7 @@ typedef enum { envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_proper_case_words = 1, envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_NOT_SET = 0 } envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_oneofcases; -UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_oneofcases envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_case(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* msg) { return (envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_oneofcases envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_case(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* msg) { return (envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_has_proper_case_words(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords* envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_proper_case_words(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -292,22 +298,32 @@ UPB_INLINE char *envoy_api_v2_core_Http2ProtocolOptions_serialize(const envoy_ap return upb_encode(msg, &envoy_api_v2_core_Http2ProtocolOptions_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_hpack_table_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_concurrent_streams(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_initial_stream_window_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(12, 24)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_initial_connection_window_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)); } -UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_allow_connect(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_allow_metadata(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_outbound_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_outbound_control_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)); } -UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_stream_error_on_invalid_http_messaging(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_hpack_table_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_hpack_table_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_max_concurrent_streams(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_concurrent_streams(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_initial_stream_window_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_initial_stream_window_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_initial_connection_window_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_initial_connection_window_size(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_allow_connect(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_allow_metadata(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_max_outbound_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_outbound_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_max_outbound_control_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_outbound_control_frames(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_max_consecutive_inbound_frames_with_empty_payload(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_max_inbound_priority_frames_per_stream(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_max_inbound_window_update_frames_per_data_frame_sent(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_stream_error_on_invalid_http_messaging(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_has_custom_settings_parameters(const envoy_api_v2_core_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } UPB_INLINE const envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter* const* envoy_api_v2_core_Http2ProtocolOptions_custom_settings_parameters(const envoy_api_v2_core_Http2ProtocolOptions *msg, size_t *len) { return (const envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_hpack_table_size(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_hpack_table_size(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_hpack_table_size(msg); @@ -319,7 +335,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_concurrent_streams(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_concurrent_streams(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_concurrent_streams(msg); @@ -331,7 +347,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_initial_stream_window_size(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_initial_stream_window_size(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_initial_stream_window_size(msg); @@ -343,7 +359,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_initial_connection_window_size(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_initial_connection_window_size(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_initial_connection_window_size(msg); @@ -355,13 +371,13 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_allow_connect(envoy_api_v2_core_Http2ProtocolOptions *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_allow_metadata(envoy_api_v2_core_Http2ProtocolOptions *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_outbound_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_outbound_frames(msg); @@ -373,7 +389,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_outbound_control_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_outbound_control_frames(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_outbound_control_frames(msg); @@ -385,7 +401,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_consecutive_inbound_frames_with_empty_payload(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_consecutive_inbound_frames_with_empty_payload(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(msg); @@ -397,7 +413,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_priority_frames_per_stream(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_inbound_priority_frames_per_stream(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(msg); @@ -409,7 +425,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_max_inbound_window_update_frames_per_data_frame_sent(envoy_api_v2_core_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 72), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_mutable_max_inbound_window_update_frames_per_data_frame_sent(envoy_api_v2_core_Http2ProtocolOptions *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(msg); @@ -421,7 +437,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_set_stream_error_on_invalid_http_messaging(envoy_api_v2_core_Http2ProtocolOptions *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } UPB_INLINE envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter** envoy_api_v2_core_Http2ProtocolOptions_mutable_custom_settings_parameters(envoy_api_v2_core_Http2ProtocolOptions *msg, size_t *len) { return (envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len); @@ -451,11 +467,13 @@ UPB_INLINE char *envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_serial return upb_encode(msg, &envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_identifier(const envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_value(const envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_has_identifier(const envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_identifier(const envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_has_value(const envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_value(const envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_set_identifier(envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_mutable_identifier(envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_identifier(msg); @@ -467,7 +485,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOp return sub; } UPB_INLINE void envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_set_value(envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_mutable_value(envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_value(msg); @@ -493,10 +511,11 @@ UPB_INLINE char *envoy_api_v2_core_GrpcProtocolOptions_serialize(const envoy_api return upb_encode(msg, &envoy_api_v2_core_GrpcProtocolOptions_msginit, arena, len); } -UPB_INLINE const envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_core_GrpcProtocolOptions_http2_protocol_options(const envoy_api_v2_core_GrpcProtocolOptions *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_core_Http2ProtocolOptions*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_core_GrpcProtocolOptions_has_http2_protocol_options(const envoy_api_v2_core_GrpcProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_core_GrpcProtocolOptions_http2_protocol_options(const envoy_api_v2_core_GrpcProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_api_v2_core_Http2ProtocolOptions*); } UPB_INLINE void envoy_api_v2_core_GrpcProtocolOptions_set_http2_protocol_options(envoy_api_v2_core_GrpcProtocolOptions *msg, envoy_api_v2_core_Http2ProtocolOptions* value) { - UPB_FIELD_AT(msg, envoy_api_v2_core_Http2ProtocolOptions*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_api_v2_core_Http2ProtocolOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_api_v2_core_GrpcProtocolOptions_mutable_http2_protocol_options(envoy_api_v2_core_GrpcProtocolOptions *msg, upb_arena *arena) { struct envoy_api_v2_core_Http2ProtocolOptions* sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)envoy_api_v2_core_GrpcProtocolOptions_http2_protocol_options(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c index 85c7167ea57..86d78f15856 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c @@ -19,8 +19,8 @@ static const upb_msglayout_field envoy_api_v2_core_SocketOption__fields[6] = { {1, UPB_SIZE(24, 24), 0, 0, 9, 1}, {2, UPB_SIZE(0, 0), 0, 0, 3, 1}, {3, UPB_SIZE(8, 8), 0, 0, 3, 1}, - {4, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 3, 1}, - {5, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 12, 1}, + {4, UPB_SIZE(32, 40), UPB_SIZE(-40, -56), 0, 3, 1}, + {5, UPB_SIZE(32, 40), UPB_SIZE(-40, -56), 0, 12, 1}, {6, UPB_SIZE(16, 16), 0, 0, 14, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h index 4a2d89f1d59..d84f64403c5 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h @@ -49,25 +49,25 @@ typedef enum { envoy_api_v2_core_SocketOption_value_buf_value = 5, envoy_api_v2_core_SocketOption_value_NOT_SET = 0 } envoy_api_v2_core_SocketOption_value_oneofcases; -UPB_INLINE envoy_api_v2_core_SocketOption_value_oneofcases envoy_api_v2_core_SocketOption_value_case(const envoy_api_v2_core_SocketOption* msg) { return (envoy_api_v2_core_SocketOption_value_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(40, 56)); } +UPB_INLINE envoy_api_v2_core_SocketOption_value_oneofcases envoy_api_v2_core_SocketOption_value_case(const envoy_api_v2_core_SocketOption* msg) { return (envoy_api_v2_core_SocketOption_value_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(40, 56), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_core_SocketOption_description(const envoy_api_v2_core_SocketOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 24)); } -UPB_INLINE int64_t envoy_api_v2_core_SocketOption_level(const envoy_api_v2_core_SocketOption *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } -UPB_INLINE int64_t envoy_api_v2_core_SocketOption_name(const envoy_api_v2_core_SocketOption *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE upb_strview envoy_api_v2_core_SocketOption_description(const envoy_api_v2_core_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); } +UPB_INLINE int64_t envoy_api_v2_core_SocketOption_level(const envoy_api_v2_core_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } +UPB_INLINE int64_t envoy_api_v2_core_SocketOption_name(const envoy_api_v2_core_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } UPB_INLINE bool envoy_api_v2_core_SocketOption_has_int_value(const envoy_api_v2_core_SocketOption *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(40, 56), 4); } UPB_INLINE int64_t envoy_api_v2_core_SocketOption_int_value(const envoy_api_v2_core_SocketOption *msg) { return UPB_READ_ONEOF(msg, int64_t, UPB_SIZE(32, 40), UPB_SIZE(40, 56), 4, 0); } UPB_INLINE bool envoy_api_v2_core_SocketOption_has_buf_value(const envoy_api_v2_core_SocketOption *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(40, 56), 5); } UPB_INLINE upb_strview envoy_api_v2_core_SocketOption_buf_value(const envoy_api_v2_core_SocketOption *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(32, 40), UPB_SIZE(40, 56), 5, upb_strview_make("", strlen(""))); } -UPB_INLINE int32_t envoy_api_v2_core_SocketOption_state(const envoy_api_v2_core_SocketOption *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE int32_t envoy_api_v2_core_SocketOption_state(const envoy_api_v2_core_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } UPB_INLINE void envoy_api_v2_core_SocketOption_set_description(envoy_api_v2_core_SocketOption *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview) = value; } UPB_INLINE void envoy_api_v2_core_SocketOption_set_level(envoy_api_v2_core_SocketOption *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } UPB_INLINE void envoy_api_v2_core_SocketOption_set_name(envoy_api_v2_core_SocketOption *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value; } UPB_INLINE void envoy_api_v2_core_SocketOption_set_int_value(envoy_api_v2_core_SocketOption *msg, int64_t value) { UPB_WRITE_ONEOF(msg, int64_t, UPB_SIZE(32, 40), value, UPB_SIZE(40, 56), 4); @@ -76,7 +76,7 @@ UPB_INLINE void envoy_api_v2_core_SocketOption_set_buf_value(envoy_api_v2_core_S UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(32, 40), value, UPB_SIZE(40, 56), 5); } UPB_INLINE void envoy_api_v2_core_SocketOption_set_state(envoy_api_v2_core_SocketOption *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c index afe4f9120b3..0418cfbf96b 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c @@ -68,7 +68,7 @@ static const upb_msglayout_field envoy_api_v2_DeltaDiscoveryRequest__fields[7] = {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, {3, UPB_SIZE(24, 48), 0, 0, 9, 3}, {4, UPB_SIZE(28, 56), 0, 0, 9, 3}, - {5, UPB_SIZE(32, 64), 0, 0, 11, 4}, + {5, UPB_SIZE(32, 64), 0, 0, 11, _UPB_LABEL_MAP}, {6, UPB_SIZE(8, 16), 0, 0, 9, 1}, {7, UPB_SIZE(20, 40), 0, 2, 11, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h index 24b7619da7e..37d270b2ab4 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h @@ -61,18 +61,20 @@ UPB_INLINE char *envoy_api_v2_DiscoveryRequest_serialize(const envoy_api_v2_Disc return upb_encode(msg, &envoy_api_v2_DiscoveryRequest_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_version_info(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_core_Node* envoy_api_v2_DiscoveryRequest_node(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Node*, UPB_SIZE(24, 48)); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_version_info(const envoy_api_v2_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_DiscoveryRequest_has_node(const envoy_api_v2_DiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } +UPB_INLINE const struct envoy_api_v2_core_Node* envoy_api_v2_DiscoveryRequest_node(const envoy_api_v2_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct envoy_api_v2_core_Node*); } UPB_INLINE upb_strview const* envoy_api_v2_DiscoveryRequest_resource_names(const envoy_api_v2_DiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } -UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_type_url(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_response_nonce(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } -UPB_INLINE const struct google_rpc_Status* envoy_api_v2_DiscoveryRequest_error_detail(const envoy_api_v2_DiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct google_rpc_Status*, UPB_SIZE(28, 56)); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_type_url(const envoy_api_v2_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryRequest_response_nonce(const envoy_api_v2_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } +UPB_INLINE bool envoy_api_v2_DiscoveryRequest_has_error_detail(const envoy_api_v2_DiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } +UPB_INLINE const struct google_rpc_Status* envoy_api_v2_DiscoveryRequest_error_detail(const envoy_api_v2_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_rpc_Status*); } UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_version_info(envoy_api_v2_DiscoveryRequest *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_node(envoy_api_v2_DiscoveryRequest *msg, struct envoy_api_v2_core_Node* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Node*, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct envoy_api_v2_core_Node*) = value; } UPB_INLINE struct envoy_api_v2_core_Node* envoy_api_v2_DiscoveryRequest_mutable_node(envoy_api_v2_DiscoveryRequest *msg, upb_arena *arena) { struct envoy_api_v2_core_Node* sub = (struct envoy_api_v2_core_Node*)envoy_api_v2_DiscoveryRequest_node(msg); @@ -94,13 +96,13 @@ UPB_INLINE bool envoy_api_v2_DiscoveryRequest_add_resource_names(envoy_api_v2_Di arena); } UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_type_url(envoy_api_v2_DiscoveryRequest *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_response_nonce(envoy_api_v2_DiscoveryRequest *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value; } UPB_INLINE void envoy_api_v2_DiscoveryRequest_set_error_detail(envoy_api_v2_DiscoveryRequest *msg, struct google_rpc_Status* value) { - UPB_FIELD_AT(msg, struct google_rpc_Status*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_rpc_Status*) = value; } UPB_INLINE struct google_rpc_Status* envoy_api_v2_DiscoveryRequest_mutable_error_detail(envoy_api_v2_DiscoveryRequest *msg, upb_arena *arena) { struct google_rpc_Status* sub = (struct google_rpc_Status*)envoy_api_v2_DiscoveryRequest_error_detail(msg); @@ -126,15 +128,17 @@ UPB_INLINE char *envoy_api_v2_DiscoveryResponse_serialize(const envoy_api_v2_Dis return upb_encode(msg, &envoy_api_v2_DiscoveryResponse_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_version_info(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_version_info(const envoy_api_v2_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool envoy_api_v2_DiscoveryResponse_has_resources(const envoy_api_v2_DiscoveryResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE const struct google_protobuf_Any* const* envoy_api_v2_DiscoveryResponse_resources(const envoy_api_v2_DiscoveryResponse *msg, size_t *len) { return (const struct google_protobuf_Any* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } -UPB_INLINE bool envoy_api_v2_DiscoveryResponse_canary(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_type_url(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } -UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_nonce(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); } -UPB_INLINE const struct envoy_api_v2_core_ControlPlane* envoy_api_v2_DiscoveryResponse_control_plane(const envoy_api_v2_DiscoveryResponse *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ControlPlane*, UPB_SIZE(28, 56)); } +UPB_INLINE bool envoy_api_v2_DiscoveryResponse_canary(const envoy_api_v2_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_type_url(const envoy_api_v2_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_DiscoveryResponse_nonce(const envoy_api_v2_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } +UPB_INLINE bool envoy_api_v2_DiscoveryResponse_has_control_plane(const envoy_api_v2_DiscoveryResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } +UPB_INLINE const struct envoy_api_v2_core_ControlPlane* envoy_api_v2_DiscoveryResponse_control_plane(const envoy_api_v2_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct envoy_api_v2_core_ControlPlane*); } UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_version_info(envoy_api_v2_DiscoveryResponse *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE struct google_protobuf_Any** envoy_api_v2_DiscoveryResponse_mutable_resources(envoy_api_v2_DiscoveryResponse *msg, size_t *len) { return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len); @@ -150,16 +154,16 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_DiscoveryResponse_add_resour return sub; } UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_canary(envoy_api_v2_DiscoveryResponse *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_type_url(envoy_api_v2_DiscoveryResponse *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value; } UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_nonce(envoy_api_v2_DiscoveryResponse *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value; } UPB_INLINE void envoy_api_v2_DiscoveryResponse_set_control_plane(envoy_api_v2_DiscoveryResponse *msg, struct envoy_api_v2_core_ControlPlane* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_ControlPlane*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct envoy_api_v2_core_ControlPlane*) = value; } UPB_INLINE struct envoy_api_v2_core_ControlPlane* envoy_api_v2_DiscoveryResponse_mutable_control_plane(envoy_api_v2_DiscoveryResponse *msg, upb_arena *arena) { struct envoy_api_v2_core_ControlPlane* sub = (struct envoy_api_v2_core_ControlPlane*)envoy_api_v2_DiscoveryResponse_control_plane(msg); @@ -185,18 +189,21 @@ UPB_INLINE char *envoy_api_v2_DeltaDiscoveryRequest_serialize(const envoy_api_v2 return upb_encode(msg, &envoy_api_v2_DeltaDiscoveryRequest_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_Node* envoy_api_v2_DeltaDiscoveryRequest_node(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Node*, UPB_SIZE(16, 32)); } -UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_type_url(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_has_node(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct envoy_api_v2_core_Node* envoy_api_v2_DeltaDiscoveryRequest_node(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_api_v2_core_Node*); } +UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_type_url(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE upb_strview const* envoy_api_v2_DeltaDiscoveryRequest_resource_names_subscribe(const envoy_api_v2_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE upb_strview const* envoy_api_v2_DeltaDiscoveryRequest_resource_names_unsubscribe(const envoy_api_v2_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } +UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_has_initial_resource_versions(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE size_t envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_size(const envoy_api_v2_DeltaDiscoveryRequest *msg) {return _upb_msg_map_size(msg, UPB_SIZE(32, 64)); } UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_get(const envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(32, 64), &key, 0, val, 0); } UPB_INLINE const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_next(const envoy_api_v2_DeltaDiscoveryRequest *msg, size_t* iter) { return (const envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 64), iter); } -UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_response_nonce(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE const struct google_rpc_Status* envoy_api_v2_DeltaDiscoveryRequest_error_detail(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return UPB_FIELD_AT(msg, const struct google_rpc_Status*, UPB_SIZE(20, 40)); } +UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryRequest_response_nonce(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_has_error_detail(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_rpc_Status* envoy_api_v2_DeltaDiscoveryRequest_error_detail(const envoy_api_v2_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_rpc_Status*); } UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_set_node(envoy_api_v2_DeltaDiscoveryRequest *msg, struct envoy_api_v2_core_Node* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Node*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_api_v2_core_Node*) = value; } UPB_INLINE struct envoy_api_v2_core_Node* envoy_api_v2_DeltaDiscoveryRequest_mutable_node(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_arena *arena) { struct envoy_api_v2_core_Node* sub = (struct envoy_api_v2_core_Node*)envoy_api_v2_DeltaDiscoveryRequest_node(msg); @@ -208,7 +215,7 @@ UPB_INLINE struct envoy_api_v2_core_Node* envoy_api_v2_DeltaDiscoveryRequest_mut return sub; } UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_set_type_url(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE upb_strview* envoy_api_v2_DeltaDiscoveryRequest_mutable_resource_names_subscribe(envoy_api_v2_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); @@ -235,10 +242,10 @@ UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_set UPB_INLINE bool envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_delete(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(32, 64), &key, 0); } UPB_INLINE envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_api_v2_DeltaDiscoveryRequest_initial_resource_versions_nextmutable(envoy_api_v2_DeltaDiscoveryRequest *msg, size_t* iter) { return (envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 64), iter); } UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_set_response_nonce(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_DeltaDiscoveryRequest_set_error_detail(envoy_api_v2_DeltaDiscoveryRequest *msg, struct google_rpc_Status* value) { - UPB_FIELD_AT(msg, struct google_rpc_Status*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_rpc_Status*) = value; } UPB_INLINE struct google_rpc_Status* envoy_api_v2_DeltaDiscoveryRequest_mutable_error_detail(envoy_api_v2_DeltaDiscoveryRequest *msg, upb_arena *arena) { struct google_rpc_Status* sub = (struct google_rpc_Status*)envoy_api_v2_DeltaDiscoveryRequest_error_detail(msg); @@ -281,14 +288,15 @@ UPB_INLINE char *envoy_api_v2_DeltaDiscoveryResponse_serialize(const envoy_api_v return upb_encode(msg, &envoy_api_v2_DeltaDiscoveryResponse_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryResponse_system_version_info(const envoy_api_v2_DeltaDiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryResponse_system_version_info(const envoy_api_v2_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_DeltaDiscoveryResponse_has_resources(const envoy_api_v2_DeltaDiscoveryResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } UPB_INLINE const envoy_api_v2_Resource* const* envoy_api_v2_DeltaDiscoveryResponse_resources(const envoy_api_v2_DeltaDiscoveryResponse *msg, size_t *len) { return (const envoy_api_v2_Resource* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } -UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryResponse_type_url(const envoy_api_v2_DeltaDiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryResponse_nonce(const envoy_api_v2_DeltaDiscoveryResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } +UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryResponse_type_url(const envoy_api_v2_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_DeltaDiscoveryResponse_nonce(const envoy_api_v2_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } UPB_INLINE upb_strview const* envoy_api_v2_DeltaDiscoveryResponse_removed_resources(const envoy_api_v2_DeltaDiscoveryResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE void envoy_api_v2_DeltaDiscoveryResponse_set_system_version_info(envoy_api_v2_DeltaDiscoveryResponse *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE envoy_api_v2_Resource** envoy_api_v2_DeltaDiscoveryResponse_mutable_resources(envoy_api_v2_DeltaDiscoveryResponse *msg, size_t *len) { return (envoy_api_v2_Resource**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); @@ -304,10 +312,10 @@ UPB_INLINE struct envoy_api_v2_Resource* envoy_api_v2_DeltaDiscoveryResponse_add return sub; } UPB_INLINE void envoy_api_v2_DeltaDiscoveryResponse_set_type_url(envoy_api_v2_DeltaDiscoveryResponse *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_DeltaDiscoveryResponse_set_nonce(envoy_api_v2_DeltaDiscoveryResponse *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value; } UPB_INLINE upb_strview* envoy_api_v2_DeltaDiscoveryResponse_mutable_removed_resources(envoy_api_v2_DeltaDiscoveryResponse *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); @@ -334,16 +342,17 @@ UPB_INLINE char *envoy_api_v2_Resource_serialize(const envoy_api_v2_Resource *ms return upb_encode(msg, &envoy_api_v2_Resource_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_Resource_version(const envoy_api_v2_Resource *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_Resource_resource(const envoy_api_v2_Resource *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(16, 32)); } -UPB_INLINE upb_strview envoy_api_v2_Resource_name(const envoy_api_v2_Resource *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_Resource_version(const envoy_api_v2_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_Resource_has_resource(const envoy_api_v2_Resource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_Resource_resource(const envoy_api_v2_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Any*); } +UPB_INLINE upb_strview envoy_api_v2_Resource_name(const envoy_api_v2_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE upb_strview const* envoy_api_v2_Resource_aliases(const envoy_api_v2_Resource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE void envoy_api_v2_Resource_set_version(envoy_api_v2_Resource *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_Resource_set_resource(envoy_api_v2_Resource *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_api_v2_Resource_mutable_resource(envoy_api_v2_Resource *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_Resource_resource(msg); @@ -355,7 +364,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_Resource_mutable_resource(en return sub; } UPB_INLINE void envoy_api_v2_Resource_set_name(envoy_api_v2_Resource *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE upb_strview* envoy_api_v2_Resource_mutable_aliases(envoy_api_v2_Resource *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c index 8fe143f5039..fc8528ab8ab 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c @@ -30,7 +30,7 @@ static const upb_msglayout_field envoy_api_v2_ClusterLoadAssignment__fields[4] = {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(12, 24), 0, 2, 11, 3}, {4, UPB_SIZE(8, 16), 0, 1, 11, 1}, - {5, UPB_SIZE(16, 32), 0, 0, 11, 4}, + {5, UPB_SIZE(16, 32), 0, 0, 11, _UPB_LABEL_MAP}, }; const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h index f40783665c6..e6515db9e8b 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h @@ -57,15 +57,18 @@ UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_serialize(const envoy_api_v2 return upb_encode(msg, &envoy_api_v2_ClusterLoadAssignment_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_ClusterLoadAssignment_cluster_name(const envoy_api_v2_ClusterLoadAssignment *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_ClusterLoadAssignment_cluster_name(const envoy_api_v2_ClusterLoadAssignment *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_has_endpoints(const envoy_api_v2_ClusterLoadAssignment *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const struct envoy_api_v2_endpoint_LocalityLbEndpoints* const* envoy_api_v2_ClusterLoadAssignment_endpoints(const envoy_api_v2_ClusterLoadAssignment *msg, size_t *len) { return (const struct envoy_api_v2_endpoint_LocalityLbEndpoints* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } -UPB_INLINE const envoy_api_v2_ClusterLoadAssignment_Policy* envoy_api_v2_ClusterLoadAssignment_policy(const envoy_api_v2_ClusterLoadAssignment *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_ClusterLoadAssignment_Policy*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_has_policy(const envoy_api_v2_ClusterLoadAssignment *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const envoy_api_v2_ClusterLoadAssignment_Policy* envoy_api_v2_ClusterLoadAssignment_policy(const envoy_api_v2_ClusterLoadAssignment *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_api_v2_ClusterLoadAssignment_Policy*); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_has_named_endpoints(const envoy_api_v2_ClusterLoadAssignment *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE size_t envoy_api_v2_ClusterLoadAssignment_named_endpoints_size(const envoy_api_v2_ClusterLoadAssignment *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); } UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_named_endpoints_get(const envoy_api_v2_ClusterLoadAssignment *msg, upb_strview key, struct envoy_api_v2_endpoint_Endpoint* *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry* envoy_api_v2_ClusterLoadAssignment_named_endpoints_next(const envoy_api_v2_ClusterLoadAssignment *msg, size_t* iter) { return (const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); } UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_set_cluster_name(envoy_api_v2_ClusterLoadAssignment *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE struct envoy_api_v2_endpoint_LocalityLbEndpoints** envoy_api_v2_ClusterLoadAssignment_mutable_endpoints(envoy_api_v2_ClusterLoadAssignment *msg, size_t *len) { return (struct envoy_api_v2_endpoint_LocalityLbEndpoints**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); @@ -81,7 +84,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_LocalityLbEndpoints* envoy_api_v2_Cluste return sub; } UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_set_policy(envoy_api_v2_ClusterLoadAssignment *msg, envoy_api_v2_ClusterLoadAssignment_Policy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_ClusterLoadAssignment_Policy*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_api_v2_ClusterLoadAssignment_Policy*) = value; } UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment_Policy* envoy_api_v2_ClusterLoadAssignment_mutable_policy(envoy_api_v2_ClusterLoadAssignment *msg, upb_arena *arena) { struct envoy_api_v2_ClusterLoadAssignment_Policy* sub = (struct envoy_api_v2_ClusterLoadAssignment_Policy*)envoy_api_v2_ClusterLoadAssignment_policy(msg); @@ -111,10 +114,13 @@ UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_Policy_serialize(const envoy return upb_encode(msg, &envoy_api_v2_ClusterLoadAssignment_Policy_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_Policy_has_drop_overloads(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload* const* envoy_api_v2_ClusterLoadAssignment_Policy_drop_overloads(const envoy_api_v2_ClusterLoadAssignment_Policy *msg, size_t *len) { return (const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_ClusterLoadAssignment_Policy_overprovisioning_factor(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_ClusterLoadAssignment_Policy_endpoint_stale_after(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } -UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_Policy_disable_overprovisioning(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_Policy_has_overprovisioning_factor(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_ClusterLoadAssignment_Policy_overprovisioning_factor(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_Policy_has_endpoint_stale_after(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_ClusterLoadAssignment_Policy_endpoint_stale_after(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_Policy_disable_overprovisioning(const envoy_api_v2_ClusterLoadAssignment_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload** envoy_api_v2_ClusterLoadAssignment_Policy_mutable_drop_overloads(envoy_api_v2_ClusterLoadAssignment_Policy *msg, size_t *len) { return (envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); @@ -130,7 +136,7 @@ UPB_INLINE struct envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload* envoy_ return sub; } UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_set_overprovisioning_factor(envoy_api_v2_ClusterLoadAssignment_Policy *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_ClusterLoadAssignment_Policy_mutable_overprovisioning_factor(envoy_api_v2_ClusterLoadAssignment_Policy *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_ClusterLoadAssignment_Policy_overprovisioning_factor(msg); @@ -142,7 +148,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_ClusterLoadAssignmen return sub; } UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_set_endpoint_stale_after(envoy_api_v2_ClusterLoadAssignment_Policy *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_ClusterLoadAssignment_Policy_mutable_endpoint_stale_after(envoy_api_v2_ClusterLoadAssignment_Policy *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_ClusterLoadAssignment_Policy_endpoint_stale_after(msg); @@ -154,7 +160,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_ClusterLoadAssignment_P return sub; } UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_set_disable_overprovisioning(envoy_api_v2_ClusterLoadAssignment_Policy *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload */ @@ -171,14 +177,15 @@ UPB_INLINE char *envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_serializ return upb_encode(msg, &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_category(const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_category(const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_has_drop_percentage(const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_FractionalPercent*); } UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_set_category(envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_set_drop_percentage(envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg, struct envoy_type_FractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_FractionalPercent*) = value; } UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_mutable_drop_percentage(envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(msg); @@ -197,6 +204,7 @@ UPB_INLINE upb_strview envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_ke _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_has_value(const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct envoy_api_v2_endpoint_Endpoint* envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_value(const envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry *msg) { struct envoy_api_v2_endpoint_Endpoint* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c index ecdf2c2e03c..24e0e697c4c 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c @@ -54,11 +54,11 @@ static const upb_msglayout *const envoy_api_v2_endpoint_LbEndpoint_submsgs[3] = }; static const upb_msglayout_field envoy_api_v2_endpoint_LbEndpoint__fields[5] = { - {1, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 1, 11, 1}, + {1, UPB_SIZE(16, 24), UPB_SIZE(-24, -40), 1, 11, 1}, {2, UPB_SIZE(0, 0), 0, 0, 14, 1}, {3, UPB_SIZE(8, 8), 0, 0, 11, 1}, {4, UPB_SIZE(12, 16), 0, 2, 11, 1}, - {5, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 0, 9, 1}, + {5, UPB_SIZE(16, 24), UPB_SIZE(-24, -40), 0, 9, 1}, }; const upb_msglayout envoy_api_v2_endpoint_LbEndpoint_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h index 720bef3894c..d17fa4b59ad 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h @@ -55,12 +55,14 @@ UPB_INLINE char *envoy_api_v2_endpoint_Endpoint_serialize(const envoy_api_v2_end return upb_encode(msg, &envoy_api_v2_endpoint_Endpoint_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_Endpoint_address(const envoy_api_v2_endpoint_Endpoint *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Address*, UPB_SIZE(8, 16)); } -UPB_INLINE const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* envoy_api_v2_endpoint_Endpoint_health_check_config(const envoy_api_v2_endpoint_Endpoint *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig*, UPB_SIZE(12, 24)); } -UPB_INLINE upb_strview envoy_api_v2_endpoint_Endpoint_hostname(const envoy_api_v2_endpoint_Endpoint *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_endpoint_Endpoint_has_address(const envoy_api_v2_endpoint_Endpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_Endpoint_address(const envoy_api_v2_endpoint_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_Address*); } +UPB_INLINE bool envoy_api_v2_endpoint_Endpoint_has_health_check_config(const envoy_api_v2_endpoint_Endpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* envoy_api_v2_endpoint_Endpoint_health_check_config(const envoy_api_v2_endpoint_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig*); } +UPB_INLINE upb_strview envoy_api_v2_endpoint_Endpoint_hostname(const envoy_api_v2_endpoint_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_endpoint_Endpoint_set_address(envoy_api_v2_endpoint_Endpoint *msg, struct envoy_api_v2_core_Address* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Address*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_api_v2_core_Address*) = value; } UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_Endpoint_mutable_address(envoy_api_v2_endpoint_Endpoint *msg, upb_arena *arena) { struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_endpoint_Endpoint_address(msg); @@ -72,7 +74,7 @@ UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_Endpoint_muta return sub; } UPB_INLINE void envoy_api_v2_endpoint_Endpoint_set_health_check_config(envoy_api_v2_endpoint_Endpoint *msg, envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* value) { - UPB_FIELD_AT(msg, envoy_api_v2_endpoint_Endpoint_HealthCheckConfig*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_api_v2_endpoint_Endpoint_HealthCheckConfig*) = value; } UPB_INLINE struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* envoy_api_v2_endpoint_Endpoint_mutable_health_check_config(envoy_api_v2_endpoint_Endpoint *msg, upb_arena *arena) { struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* sub = (struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig*)envoy_api_v2_endpoint_Endpoint_health_check_config(msg); @@ -84,7 +86,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_Endpoint_HealthCheckConfig* envoy_api_v2 return sub; } UPB_INLINE void envoy_api_v2_endpoint_Endpoint_set_hostname(envoy_api_v2_endpoint_Endpoint *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.endpoint.Endpoint.HealthCheckConfig */ @@ -101,14 +103,14 @@ UPB_INLINE char *envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_serialize(cons return upb_encode(msg, &envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, arena, len); } -UPB_INLINE uint32_t envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_port_value(const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_hostname(const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE uint32_t envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_port_value(const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE upb_strview envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_hostname(const envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE void envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_set_port_value(envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_set_hostname(envoy_api_v2_endpoint_Endpoint_HealthCheckConfig *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } /* envoy.api.v2.endpoint.LbEndpoint */ @@ -130,13 +132,15 @@ typedef enum { envoy_api_v2_endpoint_LbEndpoint_host_identifier_endpoint_name = 5, envoy_api_v2_endpoint_LbEndpoint_host_identifier_NOT_SET = 0 } envoy_api_v2_endpoint_LbEndpoint_host_identifier_oneofcases; -UPB_INLINE envoy_api_v2_endpoint_LbEndpoint_host_identifier_oneofcases envoy_api_v2_endpoint_LbEndpoint_host_identifier_case(const envoy_api_v2_endpoint_LbEndpoint* msg) { return (envoy_api_v2_endpoint_LbEndpoint_host_identifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 40)); } +UPB_INLINE envoy_api_v2_endpoint_LbEndpoint_host_identifier_oneofcases envoy_api_v2_endpoint_LbEndpoint_host_identifier_case(const envoy_api_v2_endpoint_LbEndpoint* msg) { return (envoy_api_v2_endpoint_LbEndpoint_host_identifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(24, 40), int32_t); } UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_endpoint(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(24, 40), 1); } UPB_INLINE const envoy_api_v2_endpoint_Endpoint* envoy_api_v2_endpoint_LbEndpoint_endpoint(const envoy_api_v2_endpoint_LbEndpoint *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_endpoint_Endpoint*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 1, NULL); } -UPB_INLINE int32_t envoy_api_v2_endpoint_LbEndpoint_health_status(const envoy_api_v2_endpoint_LbEndpoint *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_endpoint_LbEndpoint_metadata(const envoy_api_v2_endpoint_LbEndpoint *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(8, 8)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LbEndpoint_load_balancing_weight(const envoy_api_v2_endpoint_LbEndpoint *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(12, 16)); } +UPB_INLINE int32_t envoy_api_v2_endpoint_LbEndpoint_health_status(const envoy_api_v2_endpoint_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_metadata(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } +UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_endpoint_LbEndpoint_metadata(const envoy_api_v2_endpoint_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_api_v2_core_Metadata*); } +UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_load_balancing_weight(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LbEndpoint_load_balancing_weight(const envoy_api_v2_endpoint_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); } UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_endpoint_name(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(24, 40), 5); } UPB_INLINE upb_strview envoy_api_v2_endpoint_LbEndpoint_endpoint_name(const envoy_api_v2_endpoint_LbEndpoint *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 5, upb_strview_make("", strlen(""))); } @@ -153,10 +157,10 @@ UPB_INLINE struct envoy_api_v2_endpoint_Endpoint* envoy_api_v2_endpoint_LbEndpoi return sub; } UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_health_status(envoy_api_v2_endpoint_LbEndpoint *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_metadata(envoy_api_v2_endpoint_LbEndpoint *msg, struct envoy_api_v2_core_Metadata* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct envoy_api_v2_core_Metadata*) = value; } UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_endpoint_LbEndpoint_mutable_metadata(envoy_api_v2_endpoint_LbEndpoint *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_endpoint_LbEndpoint_metadata(msg); @@ -168,7 +172,7 @@ UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_endpoint_LbEndpoint_m return sub; } UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_load_balancing_weight(envoy_api_v2_endpoint_LbEndpoint *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LbEndpoint_mutable_load_balancing_weight(envoy_api_v2_endpoint_LbEndpoint *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_endpoint_LbEndpoint_load_balancing_weight(msg); @@ -197,14 +201,18 @@ UPB_INLINE char *envoy_api_v2_endpoint_LocalityLbEndpoints_serialize(const envoy return upb_encode(msg, &envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_LocalityLbEndpoints_locality(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Locality*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_endpoint_LocalityLbEndpoints_has_locality(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_LocalityLbEndpoints_locality(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_api_v2_core_Locality*); } +UPB_INLINE bool envoy_api_v2_endpoint_LocalityLbEndpoints_has_lb_endpoints(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const envoy_api_v2_endpoint_LbEndpoint* const* envoy_api_v2_endpoint_LocalityLbEndpoints_lb_endpoints(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg, size_t *len) { return (const envoy_api_v2_endpoint_LbEndpoint* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbEndpoints_load_balancing_weight(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } -UPB_INLINE uint32_t envoy_api_v2_endpoint_LocalityLbEndpoints_priority(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbEndpoints_proximity(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_api_v2_endpoint_LocalityLbEndpoints_has_load_balancing_weight(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbEndpoints_load_balancing_weight(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); } +UPB_INLINE uint32_t envoy_api_v2_endpoint_LocalityLbEndpoints_priority(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE bool envoy_api_v2_endpoint_LocalityLbEndpoints_has_proximity(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbEndpoints_proximity(const envoy_api_v2_endpoint_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_api_v2_endpoint_LocalityLbEndpoints_set_locality(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, struct envoy_api_v2_core_Locality* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Locality*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_api_v2_core_Locality*) = value; } UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_LocalityLbEndpoints_mutable_locality(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena) { struct envoy_api_v2_core_Locality* sub = (struct envoy_api_v2_core_Locality*)envoy_api_v2_endpoint_LocalityLbEndpoints_locality(msg); @@ -229,7 +237,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_LbEndpoint* envoy_api_v2_endpoint_Locali return sub; } UPB_INLINE void envoy_api_v2_endpoint_LocalityLbEndpoints_set_load_balancing_weight(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbEndpoints_mutable_load_balancing_weight(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_endpoint_LocalityLbEndpoints_load_balancing_weight(msg); @@ -241,10 +249,10 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbE return sub; } UPB_INLINE void envoy_api_v2_endpoint_LocalityLbEndpoints_set_priority(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_LocalityLbEndpoints_set_proximity(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LocalityLbEndpoints_mutable_proximity(envoy_api_v2_endpoint_LocalityLbEndpoints *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_endpoint_LocalityLbEndpoints_proximity(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h index 52841485199..2e3c60022af 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h @@ -58,17 +58,20 @@ UPB_INLINE char *envoy_api_v2_endpoint_UpstreamLocalityStats_serialize(const env return upb_encode(msg, &envoy_api_v2_endpoint_UpstreamLocalityStats_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_UpstreamLocalityStats_locality(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Locality*, UPB_SIZE(36, 40)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamLocalityStats_total_successful_requests(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamLocalityStats_total_requests_in_progress(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamLocalityStats_total_error_requests(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool envoy_api_v2_endpoint_UpstreamLocalityStats_has_locality(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 40)); } +UPB_INLINE const struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_UpstreamLocalityStats_locality(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), const struct envoy_api_v2_core_Locality*); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamLocalityStats_total_successful_requests(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamLocalityStats_total_requests_in_progress(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamLocalityStats_total_error_requests(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } +UPB_INLINE bool envoy_api_v2_endpoint_UpstreamLocalityStats_has_load_metric_stats(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 48)); } UPB_INLINE const envoy_api_v2_endpoint_EndpointLoadMetricStats* const* envoy_api_v2_endpoint_UpstreamLocalityStats_load_metric_stats(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg, size_t *len) { return (const envoy_api_v2_endpoint_EndpointLoadMetricStats* const*)_upb_array_accessor(msg, UPB_SIZE(40, 48), len); } -UPB_INLINE uint32_t envoy_api_v2_endpoint_UpstreamLocalityStats_priority(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(32, 32)); } +UPB_INLINE uint32_t envoy_api_v2_endpoint_UpstreamLocalityStats_priority(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint32_t); } +UPB_INLINE bool envoy_api_v2_endpoint_UpstreamLocalityStats_has_upstream_endpoint_stats(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 56)); } UPB_INLINE const envoy_api_v2_endpoint_UpstreamEndpointStats* const* envoy_api_v2_endpoint_UpstreamLocalityStats_upstream_endpoint_stats(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg, size_t *len) { return (const envoy_api_v2_endpoint_UpstreamEndpointStats* const*)_upb_array_accessor(msg, UPB_SIZE(44, 56), len); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamLocalityStats_total_issued_requests(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamLocalityStats_total_issued_requests(const envoy_api_v2_endpoint_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } UPB_INLINE void envoy_api_v2_endpoint_UpstreamLocalityStats_set_locality(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, struct envoy_api_v2_core_Locality* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Locality*, UPB_SIZE(36, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 40), struct envoy_api_v2_core_Locality*) = value; } UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_UpstreamLocalityStats_mutable_locality(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, upb_arena *arena) { struct envoy_api_v2_core_Locality* sub = (struct envoy_api_v2_core_Locality*)envoy_api_v2_endpoint_UpstreamLocalityStats_locality(msg); @@ -80,13 +83,13 @@ UPB_INLINE struct envoy_api_v2_core_Locality* envoy_api_v2_endpoint_UpstreamLoca return sub; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamLocalityStats_set_total_successful_requests(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamLocalityStats_set_total_requests_in_progress(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamLocalityStats_set_total_error_requests(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE envoy_api_v2_endpoint_EndpointLoadMetricStats** envoy_api_v2_endpoint_UpstreamLocalityStats_mutable_load_metric_stats(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, size_t *len) { return (envoy_api_v2_endpoint_EndpointLoadMetricStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 48), len); @@ -102,7 +105,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_EndpointLoadMetricStats* envoy_api_v2_en return sub; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamLocalityStats_set_priority(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint32_t) = value; } UPB_INLINE envoy_api_v2_endpoint_UpstreamEndpointStats** envoy_api_v2_endpoint_UpstreamLocalityStats_mutable_upstream_endpoint_stats(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, size_t *len) { return (envoy_api_v2_endpoint_UpstreamEndpointStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 56), len); @@ -118,7 +121,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_UpstreamEndpointStats* envoy_api_v2_endp return sub; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamLocalityStats_set_total_issued_requests(envoy_api_v2_endpoint_UpstreamLocalityStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value; } /* envoy.api.v2.endpoint.UpstreamEndpointStats */ @@ -135,16 +138,19 @@ UPB_INLINE char *envoy_api_v2_endpoint_UpstreamEndpointStats_serialize(const env return upb_encode(msg, &envoy_api_v2_endpoint_UpstreamEndpointStats_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_UpstreamEndpointStats_address(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Address*, UPB_SIZE(32, 32)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamEndpointStats_total_successful_requests(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamEndpointStats_total_requests_in_progress(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamEndpointStats_total_error_requests(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE bool envoy_api_v2_endpoint_UpstreamEndpointStats_has_address(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 32)); } +UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_UpstreamEndpointStats_address(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), const struct envoy_api_v2_core_Address*); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamEndpointStats_total_successful_requests(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamEndpointStats_total_requests_in_progress(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamEndpointStats_total_error_requests(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } +UPB_INLINE bool envoy_api_v2_endpoint_UpstreamEndpointStats_has_load_metric_stats(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 48)); } UPB_INLINE const envoy_api_v2_endpoint_EndpointLoadMetricStats* const* envoy_api_v2_endpoint_UpstreamEndpointStats_load_metric_stats(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg, size_t *len) { return (const envoy_api_v2_endpoint_EndpointLoadMetricStats* const*)_upb_array_accessor(msg, UPB_SIZE(40, 48), len); } -UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_endpoint_UpstreamEndpointStats_metadata(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Struct*, UPB_SIZE(36, 40)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamEndpointStats_total_issued_requests(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool envoy_api_v2_endpoint_UpstreamEndpointStats_has_metadata(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 40)); } +UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_endpoint_UpstreamEndpointStats_metadata(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), const struct google_protobuf_Struct*); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_UpstreamEndpointStats_total_issued_requests(const envoy_api_v2_endpoint_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_address(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, struct envoy_api_v2_core_Address* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Address*, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), struct envoy_api_v2_core_Address*) = value; } UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_UpstreamEndpointStats_mutable_address(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, upb_arena *arena) { struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_endpoint_UpstreamEndpointStats_address(msg); @@ -156,13 +162,13 @@ UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_endpoint_UpstreamEndpo return sub; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_total_successful_requests(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_total_requests_in_progress(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_total_error_requests(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE envoy_api_v2_endpoint_EndpointLoadMetricStats** envoy_api_v2_endpoint_UpstreamEndpointStats_mutable_load_metric_stats(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, size_t *len) { return (envoy_api_v2_endpoint_EndpointLoadMetricStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 48), len); @@ -178,7 +184,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_EndpointLoadMetricStats* envoy_api_v2_en return sub; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_metadata(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, struct google_protobuf_Struct* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Struct*, UPB_SIZE(36, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 40), struct google_protobuf_Struct*) = value; } UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_endpoint_UpstreamEndpointStats_mutable_metadata(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, upb_arena *arena) { struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_api_v2_endpoint_UpstreamEndpointStats_metadata(msg); @@ -190,7 +196,7 @@ UPB_INLINE struct google_protobuf_Struct* envoy_api_v2_endpoint_UpstreamEndpoint return sub; } UPB_INLINE void envoy_api_v2_endpoint_UpstreamEndpointStats_set_total_issued_requests(envoy_api_v2_endpoint_UpstreamEndpointStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value; } /* envoy.api.v2.endpoint.EndpointLoadMetricStats */ @@ -207,18 +213,18 @@ UPB_INLINE char *envoy_api_v2_endpoint_EndpointLoadMetricStats_serialize(const e return upb_encode(msg, &envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_endpoint_EndpointLoadMetricStats_metric_name(const envoy_api_v2_endpoint_EndpointLoadMetricStats *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 16)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_EndpointLoadMetricStats_num_requests_finished_with_metric(const envoy_api_v2_endpoint_EndpointLoadMetricStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)); } -UPB_INLINE double envoy_api_v2_endpoint_EndpointLoadMetricStats_total_metric_value(const envoy_api_v2_endpoint_EndpointLoadMetricStats *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); } +UPB_INLINE upb_strview envoy_api_v2_endpoint_EndpointLoadMetricStats_metric_name(const envoy_api_v2_endpoint_EndpointLoadMetricStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_EndpointLoadMetricStats_num_requests_finished_with_metric(const envoy_api_v2_endpoint_EndpointLoadMetricStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); } +UPB_INLINE double envoy_api_v2_endpoint_EndpointLoadMetricStats_total_metric_value(const envoy_api_v2_endpoint_EndpointLoadMetricStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double); } UPB_INLINE void envoy_api_v2_endpoint_EndpointLoadMetricStats_set_metric_name(envoy_api_v2_endpoint_EndpointLoadMetricStats *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_endpoint_EndpointLoadMetricStats_set_num_requests_finished_with_metric(envoy_api_v2_endpoint_EndpointLoadMetricStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_EndpointLoadMetricStats_set_total_metric_value(envoy_api_v2_endpoint_EndpointLoadMetricStats *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double) = value; } /* envoy.api.v2.endpoint.ClusterStats */ @@ -235,15 +241,18 @@ UPB_INLINE char *envoy_api_v2_endpoint_ClusterStats_serialize(const envoy_api_v2 return upb_encode(msg, &envoy_api_v2_endpoint_ClusterStats_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_endpoint_ClusterStats_cluster_name(const envoy_api_v2_endpoint_ClusterStats *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } +UPB_INLINE upb_strview envoy_api_v2_endpoint_ClusterStats_cluster_name(const envoy_api_v2_endpoint_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE bool envoy_api_v2_endpoint_ClusterStats_has_upstream_locality_stats(const envoy_api_v2_endpoint_ClusterStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); } UPB_INLINE const envoy_api_v2_endpoint_UpstreamLocalityStats* const* envoy_api_v2_endpoint_ClusterStats_upstream_locality_stats(const envoy_api_v2_endpoint_ClusterStats *msg, size_t *len) { return (const envoy_api_v2_endpoint_UpstreamLocalityStats* const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_ClusterStats_total_dropped_requests(const envoy_api_v2_endpoint_ClusterStats *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_endpoint_ClusterStats_load_report_interval(const envoy_api_v2_endpoint_ClusterStats *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(24, 40)); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_ClusterStats_total_dropped_requests(const envoy_api_v2_endpoint_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); } +UPB_INLINE bool envoy_api_v2_endpoint_ClusterStats_has_load_report_interval(const envoy_api_v2_endpoint_ClusterStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_endpoint_ClusterStats_load_report_interval(const envoy_api_v2_endpoint_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_endpoint_ClusterStats_has_dropped_requests(const envoy_api_v2_endpoint_ClusterStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); } UPB_INLINE const envoy_api_v2_endpoint_ClusterStats_DroppedRequests* const* envoy_api_v2_endpoint_ClusterStats_dropped_requests(const envoy_api_v2_endpoint_ClusterStats *msg, size_t *len) { return (const envoy_api_v2_endpoint_ClusterStats_DroppedRequests* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); } -UPB_INLINE upb_strview envoy_api_v2_endpoint_ClusterStats_cluster_service_name(const envoy_api_v2_endpoint_ClusterStats *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); } +UPB_INLINE upb_strview envoy_api_v2_endpoint_ClusterStats_cluster_service_name(const envoy_api_v2_endpoint_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); } UPB_INLINE void envoy_api_v2_endpoint_ClusterStats_set_cluster_name(envoy_api_v2_endpoint_ClusterStats *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE envoy_api_v2_endpoint_UpstreamLocalityStats** envoy_api_v2_endpoint_ClusterStats_mutable_upstream_locality_stats(envoy_api_v2_endpoint_ClusterStats *msg, size_t *len) { return (envoy_api_v2_endpoint_UpstreamLocalityStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len); @@ -259,10 +268,10 @@ UPB_INLINE struct envoy_api_v2_endpoint_UpstreamLocalityStats* envoy_api_v2_endp return sub; } UPB_INLINE void envoy_api_v2_endpoint_ClusterStats_set_total_dropped_requests(envoy_api_v2_endpoint_ClusterStats *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value; } UPB_INLINE void envoy_api_v2_endpoint_ClusterStats_set_load_report_interval(envoy_api_v2_endpoint_ClusterStats *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_endpoint_ClusterStats_mutable_load_report_interval(envoy_api_v2_endpoint_ClusterStats *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_endpoint_ClusterStats_load_report_interval(msg); @@ -287,7 +296,7 @@ UPB_INLINE struct envoy_api_v2_endpoint_ClusterStats_DroppedRequests* envoy_api_ return sub; } UPB_INLINE void envoy_api_v2_endpoint_ClusterStats_set_cluster_service_name(envoy_api_v2_endpoint_ClusterStats *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value; } /* envoy.api.v2.endpoint.ClusterStats.DroppedRequests */ @@ -304,14 +313,14 @@ UPB_INLINE char *envoy_api_v2_endpoint_ClusterStats_DroppedRequests_serialize(co return upb_encode(msg, &envoy_api_v2_endpoint_ClusterStats_DroppedRequests_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_endpoint_ClusterStats_DroppedRequests_category(const envoy_api_v2_endpoint_ClusterStats_DroppedRequests *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE uint64_t envoy_api_v2_endpoint_ClusterStats_DroppedRequests_dropped_count(const envoy_api_v2_endpoint_ClusterStats_DroppedRequests *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_endpoint_ClusterStats_DroppedRequests_category(const envoy_api_v2_endpoint_ClusterStats_DroppedRequests *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE uint64_t envoy_api_v2_endpoint_ClusterStats_DroppedRequests_dropped_count(const envoy_api_v2_endpoint_ClusterStats_DroppedRequests *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); } UPB_INLINE void envoy_api_v2_endpoint_ClusterStats_DroppedRequests_set_category(envoy_api_v2_endpoint_ClusterStats_DroppedRequests *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_endpoint_ClusterStats_DroppedRequests_set_dropped_count(envoy_api_v2_endpoint_ClusterStats_DroppedRequests *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c index 455b3c2d414..a47cb801256 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c @@ -90,7 +90,7 @@ static const upb_msglayout *const envoy_api_v2_Listener_ConnectionBalanceConfig_ }; static const upb_msglayout_field envoy_api_v2_Listener_ConnectionBalanceConfig__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h index f944bfaeea2..5b8744c2685 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h @@ -74,33 +74,49 @@ UPB_INLINE char *envoy_api_v2_Listener_serialize(const envoy_api_v2_Listener *ms return upb_encode(msg, &envoy_api_v2_Listener_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_Listener_name(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 24)); } -UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_Listener_address(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Address*, UPB_SIZE(28, 40)); } +UPB_INLINE upb_strview envoy_api_v2_Listener_name(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview); } +UPB_INLINE bool envoy_api_v2_Listener_has_address(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 40)); } +UPB_INLINE const struct envoy_api_v2_core_Address* envoy_api_v2_Listener_address(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), const struct envoy_api_v2_core_Address*); } +UPB_INLINE bool envoy_api_v2_Listener_has_filter_chains(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 136)); } UPB_INLINE const struct envoy_api_v2_listener_FilterChain* const* envoy_api_v2_Listener_filter_chains(const envoy_api_v2_Listener *msg, size_t *len) { return (const struct envoy_api_v2_listener_FilterChain* const*)_upb_array_accessor(msg, UPB_SIZE(76, 136), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_use_original_dst(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(32, 48)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Listener_per_connection_buffer_limit_bytes(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(36, 56)); } -UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_Listener_metadata(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(40, 64)); } -UPB_INLINE const envoy_api_v2_Listener_DeprecatedV1* envoy_api_v2_Listener_deprecated_v1(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Listener_DeprecatedV1*, UPB_SIZE(44, 72)); } -UPB_INLINE int32_t envoy_api_v2_Listener_drain_type(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Listener_has_use_original_dst(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 48)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_use_original_dst(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 48), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_Listener_has_per_connection_buffer_limit_bytes(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 56)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Listener_per_connection_buffer_limit_bytes(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_Listener_has_metadata(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 64)); } +UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_Listener_metadata(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 64), const struct envoy_api_v2_core_Metadata*); } +UPB_INLINE bool envoy_api_v2_Listener_has_deprecated_v1(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 72)); } +UPB_INLINE const envoy_api_v2_Listener_DeprecatedV1* envoy_api_v2_Listener_deprecated_v1(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 72), const envoy_api_v2_Listener_DeprecatedV1*); } +UPB_INLINE int32_t envoy_api_v2_Listener_drain_type(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_Listener_has_listener_filters(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 144)); } UPB_INLINE const struct envoy_api_v2_listener_ListenerFilter* const* envoy_api_v2_Listener_listener_filters(const envoy_api_v2_Listener *msg, size_t *len) { return (const struct envoy_api_v2_listener_ListenerFilter* const*)_upb_array_accessor(msg, UPB_SIZE(80, 144), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_transparent(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(48, 80)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_freebind(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(52, 88)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Listener_tcp_fast_open_queue_length(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(56, 96)); } +UPB_INLINE bool envoy_api_v2_Listener_has_transparent(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 80)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_transparent(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 80), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_Listener_has_freebind(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 88)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_freebind(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 88), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_Listener_has_tcp_fast_open_queue_length(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 96)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_Listener_tcp_fast_open_queue_length(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 96), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_Listener_has_socket_options(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 152)); } UPB_INLINE const struct envoy_api_v2_core_SocketOption* const* envoy_api_v2_Listener_socket_options(const envoy_api_v2_Listener *msg, size_t *len) { return (const struct envoy_api_v2_core_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(84, 152), len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Listener_listener_filters_timeout(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(60, 104)); } -UPB_INLINE int32_t envoy_api_v2_Listener_traffic_direction(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } -UPB_INLINE bool envoy_api_v2_Listener_continue_on_listener_filters_timeout(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); } -UPB_INLINE const struct envoy_api_v2_listener_UdpListenerConfig* envoy_api_v2_Listener_udp_listener_config(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_listener_UdpListenerConfig*, UPB_SIZE(64, 112)); } -UPB_INLINE const struct envoy_config_listener_v2_ApiListener* envoy_api_v2_Listener_api_listener(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const struct envoy_config_listener_v2_ApiListener*, UPB_SIZE(68, 120)); } -UPB_INLINE const envoy_api_v2_Listener_ConnectionBalanceConfig* envoy_api_v2_Listener_connection_balance_config(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Listener_ConnectionBalanceConfig*, UPB_SIZE(72, 128)); } -UPB_INLINE bool envoy_api_v2_Listener_reuse_port(const envoy_api_v2_Listener *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)); } +UPB_INLINE bool envoy_api_v2_Listener_has_listener_filters_timeout(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 104)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Listener_listener_filters_timeout(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 104), const struct google_protobuf_Duration*); } +UPB_INLINE int32_t envoy_api_v2_Listener_traffic_direction(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } +UPB_INLINE bool envoy_api_v2_Listener_continue_on_listener_filters_timeout(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } +UPB_INLINE bool envoy_api_v2_Listener_has_udp_listener_config(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 112)); } +UPB_INLINE const struct envoy_api_v2_listener_UdpListenerConfig* envoy_api_v2_Listener_udp_listener_config(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 112), const struct envoy_api_v2_listener_UdpListenerConfig*); } +UPB_INLINE bool envoy_api_v2_Listener_has_api_listener(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 120)); } +UPB_INLINE const struct envoy_config_listener_v2_ApiListener* envoy_api_v2_Listener_api_listener(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 120), const struct envoy_config_listener_v2_ApiListener*); } +UPB_INLINE bool envoy_api_v2_Listener_has_connection_balance_config(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 128)); } +UPB_INLINE const envoy_api_v2_Listener_ConnectionBalanceConfig* envoy_api_v2_Listener_connection_balance_config(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 128), const envoy_api_v2_Listener_ConnectionBalanceConfig*); } +UPB_INLINE bool envoy_api_v2_Listener_reuse_port(const envoy_api_v2_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); } +UPB_INLINE bool envoy_api_v2_Listener_has_access_log(const envoy_api_v2_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 160)); } UPB_INLINE const struct envoy_config_filter_accesslog_v2_AccessLog* const* envoy_api_v2_Listener_access_log(const envoy_api_v2_Listener *msg, size_t *len) { return (const struct envoy_config_filter_accesslog_v2_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(88, 160), len); } UPB_INLINE void envoy_api_v2_Listener_set_name(envoy_api_v2_Listener *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview) = value; } UPB_INLINE void envoy_api_v2_Listener_set_address(envoy_api_v2_Listener *msg, struct envoy_api_v2_core_Address* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Address*, UPB_SIZE(28, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 40), struct envoy_api_v2_core_Address*) = value; } UPB_INLINE struct envoy_api_v2_core_Address* envoy_api_v2_Listener_mutable_address(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_core_Address* sub = (struct envoy_api_v2_core_Address*)envoy_api_v2_Listener_address(msg); @@ -125,7 +141,7 @@ UPB_INLINE struct envoy_api_v2_listener_FilterChain* envoy_api_v2_Listener_add_f return sub; } UPB_INLINE void envoy_api_v2_Listener_set_use_original_dst(envoy_api_v2_Listener *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(32, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 48), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_use_original_dst(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_use_original_dst(msg); @@ -137,7 +153,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_use_o return sub; } UPB_INLINE void envoy_api_v2_Listener_set_per_connection_buffer_limit_bytes(envoy_api_v2_Listener *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(36, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 56), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Listener_mutable_per_connection_buffer_limit_bytes(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Listener_per_connection_buffer_limit_bytes(msg); @@ -149,7 +165,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Listener_mutable_per return sub; } UPB_INLINE void envoy_api_v2_Listener_set_metadata(envoy_api_v2_Listener *msg, struct envoy_api_v2_core_Metadata* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(40, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 64), struct envoy_api_v2_core_Metadata*) = value; } UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_Listener_mutable_metadata(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_Listener_metadata(msg); @@ -161,7 +177,7 @@ UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_Listener_mutable_meta return sub; } UPB_INLINE void envoy_api_v2_Listener_set_deprecated_v1(envoy_api_v2_Listener *msg, envoy_api_v2_Listener_DeprecatedV1* value) { - UPB_FIELD_AT(msg, envoy_api_v2_Listener_DeprecatedV1*, UPB_SIZE(44, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 72), envoy_api_v2_Listener_DeprecatedV1*) = value; } UPB_INLINE struct envoy_api_v2_Listener_DeprecatedV1* envoy_api_v2_Listener_mutable_deprecated_v1(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_Listener_DeprecatedV1* sub = (struct envoy_api_v2_Listener_DeprecatedV1*)envoy_api_v2_Listener_deprecated_v1(msg); @@ -173,7 +189,7 @@ UPB_INLINE struct envoy_api_v2_Listener_DeprecatedV1* envoy_api_v2_Listener_muta return sub; } UPB_INLINE void envoy_api_v2_Listener_set_drain_type(envoy_api_v2_Listener *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE struct envoy_api_v2_listener_ListenerFilter** envoy_api_v2_Listener_mutable_listener_filters(envoy_api_v2_Listener *msg, size_t *len) { return (struct envoy_api_v2_listener_ListenerFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(80, 144), len); @@ -189,7 +205,7 @@ UPB_INLINE struct envoy_api_v2_listener_ListenerFilter* envoy_api_v2_Listener_ad return sub; } UPB_INLINE void envoy_api_v2_Listener_set_transparent(envoy_api_v2_Listener *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(48, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 80), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_transparent(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_transparent(msg); @@ -201,7 +217,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_trans return sub; } UPB_INLINE void envoy_api_v2_Listener_set_freebind(envoy_api_v2_Listener *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(52, 88)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 88), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_freebind(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_freebind(msg); @@ -213,7 +229,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_mutable_freeb return sub; } UPB_INLINE void envoy_api_v2_Listener_set_tcp_fast_open_queue_length(envoy_api_v2_Listener *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(56, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 96), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_Listener_mutable_tcp_fast_open_queue_length(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_Listener_tcp_fast_open_queue_length(msg); @@ -238,7 +254,7 @@ UPB_INLINE struct envoy_api_v2_core_SocketOption* envoy_api_v2_Listener_add_sock return sub; } UPB_INLINE void envoy_api_v2_Listener_set_listener_filters_timeout(envoy_api_v2_Listener *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(60, 104)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 104), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Listener_mutable_listener_filters_timeout(envoy_api_v2_Listener *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_Listener_listener_filters_timeout(msg); @@ -250,13 +266,13 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_Listener_mutable_listen return sub; } UPB_INLINE void envoy_api_v2_Listener_set_traffic_direction(envoy_api_v2_Listener *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void envoy_api_v2_Listener_set_continue_on_listener_filters_timeout(envoy_api_v2_Listener *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value; } UPB_INLINE void envoy_api_v2_Listener_set_udp_listener_config(envoy_api_v2_Listener *msg, struct envoy_api_v2_listener_UdpListenerConfig* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_listener_UdpListenerConfig*, UPB_SIZE(64, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 112), struct envoy_api_v2_listener_UdpListenerConfig*) = value; } UPB_INLINE struct envoy_api_v2_listener_UdpListenerConfig* envoy_api_v2_Listener_mutable_udp_listener_config(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_listener_UdpListenerConfig* sub = (struct envoy_api_v2_listener_UdpListenerConfig*)envoy_api_v2_Listener_udp_listener_config(msg); @@ -268,7 +284,7 @@ UPB_INLINE struct envoy_api_v2_listener_UdpListenerConfig* envoy_api_v2_Listener return sub; } UPB_INLINE void envoy_api_v2_Listener_set_api_listener(envoy_api_v2_Listener *msg, struct envoy_config_listener_v2_ApiListener* value) { - UPB_FIELD_AT(msg, struct envoy_config_listener_v2_ApiListener*, UPB_SIZE(68, 120)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 120), struct envoy_config_listener_v2_ApiListener*) = value; } UPB_INLINE struct envoy_config_listener_v2_ApiListener* envoy_api_v2_Listener_mutable_api_listener(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_config_listener_v2_ApiListener* sub = (struct envoy_config_listener_v2_ApiListener*)envoy_api_v2_Listener_api_listener(msg); @@ -280,7 +296,7 @@ UPB_INLINE struct envoy_config_listener_v2_ApiListener* envoy_api_v2_Listener_mu return sub; } UPB_INLINE void envoy_api_v2_Listener_set_connection_balance_config(envoy_api_v2_Listener *msg, envoy_api_v2_Listener_ConnectionBalanceConfig* value) { - UPB_FIELD_AT(msg, envoy_api_v2_Listener_ConnectionBalanceConfig*, UPB_SIZE(72, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(72, 128), envoy_api_v2_Listener_ConnectionBalanceConfig*) = value; } UPB_INLINE struct envoy_api_v2_Listener_ConnectionBalanceConfig* envoy_api_v2_Listener_mutable_connection_balance_config(envoy_api_v2_Listener *msg, upb_arena *arena) { struct envoy_api_v2_Listener_ConnectionBalanceConfig* sub = (struct envoy_api_v2_Listener_ConnectionBalanceConfig*)envoy_api_v2_Listener_connection_balance_config(msg); @@ -292,7 +308,7 @@ UPB_INLINE struct envoy_api_v2_Listener_ConnectionBalanceConfig* envoy_api_v2_Li return sub; } UPB_INLINE void envoy_api_v2_Listener_set_reuse_port(envoy_api_v2_Listener *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool) = value; } UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLog** envoy_api_v2_Listener_mutable_access_log(envoy_api_v2_Listener *msg, size_t *len) { return (struct envoy_config_filter_accesslog_v2_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(88, 160), len); @@ -322,10 +338,11 @@ UPB_INLINE char *envoy_api_v2_Listener_DeprecatedV1_serialize(const envoy_api_v2 return upb_encode(msg, &envoy_api_v2_Listener_DeprecatedV1_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_DeprecatedV1_bind_to_port(const envoy_api_v2_Listener_DeprecatedV1 *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Listener_DeprecatedV1_has_bind_to_port(const envoy_api_v2_Listener_DeprecatedV1 *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_Listener_DeprecatedV1_bind_to_port(const envoy_api_v2_Listener_DeprecatedV1 *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_BoolValue*); } UPB_INLINE void envoy_api_v2_Listener_DeprecatedV1_set_bind_to_port(envoy_api_v2_Listener_DeprecatedV1 *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_Listener_DeprecatedV1_mutable_bind_to_port(envoy_api_v2_Listener_DeprecatedV1 *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_Listener_DeprecatedV1_bind_to_port(msg); @@ -355,7 +372,7 @@ typedef enum { envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_exact_balance = 1, envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_NOT_SET = 0 } envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases; -UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_case(const envoy_api_v2_Listener_ConnectionBalanceConfig* msg) { return (envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_case(const envoy_api_v2_Listener_ConnectionBalanceConfig* msg) { return (envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_api_v2_Listener_ConnectionBalanceConfig_has_exact_balance(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* envoy_api_v2_Listener_ConnectionBalanceConfig_exact_balance(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c index a014cd12d51..054c15af86d 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c @@ -29,8 +29,8 @@ static const upb_msglayout *const envoy_api_v2_listener_Filter_submsgs[2] = { static const upb_msglayout_field envoy_api_v2_listener_Filter__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_listener_Filter_msginit = { @@ -49,7 +49,7 @@ static const upb_msglayout_field envoy_api_v2_listener_FilterChainMatch__fields[ {4, UPB_SIZE(8, 8), 0, 0, 9, 1}, {5, UPB_SIZE(24, 40), 0, 1, 11, 1}, {6, UPB_SIZE(36, 64), 0, 0, 11, 3}, - {7, UPB_SIZE(40, 72), 0, 0, 13, 3}, + {7, UPB_SIZE(40, 72), 0, 0, 13, _UPB_LABEL_PACKED}, {8, UPB_SIZE(28, 48), 0, 1, 11, 1}, {9, UPB_SIZE(16, 24), 0, 0, 9, 1}, {10, UPB_SIZE(44, 80), 0, 0, 9, 3}, @@ -95,11 +95,11 @@ static const upb_msglayout *const envoy_api_v2_listener_ListenerFilterChainMatch }; static const upb_msglayout_field envoy_api_v2_listener_ListenerFilterChainMatchPredicate__fields[5] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 8, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 8, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, }; const upb_msglayout envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit = { @@ -130,8 +130,8 @@ static const upb_msglayout *const envoy_api_v2_listener_ListenerFilter_submsgs[3 static const upb_msglayout_field envoy_api_v2_listener_ListenerFilter__fields[4] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 2, 11, 1}, - {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1}, + {2, UPB_SIZE(12, 24), UPB_SIZE(-16, -32), 2, 11, 1}, + {3, UPB_SIZE(12, 24), UPB_SIZE(-16, -32), 1, 11, 1}, {4, UPB_SIZE(8, 16), 0, 0, 11, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h index 7b779136e94..9cd40854f6f 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h @@ -82,16 +82,16 @@ typedef enum { envoy_api_v2_listener_Filter_config_type_typed_config = 4, envoy_api_v2_listener_Filter_config_type_NOT_SET = 0 } envoy_api_v2_listener_Filter_config_type_oneofcases; -UPB_INLINE envoy_api_v2_listener_Filter_config_type_oneofcases envoy_api_v2_listener_Filter_config_type_case(const envoy_api_v2_listener_Filter* msg) { return (envoy_api_v2_listener_Filter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_listener_Filter_config_type_oneofcases envoy_api_v2_listener_Filter_config_type_case(const envoy_api_v2_listener_Filter* msg) { return (envoy_api_v2_listener_Filter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_listener_Filter_name(const envoy_api_v2_listener_Filter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_listener_Filter_name(const envoy_api_v2_listener_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_listener_Filter_has_config(const envoy_api_v2_listener_Filter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_Filter_config(const envoy_api_v2_listener_Filter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_listener_Filter_has_typed_config(const envoy_api_v2_listener_Filter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_Filter_typed_config(const envoy_api_v2_listener_Filter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); } UPB_INLINE void envoy_api_v2_listener_Filter_set_name(envoy_api_v2_listener_Filter *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_listener_Filter_set_config(envoy_api_v2_listener_Filter *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); @@ -132,16 +132,20 @@ UPB_INLINE char *envoy_api_v2_listener_FilterChainMatch_serialize(const envoy_ap return upb_encode(msg, &envoy_api_v2_listener_FilterChainMatch_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_has_prefix_ranges(const envoy_api_v2_listener_FilterChainMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); } UPB_INLINE const struct envoy_api_v2_core_CidrRange* const* envoy_api_v2_listener_FilterChainMatch_prefix_ranges(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (const struct envoy_api_v2_core_CidrRange* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); } -UPB_INLINE upb_strview envoy_api_v2_listener_FilterChainMatch_address_suffix(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_suffix_len(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)); } +UPB_INLINE upb_strview envoy_api_v2_listener_FilterChainMatch_address_suffix(const envoy_api_v2_listener_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_has_suffix_len(const envoy_api_v2_listener_FilterChainMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_suffix_len(const envoy_api_v2_listener_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_has_source_prefix_ranges(const envoy_api_v2_listener_FilterChainMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); } UPB_INLINE const struct envoy_api_v2_core_CidrRange* const* envoy_api_v2_listener_FilterChainMatch_source_prefix_ranges(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (const struct envoy_api_v2_core_CidrRange* const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); } UPB_INLINE uint32_t const* envoy_api_v2_listener_FilterChainMatch_source_ports(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_destination_port(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)); } -UPB_INLINE upb_strview envoy_api_v2_listener_FilterChainMatch_transport_protocol(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); } +UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_has_destination_port(const envoy_api_v2_listener_FilterChainMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_destination_port(const envoy_api_v2_listener_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_UInt32Value*); } +UPB_INLINE upb_strview envoy_api_v2_listener_FilterChainMatch_transport_protocol(const envoy_api_v2_listener_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); } UPB_INLINE upb_strview const* envoy_api_v2_listener_FilterChainMatch_application_protocols(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); } UPB_INLINE upb_strview const* envoy_api_v2_listener_FilterChainMatch_server_names(const envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(48, 88), len); } -UPB_INLINE int32_t envoy_api_v2_listener_FilterChainMatch_source_type(const envoy_api_v2_listener_FilterChainMatch *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t envoy_api_v2_listener_FilterChainMatch_source_type(const envoy_api_v2_listener_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE struct envoy_api_v2_core_CidrRange** envoy_api_v2_listener_FilterChainMatch_mutable_prefix_ranges(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (struct envoy_api_v2_core_CidrRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len); @@ -157,10 +161,10 @@ UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_api_v2_listener_FilterChain return sub; } UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_address_suffix(envoy_api_v2_listener_FilterChainMatch *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_suffix_len(envoy_api_v2_listener_FilterChainMatch *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_mutable_suffix_len(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_listener_FilterChainMatch_suffix_len(msg); @@ -195,7 +199,7 @@ UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_add_source_ports(envoy_ap arena); } UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_destination_port(envoy_api_v2_listener_FilterChainMatch *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChainMatch_mutable_destination_port(envoy_api_v2_listener_FilterChainMatch *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_listener_FilterChainMatch_destination_port(msg); @@ -207,7 +211,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_listener_FilterChain return sub; } UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_transport_protocol(envoy_api_v2_listener_FilterChainMatch *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value; } UPB_INLINE upb_strview* envoy_api_v2_listener_FilterChainMatch_mutable_application_protocols(envoy_api_v2_listener_FilterChainMatch *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len); @@ -230,7 +234,7 @@ UPB_INLINE bool envoy_api_v2_listener_FilterChainMatch_add_server_names(envoy_ap arena); } UPB_INLINE void envoy_api_v2_listener_FilterChainMatch_set_source_type(envoy_api_v2_listener_FilterChainMatch *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } /* envoy.api.v2.listener.FilterChain */ @@ -247,16 +251,22 @@ UPB_INLINE char *envoy_api_v2_listener_FilterChain_serialize(const envoy_api_v2_ return upb_encode(msg, &envoy_api_v2_listener_FilterChain_msginit, arena, len); } -UPB_INLINE const envoy_api_v2_listener_FilterChainMatch* envoy_api_v2_listener_FilterChain_filter_chain_match(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_listener_FilterChainMatch*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct envoy_api_v2_auth_DownstreamTlsContext* envoy_api_v2_listener_FilterChain_tls_context(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_auth_DownstreamTlsContext*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_api_v2_listener_FilterChain_has_filter_chain_match(const envoy_api_v2_listener_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const envoy_api_v2_listener_FilterChainMatch* envoy_api_v2_listener_FilterChain_filter_chain_match(const envoy_api_v2_listener_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_api_v2_listener_FilterChainMatch*); } +UPB_INLINE bool envoy_api_v2_listener_FilterChain_has_tls_context(const envoy_api_v2_listener_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct envoy_api_v2_auth_DownstreamTlsContext* envoy_api_v2_listener_FilterChain_tls_context(const envoy_api_v2_listener_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_api_v2_auth_DownstreamTlsContext*); } +UPB_INLINE bool envoy_api_v2_listener_FilterChain_has_filters(const envoy_api_v2_listener_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE const envoy_api_v2_listener_Filter* const* envoy_api_v2_listener_FilterChain_filters(const envoy_api_v2_listener_FilterChain *msg, size_t *len) { return (const envoy_api_v2_listener_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_listener_FilterChain_use_proxy_proto(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(16, 32)); } -UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_listener_FilterChain_metadata(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(20, 40)); } -UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_listener_FilterChain_transport_socket(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(24, 48)); } -UPB_INLINE upb_strview envoy_api_v2_listener_FilterChain_name(const envoy_api_v2_listener_FilterChain *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_listener_FilterChain_has_use_proxy_proto(const envoy_api_v2_listener_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_listener_FilterChain_use_proxy_proto(const envoy_api_v2_listener_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_listener_FilterChain_has_metadata(const envoy_api_v2_listener_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_listener_FilterChain_metadata(const envoy_api_v2_listener_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_api_v2_core_Metadata*); } +UPB_INLINE bool envoy_api_v2_listener_FilterChain_has_transport_socket(const envoy_api_v2_listener_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } +UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_listener_FilterChain_transport_socket(const envoy_api_v2_listener_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct envoy_api_v2_core_TransportSocket*); } +UPB_INLINE upb_strview envoy_api_v2_listener_FilterChain_name(const envoy_api_v2_listener_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_listener_FilterChain_set_filter_chain_match(envoy_api_v2_listener_FilterChain *msg, envoy_api_v2_listener_FilterChainMatch* value) { - UPB_FIELD_AT(msg, envoy_api_v2_listener_FilterChainMatch*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_api_v2_listener_FilterChainMatch*) = value; } UPB_INLINE struct envoy_api_v2_listener_FilterChainMatch* envoy_api_v2_listener_FilterChain_mutable_filter_chain_match(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct envoy_api_v2_listener_FilterChainMatch* sub = (struct envoy_api_v2_listener_FilterChainMatch*)envoy_api_v2_listener_FilterChain_filter_chain_match(msg); @@ -268,7 +278,7 @@ UPB_INLINE struct envoy_api_v2_listener_FilterChainMatch* envoy_api_v2_listener_ return sub; } UPB_INLINE void envoy_api_v2_listener_FilterChain_set_tls_context(envoy_api_v2_listener_FilterChain *msg, struct envoy_api_v2_auth_DownstreamTlsContext* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_auth_DownstreamTlsContext*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_api_v2_auth_DownstreamTlsContext*) = value; } UPB_INLINE struct envoy_api_v2_auth_DownstreamTlsContext* envoy_api_v2_listener_FilterChain_mutable_tls_context(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct envoy_api_v2_auth_DownstreamTlsContext* sub = (struct envoy_api_v2_auth_DownstreamTlsContext*)envoy_api_v2_listener_FilterChain_tls_context(msg); @@ -293,7 +303,7 @@ UPB_INLINE struct envoy_api_v2_listener_Filter* envoy_api_v2_listener_FilterChai return sub; } UPB_INLINE void envoy_api_v2_listener_FilterChain_set_use_proxy_proto(envoy_api_v2_listener_FilterChain *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_listener_FilterChain_mutable_use_proxy_proto(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_listener_FilterChain_use_proxy_proto(msg); @@ -305,7 +315,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_listener_FilterChain_m return sub; } UPB_INLINE void envoy_api_v2_listener_FilterChain_set_metadata(envoy_api_v2_listener_FilterChain *msg, struct envoy_api_v2_core_Metadata* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_api_v2_core_Metadata*) = value; } UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_listener_FilterChain_mutable_metadata(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_listener_FilterChain_metadata(msg); @@ -317,7 +327,7 @@ UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_listener_FilterChain_ return sub; } UPB_INLINE void envoy_api_v2_listener_FilterChain_set_transport_socket(envoy_api_v2_listener_FilterChain *msg, struct envoy_api_v2_core_TransportSocket* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_TransportSocket*, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct envoy_api_v2_core_TransportSocket*) = value; } UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_listener_FilterChain_mutable_transport_socket(envoy_api_v2_listener_FilterChain *msg, upb_arena *arena) { struct envoy_api_v2_core_TransportSocket* sub = (struct envoy_api_v2_core_TransportSocket*)envoy_api_v2_listener_FilterChain_transport_socket(msg); @@ -329,7 +339,7 @@ UPB_INLINE struct envoy_api_v2_core_TransportSocket* envoy_api_v2_listener_Filte return sub; } UPB_INLINE void envoy_api_v2_listener_FilterChain_set_name(envoy_api_v2_listener_FilterChain *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.listener.ListenerFilterChainMatchPredicate */ @@ -354,7 +364,7 @@ typedef enum { envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_destination_port_range = 5, envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_NOT_SET = 0 } envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_oneofcases; -UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_oneofcases envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_case(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* msg) { return (envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_oneofcases envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_case(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* msg) { return (envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_or_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_or_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -433,6 +443,7 @@ UPB_INLINE char *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSe return upb_encode(msg, &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_has_rules(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* const* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_rules(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *msg, size_t *len) { return (const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate** envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_mutable_rules(envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet *msg, size_t *len) { @@ -468,17 +479,18 @@ typedef enum { envoy_api_v2_listener_ListenerFilter_config_type_typed_config = 3, envoy_api_v2_listener_ListenerFilter_config_type_NOT_SET = 0 } envoy_api_v2_listener_ListenerFilter_config_type_oneofcases; -UPB_INLINE envoy_api_v2_listener_ListenerFilter_config_type_oneofcases envoy_api_v2_listener_ListenerFilter_config_type_case(const envoy_api_v2_listener_ListenerFilter* msg) { return (envoy_api_v2_listener_ListenerFilter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 32)); } +UPB_INLINE envoy_api_v2_listener_ListenerFilter_config_type_oneofcases envoy_api_v2_listener_ListenerFilter_config_type_case(const envoy_api_v2_listener_ListenerFilter* msg) { return (envoy_api_v2_listener_ListenerFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_listener_ListenerFilter_name(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_listener_ListenerFilter_name(const envoy_api_v2_listener_ListenerFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_ListenerFilter_config(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 2, NULL); } UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_typed_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_ListenerFilter_typed_config(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); } -UPB_INLINE const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* envoy_api_v2_listener_ListenerFilter_filter_disabled(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_listener_ListenerFilterChainMatchPredicate*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_filter_disabled(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* envoy_api_v2_listener_ListenerFilter_filter_disabled(const envoy_api_v2_listener_ListenerFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_api_v2_listener_ListenerFilterChainMatchPredicate*); } UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_name(envoy_api_v2_listener_ListenerFilter *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_config(envoy_api_v2_listener_ListenerFilter *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 2); @@ -505,7 +517,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_api_v2_listener_ListenerFilter_muta return sub; } UPB_INLINE void envoy_api_v2_listener_ListenerFilter_set_filter_disabled(envoy_api_v2_listener_ListenerFilter *msg, envoy_api_v2_listener_ListenerFilterChainMatchPredicate* value) { - UPB_FIELD_AT(msg, envoy_api_v2_listener_ListenerFilterChainMatchPredicate*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_api_v2_listener_ListenerFilterChainMatchPredicate*) = value; } UPB_INLINE struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate* envoy_api_v2_listener_ListenerFilter_mutable_filter_disabled(envoy_api_v2_listener_ListenerFilter *msg, upb_arena *arena) { struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate* sub = (struct envoy_api_v2_listener_ListenerFilterChainMatchPredicate*)envoy_api_v2_listener_ListenerFilter_filter_disabled(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c index 7c9df77d3b4..b36d27a88dc 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c @@ -23,8 +23,8 @@ static const upb_msglayout *const envoy_api_v2_listener_UdpListenerConfig_submsg static const upb_msglayout_field envoy_api_v2_listener_UdpListenerConfig__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h index 3c98a54f1be..d9c4822dbd1 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h @@ -50,16 +50,16 @@ typedef enum { envoy_api_v2_listener_UdpListenerConfig_config_type_typed_config = 3, envoy_api_v2_listener_UdpListenerConfig_config_type_NOT_SET = 0 } envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases; -UPB_INLINE envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases envoy_api_v2_listener_UdpListenerConfig_config_type_case(const envoy_api_v2_listener_UdpListenerConfig* msg) { return (envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases envoy_api_v2_listener_UdpListenerConfig_config_type_case(const envoy_api_v2_listener_UdpListenerConfig* msg) { return (envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_listener_UdpListenerConfig_udp_listener_name(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_listener_UdpListenerConfig_udp_listener_name(const envoy_api_v2_listener_UdpListenerConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_UdpListenerConfig_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_UdpListenerConfig_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_udp_listener_name(envoy_api_v2_listener_UdpListenerConfig *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_config(envoy_api_v2_listener_UdpListenerConfig *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); diff --git a/src/core/ext/upb-generated/envoy/api/v2/route.upb.h b/src/core/ext/upb-generated/envoy/api/v2/route.upb.h index 3d4f7a550bd..33e5ddf8229 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/route.upb.h @@ -49,19 +49,24 @@ UPB_INLINE char *envoy_api_v2_RouteConfiguration_serialize(const envoy_api_v2_Ro return upb_encode(msg, &envoy_api_v2_RouteConfiguration_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_RouteConfiguration_name(const envoy_api_v2_RouteConfiguration *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview envoy_api_v2_RouteConfiguration_name(const envoy_api_v2_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool envoy_api_v2_RouteConfiguration_has_virtual_hosts(const envoy_api_v2_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const struct envoy_api_v2_route_VirtualHost* const* envoy_api_v2_RouteConfiguration_virtual_hosts(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (const struct envoy_api_v2_route_VirtualHost* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE upb_strview const* envoy_api_v2_RouteConfiguration_internal_only_headers(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE bool envoy_api_v2_RouteConfiguration_has_response_headers_to_add(const envoy_api_v2_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_RouteConfiguration_response_headers_to_add(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE upb_strview const* envoy_api_v2_RouteConfiguration_response_headers_to_remove(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } +UPB_INLINE bool envoy_api_v2_RouteConfiguration_has_request_headers_to_add(const envoy_api_v2_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_RouteConfiguration_request_headers_to_add(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_RouteConfiguration_validate_clusters(const envoy_api_v2_RouteConfiguration *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_api_v2_RouteConfiguration_has_validate_clusters(const envoy_api_v2_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_RouteConfiguration_validate_clusters(const envoy_api_v2_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); } UPB_INLINE upb_strview const* envoy_api_v2_RouteConfiguration_request_headers_to_remove(const envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } -UPB_INLINE const envoy_api_v2_Vhds* envoy_api_v2_RouteConfiguration_vhds(const envoy_api_v2_RouteConfiguration *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_Vhds*, UPB_SIZE(16, 32)); } -UPB_INLINE bool envoy_api_v2_RouteConfiguration_most_specific_header_mutations_wins(const envoy_api_v2_RouteConfiguration *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_RouteConfiguration_has_vhds(const envoy_api_v2_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const envoy_api_v2_Vhds* envoy_api_v2_RouteConfiguration_vhds(const envoy_api_v2_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_api_v2_Vhds*); } +UPB_INLINE bool envoy_api_v2_RouteConfiguration_most_specific_header_mutations_wins(const envoy_api_v2_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_api_v2_RouteConfiguration_set_name(envoy_api_v2_RouteConfiguration *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE struct envoy_api_v2_route_VirtualHost** envoy_api_v2_RouteConfiguration_mutable_virtual_hosts(envoy_api_v2_RouteConfiguration *msg, size_t *len) { return (struct envoy_api_v2_route_VirtualHost**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); @@ -123,7 +128,7 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_RouteConfigu return sub; } UPB_INLINE void envoy_api_v2_RouteConfiguration_set_validate_clusters(envoy_api_v2_RouteConfiguration *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_RouteConfiguration_mutable_validate_clusters(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_RouteConfiguration_validate_clusters(msg); @@ -145,7 +150,7 @@ UPB_INLINE bool envoy_api_v2_RouteConfiguration_add_request_headers_to_remove(en arena); } UPB_INLINE void envoy_api_v2_RouteConfiguration_set_vhds(envoy_api_v2_RouteConfiguration *msg, envoy_api_v2_Vhds* value) { - UPB_FIELD_AT(msg, envoy_api_v2_Vhds*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_api_v2_Vhds*) = value; } UPB_INLINE struct envoy_api_v2_Vhds* envoy_api_v2_RouteConfiguration_mutable_vhds(envoy_api_v2_RouteConfiguration *msg, upb_arena *arena) { struct envoy_api_v2_Vhds* sub = (struct envoy_api_v2_Vhds*)envoy_api_v2_RouteConfiguration_vhds(msg); @@ -157,7 +162,7 @@ UPB_INLINE struct envoy_api_v2_Vhds* envoy_api_v2_RouteConfiguration_mutable_vhd return sub; } UPB_INLINE void envoy_api_v2_RouteConfiguration_set_most_specific_header_mutations_wins(envoy_api_v2_RouteConfiguration *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.api.v2.Vhds */ @@ -174,10 +179,11 @@ UPB_INLINE char *envoy_api_v2_Vhds_serialize(const envoy_api_v2_Vhds *msg, upb_a return upb_encode(msg, &envoy_api_v2_Vhds_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Vhds_config_source(const envoy_api_v2_Vhds *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_Vhds_has_config_source(const envoy_api_v2_Vhds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Vhds_config_source(const envoy_api_v2_Vhds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_ConfigSource*); } UPB_INLINE void envoy_api_v2_Vhds_set_config_source(envoy_api_v2_Vhds *msg, struct envoy_api_v2_core_ConfigSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_ConfigSource*) = value; } UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_api_v2_Vhds_mutable_config_source(envoy_api_v2_Vhds *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_api_v2_Vhds_config_source(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c index 32399afb205..95abfaf1ffe 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c @@ -51,10 +51,10 @@ static const upb_msglayout_field envoy_api_v2_route_VirtualHost__fields[19] = { {8, UPB_SIZE(20, 32), 0, 1, 11, 1}, {10, UPB_SIZE(60, 112), 0, 0, 11, 3}, {11, UPB_SIZE(64, 120), 0, 0, 9, 3}, - {12, UPB_SIZE(68, 128), 0, 7, 11, 4}, + {12, UPB_SIZE(68, 128), 0, 7, 11, _UPB_LABEL_MAP}, {13, UPB_SIZE(72, 136), 0, 0, 9, 3}, {14, UPB_SIZE(8, 8), 0, 0, 8, 1}, - {15, UPB_SIZE(76, 144), 0, 8, 11, 4}, + {15, UPB_SIZE(76, 144), 0, 8, 11, _UPB_LABEL_MAP}, {16, UPB_SIZE(24, 40), 0, 4, 11, 1}, {17, UPB_SIZE(28, 48), 0, 2, 11, 1}, {18, UPB_SIZE(32, 56), 0, 10, 11, 1}, @@ -129,21 +129,21 @@ static const upb_msglayout *const envoy_api_v2_route_Route_submsgs[13] = { static const upb_msglayout_field envoy_api_v2_route_Route__fields[16] = { {1, UPB_SIZE(8, 16), 0, 9, 11, 1}, - {2, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 8, 11, 1}, - {3, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 5, 11, 1}, + {2, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 8, 11, 1}, + {3, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 5, 11, 1}, {4, UPB_SIZE(12, 24), 0, 1, 11, 1}, {5, UPB_SIZE(16, 32), 0, 2, 11, 1}, - {7, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 3, 11, 1}, - {8, UPB_SIZE(28, 56), 0, 6, 11, 4}, + {7, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 3, 11, 1}, + {8, UPB_SIZE(28, 56), 0, 6, 11, _UPB_LABEL_MAP}, {9, UPB_SIZE(32, 64), 0, 0, 11, 3}, {10, UPB_SIZE(36, 72), 0, 0, 11, 3}, {11, UPB_SIZE(40, 80), 0, 0, 9, 3}, {12, UPB_SIZE(44, 88), 0, 0, 9, 3}, - {13, UPB_SIZE(48, 96), 0, 7, 11, 4}, + {13, UPB_SIZE(48, 96), 0, 7, 11, _UPB_LABEL_MAP}, {14, UPB_SIZE(0, 0), 0, 0, 9, 1}, {15, UPB_SIZE(20, 40), 0, 10, 11, 1}, {16, UPB_SIZE(24, 48), 0, 11, 11, 1}, - {17, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 4, 11, 1}, + {17, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 4, 11, 1}, }; const upb_msglayout envoy_api_v2_route_Route_msginit = { @@ -214,9 +214,9 @@ static const upb_msglayout_field envoy_api_v2_route_WeightedCluster_ClusterWeigh {4, UPB_SIZE(16, 32), 0, 0, 11, 3}, {5, UPB_SIZE(20, 40), 0, 0, 11, 3}, {6, UPB_SIZE(24, 48), 0, 0, 9, 3}, - {8, UPB_SIZE(28, 56), 0, 2, 11, 4}, + {8, UPB_SIZE(28, 56), 0, 2, 11, _UPB_LABEL_MAP}, {9, UPB_SIZE(32, 64), 0, 0, 9, 3}, - {10, UPB_SIZE(36, 72), 0, 3, 11, 4}, + {10, UPB_SIZE(36, 72), 0, 3, 11, _UPB_LABEL_MAP}, }; const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit = { @@ -266,15 +266,15 @@ static const upb_msglayout *const envoy_api_v2_route_RouteMatch_submsgs[7] = { }; static const upb_msglayout_field envoy_api_v2_route_RouteMatch__fields[10] = { - {1, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 0, 9, 1}, - {2, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 0, 9, 1}, - {3, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 0, 9, 1}, + {1, UPB_SIZE(24, 48), UPB_SIZE(-32, -64), 0, 9, 1}, + {2, UPB_SIZE(24, 48), UPB_SIZE(-32, -64), 0, 9, 1}, + {3, UPB_SIZE(24, 48), UPB_SIZE(-32, -64), 0, 9, 1}, {4, UPB_SIZE(0, 0), 0, 6, 11, 1}, {6, UPB_SIZE(16, 32), 0, 1, 11, 3}, {7, UPB_SIZE(20, 40), 0, 2, 11, 3}, {8, UPB_SIZE(4, 8), 0, 3, 11, 1}, {9, UPB_SIZE(8, 16), 0, 0, 11, 1}, - {10, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 5, 11, 1}, + {10, UPB_SIZE(24, 48), UPB_SIZE(-32, -64), 5, 11, 1}, {11, UPB_SIZE(12, 24), 0, 4, 11, 1}, }; @@ -318,9 +318,9 @@ static const upb_msglayout_field envoy_api_v2_route_CorsPolicy__fields[11] = { {4, UPB_SIZE(16, 32), 0, 0, 9, 1}, {5, UPB_SIZE(24, 48), 0, 0, 9, 1}, {6, UPB_SIZE(32, 64), 0, 2, 11, 1}, - {7, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 2, 11, 1}, + {7, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 2, 11, 1}, {8, UPB_SIZE(44, 88), 0, 0, 9, 3}, - {9, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 0, 11, 1}, + {9, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 0, 11, 1}, {10, UPB_SIZE(36, 72), 0, 0, 11, 1}, {11, UPB_SIZE(48, 96), 0, 1, 11, 3}, }; @@ -349,13 +349,13 @@ static const upb_msglayout *const envoy_api_v2_route_RouteAction_submsgs[19] = { }; static const upb_msglayout_field envoy_api_v2_route_RouteAction__fields[27] = { - {1, UPB_SIZE(100, 176), UPB_SIZE(-109, -193), 0, 9, 1}, - {2, UPB_SIZE(100, 176), UPB_SIZE(-109, -193), 0, 9, 1}, - {3, UPB_SIZE(100, 176), UPB_SIZE(-109, -193), 8, 11, 1}, + {1, UPB_SIZE(100, 176), UPB_SIZE(-108, -192), 0, 9, 1}, + {2, UPB_SIZE(100, 176), UPB_SIZE(-108, -192), 0, 9, 1}, + {3, UPB_SIZE(100, 176), UPB_SIZE(-108, -192), 8, 11, 1}, {4, UPB_SIZE(32, 40), 0, 0, 11, 1}, {5, UPB_SIZE(24, 24), 0, 0, 9, 1}, - {6, UPB_SIZE(112, 200), UPB_SIZE(-121, -217), 0, 9, 1}, - {7, UPB_SIZE(112, 200), UPB_SIZE(-121, -217), 11, 11, 1}, + {6, UPB_SIZE(112, 200), UPB_SIZE(-120, -216), 0, 9, 1}, + {7, UPB_SIZE(112, 200), UPB_SIZE(-120, -216), 11, 11, 1}, {8, UPB_SIZE(36, 48), 0, 12, 11, 1}, {9, UPB_SIZE(40, 56), 0, 4, 11, 1}, {10, UPB_SIZE(44, 64), 0, 6, 11, 1}, @@ -371,7 +371,7 @@ static const upb_msglayout_field envoy_api_v2_route_RouteAction__fields[27] = { {26, UPB_SIZE(16, 16), 0, 0, 14, 1}, {27, UPB_SIZE(64, 104), 0, 2, 11, 1}, {28, UPB_SIZE(68, 112), 0, 12, 11, 1}, - {29, UPB_SIZE(112, 200), UPB_SIZE(-121, -217), 0, 9, 1}, + {29, UPB_SIZE(112, 200), UPB_SIZE(-120, -216), 0, 9, 1}, {30, UPB_SIZE(96, 168), 0, 6, 11, 3}, {31, UPB_SIZE(72, 120), 0, 13, 11, 1}, {32, UPB_SIZE(76, 128), 0, 9, 11, 1}, @@ -411,12 +411,12 @@ static const upb_msglayout *const envoy_api_v2_route_RouteAction_HashPolicy_subm }; static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy__fields[6] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 3, 11, 1}, - {2, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 1, 11, 1}, - {3, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 0, 11, 1}, + {1, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 3, 11, 1}, + {2, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 1, 11, 1}, + {3, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 0, 11, 1}, {4, UPB_SIZE(0, 0), 0, 0, 8, 1}, - {5, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 4, 11, 1}, - {6, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 2, 11, 1}, + {5, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 4, 11, 1}, + {6, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 2, 11, 1}, }; const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_msginit = { @@ -512,7 +512,7 @@ static const upb_msglayout_field envoy_api_v2_route_RetryPolicy__fields[10] = { {4, UPB_SIZE(24, 40), 0, 3, 11, 1}, {5, UPB_SIZE(32, 56), 0, 2, 11, 3}, {6, UPB_SIZE(0, 0), 0, 0, 3, 1}, - {7, UPB_SIZE(36, 64), 0, 0, 13, 3}, + {7, UPB_SIZE(36, 64), 0, 0, 13, _UPB_LABEL_PACKED}, {8, UPB_SIZE(28, 48), 0, 1, 11, 1}, {9, UPB_SIZE(40, 72), 0, 0, 11, 3}, {10, UPB_SIZE(44, 80), 0, 0, 11, 3}, @@ -531,8 +531,8 @@ static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryPriority_s static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryPriority__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryPriority_msginit = { @@ -548,8 +548,8 @@ static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryHostPredic static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryHostPredicate__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit = { @@ -592,12 +592,12 @@ const upb_msglayout envoy_api_v2_route_HedgePolicy_msginit = { static const upb_msglayout_field envoy_api_v2_route_RedirectAction__fields[8] = { {1, UPB_SIZE(16, 16), 0, 0, 9, 1}, - {2, UPB_SIZE(24, 32), UPB_SIZE(-33, -49), 0, 9, 1}, + {2, UPB_SIZE(24, 32), UPB_SIZE(-32, -48), 0, 9, 1}, {3, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {4, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 8, 1}, - {5, UPB_SIZE(24, 32), UPB_SIZE(-33, -49), 0, 9, 1}, + {4, UPB_SIZE(36, 56), UPB_SIZE(-44, -72), 0, 8, 1}, + {5, UPB_SIZE(24, 32), UPB_SIZE(-32, -48), 0, 9, 1}, {6, UPB_SIZE(12, 12), 0, 0, 8, 1}, - {7, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 9, 1}, + {7, UPB_SIZE(36, 56), UPB_SIZE(-44, -72), 0, 9, 1}, {8, UPB_SIZE(8, 8), 0, 0, 13, 1}, }; @@ -699,12 +699,12 @@ static const upb_msglayout *const envoy_api_v2_route_RateLimit_Action_submsgs[6] }; static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action__fields[6] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 5, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 4, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 3, 11, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, }; const upb_msglayout envoy_api_v2_route_RateLimit_Action_msginit = { @@ -776,14 +776,14 @@ static const upb_msglayout *const envoy_api_v2_route_HeaderMatcher_submsgs[2] = static const upb_msglayout_field envoy_api_v2_route_HeaderMatcher__fields[9] = { {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, - {4, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, - {5, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, - {6, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 11, 1}, - {7, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 8, 1}, + {4, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, + {5, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, + {6, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 11, 1}, + {7, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 8, 1}, {8, UPB_SIZE(0, 0), 0, 0, 8, 1}, - {9, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, - {10, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, - {11, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 1, 11, 1}, + {9, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, + {10, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, + {11, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 1, 11, 1}, }; const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit = { @@ -801,8 +801,8 @@ static const upb_msglayout_field envoy_api_v2_route_QueryParameterMatcher__field {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {3, UPB_SIZE(8, 16), 0, 0, 9, 1}, {4, UPB_SIZE(16, 32), 0, 1, 11, 1}, - {5, UPB_SIZE(20, 40), UPB_SIZE(-25, -49), 0, 11, 1}, - {6, UPB_SIZE(20, 40), UPB_SIZE(-25, -49), 0, 8, 1}, + {5, UPB_SIZE(20, 40), UPB_SIZE(-24, -48), 0, 11, 1}, + {6, UPB_SIZE(20, 40), UPB_SIZE(-24, -48), 0, 8, 1}, }; const upb_msglayout envoy_api_v2_route_QueryParameterMatcher_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h index 8c06751cbf9..7d7b20a989f 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h @@ -221,32 +221,44 @@ UPB_INLINE char *envoy_api_v2_route_VirtualHost_serialize(const envoy_api_v2_rou return upb_encode(msg, &envoy_api_v2_route_VirtualHost_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_VirtualHost_name(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } +UPB_INLINE upb_strview envoy_api_v2_route_VirtualHost_name(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } UPB_INLINE upb_strview const* envoy_api_v2_route_VirtualHost_domains(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_routes(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); } UPB_INLINE const envoy_api_v2_route_Route* const* envoy_api_v2_route_VirtualHost_routes(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (const envoy_api_v2_route_Route* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); } -UPB_INLINE int32_t envoy_api_v2_route_VirtualHost_require_tls(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t envoy_api_v2_route_VirtualHost_require_tls(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_virtual_clusters(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 88)); } UPB_INLINE const envoy_api_v2_route_VirtualCluster* const* envoy_api_v2_route_VirtualHost_virtual_clusters(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (const envoy_api_v2_route_VirtualCluster* const*)_upb_array_accessor(msg, UPB_SIZE(48, 88), len); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_rate_limits(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 96)); } UPB_INLINE const envoy_api_v2_route_RateLimit* const* envoy_api_v2_route_VirtualHost_rate_limits(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (const envoy_api_v2_route_RateLimit* const*)_upb_array_accessor(msg, UPB_SIZE(52, 96), len); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_request_headers_to_add(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 104)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_VirtualHost_request_headers_to_add(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(56, 104), len); } -UPB_INLINE const envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_VirtualHost_cors(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_CorsPolicy*, UPB_SIZE(20, 32)); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_cors(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); } +UPB_INLINE const envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_VirtualHost_cors(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const envoy_api_v2_route_CorsPolicy*); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_response_headers_to_add(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 112)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_VirtualHost_response_headers_to_add(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(60, 112), len); } UPB_INLINE upb_strview const* envoy_api_v2_route_VirtualHost_response_headers_to_remove(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(64, 120), len); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_per_filter_config(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 128)); } UPB_INLINE size_t envoy_api_v2_route_VirtualHost_per_filter_config_size(const envoy_api_v2_route_VirtualHost *msg) {return _upb_msg_map_size(msg, UPB_SIZE(68, 128)); } UPB_INLINE bool envoy_api_v2_route_VirtualHost_per_filter_config_get(const envoy_api_v2_route_VirtualHost *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(68, 128), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry* envoy_api_v2_route_VirtualHost_per_filter_config_next(const envoy_api_v2_route_VirtualHost *msg, size_t* iter) { return (const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(68, 128), iter); } UPB_INLINE upb_strview const* envoy_api_v2_route_VirtualHost_request_headers_to_remove(const envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(72, 136), len); } -UPB_INLINE bool envoy_api_v2_route_VirtualHost_include_request_attempt_count(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_include_request_attempt_count(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_typed_per_filter_config(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 144)); } UPB_INLINE size_t envoy_api_v2_route_VirtualHost_typed_per_filter_config_size(const envoy_api_v2_route_VirtualHost *msg) {return _upb_msg_map_size(msg, UPB_SIZE(76, 144)); } UPB_INLINE bool envoy_api_v2_route_VirtualHost_typed_per_filter_config_get(const envoy_api_v2_route_VirtualHost *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(76, 144), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry* envoy_api_v2_route_VirtualHost_typed_per_filter_config_next(const envoy_api_v2_route_VirtualHost *msg, size_t* iter) { return (const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(76, 144), iter); } -UPB_INLINE const envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_VirtualHost_retry_policy(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RetryPolicy*, UPB_SIZE(24, 40)); } -UPB_INLINE const envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_VirtualHost_hedge_policy(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_HedgePolicy*, UPB_SIZE(28, 48)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_VirtualHost_per_request_buffer_limit_bytes(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(32, 56)); } -UPB_INLINE bool envoy_api_v2_route_VirtualHost_include_attempt_count_in_response(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(9, 9)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_VirtualHost_retry_policy_typed_config(const envoy_api_v2_route_VirtualHost *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(36, 64)); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_retry_policy(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_VirtualHost_retry_policy(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_api_v2_route_RetryPolicy*); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_hedge_policy(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); } +UPB_INLINE const envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_VirtualHost_hedge_policy(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const envoy_api_v2_route_HedgePolicy*); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_per_request_buffer_limit_bytes(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_VirtualHost_per_request_buffer_limit_bytes(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_include_attempt_count_in_response(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool); } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_has_retry_policy_typed_config(const envoy_api_v2_route_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_VirtualHost_retry_policy_typed_config(const envoy_api_v2_route_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const struct google_protobuf_Any*); } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_name(envoy_api_v2_route_VirtualHost *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value; } UPB_INLINE upb_strview* envoy_api_v2_route_VirtualHost_mutable_domains(envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len); @@ -272,7 +284,7 @@ UPB_INLINE struct envoy_api_v2_route_Route* envoy_api_v2_route_VirtualHost_add_r return sub; } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_require_tls(envoy_api_v2_route_VirtualHost *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE envoy_api_v2_route_VirtualCluster** envoy_api_v2_route_VirtualHost_mutable_virtual_clusters(envoy_api_v2_route_VirtualHost *msg, size_t *len) { return (envoy_api_v2_route_VirtualCluster**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len); @@ -314,7 +326,7 @@ UPB_INLINE struct envoy_api_v2_core_HeaderValueOption* envoy_api_v2_route_Virtua return sub; } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_cors(envoy_api_v2_route_VirtualHost *msg, envoy_api_v2_route_CorsPolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_CorsPolicy*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), envoy_api_v2_route_CorsPolicy*) = value; } UPB_INLINE struct envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_VirtualHost_mutable_cors(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { struct envoy_api_v2_route_CorsPolicy* sub = (struct envoy_api_v2_route_CorsPolicy*)envoy_api_v2_route_VirtualHost_cors(msg); @@ -363,14 +375,14 @@ UPB_INLINE bool envoy_api_v2_route_VirtualHost_add_request_headers_to_remove(env arena); } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_include_request_attempt_count(envoy_api_v2_route_VirtualHost *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } UPB_INLINE void envoy_api_v2_route_VirtualHost_typed_per_filter_config_clear(envoy_api_v2_route_VirtualHost *msg) { _upb_msg_map_clear(msg, UPB_SIZE(76, 144)); } UPB_INLINE bool envoy_api_v2_route_VirtualHost_typed_per_filter_config_set(envoy_api_v2_route_VirtualHost *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(76, 144), &key, 0, &val, sizeof(val), a); } UPB_INLINE bool envoy_api_v2_route_VirtualHost_typed_per_filter_config_delete(envoy_api_v2_route_VirtualHost *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(76, 144), &key, 0); } UPB_INLINE envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry* envoy_api_v2_route_VirtualHost_typed_per_filter_config_nextmutable(envoy_api_v2_route_VirtualHost *msg, size_t* iter) { return (envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(76, 144), iter); } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_retry_policy(envoy_api_v2_route_VirtualHost *msg, envoy_api_v2_route_RetryPolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_RetryPolicy*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_api_v2_route_RetryPolicy*) = value; } UPB_INLINE struct envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_VirtualHost_mutable_retry_policy(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { struct envoy_api_v2_route_RetryPolicy* sub = (struct envoy_api_v2_route_RetryPolicy*)envoy_api_v2_route_VirtualHost_retry_policy(msg); @@ -382,7 +394,7 @@ UPB_INLINE struct envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_VirtualHost return sub; } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_hedge_policy(envoy_api_v2_route_VirtualHost *msg, envoy_api_v2_route_HedgePolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_HedgePolicy*, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), envoy_api_v2_route_HedgePolicy*) = value; } UPB_INLINE struct envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_VirtualHost_mutable_hedge_policy(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { struct envoy_api_v2_route_HedgePolicy* sub = (struct envoy_api_v2_route_HedgePolicy*)envoy_api_v2_route_VirtualHost_hedge_policy(msg); @@ -394,7 +406,7 @@ UPB_INLINE struct envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_VirtualHost return sub; } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_per_request_buffer_limit_bytes(envoy_api_v2_route_VirtualHost *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(32, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_VirtualHost_mutable_per_request_buffer_limit_bytes(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_VirtualHost_per_request_buffer_limit_bytes(msg); @@ -406,10 +418,10 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_VirtualHost_mu return sub; } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_include_attempt_count_in_response(envoy_api_v2_route_VirtualHost *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(9, 9)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = value; } UPB_INLINE void envoy_api_v2_route_VirtualHost_set_retry_policy_typed_config(envoy_api_v2_route_VirtualHost *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(36, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 64), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_VirtualHost_mutable_retry_policy_typed_config(envoy_api_v2_route_VirtualHost *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_route_VirtualHost_retry_policy_typed_config(msg); @@ -428,6 +440,7 @@ UPB_INLINE upb_strview envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_key(c _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_has_value(const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_value(const envoy_api_v2_route_VirtualHost_PerFilterConfigEntry *msg) { struct google_protobuf_Struct* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -445,6 +458,7 @@ UPB_INLINE upb_strview envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_ _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_has_value(const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry *msg) { struct google_protobuf_Any* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -469,10 +483,11 @@ UPB_INLINE char *envoy_api_v2_route_FilterAction_serialize(const envoy_api_v2_ro return upb_encode(msg, &envoy_api_v2_route_FilterAction_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_FilterAction_action(const envoy_api_v2_route_FilterAction *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_route_FilterAction_has_action(const envoy_api_v2_route_FilterAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_FilterAction_action(const envoy_api_v2_route_FilterAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Any*); } UPB_INLINE void envoy_api_v2_route_FilterAction_set_action(envoy_api_v2_route_FilterAction *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_FilterAction_mutable_action(envoy_api_v2_route_FilterAction *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_route_FilterAction_action(msg); @@ -505,35 +520,44 @@ typedef enum { envoy_api_v2_route_Route_action_filter_action = 17, envoy_api_v2_route_Route_action_NOT_SET = 0 } envoy_api_v2_route_Route_action_oneofcases; -UPB_INLINE envoy_api_v2_route_Route_action_oneofcases envoy_api_v2_route_Route_action_case(const envoy_api_v2_route_Route* msg) { return (envoy_api_v2_route_Route_action_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(56, 112)); } +UPB_INLINE envoy_api_v2_route_Route_action_oneofcases envoy_api_v2_route_Route_action_case(const envoy_api_v2_route_Route* msg) { return (envoy_api_v2_route_Route_action_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(56, 112), int32_t); } -UPB_INLINE const envoy_api_v2_route_RouteMatch* envoy_api_v2_route_Route_match(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RouteMatch*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_route_Route_has_match(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const envoy_api_v2_route_RouteMatch* envoy_api_v2_route_Route_match(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_api_v2_route_RouteMatch*); } UPB_INLINE bool envoy_api_v2_route_Route_has_route(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 2); } UPB_INLINE const envoy_api_v2_route_RouteAction* envoy_api_v2_route_Route_route(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 2, NULL); } UPB_INLINE bool envoy_api_v2_route_Route_has_redirect(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 3); } UPB_INLINE const envoy_api_v2_route_RedirectAction* envoy_api_v2_route_Route_redirect(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RedirectAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 3, NULL); } -UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_Route_metadata(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(12, 24)); } -UPB_INLINE const envoy_api_v2_route_Decorator* envoy_api_v2_route_Route_decorator(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_Decorator*, UPB_SIZE(16, 32)); } +UPB_INLINE bool envoy_api_v2_route_Route_has_metadata(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_Route_metadata(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_api_v2_core_Metadata*); } +UPB_INLINE bool envoy_api_v2_route_Route_has_decorator(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const envoy_api_v2_route_Decorator* envoy_api_v2_route_Route_decorator(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_api_v2_route_Decorator*); } UPB_INLINE bool envoy_api_v2_route_Route_has_direct_response(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 7); } UPB_INLINE const envoy_api_v2_route_DirectResponseAction* envoy_api_v2_route_Route_direct_response(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_DirectResponseAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 7, NULL); } +UPB_INLINE bool envoy_api_v2_route_Route_has_per_filter_config(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE size_t envoy_api_v2_route_Route_per_filter_config_size(const envoy_api_v2_route_Route *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 56)); } UPB_INLINE bool envoy_api_v2_route_Route_per_filter_config_get(const envoy_api_v2_route_Route *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(28, 56), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_route_Route_PerFilterConfigEntry* envoy_api_v2_route_Route_per_filter_config_next(const envoy_api_v2_route_Route *msg, size_t* iter) { return (const envoy_api_v2_route_Route_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); } +UPB_INLINE bool envoy_api_v2_route_Route_has_request_headers_to_add(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_Route_request_headers_to_add(const envoy_api_v2_route_Route *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } +UPB_INLINE bool envoy_api_v2_route_Route_has_response_headers_to_add(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_Route_response_headers_to_add(const envoy_api_v2_route_Route *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE upb_strview const* envoy_api_v2_route_Route_response_headers_to_remove(const envoy_api_v2_route_Route *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE upb_strview const* envoy_api_v2_route_Route_request_headers_to_remove(const envoy_api_v2_route_Route *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } +UPB_INLINE bool envoy_api_v2_route_Route_has_typed_per_filter_config(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); } UPB_INLINE size_t envoy_api_v2_route_Route_typed_per_filter_config_size(const envoy_api_v2_route_Route *msg) {return _upb_msg_map_size(msg, UPB_SIZE(48, 96)); } UPB_INLINE bool envoy_api_v2_route_Route_typed_per_filter_config_get(const envoy_api_v2_route_Route *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(48, 96), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_route_Route_TypedPerFilterConfigEntry* envoy_api_v2_route_Route_typed_per_filter_config_next(const envoy_api_v2_route_Route *msg, size_t* iter) { return (const envoy_api_v2_route_Route_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(48, 96), iter); } -UPB_INLINE upb_strview envoy_api_v2_route_Route_name(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const envoy_api_v2_route_Tracing* envoy_api_v2_route_Route_tracing(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_Tracing*, UPB_SIZE(20, 40)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_Route_per_request_buffer_limit_bytes(const envoy_api_v2_route_Route *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)); } +UPB_INLINE upb_strview envoy_api_v2_route_Route_name(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_Route_has_tracing(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE const envoy_api_v2_route_Tracing* envoy_api_v2_route_Route_tracing(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const envoy_api_v2_route_Tracing*); } +UPB_INLINE bool envoy_api_v2_route_Route_has_per_request_buffer_limit_bytes(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_Route_per_request_buffer_limit_bytes(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_UInt32Value*); } UPB_INLINE bool envoy_api_v2_route_Route_has_filter_action(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 17); } UPB_INLINE const envoy_api_v2_route_FilterAction* envoy_api_v2_route_Route_filter_action(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_FilterAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 17, NULL); } UPB_INLINE void envoy_api_v2_route_Route_set_match(envoy_api_v2_route_Route *msg, envoy_api_v2_route_RouteMatch* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_RouteMatch*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_api_v2_route_RouteMatch*) = value; } UPB_INLINE struct envoy_api_v2_route_RouteMatch* envoy_api_v2_route_Route_mutable_match(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteMatch* sub = (struct envoy_api_v2_route_RouteMatch*)envoy_api_v2_route_Route_match(msg); @@ -569,7 +593,7 @@ UPB_INLINE struct envoy_api_v2_route_RedirectAction* envoy_api_v2_route_Route_mu return sub; } UPB_INLINE void envoy_api_v2_route_Route_set_metadata(envoy_api_v2_route_Route *msg, struct envoy_api_v2_core_Metadata* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_api_v2_core_Metadata*) = value; } UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_route_Route_mutable_metadata(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_route_Route_metadata(msg); @@ -581,7 +605,7 @@ UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_route_Route_mutable_m return sub; } UPB_INLINE void envoy_api_v2_route_Route_set_decorator(envoy_api_v2_route_Route *msg, envoy_api_v2_route_Decorator* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_Decorator*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_api_v2_route_Decorator*) = value; } UPB_INLINE struct envoy_api_v2_route_Decorator* envoy_api_v2_route_Route_mutable_decorator(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_Decorator* sub = (struct envoy_api_v2_route_Decorator*)envoy_api_v2_route_Route_decorator(msg); @@ -659,10 +683,10 @@ UPB_INLINE bool envoy_api_v2_route_Route_typed_per_filter_config_set(envoy_api_v UPB_INLINE bool envoy_api_v2_route_Route_typed_per_filter_config_delete(envoy_api_v2_route_Route *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(48, 96), &key, 0); } UPB_INLINE envoy_api_v2_route_Route_TypedPerFilterConfigEntry* envoy_api_v2_route_Route_typed_per_filter_config_nextmutable(envoy_api_v2_route_Route *msg, size_t* iter) { return (envoy_api_v2_route_Route_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(48, 96), iter); } UPB_INLINE void envoy_api_v2_route_Route_set_name(envoy_api_v2_route_Route *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_Route_set_tracing(envoy_api_v2_route_Route *msg, envoy_api_v2_route_Tracing* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_Tracing*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), envoy_api_v2_route_Tracing*) = value; } UPB_INLINE struct envoy_api_v2_route_Tracing* envoy_api_v2_route_Route_mutable_tracing(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct envoy_api_v2_route_Tracing* sub = (struct envoy_api_v2_route_Tracing*)envoy_api_v2_route_Route_tracing(msg); @@ -674,7 +698,7 @@ UPB_INLINE struct envoy_api_v2_route_Tracing* envoy_api_v2_route_Route_mutable_t return sub; } UPB_INLINE void envoy_api_v2_route_Route_set_per_request_buffer_limit_bytes(envoy_api_v2_route_Route *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_Route_mutable_per_request_buffer_limit_bytes(envoy_api_v2_route_Route *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_Route_per_request_buffer_limit_bytes(msg); @@ -705,6 +729,7 @@ UPB_INLINE upb_strview envoy_api_v2_route_Route_PerFilterConfigEntry_key(const e _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_route_Route_PerFilterConfigEntry_has_value(const envoy_api_v2_route_Route_PerFilterConfigEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_Route_PerFilterConfigEntry_value(const envoy_api_v2_route_Route_PerFilterConfigEntry *msg) { struct google_protobuf_Struct* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -722,6 +747,7 @@ UPB_INLINE upb_strview envoy_api_v2_route_Route_TypedPerFilterConfigEntry_key(co _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_route_Route_TypedPerFilterConfigEntry_has_value(const envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_Route_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_Route_TypedPerFilterConfigEntry *msg) { struct google_protobuf_Any* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -746,9 +772,11 @@ UPB_INLINE char *envoy_api_v2_route_WeightedCluster_serialize(const envoy_api_v2 return upb_encode(msg, &envoy_api_v2_route_WeightedCluster_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_has_clusters(const envoy_api_v2_route_WeightedCluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const envoy_api_v2_route_WeightedCluster_ClusterWeight* const* envoy_api_v2_route_WeightedCluster_clusters(const envoy_api_v2_route_WeightedCluster *msg, size_t *len) { return (const envoy_api_v2_route_WeightedCluster_ClusterWeight* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } -UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_runtime_key_prefix(const envoy_api_v2_route_WeightedCluster *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluster_total_weight(const envoy_api_v2_route_WeightedCluster *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_runtime_key_prefix(const envoy_api_v2_route_WeightedCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_has_total_weight(const envoy_api_v2_route_WeightedCluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluster_total_weight(const envoy_api_v2_route_WeightedCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); } UPB_INLINE envoy_api_v2_route_WeightedCluster_ClusterWeight** envoy_api_v2_route_WeightedCluster_mutable_clusters(envoy_api_v2_route_WeightedCluster *msg, size_t *len) { return (envoy_api_v2_route_WeightedCluster_ClusterWeight**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); @@ -764,10 +792,10 @@ UPB_INLINE struct envoy_api_v2_route_WeightedCluster_ClusterWeight* envoy_api_v2 return sub; } UPB_INLINE void envoy_api_v2_route_WeightedCluster_set_runtime_key_prefix(envoy_api_v2_route_WeightedCluster *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_WeightedCluster_set_total_weight(envoy_api_v2_route_WeightedCluster *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluster_mutable_total_weight(envoy_api_v2_route_WeightedCluster *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_WeightedCluster_total_weight(msg); @@ -793,25 +821,31 @@ UPB_INLINE char *envoy_api_v2_route_WeightedCluster_ClusterWeight_serialize(cons return upb_encode(msg, &envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_ClusterWeight_name(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluster_ClusterWeight_weight(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_WeightedCluster_ClusterWeight_metadata_match(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_ClusterWeight_name(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_has_weight(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluster_ClusterWeight_weight(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_has_metadata_match(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_WeightedCluster_ClusterWeight_metadata_match(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_api_v2_core_Metadata*); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_has_request_headers_to_add(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_WeightedCluster_ClusterWeight_request_headers_to_add(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_has_response_headers_to_add(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const struct envoy_api_v2_core_HeaderValueOption* const* envoy_api_v2_route_WeightedCluster_ClusterWeight_response_headers_to_add(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const struct envoy_api_v2_core_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE upb_strview const* envoy_api_v2_route_WeightedCluster_ClusterWeight_response_headers_to_remove(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_has_per_filter_config(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE size_t envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_size(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 56)); } UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_get(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Struct* *val) { return _upb_msg_map_get(msg, UPB_SIZE(28, 56), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry* envoy_api_v2_route_WeightedCluster_ClusterWeight_per_filter_config_next(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); } UPB_INLINE upb_strview const* envoy_api_v2_route_WeightedCluster_ClusterWeight_request_headers_to_remove(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_has_typed_per_filter_config(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } UPB_INLINE size_t envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_size(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg) {return _upb_msg_map_size(msg, UPB_SIZE(36, 72)); } UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_get(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(36, 72), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* envoy_api_v2_route_WeightedCluster_ClusterWeight_typed_per_filter_config_next(const envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(36, 72), iter); } UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_set_name(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_set_weight(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_weight(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_WeightedCluster_ClusterWeight_weight(msg); @@ -823,7 +857,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_WeightedCluste return sub; } UPB_INLINE void envoy_api_v2_route_WeightedCluster_ClusterWeight_set_metadata_match(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, struct envoy_api_v2_core_Metadata* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_api_v2_core_Metadata*) = value; } UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_route_WeightedCluster_ClusterWeight_mutable_metadata_match(envoy_api_v2_route_WeightedCluster_ClusterWeight *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_route_WeightedCluster_ClusterWeight_metadata_match(msg); @@ -896,6 +930,7 @@ UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilte _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_has_value(const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_value(const envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry *msg) { struct google_protobuf_Struct* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -913,6 +948,7 @@ UPB_INLINE upb_strview envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPer _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_has_value(const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_value(const envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry *msg) { struct google_protobuf_Any* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -944,7 +980,7 @@ typedef enum { envoy_api_v2_route_RouteMatch_path_specifier_safe_regex = 10, envoy_api_v2_route_RouteMatch_path_specifier_NOT_SET = 0 } envoy_api_v2_route_RouteMatch_path_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_RouteMatch_path_specifier_oneofcases envoy_api_v2_route_RouteMatch_path_specifier_case(const envoy_api_v2_route_RouteMatch* msg) { return (envoy_api_v2_route_RouteMatch_path_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(32, 64)); } +UPB_INLINE envoy_api_v2_route_RouteMatch_path_specifier_oneofcases envoy_api_v2_route_RouteMatch_path_specifier_case(const envoy_api_v2_route_RouteMatch* msg) { return (envoy_api_v2_route_RouteMatch_path_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 64), int32_t); } UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_prefix(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 64), 1); } UPB_INLINE upb_strview envoy_api_v2_route_RouteMatch_prefix(const envoy_api_v2_route_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 1, upb_strview_make("", strlen(""))); } @@ -952,14 +988,20 @@ UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_path(const envoy_api_v2_route_ UPB_INLINE upb_strview envoy_api_v2_route_RouteMatch_path(const envoy_api_v2_route_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 2, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_regex(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 64), 3); } UPB_INLINE upb_strview envoy_api_v2_route_RouteMatch_regex(const envoy_api_v2_route_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 3, upb_strview_make("", strlen(""))); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_case_sensitive(const envoy_api_v2_route_RouteMatch *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_case_sensitive(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_case_sensitive(const envoy_api_v2_route_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_headers(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const envoy_api_v2_route_HeaderMatcher* const* envoy_api_v2_route_RouteMatch_headers(const envoy_api_v2_route_RouteMatch *msg, size_t *len) { return (const envoy_api_v2_route_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_query_parameters(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const envoy_api_v2_route_QueryParameterMatcher* const* envoy_api_v2_route_RouteMatch_query_parameters(const envoy_api_v2_route_RouteMatch *msg, size_t *len) { return (const envoy_api_v2_route_QueryParameterMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } -UPB_INLINE const envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* envoy_api_v2_route_RouteMatch_grpc(const envoy_api_v2_route_RouteMatch *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteMatch_runtime_fraction(const envoy_api_v2_route_RouteMatch *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_grpc(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* envoy_api_v2_route_RouteMatch_grpc(const envoy_api_v2_route_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_runtime_fraction(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteMatch_runtime_fraction(const envoy_api_v2_route_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_RuntimeFractionalPercent*); } UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_safe_regex(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 64), 10); } UPB_INLINE const struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_RouteMatch_safe_regex(const envoy_api_v2_route_RouteMatch *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 10, NULL); } -UPB_INLINE const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions* envoy_api_v2_route_RouteMatch_tls_context(const envoy_api_v2_route_RouteMatch *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_tls_context(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions* envoy_api_v2_route_RouteMatch_tls_context(const envoy_api_v2_route_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions*); } UPB_INLINE void envoy_api_v2_route_RouteMatch_set_prefix(envoy_api_v2_route_RouteMatch *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), value, UPB_SIZE(32, 64), 1); @@ -971,7 +1013,7 @@ UPB_INLINE void envoy_api_v2_route_RouteMatch_set_regex(envoy_api_v2_route_Route UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), value, UPB_SIZE(32, 64), 3); } UPB_INLINE void envoy_api_v2_route_RouteMatch_set_case_sensitive(envoy_api_v2_route_RouteMatch *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_mutable_case_sensitive(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteMatch_case_sensitive(msg); @@ -1009,7 +1051,7 @@ UPB_INLINE struct envoy_api_v2_route_QueryParameterMatcher* envoy_api_v2_route_R return sub; } UPB_INLINE void envoy_api_v2_route_RouteMatch_set_grpc(envoy_api_v2_route_RouteMatch *msg, envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*) = value; } UPB_INLINE struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* envoy_api_v2_route_RouteMatch_mutable_grpc(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* sub = (struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*)envoy_api_v2_route_RouteMatch_grpc(msg); @@ -1021,7 +1063,7 @@ UPB_INLINE struct envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* envoy_api return sub; } UPB_INLINE void envoy_api_v2_route_RouteMatch_set_runtime_fraction(envoy_api_v2_route_RouteMatch *msg, struct envoy_api_v2_core_RuntimeFractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_api_v2_core_RuntimeFractionalPercent*) = value; } UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteMatch_mutable_runtime_fraction(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeFractionalPercent* sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)envoy_api_v2_route_RouteMatch_runtime_fraction(msg); @@ -1045,7 +1087,7 @@ UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_RouteMatch return sub; } UPB_INLINE void envoy_api_v2_route_RouteMatch_set_tls_context(envoy_api_v2_route_RouteMatch *msg, envoy_api_v2_route_RouteMatch_TlsContextMatchOptions* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_RouteMatch_TlsContextMatchOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_api_v2_route_RouteMatch_TlsContextMatchOptions*) = value; } UPB_INLINE struct envoy_api_v2_route_RouteMatch_TlsContextMatchOptions* envoy_api_v2_route_RouteMatch_mutable_tls_context(envoy_api_v2_route_RouteMatch *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteMatch_TlsContextMatchOptions* sub = (struct envoy_api_v2_route_RouteMatch_TlsContextMatchOptions*)envoy_api_v2_route_RouteMatch_tls_context(msg); @@ -1087,11 +1129,13 @@ UPB_INLINE char *envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_serialize( return upb_encode(msg, &envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_presented(const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_validated(const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_has_presented(const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_presented(const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_has_validated(const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_validated(const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); } UPB_INLINE void envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_set_presented(envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_mutable_presented(envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_presented(msg); @@ -1103,7 +1147,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_TlsCo return sub; } UPB_INLINE void envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_set_validated(envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_mutable_validated(envoy_api_v2_route_RouteMatch_TlsContextMatchOptions *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_validated(msg); @@ -1134,20 +1178,23 @@ typedef enum { envoy_api_v2_route_CorsPolicy_enabled_specifier_filter_enabled = 9, envoy_api_v2_route_CorsPolicy_enabled_specifier_NOT_SET = 0 } envoy_api_v2_route_CorsPolicy_enabled_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_CorsPolicy_enabled_specifier_oneofcases envoy_api_v2_route_CorsPolicy_enabled_specifier_case(const envoy_api_v2_route_CorsPolicy* msg) { return (envoy_api_v2_route_CorsPolicy_enabled_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(56, 112)); } +UPB_INLINE envoy_api_v2_route_CorsPolicy_enabled_specifier_oneofcases envoy_api_v2_route_CorsPolicy_enabled_specifier_case(const envoy_api_v2_route_CorsPolicy* msg) { return (envoy_api_v2_route_CorsPolicy_enabled_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(56, 112), int32_t); } UPB_INLINE upb_strview const* envoy_api_v2_route_CorsPolicy_allow_origin(const envoy_api_v2_route_CorsPolicy *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } -UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_allow_methods(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_allow_headers(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_expose_headers(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } -UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_max_age(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 48)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_CorsPolicy_allow_credentials(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(32, 64)); } +UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_allow_methods(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_allow_headers(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_expose_headers(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_max_age(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_allow_credentials(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_CorsPolicy_allow_credentials(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_BoolValue*); } UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 7); } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_CorsPolicy_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 7, NULL); } UPB_INLINE upb_strview const* envoy_api_v2_route_CorsPolicy_allow_origin_regex(const envoy_api_v2_route_CorsPolicy *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_filter_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 9); } UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_CorsPolicy_filter_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 9, NULL); } -UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_CorsPolicy_shadow_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(36, 72)); } +UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_shadow_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } +UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_CorsPolicy_shadow_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct envoy_api_v2_core_RuntimeFractionalPercent*); } +UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_allow_origin_string_match(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); } UPB_INLINE const struct envoy_type_matcher_StringMatcher* const* envoy_api_v2_route_CorsPolicy_allow_origin_string_match(const envoy_api_v2_route_CorsPolicy *msg, size_t *len) { return (const struct envoy_type_matcher_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); } UPB_INLINE upb_strview* envoy_api_v2_route_CorsPolicy_mutable_allow_origin(envoy_api_v2_route_CorsPolicy *msg, size_t *len) { @@ -1161,19 +1208,19 @@ UPB_INLINE bool envoy_api_v2_route_CorsPolicy_add_allow_origin(envoy_api_v2_rout arena); } UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_allow_methods(envoy_api_v2_route_CorsPolicy *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_allow_headers(envoy_api_v2_route_CorsPolicy *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_expose_headers(envoy_api_v2_route_CorsPolicy *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_max_age(envoy_api_v2_route_CorsPolicy *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_allow_credentials(envoy_api_v2_route_CorsPolicy *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(32, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_CorsPolicy_mutable_allow_credentials(envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_CorsPolicy_allow_credentials(msg); @@ -1219,7 +1266,7 @@ UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route return sub; } UPB_INLINE void envoy_api_v2_route_CorsPolicy_set_shadow_enabled(envoy_api_v2_route_CorsPolicy *msg, struct envoy_api_v2_core_RuntimeFractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(36, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 72), struct envoy_api_v2_core_RuntimeFractionalPercent*) = value; } UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_CorsPolicy_mutable_shadow_enabled(envoy_api_v2_route_CorsPolicy *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeFractionalPercent* sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)envoy_api_v2_route_CorsPolicy_shadow_enabled(msg); @@ -1264,7 +1311,7 @@ typedef enum { envoy_api_v2_route_RouteAction_cluster_specifier_weighted_clusters = 3, envoy_api_v2_route_RouteAction_cluster_specifier_NOT_SET = 0 } envoy_api_v2_route_RouteAction_cluster_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_RouteAction_cluster_specifier_oneofcases envoy_api_v2_route_RouteAction_cluster_specifier_case(const envoy_api_v2_route_RouteAction* msg) { return (envoy_api_v2_route_RouteAction_cluster_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(108, 192)); } +UPB_INLINE envoy_api_v2_route_RouteAction_cluster_specifier_oneofcases envoy_api_v2_route_RouteAction_cluster_specifier_case(const envoy_api_v2_route_RouteAction* msg) { return (envoy_api_v2_route_RouteAction_cluster_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(108, 192), int32_t); } typedef enum { envoy_api_v2_route_RouteAction_host_rewrite_specifier_host_rewrite = 6, @@ -1272,7 +1319,7 @@ typedef enum { envoy_api_v2_route_RouteAction_host_rewrite_specifier_auto_host_rewrite_header = 29, envoy_api_v2_route_RouteAction_host_rewrite_specifier_NOT_SET = 0 } envoy_api_v2_route_RouteAction_host_rewrite_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_RouteAction_host_rewrite_specifier_oneofcases envoy_api_v2_route_RouteAction_host_rewrite_specifier_case(const envoy_api_v2_route_RouteAction* msg) { return (envoy_api_v2_route_RouteAction_host_rewrite_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(120, 216)); } +UPB_INLINE envoy_api_v2_route_RouteAction_host_rewrite_specifier_oneofcases envoy_api_v2_route_RouteAction_host_rewrite_specifier_case(const envoy_api_v2_route_RouteAction* msg) { return (envoy_api_v2_route_RouteAction_host_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(120, 216), int32_t); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_cluster(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 192), 1); } UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_cluster(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(100, 176), UPB_SIZE(108, 192), 1, upb_strview_make("", strlen(""))); } @@ -1280,33 +1327,50 @@ UPB_INLINE bool envoy_api_v2_route_RouteAction_has_cluster_header(const envoy_ap UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_cluster_header(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(100, 176), UPB_SIZE(108, 192), 2, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_weighted_clusters(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 192), 3); } UPB_INLINE const envoy_api_v2_route_WeightedCluster* envoy_api_v2_route_RouteAction_weighted_clusters(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_WeightedCluster*, UPB_SIZE(100, 176), UPB_SIZE(108, 192), 3, NULL); } -UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_RouteAction_metadata_match(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Metadata*, UPB_SIZE(32, 40)); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_prefix_rewrite(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 24)); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_metadata_match(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 40)); } +UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_RouteAction_metadata_match(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), const struct envoy_api_v2_core_Metadata*); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_prefix_rewrite(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 216), 6); } UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(112, 200), UPB_SIZE(120, 216), 6, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_auto_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 216), 7); } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_auto_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(112, 200), UPB_SIZE(120, 216), 7, NULL); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_timeout(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(36, 48)); } -UPB_INLINE const envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_RouteAction_retry_policy(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RetryPolicy*, UPB_SIZE(40, 56)); } -UPB_INLINE const envoy_api_v2_route_RouteAction_RequestMirrorPolicy* envoy_api_v2_route_RouteAction_request_mirror_policy(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RouteAction_RequestMirrorPolicy*, UPB_SIZE(44, 64)); } -UPB_INLINE int32_t envoy_api_v2_route_RouteAction_priority(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_timeout(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 48)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_timeout(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_retry_policy(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 56)); } +UPB_INLINE const envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_RouteAction_retry_policy(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), const envoy_api_v2_route_RetryPolicy*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_request_mirror_policy(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 64)); } +UPB_INLINE const envoy_api_v2_route_RouteAction_RequestMirrorPolicy* envoy_api_v2_route_RouteAction_request_mirror_policy(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), const envoy_api_v2_route_RouteAction_RequestMirrorPolicy*); } +UPB_INLINE int32_t envoy_api_v2_route_RouteAction_priority(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_rate_limits(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 144)); } UPB_INLINE const envoy_api_v2_route_RateLimit* const* envoy_api_v2_route_RouteAction_rate_limits(const envoy_api_v2_route_RouteAction *msg, size_t *len) { return (const envoy_api_v2_route_RateLimit* const*)_upb_array_accessor(msg, UPB_SIZE(84, 144), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_include_vh_rate_limits(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(48, 72)); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_include_vh_rate_limits(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 72)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_include_vh_rate_limits(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_hash_policy(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 152)); } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy* const* envoy_api_v2_route_RouteAction_hash_policy(const envoy_api_v2_route_RouteAction *msg, size_t *len) { return (const envoy_api_v2_route_RouteAction_HashPolicy* const*)_upb_array_accessor(msg, UPB_SIZE(88, 152), len); } -UPB_INLINE const envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_RouteAction_cors(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_CorsPolicy*, UPB_SIZE(52, 80)); } -UPB_INLINE int32_t envoy_api_v2_route_RouteAction_cluster_not_found_response_code(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_max_grpc_timeout(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(56, 88)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_idle_timeout(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(60, 96)); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_cors(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 80)); } +UPB_INLINE const envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_RouteAction_cors(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), const envoy_api_v2_route_CorsPolicy*); } +UPB_INLINE int32_t envoy_api_v2_route_RouteAction_cluster_not_found_response_code(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_max_grpc_timeout(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 88)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_max_grpc_timeout(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_idle_timeout(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 96)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_idle_timeout(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_upgrade_configs(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 160)); } UPB_INLINE const envoy_api_v2_route_RouteAction_UpgradeConfig* const* envoy_api_v2_route_RouteAction_upgrade_configs(const envoy_api_v2_route_RouteAction *msg, size_t *len) { return (const envoy_api_v2_route_RouteAction_UpgradeConfig* const*)_upb_array_accessor(msg, UPB_SIZE(92, 160), len); } -UPB_INLINE int32_t envoy_api_v2_route_RouteAction_internal_redirect_action(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } -UPB_INLINE const envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_RouteAction_hedge_policy(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_HedgePolicy*, UPB_SIZE(64, 104)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_grpc_timeout_offset(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(68, 112)); } +UPB_INLINE int32_t envoy_api_v2_route_RouteAction_internal_redirect_action(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_hedge_policy(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 104)); } +UPB_INLINE const envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_RouteAction_hedge_policy(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), const envoy_api_v2_route_HedgePolicy*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_grpc_timeout_offset(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 112)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_grpc_timeout_offset(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), const struct google_protobuf_Duration*); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_auto_host_rewrite_header(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 216), 29); } UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_auto_host_rewrite_header(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(112, 200), UPB_SIZE(120, 216), 29, upb_strview_make("", strlen(""))); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_request_mirror_policies(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 168)); } UPB_INLINE const envoy_api_v2_route_RouteAction_RequestMirrorPolicy* const* envoy_api_v2_route_RouteAction_request_mirror_policies(const envoy_api_v2_route_RouteAction *msg, size_t *len) { return (const envoy_api_v2_route_RouteAction_RequestMirrorPolicy* const*)_upb_array_accessor(msg, UPB_SIZE(96, 168), len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_RouteAction_max_internal_redirects(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(72, 120)); } -UPB_INLINE const struct envoy_type_matcher_RegexMatchAndSubstitute* envoy_api_v2_route_RouteAction_regex_rewrite(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_matcher_RegexMatchAndSubstitute*, UPB_SIZE(76, 128)); } -UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_RouteAction_retry_policy_typed_config(const envoy_api_v2_route_RouteAction *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(80, 136)); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_max_internal_redirects(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 120)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_RouteAction_max_internal_redirects(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 120), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_regex_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 128)); } +UPB_INLINE const struct envoy_type_matcher_RegexMatchAndSubstitute* envoy_api_v2_route_RouteAction_regex_rewrite(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), const struct envoy_type_matcher_RegexMatchAndSubstitute*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_retry_policy_typed_config(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 136)); } +UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_RouteAction_retry_policy_typed_config(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 136), const struct google_protobuf_Any*); } UPB_INLINE void envoy_api_v2_route_RouteAction_set_cluster(envoy_api_v2_route_RouteAction *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(100, 176), value, UPB_SIZE(108, 192), 1); @@ -1327,7 +1391,7 @@ UPB_INLINE struct envoy_api_v2_route_WeightedCluster* envoy_api_v2_route_RouteAc return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_metadata_match(envoy_api_v2_route_RouteAction *msg, struct envoy_api_v2_core_Metadata* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Metadata*, UPB_SIZE(32, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 40), struct envoy_api_v2_core_Metadata*) = value; } UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_route_RouteAction_mutable_metadata_match(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_core_Metadata* sub = (struct envoy_api_v2_core_Metadata*)envoy_api_v2_route_RouteAction_metadata_match(msg); @@ -1339,7 +1403,7 @@ UPB_INLINE struct envoy_api_v2_core_Metadata* envoy_api_v2_route_RouteAction_mut return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_prefix_rewrite(envoy_api_v2_route_RouteAction *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_host_rewrite(envoy_api_v2_route_RouteAction *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(112, 200), value, UPB_SIZE(120, 216), 6); @@ -1357,7 +1421,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_muta return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_timeout(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(36, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 48), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutable_timeout(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_timeout(msg); @@ -1369,7 +1433,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutab return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_retry_policy(envoy_api_v2_route_RouteAction *msg, envoy_api_v2_route_RetryPolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_RetryPolicy*, UPB_SIZE(40, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 56), envoy_api_v2_route_RetryPolicy*) = value; } UPB_INLINE struct envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_RouteAction_mutable_retry_policy(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_RetryPolicy* sub = (struct envoy_api_v2_route_RetryPolicy*)envoy_api_v2_route_RouteAction_retry_policy(msg); @@ -1381,7 +1445,7 @@ UPB_INLINE struct envoy_api_v2_route_RetryPolicy* envoy_api_v2_route_RouteAction return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_request_mirror_policy(envoy_api_v2_route_RouteAction *msg, envoy_api_v2_route_RouteAction_RequestMirrorPolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_RouteAction_RequestMirrorPolicy*, UPB_SIZE(44, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 64), envoy_api_v2_route_RouteAction_RequestMirrorPolicy*) = value; } UPB_INLINE struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy* envoy_api_v2_route_RouteAction_mutable_request_mirror_policy(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy* sub = (struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy*)envoy_api_v2_route_RouteAction_request_mirror_policy(msg); @@ -1393,7 +1457,7 @@ UPB_INLINE struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy* envoy_api_ return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_priority(envoy_api_v2_route_RouteAction *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE envoy_api_v2_route_RateLimit** envoy_api_v2_route_RouteAction_mutable_rate_limits(envoy_api_v2_route_RouteAction *msg, size_t *len) { return (envoy_api_v2_route_RateLimit**)_upb_array_mutable_accessor(msg, UPB_SIZE(84, 144), len); @@ -1409,7 +1473,7 @@ UPB_INLINE struct envoy_api_v2_route_RateLimit* envoy_api_v2_route_RouteAction_a return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_include_vh_rate_limits(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(48, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 72), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_mutable_include_vh_rate_limits(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteAction_include_vh_rate_limits(msg); @@ -1434,7 +1498,7 @@ UPB_INLINE struct envoy_api_v2_route_RouteAction_HashPolicy* envoy_api_v2_route_ return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_cors(envoy_api_v2_route_RouteAction *msg, envoy_api_v2_route_CorsPolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_CorsPolicy*, UPB_SIZE(52, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 80), envoy_api_v2_route_CorsPolicy*) = value; } UPB_INLINE struct envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_RouteAction_mutable_cors(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_CorsPolicy* sub = (struct envoy_api_v2_route_CorsPolicy*)envoy_api_v2_route_RouteAction_cors(msg); @@ -1446,10 +1510,10 @@ UPB_INLINE struct envoy_api_v2_route_CorsPolicy* envoy_api_v2_route_RouteAction_ return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_cluster_not_found_response_code(envoy_api_v2_route_RouteAction *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_max_grpc_timeout(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(56, 88)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 88), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutable_max_grpc_timeout(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_max_grpc_timeout(msg); @@ -1461,7 +1525,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutab return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_idle_timeout(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(60, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 96), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutable_idle_timeout(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_idle_timeout(msg); @@ -1486,10 +1550,10 @@ UPB_INLINE struct envoy_api_v2_route_RouteAction_UpgradeConfig* envoy_api_v2_rou return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_internal_redirect_action(envoy_api_v2_route_RouteAction *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_hedge_policy(envoy_api_v2_route_RouteAction *msg, envoy_api_v2_route_HedgePolicy* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_HedgePolicy*, UPB_SIZE(64, 104)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 104), envoy_api_v2_route_HedgePolicy*) = value; } UPB_INLINE struct envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_RouteAction_mutable_hedge_policy(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_api_v2_route_HedgePolicy* sub = (struct envoy_api_v2_route_HedgePolicy*)envoy_api_v2_route_RouteAction_hedge_policy(msg); @@ -1501,7 +1565,7 @@ UPB_INLINE struct envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_RouteAction return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_grpc_timeout_offset(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(68, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 112), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_mutable_grpc_timeout_offset(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_grpc_timeout_offset(msg); @@ -1529,7 +1593,7 @@ UPB_INLINE struct envoy_api_v2_route_RouteAction_RequestMirrorPolicy* envoy_api_ return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_max_internal_redirects(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(72, 120)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(72, 120), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_RouteAction_mutable_max_internal_redirects(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_RouteAction_max_internal_redirects(msg); @@ -1541,7 +1605,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_RouteAction_mu return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_regex_rewrite(envoy_api_v2_route_RouteAction *msg, struct envoy_type_matcher_RegexMatchAndSubstitute* value) { - UPB_FIELD_AT(msg, struct envoy_type_matcher_RegexMatchAndSubstitute*, UPB_SIZE(76, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(76, 128), struct envoy_type_matcher_RegexMatchAndSubstitute*) = value; } UPB_INLINE struct envoy_type_matcher_RegexMatchAndSubstitute* envoy_api_v2_route_RouteAction_mutable_regex_rewrite(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct envoy_type_matcher_RegexMatchAndSubstitute* sub = (struct envoy_type_matcher_RegexMatchAndSubstitute*)envoy_api_v2_route_RouteAction_regex_rewrite(msg); @@ -1553,7 +1617,7 @@ UPB_INLINE struct envoy_type_matcher_RegexMatchAndSubstitute* envoy_api_v2_route return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_set_retry_policy_typed_config(envoy_api_v2_route_RouteAction *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(80, 136)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(80, 136), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_api_v2_route_RouteAction_mutable_retry_policy_typed_config(envoy_api_v2_route_RouteAction *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_api_v2_route_RouteAction_retry_policy_typed_config(msg); @@ -1579,19 +1643,21 @@ UPB_INLINE char *envoy_api_v2_route_RouteAction_RequestMirrorPolicy_serialize(co return upb_encode(msg, &envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_RequestMirrorPolicy_cluster(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_RequestMirrorPolicy_runtime_key(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteAction_RequestMirrorPolicy_runtime_fraction(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(16, 32)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_RequestMirrorPolicy_trace_sampled(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(20, 40)); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_RequestMirrorPolicy_cluster(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_RequestMirrorPolicy_runtime_key(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_RequestMirrorPolicy_has_runtime_fraction(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteAction_RequestMirrorPolicy_runtime_fraction(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_api_v2_core_RuntimeFractionalPercent*); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_RequestMirrorPolicy_has_trace_sampled(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_RequestMirrorPolicy_trace_sampled(const envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_BoolValue*); } UPB_INLINE void envoy_api_v2_route_RouteAction_RequestMirrorPolicy_set_cluster(envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RouteAction_RequestMirrorPolicy_set_runtime_key(envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RouteAction_RequestMirrorPolicy_set_runtime_fraction(envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, struct envoy_api_v2_core_RuntimeFractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_api_v2_core_RuntimeFractionalPercent*) = value; } UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteAction_RequestMirrorPolicy_mutable_runtime_fraction(envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeFractionalPercent* sub = (struct envoy_api_v2_core_RuntimeFractionalPercent*)envoy_api_v2_route_RouteAction_RequestMirrorPolicy_runtime_fraction(msg); @@ -1603,7 +1669,7 @@ UPB_INLINE struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_RequestMirrorPolicy_set_trace_sampled(envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_RequestMirrorPolicy_mutable_trace_sampled(envoy_api_v2_route_RouteAction_RequestMirrorPolicy *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteAction_RequestMirrorPolicy_trace_sampled(msg); @@ -1637,7 +1703,7 @@ typedef enum { envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_filter_state = 6, envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_NOT_SET = 0 } envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_oneofcases envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_case(const envoy_api_v2_route_RouteAction_HashPolicy* msg) { return (envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } +UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_oneofcases envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_case(const envoy_api_v2_route_RouteAction_HashPolicy* msg) { return (envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_header(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_Header* envoy_api_v2_route_RouteAction_HashPolicy_header(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_Header*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 1, NULL); } @@ -1645,7 +1711,7 @@ UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_cookie(const envoy UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_Cookie* envoy_api_v2_route_RouteAction_HashPolicy_cookie(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_Cookie*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 2, NULL); } UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_connection_properties(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties* envoy_api_v2_route_RouteAction_HashPolicy_connection_properties(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 3, NULL); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_terminal(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_terminal(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_query_parameter(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 5); } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter* envoy_api_v2_route_RouteAction_HashPolicy_query_parameter(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 5, NULL); } UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_filter_state(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 6); } @@ -1688,7 +1754,7 @@ UPB_INLINE struct envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_terminal(envoy_api_v2_route_RouteAction_HashPolicy *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_query_parameter(envoy_api_v2_route_RouteAction_HashPolicy *msg, envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter* value) { UPB_WRITE_ONEOF(msg, envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 5); @@ -1729,10 +1795,10 @@ UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_Header_serialize(cons return upb_encode(msg, &envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_Header_header_name(const envoy_api_v2_route_RouteAction_HashPolicy_Header *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_Header_header_name(const envoy_api_v2_route_RouteAction_HashPolicy_Header *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_Header_set_header_name(envoy_api_v2_route_RouteAction_HashPolicy_Header *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.route.RouteAction.HashPolicy.Cookie */ @@ -1749,15 +1815,16 @@ UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_Cookie_serialize(cons return upb_encode(msg, &envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_Cookie_name(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_HashPolicy_Cookie_ttl(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(16, 32)); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_Cookie_path(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_Cookie_name(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_Cookie_has_ttl(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_HashPolicy_Cookie_ttl(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Duration*); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_Cookie_path(const envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_Cookie_set_name(envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_Cookie_set_ttl(envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_HashPolicy_Cookie_mutable_ttl(envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RouteAction_HashPolicy_Cookie_ttl(msg); @@ -1769,7 +1836,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_HashP return sub; } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_Cookie_set_path(envoy_api_v2_route_RouteAction_HashPolicy_Cookie *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties */ @@ -1786,10 +1853,10 @@ UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_ return upb_encode(msg, &envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, arena, len); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_source_ip(const envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_source_ip(const envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_set_source_ip(envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter */ @@ -1806,10 +1873,10 @@ UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_serial return upb_encode(msg, &envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_name(const envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_name(const envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_set_name(envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.route.RouteAction.HashPolicy.FilterState */ @@ -1826,10 +1893,10 @@ UPB_INLINE char *envoy_api_v2_route_RouteAction_HashPolicy_FilterState_serialize return upb_encode(msg, &envoy_api_v2_route_RouteAction_HashPolicy_FilterState_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_FilterState_key(const envoy_api_v2_route_RouteAction_HashPolicy_FilterState *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_HashPolicy_FilterState_key(const envoy_api_v2_route_RouteAction_HashPolicy_FilterState *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_FilterState_set_key(envoy_api_v2_route_RouteAction_HashPolicy_FilterState *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.route.RouteAction.UpgradeConfig */ @@ -1846,14 +1913,15 @@ UPB_INLINE char *envoy_api_v2_route_RouteAction_UpgradeConfig_serialize(const en return upb_encode(msg, &envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_UpgradeConfig_upgrade_type(const envoy_api_v2_route_RouteAction_UpgradeConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_UpgradeConfig_enabled(const envoy_api_v2_route_RouteAction_UpgradeConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_UpgradeConfig_upgrade_type(const envoy_api_v2_route_RouteAction_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_UpgradeConfig_has_enabled(const envoy_api_v2_route_RouteAction_UpgradeConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_UpgradeConfig_enabled(const envoy_api_v2_route_RouteAction_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); } UPB_INLINE void envoy_api_v2_route_RouteAction_UpgradeConfig_set_upgrade_type(envoy_api_v2_route_RouteAction_UpgradeConfig *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RouteAction_UpgradeConfig_set_enabled(envoy_api_v2_route_RouteAction_UpgradeConfig *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_UpgradeConfig_mutable_enabled(envoy_api_v2_route_RouteAction_UpgradeConfig *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RouteAction_UpgradeConfig_enabled(msg); @@ -1879,22 +1947,29 @@ UPB_INLINE char *envoy_api_v2_route_RetryPolicy_serialize(const envoy_api_v2_rou return upb_encode(msg, &envoy_api_v2_route_RetryPolicy_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RetryPolicy_retry_on(const envoy_api_v2_route_RetryPolicy *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_RetryPolicy_num_retries(const envoy_api_v2_route_RetryPolicy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(16, 24)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_per_try_timeout(const envoy_api_v2_route_RetryPolicy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(20, 32)); } -UPB_INLINE const envoy_api_v2_route_RetryPolicy_RetryPriority* envoy_api_v2_route_RetryPolicy_retry_priority(const envoy_api_v2_route_RetryPolicy *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RetryPolicy_RetryPriority*, UPB_SIZE(24, 40)); } +UPB_INLINE upb_strview envoy_api_v2_route_RetryPolicy_retry_on(const envoy_api_v2_route_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_has_num_retries(const envoy_api_v2_route_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_RetryPolicy_num_retries(const envoy_api_v2_route_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_has_per_try_timeout(const envoy_api_v2_route_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_per_try_timeout(const envoy_api_v2_route_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_has_retry_priority(const envoy_api_v2_route_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const envoy_api_v2_route_RetryPolicy_RetryPriority* envoy_api_v2_route_RetryPolicy_retry_priority(const envoy_api_v2_route_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_api_v2_route_RetryPolicy_RetryPriority*); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_has_retry_host_predicate(const envoy_api_v2_route_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); } UPB_INLINE const envoy_api_v2_route_RetryPolicy_RetryHostPredicate* const* envoy_api_v2_route_RetryPolicy_retry_host_predicate(const envoy_api_v2_route_RetryPolicy *msg, size_t *len) { return (const envoy_api_v2_route_RetryPolicy_RetryHostPredicate* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); } -UPB_INLINE int64_t envoy_api_v2_route_RetryPolicy_host_selection_retry_max_attempts(const envoy_api_v2_route_RetryPolicy *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } +UPB_INLINE int64_t envoy_api_v2_route_RetryPolicy_host_selection_retry_max_attempts(const envoy_api_v2_route_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } UPB_INLINE uint32_t const* envoy_api_v2_route_RetryPolicy_retriable_status_codes(const envoy_api_v2_route_RetryPolicy *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); } -UPB_INLINE const envoy_api_v2_route_RetryPolicy_RetryBackOff* envoy_api_v2_route_RetryPolicy_retry_back_off(const envoy_api_v2_route_RetryPolicy *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_route_RetryPolicy_RetryBackOff*, UPB_SIZE(28, 48)); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_has_retry_back_off(const envoy_api_v2_route_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); } +UPB_INLINE const envoy_api_v2_route_RetryPolicy_RetryBackOff* envoy_api_v2_route_RetryPolicy_retry_back_off(const envoy_api_v2_route_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const envoy_api_v2_route_RetryPolicy_RetryBackOff*); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_has_retriable_headers(const envoy_api_v2_route_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); } UPB_INLINE const envoy_api_v2_route_HeaderMatcher* const* envoy_api_v2_route_RetryPolicy_retriable_headers(const envoy_api_v2_route_RetryPolicy *msg, size_t *len) { return (const envoy_api_v2_route_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_has_retriable_request_headers(const envoy_api_v2_route_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); } UPB_INLINE const envoy_api_v2_route_HeaderMatcher* const* envoy_api_v2_route_RetryPolicy_retriable_request_headers(const envoy_api_v2_route_RetryPolicy *msg, size_t *len) { return (const envoy_api_v2_route_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); } UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_retry_on(envoy_api_v2_route_RetryPolicy *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_num_retries(envoy_api_v2_route_RetryPolicy *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_RetryPolicy_mutable_num_retries(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_RetryPolicy_num_retries(msg); @@ -1906,7 +1981,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_RetryPolicy_mu return sub; } UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_per_try_timeout(envoy_api_v2_route_RetryPolicy *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_mutable_per_try_timeout(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RetryPolicy_per_try_timeout(msg); @@ -1918,7 +1993,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_mutab return sub; } UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_retry_priority(envoy_api_v2_route_RetryPolicy *msg, envoy_api_v2_route_RetryPolicy_RetryPriority* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_RetryPolicy_RetryPriority*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_api_v2_route_RetryPolicy_RetryPriority*) = value; } UPB_INLINE struct envoy_api_v2_route_RetryPolicy_RetryPriority* envoy_api_v2_route_RetryPolicy_mutable_retry_priority(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { struct envoy_api_v2_route_RetryPolicy_RetryPriority* sub = (struct envoy_api_v2_route_RetryPolicy_RetryPriority*)envoy_api_v2_route_RetryPolicy_retry_priority(msg); @@ -1943,7 +2018,7 @@ UPB_INLINE struct envoy_api_v2_route_RetryPolicy_RetryHostPredicate* envoy_api_v return sub; } UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_host_selection_retry_max_attempts(envoy_api_v2_route_RetryPolicy *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } UPB_INLINE uint32_t* envoy_api_v2_route_RetryPolicy_mutable_retriable_status_codes(envoy_api_v2_route_RetryPolicy *msg, size_t *len) { return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len); @@ -1956,7 +2031,7 @@ UPB_INLINE bool envoy_api_v2_route_RetryPolicy_add_retriable_status_codes(envoy_ arena); } UPB_INLINE void envoy_api_v2_route_RetryPolicy_set_retry_back_off(envoy_api_v2_route_RetryPolicy *msg, envoy_api_v2_route_RetryPolicy_RetryBackOff* value) { - UPB_FIELD_AT(msg, envoy_api_v2_route_RetryPolicy_RetryBackOff*, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), envoy_api_v2_route_RetryPolicy_RetryBackOff*) = value; } UPB_INLINE struct envoy_api_v2_route_RetryPolicy_RetryBackOff* envoy_api_v2_route_RetryPolicy_mutable_retry_back_off(envoy_api_v2_route_RetryPolicy *msg, upb_arena *arena) { struct envoy_api_v2_route_RetryPolicy_RetryBackOff* sub = (struct envoy_api_v2_route_RetryPolicy_RetryBackOff*)envoy_api_v2_route_RetryPolicy_retry_back_off(msg); @@ -2013,16 +2088,16 @@ typedef enum { envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_typed_config = 3, envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_NOT_SET = 0 } envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_oneofcases; -UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_oneofcases envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_case(const envoy_api_v2_route_RetryPolicy_RetryPriority* msg) { return (envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_oneofcases envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_case(const envoy_api_v2_route_RetryPolicy_RetryPriority* msg) { return (envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_route_RetryPolicy_RetryPriority_name(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_route_RetryPolicy_RetryPriority_name(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryPriority_has_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_RetryPolicy_RetryPriority_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryPriority_has_typed_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_RetryPolicy_RetryPriority_typed_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryPriority_set_name(envoy_api_v2_route_RetryPolicy_RetryPriority *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryPriority_set_config(envoy_api_v2_route_RetryPolicy_RetryPriority *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); @@ -2068,16 +2143,16 @@ typedef enum { envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_typed_config = 3, envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_NOT_SET = 0 } envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_oneofcases; -UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_oneofcases envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_case(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate* msg) { return (envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_oneofcases envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_case(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate* msg) { return (envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_route_RetryPolicy_RetryHostPredicate_name(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_route_RetryPolicy_RetryHostPredicate_name(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryHostPredicate_has_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryHostPredicate_has_typed_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_RetryPolicy_RetryHostPredicate_typed_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_name(envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_config(envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); @@ -2118,11 +2193,13 @@ UPB_INLINE char *envoy_api_v2_route_RetryPolicy_RetryBackOff_serialize(const env return upb_encode(msg, &envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_RetryBackOff_base_interval(const envoy_api_v2_route_RetryPolicy_RetryBackOff *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_RetryBackOff_max_interval(const envoy_api_v2_route_RetryPolicy_RetryBackOff *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8)); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryBackOff_has_base_interval(const envoy_api_v2_route_RetryPolicy_RetryBackOff *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_RetryBackOff_base_interval(const envoy_api_v2_route_RetryPolicy_RetryBackOff *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryBackOff_has_max_interval(const envoy_api_v2_route_RetryPolicy_RetryBackOff *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_RetryBackOff_max_interval(const envoy_api_v2_route_RetryPolicy_RetryBackOff *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); } UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryBackOff_set_base_interval(envoy_api_v2_route_RetryPolicy_RetryBackOff *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_RetryBackOff_mutable_base_interval(envoy_api_v2_route_RetryPolicy_RetryBackOff *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RetryPolicy_RetryBackOff_base_interval(msg); @@ -2134,7 +2211,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_Retry return sub; } UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryBackOff_set_max_interval(envoy_api_v2_route_RetryPolicy_RetryBackOff *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_api_v2_route_RetryPolicy_RetryBackOff_mutable_max_interval(envoy_api_v2_route_RetryPolicy_RetryBackOff *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_api_v2_route_RetryPolicy_RetryBackOff_max_interval(msg); @@ -2160,12 +2237,14 @@ UPB_INLINE char *envoy_api_v2_route_HedgePolicy_serialize(const envoy_api_v2_rou return upb_encode(msg, &envoy_api_v2_route_HedgePolicy_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_HedgePolicy_initial_requests(const envoy_api_v2_route_HedgePolicy *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_route_HedgePolicy_additional_request_chance(const envoy_api_v2_route_HedgePolicy *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)); } -UPB_INLINE bool envoy_api_v2_route_HedgePolicy_hedge_on_per_try_timeout(const envoy_api_v2_route_HedgePolicy *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_route_HedgePolicy_has_initial_requests(const envoy_api_v2_route_HedgePolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_HedgePolicy_initial_requests(const envoy_api_v2_route_HedgePolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_api_v2_route_HedgePolicy_has_additional_request_chance(const envoy_api_v2_route_HedgePolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_route_HedgePolicy_additional_request_chance(const envoy_api_v2_route_HedgePolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_FractionalPercent*); } +UPB_INLINE bool envoy_api_v2_route_HedgePolicy_hedge_on_per_try_timeout(const envoy_api_v2_route_HedgePolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_api_v2_route_HedgePolicy_set_initial_requests(envoy_api_v2_route_HedgePolicy *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_HedgePolicy_mutable_initial_requests(envoy_api_v2_route_HedgePolicy *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_HedgePolicy_initial_requests(msg); @@ -2177,7 +2256,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_HedgePolicy_mu return sub; } UPB_INLINE void envoy_api_v2_route_HedgePolicy_set_additional_request_chance(envoy_api_v2_route_HedgePolicy *msg, struct envoy_type_FractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_FractionalPercent*) = value; } UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_HedgePolicy_mutable_additional_request_chance(envoy_api_v2_route_HedgePolicy *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_route_HedgePolicy_additional_request_chance(msg); @@ -2189,7 +2268,7 @@ UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_HedgePolicy_m return sub; } UPB_INLINE void envoy_api_v2_route_HedgePolicy_set_hedge_on_per_try_timeout(envoy_api_v2_route_HedgePolicy *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.api.v2.route.RedirectAction */ @@ -2211,36 +2290,36 @@ typedef enum { envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_scheme_redirect = 7, envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_NOT_SET = 0 } envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_oneofcases envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_case(const envoy_api_v2_route_RedirectAction* msg) { return (envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(44, 72)); } +UPB_INLINE envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_oneofcases envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_case(const envoy_api_v2_route_RedirectAction* msg) { return (envoy_api_v2_route_RedirectAction_scheme_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(44, 72), int32_t); } typedef enum { envoy_api_v2_route_RedirectAction_path_rewrite_specifier_path_redirect = 2, envoy_api_v2_route_RedirectAction_path_rewrite_specifier_prefix_rewrite = 5, envoy_api_v2_route_RedirectAction_path_rewrite_specifier_NOT_SET = 0 } envoy_api_v2_route_RedirectAction_path_rewrite_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_RedirectAction_path_rewrite_specifier_oneofcases envoy_api_v2_route_RedirectAction_path_rewrite_specifier_case(const envoy_api_v2_route_RedirectAction* msg) { return (envoy_api_v2_route_RedirectAction_path_rewrite_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(32, 48)); } +UPB_INLINE envoy_api_v2_route_RedirectAction_path_rewrite_specifier_oneofcases envoy_api_v2_route_RedirectAction_path_rewrite_specifier_case(const envoy_api_v2_route_RedirectAction* msg) { return (envoy_api_v2_route_RedirectAction_path_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 48), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_host_redirect(const envoy_api_v2_route_RedirectAction *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 16)); } +UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_host_redirect(const envoy_api_v2_route_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview); } UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_path_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 48), 2); } UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_path_redirect(const envoy_api_v2_route_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), UPB_SIZE(32, 48), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE int32_t envoy_api_v2_route_RedirectAction_response_code(const envoy_api_v2_route_RedirectAction *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t envoy_api_v2_route_RedirectAction_response_code(const envoy_api_v2_route_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_https_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(44, 72), 4); } UPB_INLINE bool envoy_api_v2_route_RedirectAction_https_redirect(const envoy_api_v2_route_RedirectAction *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(36, 56), UPB_SIZE(44, 72), 4, false); } UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_prefix_rewrite(const envoy_api_v2_route_RedirectAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 48), 5); } UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_prefix_rewrite(const envoy_api_v2_route_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), UPB_SIZE(32, 48), 5, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_RedirectAction_strip_query(const envoy_api_v2_route_RedirectAction *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(12, 12)); } +UPB_INLINE bool envoy_api_v2_route_RedirectAction_strip_query(const envoy_api_v2_route_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); } UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_scheme_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(44, 72), 7); } UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_scheme_redirect(const envoy_api_v2_route_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(36, 56), UPB_SIZE(44, 72), 7, upb_strview_make("", strlen(""))); } -UPB_INLINE uint32_t envoy_api_v2_route_RedirectAction_port_redirect(const envoy_api_v2_route_RedirectAction *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint32_t envoy_api_v2_route_RedirectAction_port_redirect(const envoy_api_v2_route_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } UPB_INLINE void envoy_api_v2_route_RedirectAction_set_host_redirect(envoy_api_v2_route_RedirectAction *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RedirectAction_set_path_redirect(envoy_api_v2_route_RedirectAction *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), value, UPB_SIZE(32, 48), 2); } UPB_INLINE void envoy_api_v2_route_RedirectAction_set_response_code(envoy_api_v2_route_RedirectAction *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_api_v2_route_RedirectAction_set_https_redirect(envoy_api_v2_route_RedirectAction *msg, bool value) { UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(36, 56), value, UPB_SIZE(44, 72), 4); @@ -2249,13 +2328,13 @@ UPB_INLINE void envoy_api_v2_route_RedirectAction_set_prefix_rewrite(envoy_api_v UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), value, UPB_SIZE(32, 48), 5); } UPB_INLINE void envoy_api_v2_route_RedirectAction_set_strip_query(envoy_api_v2_route_RedirectAction *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(12, 12)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value; } UPB_INLINE void envoy_api_v2_route_RedirectAction_set_scheme_redirect(envoy_api_v2_route_RedirectAction *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(36, 56), value, UPB_SIZE(44, 72), 7); } UPB_INLINE void envoy_api_v2_route_RedirectAction_set_port_redirect(envoy_api_v2_route_RedirectAction *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value; } /* envoy.api.v2.route.DirectResponseAction */ @@ -2272,14 +2351,15 @@ UPB_INLINE char *envoy_api_v2_route_DirectResponseAction_serialize(const envoy_a return upb_encode(msg, &envoy_api_v2_route_DirectResponseAction_msginit, arena, len); } -UPB_INLINE uint32_t envoy_api_v2_route_DirectResponseAction_status(const envoy_api_v2_route_DirectResponseAction *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_route_DirectResponseAction_body(const envoy_api_v2_route_DirectResponseAction *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_DataSource*, UPB_SIZE(4, 8)); } +UPB_INLINE uint32_t envoy_api_v2_route_DirectResponseAction_status(const envoy_api_v2_route_DirectResponseAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE bool envoy_api_v2_route_DirectResponseAction_has_body(const envoy_api_v2_route_DirectResponseAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_api_v2_core_DataSource* envoy_api_v2_route_DirectResponseAction_body(const envoy_api_v2_route_DirectResponseAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_api_v2_core_DataSource*); } UPB_INLINE void envoy_api_v2_route_DirectResponseAction_set_status(envoy_api_v2_route_DirectResponseAction *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void envoy_api_v2_route_DirectResponseAction_set_body(envoy_api_v2_route_DirectResponseAction *msg, struct envoy_api_v2_core_DataSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_DataSource*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_api_v2_core_DataSource*) = value; } UPB_INLINE struct envoy_api_v2_core_DataSource* envoy_api_v2_route_DirectResponseAction_mutable_body(envoy_api_v2_route_DirectResponseAction *msg, upb_arena *arena) { struct envoy_api_v2_core_DataSource* sub = (struct envoy_api_v2_core_DataSource*)envoy_api_v2_route_DirectResponseAction_body(msg); @@ -2305,14 +2385,15 @@ UPB_INLINE char *envoy_api_v2_route_Decorator_serialize(const envoy_api_v2_route return upb_encode(msg, &envoy_api_v2_route_Decorator_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_Decorator_operation(const envoy_api_v2_route_Decorator *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_Decorator_propagate(const envoy_api_v2_route_Decorator *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_route_Decorator_operation(const envoy_api_v2_route_Decorator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_Decorator_has_propagate(const envoy_api_v2_route_Decorator *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_Decorator_propagate(const envoy_api_v2_route_Decorator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); } UPB_INLINE void envoy_api_v2_route_Decorator_set_operation(envoy_api_v2_route_Decorator *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_Decorator_set_propagate(envoy_api_v2_route_Decorator *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_Decorator_mutable_propagate(envoy_api_v2_route_Decorator *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_Decorator_propagate(msg); @@ -2338,13 +2419,17 @@ UPB_INLINE char *envoy_api_v2_route_Tracing_serialize(const envoy_api_v2_route_T return upb_encode(msg, &envoy_api_v2_route_Tracing_msginit, arena, len); } -UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_client_sampling(const envoy_api_v2_route_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_random_sampling(const envoy_api_v2_route_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(4, 8)); } -UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_overall_sampling(const envoy_api_v2_route_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_api_v2_route_Tracing_has_client_sampling(const envoy_api_v2_route_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_client_sampling(const envoy_api_v2_route_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_FractionalPercent*); } +UPB_INLINE bool envoy_api_v2_route_Tracing_has_random_sampling(const envoy_api_v2_route_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_random_sampling(const envoy_api_v2_route_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_FractionalPercent*); } +UPB_INLINE bool envoy_api_v2_route_Tracing_has_overall_sampling(const envoy_api_v2_route_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_overall_sampling(const envoy_api_v2_route_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_FractionalPercent*); } +UPB_INLINE bool envoy_api_v2_route_Tracing_has_custom_tags(const envoy_api_v2_route_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const struct envoy_type_tracing_v2_CustomTag* const* envoy_api_v2_route_Tracing_custom_tags(const envoy_api_v2_route_Tracing *msg, size_t *len) { return (const struct envoy_type_tracing_v2_CustomTag* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE void envoy_api_v2_route_Tracing_set_client_sampling(envoy_api_v2_route_Tracing *msg, struct envoy_type_FractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_FractionalPercent*) = value; } UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutable_client_sampling(envoy_api_v2_route_Tracing *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_route_Tracing_client_sampling(msg); @@ -2356,7 +2441,7 @@ UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutab return sub; } UPB_INLINE void envoy_api_v2_route_Tracing_set_random_sampling(envoy_api_v2_route_Tracing *msg, struct envoy_type_FractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_FractionalPercent*) = value; } UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutable_random_sampling(envoy_api_v2_route_Tracing *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_route_Tracing_random_sampling(msg); @@ -2368,7 +2453,7 @@ UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutab return sub; } UPB_INLINE void envoy_api_v2_route_Tracing_set_overall_sampling(envoy_api_v2_route_Tracing *msg, struct envoy_type_FractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_FractionalPercent*) = value; } UPB_INLINE struct envoy_type_FractionalPercent* envoy_api_v2_route_Tracing_mutable_overall_sampling(envoy_api_v2_route_Tracing *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_api_v2_route_Tracing_overall_sampling(msg); @@ -2407,19 +2492,20 @@ UPB_INLINE char *envoy_api_v2_route_VirtualCluster_serialize(const envoy_api_v2_ return upb_encode(msg, &envoy_api_v2_route_VirtualCluster_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_VirtualCluster_pattern(const envoy_api_v2_route_VirtualCluster *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE upb_strview envoy_api_v2_route_VirtualCluster_name(const envoy_api_v2_route_VirtualCluster *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); } -UPB_INLINE int32_t envoy_api_v2_route_VirtualCluster_method(const envoy_api_v2_route_VirtualCluster *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_route_VirtualCluster_pattern(const envoy_api_v2_route_VirtualCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_route_VirtualCluster_name(const envoy_api_v2_route_VirtualCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); } +UPB_INLINE int32_t envoy_api_v2_route_VirtualCluster_method(const envoy_api_v2_route_VirtualCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_api_v2_route_VirtualCluster_has_headers(const envoy_api_v2_route_VirtualCluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } UPB_INLINE const envoy_api_v2_route_HeaderMatcher* const* envoy_api_v2_route_VirtualCluster_headers(const envoy_api_v2_route_VirtualCluster *msg, size_t *len) { return (const envoy_api_v2_route_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(24, 40), len); } UPB_INLINE void envoy_api_v2_route_VirtualCluster_set_pattern(envoy_api_v2_route_VirtualCluster *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_VirtualCluster_set_name(envoy_api_v2_route_VirtualCluster *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_VirtualCluster_set_method(envoy_api_v2_route_VirtualCluster *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE envoy_api_v2_route_HeaderMatcher** envoy_api_v2_route_VirtualCluster_mutable_headers(envoy_api_v2_route_VirtualCluster *msg, size_t *len) { return (envoy_api_v2_route_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len); @@ -2449,12 +2535,14 @@ UPB_INLINE char *envoy_api_v2_route_RateLimit_serialize(const envoy_api_v2_route return upb_encode(msg, &envoy_api_v2_route_RateLimit_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_RateLimit_stage(const envoy_api_v2_route_RateLimit *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_disable_key(const envoy_api_v2_route_RateLimit *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_has_stage(const envoy_api_v2_route_RateLimit *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_RateLimit_stage(const envoy_api_v2_route_RateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); } +UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_disable_key(const envoy_api_v2_route_RateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_has_actions(const envoy_api_v2_route_RateLimit *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const envoy_api_v2_route_RateLimit_Action* const* envoy_api_v2_route_RateLimit_actions(const envoy_api_v2_route_RateLimit *msg, size_t *len) { return (const envoy_api_v2_route_RateLimit_Action* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE void envoy_api_v2_route_RateLimit_set_stage(envoy_api_v2_route_RateLimit *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_RateLimit_mutable_stage(envoy_api_v2_route_RateLimit *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_api_v2_route_RateLimit_stage(msg); @@ -2466,7 +2554,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_api_v2_route_RateLimit_muta return sub; } UPB_INLINE void envoy_api_v2_route_RateLimit_set_disable_key(envoy_api_v2_route_RateLimit *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE envoy_api_v2_route_RateLimit_Action** envoy_api_v2_route_RateLimit_mutable_actions(envoy_api_v2_route_RateLimit *msg, size_t *len) { return (envoy_api_v2_route_RateLimit_Action**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); @@ -2505,7 +2593,7 @@ typedef enum { envoy_api_v2_route_RateLimit_Action_action_specifier_header_value_match = 6, envoy_api_v2_route_RateLimit_Action_action_specifier_NOT_SET = 0 } envoy_api_v2_route_RateLimit_Action_action_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_RateLimit_Action_action_specifier_oneofcases envoy_api_v2_route_RateLimit_Action_action_specifier_case(const envoy_api_v2_route_RateLimit_Action* msg) { return (envoy_api_v2_route_RateLimit_Action_action_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_api_v2_route_RateLimit_Action_action_specifier_oneofcases envoy_api_v2_route_RateLimit_Action_action_specifier_case(const envoy_api_v2_route_RateLimit_Action* msg) { return (envoy_api_v2_route_RateLimit_Action_action_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_source_cluster(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_api_v2_route_RateLimit_Action_SourceCluster* envoy_api_v2_route_RateLimit_Action_source_cluster(const envoy_api_v2_route_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RateLimit_Action_SourceCluster*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -2639,14 +2727,14 @@ UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_RequestHeaders_serialize(co return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_Action_RequestHeaders_header_name(const envoy_api_v2_route_RateLimit_Action_RequestHeaders *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_Action_RequestHeaders_descriptor_key(const envoy_api_v2_route_RateLimit_Action_RequestHeaders *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_Action_RequestHeaders_header_name(const envoy_api_v2_route_RateLimit_Action_RequestHeaders *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_Action_RequestHeaders_descriptor_key(const envoy_api_v2_route_RateLimit_Action_RequestHeaders *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void envoy_api_v2_route_RateLimit_Action_RequestHeaders_set_header_name(envoy_api_v2_route_RateLimit_Action_RequestHeaders *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RateLimit_Action_RequestHeaders_set_descriptor_key(envoy_api_v2_route_RateLimit_Action_RequestHeaders *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* envoy.api.v2.route.RateLimit.Action.RemoteAddress */ @@ -2679,10 +2767,10 @@ UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_GenericKey_serialize(const return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_Action_GenericKey_descriptor_value(const envoy_api_v2_route_RateLimit_Action_GenericKey *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_Action_GenericKey_descriptor_value(const envoy_api_v2_route_RateLimit_Action_GenericKey *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_api_v2_route_RateLimit_Action_GenericKey_set_descriptor_value(envoy_api_v2_route_RateLimit_Action_GenericKey *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.api.v2.route.RateLimit.Action.HeaderValueMatch */ @@ -2699,15 +2787,17 @@ UPB_INLINE char *envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_serialize( return upb_encode(msg, &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_descriptor_value(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_expect_match(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_descriptor_value(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_has_expect_match(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_expect_match(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_has_headers(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const envoy_api_v2_route_HeaderMatcher* const* envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_headers(const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, size_t *len) { return (const envoy_api_v2_route_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE void envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_set_descriptor_value(envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_set_expect_match(envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_mutable_expect_match(envoy_api_v2_route_RateLimit_Action_HeaderValueMatch *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_expect_match(msg); @@ -2756,9 +2846,9 @@ typedef enum { envoy_api_v2_route_HeaderMatcher_header_match_specifier_suffix_match = 10, envoy_api_v2_route_HeaderMatcher_header_match_specifier_NOT_SET = 0 } envoy_api_v2_route_HeaderMatcher_header_match_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_HeaderMatcher_header_match_specifier_oneofcases envoy_api_v2_route_HeaderMatcher_header_match_specifier_case(const envoy_api_v2_route_HeaderMatcher* msg) { return (envoy_api_v2_route_HeaderMatcher_header_match_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } +UPB_INLINE envoy_api_v2_route_HeaderMatcher_header_match_specifier_oneofcases envoy_api_v2_route_HeaderMatcher_header_match_specifier_case(const envoy_api_v2_route_HeaderMatcher* msg) { return (envoy_api_v2_route_HeaderMatcher_header_match_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_name(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_name(const envoy_api_v2_route_HeaderMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_exact_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_exact_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 4, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_regex_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 5); } @@ -2767,7 +2857,7 @@ UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_range_match(const envoy_api UPB_INLINE const struct envoy_type_Int64Range* envoy_api_v2_route_HeaderMatcher_range_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_Int64Range*, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 6, NULL); } UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_present_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 7); } UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_present_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 7, false); } -UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_invert_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_invert_match(const envoy_api_v2_route_HeaderMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_prefix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 9); } UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_prefix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 9, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_suffix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 10); } @@ -2776,7 +2866,7 @@ UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_safe_regex_match(const envo UPB_INLINE const struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_HeaderMatcher_safe_regex_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 11, NULL); } UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_name(envoy_api_v2_route_HeaderMatcher *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_exact_match(envoy_api_v2_route_HeaderMatcher *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 4); @@ -2800,7 +2890,7 @@ UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_present_match(envoy_api_v2_ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 7); } UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_invert_match(envoy_api_v2_route_HeaderMatcher *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_prefix_match(envoy_api_v2_route_HeaderMatcher *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 9); @@ -2840,24 +2930,25 @@ typedef enum { envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_present_match = 6, envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_NOT_SET = 0 } envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_oneofcases; -UPB_INLINE envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_oneofcases envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_case(const envoy_api_v2_route_QueryParameterMatcher* msg) { return (envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 48)); } +UPB_INLINE envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_oneofcases envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_case(const envoy_api_v2_route_QueryParameterMatcher* msg) { return (envoy_api_v2_route_QueryParameterMatcher_query_parameter_match_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(24, 48), int32_t); } -UPB_INLINE upb_strview envoy_api_v2_route_QueryParameterMatcher_name(const envoy_api_v2_route_QueryParameterMatcher *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_route_QueryParameterMatcher_value(const envoy_api_v2_route_QueryParameterMatcher *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_QueryParameterMatcher_regex(const envoy_api_v2_route_QueryParameterMatcher *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(16, 32)); } +UPB_INLINE upb_strview envoy_api_v2_route_QueryParameterMatcher_name(const envoy_api_v2_route_QueryParameterMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_route_QueryParameterMatcher_value(const envoy_api_v2_route_QueryParameterMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_has_regex(const envoy_api_v2_route_QueryParameterMatcher *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_QueryParameterMatcher_regex(const envoy_api_v2_route_QueryParameterMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_BoolValue*); } UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_has_string_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(24, 48), 5); } UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_api_v2_route_QueryParameterMatcher_string_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(20, 40), UPB_SIZE(24, 48), 5, NULL); } UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_has_present_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(24, 48), 6); } UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_present_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(20, 40), UPB_SIZE(24, 48), 6, false); } UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_name(envoy_api_v2_route_QueryParameterMatcher *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_value(envoy_api_v2_route_QueryParameterMatcher *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_regex(envoy_api_v2_route_QueryParameterMatcher *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_api_v2_route_QueryParameterMatcher_mutable_regex(envoy_api_v2_route_QueryParameterMatcher *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_api_v2_route_QueryParameterMatcher_regex(msg); diff --git a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c index 05261163799..34999b89b43 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c @@ -46,7 +46,7 @@ const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_msginit = { }; static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration_Key_Fragment__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, }; const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h index c85474e8863..c1bb1e0fdd2 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h @@ -44,18 +44,19 @@ UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_serialize(const envoy_api return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_msginit, arena, len); } -UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_name(const envoy_api_v2_ScopedRouteConfiguration *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_route_configuration_name(const envoy_api_v2_ScopedRouteConfiguration *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE const envoy_api_v2_ScopedRouteConfiguration_Key* envoy_api_v2_ScopedRouteConfiguration_key(const envoy_api_v2_ScopedRouteConfiguration *msg) { return UPB_FIELD_AT(msg, const envoy_api_v2_ScopedRouteConfiguration_Key*, UPB_SIZE(16, 32)); } +UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_name(const envoy_api_v2_ScopedRouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_route_configuration_name(const envoy_api_v2_ScopedRouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE bool envoy_api_v2_ScopedRouteConfiguration_has_key(const envoy_api_v2_ScopedRouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const envoy_api_v2_ScopedRouteConfiguration_Key* envoy_api_v2_ScopedRouteConfiguration_key(const envoy_api_v2_ScopedRouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_api_v2_ScopedRouteConfiguration_Key*); } UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_set_name(envoy_api_v2_ScopedRouteConfiguration *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_set_route_configuration_name(envoy_api_v2_ScopedRouteConfiguration *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_set_key(envoy_api_v2_ScopedRouteConfiguration *msg, envoy_api_v2_ScopedRouteConfiguration_Key* value) { - UPB_FIELD_AT(msg, envoy_api_v2_ScopedRouteConfiguration_Key*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_api_v2_ScopedRouteConfiguration_Key*) = value; } UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration_Key* envoy_api_v2_ScopedRouteConfiguration_mutable_key(envoy_api_v2_ScopedRouteConfiguration *msg, upb_arena *arena) { struct envoy_api_v2_ScopedRouteConfiguration_Key* sub = (struct envoy_api_v2_ScopedRouteConfiguration_Key*)envoy_api_v2_ScopedRouteConfiguration_key(msg); @@ -81,6 +82,7 @@ UPB_INLINE char *envoy_api_v2_ScopedRouteConfiguration_Key_serialize(const envoy return upb_encode(msg, &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, arena, len); } +UPB_INLINE bool envoy_api_v2_ScopedRouteConfiguration_Key_has_fragments(const envoy_api_v2_ScopedRouteConfiguration_Key *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* const* envoy_api_v2_ScopedRouteConfiguration_Key_fragments(const envoy_api_v2_ScopedRouteConfiguration_Key *msg, size_t *len) { return (const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment** envoy_api_v2_ScopedRouteConfiguration_Key_mutable_fragments(envoy_api_v2_ScopedRouteConfiguration_Key *msg, size_t *len) { @@ -115,7 +117,7 @@ typedef enum { envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_string_key = 1, envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_NOT_SET = 0 } envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases; -UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_case(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* msg) { return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } +UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_case(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* msg) { return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } UPB_INLINE bool envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_has_string_key(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_string_key(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } diff --git a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c index 42aef4f9271..8112cd269c6 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c @@ -29,8 +29,8 @@ static const upb_msglayout *const envoy_config_filter_accesslog_v2_AccessLog_sub static const upb_msglayout_field envoy_config_filter_accesslog_v2_AccessLog__fields[4] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, - {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 2, 11, 1}, - {4, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1}, + {3, UPB_SIZE(12, 24), UPB_SIZE(-16, -32), 2, 11, 1}, + {4, UPB_SIZE(12, 24), UPB_SIZE(-16, -32), 1, 11, 1}, }; const upb_msglayout envoy_config_filter_accesslog_v2_AccessLog_msginit = { @@ -54,17 +54,17 @@ static const upb_msglayout *const envoy_config_filter_accesslog_v2_AccessLogFilt }; static const upb_msglayout_field envoy_config_filter_accesslog_v2_AccessLogFilter__fields[11] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 9, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 10, 11, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 8, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, - {7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1}, - {8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, - {9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 7, 11, 1}, - {10, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, - {11, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 9, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 5, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 10, 11, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 8, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {7, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 6, 11, 1}, + {8, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 4, 11, 1}, + {9, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 7, 11, 1}, + {10, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 3, 11, 1}, + {11, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, }; const upb_msglayout envoy_config_filter_accesslog_v2_AccessLogFilter_msginit = { @@ -197,7 +197,7 @@ const upb_msglayout envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit }; static const upb_msglayout_field envoy_config_filter_accesslog_v2_GrpcStatusFilter__fields[2] = { - {1, UPB_SIZE(4, 8), 0, 0, 14, 3}, + {1, UPB_SIZE(4, 8), 0, 0, 14, _UPB_LABEL_PACKED}, {2, UPB_SIZE(0, 0), 0, 0, 8, 1}, }; @@ -214,8 +214,8 @@ static const upb_msglayout *const envoy_config_filter_accesslog_v2_ExtensionFilt static const upb_msglayout_field envoy_config_filter_accesslog_v2_ExtensionFilter__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_config_filter_accesslog_v2_ExtensionFilter_msginit = { diff --git a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h index 88ffbc51cb1..908971438ef 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h @@ -118,20 +118,21 @@ typedef enum { envoy_config_filter_accesslog_v2_AccessLog_config_type_typed_config = 4, envoy_config_filter_accesslog_v2_AccessLog_config_type_NOT_SET = 0 } envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases; -UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases envoy_config_filter_accesslog_v2_AccessLog_config_type_case(const envoy_config_filter_accesslog_v2_AccessLog* msg) { return (envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 32)); } +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases envoy_config_filter_accesslog_v2_AccessLog_config_type_case(const envoy_config_filter_accesslog_v2_AccessLog* msg) { return (envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); } -UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_AccessLog_name(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_filter(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_AccessLogFilter*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_AccessLog_name(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_filter(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_filter(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_filter_accesslog_v2_AccessLogFilter*); } UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 3); } UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_AccessLog_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); } UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 4); } UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_accesslog_v2_AccessLog_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 4, NULL); } UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_name(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_filter(envoy_config_filter_accesslog_v2_AccessLog *msg, envoy_config_filter_accesslog_v2_AccessLogFilter* value) { - UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_AccessLogFilter*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_filter_accesslog_v2_AccessLogFilter*) = value; } UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_mutable_filter(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_AccessLogFilter* sub = (struct envoy_config_filter_accesslog_v2_AccessLogFilter*)envoy_config_filter_accesslog_v2_AccessLog_filter(msg); @@ -195,7 +196,7 @@ typedef enum { envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_extension_filter = 11, envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_NOT_SET = 0 } envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases; -UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_case(const envoy_config_filter_accesslog_v2_AccessLogFilter* msg) { return (envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_case(const envoy_config_filter_accesslog_v2_AccessLogFilter* msg) { return (envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_config_filter_accesslog_v2_StatusCodeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_StatusCodeFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -367,14 +368,15 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_ComparisonFilter_serialize(con return upb_encode(msg, &envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, arena, len); } -UPB_INLINE int32_t envoy_config_filter_accesslog_v2_ComparisonFilter_op(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog_v2_ComparisonFilter_value(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_RuntimeUInt32*, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t envoy_config_filter_accesslog_v2_ComparisonFilter_op(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_ComparisonFilter_has_value(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } +UPB_INLINE const struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog_v2_ComparisonFilter_value(const envoy_config_filter_accesslog_v2_ComparisonFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_api_v2_core_RuntimeUInt32*); } UPB_INLINE void envoy_config_filter_accesslog_v2_ComparisonFilter_set_op(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_config_filter_accesslog_v2_ComparisonFilter_set_value(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, struct envoy_api_v2_core_RuntimeUInt32* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_RuntimeUInt32*, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct envoy_api_v2_core_RuntimeUInt32*) = value; } UPB_INLINE struct envoy_api_v2_core_RuntimeUInt32* envoy_config_filter_accesslog_v2_ComparisonFilter_mutable_value(envoy_config_filter_accesslog_v2_ComparisonFilter *msg, upb_arena *arena) { struct envoy_api_v2_core_RuntimeUInt32* sub = (struct envoy_api_v2_core_RuntimeUInt32*)envoy_config_filter_accesslog_v2_ComparisonFilter_value(msg); @@ -400,10 +402,11 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_StatusCodeFilter_serialize(con return upb_encode(msg, &envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, arena, len); } -UPB_INLINE const envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_StatusCodeFilter_comparison(const envoy_config_filter_accesslog_v2_StatusCodeFilter *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_StatusCodeFilter_has_comparison(const envoy_config_filter_accesslog_v2_StatusCodeFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_StatusCodeFilter_comparison(const envoy_config_filter_accesslog_v2_StatusCodeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_filter_accesslog_v2_ComparisonFilter*); } UPB_INLINE void envoy_config_filter_accesslog_v2_StatusCodeFilter_set_comparison(envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, envoy_config_filter_accesslog_v2_ComparisonFilter* value) { - UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_filter_accesslog_v2_ComparisonFilter*) = value; } UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_StatusCodeFilter_mutable_comparison(envoy_config_filter_accesslog_v2_StatusCodeFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_ComparisonFilter* sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)envoy_config_filter_accesslog_v2_StatusCodeFilter_comparison(msg); @@ -429,10 +432,11 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_DurationFilter_serialize(const return upb_encode(msg, &envoy_config_filter_accesslog_v2_DurationFilter_msginit, arena, len); } -UPB_INLINE const envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_DurationFilter_comparison(const envoy_config_filter_accesslog_v2_DurationFilter *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_DurationFilter_has_comparison(const envoy_config_filter_accesslog_v2_DurationFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_DurationFilter_comparison(const envoy_config_filter_accesslog_v2_DurationFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_filter_accesslog_v2_ComparisonFilter*); } UPB_INLINE void envoy_config_filter_accesslog_v2_DurationFilter_set_comparison(envoy_config_filter_accesslog_v2_DurationFilter *msg, envoy_config_filter_accesslog_v2_ComparisonFilter* value) { - UPB_FIELD_AT(msg, envoy_config_filter_accesslog_v2_ComparisonFilter*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_filter_accesslog_v2_ComparisonFilter*) = value; } UPB_INLINE struct envoy_config_filter_accesslog_v2_ComparisonFilter* envoy_config_filter_accesslog_v2_DurationFilter_mutable_comparison(envoy_config_filter_accesslog_v2_DurationFilter *msg, upb_arena *arena) { struct envoy_config_filter_accesslog_v2_ComparisonFilter* sub = (struct envoy_config_filter_accesslog_v2_ComparisonFilter*)envoy_config_filter_accesslog_v2_DurationFilter_comparison(msg); @@ -490,15 +494,16 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_RuntimeFilter_serialize(const return upb_encode(msg, &envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, arena, len); } -UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_RuntimeFilter_runtime_key(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } -UPB_INLINE const struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2_RuntimeFilter_percent_sampled(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_FractionalPercent*, UPB_SIZE(12, 24)); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_RuntimeFilter_use_independent_randomness(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_RuntimeFilter_runtime_key(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_RuntimeFilter_has_percent_sampled(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2_RuntimeFilter_percent_sampled(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_FractionalPercent*); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_RuntimeFilter_use_independent_randomness(const envoy_config_filter_accesslog_v2_RuntimeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_runtime_key(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_percent_sampled(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, struct envoy_type_FractionalPercent* value) { - UPB_FIELD_AT(msg, struct envoy_type_FractionalPercent*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_FractionalPercent*) = value; } UPB_INLINE struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2_RuntimeFilter_mutable_percent_sampled(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, upb_arena *arena) { struct envoy_type_FractionalPercent* sub = (struct envoy_type_FractionalPercent*)envoy_config_filter_accesslog_v2_RuntimeFilter_percent_sampled(msg); @@ -510,7 +515,7 @@ UPB_INLINE struct envoy_type_FractionalPercent* envoy_config_filter_accesslog_v2 return sub; } UPB_INLINE void envoy_config_filter_accesslog_v2_RuntimeFilter_set_use_independent_randomness(envoy_config_filter_accesslog_v2_RuntimeFilter *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.config.filter.accesslog.v2.AndFilter */ @@ -527,6 +532,7 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_AndFilter_serialize(const envo return upb_encode(msg, &envoy_config_filter_accesslog_v2_AndFilter_msginit, arena, len); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AndFilter_has_filters(const envoy_config_filter_accesslog_v2_AndFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* const* envoy_config_filter_accesslog_v2_AndFilter_filters(const envoy_config_filter_accesslog_v2_AndFilter *msg, size_t *len) { return (const envoy_config_filter_accesslog_v2_AccessLogFilter* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_AndFilter_mutable_filters(envoy_config_filter_accesslog_v2_AndFilter *msg, size_t *len) { @@ -557,6 +563,7 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_OrFilter_serialize(const envoy return upb_encode(msg, &envoy_config_filter_accesslog_v2_OrFilter_msginit, arena, len); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_OrFilter_has_filters(const envoy_config_filter_accesslog_v2_OrFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* const* envoy_config_filter_accesslog_v2_OrFilter_filters(const envoy_config_filter_accesslog_v2_OrFilter *msg, size_t *len) { return (const envoy_config_filter_accesslog_v2_AccessLogFilter* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter** envoy_config_filter_accesslog_v2_OrFilter_mutable_filters(envoy_config_filter_accesslog_v2_OrFilter *msg, size_t *len) { @@ -587,10 +594,11 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_HeaderFilter_serialize(const e return upb_encode(msg, &envoy_config_filter_accesslog_v2_HeaderFilter_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslog_v2_HeaderFilter_header(const envoy_config_filter_accesslog_v2_HeaderFilter *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_HeaderFilter_has_header(const envoy_config_filter_accesslog_v2_HeaderFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslog_v2_HeaderFilter_header(const envoy_config_filter_accesslog_v2_HeaderFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_route_HeaderMatcher*); } UPB_INLINE void envoy_config_filter_accesslog_v2_HeaderFilter_set_header(envoy_config_filter_accesslog_v2_HeaderFilter *msg, struct envoy_api_v2_route_HeaderMatcher* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_route_HeaderMatcher*) = value; } UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_filter_accesslog_v2_HeaderFilter_mutable_header(envoy_config_filter_accesslog_v2_HeaderFilter *msg, upb_arena *arena) { struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)envoy_config_filter_accesslog_v2_HeaderFilter_header(msg); @@ -644,7 +652,7 @@ UPB_INLINE char *envoy_config_filter_accesslog_v2_GrpcStatusFilter_serialize(con } UPB_INLINE int32_t const* envoy_config_filter_accesslog_v2_GrpcStatusFilter_statuses(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_GrpcStatusFilter_exclude(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_GrpcStatusFilter_exclude(const envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE int32_t* envoy_config_filter_accesslog_v2_GrpcStatusFilter_mutable_statuses(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -657,7 +665,7 @@ UPB_INLINE bool envoy_config_filter_accesslog_v2_GrpcStatusFilter_add_statuses(e arena); } UPB_INLINE void envoy_config_filter_accesslog_v2_GrpcStatusFilter_set_exclude(envoy_config_filter_accesslog_v2_GrpcStatusFilter *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.config.filter.accesslog.v2.ExtensionFilter */ @@ -679,16 +687,16 @@ typedef enum { envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_typed_config = 3, envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_NOT_SET = 0 } envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases; -UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_case(const envoy_config_filter_accesslog_v2_ExtensionFilter* msg) { return (envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_case(const envoy_config_filter_accesslog_v2_ExtensionFilter* msg) { return (envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_ExtensionFilter_name(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_ExtensionFilter_name(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_ExtensionFilter_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_accesslog_v2_ExtensionFilter_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_name(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_config(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); diff --git a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c index c7f2bb10d5b..7b2e8a1e969 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c @@ -50,8 +50,8 @@ static const upb_msglayout *const envoy_config_filter_network_http_connection_ma static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager__fields[35] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, {2, UPB_SIZE(36, 40), 0, 0, 9, 1}, - {3, UPB_SIZE(140, 248), UPB_SIZE(-145, -257), 10, 11, 1}, - {4, UPB_SIZE(140, 248), UPB_SIZE(-145, -257), 0, 11, 1}, + {3, UPB_SIZE(140, 248), UPB_SIZE(-144, -256), 10, 11, 1}, + {4, UPB_SIZE(140, 248), UPB_SIZE(-144, -256), 0, 11, 1}, {5, UPB_SIZE(128, 224), 0, 9, 11, 3}, {6, UPB_SIZE(60, 88), 0, 13, 11, 1}, {7, UPB_SIZE(64, 96), 0, 7, 11, 1}, @@ -77,7 +77,7 @@ static const upb_msglayout_field envoy_config_filter_network_http_connection_man {28, UPB_SIZE(108, 184), 0, 14, 11, 1}, {29, UPB_SIZE(112, 192), 0, 15, 11, 1}, {30, UPB_SIZE(116, 200), 0, 13, 11, 1}, - {31, UPB_SIZE(140, 248), UPB_SIZE(-145, -257), 12, 11, 1}, + {31, UPB_SIZE(140, 248), UPB_SIZE(-144, -256), 12, 11, 1}, {32, UPB_SIZE(31, 31), 0, 0, 8, 1}, {33, UPB_SIZE(32, 32), 0, 0, 8, 1}, {34, UPB_SIZE(16, 16), 0, 0, 14, 1}, @@ -201,8 +201,8 @@ static const upb_msglayout_field envoy_config_filter_network_http_connection_man {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(8, 16), 0, 3, 11, 1}, {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, - {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, - {5, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, + {4, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 2, 11, 1}, + {5, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 1, 11, 1}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit = { @@ -230,7 +230,7 @@ static const upb_msglayout *const envoy_config_filter_network_http_connection_ma }; static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit = { @@ -246,8 +246,8 @@ static const upb_msglayout *const envoy_config_filter_network_http_connection_ma static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor__fields[4] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 13, 1}, - {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 11, 1}, + {3, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 0, 13, 1}, + {4, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 0, 11, 1}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit = { @@ -288,8 +288,8 @@ static const upb_msglayout *const envoy_config_filter_network_http_connection_ma static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpFilter__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit = { diff --git a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h index 4e004f7e18b..725e874486e 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h @@ -142,52 +142,72 @@ typedef enum { envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_scoped_routes = 31, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_NOT_SET = 0 } envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_oneofcases; -UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_oneofcases envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_case(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager* msg) { return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(144, 256)); } +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_oneofcases envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_case(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager* msg) { return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(144, 256), int32_t); } -UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_codec_type(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stat_prefix(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 40)); } +UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_codec_type(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stat_prefix(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_rds(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(144, 256), 3); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_Rds* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_rds(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_Rds*, UPB_SIZE(140, 248), UPB_SIZE(144, 256), 3, NULL); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_route_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(144, 256), 4); } UPB_INLINE const struct envoy_api_v2_RouteConfiguration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_RouteConfiguration*, UPB_SIZE(140, 248), UPB_SIZE(144, 256), 4, NULL); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_http_filters(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(128, 224)); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_filters(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(128, 224), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_user_agent(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(60, 88)); } -UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_tracing(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*, UPB_SIZE(64, 96)); } -UPB_INLINE const struct envoy_api_v2_core_Http1ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Http1ProtocolOptions*, UPB_SIZE(68, 104)); } -UPB_INLINE const struct envoy_api_v2_core_Http2ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http2_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Http2ProtocolOptions*, UPB_SIZE(72, 112)); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_server_name(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 56)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_idle_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(76, 120)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_drain_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(80, 128)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_add_user_agent(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 88)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_user_agent(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_tracing(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 96)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_tracing(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 96), const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_http_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 104)); } +UPB_INLINE const struct envoy_api_v2_core_Http1ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), const struct envoy_api_v2_core_Http1ProtocolOptions*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_http2_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 112)); } +UPB_INLINE const struct envoy_api_v2_core_Http2ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http2_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 112), const struct envoy_api_v2_core_Http2ProtocolOptions*); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_server_name(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_idle_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 120)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_idle_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_drain_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 128)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_drain_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 128), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_access_log(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(132, 232)); } UPB_INLINE const struct envoy_config_filter_accesslog_v2_AccessLog* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_access_log(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { return (const struct envoy_config_filter_accesslog_v2_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(132, 232), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_use_remote_address(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(84, 136)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_generate_request_id(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(88, 144)); } -UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_forward_client_cert_details(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } -UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_current_client_cert_details(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*, UPB_SIZE(92, 152)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_proxy_100_continue(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(28, 28)); } -UPB_INLINE uint32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_xff_num_trusted_hops(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(24, 24)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_represent_ipv4_remote_address_as_ipv4_mapped_ipv6(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(29, 29)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_skip_xff_append(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(30, 30)); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_via(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 72)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_use_remote_address(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 136)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_use_remote_address(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 136), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_generate_request_id(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 144)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_generate_request_id(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(88, 144), const struct google_protobuf_BoolValue*); } +UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_forward_client_cert_details(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_set_current_client_cert_details(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 152)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_current_client_cert_details(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 152), const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_proxy_100_continue(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), bool); } +UPB_INLINE uint32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_xff_num_trusted_hops(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint32_t); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_represent_ipv4_remote_address_as_ipv4_mapped_ipv6(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(29, 29), bool); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_skip_xff_append(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(30, 30), bool); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_via(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_upgrade_configs(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(136, 240)); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_upgrade_configs(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig* const*)_upb_array_accessor(msg, UPB_SIZE(136, 240), len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stream_idle_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(96, 160)); } -UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_internal_address_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*, UPB_SIZE(100, 168)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_delayed_close_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(104, 176)); } -UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(108, 184)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_max_request_headers_kb(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(112, 192)); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_normalize_path(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(116, 200)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_stream_idle_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 160)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stream_idle_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(96, 160), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_internal_address_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 168)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_internal_address_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 168), const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_delayed_close_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(104, 176)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_delayed_close_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(104, 176), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_request_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 184)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_timeout(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(108, 184), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_max_request_headers_kb(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(112, 192)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_max_request_headers_kb(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(112, 192), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_normalize_path(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(116, 200)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_normalize_path(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(116, 200), const struct google_protobuf_BoolValue*); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_scoped_routes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(144, 256), 31); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_scoped_routes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*, UPB_SIZE(140, 248), UPB_SIZE(144, 256), 31, NULL); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_preserve_external_request_id(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(31, 31)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_merge_slashes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(32, 32)); } -UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_server_header_transformation(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } -UPB_INLINE const struct envoy_api_v2_core_HttpProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_common_http_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_HttpProtocolOptions*, UPB_SIZE(120, 208)); } -UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_id_extension(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension*, UPB_SIZE(124, 216)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_preserve_external_request_id(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(31, 31), bool); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_merge_slashes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool); } +UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_server_header_transformation(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_common_http_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(120, 208)); } +UPB_INLINE const struct envoy_api_v2_core_HttpProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_common_http_protocol_options(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(120, 208), const struct envoy_api_v2_core_HttpProtocolOptions*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_request_id_extension(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(124, 216)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_id_extension(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(124, 216), const envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension*); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_codec_type(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_stat_prefix(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_rds(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_Rds* value) { UPB_WRITE_ONEOF(msg, envoy_config_filter_network_http_connection_manager_v2_Rds*, UPB_SIZE(140, 248), value, UPB_SIZE(144, 256), 3); @@ -227,7 +247,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpFil return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_add_user_agent(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(60, 88)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 88), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_add_user_agent(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_add_user_agent(msg); @@ -239,7 +259,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_co return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_tracing(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* value) { - UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*, UPB_SIZE(64, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 96), envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*) = value; } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_tracing(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_tracing(msg); @@ -251,7 +271,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpCon return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct envoy_api_v2_core_Http1ProtocolOptions* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Http1ProtocolOptions*, UPB_SIZE(68, 104)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 104), struct envoy_api_v2_core_Http1ProtocolOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_api_v2_core_Http1ProtocolOptions* sub = (struct envoy_api_v2_core_Http1ProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_protocol_options(msg); @@ -263,7 +283,7 @@ UPB_INLINE struct envoy_api_v2_core_Http1ProtocolOptions* envoy_config_filter_ne return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_http2_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct envoy_api_v2_core_Http2ProtocolOptions* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Http2ProtocolOptions*, UPB_SIZE(72, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(72, 112), struct envoy_api_v2_core_Http2ProtocolOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_http2_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_api_v2_core_Http2ProtocolOptions* sub = (struct envoy_api_v2_core_Http2ProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http2_protocol_options(msg); @@ -275,10 +295,10 @@ UPB_INLINE struct envoy_api_v2_core_Http2ProtocolOptions* envoy_config_filter_ne return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_server_name(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(76, 120)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(76, 120), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_idle_timeout(msg); @@ -290,7 +310,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_con return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_drain_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(80, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(80, 128), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_drain_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_drain_timeout(msg); @@ -315,7 +335,7 @@ UPB_INLINE struct envoy_config_filter_accesslog_v2_AccessLog* envoy_config_filte return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_use_remote_address(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(84, 136)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(84, 136), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_use_remote_address(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_use_remote_address(msg); @@ -327,7 +347,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_co return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_generate_request_id(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(88, 144)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(88, 144), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_generate_request_id(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_generate_request_id(msg); @@ -339,10 +359,10 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_co return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_forward_client_cert_details(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_set_current_client_cert_details(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* value) { - UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*, UPB_SIZE(92, 152)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(92, 152), envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*) = value; } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_set_current_client_cert_details(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_current_client_cert_details(msg); @@ -354,19 +374,19 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpCon return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_proxy_100_continue(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(28, 28)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 28), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_xff_num_trusted_hops(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint32_t) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_represent_ipv4_remote_address_as_ipv4_mapped_ipv6(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(29, 29)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(29, 29), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_skip_xff_append(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(30, 30)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(30, 30), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_via(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview) = value; } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_upgrade_configs(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { return (envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(136, 240), len); @@ -382,7 +402,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpCon return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_stream_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(96, 160)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(96, 160), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_stream_idle_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stream_idle_timeout(msg); @@ -394,7 +414,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_con return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_internal_address_config(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* value) { - UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*, UPB_SIZE(100, 168)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(100, 168), envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*) = value; } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_internal_address_config(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig* sub = (struct envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_internal_address_config(msg); @@ -406,7 +426,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpCon return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_delayed_close_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(104, 176)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(104, 176), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_delayed_close_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_delayed_close_timeout(msg); @@ -418,7 +438,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_con return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_request_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(108, 184)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(108, 184), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_request_timeout(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_timeout(msg); @@ -430,7 +450,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_filter_network_http_con return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_max_request_headers_kb(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(112, 192)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(112, 192), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_max_request_headers_kb(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_max_request_headers_kb(msg); @@ -442,7 +462,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_ return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_normalize_path(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(116, 200)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(116, 200), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_normalize_path(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_normalize_path(msg); @@ -466,16 +486,16 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedR return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_preserve_external_request_id(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(31, 31)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(31, 31), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_merge_slashes(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_server_header_transformation(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_common_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, struct envoy_api_v2_core_HttpProtocolOptions* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_HttpProtocolOptions*, UPB_SIZE(120, 208)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(120, 208), struct envoy_api_v2_core_HttpProtocolOptions*) = value; } UPB_INLINE struct envoy_api_v2_core_HttpProtocolOptions* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_common_http_protocol_options(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_api_v2_core_HttpProtocolOptions* sub = (struct envoy_api_v2_core_HttpProtocolOptions*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_common_http_protocol_options(msg); @@ -487,7 +507,7 @@ UPB_INLINE struct envoy_api_v2_core_HttpProtocolOptions* envoy_config_filter_net return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_set_request_id_extension(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension* value) { - UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension*, UPB_SIZE(124, 216)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(124, 216), envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension*) = value; } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_mutable_request_id_extension(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension* sub = (struct envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_request_id_extension(msg); @@ -513,18 +533,24 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConn return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, arena, len); } -UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_operation_name(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_operation_name(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE upb_strview const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_request_headers_for_tags(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); } -UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_client_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(12, 16)); } -UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_random_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(16, 24)); } -UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_overall_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_Percent*, UPB_SIZE(20, 32)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_verbose(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_max_path_tag_length(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_has_client_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); } +UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_client_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct envoy_type_Percent*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_has_random_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); } +UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_random_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct envoy_type_Percent*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_has_overall_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); } +UPB_INLINE const struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_overall_sampling(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct envoy_type_Percent*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_verbose(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_has_max_path_tag_length(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_max_path_tag_length(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_UInt32Value*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_has_custom_tags(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); } UPB_INLINE const struct envoy_type_tracing_v2_CustomTag* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_custom_tags(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t *len) { return (const struct envoy_type_tracing_v2_CustomTag* const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); } -UPB_INLINE const struct envoy_config_trace_v2_Tracing_Http* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_provider(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return UPB_FIELD_AT(msg, const struct envoy_config_trace_v2_Tracing_Http*, UPB_SIZE(28, 48)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_has_provider(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); } +UPB_INLINE const struct envoy_config_trace_v2_Tracing_Http* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_provider(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct envoy_config_trace_v2_Tracing_Http*); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_operation_name(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE upb_strview* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_request_headers_for_tags(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len); @@ -537,7 +563,7 @@ UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConne arena); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_client_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct envoy_type_Percent* value) { - UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct envoy_type_Percent*) = value; } UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_client_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_client_sampling(msg); @@ -549,7 +575,7 @@ UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connectio return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_random_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct envoy_type_Percent* value) { - UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct envoy_type_Percent*) = value; } UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_random_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_random_sampling(msg); @@ -561,7 +587,7 @@ UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connectio return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_overall_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct envoy_type_Percent* value) { - UPB_FIELD_AT(msg, struct envoy_type_Percent*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct envoy_type_Percent*) = value; } UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_overall_sampling(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct envoy_type_Percent* sub = (struct envoy_type_Percent*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_overall_sampling(msg); @@ -573,10 +599,10 @@ UPB_INLINE struct envoy_type_Percent* envoy_config_filter_network_http_connectio return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_verbose(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_max_path_tag_length(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_max_path_tag_length(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_max_path_tag_length(msg); @@ -601,7 +627,7 @@ UPB_INLINE struct envoy_type_tracing_v2_CustomTag* envoy_config_filter_network_h return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_set_provider(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, struct envoy_config_trace_v2_Tracing_Http* value) { - UPB_FIELD_AT(msg, struct envoy_config_trace_v2_Tracing_Http*, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct envoy_config_trace_v2_Tracing_Http*) = value; } UPB_INLINE struct envoy_config_trace_v2_Tracing_Http* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_mutable_provider(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing *msg, upb_arena *arena) { struct envoy_config_trace_v2_Tracing_Http* sub = (struct envoy_config_trace_v2_Tracing_Http*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_provider(msg); @@ -627,10 +653,10 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConn return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, arena, len); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_unix_sockets(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_unix_sockets(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_set_unix_sockets(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails */ @@ -647,14 +673,15 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConn return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_subject(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_cert(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_dns(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_uri(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_chain(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_has_subject(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_subject(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_cert(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_dns(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_uri(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_chain(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_subject(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_mutable_subject(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_subject(msg); @@ -666,16 +693,16 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_co return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_cert(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_dns(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_uri(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_set_chain(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value; } /* envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig */ @@ -692,12 +719,14 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_HttpConn return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, arena, len); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_upgrade_type(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_upgrade_type(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_has_filters(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_filters(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } -UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_enabled(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_has_enabled(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_enabled(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_set_upgrade_type(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter** envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_mutable_filters(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, size_t *len) { return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); @@ -713,7 +742,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_HttpFil return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_set_enabled(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, struct google_protobuf_BoolValue* value) { - UPB_FIELD_AT(msg, struct google_protobuf_BoolValue*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value; } UPB_INLINE struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_mutable_enabled(envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena) { struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_enabled(msg); @@ -739,11 +768,12 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_Rds_seri return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_Rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_Rds *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_Rds_route_config_name(const envoy_config_filter_network_http_connection_manager_v2_Rds *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_Rds_has_config_source(const envoy_config_filter_network_http_connection_manager_v2_Rds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_Rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_Rds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_ConfigSource*); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_Rds_route_config_name(const envoy_config_filter_network_http_connection_manager_v2_Rds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_Rds_set_config_source(envoy_config_filter_network_http_connection_manager_v2_Rds *msg, struct envoy_api_v2_core_ConfigSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_api_v2_core_ConfigSource*) = value; } UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_Rds_mutable_config_source(envoy_config_filter_network_http_connection_manager_v2_Rds *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_Rds_config_source(msg); @@ -755,7 +785,7 @@ UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_ht return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_Rds_set_route_config_name(envoy_config_filter_network_http_connection_manager_v2_Rds *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList */ @@ -772,6 +802,7 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRo return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, arena, len); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_has_scoped_route_configurations(const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const struct envoy_api_v2_ScopedRouteConfiguration* const* envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_scoped_route_configurations(const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, size_t *len) { return (const struct envoy_api_v2_ScopedRouteConfiguration* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE struct envoy_api_v2_ScopedRouteConfiguration** envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_mutable_scoped_route_configurations(envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList *msg, size_t *len) { @@ -807,21 +838,23 @@ typedef enum { envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_scoped_rds = 5, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_NOT_SET = 0 } envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_oneofcases; -UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_config_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_name(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scope_key_builder(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_FIELD_AT(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_name(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scope_key_builder(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scope_key_builder(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_api_v2_core_ConfigSource*); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scoped_route_configurations_list(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_route_configurations_list(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scoped_rds(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 5); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRds* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_rds(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRds*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 5, NULL); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_name(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_scope_key_builder(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* value) { - UPB_FIELD_AT(msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*) = value; } UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_scope_key_builder(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* sub = (struct envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scope_key_builder(msg); @@ -833,7 +866,7 @@ UPB_INLINE struct envoy_config_filter_network_http_connection_manager_v2_ScopedR return sub; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, struct envoy_api_v2_core_ConfigSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_api_v2_core_ConfigSource*) = value; } UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_mutable_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_rds_config_source(msg); @@ -883,6 +916,7 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRo return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, arena, len); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_has_fragments(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* const* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_fragments(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder** envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_mutable_fragments(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder *msg, size_t *len) { @@ -917,7 +951,7 @@ typedef enum { envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_header_value_extractor = 1, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_NOT_SET = 0 } envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases; -UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_has_header_value_extractor(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_header_value_extractor(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -954,20 +988,20 @@ typedef enum { envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_element = 4, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_NOT_SET = 0 } envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_oneofcases; -UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 40)); } +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_extract_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_name(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element_separator(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_name(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element_separator(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_has_index(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 3); } UPB_INLINE uint32_t envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_index(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, 0); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_has_element(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_name(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_element_separator(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_index(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, uint32_t value) { UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 3); @@ -999,14 +1033,14 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRo return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena, len); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_separator(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_key(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_separator(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_key(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_set_separator(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_set_key(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* envoy.config.filter.network.http_connection_manager.v2.ScopedRds */ @@ -1023,10 +1057,11 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_ScopedRd return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRds_scoped_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRds_has_scoped_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRds_scoped_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_ConfigSource*); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRds_set_scoped_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg, struct envoy_api_v2_core_ConfigSource* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_ConfigSource*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_ConfigSource*) = value; } UPB_INLINE struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRds_mutable_scoped_rds_config_source(envoy_config_filter_network_http_connection_manager_v2_ScopedRds *msg, upb_arena *arena) { struct envoy_api_v2_core_ConfigSource* sub = (struct envoy_api_v2_core_ConfigSource*)envoy_config_filter_network_http_connection_manager_v2_ScopedRds_scoped_rds_config_source(msg); @@ -1057,16 +1092,16 @@ typedef enum { envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_typed_config = 4, envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_NOT_SET = 0 } envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases; -UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_case(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* msg) { return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_case(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* msg) { return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpFilter_name(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpFilter_name(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpFilter_has_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpFilter_has_typed_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_typed_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_name(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_config(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); @@ -1107,10 +1142,11 @@ UPB_INLINE char *envoy_config_filter_network_http_connection_manager_v2_RequestI return upb_encode(msg, &envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_typed_config(const envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_has_typed_config(const envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_typed_config(const envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Any*); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_set_typed_config(envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_mutable_typed_config(envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_typed_config(msg); diff --git a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h index 5774e14a085..51351a033ee 100644 --- a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +++ b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h @@ -40,10 +40,11 @@ UPB_INLINE char *envoy_config_listener_v2_ApiListener_serialize(const envoy_conf return upb_encode(msg, &envoy_config_listener_v2_ApiListener_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v2_ApiListener_api_listener(const envoy_config_listener_v2_ApiListener *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Any*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_listener_v2_ApiListener_has_api_listener(const envoy_config_listener_v2_ApiListener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v2_ApiListener_api_listener(const envoy_config_listener_v2_ApiListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Any*); } UPB_INLINE void envoy_config_listener_v2_ApiListener_set_api_listener(envoy_config_listener_v2_ApiListener *msg, struct google_protobuf_Any* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Any*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Any*) = value; } UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v2_ApiListener_mutable_api_listener(envoy_config_listener_v2_ApiListener *msg, upb_arena *arena) { struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_listener_v2_ApiListener_api_listener(msg); diff --git a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c index 2b5153a3062..4369d629782 100644 --- a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c +++ b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c @@ -37,8 +37,8 @@ static const upb_msglayout *const envoy_config_trace_v2_Tracing_Http_submsgs[2] static const upb_msglayout_field envoy_config_trace_v2_Tracing_Http__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, }; const upb_msglayout envoy_config_trace_v2_Tracing_Http_msginit = { diff --git a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h index 9b1849a65f0..f5d9d967501 100644 --- a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h +++ b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h @@ -45,10 +45,11 @@ UPB_INLINE char *envoy_config_trace_v2_Tracing_serialize(const envoy_config_trac return upb_encode(msg, &envoy_config_trace_v2_Tracing_msginit, arena, len); } -UPB_INLINE const envoy_config_trace_v2_Tracing_Http* envoy_config_trace_v2_Tracing_http(const envoy_config_trace_v2_Tracing *msg) { return UPB_FIELD_AT(msg, const envoy_config_trace_v2_Tracing_Http*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_trace_v2_Tracing_has_http(const envoy_config_trace_v2_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const envoy_config_trace_v2_Tracing_Http* envoy_config_trace_v2_Tracing_http(const envoy_config_trace_v2_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_trace_v2_Tracing_Http*); } UPB_INLINE void envoy_config_trace_v2_Tracing_set_http(envoy_config_trace_v2_Tracing *msg, envoy_config_trace_v2_Tracing_Http* value) { - UPB_FIELD_AT(msg, envoy_config_trace_v2_Tracing_Http*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_trace_v2_Tracing_Http*) = value; } UPB_INLINE struct envoy_config_trace_v2_Tracing_Http* envoy_config_trace_v2_Tracing_mutable_http(envoy_config_trace_v2_Tracing *msg, upb_arena *arena) { struct envoy_config_trace_v2_Tracing_Http* sub = (struct envoy_config_trace_v2_Tracing_Http*)envoy_config_trace_v2_Tracing_http(msg); @@ -79,16 +80,16 @@ typedef enum { envoy_config_trace_v2_Tracing_Http_config_type_typed_config = 3, envoy_config_trace_v2_Tracing_Http_config_type_NOT_SET = 0 } envoy_config_trace_v2_Tracing_Http_config_type_oneofcases; -UPB_INLINE envoy_config_trace_v2_Tracing_Http_config_type_oneofcases envoy_config_trace_v2_Tracing_Http_config_type_case(const envoy_config_trace_v2_Tracing_Http* msg) { return (envoy_config_trace_v2_Tracing_Http_config_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_config_trace_v2_Tracing_Http_config_type_oneofcases envoy_config_trace_v2_Tracing_Http_config_type_case(const envoy_config_trace_v2_Tracing_Http* msg) { return (envoy_config_trace_v2_Tracing_Http_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_config_trace_v2_Tracing_Http_name(const envoy_config_trace_v2_Tracing_Http *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_config_trace_v2_Tracing_Http_name(const envoy_config_trace_v2_Tracing_Http *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_config_trace_v2_Tracing_Http_has_config(const envoy_config_trace_v2_Tracing_Http *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const struct google_protobuf_Struct* envoy_config_trace_v2_Tracing_Http_config(const envoy_config_trace_v2_Tracing_Http *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_config_trace_v2_Tracing_Http_has_typed_config(const envoy_config_trace_v2_Tracing_Http *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } UPB_INLINE const struct google_protobuf_Any* envoy_config_trace_v2_Tracing_Http_typed_config(const envoy_config_trace_v2_Tracing_Http *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_config_trace_v2_Tracing_Http_set_name(envoy_config_trace_v2_Tracing_Http *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_config_trace_v2_Tracing_Http_set_config(envoy_config_trace_v2_Tracing_Http *msg, struct google_protobuf_Struct* value) { UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); diff --git a/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h b/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h index 6262778b930..cc7e0249ce0 100644 --- a/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +++ b/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h @@ -47,11 +47,13 @@ UPB_INLINE char *envoy_service_load_stats_v2_LoadStatsRequest_serialize(const en return upb_encode(msg, &envoy_service_load_stats_v2_LoadStatsRequest_msginit, arena, len); } -UPB_INLINE const struct envoy_api_v2_core_Node* envoy_service_load_stats_v2_LoadStatsRequest_node(const envoy_service_load_stats_v2_LoadStatsRequest *msg) { return UPB_FIELD_AT(msg, const struct envoy_api_v2_core_Node*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsRequest_has_node(const envoy_service_load_stats_v2_LoadStatsRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_api_v2_core_Node* envoy_service_load_stats_v2_LoadStatsRequest_node(const envoy_service_load_stats_v2_LoadStatsRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_core_Node*); } +UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsRequest_has_cluster_stats(const envoy_service_load_stats_v2_LoadStatsRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const struct envoy_api_v2_endpoint_ClusterStats* const* envoy_service_load_stats_v2_LoadStatsRequest_cluster_stats(const envoy_service_load_stats_v2_LoadStatsRequest *msg, size_t *len) { return (const struct envoy_api_v2_endpoint_ClusterStats* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void envoy_service_load_stats_v2_LoadStatsRequest_set_node(envoy_service_load_stats_v2_LoadStatsRequest *msg, struct envoy_api_v2_core_Node* value) { - UPB_FIELD_AT(msg, struct envoy_api_v2_core_Node*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_api_v2_core_Node*) = value; } UPB_INLINE struct envoy_api_v2_core_Node* envoy_service_load_stats_v2_LoadStatsRequest_mutable_node(envoy_service_load_stats_v2_LoadStatsRequest *msg, upb_arena *arena) { struct envoy_api_v2_core_Node* sub = (struct envoy_api_v2_core_Node*)envoy_service_load_stats_v2_LoadStatsRequest_node(msg); @@ -91,9 +93,10 @@ UPB_INLINE char *envoy_service_load_stats_v2_LoadStatsResponse_serialize(const e } UPB_INLINE upb_strview const* envoy_service_load_stats_v2_LoadStatsResponse_clusters(const envoy_service_load_stats_v2_LoadStatsResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } -UPB_INLINE const struct google_protobuf_Duration* envoy_service_load_stats_v2_LoadStatsResponse_load_reporting_interval(const envoy_service_load_stats_v2_LoadStatsResponse *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8)); } -UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_report_endpoint_granularity(const envoy_service_load_stats_v2_LoadStatsResponse *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } -UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_send_all_clusters(const envoy_service_load_stats_v2_LoadStatsResponse *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_has_load_reporting_interval(const envoy_service_load_stats_v2_LoadStatsResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Duration* envoy_service_load_stats_v2_LoadStatsResponse_load_reporting_interval(const envoy_service_load_stats_v2_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); } +UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_report_endpoint_granularity(const envoy_service_load_stats_v2_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } +UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_send_all_clusters(const envoy_service_load_stats_v2_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE upb_strview* envoy_service_load_stats_v2_LoadStatsResponse_mutable_clusters(envoy_service_load_stats_v2_LoadStatsResponse *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); @@ -106,7 +109,7 @@ UPB_INLINE bool envoy_service_load_stats_v2_LoadStatsResponse_add_clusters(envoy arena); } UPB_INLINE void envoy_service_load_stats_v2_LoadStatsResponse_set_load_reporting_interval(envoy_service_load_stats_v2_LoadStatsResponse *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* envoy_service_load_stats_v2_LoadStatsResponse_mutable_load_reporting_interval(envoy_service_load_stats_v2_LoadStatsResponse *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_service_load_stats_v2_LoadStatsResponse_load_reporting_interval(msg); @@ -118,10 +121,10 @@ UPB_INLINE struct google_protobuf_Duration* envoy_service_load_stats_v2_LoadStat return sub; } UPB_INLINE void envoy_service_load_stats_v2_LoadStatsResponse_set_report_endpoint_granularity(envoy_service_load_stats_v2_LoadStatsResponse *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } UPB_INLINE void envoy_service_load_stats_v2_LoadStatsResponse_set_send_all_clusters(envoy_service_load_stats_v2_LoadStatsResponse *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c index dd8fe6cf22e..0bc2960cbfa 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c @@ -20,7 +20,7 @@ static const upb_msglayout *const envoy_type_matcher_RegexMatcher_submsgs[1] = { }; static const upb_msglayout_field envoy_type_matcher_RegexMatcher__fields[2] = { - {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {1, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h index 64a6a541220..12845d9c886 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h @@ -50,11 +50,11 @@ typedef enum { envoy_type_matcher_RegexMatcher_engine_type_google_re2 = 1, envoy_type_matcher_RegexMatcher_engine_type_NOT_SET = 0 } envoy_type_matcher_RegexMatcher_engine_type_oneofcases; -UPB_INLINE envoy_type_matcher_RegexMatcher_engine_type_oneofcases envoy_type_matcher_RegexMatcher_engine_type_case(const envoy_type_matcher_RegexMatcher* msg) { return (envoy_type_matcher_RegexMatcher_engine_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_type_matcher_RegexMatcher_engine_type_oneofcases envoy_type_matcher_RegexMatcher_engine_type_case(const envoy_type_matcher_RegexMatcher* msg) { return (envoy_type_matcher_RegexMatcher_engine_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE bool envoy_type_matcher_RegexMatcher_has_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } UPB_INLINE const envoy_type_matcher_RegexMatcher_GoogleRE2* envoy_type_matcher_RegexMatcher_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return UPB_READ_ONEOF(msg, const envoy_type_matcher_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); } -UPB_INLINE upb_strview envoy_type_matcher_RegexMatcher_regex(const envoy_type_matcher_RegexMatcher *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_type_matcher_RegexMatcher_regex(const envoy_type_matcher_RegexMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_type_matcher_RegexMatcher_set_google_re2(envoy_type_matcher_RegexMatcher *msg, envoy_type_matcher_RegexMatcher_GoogleRE2* value) { UPB_WRITE_ONEOF(msg, envoy_type_matcher_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 1); @@ -69,7 +69,7 @@ UPB_INLINE struct envoy_type_matcher_RegexMatcher_GoogleRE2* envoy_type_matcher_ return sub; } UPB_INLINE void envoy_type_matcher_RegexMatcher_set_regex(envoy_type_matcher_RegexMatcher *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.type.matcher.RegexMatcher.GoogleRE2 */ @@ -86,10 +86,11 @@ UPB_INLINE char *envoy_type_matcher_RegexMatcher_GoogleRE2_serialize(const envoy return upb_encode(msg, &envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_UInt32Value* envoy_type_matcher_RegexMatcher_GoogleRE2_max_program_size(const envoy_type_matcher_RegexMatcher_GoogleRE2 *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_type_matcher_RegexMatcher_GoogleRE2_has_max_program_size(const envoy_type_matcher_RegexMatcher_GoogleRE2 *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_protobuf_UInt32Value* envoy_type_matcher_RegexMatcher_GoogleRE2_max_program_size(const envoy_type_matcher_RegexMatcher_GoogleRE2 *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); } UPB_INLINE void envoy_type_matcher_RegexMatcher_GoogleRE2_set_max_program_size(envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, struct google_protobuf_UInt32Value* value) { - UPB_FIELD_AT(msg, struct google_protobuf_UInt32Value*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value; } UPB_INLINE struct google_protobuf_UInt32Value* envoy_type_matcher_RegexMatcher_GoogleRE2_mutable_max_program_size(envoy_type_matcher_RegexMatcher_GoogleRE2 *msg, upb_arena *arena) { struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_type_matcher_RegexMatcher_GoogleRE2_max_program_size(msg); @@ -115,11 +116,12 @@ UPB_INLINE char *envoy_type_matcher_RegexMatchAndSubstitute_serialize(const envo return upb_encode(msg, &envoy_type_matcher_RegexMatchAndSubstitute_msginit, arena, len); } -UPB_INLINE const envoy_type_matcher_RegexMatcher* envoy_type_matcher_RegexMatchAndSubstitute_pattern(const envoy_type_matcher_RegexMatchAndSubstitute *msg) { return UPB_FIELD_AT(msg, const envoy_type_matcher_RegexMatcher*, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview envoy_type_matcher_RegexMatchAndSubstitute_substitution(const envoy_type_matcher_RegexMatchAndSubstitute *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_type_matcher_RegexMatchAndSubstitute_has_pattern(const envoy_type_matcher_RegexMatchAndSubstitute *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const envoy_type_matcher_RegexMatcher* envoy_type_matcher_RegexMatchAndSubstitute_pattern(const envoy_type_matcher_RegexMatchAndSubstitute *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_type_matcher_RegexMatcher*); } +UPB_INLINE upb_strview envoy_type_matcher_RegexMatchAndSubstitute_substitution(const envoy_type_matcher_RegexMatchAndSubstitute *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_type_matcher_RegexMatchAndSubstitute_set_pattern(envoy_type_matcher_RegexMatchAndSubstitute *msg, envoy_type_matcher_RegexMatcher* value) { - UPB_FIELD_AT(msg, envoy_type_matcher_RegexMatcher*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_type_matcher_RegexMatcher*) = value; } UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_RegexMatchAndSubstitute_mutable_pattern(envoy_type_matcher_RegexMatchAndSubstitute *msg, upb_arena *arena) { struct envoy_type_matcher_RegexMatcher* sub = (struct envoy_type_matcher_RegexMatcher*)envoy_type_matcher_RegexMatchAndSubstitute_pattern(msg); @@ -131,7 +133,7 @@ UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_RegexMatch return sub; } UPB_INLINE void envoy_type_matcher_RegexMatchAndSubstitute_set_substitution(envoy_type_matcher_RegexMatchAndSubstitute *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c index beab52346fe..827908d806b 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c @@ -21,11 +21,11 @@ static const upb_msglayout *const envoy_type_matcher_StringMatcher_submsgs[1] = }; static const upb_msglayout_field envoy_type_matcher_StringMatcher__fields[6] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, - {2, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, - {3, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, - {4, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, - {5, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 11, 1}, + {1, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, + {2, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, + {3, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, + {4, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, + {5, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 11, 1}, {6, UPB_SIZE(0, 0), 0, 0, 8, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h index 882c69dba43..b08dc0f1b42 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h @@ -51,7 +51,7 @@ typedef enum { envoy_type_matcher_StringMatcher_match_pattern_safe_regex = 5, envoy_type_matcher_StringMatcher_match_pattern_NOT_SET = 0 } envoy_type_matcher_StringMatcher_match_pattern_oneofcases; -UPB_INLINE envoy_type_matcher_StringMatcher_match_pattern_oneofcases envoy_type_matcher_StringMatcher_match_pattern_case(const envoy_type_matcher_StringMatcher* msg) { return (envoy_type_matcher_StringMatcher_match_pattern_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_type_matcher_StringMatcher_match_pattern_oneofcases envoy_type_matcher_StringMatcher_match_pattern_case(const envoy_type_matcher_StringMatcher* msg) { return (envoy_type_matcher_StringMatcher_match_pattern_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE bool envoy_type_matcher_StringMatcher_has_exact(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_exact(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 1, upb_strview_make("", strlen(""))); } @@ -63,7 +63,7 @@ UPB_INLINE bool envoy_type_matcher_StringMatcher_has_regex(const envoy_type_matc UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_regex(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 4, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_type_matcher_StringMatcher_has_safe_regex(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 5); } UPB_INLINE const struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_StringMatcher_safe_regex(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 5, NULL); } -UPB_INLINE bool envoy_type_matcher_StringMatcher_ignore_case(const envoy_type_matcher_StringMatcher *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_type_matcher_StringMatcher_ignore_case(const envoy_type_matcher_StringMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void envoy_type_matcher_StringMatcher_set_exact(envoy_type_matcher_StringMatcher *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), value, UPB_SIZE(12, 24), 1); @@ -90,7 +90,7 @@ UPB_INLINE struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_StringMatc return sub; } UPB_INLINE void envoy_type_matcher_StringMatcher_set_ignore_case(envoy_type_matcher_StringMatcher *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* envoy.type.matcher.ListStringMatcher */ @@ -107,6 +107,7 @@ UPB_INLINE char *envoy_type_matcher_ListStringMatcher_serialize(const envoy_type return upb_encode(msg, &envoy_type_matcher_ListStringMatcher_msginit, arena, len); } +UPB_INLINE bool envoy_type_matcher_ListStringMatcher_has_patterns(const envoy_type_matcher_ListStringMatcher *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_type_matcher_StringMatcher* const* envoy_type_matcher_ListStringMatcher_patterns(const envoy_type_matcher_ListStringMatcher *msg, size_t *len) { return (const envoy_type_matcher_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_type_matcher_StringMatcher** envoy_type_matcher_ListStringMatcher_mutable_patterns(envoy_type_matcher_ListStringMatcher *msg, size_t *len) { diff --git a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c index 3f98ea08b8b..8f5c25c58df 100644 --- a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +++ b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c @@ -31,7 +31,7 @@ const upb_msglayout envoy_type_metadata_v2_MetadataKey_msginit = { }; static const upb_msglayout_field envoy_type_metadata_v2_MetadataKey_PathSegment__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, }; const upb_msglayout envoy_type_metadata_v2_MetadataKey_PathSegment_msginit = { @@ -48,10 +48,10 @@ static const upb_msglayout *const envoy_type_metadata_v2_MetadataKind_submsgs[4] }; static const upb_msglayout_field envoy_type_metadata_v2_MetadataKind__fields[4] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 3, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, }; const upb_msglayout envoy_type_metadata_v2_MetadataKind_msginit = { diff --git a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h index f19e072166e..2eb78568a7d 100644 --- a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +++ b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h @@ -56,11 +56,12 @@ UPB_INLINE char *envoy_type_metadata_v2_MetadataKey_serialize(const envoy_type_m return upb_encode(msg, &envoy_type_metadata_v2_MetadataKey_msginit, arena, len); } -UPB_INLINE upb_strview envoy_type_metadata_v2_MetadataKey_key(const envoy_type_metadata_v2_MetadataKey *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_type_metadata_v2_MetadataKey_key(const envoy_type_metadata_v2_MetadataKey *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool envoy_type_metadata_v2_MetadataKey_has_path(const envoy_type_metadata_v2_MetadataKey *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const envoy_type_metadata_v2_MetadataKey_PathSegment* const* envoy_type_metadata_v2_MetadataKey_path(const envoy_type_metadata_v2_MetadataKey *msg, size_t *len) { return (const envoy_type_metadata_v2_MetadataKey_PathSegment* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE void envoy_type_metadata_v2_MetadataKey_set_key(envoy_type_metadata_v2_MetadataKey *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE envoy_type_metadata_v2_MetadataKey_PathSegment** envoy_type_metadata_v2_MetadataKey_mutable_path(envoy_type_metadata_v2_MetadataKey *msg, size_t *len) { return (envoy_type_metadata_v2_MetadataKey_PathSegment**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); @@ -94,7 +95,7 @@ typedef enum { envoy_type_metadata_v2_MetadataKey_PathSegment_segment_key = 1, envoy_type_metadata_v2_MetadataKey_PathSegment_segment_NOT_SET = 0 } envoy_type_metadata_v2_MetadataKey_PathSegment_segment_oneofcases; -UPB_INLINE envoy_type_metadata_v2_MetadataKey_PathSegment_segment_oneofcases envoy_type_metadata_v2_MetadataKey_PathSegment_segment_case(const envoy_type_metadata_v2_MetadataKey_PathSegment* msg) { return (envoy_type_metadata_v2_MetadataKey_PathSegment_segment_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } +UPB_INLINE envoy_type_metadata_v2_MetadataKey_PathSegment_segment_oneofcases envoy_type_metadata_v2_MetadataKey_PathSegment_segment_case(const envoy_type_metadata_v2_MetadataKey_PathSegment* msg) { return (envoy_type_metadata_v2_MetadataKey_PathSegment_segment_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } UPB_INLINE bool envoy_type_metadata_v2_MetadataKey_PathSegment_has_key(const envoy_type_metadata_v2_MetadataKey_PathSegment *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } UPB_INLINE upb_strview envoy_type_metadata_v2_MetadataKey_PathSegment_key(const envoy_type_metadata_v2_MetadataKey_PathSegment *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } @@ -124,7 +125,7 @@ typedef enum { envoy_type_metadata_v2_MetadataKind_kind_host = 4, envoy_type_metadata_v2_MetadataKind_kind_NOT_SET = 0 } envoy_type_metadata_v2_MetadataKind_kind_oneofcases; -UPB_INLINE envoy_type_metadata_v2_MetadataKind_kind_oneofcases envoy_type_metadata_v2_MetadataKind_kind_case(const envoy_type_metadata_v2_MetadataKind* msg) { return (envoy_type_metadata_v2_MetadataKind_kind_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_type_metadata_v2_MetadataKind_kind_oneofcases envoy_type_metadata_v2_MetadataKind_kind_case(const envoy_type_metadata_v2_MetadataKind* msg) { return (envoy_type_metadata_v2_MetadataKind_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_request(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const envoy_type_metadata_v2_MetadataKind_Request* envoy_type_metadata_v2_MetadataKind_request(const envoy_type_metadata_v2_MetadataKind *msg) { return UPB_READ_ONEOF(msg, const envoy_type_metadata_v2_MetadataKind_Request*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } diff --git a/src/core/ext/upb-generated/envoy/type/percent.upb.h b/src/core/ext/upb-generated/envoy/type/percent.upb.h index 9e39faec9ca..8d30023c235 100644 --- a/src/core/ext/upb-generated/envoy/type/percent.upb.h +++ b/src/core/ext/upb-generated/envoy/type/percent.upb.h @@ -47,10 +47,10 @@ UPB_INLINE char *envoy_type_Percent_serialize(const envoy_type_Percent *msg, upb return upb_encode(msg, &envoy_type_Percent_msginit, arena, len); } -UPB_INLINE double envoy_type_Percent_value(const envoy_type_Percent *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } +UPB_INLINE double envoy_type_Percent_value(const envoy_type_Percent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); } UPB_INLINE void envoy_type_Percent_set_value(envoy_type_Percent *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value; } /* envoy.type.FractionalPercent */ @@ -67,14 +67,14 @@ UPB_INLINE char *envoy_type_FractionalPercent_serialize(const envoy_type_Fractio return upb_encode(msg, &envoy_type_FractionalPercent_msginit, arena, len); } -UPB_INLINE uint32_t envoy_type_FractionalPercent_numerator(const envoy_type_FractionalPercent *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } -UPB_INLINE int32_t envoy_type_FractionalPercent_denominator(const envoy_type_FractionalPercent *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE uint32_t envoy_type_FractionalPercent_numerator(const envoy_type_FractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } +UPB_INLINE int32_t envoy_type_FractionalPercent_denominator(const envoy_type_FractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void envoy_type_FractionalPercent_set_numerator(envoy_type_FractionalPercent *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value; } UPB_INLINE void envoy_type_FractionalPercent_set_denominator(envoy_type_FractionalPercent *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/type/range.upb.h b/src/core/ext/upb-generated/envoy/type/range.upb.h index 8d734861a7f..a2d534abe98 100644 --- a/src/core/ext/upb-generated/envoy/type/range.upb.h +++ b/src/core/ext/upb-generated/envoy/type/range.upb.h @@ -44,14 +44,14 @@ UPB_INLINE char *envoy_type_Int64Range_serialize(const envoy_type_Int64Range *ms return upb_encode(msg, &envoy_type_Int64Range_msginit, arena, len); } -UPB_INLINE int64_t envoy_type_Int64Range_start(const envoy_type_Int64Range *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } -UPB_INLINE int64_t envoy_type_Int64Range_end(const envoy_type_Int64Range *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE int64_t envoy_type_Int64Range_start(const envoy_type_Int64Range *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } +UPB_INLINE int64_t envoy_type_Int64Range_end(const envoy_type_Int64Range *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } UPB_INLINE void envoy_type_Int64Range_set_start(envoy_type_Int64Range *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } UPB_INLINE void envoy_type_Int64Range_set_end(envoy_type_Int64Range *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value; } /* envoy.type.Int32Range */ @@ -68,14 +68,14 @@ UPB_INLINE char *envoy_type_Int32Range_serialize(const envoy_type_Int32Range *ms return upb_encode(msg, &envoy_type_Int32Range_msginit, arena, len); } -UPB_INLINE int32_t envoy_type_Int32Range_start(const envoy_type_Int32Range *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE int32_t envoy_type_Int32Range_end(const envoy_type_Int32Range *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t envoy_type_Int32Range_start(const envoy_type_Int32Range *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE int32_t envoy_type_Int32Range_end(const envoy_type_Int32Range *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE void envoy_type_Int32Range_set_start(envoy_type_Int32Range *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void envoy_type_Int32Range_set_end(envoy_type_Int32Range *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } /* envoy.type.DoubleRange */ @@ -92,14 +92,14 @@ UPB_INLINE char *envoy_type_DoubleRange_serialize(const envoy_type_DoubleRange * return upb_encode(msg, &envoy_type_DoubleRange_msginit, arena, len); } -UPB_INLINE double envoy_type_DoubleRange_start(const envoy_type_DoubleRange *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } -UPB_INLINE double envoy_type_DoubleRange_end(const envoy_type_DoubleRange *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); } +UPB_INLINE double envoy_type_DoubleRange_start(const envoy_type_DoubleRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); } +UPB_INLINE double envoy_type_DoubleRange_end(const envoy_type_DoubleRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double); } UPB_INLINE void envoy_type_DoubleRange_set_start(envoy_type_DoubleRange *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value; } UPB_INLINE void envoy_type_DoubleRange_set_end(envoy_type_DoubleRange *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h b/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h index f3d8a59fa7f..a1c06841dc2 100644 --- a/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +++ b/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h @@ -38,18 +38,18 @@ UPB_INLINE char *envoy_type_SemanticVersion_serialize(const envoy_type_SemanticV return upb_encode(msg, &envoy_type_SemanticVersion_msginit, arena, len); } -UPB_INLINE uint32_t envoy_type_SemanticVersion_major_number(const envoy_type_SemanticVersion *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE uint32_t envoy_type_SemanticVersion_minor_number(const envoy_type_SemanticVersion *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)); } -UPB_INLINE uint32_t envoy_type_SemanticVersion_patch(const envoy_type_SemanticVersion *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint32_t envoy_type_SemanticVersion_major_number(const envoy_type_SemanticVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE uint32_t envoy_type_SemanticVersion_minor_number(const envoy_type_SemanticVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); } +UPB_INLINE uint32_t envoy_type_SemanticVersion_patch(const envoy_type_SemanticVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } UPB_INLINE void envoy_type_SemanticVersion_set_major_number(envoy_type_SemanticVersion *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void envoy_type_SemanticVersion_set_minor_number(envoy_type_SemanticVersion *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value; } UPB_INLINE void envoy_type_SemanticVersion_set_patch(envoy_type_SemanticVersion *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c index 064e7e26b50..549642c985a 100644 --- a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +++ b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c @@ -24,10 +24,10 @@ static const upb_msglayout *const envoy_type_tracing_v2_CustomTag_submsgs[4] = { static const upb_msglayout_field envoy_type_tracing_v2_CustomTag__fields[5] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 3, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 2, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {5, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 3, 11, 1}, }; const upb_msglayout envoy_type_tracing_v2_CustomTag_msginit = { diff --git a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h index 85a49a49d95..55e4cc8c584 100644 --- a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +++ b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h @@ -61,9 +61,9 @@ typedef enum { envoy_type_tracing_v2_CustomTag_type_metadata = 5, envoy_type_tracing_v2_CustomTag_type_NOT_SET = 0 } envoy_type_tracing_v2_CustomTag_type_oneofcases; -UPB_INLINE envoy_type_tracing_v2_CustomTag_type_oneofcases envoy_type_tracing_v2_CustomTag_type_case(const envoy_type_tracing_v2_CustomTag* msg) { return (envoy_type_tracing_v2_CustomTag_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE envoy_type_tracing_v2_CustomTag_type_oneofcases envoy_type_tracing_v2_CustomTag_type_case(const envoy_type_tracing_v2_CustomTag* msg) { return (envoy_type_tracing_v2_CustomTag_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_tag(const envoy_type_tracing_v2_CustomTag *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_tag(const envoy_type_tracing_v2_CustomTag *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_literal(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE const envoy_type_tracing_v2_CustomTag_Literal* envoy_type_tracing_v2_CustomTag_literal(const envoy_type_tracing_v2_CustomTag *msg) { return UPB_READ_ONEOF(msg, const envoy_type_tracing_v2_CustomTag_Literal*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_environment(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } @@ -74,7 +74,7 @@ UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_metadata(const envoy_type_tr UPB_INLINE const envoy_type_tracing_v2_CustomTag_Metadata* envoy_type_tracing_v2_CustomTag_metadata(const envoy_type_tracing_v2_CustomTag *msg) { return UPB_READ_ONEOF(msg, const envoy_type_tracing_v2_CustomTag_Metadata*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); } UPB_INLINE void envoy_type_tracing_v2_CustomTag_set_tag(envoy_type_tracing_v2_CustomTag *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_type_tracing_v2_CustomTag_set_literal(envoy_type_tracing_v2_CustomTag *msg, envoy_type_tracing_v2_CustomTag_Literal* value) { UPB_WRITE_ONEOF(msg, envoy_type_tracing_v2_CustomTag_Literal*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2); @@ -139,10 +139,10 @@ UPB_INLINE char *envoy_type_tracing_v2_CustomTag_Literal_serialize(const envoy_t return upb_encode(msg, &envoy_type_tracing_v2_CustomTag_Literal_msginit, arena, len); } -UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Literal_value(const envoy_type_tracing_v2_CustomTag_Literal *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Literal_value(const envoy_type_tracing_v2_CustomTag_Literal *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_type_tracing_v2_CustomTag_Literal_set_value(envoy_type_tracing_v2_CustomTag_Literal *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* envoy.type.tracing.v2.CustomTag.Environment */ @@ -159,14 +159,14 @@ UPB_INLINE char *envoy_type_tracing_v2_CustomTag_Environment_serialize(const env return upb_encode(msg, &envoy_type_tracing_v2_CustomTag_Environment_msginit, arena, len); } -UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Environment_name(const envoy_type_tracing_v2_CustomTag_Environment *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Environment_default_value(const envoy_type_tracing_v2_CustomTag_Environment *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Environment_name(const envoy_type_tracing_v2_CustomTag_Environment *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Environment_default_value(const envoy_type_tracing_v2_CustomTag_Environment *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void envoy_type_tracing_v2_CustomTag_Environment_set_name(envoy_type_tracing_v2_CustomTag_Environment *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_type_tracing_v2_CustomTag_Environment_set_default_value(envoy_type_tracing_v2_CustomTag_Environment *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* envoy.type.tracing.v2.CustomTag.Header */ @@ -183,14 +183,14 @@ UPB_INLINE char *envoy_type_tracing_v2_CustomTag_Header_serialize(const envoy_ty return upb_encode(msg, &envoy_type_tracing_v2_CustomTag_Header_msginit, arena, len); } -UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Header_name(const envoy_type_tracing_v2_CustomTag_Header *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Header_default_value(const envoy_type_tracing_v2_CustomTag_Header *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Header_name(const envoy_type_tracing_v2_CustomTag_Header *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Header_default_value(const envoy_type_tracing_v2_CustomTag_Header *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void envoy_type_tracing_v2_CustomTag_Header_set_name(envoy_type_tracing_v2_CustomTag_Header *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void envoy_type_tracing_v2_CustomTag_Header_set_default_value(envoy_type_tracing_v2_CustomTag_Header *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* envoy.type.tracing.v2.CustomTag.Metadata */ @@ -207,12 +207,14 @@ UPB_INLINE char *envoy_type_tracing_v2_CustomTag_Metadata_serialize(const envoy_ return upb_encode(msg, &envoy_type_tracing_v2_CustomTag_Metadata_msginit, arena, len); } -UPB_INLINE const struct envoy_type_metadata_v2_MetadataKind* envoy_type_tracing_v2_CustomTag_Metadata_kind(const envoy_type_tracing_v2_CustomTag_Metadata *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_metadata_v2_MetadataKind*, UPB_SIZE(8, 16)); } -UPB_INLINE const struct envoy_type_metadata_v2_MetadataKey* envoy_type_tracing_v2_CustomTag_Metadata_metadata_key(const envoy_type_tracing_v2_CustomTag_Metadata *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_metadata_v2_MetadataKey*, UPB_SIZE(12, 24)); } -UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Metadata_default_value(const envoy_type_tracing_v2_CustomTag_Metadata *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_type_tracing_v2_CustomTag_Metadata_has_kind(const envoy_type_tracing_v2_CustomTag_Metadata *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct envoy_type_metadata_v2_MetadataKind* envoy_type_tracing_v2_CustomTag_Metadata_kind(const envoy_type_tracing_v2_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_metadata_v2_MetadataKind*); } +UPB_INLINE bool envoy_type_tracing_v2_CustomTag_Metadata_has_metadata_key(const envoy_type_tracing_v2_CustomTag_Metadata *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const struct envoy_type_metadata_v2_MetadataKey* envoy_type_tracing_v2_CustomTag_Metadata_metadata_key(const envoy_type_tracing_v2_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_metadata_v2_MetadataKey*); } +UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_Metadata_default_value(const envoy_type_tracing_v2_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void envoy_type_tracing_v2_CustomTag_Metadata_set_kind(envoy_type_tracing_v2_CustomTag_Metadata *msg, struct envoy_type_metadata_v2_MetadataKind* value) { - UPB_FIELD_AT(msg, struct envoy_type_metadata_v2_MetadataKind*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_metadata_v2_MetadataKind*) = value; } UPB_INLINE struct envoy_type_metadata_v2_MetadataKind* envoy_type_tracing_v2_CustomTag_Metadata_mutable_kind(envoy_type_tracing_v2_CustomTag_Metadata *msg, upb_arena *arena) { struct envoy_type_metadata_v2_MetadataKind* sub = (struct envoy_type_metadata_v2_MetadataKind*)envoy_type_tracing_v2_CustomTag_Metadata_kind(msg); @@ -224,7 +226,7 @@ UPB_INLINE struct envoy_type_metadata_v2_MetadataKind* envoy_type_tracing_v2_Cus return sub; } UPB_INLINE void envoy_type_tracing_v2_CustomTag_Metadata_set_metadata_key(envoy_type_tracing_v2_CustomTag_Metadata *msg, struct envoy_type_metadata_v2_MetadataKey* value) { - UPB_FIELD_AT(msg, struct envoy_type_metadata_v2_MetadataKey*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_metadata_v2_MetadataKey*) = value; } UPB_INLINE struct envoy_type_metadata_v2_MetadataKey* envoy_type_tracing_v2_CustomTag_Metadata_mutable_metadata_key(envoy_type_tracing_v2_CustomTag_Metadata *msg, upb_arena *arena) { struct envoy_type_metadata_v2_MetadataKey* sub = (struct envoy_type_metadata_v2_MetadataKey*)envoy_type_tracing_v2_CustomTag_Metadata_metadata_key(msg); @@ -236,7 +238,7 @@ UPB_INLINE struct envoy_type_metadata_v2_MetadataKey* envoy_type_tracing_v2_Cust return sub; } UPB_INLINE void envoy_type_tracing_v2_CustomTag_Metadata_set_default_value(envoy_type_tracing_v2_CustomTag_Metadata *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/google/api/http.upb.c b/src/core/ext/upb-generated/google/api/http.upb.c index 8ad07dcd9fd..e5c621a52c1 100644 --- a/src/core/ext/upb-generated/google/api/http.upb.c +++ b/src/core/ext/upb-generated/google/api/http.upb.c @@ -34,13 +34,13 @@ static const upb_msglayout *const google_api_HttpRule_submsgs[2] = { static const upb_msglayout_field google_api_HttpRule__fields[10] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, - {3, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, - {4, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, - {5, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, - {6, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {2, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, + {3, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, + {4, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, + {5, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, + {6, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, {7, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {8, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 11, 1}, + {8, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 11, 1}, {11, UPB_SIZE(24, 48), 0, 1, 11, 3}, {12, UPB_SIZE(16, 32), 0, 0, 9, 1}, }; diff --git a/src/core/ext/upb-generated/google/api/http.upb.h b/src/core/ext/upb-generated/google/api/http.upb.h index e33a97a4149..d3a5d1a3e6b 100644 --- a/src/core/ext/upb-generated/google/api/http.upb.h +++ b/src/core/ext/upb-generated/google/api/http.upb.h @@ -44,8 +44,9 @@ UPB_INLINE char *google_api_Http_serialize(const google_api_Http *msg, upb_arena return upb_encode(msg, &google_api_Http_msginit, arena, len); } +UPB_INLINE bool google_api_Http_has_rules(const google_api_Http *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_api_HttpRule* const* google_api_Http_rules(const google_api_Http *msg, size_t *len) { return (const google_api_HttpRule* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } -UPB_INLINE bool google_api_Http_fully_decode_reserved_expansion(const google_api_Http *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool google_api_Http_fully_decode_reserved_expansion(const google_api_Http *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE google_api_HttpRule** google_api_Http_mutable_rules(google_api_Http *msg, size_t *len) { return (google_api_HttpRule**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -61,7 +62,7 @@ UPB_INLINE struct google_api_HttpRule* google_api_Http_add_rules(google_api_Http return sub; } UPB_INLINE void google_api_Http_set_fully_decode_reserved_expansion(google_api_Http *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* google.api.HttpRule */ @@ -87,9 +88,9 @@ typedef enum { google_api_HttpRule_pattern_custom = 8, google_api_HttpRule_pattern_NOT_SET = 0 } google_api_HttpRule_pattern_oneofcases; -UPB_INLINE google_api_HttpRule_pattern_oneofcases google_api_HttpRule_pattern_case(const google_api_HttpRule* msg) { return (google_api_HttpRule_pattern_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(36, 72)); } +UPB_INLINE google_api_HttpRule_pattern_oneofcases google_api_HttpRule_pattern_case(const google_api_HttpRule* msg) { return (google_api_HttpRule_pattern_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 72), int32_t); } -UPB_INLINE upb_strview google_api_HttpRule_selector(const google_api_HttpRule *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview google_api_HttpRule_selector(const google_api_HttpRule *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool google_api_HttpRule_has_get(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 2); } UPB_INLINE upb_strview google_api_HttpRule_get(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 2, upb_strview_make("", strlen(""))); } UPB_INLINE bool google_api_HttpRule_has_put(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 3); } @@ -100,14 +101,15 @@ UPB_INLINE bool google_api_HttpRule_has_delete(const google_api_HttpRule *msg) { UPB_INLINE upb_strview google_api_HttpRule_delete(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 5, upb_strview_make("", strlen(""))); } UPB_INLINE bool google_api_HttpRule_has_patch(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 6); } UPB_INLINE upb_strview google_api_HttpRule_patch(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 6, upb_strview_make("", strlen(""))); } -UPB_INLINE upb_strview google_api_HttpRule_body(const google_api_HttpRule *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview google_api_HttpRule_body(const google_api_HttpRule *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE bool google_api_HttpRule_has_custom(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 8); } UPB_INLINE const google_api_CustomHttpPattern* google_api_HttpRule_custom(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, const google_api_CustomHttpPattern*, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 8, NULL); } +UPB_INLINE bool google_api_HttpRule_has_additional_bindings(const google_api_HttpRule *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } UPB_INLINE const google_api_HttpRule* const* google_api_HttpRule_additional_bindings(const google_api_HttpRule *msg, size_t *len) { return (const google_api_HttpRule* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } -UPB_INLINE upb_strview google_api_HttpRule_response_body(const google_api_HttpRule *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)); } +UPB_INLINE upb_strview google_api_HttpRule_response_body(const google_api_HttpRule *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } UPB_INLINE void google_api_HttpRule_set_selector(google_api_HttpRule *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void google_api_HttpRule_set_get(google_api_HttpRule *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 2); @@ -125,7 +127,7 @@ UPB_INLINE void google_api_HttpRule_set_patch(google_api_HttpRule *msg, upb_strv UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 6); } UPB_INLINE void google_api_HttpRule_set_body(google_api_HttpRule *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void google_api_HttpRule_set_custom(google_api_HttpRule *msg, google_api_CustomHttpPattern* value) { UPB_WRITE_ONEOF(msg, google_api_CustomHttpPattern*, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 8); @@ -153,7 +155,7 @@ UPB_INLINE struct google_api_HttpRule* google_api_HttpRule_add_additional_bindin return sub; } UPB_INLINE void google_api_HttpRule_set_response_body(google_api_HttpRule *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value; } /* google.api.CustomHttpPattern */ @@ -170,14 +172,14 @@ UPB_INLINE char *google_api_CustomHttpPattern_serialize(const google_api_CustomH return upb_encode(msg, &google_api_CustomHttpPattern_msginit, arena, len); } -UPB_INLINE upb_strview google_api_CustomHttpPattern_kind(const google_api_CustomHttpPattern *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview google_api_CustomHttpPattern_path(const google_api_CustomHttpPattern *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview google_api_CustomHttpPattern_kind(const google_api_CustomHttpPattern *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview google_api_CustomHttpPattern_path(const google_api_CustomHttpPattern *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void google_api_CustomHttpPattern_set_kind(google_api_CustomHttpPattern *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void google_api_CustomHttpPattern_set_path(google_api_CustomHttpPattern *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/google/protobuf/any.upb.h b/src/core/ext/upb-generated/google/protobuf/any.upb.h index 25aff89ecda..bf8394e732c 100644 --- a/src/core/ext/upb-generated/google/protobuf/any.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/any.upb.h @@ -38,14 +38,14 @@ UPB_INLINE char *google_protobuf_Any_serialize(const google_protobuf_Any *msg, u return upb_encode(msg, &google_protobuf_Any_msginit, arena, len); } -UPB_INLINE upb_strview google_protobuf_Any_type_url(const google_protobuf_Any *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview google_protobuf_Any_value(const google_protobuf_Any *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview google_protobuf_Any_type_url(const google_protobuf_Any *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview google_protobuf_Any_value(const google_protobuf_Any *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void google_protobuf_Any_set_type_url(google_protobuf_Any *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void google_protobuf_Any_set_value(google_protobuf_Any *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c index 64fa929b51e..3c7363922e9 100644 --- a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +++ b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c @@ -442,8 +442,8 @@ const upb_msglayout google_protobuf_SourceCodeInfo_msginit = { }; static const upb_msglayout_field google_protobuf_SourceCodeInfo_Location__fields[5] = { - {1, UPB_SIZE(20, 40), 0, 0, 5, 3}, - {2, UPB_SIZE(24, 48), 0, 0, 5, 3}, + {1, UPB_SIZE(20, 40), 0, 0, 5, _UPB_LABEL_PACKED}, + {2, UPB_SIZE(24, 48), 0, 0, 5, _UPB_LABEL_PACKED}, {3, UPB_SIZE(4, 8), 1, 0, 9, 1}, {4, UPB_SIZE(12, 24), 2, 0, 9, 1}, {6, UPB_SIZE(28, 56), 0, 0, 9, 3}, @@ -470,7 +470,7 @@ const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit = { }; static const upb_msglayout_field google_protobuf_GeneratedCodeInfo_Annotation__fields[4] = { - {1, UPB_SIZE(20, 32), 0, 0, 5, 3}, + {1, UPB_SIZE(20, 32), 0, 0, 5, _UPB_LABEL_PACKED}, {2, UPB_SIZE(12, 16), 3, 0, 9, 1}, {3, UPB_SIZE(4, 4), 1, 0, 5, 1}, {4, UPB_SIZE(8, 8), 2, 0, 5, 1}, diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h index eef1dc2fcdc..5316dd30516 100644 --- a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h @@ -167,6 +167,7 @@ UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protob return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len); } +UPB_INLINE bool google_protobuf_FileDescriptorSet_has_file(const google_protobuf_FileDescriptorSet *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_FileDescriptorProto* const* google_protobuf_FileDescriptorSet_file(const google_protobuf_FileDescriptorSet *msg, size_t *len) { return (const google_protobuf_FileDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_mutable_file(google_protobuf_FileDescriptorSet *msg, size_t *len) { @@ -198,30 +199,34 @@ UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_prot } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE upb_strview const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_FileDescriptorProto_message_type(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_enum_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_FileDescriptorProto_enum_type(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); } UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_FileOptions*, UPB_SIZE(28, 56)); } +UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_FileOptions*); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_SourceCodeInfo*, UPB_SIZE(32, 64)); } +UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_protobuf_SourceCodeInfo*); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(56, 112), len); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(60, 120), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); } +UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_FileDescriptorProto_set_package(google_protobuf_FileDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value; } UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_mutable_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len); @@ -287,7 +292,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDesc } UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, google_protobuf_FileOptions*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_FileOptions*) = value; } UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FileOptions* sub = (struct google_protobuf_FileOptions*)google_protobuf_FileDescriptorProto_options(msg); @@ -300,7 +305,7 @@ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorPro } UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, google_protobuf_SourceCodeInfo*, UPB_SIZE(32, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_protobuf_SourceCodeInfo*) = value; } UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_SourceCodeInfo* sub = (struct google_protobuf_SourceCodeInfo*)google_protobuf_FileDescriptorProto_source_code_info(msg); @@ -333,7 +338,7 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_p } UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value; } /* google.protobuf.DescriptorProto */ @@ -351,21 +356,28 @@ UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf } UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_nested_type(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const google_protobuf_DescriptorProto* const* google_protobuf_DescriptorProto_nested_type(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_enum_type(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } UPB_INLINE const google_protobuf_EnumDescriptorProto* const* google_protobuf_DescriptorProto_enum_type(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_MessageOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_MessageOptions*); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_reserved_range(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } UPB_INLINE const google_protobuf_DescriptorProto_ReservedRange* const* google_protobuf_DescriptorProto_reserved_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } UPB_INLINE upb_strview const* google_protobuf_DescriptorProto_reserved_name(const google_protobuf_DescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } UPB_INLINE void google_protobuf_DescriptorProto_set_name(google_protobuf_DescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_mutable_field(google_protobuf_DescriptorProto *msg, size_t *len) { return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); @@ -434,7 +446,7 @@ UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_Descript } UPB_INLINE void google_protobuf_DescriptorProto_set_options(google_protobuf_DescriptorProto *msg, google_protobuf_MessageOptions* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, google_protobuf_MessageOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_MessageOptions*) = value; } UPB_INLINE struct google_protobuf_MessageOptions* google_protobuf_DescriptorProto_mutable_options(google_protobuf_DescriptorProto *msg, upb_arena *arena) { struct google_protobuf_MessageOptions* sub = (struct google_protobuf_MessageOptions*)google_protobuf_DescriptorProto_options(msg); @@ -497,23 +509,23 @@ UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return UPB_FIELD_AT(msg, const google_protobuf_ExtensionRangeOptions*, UPB_SIZE(12, 16)); } +UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const google_protobuf_ExtensionRangeOptions*); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_end(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_options(google_protobuf_DescriptorProto_ExtensionRange *msg, google_protobuf_ExtensionRangeOptions* value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, google_protobuf_ExtensionRangeOptions*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), google_protobuf_ExtensionRangeOptions*) = value; } UPB_INLINE struct google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_mutable_options(google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena) { struct google_protobuf_ExtensionRangeOptions* sub = (struct google_protobuf_ExtensionRangeOptions*)google_protobuf_DescriptorProto_ExtensionRange_options(msg); @@ -540,17 +552,17 @@ UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const g } UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_end(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } /* google.protobuf.ExtensionRangeOptions */ @@ -567,6 +579,7 @@ UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_pr return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len); } +UPB_INLINE bool google_protobuf_ExtensionRangeOptions_has_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ExtensionRangeOptions_uninterpreted_option(const google_protobuf_ExtensionRangeOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_mutable_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t *len) { @@ -598,59 +611,59 @@ UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_pro } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 40)); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 56)); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)); } +UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int32_t); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 72)); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 9); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 88)); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), upb_strview); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 11); } -UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_FieldOptions*, UPB_SIZE(76, 120)); } +UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const google_protobuf_FieldOptions*); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)); } +UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), int32_t); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 10); } -UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 104)); } +UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), upb_strview); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(32, 32)); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool); } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 7); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 8); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 9); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 88)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 88), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) { _upb_sethas(msg, 11); - UPB_FIELD_AT(msg, google_protobuf_FieldOptions*, UPB_SIZE(76, 120)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(76, 120), google_protobuf_FieldOptions*) = value; } UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg); @@ -663,15 +676,15 @@ UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorP } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(28, 28)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 28), int32_t) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 10); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 104)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 104), upb_strview) = value; } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, bool, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool) = value; } /* google.protobuf.OneofDescriptorProto */ @@ -689,17 +702,17 @@ UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_pro } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_OneofOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_OneofOptions*); } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_options(google_protobuf_OneofDescriptorProto *msg, google_protobuf_OneofOptions* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, google_protobuf_OneofOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_OneofOptions*) = value; } UPB_INLINE struct google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_mutable_options(google_protobuf_OneofDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_OneofOptions* sub = (struct google_protobuf_OneofOptions*)google_protobuf_OneofDescriptorProto_options(msg); @@ -726,16 +739,18 @@ UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_prot } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_EnumOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_EnumOptions*); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE upb_strview const* google_protobuf_EnumDescriptorProto_reserved_name(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE void google_protobuf_EnumDescriptorProto_set_name(google_protobuf_EnumDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_mutable_value(google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); @@ -752,7 +767,7 @@ UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_Enum } UPB_INLINE void google_protobuf_EnumDescriptorProto_set_options(google_protobuf_EnumDescriptorProto *msg, google_protobuf_EnumOptions* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, google_protobuf_EnumOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_EnumOptions*) = value; } UPB_INLINE struct google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_mutable_options(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_EnumOptions* sub = (struct google_protobuf_EnumOptions*)google_protobuf_EnumDescriptorProto_options(msg); @@ -802,17 +817,17 @@ UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize } UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_end(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } /* google.protobuf.EnumValueDescriptorProto */ @@ -830,23 +845,23 @@ UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } +UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_EnumValueOptions*, UPB_SIZE(16, 24)); } +UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_protobuf_EnumValueOptions*); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, google_protobuf_EnumValueOptions*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), google_protobuf_EnumValueOptions*) = value; } UPB_INLINE struct google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_mutable_options(google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_EnumValueOptions* sub = (struct google_protobuf_EnumValueOptions*)google_protobuf_EnumValueDescriptorProto_options(msg); @@ -873,14 +888,15 @@ UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_p } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len) { return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_ServiceOptions*, UPB_SIZE(12, 24)); } +UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_ServiceOptions*); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_mutable_method(google_protobuf_ServiceDescriptorProto *msg, size_t *len) { return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); @@ -897,7 +913,7 @@ UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_Service } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_options(google_protobuf_ServiceDescriptorProto *msg, google_protobuf_ServiceOptions* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, google_protobuf_ServiceOptions*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_protobuf_ServiceOptions*) = value; } UPB_INLINE struct google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_mutable_options(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_ServiceOptions* sub = (struct google_protobuf_ServiceOptions*)google_protobuf_ServiceDescriptorProto_options(msg); @@ -924,33 +940,33 @@ UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_pr } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)); } +UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, const google_protobuf_MethodOptions*, UPB_SIZE(28, 56)); } +UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_MethodOptions*); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, google_protobuf_MethodOptions*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_MethodOptions*) = value; } UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_arena *arena) { struct google_protobuf_MethodOptions* sub = (struct google_protobuf_MethodOptions*)google_protobuf_MethodDescriptorProto_options(msg); @@ -963,11 +979,11 @@ UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescripto } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } /* google.protobuf.FileOptions */ @@ -985,126 +1001,127 @@ UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_Fil } UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 11); } -UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 12); } -UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); } +UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 13); } -UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 64)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)); } +UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)); } +UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)); } +UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)); } +UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 7); } -UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)); } +UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 8); } -UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)); } +UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 9); } -UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)); } +UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 14); } -UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 80)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 15); } -UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 96)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 16); } -UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 112)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 17); } -UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 128)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 18); } -UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 144)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 144), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 10); } -UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } +UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 19); } -UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(92, 160)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 160), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 20); } -UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(100, 176)); } +UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 176), upb_strview); } +UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 192)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(108, 192), len); } UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 11); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(28, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 12); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(36, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 13); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(44, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(17, 17)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, bool, UPB_SIZE(18, 18)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, bool, UPB_SIZE(19, 19)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, bool, UPB_SIZE(20, 20)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 7); - UPB_FIELD_AT(msg, bool, UPB_SIZE(21, 21)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 8); - UPB_FIELD_AT(msg, bool, UPB_SIZE(22, 22)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 9); - UPB_FIELD_AT(msg, bool, UPB_SIZE(23, 23)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 14); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(52, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(52, 80), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 15); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 16); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 112), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 17); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(76, 128), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 18); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 144)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(84, 144), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) { _upb_sethas(msg, 10); - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value; } UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 19); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(92, 160)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(92, 160), upb_strview) = value; } UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_strview value) { _upb_sethas(msg, 20); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(100, 176)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(100, 176), upb_strview) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 192), len); @@ -1135,30 +1152,31 @@ UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_ } UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); } +UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); } UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); } +UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } +UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const google_protobuf_MessageOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); } UPB_INLINE void google_protobuf_MessageOptions_set_message_set_wire_format(google_protobuf_MessageOptions *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void google_protobuf_MessageOptions_set_no_standard_descriptor_accessor(google_protobuf_MessageOptions *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } UPB_INLINE void google_protobuf_MessageOptions_set_deprecated(google_protobuf_MessageOptions *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value; } UPB_INLINE void google_protobuf_MessageOptions_set_map_entry(google_protobuf_MessageOptions *msg, bool value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_mutable_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); @@ -1189,42 +1207,43 @@ UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_Fi } UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } +UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)); } +UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); } UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)); } +UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); } UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)); } +UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool); } +UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 32)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, bool, UPB_SIZE(25, 25)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, bool, UPB_SIZE(26, 26)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, bool, UPB_SIZE(27, 27)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len); @@ -1254,6 +1273,7 @@ UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_On return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len); } +UPB_INLINE bool google_protobuf_OneofOptions_has_uninterpreted_option(const google_protobuf_OneofOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_OneofOptions_uninterpreted_option(const google_protobuf_OneofOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mutable_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t *len) { @@ -1285,18 +1305,19 @@ UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_Enu } UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } +UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const google_protobuf_EnumOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void google_protobuf_EnumOptions_set_allow_alias(google_protobuf_EnumOptions *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void google_protobuf_EnumOptions_set_deprecated(google_protobuf_EnumOptions *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mutable_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -1327,12 +1348,13 @@ UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobu } UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } +UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const google_protobuf_EnumValueOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void google_protobuf_EnumValueOptions_set_deprecated(google_protobuf_EnumValueOptions *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_mutable_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -1363,12 +1385,13 @@ UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ } UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } +UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const google_protobuf_ServiceOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE void google_protobuf_ServiceOptions_set_deprecated(google_protobuf_ServiceOptions *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_mutable_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -1399,18 +1422,19 @@ UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_M } UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)); } +UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } +UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); } UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value; } UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len) { return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len); @@ -1440,19 +1464,20 @@ UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_prot return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); } UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(56, 80), len); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); } +UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } +UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)); } +UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); } +UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); } UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); } +UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len) { return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 80), len); @@ -1469,27 +1494,27 @@ UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_ } UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_strview value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_strview value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_set_aggregate_value(google_protobuf_UninterpretedOption *msg, upb_strview value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview) = value; } /* google.protobuf.UninterpretedOption.NamePart */ @@ -1507,17 +1532,17 @@ UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const go } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } /* google.protobuf.SourceCodeInfo */ @@ -1534,6 +1559,7 @@ UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_ return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len); } +UPB_INLINE bool google_protobuf_SourceCodeInfo_has_location(const google_protobuf_SourceCodeInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_SourceCodeInfo_Location* const* google_protobuf_SourceCodeInfo_location(const google_protobuf_SourceCodeInfo *msg, size_t *len) { return (const google_protobuf_SourceCodeInfo_Location* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_mutable_location(google_protobuf_SourceCodeInfo *msg, size_t *len) { @@ -1567,9 +1593,9 @@ UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_ UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)); } +UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE upb_strview const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { @@ -1594,11 +1620,11 @@ UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_trailing_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value; } UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_mutable_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len); @@ -1625,6 +1651,7 @@ UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protob return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len); } +UPB_INLINE bool google_protobuf_GeneratedCodeInfo_has_annotation(const google_protobuf_GeneratedCodeInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_GeneratedCodeInfo_Annotation* const* google_protobuf_GeneratedCodeInfo_annotation(const google_protobuf_GeneratedCodeInfo *msg, size_t *len) { return (const google_protobuf_GeneratedCodeInfo_Annotation* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_mutable_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t *len) { @@ -1657,11 +1684,11 @@ UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const go UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } +UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len); @@ -1675,15 +1702,15 @@ UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_pro } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value; } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/google/protobuf/duration.upb.h b/src/core/ext/upb-generated/google/protobuf/duration.upb.h index 0ebcce3e498..f3fa03591c4 100644 --- a/src/core/ext/upb-generated/google/protobuf/duration.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/duration.upb.h @@ -38,14 +38,14 @@ UPB_INLINE char *google_protobuf_Duration_serialize(const google_protobuf_Durati return upb_encode(msg, &google_protobuf_Duration_msginit, arena, len); } -UPB_INLINE int64_t google_protobuf_Duration_seconds(const google_protobuf_Duration *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } -UPB_INLINE int32_t google_protobuf_Duration_nanos(const google_protobuf_Duration *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int64_t google_protobuf_Duration_seconds(const google_protobuf_Duration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } +UPB_INLINE int32_t google_protobuf_Duration_nanos(const google_protobuf_Duration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_Duration_set_seconds(google_protobuf_Duration *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } UPB_INLINE void google_protobuf_Duration_set_nanos(google_protobuf_Duration *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upb.c b/src/core/ext/upb-generated/google/protobuf/struct.upb.c index a74fb7d7980..a896d1bacf7 100644 --- a/src/core/ext/upb-generated/google/protobuf/struct.upb.c +++ b/src/core/ext/upb-generated/google/protobuf/struct.upb.c @@ -17,7 +17,7 @@ static const upb_msglayout *const google_protobuf_Struct_submsgs[1] = { }; static const upb_msglayout_field google_protobuf_Struct__fields[1] = { - {1, UPB_SIZE(0, 0), 0, 0, 11, 4}, + {1, UPB_SIZE(0, 0), 0, 0, 11, _UPB_LABEL_MAP}, }; const upb_msglayout google_protobuf_Struct_msginit = { @@ -47,12 +47,12 @@ static const upb_msglayout *const google_protobuf_Value_submsgs[2] = { }; static const upb_msglayout_field google_protobuf_Value__fields[6] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 14, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 1, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 8, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 1, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 14, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 1, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 8, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 1, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 11, 1}, }; const upb_msglayout google_protobuf_Value_msginit = { diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upb.h b/src/core/ext/upb-generated/google/protobuf/struct.upb.h index 2b9609010d3..9e291e16ab8 100644 --- a/src/core/ext/upb-generated/google/protobuf/struct.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/struct.upb.h @@ -51,6 +51,7 @@ UPB_INLINE char *google_protobuf_Struct_serialize(const google_protobuf_Struct * return upb_encode(msg, &google_protobuf_Struct_msginit, arena, len); } +UPB_INLINE bool google_protobuf_Struct_has_fields(const google_protobuf_Struct *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE size_t google_protobuf_Struct_fields_size(const google_protobuf_Struct *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); } UPB_INLINE bool google_protobuf_Struct_fields_get(const google_protobuf_Struct *msg, upb_strview key, google_protobuf_Value* *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, sizeof(*val)); } UPB_INLINE const google_protobuf_Struct_FieldsEntry* google_protobuf_Struct_fields_next(const google_protobuf_Struct *msg, size_t* iter) { return (const google_protobuf_Struct_FieldsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } @@ -67,6 +68,7 @@ UPB_INLINE upb_strview google_protobuf_Struct_FieldsEntry_key(const google_proto _upb_msg_map_key(msg, &ret, 0); return ret; } +UPB_INLINE bool google_protobuf_Struct_FieldsEntry_has_value(const google_protobuf_Struct_FieldsEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const google_protobuf_Value* google_protobuf_Struct_FieldsEntry_value(const google_protobuf_Struct_FieldsEntry *msg) { google_protobuf_Value* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -100,7 +102,7 @@ typedef enum { google_protobuf_Value_kind_list_value = 6, google_protobuf_Value_kind_NOT_SET = 0 } google_protobuf_Value_kind_oneofcases; -UPB_INLINE google_protobuf_Value_kind_oneofcases google_protobuf_Value_kind_case(const google_protobuf_Value* msg) { return (google_protobuf_Value_kind_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } +UPB_INLINE google_protobuf_Value_kind_oneofcases google_protobuf_Value_kind_case(const google_protobuf_Value* msg) { return (google_protobuf_Value_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } UPB_INLINE bool google_protobuf_Value_has_null_value(const google_protobuf_Value *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } UPB_INLINE int32_t google_protobuf_Value_null_value(const google_protobuf_Value *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, google_protobuf_NULL_VALUE); } @@ -166,6 +168,7 @@ UPB_INLINE char *google_protobuf_ListValue_serialize(const google_protobuf_ListV return upb_encode(msg, &google_protobuf_ListValue_msginit, arena, len); } +UPB_INLINE bool google_protobuf_ListValue_has_values(const google_protobuf_ListValue *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_protobuf_Value* const* google_protobuf_ListValue_values(const google_protobuf_ListValue *msg, size_t *len) { return (const google_protobuf_Value* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_protobuf_Value** google_protobuf_ListValue_mutable_values(google_protobuf_ListValue *msg, size_t *len) { diff --git a/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h b/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h index 7d4b1bcb0af..f5166de4d5d 100644 --- a/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h @@ -38,14 +38,14 @@ UPB_INLINE char *google_protobuf_Timestamp_serialize(const google_protobuf_Times return upb_encode(msg, &google_protobuf_Timestamp_msginit, arena, len); } -UPB_INLINE int64_t google_protobuf_Timestamp_seconds(const google_protobuf_Timestamp *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } -UPB_INLINE int32_t google_protobuf_Timestamp_nanos(const google_protobuf_Timestamp *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int64_t google_protobuf_Timestamp_seconds(const google_protobuf_Timestamp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } +UPB_INLINE int32_t google_protobuf_Timestamp_nanos(const google_protobuf_Timestamp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_Timestamp_set_seconds(google_protobuf_Timestamp *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } UPB_INLINE void google_protobuf_Timestamp_set_nanos(google_protobuf_Timestamp *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h b/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h index d59457f2def..761eeebdd64 100644 --- a/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h @@ -62,10 +62,10 @@ UPB_INLINE char *google_protobuf_DoubleValue_serialize(const google_protobuf_Dou return upb_encode(msg, &google_protobuf_DoubleValue_msginit, arena, len); } -UPB_INLINE double google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } +UPB_INLINE double google_protobuf_DoubleValue_value(const google_protobuf_DoubleValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); } UPB_INLINE void google_protobuf_DoubleValue_set_value(google_protobuf_DoubleValue *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value; } /* google.protobuf.FloatValue */ @@ -82,10 +82,10 @@ UPB_INLINE char *google_protobuf_FloatValue_serialize(const google_protobuf_Floa return upb_encode(msg, &google_protobuf_FloatValue_msginit, arena, len); } -UPB_INLINE float google_protobuf_FloatValue_value(const google_protobuf_FloatValue *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(0, 0)); } +UPB_INLINE float google_protobuf_FloatValue_value(const google_protobuf_FloatValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), float); } UPB_INLINE void google_protobuf_FloatValue_set_value(google_protobuf_FloatValue *msg, float value) { - UPB_FIELD_AT(msg, float, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), float) = value; } /* google.protobuf.Int64Value */ @@ -102,10 +102,10 @@ UPB_INLINE char *google_protobuf_Int64Value_serialize(const google_protobuf_Int6 return upb_encode(msg, &google_protobuf_Int64Value_msginit, arena, len); } -UPB_INLINE int64_t google_protobuf_Int64Value_value(const google_protobuf_Int64Value *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } +UPB_INLINE int64_t google_protobuf_Int64Value_value(const google_protobuf_Int64Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } UPB_INLINE void google_protobuf_Int64Value_set_value(google_protobuf_Int64Value *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } /* google.protobuf.UInt64Value */ @@ -122,10 +122,10 @@ UPB_INLINE char *google_protobuf_UInt64Value_serialize(const google_protobuf_UIn return upb_encode(msg, &google_protobuf_UInt64Value_msginit, arena, len); } -UPB_INLINE uint64_t google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)); } +UPB_INLINE uint64_t google_protobuf_UInt64Value_value(const google_protobuf_UInt64Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); } UPB_INLINE void google_protobuf_UInt64Value_set_value(google_protobuf_UInt64Value *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value; } /* google.protobuf.Int32Value */ @@ -142,10 +142,10 @@ UPB_INLINE char *google_protobuf_Int32Value_serialize(const google_protobuf_Int3 return upb_encode(msg, &google_protobuf_Int32Value_msginit, arena, len); } -UPB_INLINE int32_t google_protobuf_Int32Value_value(const google_protobuf_Int32Value *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t google_protobuf_Int32Value_value(const google_protobuf_Int32Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void google_protobuf_Int32Value_set_value(google_protobuf_Int32Value *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } /* google.protobuf.UInt32Value */ @@ -162,10 +162,10 @@ UPB_INLINE char *google_protobuf_UInt32Value_serialize(const google_protobuf_UIn return upb_encode(msg, &google_protobuf_UInt32Value_msginit, arena, len); } -UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } +UPB_INLINE uint32_t google_protobuf_UInt32Value_value(const google_protobuf_UInt32Value *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } UPB_INLINE void google_protobuf_UInt32Value_set_value(google_protobuf_UInt32Value *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } /* google.protobuf.BoolValue */ @@ -182,10 +182,10 @@ UPB_INLINE char *google_protobuf_BoolValue_serialize(const google_protobuf_BoolV return upb_encode(msg, &google_protobuf_BoolValue_msginit, arena, len); } -UPB_INLINE bool google_protobuf_BoolValue_value(const google_protobuf_BoolValue *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool google_protobuf_BoolValue_value(const google_protobuf_BoolValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void google_protobuf_BoolValue_set_value(google_protobuf_BoolValue *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* google.protobuf.StringValue */ @@ -202,10 +202,10 @@ UPB_INLINE char *google_protobuf_StringValue_serialize(const google_protobuf_Str return upb_encode(msg, &google_protobuf_StringValue_msginit, arena, len); } -UPB_INLINE upb_strview google_protobuf_StringValue_value(const google_protobuf_StringValue *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview google_protobuf_StringValue_value(const google_protobuf_StringValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void google_protobuf_StringValue_set_value(google_protobuf_StringValue *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* google.protobuf.BytesValue */ @@ -222,10 +222,10 @@ UPB_INLINE char *google_protobuf_BytesValue_serialize(const google_protobuf_Byte return upb_encode(msg, &google_protobuf_BytesValue_msginit, arena, len); } -UPB_INLINE upb_strview google_protobuf_BytesValue_value(const google_protobuf_BytesValue *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview google_protobuf_BytesValue_value(const google_protobuf_BytesValue *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void google_protobuf_BytesValue_set_value(google_protobuf_BytesValue *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/google/rpc/status.upb.h b/src/core/ext/upb-generated/google/rpc/status.upb.h index 3a61d726440..2c5fb02f7d9 100644 --- a/src/core/ext/upb-generated/google/rpc/status.upb.h +++ b/src/core/ext/upb-generated/google/rpc/status.upb.h @@ -40,15 +40,16 @@ UPB_INLINE char *google_rpc_Status_serialize(const google_rpc_Status *msg, upb_a return upb_encode(msg, &google_rpc_Status_msginit, arena, len); } -UPB_INLINE int32_t google_rpc_Status_code(const google_rpc_Status *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview google_rpc_Status_message(const google_rpc_Status *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE int32_t google_rpc_Status_code(const google_rpc_Status *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE upb_strview google_rpc_Status_message(const google_rpc_Status *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool google_rpc_Status_has_details(const google_rpc_Status *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const struct google_protobuf_Any* const* google_rpc_Status_details(const google_rpc_Status *msg, size_t *len) { return (const struct google_protobuf_Any* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE void google_rpc_Status_set_code(google_rpc_Status *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void google_rpc_Status_set_message(google_rpc_Status *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE struct google_protobuf_Any** google_rpc_Status_mutable_details(google_rpc_Status *msg, size_t *len) { return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c index 6da40eeadfd..6c917ad9f20 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c @@ -25,7 +25,7 @@ static const upb_msglayout_field grpc_gcp_AltsContext__fields[7] = { {4, UPB_SIZE(24, 40), 0, 0, 9, 1}, {5, UPB_SIZE(32, 56), 0, 0, 9, 1}, {6, UPB_SIZE(40, 72), 0, 1, 11, 1}, - {7, UPB_SIZE(44, 80), 0, 0, 11, 4}, + {7, UPB_SIZE(44, 80), 0, 0, 11, _UPB_LABEL_MAP}, }; const upb_msglayout grpc_gcp_AltsContext_msginit = { diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h index 44534b12a3b..33c1b2f160a 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h @@ -43,33 +43,35 @@ UPB_INLINE char *grpc_gcp_AltsContext_serialize(const grpc_gcp_AltsContext *msg, return upb_encode(msg, &grpc_gcp_AltsContext_msginit, arena, len); } -UPB_INLINE upb_strview grpc_gcp_AltsContext_application_protocol(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE upb_strview grpc_gcp_AltsContext_record_protocol(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); } -UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview grpc_gcp_AltsContext_peer_service_account(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 40)); } -UPB_INLINE upb_strview grpc_gcp_AltsContext_local_service_account(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 56)); } -UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return UPB_FIELD_AT(msg, const struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(40, 72)); } +UPB_INLINE upb_strview grpc_gcp_AltsContext_application_protocol(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE upb_strview grpc_gcp_AltsContext_record_protocol(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); } +UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE upb_strview grpc_gcp_AltsContext_peer_service_account(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview); } +UPB_INLINE upb_strview grpc_gcp_AltsContext_local_service_account(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), upb_strview); } +UPB_INLINE bool grpc_gcp_AltsContext_has_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); } +UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct grpc_gcp_RpcProtocolVersions*); } +UPB_INLINE bool grpc_gcp_AltsContext_has_peer_attributes(const grpc_gcp_AltsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); } UPB_INLINE size_t grpc_gcp_AltsContext_peer_attributes_size(const grpc_gcp_AltsContext *msg) {return _upb_msg_map_size(msg, UPB_SIZE(44, 80)); } UPB_INLINE bool grpc_gcp_AltsContext_peer_attributes_get(const grpc_gcp_AltsContext *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(44, 80), &key, 0, val, 0); } UPB_INLINE const grpc_gcp_AltsContext_PeerAttributesEntry* grpc_gcp_AltsContext_peer_attributes_next(const grpc_gcp_AltsContext *msg, size_t* iter) { return (const grpc_gcp_AltsContext_PeerAttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 80), iter); } UPB_INLINE void grpc_gcp_AltsContext_set_application_protocol(grpc_gcp_AltsContext *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void grpc_gcp_AltsContext_set_record_protocol(grpc_gcp_AltsContext *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value; } UPB_INLINE void grpc_gcp_AltsContext_set_security_level(grpc_gcp_AltsContext *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void grpc_gcp_AltsContext_set_peer_service_account(grpc_gcp_AltsContext *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview) = value; } UPB_INLINE void grpc_gcp_AltsContext_set_local_service_account(grpc_gcp_AltsContext *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 56), upb_strview) = value; } UPB_INLINE void grpc_gcp_AltsContext_set_peer_rpc_versions(grpc_gcp_AltsContext *msg, struct grpc_gcp_RpcProtocolVersions* value) { - UPB_FIELD_AT(msg, struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(40, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct grpc_gcp_RpcProtocolVersions*) = value; } UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_mutable_peer_rpc_versions(grpc_gcp_AltsContext *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_AltsContext_peer_rpc_versions(msg); diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c index cce3599f791..989b36818fe 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c @@ -30,9 +30,9 @@ static const upb_msglayout *const grpc_gcp_Identity_submsgs[1] = { }; static const upb_msglayout_field grpc_gcp_Identity__fields[3] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, - {2, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, - {3, UPB_SIZE(0, 0), 0, 0, 11, 4}, + {1, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, + {2, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, + {3, UPB_SIZE(0, 0), 0, 0, 11, _UPB_LABEL_MAP}, }; const upb_msglayout grpc_gcp_Identity_msginit = { @@ -100,7 +100,7 @@ static const upb_msglayout *const grpc_gcp_StartServerHandshakeReq_submsgs[4] = static const upb_msglayout_field grpc_gcp_StartServerHandshakeReq__fields[7] = { {1, UPB_SIZE(24, 48), 0, 0, 9, 3}, - {2, UPB_SIZE(28, 56), 0, 2, 11, 4}, + {2, UPB_SIZE(28, 56), 0, 2, 11, _UPB_LABEL_MAP}, {3, UPB_SIZE(4, 8), 0, 0, 12, 1}, {4, UPB_SIZE(12, 24), 0, 0, 11, 1}, {5, UPB_SIZE(16, 32), 0, 0, 11, 1}, @@ -146,9 +146,9 @@ static const upb_msglayout *const grpc_gcp_HandshakerReq_submsgs[3] = { }; static const upb_msglayout_field grpc_gcp_HandshakerReq__fields[3] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout grpc_gcp_HandshakerReq_msginit = { diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h index 2291d29d974..f113161da61 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h @@ -85,18 +85,18 @@ UPB_INLINE char *grpc_gcp_Endpoint_serialize(const grpc_gcp_Endpoint *msg, upb_a return upb_encode(msg, &grpc_gcp_Endpoint_msginit, arena, len); } -UPB_INLINE upb_strview grpc_gcp_Endpoint_ip_address(const grpc_gcp_Endpoint *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } -UPB_INLINE int32_t grpc_gcp_Endpoint_port(const grpc_gcp_Endpoint *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } -UPB_INLINE int32_t grpc_gcp_Endpoint_protocol(const grpc_gcp_Endpoint *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview grpc_gcp_Endpoint_ip_address(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } +UPB_INLINE int32_t grpc_gcp_Endpoint_port(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } +UPB_INLINE int32_t grpc_gcp_Endpoint_protocol(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void grpc_gcp_Endpoint_set_ip_address(grpc_gcp_Endpoint *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value; } UPB_INLINE void grpc_gcp_Endpoint_set_port(grpc_gcp_Endpoint *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void grpc_gcp_Endpoint_set_protocol(grpc_gcp_Endpoint *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } /* grpc.gcp.Identity */ @@ -118,12 +118,13 @@ typedef enum { grpc_gcp_Identity_identity_oneof_hostname = 2, grpc_gcp_Identity_identity_oneof_NOT_SET = 0 } grpc_gcp_Identity_identity_oneof_oneofcases; -UPB_INLINE grpc_gcp_Identity_identity_oneof_oneofcases grpc_gcp_Identity_identity_oneof_case(const grpc_gcp_Identity* msg) { return (grpc_gcp_Identity_identity_oneof_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE grpc_gcp_Identity_identity_oneof_oneofcases grpc_gcp_Identity_identity_oneof_case(const grpc_gcp_Identity* msg) { return (grpc_gcp_Identity_identity_oneof_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE bool grpc_gcp_Identity_has_service_account(const grpc_gcp_Identity *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } UPB_INLINE upb_strview grpc_gcp_Identity_service_account(const grpc_gcp_Identity *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 1, upb_strview_make("", strlen(""))); } UPB_INLINE bool grpc_gcp_Identity_has_hostname(const grpc_gcp_Identity *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } UPB_INLINE upb_strview grpc_gcp_Identity_hostname(const grpc_gcp_Identity *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 2, upb_strview_make("", strlen(""))); } +UPB_INLINE bool grpc_gcp_Identity_has_attributes(const grpc_gcp_Identity *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE size_t grpc_gcp_Identity_attributes_size(const grpc_gcp_Identity *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); } UPB_INLINE bool grpc_gcp_Identity_attributes_get(const grpc_gcp_Identity *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, 0); } UPB_INLINE const grpc_gcp_Identity_AttributesEntry* grpc_gcp_Identity_attributes_next(const grpc_gcp_Identity *msg, size_t* iter) { return (const grpc_gcp_Identity_AttributesEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); } @@ -170,19 +171,24 @@ UPB_INLINE char *grpc_gcp_StartClientHandshakeReq_serialize(const grpc_gcp_Start return upb_encode(msg, &grpc_gcp_StartClientHandshakeReq_msginit, arena, len); } -UPB_INLINE int32_t grpc_gcp_StartClientHandshakeReq_handshake_security_protocol(const grpc_gcp_StartClientHandshakeReq *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t grpc_gcp_StartClientHandshakeReq_handshake_security_protocol(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE upb_strview const* grpc_gcp_StartClientHandshakeReq_application_protocols(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); } UPB_INLINE upb_strview const* grpc_gcp_StartClientHandshakeReq_record_protocols(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); } +UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_target_identities(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); } UPB_INLINE const grpc_gcp_Identity* const* grpc_gcp_StartClientHandshakeReq_target_identities(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (const grpc_gcp_Identity* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); } -UPB_INLINE const grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Identity*, UPB_SIZE(20, 32)); } -UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Endpoint*, UPB_SIZE(24, 40)); } -UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Endpoint*, UPB_SIZE(28, 48)); } -UPB_INLINE upb_strview grpc_gcp_StartClientHandshakeReq_target_name(const grpc_gcp_StartClientHandshakeReq *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } -UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return UPB_FIELD_AT(msg, const struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(32, 56)); } -UPB_INLINE uint32_t grpc_gcp_StartClientHandshakeReq_max_frame_size(const grpc_gcp_StartClientHandshakeReq *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } +UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); } +UPB_INLINE const grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const grpc_gcp_Identity*); } +UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); } +UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const grpc_gcp_Endpoint*); } +UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); } +UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const grpc_gcp_Endpoint*); } +UPB_INLINE upb_strview grpc_gcp_StartClientHandshakeReq_target_name(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } +UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); } +UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct grpc_gcp_RpcProtocolVersions*); } +UPB_INLINE uint32_t grpc_gcp_StartClientHandshakeReq_max_frame_size(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_handshake_security_protocol(grpc_gcp_StartClientHandshakeReq *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len); @@ -218,7 +224,7 @@ UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_add_target return sub; } UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_identity(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Identity* value) { - UPB_FIELD_AT(msg, grpc_gcp_Identity*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_Identity*) = value; } UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_mutable_local_identity(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_StartClientHandshakeReq_local_identity(msg); @@ -230,7 +236,7 @@ UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_mutable_lo return sub; } UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Endpoint* value) { - UPB_FIELD_AT(msg, grpc_gcp_Endpoint*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), grpc_gcp_Endpoint*) = value; } UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartClientHandshakeReq_local_endpoint(msg); @@ -242,7 +248,7 @@ UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_lo return sub; } UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Endpoint* value) { - UPB_FIELD_AT(msg, grpc_gcp_Endpoint*, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), grpc_gcp_Endpoint*) = value; } UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartClientHandshakeReq_remote_endpoint(msg); @@ -254,10 +260,10 @@ UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_re return sub; } UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_target_name(grpc_gcp_StartClientHandshakeReq *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value; } UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, struct grpc_gcp_RpcProtocolVersions* value) { - UPB_FIELD_AT(msg, struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(32, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct grpc_gcp_RpcProtocolVersions*) = value; } UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_mutable_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartClientHandshakeReq_rpc_versions(msg); @@ -269,7 +275,7 @@ UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq return sub; } UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_max_frame_size(grpc_gcp_StartClientHandshakeReq *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value; } /* grpc.gcp.ServerHandshakeParameters */ @@ -287,6 +293,7 @@ UPB_INLINE char *grpc_gcp_ServerHandshakeParameters_serialize(const grpc_gcp_Ser } UPB_INLINE upb_strview const* grpc_gcp_ServerHandshakeParameters_record_protocols(const grpc_gcp_ServerHandshakeParameters *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } +UPB_INLINE bool grpc_gcp_ServerHandshakeParameters_has_local_identities(const grpc_gcp_ServerHandshakeParameters *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const grpc_gcp_Identity* const* grpc_gcp_ServerHandshakeParameters_local_identities(const grpc_gcp_ServerHandshakeParameters *msg, size_t *len) { return (const grpc_gcp_Identity* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_mutable_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, size_t *len) { @@ -328,14 +335,18 @@ UPB_INLINE char *grpc_gcp_StartServerHandshakeReq_serialize(const grpc_gcp_Start } UPB_INLINE upb_strview const* grpc_gcp_StartServerHandshakeReq_application_protocols(const grpc_gcp_StartServerHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_handshake_parameters(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE size_t grpc_gcp_StartServerHandshakeReq_handshake_parameters_size(const grpc_gcp_StartServerHandshakeReq *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 56)); } UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_get(const grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* *val) { return _upb_msg_map_get(msg, UPB_SIZE(28, 56), &key, sizeof(key), val, sizeof(*val)); } UPB_INLINE const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_next(const grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); } -UPB_INLINE upb_strview grpc_gcp_StartServerHandshakeReq_in_bytes(const grpc_gcp_StartServerHandshakeReq *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } -UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Endpoint*, UPB_SIZE(12, 24)); } -UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Endpoint*, UPB_SIZE(16, 32)); } -UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return UPB_FIELD_AT(msg, const struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(20, 40)); } -UPB_INLINE uint32_t grpc_gcp_StartServerHandshakeReq_max_frame_size(const grpc_gcp_StartServerHandshakeReq *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview grpc_gcp_StartServerHandshakeReq_in_bytes(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const grpc_gcp_Endpoint*); } +UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const grpc_gcp_Endpoint*); } +UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct grpc_gcp_RpcProtocolVersions*); } +UPB_INLINE uint32_t grpc_gcp_StartServerHandshakeReq_max_frame_size(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_mutable_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len); @@ -352,10 +363,10 @@ UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_set(grpc_g UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_delete(grpc_gcp_StartServerHandshakeReq *msg, int32_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(28, 56), &key, sizeof(key)); } UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_nextmutable(grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); } UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_in_bytes(grpc_gcp_StartServerHandshakeReq *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, grpc_gcp_Endpoint* value) { - UPB_FIELD_AT(msg, grpc_gcp_Endpoint*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), grpc_gcp_Endpoint*) = value; } UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_local_endpoint(msg); @@ -367,7 +378,7 @@ UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_lo return sub; } UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, grpc_gcp_Endpoint* value) { - UPB_FIELD_AT(msg, grpc_gcp_Endpoint*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), grpc_gcp_Endpoint*) = value; } UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_remote_endpoint(msg); @@ -379,7 +390,7 @@ UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_re return sub; } UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, struct grpc_gcp_RpcProtocolVersions* value) { - UPB_FIELD_AT(msg, struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct grpc_gcp_RpcProtocolVersions*) = value; } UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_mutable_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartServerHandshakeReq_rpc_versions(msg); @@ -391,7 +402,7 @@ UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq return sub; } UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_max_frame_size(grpc_gcp_StartServerHandshakeReq *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } /* grpc.gcp.StartServerHandshakeReq.HandshakeParametersEntry */ @@ -401,6 +412,7 @@ UPB_INLINE int32_t grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_key _upb_msg_map_key(msg, &ret, sizeof(ret)); return ret; } +UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_has_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const grpc_gcp_ServerHandshakeParameters* grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_value(const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry *msg) { grpc_gcp_ServerHandshakeParameters* ret; _upb_msg_map_value(msg, &ret, sizeof(ret)); @@ -425,10 +437,10 @@ UPB_INLINE char *grpc_gcp_NextHandshakeMessageReq_serialize(const grpc_gcp_NextH return upb_encode(msg, &grpc_gcp_NextHandshakeMessageReq_msginit, arena, len); } -UPB_INLINE upb_strview grpc_gcp_NextHandshakeMessageReq_in_bytes(const grpc_gcp_NextHandshakeMessageReq *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview grpc_gcp_NextHandshakeMessageReq_in_bytes(const grpc_gcp_NextHandshakeMessageReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void grpc_gcp_NextHandshakeMessageReq_set_in_bytes(grpc_gcp_NextHandshakeMessageReq *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* grpc.gcp.HandshakerReq */ @@ -451,7 +463,7 @@ typedef enum { grpc_gcp_HandshakerReq_req_oneof_next = 3, grpc_gcp_HandshakerReq_req_oneof_NOT_SET = 0 } grpc_gcp_HandshakerReq_req_oneof_oneofcases; -UPB_INLINE grpc_gcp_HandshakerReq_req_oneof_oneofcases grpc_gcp_HandshakerReq_req_oneof_case(const grpc_gcp_HandshakerReq* msg) { return (grpc_gcp_HandshakerReq_req_oneof_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE grpc_gcp_HandshakerReq_req_oneof_oneofcases grpc_gcp_HandshakerReq_req_oneof_case(const grpc_gcp_HandshakerReq* msg) { return (grpc_gcp_HandshakerReq_req_oneof_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool grpc_gcp_HandshakerReq_has_client_start(const grpc_gcp_HandshakerReq *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const grpc_gcp_StartClientHandshakeReq* grpc_gcp_HandshakerReq_client_start(const grpc_gcp_HandshakerReq *msg) { return UPB_READ_ONEOF(msg, const grpc_gcp_StartClientHandshakeReq*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -511,26 +523,29 @@ UPB_INLINE char *grpc_gcp_HandshakerResult_serialize(const grpc_gcp_HandshakerRe return upb_encode(msg, &grpc_gcp_HandshakerResult_msginit, arena, len); } -UPB_INLINE upb_strview grpc_gcp_HandshakerResult_application_protocol(const grpc_gcp_HandshakerResult *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE upb_strview grpc_gcp_HandshakerResult_record_protocol(const grpc_gcp_HandshakerResult *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); } -UPB_INLINE upb_strview grpc_gcp_HandshakerResult_key_data(const grpc_gcp_HandshakerResult *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 40)); } -UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_peer_identity(const grpc_gcp_HandshakerResult *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Identity*, UPB_SIZE(32, 56)); } -UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_local_identity(const grpc_gcp_HandshakerResult *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_Identity*, UPB_SIZE(36, 64)); } -UPB_INLINE bool grpc_gcp_HandshakerResult_keep_channel_open(const grpc_gcp_HandshakerResult *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); } -UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return UPB_FIELD_AT(msg, const struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(40, 72)); } -UPB_INLINE uint32_t grpc_gcp_HandshakerResult_max_frame_size(const grpc_gcp_HandshakerResult *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview grpc_gcp_HandshakerResult_application_protocol(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE upb_strview grpc_gcp_HandshakerResult_record_protocol(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); } +UPB_INLINE upb_strview grpc_gcp_HandshakerResult_key_data(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview); } +UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); } +UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_peer_identity(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const grpc_gcp_Identity*); } +UPB_INLINE bool grpc_gcp_HandshakerResult_has_local_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); } +UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_local_identity(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const grpc_gcp_Identity*); } +UPB_INLINE bool grpc_gcp_HandshakerResult_keep_channel_open(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } +UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); } +UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct grpc_gcp_RpcProtocolVersions*); } +UPB_INLINE uint32_t grpc_gcp_HandshakerResult_max_frame_size(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } UPB_INLINE void grpc_gcp_HandshakerResult_set_application_protocol(grpc_gcp_HandshakerResult *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void grpc_gcp_HandshakerResult_set_record_protocol(grpc_gcp_HandshakerResult *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value; } UPB_INLINE void grpc_gcp_HandshakerResult_set_key_data(grpc_gcp_HandshakerResult *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview) = value; } UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_identity(grpc_gcp_HandshakerResult *msg, grpc_gcp_Identity* value) { - UPB_FIELD_AT(msg, grpc_gcp_Identity*, UPB_SIZE(32, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 56), grpc_gcp_Identity*) = value; } UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_peer_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) { struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_peer_identity(msg); @@ -542,7 +557,7 @@ UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_peer_iden return sub; } UPB_INLINE void grpc_gcp_HandshakerResult_set_local_identity(grpc_gcp_HandshakerResult *msg, grpc_gcp_Identity* value) { - UPB_FIELD_AT(msg, grpc_gcp_Identity*, UPB_SIZE(36, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(36, 64), grpc_gcp_Identity*) = value; } UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_local_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) { struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_local_identity(msg); @@ -554,10 +569,10 @@ UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_local_ide return sub; } UPB_INLINE void grpc_gcp_HandshakerResult_set_keep_channel_open(grpc_gcp_HandshakerResult *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value; } UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, struct grpc_gcp_RpcProtocolVersions* value) { - UPB_FIELD_AT(msg, struct grpc_gcp_RpcProtocolVersions*, UPB_SIZE(40, 72)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct grpc_gcp_RpcProtocolVersions*) = value; } UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_mutable_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_HandshakerResult_peer_rpc_versions(msg); @@ -569,7 +584,7 @@ UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_mutabl return sub; } UPB_INLINE void grpc_gcp_HandshakerResult_set_max_frame_size(grpc_gcp_HandshakerResult *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } /* grpc.gcp.HandshakerStatus */ @@ -586,14 +601,14 @@ UPB_INLINE char *grpc_gcp_HandshakerStatus_serialize(const grpc_gcp_HandshakerSt return upb_encode(msg, &grpc_gcp_HandshakerStatus_msginit, arena, len); } -UPB_INLINE uint32_t grpc_gcp_HandshakerStatus_code(const grpc_gcp_HandshakerStatus *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview grpc_gcp_HandshakerStatus_details(const grpc_gcp_HandshakerStatus *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } +UPB_INLINE uint32_t grpc_gcp_HandshakerStatus_code(const grpc_gcp_HandshakerStatus *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE upb_strview grpc_gcp_HandshakerStatus_details(const grpc_gcp_HandshakerStatus *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE void grpc_gcp_HandshakerStatus_set_code(grpc_gcp_HandshakerStatus *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void grpc_gcp_HandshakerStatus_set_details(grpc_gcp_HandshakerStatus *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } /* grpc.gcp.HandshakerResp */ @@ -610,19 +625,21 @@ UPB_INLINE char *grpc_gcp_HandshakerResp_serialize(const grpc_gcp_HandshakerResp return upb_encode(msg, &grpc_gcp_HandshakerResp_msginit, arena, len); } -UPB_INLINE upb_strview grpc_gcp_HandshakerResp_out_frames(const grpc_gcp_HandshakerResp *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } -UPB_INLINE uint32_t grpc_gcp_HandshakerResp_bytes_consumed(const grpc_gcp_HandshakerResp *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_result(const grpc_gcp_HandshakerResp *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_HandshakerResult*, UPB_SIZE(12, 24)); } -UPB_INLINE const grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_status(const grpc_gcp_HandshakerResp *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_HandshakerStatus*, UPB_SIZE(16, 32)); } +UPB_INLINE upb_strview grpc_gcp_HandshakerResp_out_frames(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE uint32_t grpc_gcp_HandshakerResp_bytes_consumed(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE bool grpc_gcp_HandshakerResp_has_result(const grpc_gcp_HandshakerResp *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_result(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const grpc_gcp_HandshakerResult*); } +UPB_INLINE bool grpc_gcp_HandshakerResp_has_status(const grpc_gcp_HandshakerResp *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_status(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const grpc_gcp_HandshakerStatus*); } UPB_INLINE void grpc_gcp_HandshakerResp_set_out_frames(grpc_gcp_HandshakerResp *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void grpc_gcp_HandshakerResp_set_bytes_consumed(grpc_gcp_HandshakerResp *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void grpc_gcp_HandshakerResp_set_result(grpc_gcp_HandshakerResp *msg, grpc_gcp_HandshakerResult* value) { - UPB_FIELD_AT(msg, grpc_gcp_HandshakerResult*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), grpc_gcp_HandshakerResult*) = value; } UPB_INLINE struct grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_mutable_result(grpc_gcp_HandshakerResp *msg, upb_arena *arena) { struct grpc_gcp_HandshakerResult* sub = (struct grpc_gcp_HandshakerResult*)grpc_gcp_HandshakerResp_result(msg); @@ -634,7 +651,7 @@ UPB_INLINE struct grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_mutable_res return sub; } UPB_INLINE void grpc_gcp_HandshakerResp_set_status(grpc_gcp_HandshakerResp *msg, grpc_gcp_HandshakerStatus* value) { - UPB_FIELD_AT(msg, grpc_gcp_HandshakerStatus*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), grpc_gcp_HandshakerStatus*) = value; } UPB_INLINE struct grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_mutable_status(grpc_gcp_HandshakerResp *msg, upb_arena *arena) { struct grpc_gcp_HandshakerStatus* sub = (struct grpc_gcp_HandshakerStatus*)grpc_gcp_HandshakerResp_status(msg); diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h index 5e9233b6622..52963988131 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h @@ -47,11 +47,13 @@ UPB_INLINE char *grpc_gcp_RpcProtocolVersions_serialize(const grpc_gcp_RpcProtoc return upb_encode(msg, &grpc_gcp_RpcProtocolVersions_msginit, arena, len); } -UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_RpcProtocolVersions_Version*, UPB_SIZE(0, 0)); } -UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return UPB_FIELD_AT(msg, const grpc_gcp_RpcProtocolVersions_Version*, UPB_SIZE(4, 8)); } +UPB_INLINE bool grpc_gcp_RpcProtocolVersions_has_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const grpc_gcp_RpcProtocolVersions_Version*); } +UPB_INLINE bool grpc_gcp_RpcProtocolVersions_has_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const grpc_gcp_RpcProtocolVersions_Version*); } UPB_INLINE void grpc_gcp_RpcProtocolVersions_set_max_rpc_version(grpc_gcp_RpcProtocolVersions *msg, grpc_gcp_RpcProtocolVersions_Version* value) { - UPB_FIELD_AT(msg, grpc_gcp_RpcProtocolVersions_Version*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), grpc_gcp_RpcProtocolVersions_Version*) = value; } UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_mutable_max_rpc_version(grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions_Version* sub = (struct grpc_gcp_RpcProtocolVersions_Version*)grpc_gcp_RpcProtocolVersions_max_rpc_version(msg); @@ -63,7 +65,7 @@ UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVers return sub; } UPB_INLINE void grpc_gcp_RpcProtocolVersions_set_min_rpc_version(grpc_gcp_RpcProtocolVersions *msg, grpc_gcp_RpcProtocolVersions_Version* value) { - UPB_FIELD_AT(msg, grpc_gcp_RpcProtocolVersions_Version*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), grpc_gcp_RpcProtocolVersions_Version*) = value; } UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_mutable_min_rpc_version(grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena) { struct grpc_gcp_RpcProtocolVersions_Version* sub = (struct grpc_gcp_RpcProtocolVersions_Version*)grpc_gcp_RpcProtocolVersions_min_rpc_version(msg); @@ -89,14 +91,14 @@ UPB_INLINE char *grpc_gcp_RpcProtocolVersions_Version_serialize(const grpc_gcp_R return upb_encode(msg, &grpc_gcp_RpcProtocolVersions_Version_msginit, arena, len); } -UPB_INLINE uint32_t grpc_gcp_RpcProtocolVersions_Version_major(const grpc_gcp_RpcProtocolVersions_Version *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)); } -UPB_INLINE uint32_t grpc_gcp_RpcProtocolVersions_Version_minor(const grpc_gcp_RpcProtocolVersions_Version *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)); } +UPB_INLINE uint32_t grpc_gcp_RpcProtocolVersions_Version_major(const grpc_gcp_RpcProtocolVersions_Version *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); } +UPB_INLINE uint32_t grpc_gcp_RpcProtocolVersions_Version_minor(const grpc_gcp_RpcProtocolVersions_Version *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); } UPB_INLINE void grpc_gcp_RpcProtocolVersions_Version_set_major(grpc_gcp_RpcProtocolVersions_Version *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value; } UPB_INLINE void grpc_gcp_RpcProtocolVersions_Version_set_minor(grpc_gcp_RpcProtocolVersions_Version *msg, uint32_t value) { - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h b/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h index c23a25e2150..d3f6471621f 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h @@ -48,10 +48,10 @@ UPB_INLINE char *grpc_health_v1_HealthCheckRequest_serialize(const grpc_health_v return upb_encode(msg, &grpc_health_v1_HealthCheckRequest_msginit, arena, len); } -UPB_INLINE upb_strview grpc_health_v1_HealthCheckRequest_service(const grpc_health_v1_HealthCheckRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview grpc_health_v1_HealthCheckRequest_service(const grpc_health_v1_HealthCheckRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void grpc_health_v1_HealthCheckRequest_set_service(grpc_health_v1_HealthCheckRequest *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* grpc.health.v1.HealthCheckResponse */ @@ -68,10 +68,10 @@ UPB_INLINE char *grpc_health_v1_HealthCheckResponse_serialize(const grpc_health_ return upb_encode(msg, &grpc_health_v1_HealthCheckResponse_msginit, arena, len); } -UPB_INLINE int32_t grpc_health_v1_HealthCheckResponse_status(const grpc_health_v1_HealthCheckResponse *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE int32_t grpc_health_v1_HealthCheckResponse_status(const grpc_health_v1_HealthCheckResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void grpc_health_v1_HealthCheckResponse_set_status(grpc_health_v1_HealthCheckResponse *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c index 90b7cb7f622..3e20fd7f8e3 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +++ b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c @@ -20,8 +20,8 @@ static const upb_msglayout *const grpc_lb_v1_LoadBalanceRequest_submsgs[2] = { }; static const upb_msglayout_field grpc_lb_v1_LoadBalanceRequest__fields[2] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout grpc_lb_v1_LoadBalanceRequest_msginit = { @@ -78,9 +78,9 @@ static const upb_msglayout *const grpc_lb_v1_LoadBalanceResponse_submsgs[3] = { }; static const upb_msglayout_field grpc_lb_v1_LoadBalanceResponse__fields[3] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, }; const upb_msglayout grpc_lb_v1_LoadBalanceResponse_msginit = { diff --git a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h index c85fccb83f5..2cdb6faf3d2 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h @@ -71,7 +71,7 @@ typedef enum { grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_client_stats = 2, grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_NOT_SET = 0 } grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases; -UPB_INLINE grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_case(const grpc_lb_v1_LoadBalanceRequest* msg) { return (grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_case(const grpc_lb_v1_LoadBalanceRequest* msg) { return (grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const grpc_lb_v1_InitialLoadBalanceRequest* grpc_lb_v1_LoadBalanceRequest_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_InitialLoadBalanceRequest*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -117,10 +117,10 @@ UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceRequest_serialize(const grpc_lb_v1 return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena, len); } -UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceRequest_name(const grpc_lb_v1_InitialLoadBalanceRequest *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceRequest_name(const grpc_lb_v1_InitialLoadBalanceRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void grpc_lb_v1_InitialLoadBalanceRequest_set_name(grpc_lb_v1_InitialLoadBalanceRequest *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* grpc.lb.v1.ClientStatsPerToken */ @@ -137,14 +137,14 @@ UPB_INLINE char *grpc_lb_v1_ClientStatsPerToken_serialize(const grpc_lb_v1_Clien return upb_encode(msg, &grpc_lb_v1_ClientStatsPerToken_msginit, arena, len); } -UPB_INLINE upb_strview grpc_lb_v1_ClientStatsPerToken_load_balance_token(const grpc_lb_v1_ClientStatsPerToken *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE int64_t grpc_lb_v1_ClientStatsPerToken_num_calls(const grpc_lb_v1_ClientStatsPerToken *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview grpc_lb_v1_ClientStatsPerToken_load_balance_token(const grpc_lb_v1_ClientStatsPerToken *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE int64_t grpc_lb_v1_ClientStatsPerToken_num_calls(const grpc_lb_v1_ClientStatsPerToken *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_load_balance_token(grpc_lb_v1_ClientStatsPerToken *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void grpc_lb_v1_ClientStatsPerToken_set_num_calls(grpc_lb_v1_ClientStatsPerToken *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } /* grpc.lb.v1.ClientStats */ @@ -161,15 +161,17 @@ UPB_INLINE char *grpc_lb_v1_ClientStats_serialize(const grpc_lb_v1_ClientStats * return upb_encode(msg, &grpc_lb_v1_ClientStats_msginit, arena, len); } -UPB_INLINE const struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_timestamp(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(32, 32)); } -UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_started(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } -UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } -UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } -UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_known_received(const grpc_lb_v1_ClientStats *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)); } +UPB_INLINE bool grpc_lb_v1_ClientStats_has_timestamp(const grpc_lb_v1_ClientStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 32)); } +UPB_INLINE const struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_timestamp(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), const struct google_protobuf_Timestamp*); } +UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_started(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } +UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } +UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } +UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_known_received(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); } +UPB_INLINE bool grpc_lb_v1_ClientStats_has_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 40)); } UPB_INLINE const grpc_lb_v1_ClientStatsPerToken* const* grpc_lb_v1_ClientStats_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg, size_t *len) { return (const grpc_lb_v1_ClientStatsPerToken* const*)_upb_array_accessor(msg, UPB_SIZE(36, 40), len); } UPB_INLINE void grpc_lb_v1_ClientStats_set_timestamp(grpc_lb_v1_ClientStats *msg, struct google_protobuf_Timestamp* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), struct google_protobuf_Timestamp*) = value; } UPB_INLINE struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_mutable_timestamp(grpc_lb_v1_ClientStats *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)grpc_lb_v1_ClientStats_timestamp(msg); @@ -181,16 +183,16 @@ UPB_INLINE struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_mutable_time return sub; } UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_started(grpc_lb_v1_ClientStats *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished(grpc_lb_v1_ClientStats *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value; } UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_with_client_failed_to_send(grpc_lb_v1_ClientStats *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value; } UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_known_received(grpc_lb_v1_ClientStats *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value; } UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_mutable_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t *len) { return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 40), len); @@ -226,7 +228,7 @@ typedef enum { grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_fallback_response = 3, grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_NOT_SET = 0 } grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases; -UPB_INLINE grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_case(const grpc_lb_v1_LoadBalanceResponse* msg) { return (grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_case(const grpc_lb_v1_LoadBalanceResponse* msg) { return (grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } UPB_INLINE const grpc_lb_v1_InitialLoadBalanceResponse* grpc_lb_v1_LoadBalanceResponse_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_InitialLoadBalanceResponse*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } @@ -286,14 +288,15 @@ UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceResponse_serialize(const grpc_lb_v return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena, len); } -UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool grpc_lb_v1_InitialLoadBalanceResponse_has_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_load_balancer_delegate(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, struct google_protobuf_Duration* value) { - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_mutable_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(msg); @@ -319,6 +322,7 @@ UPB_INLINE char *grpc_lb_v1_ServerList_serialize(const grpc_lb_v1_ServerList *ms return upb_encode(msg, &grpc_lb_v1_ServerList_msginit, arena, len); } +UPB_INLINE bool grpc_lb_v1_ServerList_has_servers(const grpc_lb_v1_ServerList *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const grpc_lb_v1_Server* const* grpc_lb_v1_ServerList_servers(const grpc_lb_v1_ServerList *msg, size_t *len) { return (const grpc_lb_v1_Server* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_mutable_servers(grpc_lb_v1_ServerList *msg, size_t *len) { @@ -349,22 +353,22 @@ UPB_INLINE char *grpc_lb_v1_Server_serialize(const grpc_lb_v1_Server *msg, upb_a return upb_encode(msg, &grpc_lb_v1_Server_msginit, arena, len); } -UPB_INLINE upb_strview grpc_lb_v1_Server_ip_address(const grpc_lb_v1_Server *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)); } -UPB_INLINE int32_t grpc_lb_v1_Server_port(const grpc_lb_v1_Server *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview grpc_lb_v1_Server_load_balance_token(const grpc_lb_v1_Server *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)); } -UPB_INLINE bool grpc_lb_v1_Server_drop(const grpc_lb_v1_Server *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); } +UPB_INLINE upb_strview grpc_lb_v1_Server_ip_address(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } +UPB_INLINE int32_t grpc_lb_v1_Server_port(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE upb_strview grpc_lb_v1_Server_load_balance_token(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); } +UPB_INLINE bool grpc_lb_v1_Server_drop(const grpc_lb_v1_Server *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } UPB_INLINE void grpc_lb_v1_Server_set_ip_address(grpc_lb_v1_Server *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value; } UPB_INLINE void grpc_lb_v1_Server_set_port(grpc_lb_v1_Server *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void grpc_lb_v1_Server_set_load_balance_token(grpc_lb_v1_Server *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value; } UPB_INLINE void grpc_lb_v1_Server_set_drop(grpc_lb_v1_Server *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value; } /* grpc.lb.v1.FallbackResponse */ diff --git a/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h b/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h index 983d864fdb3..d6a3d0cc5b1 100644 --- a/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +++ b/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h @@ -44,10 +44,10 @@ UPB_INLINE char *udpa_annotations_MigrateAnnotation_serialize(const udpa_annotat return upb_encode(msg, &udpa_annotations_MigrateAnnotation_msginit, arena, len); } -UPB_INLINE upb_strview udpa_annotations_MigrateAnnotation_rename(const udpa_annotations_MigrateAnnotation *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview udpa_annotations_MigrateAnnotation_rename(const udpa_annotations_MigrateAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void udpa_annotations_MigrateAnnotation_set_rename(udpa_annotations_MigrateAnnotation *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* udpa.annotations.FieldMigrateAnnotation */ @@ -64,14 +64,14 @@ UPB_INLINE char *udpa_annotations_FieldMigrateAnnotation_serialize(const udpa_an return upb_encode(msg, &udpa_annotations_FieldMigrateAnnotation_msginit, arena, len); } -UPB_INLINE upb_strview udpa_annotations_FieldMigrateAnnotation_rename(const udpa_annotations_FieldMigrateAnnotation *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview udpa_annotations_FieldMigrateAnnotation_oneof_promotion(const udpa_annotations_FieldMigrateAnnotation *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview udpa_annotations_FieldMigrateAnnotation_rename(const udpa_annotations_FieldMigrateAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview udpa_annotations_FieldMigrateAnnotation_oneof_promotion(const udpa_annotations_FieldMigrateAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE void udpa_annotations_FieldMigrateAnnotation_set_rename(udpa_annotations_FieldMigrateAnnotation *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void udpa_annotations_FieldMigrateAnnotation_set_oneof_promotion(udpa_annotations_FieldMigrateAnnotation *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } /* udpa.annotations.FileMigrateAnnotation */ @@ -88,10 +88,10 @@ UPB_INLINE char *udpa_annotations_FileMigrateAnnotation_serialize(const udpa_ann return upb_encode(msg, &udpa_annotations_FileMigrateAnnotation_msginit, arena, len); } -UPB_INLINE upb_strview udpa_annotations_FileMigrateAnnotation_move_to_package(const udpa_annotations_FileMigrateAnnotation *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview udpa_annotations_FileMigrateAnnotation_move_to_package(const udpa_annotations_FileMigrateAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void udpa_annotations_FileMigrateAnnotation_set_move_to_package(udpa_annotations_FileMigrateAnnotation *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/udpa/annotations/status.upb.h b/src/core/ext/upb-generated/udpa/annotations/status.upb.h index ccdfec968b0..b6599e9b245 100644 --- a/src/core/ext/upb-generated/udpa/annotations/status.upb.h +++ b/src/core/ext/upb-generated/udpa/annotations/status.upb.h @@ -45,14 +45,14 @@ UPB_INLINE char *udpa_annotations_StatusAnnotation_serialize(const udpa_annotati return upb_encode(msg, &udpa_annotations_StatusAnnotation_msginit, arena, len); } -UPB_INLINE bool udpa_annotations_StatusAnnotation_work_in_progress(const udpa_annotations_StatusAnnotation *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } -UPB_INLINE int32_t udpa_annotations_StatusAnnotation_package_version_status(const udpa_annotations_StatusAnnotation *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } +UPB_INLINE bool udpa_annotations_StatusAnnotation_work_in_progress(const udpa_annotations_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } +UPB_INLINE int32_t udpa_annotations_StatusAnnotation_package_version_status(const udpa_annotations_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE void udpa_annotations_StatusAnnotation_set_work_in_progress(udpa_annotations_StatusAnnotation *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } UPB_INLINE void udpa_annotations_StatusAnnotation_set_package_version_status(udpa_annotations_StatusAnnotation *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } #ifdef __cplusplus diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c index 1be40b6a17f..aa9918f024a 100644 --- a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c @@ -22,8 +22,8 @@ static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport__fields[5] = { {1, UPB_SIZE(0, 0), 0, 0, 1, 1}, {2, UPB_SIZE(8, 8), 0, 0, 1, 1}, {3, UPB_SIZE(16, 16), 0, 0, 4, 1}, - {4, UPB_SIZE(24, 24), 0, 0, 11, 4}, - {5, UPB_SIZE(28, 32), 0, 1, 11, 4}, + {4, UPB_SIZE(24, 24), 0, 0, 11, _UPB_LABEL_MAP}, + {5, UPB_SIZE(28, 32), 0, 1, 11, _UPB_LABEL_MAP}, }; const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit = { diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h index 5d3b38f2adf..5c63aef12ed 100644 --- a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h @@ -44,24 +44,26 @@ UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_serialize(const udpa_data_orca return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_msginit, arena, len); } -UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_cpu_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)); } -UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_mem_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); } -UPB_INLINE uint64_t udpa_data_orca_v1_OrcaLoadReport_rps(const udpa_data_orca_v1_OrcaLoadReport *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_cpu_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); } +UPB_INLINE double udpa_data_orca_v1_OrcaLoadReport_mem_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double); } +UPB_INLINE uint64_t udpa_data_orca_v1_OrcaLoadReport_rps(const udpa_data_orca_v1_OrcaLoadReport *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } +UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_has_request_cost(const udpa_data_orca_v1_OrcaLoadReport *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 24)); } UPB_INLINE size_t udpa_data_orca_v1_OrcaLoadReport_request_cost_size(const udpa_data_orca_v1_OrcaLoadReport *msg) {return _upb_msg_map_size(msg, UPB_SIZE(24, 24)); } UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_request_cost_get(const udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key, double *val) { return _upb_msg_map_get(msg, UPB_SIZE(24, 24), &key, 0, val, sizeof(*val)); } UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry* udpa_data_orca_v1_OrcaLoadReport_request_cost_next(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t* iter) { return (const udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 24), iter); } +UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_has_utilization(const udpa_data_orca_v1_OrcaLoadReport *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 32)); } UPB_INLINE size_t udpa_data_orca_v1_OrcaLoadReport_utilization_size(const udpa_data_orca_v1_OrcaLoadReport *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 32)); } UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_utilization_get(const udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key, double *val) { return _upb_msg_map_get(msg, UPB_SIZE(28, 32), &key, 0, val, sizeof(*val)); } UPB_INLINE const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry* udpa_data_orca_v1_OrcaLoadReport_utilization_next(const udpa_data_orca_v1_OrcaLoadReport *msg, size_t* iter) { return (const udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 32), iter); } UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_cpu_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value; } UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_mem_utilization(udpa_data_orca_v1_OrcaLoadReport *msg, double value) { - UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double) = value; } UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_set_rps(udpa_data_orca_v1_OrcaLoadReport *msg, uint64_t value) { - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE void udpa_data_orca_v1_OrcaLoadReport_request_cost_clear(udpa_data_orca_v1_OrcaLoadReport *msg) { _upb_msg_map_clear(msg, UPB_SIZE(24, 24)); } UPB_INLINE bool udpa_data_orca_v1_OrcaLoadReport_request_cost_set(udpa_data_orca_v1_OrcaLoadReport *msg, upb_strview key, double val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(24, 24), &key, 0, &val, sizeof(val), a); } diff --git a/src/core/ext/upb-generated/validate/validate.upb.c b/src/core/ext/upb-generated/validate/validate.upb.c index 1d6ab9bca75..a83d46932bb 100644 --- a/src/core/ext/upb-generated/validate/validate.upb.c +++ b/src/core/ext/upb-generated/validate/validate.upb.c @@ -41,28 +41,28 @@ static const upb_msglayout *const validate_FieldRules_submsgs[22] = { }; static const upb_msglayout_field validate_FieldRules__fields[22] = { - {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 8, 11, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 3, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 9, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 10, 11, 1}, - {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 20, 11, 1}, - {6, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 21, 11, 1}, - {7, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 16, 11, 1}, - {8, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 17, 11, 1}, - {9, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 6, 11, 1}, - {10, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 7, 11, 1}, - {11, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 14, 11, 1}, - {12, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 15, 11, 1}, - {13, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, - {14, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 18, 11, 1}, - {15, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 11, 1}, - {16, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 5, 11, 1}, + {1, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 8, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 3, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 9, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 10, 11, 1}, + {5, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 20, 11, 1}, + {6, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 21, 11, 1}, + {7, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 16, 11, 1}, + {8, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 17, 11, 1}, + {9, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 6, 11, 1}, + {10, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 7, 11, 1}, + {11, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 14, 11, 1}, + {12, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 15, 11, 1}, + {13, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {14, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 18, 11, 1}, + {15, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 2, 11, 1}, + {16, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 5, 11, 1}, {17, UPB_SIZE(4, 8), 1, 12, 11, 1}, - {18, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 13, 11, 1}, - {19, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 11, 11, 1}, - {20, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, - {21, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 4, 11, 1}, - {22, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 19, 11, 1}, + {18, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 13, 11, 1}, + {19, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 11, 11, 1}, + {20, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {21, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 4, 11, 1}, + {22, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 19, 11, 1}, }; const upb_msglayout validate_FieldRules_msginit = { @@ -285,19 +285,19 @@ static const upb_msglayout_field validate_StringRules__fields[25] = { {9, UPB_SIZE(92, 128), 12, 0, 9, 1}, {10, UPB_SIZE(108, 160), 0, 0, 9, 3}, {11, UPB_SIZE(112, 168), 0, 0, 9, 3}, - {12, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, - {13, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, - {14, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, - {15, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, - {16, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, - {17, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, - {18, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {12, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {13, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {14, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {15, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {16, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {17, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {18, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, {19, UPB_SIZE(40, 40), 5, 0, 4, 1}, {20, UPB_SIZE(48, 48), 6, 0, 4, 1}, - {21, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, - {22, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {21, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {22, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, {23, UPB_SIZE(100, 144), 13, 0, 9, 1}, - {24, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 14, 1}, + {24, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 14, 1}, {25, UPB_SIZE(56, 56), 7, 0, 8, 1}, }; @@ -317,9 +317,9 @@ static const upb_msglayout_field validate_BytesRules__fields[13] = { {7, UPB_SIZE(64, 96), 8, 0, 12, 1}, {8, UPB_SIZE(72, 112), 0, 0, 12, 3}, {9, UPB_SIZE(76, 120), 0, 0, 12, 3}, - {10, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, - {11, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, - {12, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, + {10, UPB_SIZE(80, 128), UPB_SIZE(-84, -132), 0, 8, 1}, + {11, UPB_SIZE(80, 128), UPB_SIZE(-84, -132), 0, 8, 1}, + {12, UPB_SIZE(80, 128), UPB_SIZE(-84, -132), 0, 8, 1}, {13, UPB_SIZE(24, 24), 3, 0, 4, 1}, }; diff --git a/src/core/ext/upb-generated/validate/validate.upb.h b/src/core/ext/upb-generated/validate/validate.upb.h index 5f156e1ca45..cebe2999ef5 100644 --- a/src/core/ext/upb-generated/validate/validate.upb.h +++ b/src/core/ext/upb-generated/validate/validate.upb.h @@ -138,7 +138,7 @@ typedef enum { validate_FieldRules_type_timestamp = 22, validate_FieldRules_type_NOT_SET = 0 } validate_FieldRules_type_oneofcases; -UPB_INLINE validate_FieldRules_type_oneofcases validate_FieldRules_type_case(const validate_FieldRules* msg) { return (validate_FieldRules_type_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 24)); } +UPB_INLINE validate_FieldRules_type_oneofcases validate_FieldRules_type_case(const validate_FieldRules* msg) { return (validate_FieldRules_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE bool validate_FieldRules_has_float(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } UPB_INLINE const validate_FloatRules* validate_FieldRules_float(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_FloatRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); } @@ -173,7 +173,7 @@ UPB_INLINE const validate_BytesRules* validate_FieldRules_bytes(const validate_F UPB_INLINE bool validate_FieldRules_has_enum(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 16); } UPB_INLINE const validate_EnumRules* validate_FieldRules_enum(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_EnumRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 16, NULL); } UPB_INLINE bool validate_FieldRules_has_message(const validate_FieldRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE const validate_MessageRules* validate_FieldRules_message(const validate_FieldRules *msg) { return UPB_FIELD_AT(msg, const validate_MessageRules*, UPB_SIZE(4, 8)); } +UPB_INLINE const validate_MessageRules* validate_FieldRules_message(const validate_FieldRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const validate_MessageRules*); } UPB_INLINE bool validate_FieldRules_has_repeated(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 18); } UPB_INLINE const validate_RepeatedRules* validate_FieldRules_repeated(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_RepeatedRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 18, NULL); } UPB_INLINE bool validate_FieldRules_has_map(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 19); } @@ -379,7 +379,7 @@ UPB_INLINE struct validate_EnumRules* validate_FieldRules_mutable_enum(validate_ } UPB_INLINE void validate_FieldRules_set_message(validate_FieldRules *msg, validate_MessageRules* value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, validate_MessageRules*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), validate_MessageRules*) = value; } UPB_INLINE struct validate_MessageRules* validate_FieldRules_mutable_message(validate_FieldRules *msg, upb_arena *arena) { struct validate_MessageRules* sub = (struct validate_MessageRules*)validate_FieldRules_message(msg); @@ -466,37 +466,37 @@ UPB_INLINE char *validate_FloatRules_serialize(const validate_FloatRules *msg, u } UPB_INLINE bool validate_FloatRules_has_const(const validate_FloatRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE float validate_FloatRules_const(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(4, 4)); } +UPB_INLINE float validate_FloatRules_const(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), float); } UPB_INLINE bool validate_FloatRules_has_lt(const validate_FloatRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE float validate_FloatRules_lt(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(8, 8)); } +UPB_INLINE float validate_FloatRules_lt(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), float); } UPB_INLINE bool validate_FloatRules_has_lte(const validate_FloatRules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE float validate_FloatRules_lte(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(12, 12)); } +UPB_INLINE float validate_FloatRules_lte(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), float); } UPB_INLINE bool validate_FloatRules_has_gt(const validate_FloatRules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE float validate_FloatRules_gt(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(16, 16)); } +UPB_INLINE float validate_FloatRules_gt(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), float); } UPB_INLINE bool validate_FloatRules_has_gte(const validate_FloatRules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE float validate_FloatRules_gte(const validate_FloatRules *msg) { return UPB_FIELD_AT(msg, float, UPB_SIZE(20, 20)); } +UPB_INLINE float validate_FloatRules_gte(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), float); } UPB_INLINE float const* validate_FloatRules_in(const validate_FloatRules *msg, size_t *len) { return (float const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE float const* validate_FloatRules_not_in(const validate_FloatRules *msg, size_t *len) { return (float const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE void validate_FloatRules_set_const(validate_FloatRules *msg, float value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, float, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), float) = value; } UPB_INLINE void validate_FloatRules_set_lt(validate_FloatRules *msg, float value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, float, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), float) = value; } UPB_INLINE void validate_FloatRules_set_lte(validate_FloatRules *msg, float value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, float, UPB_SIZE(12, 12)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 12), float) = value; } UPB_INLINE void validate_FloatRules_set_gt(validate_FloatRules *msg, float value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, float, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), float) = value; } UPB_INLINE void validate_FloatRules_set_gte(validate_FloatRules *msg, float value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, float, UPB_SIZE(20, 20)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 20), float) = value; } UPB_INLINE float* validate_FloatRules_mutable_in(validate_FloatRules *msg, size_t *len) { return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); @@ -534,37 +534,37 @@ UPB_INLINE char *validate_DoubleRules_serialize(const validate_DoubleRules *msg, } UPB_INLINE bool validate_DoubleRules_has_const(const validate_DoubleRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE double validate_DoubleRules_const(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)); } +UPB_INLINE double validate_DoubleRules_const(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double); } UPB_INLINE bool validate_DoubleRules_has_lt(const validate_DoubleRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE double validate_DoubleRules_lt(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(16, 16)); } +UPB_INLINE double validate_DoubleRules_lt(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), double); } UPB_INLINE bool validate_DoubleRules_has_lte(const validate_DoubleRules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE double validate_DoubleRules_lte(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)); } +UPB_INLINE double validate_DoubleRules_lte(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); } UPB_INLINE bool validate_DoubleRules_has_gt(const validate_DoubleRules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE double validate_DoubleRules_gt(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(32, 32)); } +UPB_INLINE double validate_DoubleRules_gt(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), double); } UPB_INLINE bool validate_DoubleRules_has_gte(const validate_DoubleRules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE double validate_DoubleRules_gte(const validate_DoubleRules *msg) { return UPB_FIELD_AT(msg, double, UPB_SIZE(40, 40)); } +UPB_INLINE double validate_DoubleRules_gte(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), double); } UPB_INLINE double const* validate_DoubleRules_in(const validate_DoubleRules *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE double const* validate_DoubleRules_not_in(const validate_DoubleRules *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE void validate_DoubleRules_set_const(validate_DoubleRules *msg, double value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, double, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double) = value; } UPB_INLINE void validate_DoubleRules_set_lt(validate_DoubleRules *msg, double value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, double, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), double) = value; } UPB_INLINE void validate_DoubleRules_set_lte(validate_DoubleRules *msg, double value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, double, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double) = value; } UPB_INLINE void validate_DoubleRules_set_gt(validate_DoubleRules *msg, double value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, double, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), double) = value; } UPB_INLINE void validate_DoubleRules_set_gte(validate_DoubleRules *msg, double value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, double, UPB_SIZE(40, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 40), double) = value; } UPB_INLINE double* validate_DoubleRules_mutable_in(validate_DoubleRules *msg, size_t *len) { return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); @@ -602,37 +602,37 @@ UPB_INLINE char *validate_Int32Rules_serialize(const validate_Int32Rules *msg, u } UPB_INLINE bool validate_Int32Rules_has_const(const validate_Int32Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t validate_Int32Rules_const(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t validate_Int32Rules_const(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool validate_Int32Rules_has_lt(const validate_Int32Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t validate_Int32Rules_lt(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t validate_Int32Rules_lt(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool validate_Int32Rules_has_lte(const validate_Int32Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE int32_t validate_Int32Rules_lte(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)); } +UPB_INLINE int32_t validate_Int32Rules_lte(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); } UPB_INLINE bool validate_Int32Rules_has_gt(const validate_Int32Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE int32_t validate_Int32Rules_gt(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE int32_t validate_Int32Rules_gt(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } UPB_INLINE bool validate_Int32Rules_has_gte(const validate_Int32Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE int32_t validate_Int32Rules_gte(const validate_Int32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)); } +UPB_INLINE int32_t validate_Int32Rules_gte(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t); } UPB_INLINE int32_t const* validate_Int32Rules_in(const validate_Int32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t const* validate_Int32Rules_not_in(const validate_Int32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE void validate_Int32Rules_set_const(validate_Int32Rules *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void validate_Int32Rules_set_lt(validate_Int32Rules *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void validate_Int32Rules_set_lte(validate_Int32Rules *msg, int32_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value; } UPB_INLINE void validate_Int32Rules_set_gt(validate_Int32Rules *msg, int32_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void validate_Int32Rules_set_gte(validate_Int32Rules *msg, int32_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t) = value; } UPB_INLINE int32_t* validate_Int32Rules_mutable_in(validate_Int32Rules *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); @@ -670,37 +670,37 @@ UPB_INLINE char *validate_Int64Rules_serialize(const validate_Int64Rules *msg, u } UPB_INLINE bool validate_Int64Rules_has_const(const validate_Int64Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int64_t validate_Int64Rules_const(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE int64_t validate_Int64Rules_const(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } UPB_INLINE bool validate_Int64Rules_has_lt(const validate_Int64Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int64_t validate_Int64Rules_lt(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } +UPB_INLINE int64_t validate_Int64Rules_lt(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } UPB_INLINE bool validate_Int64Rules_has_lte(const validate_Int64Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE int64_t validate_Int64Rules_lte(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)); } +UPB_INLINE int64_t validate_Int64Rules_lte(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); } UPB_INLINE bool validate_Int64Rules_has_gt(const validate_Int64Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE int64_t validate_Int64Rules_gt(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)); } +UPB_INLINE int64_t validate_Int64Rules_gt(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); } UPB_INLINE bool validate_Int64Rules_has_gte(const validate_Int64Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE int64_t validate_Int64Rules_gte(const validate_Int64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)); } +UPB_INLINE int64_t validate_Int64Rules_gte(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t); } UPB_INLINE int64_t const* validate_Int64Rules_in(const validate_Int64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t const* validate_Int64Rules_not_in(const validate_Int64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE void validate_Int64Rules_set_const(validate_Int64Rules *msg, int64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value; } UPB_INLINE void validate_Int64Rules_set_lt(validate_Int64Rules *msg, int64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value; } UPB_INLINE void validate_Int64Rules_set_lte(validate_Int64Rules *msg, int64_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value; } UPB_INLINE void validate_Int64Rules_set_gt(validate_Int64Rules *msg, int64_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t) = value; } UPB_INLINE void validate_Int64Rules_set_gte(validate_Int64Rules *msg, int64_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t) = value; } UPB_INLINE int64_t* validate_Int64Rules_mutable_in(validate_Int64Rules *msg, size_t *len) { return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); @@ -738,37 +738,37 @@ UPB_INLINE char *validate_UInt32Rules_serialize(const validate_UInt32Rules *msg, } UPB_INLINE bool validate_UInt32Rules_has_const(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint32_t validate_UInt32Rules_const(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)); } +UPB_INLINE uint32_t validate_UInt32Rules_const(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); } UPB_INLINE bool validate_UInt32Rules_has_lt(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE uint32_t validate_UInt32Rules_lt(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint32_t validate_UInt32Rules_lt(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } UPB_INLINE bool validate_UInt32Rules_has_lte(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE uint32_t validate_UInt32Rules_lte(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(12, 12)); } +UPB_INLINE uint32_t validate_UInt32Rules_lte(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), uint32_t); } UPB_INLINE bool validate_UInt32Rules_has_gt(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE uint32_t validate_UInt32Rules_gt(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(16, 16)); } +UPB_INLINE uint32_t validate_UInt32Rules_gt(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t); } UPB_INLINE bool validate_UInt32Rules_has_gte(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE uint32_t validate_UInt32Rules_gte(const validate_UInt32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(20, 20)); } +UPB_INLINE uint32_t validate_UInt32Rules_gte(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), uint32_t); } UPB_INLINE uint32_t const* validate_UInt32Rules_in(const validate_UInt32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE uint32_t const* validate_UInt32Rules_not_in(const validate_UInt32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE void validate_UInt32Rules_set_const(validate_UInt32Rules *msg, uint32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value; } UPB_INLINE void validate_UInt32Rules_set_lt(validate_UInt32Rules *msg, uint32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value; } UPB_INLINE void validate_UInt32Rules_set_lte(validate_UInt32Rules *msg, uint32_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(12, 12)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 12), uint32_t) = value; } UPB_INLINE void validate_UInt32Rules_set_gt(validate_UInt32Rules *msg, uint32_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t) = value; } UPB_INLINE void validate_UInt32Rules_set_gte(validate_UInt32Rules *msg, uint32_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(20, 20)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 20), uint32_t) = value; } UPB_INLINE uint32_t* validate_UInt32Rules_mutable_in(validate_UInt32Rules *msg, size_t *len) { return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); @@ -806,37 +806,37 @@ UPB_INLINE char *validate_UInt64Rules_serialize(const validate_UInt64Rules *msg, } UPB_INLINE bool validate_UInt64Rules_has_const(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint64_t validate_UInt64Rules_const(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t validate_UInt64Rules_const(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } UPB_INLINE bool validate_UInt64Rules_has_lt(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE uint64_t validate_UInt64Rules_lt(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE uint64_t validate_UInt64Rules_lt(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } UPB_INLINE bool validate_UInt64Rules_has_lte(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE uint64_t validate_UInt64Rules_lte(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE uint64_t validate_UInt64Rules_lte(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } UPB_INLINE bool validate_UInt64Rules_has_gt(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE uint64_t validate_UInt64Rules_gt(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)); } +UPB_INLINE uint64_t validate_UInt64Rules_gt(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); } UPB_INLINE bool validate_UInt64Rules_has_gte(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE uint64_t validate_UInt64Rules_gte(const validate_UInt64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)); } +UPB_INLINE uint64_t validate_UInt64Rules_gte(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t); } UPB_INLINE uint64_t const* validate_UInt64Rules_in(const validate_UInt64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE uint64_t const* validate_UInt64Rules_not_in(const validate_UInt64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE void validate_UInt64Rules_set_const(validate_UInt64Rules *msg, uint64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void validate_UInt64Rules_set_lt(validate_UInt64Rules *msg, uint64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE void validate_UInt64Rules_set_lte(validate_UInt64Rules *msg, uint64_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value; } UPB_INLINE void validate_UInt64Rules_set_gt(validate_UInt64Rules *msg, uint64_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t) = value; } UPB_INLINE void validate_UInt64Rules_set_gte(validate_UInt64Rules *msg, uint64_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t) = value; } UPB_INLINE uint64_t* validate_UInt64Rules_mutable_in(validate_UInt64Rules *msg, size_t *len) { return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); @@ -874,37 +874,37 @@ UPB_INLINE char *validate_SInt32Rules_serialize(const validate_SInt32Rules *msg, } UPB_INLINE bool validate_SInt32Rules_has_const(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t validate_SInt32Rules_const(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t validate_SInt32Rules_const(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool validate_SInt32Rules_has_lt(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t validate_SInt32Rules_lt(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t validate_SInt32Rules_lt(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool validate_SInt32Rules_has_lte(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE int32_t validate_SInt32Rules_lte(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)); } +UPB_INLINE int32_t validate_SInt32Rules_lte(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); } UPB_INLINE bool validate_SInt32Rules_has_gt(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE int32_t validate_SInt32Rules_gt(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE int32_t validate_SInt32Rules_gt(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } UPB_INLINE bool validate_SInt32Rules_has_gte(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE int32_t validate_SInt32Rules_gte(const validate_SInt32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)); } +UPB_INLINE int32_t validate_SInt32Rules_gte(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t); } UPB_INLINE int32_t const* validate_SInt32Rules_in(const validate_SInt32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t const* validate_SInt32Rules_not_in(const validate_SInt32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE void validate_SInt32Rules_set_const(validate_SInt32Rules *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void validate_SInt32Rules_set_lt(validate_SInt32Rules *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void validate_SInt32Rules_set_lte(validate_SInt32Rules *msg, int32_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value; } UPB_INLINE void validate_SInt32Rules_set_gt(validate_SInt32Rules *msg, int32_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void validate_SInt32Rules_set_gte(validate_SInt32Rules *msg, int32_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t) = value; } UPB_INLINE int32_t* validate_SInt32Rules_mutable_in(validate_SInt32Rules *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); @@ -942,37 +942,37 @@ UPB_INLINE char *validate_SInt64Rules_serialize(const validate_SInt64Rules *msg, } UPB_INLINE bool validate_SInt64Rules_has_const(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int64_t validate_SInt64Rules_const(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE int64_t validate_SInt64Rules_const(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } UPB_INLINE bool validate_SInt64Rules_has_lt(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int64_t validate_SInt64Rules_lt(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } +UPB_INLINE int64_t validate_SInt64Rules_lt(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } UPB_INLINE bool validate_SInt64Rules_has_lte(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE int64_t validate_SInt64Rules_lte(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)); } +UPB_INLINE int64_t validate_SInt64Rules_lte(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); } UPB_INLINE bool validate_SInt64Rules_has_gt(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE int64_t validate_SInt64Rules_gt(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)); } +UPB_INLINE int64_t validate_SInt64Rules_gt(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); } UPB_INLINE bool validate_SInt64Rules_has_gte(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE int64_t validate_SInt64Rules_gte(const validate_SInt64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)); } +UPB_INLINE int64_t validate_SInt64Rules_gte(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t); } UPB_INLINE int64_t const* validate_SInt64Rules_in(const validate_SInt64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t const* validate_SInt64Rules_not_in(const validate_SInt64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE void validate_SInt64Rules_set_const(validate_SInt64Rules *msg, int64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value; } UPB_INLINE void validate_SInt64Rules_set_lt(validate_SInt64Rules *msg, int64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value; } UPB_INLINE void validate_SInt64Rules_set_lte(validate_SInt64Rules *msg, int64_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value; } UPB_INLINE void validate_SInt64Rules_set_gt(validate_SInt64Rules *msg, int64_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t) = value; } UPB_INLINE void validate_SInt64Rules_set_gte(validate_SInt64Rules *msg, int64_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t) = value; } UPB_INLINE int64_t* validate_SInt64Rules_mutable_in(validate_SInt64Rules *msg, size_t *len) { return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); @@ -1010,37 +1010,37 @@ UPB_INLINE char *validate_Fixed32Rules_serialize(const validate_Fixed32Rules *ms } UPB_INLINE bool validate_Fixed32Rules_has_const(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint32_t validate_Fixed32Rules_const(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)); } +UPB_INLINE uint32_t validate_Fixed32Rules_const(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); } UPB_INLINE bool validate_Fixed32Rules_has_lt(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE uint32_t validate_Fixed32Rules_lt(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint32_t validate_Fixed32Rules_lt(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } UPB_INLINE bool validate_Fixed32Rules_has_lte(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE uint32_t validate_Fixed32Rules_lte(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(12, 12)); } +UPB_INLINE uint32_t validate_Fixed32Rules_lte(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), uint32_t); } UPB_INLINE bool validate_Fixed32Rules_has_gt(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE uint32_t validate_Fixed32Rules_gt(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(16, 16)); } +UPB_INLINE uint32_t validate_Fixed32Rules_gt(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t); } UPB_INLINE bool validate_Fixed32Rules_has_gte(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE uint32_t validate_Fixed32Rules_gte(const validate_Fixed32Rules *msg) { return UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(20, 20)); } +UPB_INLINE uint32_t validate_Fixed32Rules_gte(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), uint32_t); } UPB_INLINE uint32_t const* validate_Fixed32Rules_in(const validate_Fixed32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE uint32_t const* validate_Fixed32Rules_not_in(const validate_Fixed32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE void validate_Fixed32Rules_set_const(validate_Fixed32Rules *msg, uint32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value; } UPB_INLINE void validate_Fixed32Rules_set_lt(validate_Fixed32Rules *msg, uint32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value; } UPB_INLINE void validate_Fixed32Rules_set_lte(validate_Fixed32Rules *msg, uint32_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(12, 12)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 12), uint32_t) = value; } UPB_INLINE void validate_Fixed32Rules_set_gt(validate_Fixed32Rules *msg, uint32_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t) = value; } UPB_INLINE void validate_Fixed32Rules_set_gte(validate_Fixed32Rules *msg, uint32_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, uint32_t, UPB_SIZE(20, 20)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 20), uint32_t) = value; } UPB_INLINE uint32_t* validate_Fixed32Rules_mutable_in(validate_Fixed32Rules *msg, size_t *len) { return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); @@ -1078,37 +1078,37 @@ UPB_INLINE char *validate_Fixed64Rules_serialize(const validate_Fixed64Rules *ms } UPB_INLINE bool validate_Fixed64Rules_has_const(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint64_t validate_Fixed64Rules_const(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t validate_Fixed64Rules_const(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } UPB_INLINE bool validate_Fixed64Rules_has_lt(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE uint64_t validate_Fixed64Rules_lt(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE uint64_t validate_Fixed64Rules_lt(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } UPB_INLINE bool validate_Fixed64Rules_has_lte(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE uint64_t validate_Fixed64Rules_lte(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE uint64_t validate_Fixed64Rules_lte(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } UPB_INLINE bool validate_Fixed64Rules_has_gt(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE uint64_t validate_Fixed64Rules_gt(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)); } +UPB_INLINE uint64_t validate_Fixed64Rules_gt(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); } UPB_INLINE bool validate_Fixed64Rules_has_gte(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE uint64_t validate_Fixed64Rules_gte(const validate_Fixed64Rules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)); } +UPB_INLINE uint64_t validate_Fixed64Rules_gte(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t); } UPB_INLINE uint64_t const* validate_Fixed64Rules_in(const validate_Fixed64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE uint64_t const* validate_Fixed64Rules_not_in(const validate_Fixed64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE void validate_Fixed64Rules_set_const(validate_Fixed64Rules *msg, uint64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void validate_Fixed64Rules_set_lt(validate_Fixed64Rules *msg, uint64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE void validate_Fixed64Rules_set_lte(validate_Fixed64Rules *msg, uint64_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value; } UPB_INLINE void validate_Fixed64Rules_set_gt(validate_Fixed64Rules *msg, uint64_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t) = value; } UPB_INLINE void validate_Fixed64Rules_set_gte(validate_Fixed64Rules *msg, uint64_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t) = value; } UPB_INLINE uint64_t* validate_Fixed64Rules_mutable_in(validate_Fixed64Rules *msg, size_t *len) { return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); @@ -1146,37 +1146,37 @@ UPB_INLINE char *validate_SFixed32Rules_serialize(const validate_SFixed32Rules * } UPB_INLINE bool validate_SFixed32Rules_has_const(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t validate_SFixed32Rules_const(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t validate_SFixed32Rules_const(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool validate_SFixed32Rules_has_lt(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int32_t validate_SFixed32Rules_lt(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE int32_t validate_SFixed32Rules_lt(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool validate_SFixed32Rules_has_lte(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE int32_t validate_SFixed32Rules_lte(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)); } +UPB_INLINE int32_t validate_SFixed32Rules_lte(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); } UPB_INLINE bool validate_SFixed32Rules_has_gt(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE int32_t validate_SFixed32Rules_gt(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)); } +UPB_INLINE int32_t validate_SFixed32Rules_gt(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } UPB_INLINE bool validate_SFixed32Rules_has_gte(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE int32_t validate_SFixed32Rules_gte(const validate_SFixed32Rules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)); } +UPB_INLINE int32_t validate_SFixed32Rules_gte(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t); } UPB_INLINE int32_t const* validate_SFixed32Rules_in(const validate_SFixed32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t const* validate_SFixed32Rules_not_in(const validate_SFixed32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } UPB_INLINE void validate_SFixed32Rules_set_const(validate_SFixed32Rules *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void validate_SFixed32Rules_set_lt(validate_SFixed32Rules *msg, int32_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } UPB_INLINE void validate_SFixed32Rules_set_lte(validate_SFixed32Rules *msg, int32_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 12)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value; } UPB_INLINE void validate_SFixed32Rules_set_gt(validate_SFixed32Rules *msg, int32_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value; } UPB_INLINE void validate_SFixed32Rules_set_gte(validate_SFixed32Rules *msg, int32_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 20)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t) = value; } UPB_INLINE int32_t* validate_SFixed32Rules_mutable_in(validate_SFixed32Rules *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len); @@ -1214,37 +1214,37 @@ UPB_INLINE char *validate_SFixed64Rules_serialize(const validate_SFixed64Rules * } UPB_INLINE bool validate_SFixed64Rules_has_const(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int64_t validate_SFixed64Rules_const(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)); } +UPB_INLINE int64_t validate_SFixed64Rules_const(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } UPB_INLINE bool validate_SFixed64Rules_has_lt(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE int64_t validate_SFixed64Rules_lt(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)); } +UPB_INLINE int64_t validate_SFixed64Rules_lt(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } UPB_INLINE bool validate_SFixed64Rules_has_lte(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE int64_t validate_SFixed64Rules_lte(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)); } +UPB_INLINE int64_t validate_SFixed64Rules_lte(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); } UPB_INLINE bool validate_SFixed64Rules_has_gt(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE int64_t validate_SFixed64Rules_gt(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)); } +UPB_INLINE int64_t validate_SFixed64Rules_gt(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); } UPB_INLINE bool validate_SFixed64Rules_has_gte(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE int64_t validate_SFixed64Rules_gte(const validate_SFixed64Rules *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)); } +UPB_INLINE int64_t validate_SFixed64Rules_gte(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t); } UPB_INLINE int64_t const* validate_SFixed64Rules_in(const validate_SFixed64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t const* validate_SFixed64Rules_not_in(const validate_SFixed64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } UPB_INLINE void validate_SFixed64Rules_set_const(validate_SFixed64Rules *msg, int64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value; } UPB_INLINE void validate_SFixed64Rules_set_lt(validate_SFixed64Rules *msg, int64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value; } UPB_INLINE void validate_SFixed64Rules_set_lte(validate_SFixed64Rules *msg, int64_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value; } UPB_INLINE void validate_SFixed64Rules_set_gt(validate_SFixed64Rules *msg, int64_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t) = value; } UPB_INLINE void validate_SFixed64Rules_set_gte(validate_SFixed64Rules *msg, int64_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(40, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t) = value; } UPB_INLINE int64_t* validate_SFixed64Rules_mutable_in(validate_SFixed64Rules *msg, size_t *len) { return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len); @@ -1282,11 +1282,11 @@ UPB_INLINE char *validate_BoolRules_serialize(const validate_BoolRules *msg, upb } UPB_INLINE bool validate_BoolRules_has_const(const validate_BoolRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool validate_BoolRules_const(const validate_BoolRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool validate_BoolRules_const(const validate_BoolRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE void validate_BoolRules_set_const(validate_BoolRules *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } /* validate.StringRules */ @@ -1316,26 +1316,26 @@ typedef enum { validate_StringRules_well_known_well_known_regex = 24, validate_StringRules_well_known_NOT_SET = 0 } validate_StringRules_well_known_oneofcases; -UPB_INLINE validate_StringRules_well_known_oneofcases validate_StringRules_well_known_case(const validate_StringRules* msg) { return (validate_StringRules_well_known_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(128, 184)); } +UPB_INLINE validate_StringRules_well_known_oneofcases validate_StringRules_well_known_case(const validate_StringRules* msg) { return (validate_StringRules_well_known_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(128, 184), int32_t); } UPB_INLINE bool validate_StringRules_has_const(const validate_StringRules *msg) { return _upb_has_field(msg, 8); } -UPB_INLINE upb_strview validate_StringRules_const(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 64)); } +UPB_INLINE upb_strview validate_StringRules_const(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 64), upb_strview); } UPB_INLINE bool validate_StringRules_has_min_len(const validate_StringRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint64_t validate_StringRules_min_len(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t validate_StringRules_min_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } UPB_INLINE bool validate_StringRules_has_max_len(const validate_StringRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE uint64_t validate_StringRules_max_len(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE uint64_t validate_StringRules_max_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } UPB_INLINE bool validate_StringRules_has_min_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE uint64_t validate_StringRules_min_bytes(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE uint64_t validate_StringRules_min_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } UPB_INLINE bool validate_StringRules_has_max_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE uint64_t validate_StringRules_max_bytes(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)); } +UPB_INLINE uint64_t validate_StringRules_max_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); } UPB_INLINE bool validate_StringRules_has_pattern(const validate_StringRules *msg) { return _upb_has_field(msg, 9); } -UPB_INLINE upb_strview validate_StringRules_pattern(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 80)); } +UPB_INLINE upb_strview validate_StringRules_pattern(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 80), upb_strview); } UPB_INLINE bool validate_StringRules_has_prefix(const validate_StringRules *msg) { return _upb_has_field(msg, 10); } -UPB_INLINE upb_strview validate_StringRules_prefix(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 96)); } +UPB_INLINE upb_strview validate_StringRules_prefix(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 96), upb_strview); } UPB_INLINE bool validate_StringRules_has_suffix(const validate_StringRules *msg) { return _upb_has_field(msg, 11); } -UPB_INLINE upb_strview validate_StringRules_suffix(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 112)); } +UPB_INLINE upb_strview validate_StringRules_suffix(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 112), upb_strview); } UPB_INLINE bool validate_StringRules_has_contains(const validate_StringRules *msg) { return _upb_has_field(msg, 12); } -UPB_INLINE upb_strview validate_StringRules_contains(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(92, 128)); } +UPB_INLINE upb_strview validate_StringRules_contains(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 128), upb_strview); } UPB_INLINE upb_strview const* validate_StringRules_in(const validate_StringRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(108, 160), len); } UPB_INLINE upb_strview const* validate_StringRules_not_in(const validate_StringRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(112, 168), len); } UPB_INLINE bool validate_StringRules_has_email(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 12); } @@ -1353,55 +1353,55 @@ UPB_INLINE bool validate_StringRules_uri(const validate_StringRules *msg) { retu UPB_INLINE bool validate_StringRules_has_uri_ref(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 18); } UPB_INLINE bool validate_StringRules_uri_ref(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 18, false); } UPB_INLINE bool validate_StringRules_has_len(const validate_StringRules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE uint64_t validate_StringRules_len(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)); } +UPB_INLINE uint64_t validate_StringRules_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t); } UPB_INLINE bool validate_StringRules_has_len_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE uint64_t validate_StringRules_len_bytes(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(48, 48)); } +UPB_INLINE uint64_t validate_StringRules_len_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 48), uint64_t); } UPB_INLINE bool validate_StringRules_has_address(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 21); } UPB_INLINE bool validate_StringRules_address(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 21, false); } UPB_INLINE bool validate_StringRules_has_uuid(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 22); } UPB_INLINE bool validate_StringRules_uuid(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 22, false); } UPB_INLINE bool validate_StringRules_has_not_contains(const validate_StringRules *msg) { return _upb_has_field(msg, 13); } -UPB_INLINE upb_strview validate_StringRules_not_contains(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(100, 144)); } +UPB_INLINE upb_strview validate_StringRules_not_contains(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 144), upb_strview); } UPB_INLINE bool validate_StringRules_has_well_known_regex(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 24); } UPB_INLINE int32_t validate_StringRules_well_known_regex(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 24, validate_UNKNOWN); } UPB_INLINE bool validate_StringRules_has_strict(const validate_StringRules *msg) { return _upb_has_field(msg, 7); } -UPB_INLINE bool validate_StringRules_strict(const validate_StringRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(56, 56)); } +UPB_INLINE bool validate_StringRules_strict(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 56), bool); } UPB_INLINE void validate_StringRules_set_const(validate_StringRules *msg, upb_strview value) { _upb_sethas(msg, 8); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(60, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(60, 64), upb_strview) = value; } UPB_INLINE void validate_StringRules_set_min_len(validate_StringRules *msg, uint64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void validate_StringRules_set_max_len(validate_StringRules *msg, uint64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE void validate_StringRules_set_min_bytes(validate_StringRules *msg, uint64_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value; } UPB_INLINE void validate_StringRules_set_max_bytes(validate_StringRules *msg, uint64_t value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t) = value; } UPB_INLINE void validate_StringRules_set_pattern(validate_StringRules *msg, upb_strview value) { _upb_sethas(msg, 9); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(68, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(68, 80), upb_strview) = value; } UPB_INLINE void validate_StringRules_set_prefix(validate_StringRules *msg, upb_strview value) { _upb_sethas(msg, 10); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(76, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(76, 96), upb_strview) = value; } UPB_INLINE void validate_StringRules_set_suffix(validate_StringRules *msg, upb_strview value) { _upb_sethas(msg, 11); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(84, 112)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(84, 112), upb_strview) = value; } UPB_INLINE void validate_StringRules_set_contains(validate_StringRules *msg, upb_strview value) { _upb_sethas(msg, 12); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(92, 128)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(92, 128), upb_strview) = value; } UPB_INLINE upb_strview* validate_StringRules_mutable_in(validate_StringRules *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 160), len); @@ -1446,11 +1446,11 @@ UPB_INLINE void validate_StringRules_set_uri_ref(validate_StringRules *msg, bool } UPB_INLINE void validate_StringRules_set_len(validate_StringRules *msg, uint64_t value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(40, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t) = value; } UPB_INLINE void validate_StringRules_set_len_bytes(validate_StringRules *msg, uint64_t value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(48, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 48), uint64_t) = value; } UPB_INLINE void validate_StringRules_set_address(validate_StringRules *msg, bool value) { UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 21); @@ -1460,14 +1460,14 @@ UPB_INLINE void validate_StringRules_set_uuid(validate_StringRules *msg, bool va } UPB_INLINE void validate_StringRules_set_not_contains(validate_StringRules *msg, upb_strview value) { _upb_sethas(msg, 13); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(100, 144)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(100, 144), upb_strview) = value; } UPB_INLINE void validate_StringRules_set_well_known_regex(validate_StringRules *msg, int32_t value) { UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 24); } UPB_INLINE void validate_StringRules_set_strict(validate_StringRules *msg, bool value) { _upb_sethas(msg, 7); - UPB_FIELD_AT(msg, bool, UPB_SIZE(56, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 56), bool) = value; } /* validate.BytesRules */ @@ -1490,22 +1490,22 @@ typedef enum { validate_BytesRules_well_known_ipv6 = 12, validate_BytesRules_well_known_NOT_SET = 0 } validate_BytesRules_well_known_oneofcases; -UPB_INLINE validate_BytesRules_well_known_oneofcases validate_BytesRules_well_known_case(const validate_BytesRules* msg) { return (validate_BytesRules_well_known_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(84, 132)); } +UPB_INLINE validate_BytesRules_well_known_oneofcases validate_BytesRules_well_known_case(const validate_BytesRules* msg) { return (validate_BytesRules_well_known_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(84, 132), int32_t); } UPB_INLINE bool validate_BytesRules_has_const(const validate_BytesRules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE upb_strview validate_BytesRules_const(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)); } +UPB_INLINE upb_strview validate_BytesRules_const(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); } UPB_INLINE bool validate_BytesRules_has_min_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint64_t validate_BytesRules_min_len(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t validate_BytesRules_min_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } UPB_INLINE bool validate_BytesRules_has_max_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE uint64_t validate_BytesRules_max_len(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE uint64_t validate_BytesRules_max_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } UPB_INLINE bool validate_BytesRules_has_pattern(const validate_BytesRules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE upb_strview validate_BytesRules_pattern(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)); } +UPB_INLINE upb_strview validate_BytesRules_pattern(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); } UPB_INLINE bool validate_BytesRules_has_prefix(const validate_BytesRules *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE upb_strview validate_BytesRules_prefix(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)); } +UPB_INLINE upb_strview validate_BytesRules_prefix(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview); } UPB_INLINE bool validate_BytesRules_has_suffix(const validate_BytesRules *msg) { return _upb_has_field(msg, 7); } -UPB_INLINE upb_strview validate_BytesRules_suffix(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)); } +UPB_INLINE upb_strview validate_BytesRules_suffix(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 80), upb_strview); } UPB_INLINE bool validate_BytesRules_has_contains(const validate_BytesRules *msg) { return _upb_has_field(msg, 8); } -UPB_INLINE upb_strview validate_BytesRules_contains(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)); } +UPB_INLINE upb_strview validate_BytesRules_contains(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 96), upb_strview); } UPB_INLINE upb_strview const* validate_BytesRules_in(const validate_BytesRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(72, 112), len); } UPB_INLINE upb_strview const* validate_BytesRules_not_in(const validate_BytesRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(76, 120), len); } UPB_INLINE bool validate_BytesRules_has_ip(const validate_BytesRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(84, 132), 10); } @@ -1515,35 +1515,35 @@ UPB_INLINE bool validate_BytesRules_ipv4(const validate_BytesRules *msg) { retur UPB_INLINE bool validate_BytesRules_has_ipv6(const validate_BytesRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(84, 132), 12); } UPB_INLINE bool validate_BytesRules_ipv6(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 12, false); } UPB_INLINE bool validate_BytesRules_has_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE uint64_t validate_BytesRules_len(const validate_BytesRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)); } +UPB_INLINE uint64_t validate_BytesRules_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } UPB_INLINE void validate_BytesRules_set_const(validate_BytesRules *msg, upb_strview value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(32, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview) = value; } UPB_INLINE void validate_BytesRules_set_min_len(validate_BytesRules *msg, uint64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void validate_BytesRules_set_max_len(validate_BytesRules *msg, uint64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE void validate_BytesRules_set_pattern(validate_BytesRules *msg, upb_strview value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(40, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview) = value; } UPB_INLINE void validate_BytesRules_set_prefix(validate_BytesRules *msg, upb_strview value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(48, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview) = value; } UPB_INLINE void validate_BytesRules_set_suffix(validate_BytesRules *msg, upb_strview value) { _upb_sethas(msg, 7); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(56, 80)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(56, 80), upb_strview) = value; } UPB_INLINE void validate_BytesRules_set_contains(validate_BytesRules *msg, upb_strview value) { _upb_sethas(msg, 8); - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(64, 96)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(64, 96), upb_strview) = value; } UPB_INLINE upb_strview* validate_BytesRules_mutable_in(validate_BytesRules *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(72, 112), len); @@ -1576,7 +1576,7 @@ UPB_INLINE void validate_BytesRules_set_ipv6(validate_BytesRules *msg, bool valu } UPB_INLINE void validate_BytesRules_set_len(validate_BytesRules *msg, uint64_t value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value; } /* validate.EnumRules */ @@ -1594,19 +1594,19 @@ UPB_INLINE char *validate_EnumRules_serialize(const validate_EnumRules *msg, upb } UPB_INLINE bool validate_EnumRules_has_const(const validate_EnumRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE int32_t validate_EnumRules_const(const validate_EnumRules *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } +UPB_INLINE int32_t validate_EnumRules_const(const validate_EnumRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } UPB_INLINE bool validate_EnumRules_has_defined_only(const validate_EnumRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool validate_EnumRules_defined_only(const validate_EnumRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)); } +UPB_INLINE bool validate_EnumRules_defined_only(const validate_EnumRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } UPB_INLINE int32_t const* validate_EnumRules_in(const validate_EnumRules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); } UPB_INLINE int32_t const* validate_EnumRules_not_in(const validate_EnumRules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(16, 24), len); } UPB_INLINE void validate_EnumRules_set_const(validate_EnumRules *msg, int32_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void validate_EnumRules_set_defined_only(validate_EnumRules *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value; } UPB_INLINE int32_t* validate_EnumRules_mutable_in(validate_EnumRules *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len); @@ -1644,17 +1644,17 @@ UPB_INLINE char *validate_MessageRules_serialize(const validate_MessageRules *ms } UPB_INLINE bool validate_MessageRules_has_skip(const validate_MessageRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool validate_MessageRules_skip(const validate_MessageRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool validate_MessageRules_skip(const validate_MessageRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool validate_MessageRules_has_required(const validate_MessageRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool validate_MessageRules_required(const validate_MessageRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool validate_MessageRules_required(const validate_MessageRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE void validate_MessageRules_set_skip(validate_MessageRules *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void validate_MessageRules_set_required(validate_MessageRules *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } /* validate.RepeatedRules */ @@ -1672,29 +1672,29 @@ UPB_INLINE char *validate_RepeatedRules_serialize(const validate_RepeatedRules * } UPB_INLINE bool validate_RepeatedRules_has_min_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint64_t validate_RepeatedRules_min_items(const validate_RepeatedRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t validate_RepeatedRules_min_items(const validate_RepeatedRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } UPB_INLINE bool validate_RepeatedRules_has_max_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE uint64_t validate_RepeatedRules_max_items(const validate_RepeatedRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE uint64_t validate_RepeatedRules_max_items(const validate_RepeatedRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } UPB_INLINE bool validate_RepeatedRules_has_unique(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool validate_RepeatedRules_unique(const validate_RepeatedRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_RepeatedRules_unique(const validate_RepeatedRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } UPB_INLINE bool validate_RepeatedRules_has_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE const validate_FieldRules* validate_RepeatedRules_items(const validate_RepeatedRules *msg) { return UPB_FIELD_AT(msg, const validate_FieldRules*, UPB_SIZE(28, 32)); } +UPB_INLINE const validate_FieldRules* validate_RepeatedRules_items(const validate_RepeatedRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), const validate_FieldRules*); } UPB_INLINE void validate_RepeatedRules_set_min_items(validate_RepeatedRules *msg, uint64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void validate_RepeatedRules_set_max_items(validate_RepeatedRules *msg, uint64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE void validate_RepeatedRules_set_unique(validate_RepeatedRules *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value; } UPB_INLINE void validate_RepeatedRules_set_items(validate_RepeatedRules *msg, validate_FieldRules* value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, validate_FieldRules*, UPB_SIZE(28, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 32), validate_FieldRules*) = value; } UPB_INLINE struct validate_FieldRules* validate_RepeatedRules_mutable_items(validate_RepeatedRules *msg, upb_arena *arena) { struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_RepeatedRules_items(msg); @@ -1721,31 +1721,31 @@ UPB_INLINE char *validate_MapRules_serialize(const validate_MapRules *msg, upb_a } UPB_INLINE bool validate_MapRules_has_min_pairs(const validate_MapRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE uint64_t validate_MapRules_min_pairs(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)); } +UPB_INLINE uint64_t validate_MapRules_min_pairs(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } UPB_INLINE bool validate_MapRules_has_max_pairs(const validate_MapRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE uint64_t validate_MapRules_max_pairs(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)); } +UPB_INLINE uint64_t validate_MapRules_max_pairs(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } UPB_INLINE bool validate_MapRules_has_no_sparse(const validate_MapRules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool validate_MapRules_no_sparse(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)); } +UPB_INLINE bool validate_MapRules_no_sparse(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } UPB_INLINE bool validate_MapRules_has_keys(const validate_MapRules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE const validate_FieldRules* validate_MapRules_keys(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, const validate_FieldRules*, UPB_SIZE(28, 32)); } +UPB_INLINE const validate_FieldRules* validate_MapRules_keys(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), const validate_FieldRules*); } UPB_INLINE bool validate_MapRules_has_values(const validate_MapRules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE const validate_FieldRules* validate_MapRules_values(const validate_MapRules *msg) { return UPB_FIELD_AT(msg, const validate_FieldRules*, UPB_SIZE(32, 40)); } +UPB_INLINE const validate_FieldRules* validate_MapRules_values(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), const validate_FieldRules*); } UPB_INLINE void validate_MapRules_set_min_pairs(validate_MapRules *msg, uint64_t value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value; } UPB_INLINE void validate_MapRules_set_max_pairs(validate_MapRules *msg, uint64_t value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, uint64_t, UPB_SIZE(16, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value; } UPB_INLINE void validate_MapRules_set_no_sparse(validate_MapRules *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(24, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value; } UPB_INLINE void validate_MapRules_set_keys(validate_MapRules *msg, validate_FieldRules* value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, validate_FieldRules*, UPB_SIZE(28, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 32), validate_FieldRules*) = value; } UPB_INLINE struct validate_FieldRules* validate_MapRules_mutable_keys(validate_MapRules *msg, upb_arena *arena) { struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_MapRules_keys(msg); @@ -1758,7 +1758,7 @@ UPB_INLINE struct validate_FieldRules* validate_MapRules_mutable_keys(validate_M } UPB_INLINE void validate_MapRules_set_values(validate_MapRules *msg, validate_FieldRules* value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, validate_FieldRules*, UPB_SIZE(32, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 40), validate_FieldRules*) = value; } UPB_INLINE struct validate_FieldRules* validate_MapRules_mutable_values(validate_MapRules *msg, upb_arena *arena) { struct validate_FieldRules* sub = (struct validate_FieldRules*)validate_MapRules_values(msg); @@ -1785,13 +1785,13 @@ UPB_INLINE char *validate_AnyRules_serialize(const validate_AnyRules *msg, upb_a } UPB_INLINE bool validate_AnyRules_has_required(const validate_AnyRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool validate_AnyRules_required(const validate_AnyRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool validate_AnyRules_required(const validate_AnyRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE upb_strview const* validate_AnyRules_in(const validate_AnyRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE upb_strview const* validate_AnyRules_not_in(const validate_AnyRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE void validate_AnyRules_set_required(validate_AnyRules *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE upb_strview* validate_AnyRules_mutable_in(validate_AnyRules *msg, size_t *len) { return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); @@ -1829,27 +1829,29 @@ UPB_INLINE char *validate_DurationRules_serialize(const validate_DurationRules * } UPB_INLINE bool validate_DurationRules_has_required(const validate_DurationRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool validate_DurationRules_required(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)); } +UPB_INLINE bool validate_DurationRules_required(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool validate_DurationRules_has_const(const validate_DurationRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_const(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8)); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_const(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); } UPB_INLINE bool validate_DurationRules_has_lt(const validate_DurationRules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_lt(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16)); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_lt(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } UPB_INLINE bool validate_DurationRules_has_lte(const validate_DurationRules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_lte(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(12, 24)); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_lte(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); } UPB_INLINE bool validate_DurationRules_has_gt(const validate_DurationRules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_gt(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(16, 32)); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_gt(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Duration*); } UPB_INLINE bool validate_DurationRules_has_gte(const validate_DurationRules *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_gte(const validate_DurationRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(20, 40)); } +UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_gte(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_Duration*); } +UPB_INLINE bool validate_DurationRules_has_in(const validate_DurationRules *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } UPB_INLINE const struct google_protobuf_Duration* const* validate_DurationRules_in(const validate_DurationRules *msg, size_t *len) { return (const struct google_protobuf_Duration* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } +UPB_INLINE bool validate_DurationRules_has_not_in(const validate_DurationRules *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE const struct google_protobuf_Duration* const* validate_DurationRules_not_in(const validate_DurationRules *msg, size_t *len) { return (const struct google_protobuf_Duration* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE void validate_DurationRules_set_required(validate_DurationRules *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(1, 1)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value; } UPB_INLINE void validate_DurationRules_set_const(validate_DurationRules *msg, struct google_protobuf_Duration* value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_const(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_const(msg); @@ -1862,7 +1864,7 @@ UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_const } UPB_INLINE void validate_DurationRules_set_lt(validate_DurationRules *msg, struct google_protobuf_Duration* value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_lt(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_lt(msg); @@ -1875,7 +1877,7 @@ UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_lt(va } UPB_INLINE void validate_DurationRules_set_lte(validate_DurationRules *msg, struct google_protobuf_Duration* value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_lte(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_lte(msg); @@ -1888,7 +1890,7 @@ UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_lte(v } UPB_INLINE void validate_DurationRules_set_gt(validate_DurationRules *msg, struct google_protobuf_Duration* value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_gt(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_gt(msg); @@ -1901,7 +1903,7 @@ UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_gt(va } UPB_INLINE void validate_DurationRules_set_gte(validate_DurationRules *msg, struct google_protobuf_Duration* value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_mutable_gte(validate_DurationRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_DurationRules_gte(msg); @@ -1954,31 +1956,31 @@ UPB_INLINE char *validate_TimestampRules_serialize(const validate_TimestampRules } UPB_INLINE bool validate_TimestampRules_has_required(const validate_TimestampRules *msg) { return _upb_has_field(msg, 1); } -UPB_INLINE bool validate_TimestampRules_required(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)); } +UPB_INLINE bool validate_TimestampRules_required(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE bool validate_TimestampRules_has_const(const validate_TimestampRules *msg) { return _upb_has_field(msg, 4); } -UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_const(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(8, 8)); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_const(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Timestamp*); } UPB_INLINE bool validate_TimestampRules_has_lt(const validate_TimestampRules *msg) { return _upb_has_field(msg, 5); } -UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lt(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(12, 16)); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lt(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_Timestamp*); } UPB_INLINE bool validate_TimestampRules_has_lte(const validate_TimestampRules *msg) { return _upb_has_field(msg, 6); } -UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lte(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(16, 24)); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lte(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Timestamp*); } UPB_INLINE bool validate_TimestampRules_has_gt(const validate_TimestampRules *msg) { return _upb_has_field(msg, 7); } -UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gt(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(20, 32)); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gt(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Timestamp*); } UPB_INLINE bool validate_TimestampRules_has_gte(const validate_TimestampRules *msg) { return _upb_has_field(msg, 8); } -UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gte(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(24, 40)); } +UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gte(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Timestamp*); } UPB_INLINE bool validate_TimestampRules_has_lt_now(const validate_TimestampRules *msg) { return _upb_has_field(msg, 2); } -UPB_INLINE bool validate_TimestampRules_lt_now(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)); } +UPB_INLINE bool validate_TimestampRules_lt_now(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); } UPB_INLINE bool validate_TimestampRules_has_gt_now(const validate_TimestampRules *msg) { return _upb_has_field(msg, 3); } -UPB_INLINE bool validate_TimestampRules_gt_now(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)); } +UPB_INLINE bool validate_TimestampRules_gt_now(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } UPB_INLINE bool validate_TimestampRules_has_within(const validate_TimestampRules *msg) { return _upb_has_field(msg, 9); } -UPB_INLINE const struct google_protobuf_Duration* validate_TimestampRules_within(const validate_TimestampRules *msg) { return UPB_FIELD_AT(msg, const struct google_protobuf_Duration*, UPB_SIZE(28, 48)); } +UPB_INLINE const struct google_protobuf_Duration* validate_TimestampRules_within(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_Duration*); } UPB_INLINE void validate_TimestampRules_set_required(validate_TimestampRules *msg, bool value) { _upb_sethas(msg, 1); - UPB_FIELD_AT(msg, bool, UPB_SIZE(2, 2)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value; } UPB_INLINE void validate_TimestampRules_set_const(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { _upb_sethas(msg, 4); - UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_Timestamp*) = value; } UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_const(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_const(msg); @@ -1991,7 +1993,7 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_con } UPB_INLINE void validate_TimestampRules_set_lt(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { _upb_sethas(msg, 5); - UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_Timestamp*) = value; } UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lt(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_lt(msg); @@ -2004,7 +2006,7 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lt( } UPB_INLINE void validate_TimestampRules_set_lte(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { _upb_sethas(msg, 6); - UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(16, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Timestamp*) = value; } UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lte(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_lte(msg); @@ -2017,7 +2019,7 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lte } UPB_INLINE void validate_TimestampRules_set_gt(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { _upb_sethas(msg, 7); - UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(20, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Timestamp*) = value; } UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gt(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_gt(msg); @@ -2030,7 +2032,7 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gt( } UPB_INLINE void validate_TimestampRules_set_gte(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) { _upb_sethas(msg, 8); - UPB_FIELD_AT(msg, struct google_protobuf_Timestamp*, UPB_SIZE(24, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_Timestamp*) = value; } UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gte(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)validate_TimestampRules_gte(msg); @@ -2043,15 +2045,15 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gte } UPB_INLINE void validate_TimestampRules_set_lt_now(validate_TimestampRules *msg, bool value) { _upb_sethas(msg, 2); - UPB_FIELD_AT(msg, bool, UPB_SIZE(3, 3)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value; } UPB_INLINE void validate_TimestampRules_set_gt_now(validate_TimestampRules *msg, bool value) { _upb_sethas(msg, 3); - UPB_FIELD_AT(msg, bool, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value; } UPB_INLINE void validate_TimestampRules_set_within(validate_TimestampRules *msg, struct google_protobuf_Duration* value) { _upb_sethas(msg, 9); - UPB_FIELD_AT(msg, struct google_protobuf_Duration*, UPB_SIZE(28, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_Duration*) = value; } UPB_INLINE struct google_protobuf_Duration* validate_TimestampRules_mutable_within(validate_TimestampRules *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)validate_TimestampRules_within(msg); diff --git a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc index 9f7dd8bb609..d4d4ccc4daf 100644 --- a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +++ b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc @@ -22,6 +22,8 @@ #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" +#include "upb/upb.hpp" + #include #include #include diff --git a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc index 2a925182d3f..83ea008dc4e 100644 --- a/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +++ b/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc @@ -24,6 +24,8 @@ #include #include +#include "upb/upb.hpp" + #include #include #include diff --git a/src/core/tsi/alts/handshaker/transport_security_common_api.cc b/src/core/tsi/alts/handshaker/transport_security_common_api.cc index c7b9fafd935..a0462b2d76c 100644 --- a/src/core/tsi/alts/handshaker/transport_security_common_api.cc +++ b/src/core/tsi/alts/handshaker/transport_security_common_api.cc @@ -20,6 +20,8 @@ #include "src/core/tsi/alts/handshaker/transport_security_common_api.h" +#include "upb/upb.hpp" + bool grpc_gcp_rpc_protocol_versions_set_max( grpc_gcp_rpc_protocol_versions* versions, uint32_t max_major, uint32_t max_minor) { diff --git a/src/cpp/common/alts_util.cc b/src/cpp/common/alts_util.cc index f565894674c..b1dc38d01a0 100644 --- a/src/cpp/common/alts_util.cc +++ b/src/cpp/common/alts_util.cc @@ -16,6 +16,8 @@ * */ +#include "upb/upb.hpp" + #include #include #include diff --git a/src/cpp/server/health/default_health_check_service.cc b/src/cpp/server/health/default_health_check_service.cc index 3a0a600f6cc..a6688e23800 100644 --- a/src/cpp/server/health/default_health_check_service.cc +++ b/src/cpp/server/health/default_health_check_service.cc @@ -18,6 +18,8 @@ #include +#include "upb/upb.hpp" + #include #include #include @@ -25,6 +27,7 @@ #include "src/cpp/server/health/default_health_check_service.h" #include "src/proto/grpc/health/v1/health.upb.h" +#include "upb/upb.hpp" #define MAX_SERVICE_NAME_LENGTH 200 diff --git a/test/core/nanopb/fuzzer_response.cc b/test/core/nanopb/fuzzer_response.cc index a16a7788112..c4e85eb32e1 100644 --- a/test/core/nanopb/fuzzer_response.cc +++ b/test/core/nanopb/fuzzer_response.cc @@ -19,6 +19,8 @@ #include #include +#include "upb/upb.hpp" + #include #include diff --git a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc index 3703cb57cf5..c4da3ec4add 100644 --- a/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc +++ b/test/core/tsi/alts/handshaker/alts_handshaker_client_test.cc @@ -16,6 +16,8 @@ * */ +#include "upb/upb.hpp" + #include #include "src/core/tsi/alts/handshaker/alts_handshaker_client.h" diff --git a/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc b/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc index 2127e980488..8baf84eb398 100644 --- a/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc +++ b/test/core/tsi/alts/handshaker/alts_tsi_handshaker_test.cc @@ -19,6 +19,8 @@ #include #include +#include "upb/upb.hpp" + #include #include diff --git a/test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc b/test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc index b025a3b1f8d..528cb9b286b 100644 --- a/test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc +++ b/test/core/tsi/alts/handshaker/alts_tsi_utils_test.cc @@ -16,6 +16,8 @@ * */ +#include "upb/upb.hpp" + #include "src/core/tsi/alts/handshaker/alts_tsi_utils.h" #include "test/core/tsi/alts/handshaker/alts_handshaker_service_api_test_lib.h" #include "test/core/util/test_config.h" diff --git a/test/cpp/common/alts_util_test.cc b/test/cpp/common/alts_util_test.cc index 88c4543fe1e..b3d53faddfe 100644 --- a/test/cpp/common/alts_util_test.cc +++ b/test/cpp/common/alts_util_test.cc @@ -16,6 +16,8 @@ * */ +#include "upb/upb.hpp" + #include #include #include diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index a74c7b16bdb..eb8ac54e514 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -16,11 +16,13 @@ * */ +#include "google/protobuf/duration.upb.h" +#include "upb/upb.hpp" + #include #include #include -#include "google/protobuf/duration.upb.h" #include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h" #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/sockaddr_utils.h" From fe8717bf4aadb3de6a03923068e37856de29e1eb Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 2 Jun 2020 15:31:31 -0700 Subject: [PATCH 033/239] attempt to fix build --- gRPC-C++.podspec | 6 ++++-- gRPC-Core.podspec | 6 ++++-- grpc.gemspec | 1 + package.xml | 1 + src/upb/gen_build_yaml.py | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index b6a2683d491..58b39e823c2 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -678,7 +678,8 @@ Pod::Spec.new do |s| 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', 'third_party/upb/upb/table.int.h', - 'third_party/upb/upb/upb.h' + 'third_party/upb/upb/upb.h', + 'third_party/upb/upb/upb.hpp' ss.private_header_files = 'src/core/ext/filters/client_channel/backend_metric.h', 'src/core/ext/filters/client_channel/backup_poller.h', @@ -1090,7 +1091,8 @@ Pod::Spec.new do |s| 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', 'third_party/upb/upb/table.int.h', - 'third_party/upb/upb/upb.h' + 'third_party/upb/upb/upb.h', + 'third_party/upb/upb/upb.hpp' end s.subspec 'Protobuf' do |ss| diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index d1df6bf420e..90c8791b144 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1044,7 +1044,8 @@ Pod::Spec.new do |s| 'third_party/upb/upb/table.c', 'third_party/upb/upb/table.int.h', 'third_party/upb/upb/upb.c', - 'third_party/upb/upb/upb.h' + 'third_party/upb/upb/upb.h', + 'third_party/upb/upb/upb.hpp' ss.private_header_files = 'src/core/ext/filters/client_channel/backend_metric.h', 'src/core/ext/filters/client_channel/backup_poller.h', 'src/core/ext/filters/client_channel/client_channel.h', @@ -1444,7 +1445,8 @@ Pod::Spec.new do |s| 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', 'third_party/upb/upb/table.int.h', - 'third_party/upb/upb/upb.h' + 'third_party/upb/upb/upb.h', + 'third_party/upb/upb/upb.hpp' end # CFStream is now default. Leaving this subspec only for compatibility purpose. diff --git a/grpc.gemspec b/grpc.gemspec index 800a030d44f..816699153d1 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -1665,6 +1665,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/upb/upb/table.int.h ) s.files += %w( third_party/upb/upb/upb.c ) s.files += %w( third_party/upb/upb/upb.h ) + s.files += %w( third_party/upb/upb/upb.hpp ) s.files += %w( third_party/zlib/adler32.c ) s.files += %w( third_party/zlib/compress.c ) s.files += %w( third_party/zlib/crc32.c ) diff --git a/package.xml b/package.xml index 054fdda9b7f..9c9f5c5c549 100644 --- a/package.xml +++ b/package.xml @@ -1590,6 +1590,7 @@ + diff --git a/src/upb/gen_build_yaml.py b/src/upb/gen_build_yaml.py index 9a813ae5c24..2816bd4e4c0 100755 --- a/src/upb/gen_build_yaml.py +++ b/src/upb/gen_build_yaml.py @@ -45,6 +45,7 @@ try: "third_party/upb/upb/port_undef.inc", "third_party/upb/upb/table.int.h", "third_party/upb/upb/upb.h", + "third_party/upb/upb/upb.hpp", ], 'secure': False, }] From fae053df229d1f91ad34e9772a9d7343d1d46669 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 3 Jun 2020 07:20:44 -0700 Subject: [PATCH 034/239] Squashed 'third_party/upb/' changes from 543a0ce8f2..7f5b8d73b0 7f5b8d73b0 Merge pull request #287 from haberman/php-amalgamation 634d37515c Bugfix for oneofs and added line/col info to JSON. git-subtree-dir: third_party/upb git-subtree-split: 7f5b8d73b0d1a481b279de3c6a558015ae1adca5 --- .../google/protobuf/descriptor.upb.h | 178 +++++++++--------- upb/decode.c | 6 +- upb/encode.c | 16 +- upb/json_decode.c | 8 +- upb/msg.h | 63 ++++++- upb/reflection.c | 31 ++- upb/upb.c | 9 + upb/upb.h | 1 + upbc/generator.cc | 12 +- 9 files changed, 179 insertions(+), 145 deletions(-) diff --git a/generated_for_cmake/google/protobuf/descriptor.upb.h b/generated_for_cmake/google/protobuf/descriptor.upb.h index 5316dd30516..64701a0cf21 100644 --- a/generated_for_cmake/google/protobuf/descriptor.upb.h +++ b/generated_for_cmake/google/protobuf/descriptor.upb.h @@ -198,9 +198,9 @@ UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_prot return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE upb_strview const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } @@ -211,13 +211,13 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_pro UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_FileOptions*); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_protobuf_SourceCodeInfo*); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(56, 112), len); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(60, 120), len); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value) { @@ -355,7 +355,7 @@ UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } @@ -367,7 +367,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } -UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_MessageOptions*); } UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } @@ -508,11 +508,11 @@ UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len); } -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const google_protobuf_ExtensionRangeOptions*); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { @@ -551,9 +551,9 @@ UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const g return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len); } -UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { @@ -610,27 +610,27 @@ UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_pro return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 7); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int32_t); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 8); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 9); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 11); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 11); } UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const google_protobuf_FieldOptions*); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), int32_t); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 10); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 10); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool); } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { @@ -701,9 +701,9 @@ UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_pro return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_OneofOptions*); } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_strview value) { @@ -738,11 +738,11 @@ UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_prot return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } -UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_EnumOptions*); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } @@ -816,9 +816,9 @@ UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { @@ -844,11 +844,11 @@ UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_protobuf_EnumValueOptions*); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value) { @@ -887,11 +887,11 @@ UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_p return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len) { return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } -UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_ServiceOptions*); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_strview value) { @@ -939,17 +939,17 @@ UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_pr return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_MethodOptions*); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value) { @@ -1000,45 +1000,45 @@ UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_Fil return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 11); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 11); } UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 12); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 12); } UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 13); } +UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 13); } UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 7); } UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 8); } UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 9); } UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 14); } +UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 14); } UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 15); } +UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 15); } UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 16); } +UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 16); } UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 17); } +UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 17); } UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 18); } +UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 18); } UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 144), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 10); } +UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 10); } UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 19); } +UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 19); } UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 160), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 20); } +UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 20); } UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 176), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 192)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(108, 192), len); } @@ -1151,13 +1151,13 @@ UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_ return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } -UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } -UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); } -UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const google_protobuf_MessageOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); } @@ -1206,17 +1206,17 @@ UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_Fi return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } -UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); } -UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); } -UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } -UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool); } UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 32)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } @@ -1304,9 +1304,9 @@ UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_Enu return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } -UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const google_protobuf_EnumOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } @@ -1347,7 +1347,7 @@ UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobu return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const google_protobuf_EnumValueOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } @@ -1384,7 +1384,7 @@ UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const google_protobuf_ServiceOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } @@ -1421,9 +1421,9 @@ UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_M return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } -UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); } @@ -1466,17 +1466,17 @@ UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_prot UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); } UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(56, 80), len); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len) { @@ -1531,9 +1531,9 @@ UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const go return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len); } -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value) { @@ -1592,9 +1592,9 @@ UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_ UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE upb_strview const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } @@ -1683,11 +1683,11 @@ UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const go } UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); } -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { diff --git a/upb/decode.c b/upb/decode.c index b78451c9dff..7ee199f51af 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -408,15 +408,13 @@ static const char *decode_tomsg(upb_decstate *d, const char *ptr, upb_msg *msg, /* Set presence if necessary. */ if (field->presence < 0) { /* Oneof case */ - int32_t *oneof_case = UPB_PTR_AT(msg, -field->presence, int32_t); + int32_t *oneof_case = _upb_oneofcase_field(msg, field); if (op == OP_SUBMSG && *oneof_case != field->number) { memset(mem, 0, sizeof(void*)); } *oneof_case = field->number; } else if (field->presence > 0) { - /* Hasbit */ - uint32_t hasbit = field->presence; - *UPB_PTR_AT(msg, hasbit / 8, uint8_t) |= (1 << (hasbit % 8)); + _upb_sethas_field(msg, field); } /* Store into message. */ diff --git a/upb/encode.c b/upb/encode.c index 28a5602b239..010f5c5c394 100644 --- a/upb/encode.c +++ b/upb/encode.c @@ -111,18 +111,6 @@ static bool upb_put_float(upb_encstate *e, float d) { return upb_put_fixed32(e, u32); } -static uint32_t upb_readcase(const char *msg, const upb_msglayout_field *f) { - uint32_t ret; - memcpy(&ret, msg - f->presence, sizeof(ret)); - return ret; -} - -static bool upb_readhasbit(const char *msg, const upb_msglayout_field *f) { - uint32_t hasbit = f->presence; - UPB_ASSERT(f->presence > 0); - return (*UPB_PTR_AT(msg, hasbit / 8, uint8_t)) & (1 << (hasbit % 8)); -} - static bool upb_put_tag(upb_encstate *e, int field_number, int wire_type) { return upb_put_varint(e, (field_number << 3) | wire_type); } @@ -390,12 +378,12 @@ bool upb_encode_message(upb_encstate *e, const char *msg, skip_empty = true; } else if (f->presence > 0) { /* Proto2 presence: hasbit. */ - if (!upb_readhasbit(msg, f)) { + if (!_upb_hasbit_field(msg, f)) { continue; } } else { /* Field is in a oneof. */ - if (upb_readcase(msg, f) != f->number) { + if (_upb_getoneofcase_field(msg, f) != f->number) { continue; } } diff --git a/upb/json_decode.c b/upb/json_decode.c index 2949e2d237e..e49ee854c89 100644 --- a/upb/json_decode.c +++ b/upb/json_decode.c @@ -42,14 +42,17 @@ static bool jsondec_streql(upb_strview str, const char *lit) { } UPB_NORETURN static void jsondec_err(jsondec *d, const char *msg) { - upb_status_seterrmsg(d->status, msg); + upb_status_seterrf(d->status, "Error parsing JSON @%d:%d: %s", d->line, + (int)(d->ptr - d->line_begin), msg); longjmp(d->err, 1); } UPB_NORETURN static void jsondec_errf(jsondec *d, const char *fmt, ...) { va_list argp; + upb_status_seterrf(d->status, "Error parsing JSON @%d:%d: ", d->line, + (int)(d->ptr - d->line_begin)); va_start(argp, fmt); - upb_status_vseterrf(d->status, fmt, argp); + upb_status_vappenderrf(d->status, fmt, argp); va_end(argp); longjmp(d->err, 1); } @@ -1400,6 +1403,7 @@ bool upb_json_decode(const char *buf, size_t size, upb_msg *msg, d.options = options; d.depth = 64; d.line = 1; + d.line_begin = d.ptr; d.debug_field = NULL; d.is_first = false; diff --git a/upb/msg.h b/upb/msg.h index dad54c2b7f1..66f04a0e80f 100644 --- a/upb/msg.h +++ b/upb/msg.h @@ -40,7 +40,7 @@ enum { typedef struct { uint32_t number; uint16_t offset; - int16_t presence; /* If >0, hasbit_index. If <0, -oneof_index. */ + int16_t presence; /* If >0, hasbit_index. If <0, ~oneof_index. */ uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */ uint8_t descriptortype; uint8_t label; @@ -95,24 +95,67 @@ bool _upb_msg_addunknown(upb_msg *msg, const char *data, size_t len, /* Returns a reference to the message's unknown data. */ const char *upb_msg_getunknown(const upb_msg *msg, size_t *len); -UPB_INLINE bool _upb_has_field(const void *msg, size_t idx) { +/** Hasbit access *************************************************************/ + +UPB_INLINE bool _upb_hasbit(const upb_msg *msg, size_t idx) { return (*PTR_AT(msg, idx / 8, const char) & (1 << (idx % 8))) != 0; } -UPB_INLINE bool _upb_sethas(const void *msg, size_t idx) { - return (*PTR_AT(msg, idx / 8, char)) |= (char)(1 << (idx % 8)); +UPB_INLINE void _upb_sethas(const upb_msg *msg, size_t idx) { + (*PTR_AT(msg, idx / 8, char)) |= (char)(1 << (idx % 8)); +} + +UPB_INLINE void _upb_clearhas(const upb_msg *msg, size_t idx) { + (*PTR_AT(msg, idx / 8, char)) &= (char)(~(1 << (idx % 8))); +} + +UPB_INLINE size_t _upb_msg_hasidx(const upb_msglayout_field *f) { + UPB_ASSERT(f->presence > 0); + return f->presence; +} + +UPB_INLINE bool _upb_hasbit_field(const upb_msg *msg, + const upb_msglayout_field *f) { + return _upb_hasbit(msg, _upb_msg_hasidx(f)); +} + +UPB_INLINE void _upb_sethas_field(const upb_msg *msg, + const upb_msglayout_field *f) { + _upb_sethas(msg, _upb_msg_hasidx(f)); +} + +UPB_INLINE void _upb_clearhas_field(const upb_msg *msg, + const upb_msglayout_field *f) { + _upb_clearhas(msg, _upb_msg_hasidx(f)); +} + +/** Oneof case access *********************************************************/ + +UPB_INLINE int32_t *_upb_oneofcase(upb_msg *msg, size_t case_ofs) { + return PTR_AT(msg, case_ofs, int32_t); +} + +UPB_INLINE int32_t _upb_getoneofcase(const void *msg, size_t case_ofs) { + return *PTR_AT(msg, case_ofs, int32_t); +} + +UPB_INLINE size_t _upb_oneofcase_ofs(const upb_msglayout_field *f) { + UPB_ASSERT(f->presence < 0); + return ~(int64_t)f->presence; } -UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx) { - return (*PTR_AT(msg, idx / 8, char)) &= (char)(~(1 << (idx % 8))); +UPB_INLINE int32_t *_upb_oneofcase_field(upb_msg *msg, + const upb_msglayout_field *f) { + return _upb_oneofcase(msg, _upb_oneofcase_ofs(f)); } -UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num) { - return *PTR_AT(msg, case_ofs, int32_t) == num; +UPB_INLINE int32_t _upb_getoneofcase_field(const upb_msg *msg, + const upb_msglayout_field *f) { + return _upb_getoneofcase(msg, _upb_oneofcase_ofs(f)); } -UPB_INLINE bool _upb_has_submsg_nohasbit(const void *msg, size_t ofs) { - return *PTR_AT(msg, ofs, const void*) != NULL; +UPB_INLINE bool _upb_has_submsg_nohasbit(const upb_msg *msg, size_t ofs) { + return *PTR_AT(msg, ofs, const upb_msg*) != NULL; } UPB_INLINE bool _upb_isrepeated(const upb_msglayout_field *field) { diff --git a/upb/reflection.c b/upb/reflection.c index a23129c2cef..057da629cc0 100644 --- a/upb/reflection.c +++ b/upb/reflection.c @@ -55,12 +55,6 @@ static bool in_oneof(const upb_msglayout_field *field) { return field->presence < 0; } -static uint32_t *oneofcase(const upb_msg *msg, - const upb_msglayout_field *field) { - UPB_ASSERT(in_oneof(field)); - return UPB_PTR_AT(msg, -field->presence, uint32_t); -} - static upb_msgval _upb_msg_getraw(const upb_msg *msg, const upb_fielddef *f) { const upb_msglayout_field *field = upb_fielddef_layout(f); const char *mem = UPB_PTR_AT(msg, field->offset, char); @@ -74,10 +68,9 @@ static upb_msgval _upb_msg_getraw(const upb_msg *msg, const upb_fielddef *f) { bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f) { const upb_msglayout_field *field = upb_fielddef_layout(f); if (in_oneof(field)) { - return *oneofcase(msg, field) == field->number; + return _upb_getoneofcase_field(msg, field) == field->number; } else if (field->presence > 0) { - uint32_t hasbit = field->presence; - return *UPB_PTR_AT(msg, hasbit / 8, uint8_t) & (1 << (hasbit % 8)); + return _upb_hasbit_field(msg, field); } else { UPB_ASSERT(field->descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE || field->descriptortype == UPB_DESCRIPTOR_TYPE_GROUP); @@ -98,7 +91,7 @@ const upb_fielddef *upb_msg_whichoneof(const upb_msg *msg, if (upb_oneof_done(&i)) return false; f = upb_oneof_iter_field(&i); field = upb_fielddef_layout(f); - oneof_case = *oneofcase(msg, field); + oneof_case = _upb_getoneofcase_field(msg, field); return oneof_case ? upb_msgdef_itof(m, oneof_case) : NULL; } @@ -149,7 +142,8 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, const upb_msglayout_field *field = upb_fielddef_layout(f); upb_mutmsgval ret; char *mem = UPB_PTR_AT(msg, field->offset, char); - bool wrong_oneof = in_oneof(field) && *oneofcase(msg, field) != field->number; + bool wrong_oneof = + in_oneof(field) && _upb_getoneofcase_field(msg, field) != field->number; memcpy(&ret, mem, sizeof(void*)); @@ -169,10 +163,9 @@ upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, memcpy(mem, &ret, sizeof(void*)); if (wrong_oneof) { - *oneofcase(msg, field) = field->number; + *_upb_oneofcase_field(msg, field) = field->number; } else if (field->presence > 0) { - uint32_t hasbit = field->presence; - *UPB_PTR_AT(msg, hasbit / 8, uint8_t) |= (1 << (hasbit % 8)); + _upb_sethas_field(msg, field); } } return ret; @@ -186,10 +179,9 @@ void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, : field_size[field->descriptortype]; memcpy(mem, &val, size); if (field->presence > 0) { - uint32_t hasbit = field->presence; - *UPB_PTR_AT(msg, hasbit / 8, uint8_t) |= (1 << (hasbit % 8)); + _upb_sethas_field(msg, field); } else if (in_oneof(field)) { - *oneofcase(msg, field) = field->number; + *_upb_oneofcase_field(msg, field) = field->number; } } @@ -200,10 +192,9 @@ void upb_msg_clearfield(upb_msg *msg, const upb_fielddef *f) { : field_size[field->descriptortype]; if (field->presence > 0) { - uint32_t hasbit = field->presence; - *UPB_PTR_AT(msg, hasbit / 8, uint8_t) &= ~(1 << (hasbit % 8)); + _upb_clearhas_field(msg, field); } else if (in_oneof(field)) { - uint32_t *oneof_case = oneofcase(msg, field); + int32_t *oneof_case = _upb_oneofcase_field(msg, field); if (*oneof_case != field->number) return; *oneof_case = 0; } diff --git a/upb/upb.c b/upb/upb.c index cccf4489402..84852f49a63 100644 --- a/upb/upb.c +++ b/upb/upb.c @@ -44,6 +44,15 @@ void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args) { status->msg[UPB_STATUS_MAX_MESSAGE - 1] = '\0'; } +void upb_status_vappenderrf(upb_status *status, const char *fmt, va_list args) { + size_t len; + if (!status) return; + status->ok = false; + len = strlen(status->msg); + _upb_vsnprintf(status->msg + len, sizeof(status->msg) - len, fmt, args); + status->msg[UPB_STATUS_MAX_MESSAGE - 1] = '\0'; +} + /* upb_alloc ******************************************************************/ static void *upb_global_allocfunc(upb_alloc *alloc, void *ptr, size_t oldsize, diff --git a/upb/upb.h b/upb/upb.h index 7ad3b1fdc1d..19ee059b8f2 100644 --- a/upb/upb.h +++ b/upb/upb.h @@ -35,6 +35,7 @@ void upb_status_clear(upb_status *status); void upb_status_seterrmsg(upb_status *status, const char *msg); void upb_status_seterrf(upb_status *status, const char *fmt, ...); void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args); +void upb_status_vappenderrf(upb_status *status, const char *fmt, va_list args); /** upb_strview ************************************************************/ diff --git a/upbc/generator.cc b/upbc/generator.cc index 3ae64232624..af39cacd12e 100644 --- a/upbc/generator.cc +++ b/upbc/generator.cc @@ -379,12 +379,12 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output if (layout.HasHasbit(field)) { output( "UPB_INLINE bool $0_has_$1(const $0 *msg) { " - "return _upb_has_field(msg, $2); }\n", + "return _upb_hasbit(msg, $2); }\n", msgname, field->name(), layout.GetHasbitIndex(field)); } else if (field->real_containing_oneof()) { output( "UPB_INLINE bool $0_has_$1(const $0 *msg) { " - "return _upb_has_oneof_field(msg, $2, $3); }\n", + "return _upb_getoneofcase(msg, $2) == $3; }\n", msgname, field->name(), GetSizeInit( layout.GetOneofCaseOffset(field->real_containing_oneof())), @@ -758,10 +758,10 @@ void WriteSource(const protobuf::FileDescriptor* file, Output& output) { layout.GetOneofCaseOffset(field->real_containing_oneof()); // We encode as negative to distinguish from hasbits. - case_offset.size32 = -case_offset.size32; - case_offset.size64 = -case_offset.size64; - assert(case_offset.size32 != 0); - assert(case_offset.size64 != 0); + case_offset.size32 = ~case_offset.size32; + case_offset.size64 = ~case_offset.size64; + assert(case_offset.size32 < 0); + assert(case_offset.size64 < 0); presence = GetSizeInit(case_offset); } From ffb507aa2ba80256e18f0dec3c9cfe4386ff1f71 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 3 Jun 2020 07:22:39 -0700 Subject: [PATCH 035/239] update bazel upb dep and regenerate upb files --- bazel/grpc_deps.bzl | 8 +- .../envoy/api/v2/auth/common.upb.c | 4 +- .../envoy/api/v2/auth/common.upb.h | 4 +- .../envoy/api/v2/auth/secret.upb.c | 8 +- .../envoy/api/v2/auth/secret.upb.h | 8 +- .../upb-generated/envoy/api/v2/auth/tls.upb.c | 12 +- .../upb-generated/envoy/api/v2/auth/tls.upb.h | 12 +- .../upb-generated/envoy/api/v2/cluster.upb.c | 14 +- .../upb-generated/envoy/api/v2/cluster.upb.h | 14 +- .../envoy/api/v2/core/address.upb.c | 8 +- .../envoy/api/v2/core/address.upb.h | 8 +- .../envoy/api/v2/core/base.upb.c | 18 +- .../envoy/api/v2/core/base.upb.h | 18 +- .../envoy/api/v2/core/config_source.upb.c | 8 +- .../envoy/api/v2/core/config_source.upb.h | 8 +- .../api/v2/core/event_service_config.upb.c | 2 +- .../api/v2/core/event_service_config.upb.h | 2 +- .../envoy/api/v2/core/grpc_service.upb.c | 28 +- .../envoy/api/v2/core/grpc_service.upb.h | 28 +- .../envoy/api/v2/core/health_check.upb.c | 16 +- .../envoy/api/v2/core/health_check.upb.h | 16 +- .../envoy/api/v2/core/http_uri.upb.c | 2 +- .../envoy/api/v2/core/http_uri.upb.h | 2 +- .../envoy/api/v2/core/protocol.upb.c | 2 +- .../envoy/api/v2/core/protocol.upb.h | 2 +- .../envoy/api/v2/core/socket_option.upb.c | 4 +- .../envoy/api/v2/core/socket_option.upb.h | 4 +- .../api/v2/endpoint/endpoint_components.upb.c | 4 +- .../api/v2/endpoint/endpoint_components.upb.h | 4 +- .../upb-generated/envoy/api/v2/listener.upb.c | 2 +- .../upb-generated/envoy/api/v2/listener.upb.h | 2 +- .../api/v2/listener/listener_components.upb.c | 18 +- .../api/v2/listener/listener_components.upb.h | 18 +- .../api/v2/listener/udp_listener_config.upb.c | 4 +- .../api/v2/listener/udp_listener_config.upb.h | 4 +- .../envoy/api/v2/route/route_components.upb.c | 88 +++--- .../envoy/api/v2/route/route_components.upb.h | 88 +++--- .../envoy/api/v2/scoped_route.upb.c | 2 +- .../envoy/api/v2/scoped_route.upb.h | 2 +- .../filter/accesslog/v2/accesslog.upb.c | 30 +- .../filter/accesslog/v2/accesslog.upb.h | 30 +- .../v2/http_connection_manager.upb.c | 20 +- .../v2/http_connection_manager.upb.h | 20 +- .../envoy/config/trace/v2/http_tracer.upb.c | 4 +- .../envoy/config/trace/v2/http_tracer.upb.h | 4 +- .../envoy/type/matcher/regex.upb.c | 2 +- .../envoy/type/matcher/regex.upb.h | 2 +- .../envoy/type/matcher/string.upb.c | 10 +- .../envoy/type/matcher/string.upb.h | 10 +- .../envoy/type/metadata/v2/metadata.upb.c | 10 +- .../envoy/type/metadata/v2/metadata.upb.h | 10 +- .../envoy/type/tracing/v2/custom_tag.upb.c | 8 +- .../envoy/type/tracing/v2/custom_tag.upb.h | 8 +- .../ext/upb-generated/google/api/http.upb.c | 12 +- .../ext/upb-generated/google/api/http.upb.h | 12 +- .../google/protobuf/descriptor.upb.h | 178 +++++------ .../google/protobuf/struct.upb.c | 12 +- .../google/protobuf/struct.upb.h | 12 +- .../src/proto/grpc/gcp/handshaker.upb.c | 10 +- .../src/proto/grpc/gcp/handshaker.upb.h | 10 +- .../src/proto/grpc/lb/v1/load_balancer.upb.c | 10 +- .../src/proto/grpc/lb/v1/load_balancer.upb.h | 10 +- .../ext/upb-generated/validate/validate.upb.c | 68 ++-- .../ext/upb-generated/validate/validate.upb.h | 292 +++++++++--------- 64 files changed, 645 insertions(+), 645 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index f7aba770c1a..d8e9e14edfc 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -267,11 +267,11 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "2384fcce8b72dfb602177f8b90c697f99e9c6ba192163443bacf588d4eb46f71", - strip_prefix = "upb-543a0ce8f21709fe7e65ac5a53cc4136d7b4216c", + sha256 = "43c4f950f01c3d6092c5b1f225188fb62a6080970ffe032b94c49924ed2a469d", + strip_prefix = "upb-7f5b8d73b0d1a481b279de3c6a558015ae1adca5", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/543a0ce8f21709fe7e65ac5a53cc4136d7b4216c.tar.gz", - "https://github.com/protocolbuffers/upb/archive/543a0ce8f21709fe7e65ac5a53cc4136d7b4216c.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/7f5b8d73b0d1a481b279de3c6a558015ae1adca5.tar.gz", + "https://github.com/protocolbuffers/upb/archive/7f5b8d73b0d1a481b279de3c6a558015ae1adca5.tar.gz", ], ) diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c index 8330590d109..9903593ac99 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c @@ -41,8 +41,8 @@ static const upb_msglayout *const envoy_api_v2_auth_PrivateKeyProvider_submsgs[2 static const upb_msglayout_field envoy_api_v2_auth_PrivateKeyProvider__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_auth_PrivateKeyProvider_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h index 94983e7af0b..a4e17b61bc5 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h @@ -127,9 +127,9 @@ typedef enum { UPB_INLINE envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases envoy_api_v2_auth_PrivateKeyProvider_config_type_case(const envoy_api_v2_auth_PrivateKeyProvider* msg) { return (envoy_api_v2_auth_PrivateKeyProvider_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_auth_PrivateKeyProvider_provider_name(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_auth_PrivateKeyProvider_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_api_v2_auth_PrivateKeyProvider_has_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_auth_PrivateKeyProvider_typed_config(const envoy_api_v2_auth_PrivateKeyProvider *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_auth_PrivateKeyProvider_set_provider_name(envoy_api_v2_auth_PrivateKeyProvider *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c index 50c30992939..d34d2257cdf 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c @@ -56,10 +56,10 @@ static const upb_msglayout *const envoy_api_v2_auth_Secret_submsgs[4] = { static const upb_msglayout_field envoy_api_v2_auth_Secret__fields[5] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 2, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 3, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, - {5, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 3, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, }; const upb_msglayout envoy_api_v2_auth_Secret_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h index 2774db5b057..615c30ca5f5 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h @@ -128,13 +128,13 @@ typedef enum { UPB_INLINE envoy_api_v2_auth_Secret_type_oneofcases envoy_api_v2_auth_Secret_type_case(const envoy_api_v2_auth_Secret* msg) { return (envoy_api_v2_auth_Secret_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_auth_Secret_name(const envoy_api_v2_auth_Secret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_auth_Secret_has_tls_certificate(const envoy_api_v2_auth_Secret *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_auth_Secret_has_tls_certificate(const envoy_api_v2_auth_Secret *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct envoy_api_v2_auth_TlsCertificate* envoy_api_v2_auth_Secret_tls_certificate(const envoy_api_v2_auth_Secret *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_TlsCertificate*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_auth_Secret_has_session_ticket_keys(const envoy_api_v2_auth_Secret *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_api_v2_auth_Secret_has_session_ticket_keys(const envoy_api_v2_auth_Secret *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct envoy_api_v2_auth_TlsSessionTicketKeys* envoy_api_v2_auth_Secret_session_ticket_keys(const envoy_api_v2_auth_Secret *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_TlsSessionTicketKeys*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } -UPB_INLINE bool envoy_api_v2_auth_Secret_has_validation_context(const envoy_api_v2_auth_Secret *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } +UPB_INLINE bool envoy_api_v2_auth_Secret_has_validation_context(const envoy_api_v2_auth_Secret *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; } UPB_INLINE const struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_Secret_validation_context(const envoy_api_v2_auth_Secret *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_CertificateValidationContext*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); } -UPB_INLINE bool envoy_api_v2_auth_Secret_has_generic_secret(const envoy_api_v2_auth_Secret *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 5); } +UPB_INLINE bool envoy_api_v2_auth_Secret_has_generic_secret(const envoy_api_v2_auth_Secret *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; } UPB_INLINE const envoy_api_v2_auth_GenericSecret* envoy_api_v2_auth_Secret_generic_secret(const envoy_api_v2_auth_Secret *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_auth_GenericSecret*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); } UPB_INLINE void envoy_api_v2_auth_Secret_set_name(envoy_api_v2_auth_Secret *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c index dc894f8490b..67cc1492b92 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c @@ -49,10 +49,10 @@ static const upb_msglayout_field envoy_api_v2_auth_DownstreamTlsContext__fields[ {1, UPB_SIZE(0, 0), 0, 0, 11, 1}, {2, UPB_SIZE(4, 8), 0, 3, 11, 1}, {3, UPB_SIZE(8, 16), 0, 3, 11, 1}, - {4, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 2, 11, 1}, - {5, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 1, 11, 1}, + {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, + {5, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, {6, UPB_SIZE(12, 24), 0, 4, 11, 1}, - {7, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 0, 8, 1}, + {7, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 8, 1}, }; const upb_msglayout envoy_api_v2_auth_DownstreamTlsContext_msginit = { @@ -72,11 +72,11 @@ static const upb_msglayout *const envoy_api_v2_auth_CommonTlsContext_submsgs[6] static const upb_msglayout_field envoy_api_v2_auth_CommonTlsContext__fields[7] = { {1, UPB_SIZE(0, 0), 0, 4, 11, 1}, {2, UPB_SIZE(4, 8), 0, 3, 11, 3}, - {3, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 0, 11, 1}, + {3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 11, 1}, {4, UPB_SIZE(8, 16), 0, 0, 9, 3}, {6, UPB_SIZE(12, 24), 0, 2, 11, 3}, - {7, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 2, 11, 1}, - {8, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 1, 11, 1}, + {7, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, + {8, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, }; const upb_msglayout envoy_api_v2_auth_CommonTlsContext_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h index ea027e17071..75f5bea8a6e 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h @@ -129,13 +129,13 @@ UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_require_client_certif UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_require_client_certificate(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); } UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_require_sni(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_auth_DownstreamTlsContext_require_sni(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); } -UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_session_ticket_keys(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } +UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_session_ticket_keys(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 4; } UPB_INLINE const struct envoy_api_v2_auth_TlsSessionTicketKeys* envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_TlsSessionTicketKeys*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); } -UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_session_ticket_keys_sds_secret_config(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 5); } +UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_session_ticket_keys_sds_secret_config(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 5; } UPB_INLINE const struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_DownstreamTlsContext_session_ticket_keys_sds_secret_config(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 5, NULL); } UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_session_timeout(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_auth_DownstreamTlsContext_session_timeout(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); } -UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_disable_stateless_session_resumption(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 7); } +UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_has_disable_stateless_session_resumption(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 7; } UPB_INLINE bool envoy_api_v2_auth_DownstreamTlsContext_disable_stateless_session_resumption(const envoy_api_v2_auth_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 7, false); } UPB_INLINE void envoy_api_v2_auth_DownstreamTlsContext_set_common_tls_context(envoy_api_v2_auth_DownstreamTlsContext *msg, envoy_api_v2_auth_CommonTlsContext* value) { @@ -240,14 +240,14 @@ UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_tls_params(const envoy_ap UPB_INLINE const struct envoy_api_v2_auth_TlsParameters* envoy_api_v2_auth_CommonTlsContext_tls_params(const envoy_api_v2_auth_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_api_v2_auth_TlsParameters*); } UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_tls_certificates(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const struct envoy_api_v2_auth_TlsCertificate* const* envoy_api_v2_auth_CommonTlsContext_tls_certificates(const envoy_api_v2_auth_CommonTlsContext *msg, size_t *len) { return (const struct envoy_api_v2_auth_TlsCertificate* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } -UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 3); } +UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 3; } UPB_INLINE const struct envoy_api_v2_auth_CertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_CertificateValidationContext*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, NULL); } UPB_INLINE upb_strview const* envoy_api_v2_auth_CommonTlsContext_alpn_protocols(const envoy_api_v2_auth_CommonTlsContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_tls_certificate_sds_secret_configs(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const struct envoy_api_v2_auth_SdsSecretConfig* const* envoy_api_v2_auth_CommonTlsContext_tls_certificate_sds_secret_configs(const envoy_api_v2_auth_CommonTlsContext *msg, size_t *len) { return (const struct envoy_api_v2_auth_SdsSecretConfig* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } -UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_validation_context_sds_secret_config(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 7); } +UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_validation_context_sds_secret_config(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 7; } UPB_INLINE const struct envoy_api_v2_auth_SdsSecretConfig* envoy_api_v2_auth_CommonTlsContext_validation_context_sds_secret_config(const envoy_api_v2_auth_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_auth_SdsSecretConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 7, NULL); } -UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_combined_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 8); } +UPB_INLINE bool envoy_api_v2_auth_CommonTlsContext_has_combined_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 8; } UPB_INLINE const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext* envoy_api_v2_auth_CommonTlsContext_combined_validation_context(const envoy_api_v2_auth_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 8, NULL); } UPB_INLINE void envoy_api_v2_auth_CommonTlsContext_set_tls_params(envoy_api_v2_auth_CommonTlsContext *msg, struct envoy_api_v2_auth_TlsParameters* value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c index 185fc136437..7457707e946 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c @@ -66,7 +66,7 @@ static const upb_msglayout *const envoy_api_v2_Cluster_submsgs[34] = { static const upb_msglayout_field envoy_api_v2_Cluster__fields[45] = { {1, UPB_SIZE(32, 32), 0, 0, 9, 1}, - {2, UPB_SIZE(168, 304), UPB_SIZE(-176, -312), 0, 14, 1}, + {2, UPB_SIZE(168, 304), UPB_SIZE(-177, -313), 0, 14, 1}, {3, UPB_SIZE(48, 64), 0, 2, 11, 1}, {4, UPB_SIZE(52, 72), 0, 28, 11, 1}, {5, UPB_SIZE(56, 80), 0, 29, 11, 1}, @@ -85,7 +85,7 @@ static const upb_msglayout_field envoy_api_v2_Cluster__fields[45] = { {20, UPB_SIZE(88, 144), 0, 28, 11, 1}, {21, UPB_SIZE(92, 152), 0, 19, 11, 1}, {22, UPB_SIZE(96, 160), 0, 4, 11, 1}, - {23, UPB_SIZE(180, 320), UPB_SIZE(-184, -328), 8, 11, 1}, + {23, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 8, 11, 1}, {24, UPB_SIZE(100, 168), 0, 26, 11, 1}, {25, UPB_SIZE(104, 176), 0, 25, 11, 1}, {26, UPB_SIZE(16, 16), 0, 0, 14, 1}, @@ -96,11 +96,11 @@ static const upb_msglayout_field envoy_api_v2_Cluster__fields[45] = { {31, UPB_SIZE(24, 24), 0, 0, 8, 1}, {32, UPB_SIZE(25, 25), 0, 0, 8, 1}, {33, UPB_SIZE(120, 208), 0, 11, 11, 1}, - {34, UPB_SIZE(180, 320), UPB_SIZE(-184, -328), 6, 11, 1}, + {34, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 6, 11, 1}, {35, UPB_SIZE(152, 272), 0, 3, 11, _UPB_LABEL_MAP}, {36, UPB_SIZE(156, 280), 0, 10, 11, _UPB_LABEL_MAP}, - {37, UPB_SIZE(180, 320), UPB_SIZE(-184, -328), 5, 11, 1}, - {38, UPB_SIZE(168, 304), UPB_SIZE(-176, -312), 1, 11, 1}, + {37, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 5, 11, 1}, + {38, UPB_SIZE(168, 304), UPB_SIZE(-177, -313), 1, 11, 1}, {39, UPB_SIZE(26, 26), 0, 0, 8, 1}, {40, UPB_SIZE(160, 288), 0, 16, 11, 3}, {41, UPB_SIZE(124, 216), 0, 12, 11, 1}, @@ -248,8 +248,8 @@ static const upb_msglayout *const envoy_api_v2_Cluster_CommonLbConfig_submsgs[5] static const upb_msglayout_field envoy_api_v2_Cluster_CommonLbConfig__fields[7] = { {1, UPB_SIZE(4, 8), 0, 3, 11, 1}, - {2, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 2, 11, 1}, - {3, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 1, 11, 1}, + {2, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, + {3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, {4, UPB_SIZE(8, 16), 0, 4, 11, 1}, {5, UPB_SIZE(0, 0), 0, 0, 8, 1}, {6, UPB_SIZE(1, 1), 0, 0, 8, 1}, diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h index b5664d7f1b1..ff0e8887c96 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h @@ -204,7 +204,7 @@ typedef enum { UPB_INLINE envoy_api_v2_Cluster_lb_config_oneofcases envoy_api_v2_Cluster_lb_config_case(const envoy_api_v2_Cluster* msg) { return (envoy_api_v2_Cluster_lb_config_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(184, 328), int32_t); } UPB_INLINE upb_strview envoy_api_v2_Cluster_name(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); } -UPB_INLINE bool envoy_api_v2_Cluster_has_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(176, 312), 2); } +UPB_INLINE bool envoy_api_v2_Cluster_has_type(const envoy_api_v2_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(176, 312)) == 2; } UPB_INLINE int32_t envoy_api_v2_Cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(168, 304), UPB_SIZE(176, 312), 2, envoy_api_v2_Cluster_STATIC); } UPB_INLINE bool envoy_api_v2_Cluster_has_eds_cluster_config(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 64)); } UPB_INLINE const envoy_api_v2_Cluster_EdsClusterConfig* envoy_api_v2_Cluster_eds_cluster_config(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), const envoy_api_v2_Cluster_EdsClusterConfig*); } @@ -240,7 +240,7 @@ UPB_INLINE bool envoy_api_v2_Cluster_has_upstream_bind_config(const envoy_api_v2 UPB_INLINE const struct envoy_api_v2_core_BindConfig* envoy_api_v2_Cluster_upstream_bind_config(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 152), const struct envoy_api_v2_core_BindConfig*); } UPB_INLINE bool envoy_api_v2_Cluster_has_lb_subset_config(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 160)); } UPB_INLINE const envoy_api_v2_Cluster_LbSubsetConfig* envoy_api_v2_Cluster_lb_subset_config(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(96, 160), const envoy_api_v2_Cluster_LbSubsetConfig*); } -UPB_INLINE bool envoy_api_v2_Cluster_has_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(184, 328), 23); } +UPB_INLINE bool envoy_api_v2_Cluster_has_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(184, 328)) == 23; } UPB_INLINE const envoy_api_v2_Cluster_RingHashLbConfig* envoy_api_v2_Cluster_ring_hash_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_RingHashLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 23, NULL); } UPB_INLINE bool envoy_api_v2_Cluster_has_transport_socket(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 168)); } UPB_INLINE const struct envoy_api_v2_core_TransportSocket* envoy_api_v2_Cluster_transport_socket(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 168), const struct envoy_api_v2_core_TransportSocket*); } @@ -258,7 +258,7 @@ UPB_INLINE bool envoy_api_v2_Cluster_close_connections_on_host_health_failure(co UPB_INLINE bool envoy_api_v2_Cluster_drain_connections_on_host_removal(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); } UPB_INLINE bool envoy_api_v2_Cluster_has_load_assignment(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(120, 208)); } UPB_INLINE const struct envoy_api_v2_ClusterLoadAssignment* envoy_api_v2_Cluster_load_assignment(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(120, 208), const struct envoy_api_v2_ClusterLoadAssignment*); } -UPB_INLINE bool envoy_api_v2_Cluster_has_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(184, 328), 34); } +UPB_INLINE bool envoy_api_v2_Cluster_has_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(184, 328)) == 34; } UPB_INLINE const envoy_api_v2_Cluster_OriginalDstLbConfig* envoy_api_v2_Cluster_original_dst_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_OriginalDstLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 34, NULL); } UPB_INLINE bool envoy_api_v2_Cluster_has_extension_protocol_options(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(152, 272)); } UPB_INLINE size_t envoy_api_v2_Cluster_extension_protocol_options_size(const envoy_api_v2_Cluster *msg) {return _upb_msg_map_size(msg, UPB_SIZE(152, 272)); } @@ -268,9 +268,9 @@ UPB_INLINE bool envoy_api_v2_Cluster_has_typed_extension_protocol_options(const UPB_INLINE size_t envoy_api_v2_Cluster_typed_extension_protocol_options_size(const envoy_api_v2_Cluster *msg) {return _upb_msg_map_size(msg, UPB_SIZE(156, 280)); } UPB_INLINE bool envoy_api_v2_Cluster_typed_extension_protocol_options_get(const envoy_api_v2_Cluster *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(156, 280), &key, 0, val, sizeof(*val)); } UPB_INLINE const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry* envoy_api_v2_Cluster_typed_extension_protocol_options_next(const envoy_api_v2_Cluster *msg, size_t* iter) { return (const envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(156, 280), iter); } -UPB_INLINE bool envoy_api_v2_Cluster_has_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(184, 328), 37); } +UPB_INLINE bool envoy_api_v2_Cluster_has_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(184, 328)) == 37; } UPB_INLINE const envoy_api_v2_Cluster_LeastRequestLbConfig* envoy_api_v2_Cluster_least_request_lb_config(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_LeastRequestLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 37, NULL); } -UPB_INLINE bool envoy_api_v2_Cluster_has_cluster_type(const envoy_api_v2_Cluster *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(176, 312), 38); } +UPB_INLINE bool envoy_api_v2_Cluster_has_cluster_type(const envoy_api_v2_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(176, 312)) == 38; } UPB_INLINE const envoy_api_v2_Cluster_CustomClusterType* envoy_api_v2_Cluster_cluster_type(const envoy_api_v2_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CustomClusterType*, UPB_SIZE(168, 304), UPB_SIZE(176, 312), 38, NULL); } UPB_INLINE bool envoy_api_v2_Cluster_respect_dns_ttl(const envoy_api_v2_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); } UPB_INLINE bool envoy_api_v2_Cluster_has_filters(const envoy_api_v2_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(160, 288)); } @@ -1063,9 +1063,9 @@ UPB_INLINE envoy_api_v2_Cluster_CommonLbConfig_locality_config_specifier_oneofca UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_healthy_panic_threshold(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const struct envoy_type_Percent* envoy_api_v2_Cluster_CommonLbConfig_healthy_panic_threshold(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_Percent*); } -UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_zone_aware_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 2); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_zone_aware_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 2; } UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig* envoy_api_v2_Cluster_CommonLbConfig_zone_aware_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 2, NULL); } -UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_locality_weighted_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 3); } +UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_locality_weighted_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 3; } UPB_INLINE const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig* envoy_api_v2_Cluster_CommonLbConfig_locality_weighted_lb_config(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, NULL); } UPB_INLINE bool envoy_api_v2_Cluster_CommonLbConfig_has_update_merge_window(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_Cluster_CommonLbConfig_update_merge_window(const envoy_api_v2_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c index d02c20ca972..7e9fae2e5b8 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c @@ -31,8 +31,8 @@ const upb_msglayout envoy_api_v2_core_Pipe_msginit = { static const upb_msglayout_field envoy_api_v2_core_SocketAddress__fields[6] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, {2, UPB_SIZE(12, 16), 0, 0, 9, 1}, - {3, UPB_SIZE(28, 48), UPB_SIZE(-36, -64), 0, 13, 1}, - {4, UPB_SIZE(28, 48), UPB_SIZE(-36, -64), 0, 9, 1}, + {3, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 13, 1}, + {4, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 9, 1}, {5, UPB_SIZE(20, 32), 0, 0, 9, 1}, {6, UPB_SIZE(8, 8), 0, 0, 8, 1}, }; @@ -83,8 +83,8 @@ static const upb_msglayout *const envoy_api_v2_core_Address_submsgs[2] = { }; static const upb_msglayout_field envoy_api_v2_core_Address__fields[2] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_Address_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h index cd84e98d3a5..84a194c2203 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h @@ -97,9 +97,9 @@ UPB_INLINE envoy_api_v2_core_SocketAddress_port_specifier_oneofcases envoy_api_v UPB_INLINE int32_t envoy_api_v2_core_SocketAddress_protocol(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_address(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } -UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_port_value(const envoy_api_v2_core_SocketAddress *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 64), 3); } +UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_port_value(const envoy_api_v2_core_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 64)) == 3; } UPB_INLINE uint32_t envoy_api_v2_core_SocketAddress_port_value(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 3, 0); } -UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_named_port(const envoy_api_v2_core_SocketAddress *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 64), 4); } +UPB_INLINE bool envoy_api_v2_core_SocketAddress_has_named_port(const envoy_api_v2_core_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 64)) == 4; } UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_named_port(const envoy_api_v2_core_SocketAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 4, upb_strview_make("", strlen(""))); } UPB_INLINE upb_strview envoy_api_v2_core_SocketAddress_resolver_name(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview); } UPB_INLINE bool envoy_api_v2_core_SocketAddress_ipv4_compat(const envoy_api_v2_core_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } @@ -261,9 +261,9 @@ typedef enum { } envoy_api_v2_core_Address_address_oneofcases; UPB_INLINE envoy_api_v2_core_Address_address_oneofcases envoy_api_v2_core_Address_address_case(const envoy_api_v2_core_Address* msg) { return (envoy_api_v2_core_Address_address_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_api_v2_core_Address_has_socket_address(const envoy_api_v2_core_Address *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_api_v2_core_Address_has_socket_address(const envoy_api_v2_core_Address *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_api_v2_core_SocketAddress* envoy_api_v2_core_Address_socket_address(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_SocketAddress*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_api_v2_core_Address_has_pipe(const envoy_api_v2_core_Address *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_api_v2_core_Address_has_pipe(const envoy_api_v2_core_Address *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const envoy_api_v2_core_Pipe* envoy_api_v2_core_Address_pipe(const envoy_api_v2_core_Address *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_Pipe*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } UPB_INLINE void envoy_api_v2_core_Address_set_socket_address(envoy_api_v2_core_Address *msg, envoy_api_v2_core_SocketAddress* value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c index 224418d653d..8973bf0c876 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c @@ -86,8 +86,8 @@ static const upb_msglayout_field envoy_api_v2_core_Node__fields[11] = { {4, UPB_SIZE(36, 72), 0, 3, 11, 1}, {5, UPB_SIZE(16, 32), 0, 0, 9, 1}, {6, UPB_SIZE(24, 48), 0, 0, 9, 1}, - {7, UPB_SIZE(52, 104), UPB_SIZE(-60, -120), 0, 9, 1}, - {8, UPB_SIZE(52, 104), UPB_SIZE(-60, -120), 1, 11, 1}, + {7, UPB_SIZE(52, 104), UPB_SIZE(-61, -121), 0, 9, 1}, + {8, UPB_SIZE(52, 104), UPB_SIZE(-61, -121), 1, 11, 1}, {9, UPB_SIZE(40, 80), 0, 2, 11, 3}, {10, UPB_SIZE(44, 88), 0, 0, 9, 3}, {11, UPB_SIZE(48, 96), 0, 0, 11, 3}, @@ -207,9 +207,9 @@ const upb_msglayout envoy_api_v2_core_HeaderMap_msginit = { }; static const upb_msglayout_field envoy_api_v2_core_DataSource__fields[3] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 12, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 12, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, }; const upb_msglayout envoy_api_v2_core_DataSource_msginit = { @@ -257,8 +257,8 @@ static const upb_msglayout *const envoy_api_v2_core_AsyncDataSource_submsgs[2] = }; static const upb_msglayout_field envoy_api_v2_core_AsyncDataSource__fields[2] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, }; const upb_msglayout envoy_api_v2_core_AsyncDataSource_msginit = { @@ -274,8 +274,8 @@ static const upb_msglayout *const envoy_api_v2_core_TransportSocket_submsgs[2] = static const upb_msglayout_field envoy_api_v2_core_TransportSocket__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_TransportSocket_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h index a7f01d8d825..ca9dd2f98e8 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h @@ -270,9 +270,9 @@ UPB_INLINE bool envoy_api_v2_core_Node_has_locality(const envoy_api_v2_core_Node UPB_INLINE const envoy_api_v2_core_Locality* envoy_api_v2_core_Node_locality(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const envoy_api_v2_core_Locality*); } UPB_INLINE upb_strview envoy_api_v2_core_Node_build_version(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); } UPB_INLINE upb_strview envoy_api_v2_core_Node_user_agent_name(const envoy_api_v2_core_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview); } -UPB_INLINE bool envoy_api_v2_core_Node_has_user_agent_version(const envoy_api_v2_core_Node *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(60, 120), 7); } +UPB_INLINE bool envoy_api_v2_core_Node_has_user_agent_version(const envoy_api_v2_core_Node *msg) { return _upb_getoneofcase(msg, UPB_SIZE(60, 120)) == 7; } UPB_INLINE upb_strview envoy_api_v2_core_Node_user_agent_version(const envoy_api_v2_core_Node *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(52, 104), UPB_SIZE(60, 120), 7, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_core_Node_has_user_agent_build_version(const envoy_api_v2_core_Node *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(60, 120), 8); } +UPB_INLINE bool envoy_api_v2_core_Node_has_user_agent_build_version(const envoy_api_v2_core_Node *msg) { return _upb_getoneofcase(msg, UPB_SIZE(60, 120)) == 8; } UPB_INLINE const envoy_api_v2_core_BuildVersion* envoy_api_v2_core_Node_user_agent_build_version(const envoy_api_v2_core_Node *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_BuildVersion*, UPB_SIZE(52, 104), UPB_SIZE(60, 120), 8, NULL); } UPB_INLINE bool envoy_api_v2_core_Node_has_extensions(const envoy_api_v2_core_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } UPB_INLINE const envoy_api_v2_core_Extension* const* envoy_api_v2_core_Node_extensions(const envoy_api_v2_core_Node *msg, size_t *len) { return (const envoy_api_v2_core_Extension* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); } @@ -613,11 +613,11 @@ typedef enum { } envoy_api_v2_core_DataSource_specifier_oneofcases; UPB_INLINE envoy_api_v2_core_DataSource_specifier_oneofcases envoy_api_v2_core_DataSource_specifier_case(const envoy_api_v2_core_DataSource* msg) { return (envoy_api_v2_core_DataSource_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } -UPB_INLINE bool envoy_api_v2_core_DataSource_has_filename(const envoy_api_v2_core_DataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE bool envoy_api_v2_core_DataSource_has_filename(const envoy_api_v2_core_DataSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; } UPB_INLINE upb_strview envoy_api_v2_core_DataSource_filename(const envoy_api_v2_core_DataSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_core_DataSource_has_inline_bytes(const envoy_api_v2_core_DataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } +UPB_INLINE bool envoy_api_v2_core_DataSource_has_inline_bytes(const envoy_api_v2_core_DataSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; } UPB_INLINE upb_strview envoy_api_v2_core_DataSource_inline_bytes(const envoy_api_v2_core_DataSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_core_DataSource_has_inline_string(const envoy_api_v2_core_DataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); } +UPB_INLINE bool envoy_api_v2_core_DataSource_has_inline_string(const envoy_api_v2_core_DataSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 3; } UPB_INLINE upb_strview envoy_api_v2_core_DataSource_inline_string(const envoy_api_v2_core_DataSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, upb_strview_make("", strlen(""))); } UPB_INLINE void envoy_api_v2_core_DataSource_set_filename(envoy_api_v2_core_DataSource *msg, upb_strview value) { @@ -743,9 +743,9 @@ typedef enum { } envoy_api_v2_core_AsyncDataSource_specifier_oneofcases; UPB_INLINE envoy_api_v2_core_AsyncDataSource_specifier_oneofcases envoy_api_v2_core_AsyncDataSource_specifier_case(const envoy_api_v2_core_AsyncDataSource* msg) { return (envoy_api_v2_core_AsyncDataSource_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_local(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_local(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_api_v2_core_DataSource* envoy_api_v2_core_AsyncDataSource_local(const envoy_api_v2_core_AsyncDataSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_DataSource*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_remote(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_api_v2_core_AsyncDataSource_has_remote(const envoy_api_v2_core_AsyncDataSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const envoy_api_v2_core_RemoteDataSource* envoy_api_v2_core_AsyncDataSource_remote(const envoy_api_v2_core_AsyncDataSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_RemoteDataSource*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } UPB_INLINE void envoy_api_v2_core_AsyncDataSource_set_local(envoy_api_v2_core_AsyncDataSource *msg, envoy_api_v2_core_DataSource* value) { @@ -795,9 +795,9 @@ typedef enum { UPB_INLINE envoy_api_v2_core_TransportSocket_config_type_oneofcases envoy_api_v2_core_TransportSocket_config_type_case(const envoy_api_v2_core_TransportSocket* msg) { return (envoy_api_v2_core_TransportSocket_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_core_TransportSocket_name(const envoy_api_v2_core_TransportSocket *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_core_TransportSocket_has_config(const envoy_api_v2_core_TransportSocket *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_core_TransportSocket_has_config(const envoy_api_v2_core_TransportSocket *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_TransportSocket_config(const envoy_api_v2_core_TransportSocket *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_core_TransportSocket_has_typed_config(const envoy_api_v2_core_TransportSocket *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_api_v2_core_TransportSocket_has_typed_config(const envoy_api_v2_core_TransportSocket *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_core_TransportSocket_typed_config(const envoy_api_v2_core_TransportSocket *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_core_TransportSocket_set_name(envoy_api_v2_core_TransportSocket *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c index 0e186f97758..3f0fc4c16a2 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c @@ -78,11 +78,11 @@ static const upb_msglayout *const envoy_api_v2_core_ConfigSource_submsgs[4] = { }; static const upb_msglayout_field envoy_api_v2_core_ConfigSource__fields[6] = { - {1, UPB_SIZE(12, 16), UPB_SIZE(-20, -32), 0, 9, 1}, - {2, UPB_SIZE(12, 16), UPB_SIZE(-20, -32), 1, 11, 1}, - {3, UPB_SIZE(12, 16), UPB_SIZE(-20, -32), 0, 11, 1}, + {1, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 0, 9, 1}, + {2, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 1, 11, 1}, + {3, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 0, 11, 1}, {4, UPB_SIZE(8, 8), 0, 3, 11, 1}, - {5, UPB_SIZE(12, 16), UPB_SIZE(-20, -32), 2, 11, 1}, + {5, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 2, 11, 1}, {6, UPB_SIZE(0, 0), 0, 0, 14, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h index dbde01c55b2..eb0fa1137c1 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h @@ -252,15 +252,15 @@ typedef enum { } envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases; UPB_INLINE envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases envoy_api_v2_core_ConfigSource_config_source_specifier_case(const envoy_api_v2_core_ConfigSource* msg) { return (envoy_api_v2_core_ConfigSource_config_source_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 32), int32_t); } -UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_path(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 1); } +UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_path(const envoy_api_v2_core_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 1; } UPB_INLINE upb_strview envoy_api_v2_core_ConfigSource_path(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 1, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_api_config_source(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 2); } +UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_api_config_source(const envoy_api_v2_core_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 2; } UPB_INLINE const envoy_api_v2_core_ApiConfigSource* envoy_api_v2_core_ConfigSource_api_config_source(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_ApiConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 2, NULL); } -UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_ads(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 3); } +UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_ads(const envoy_api_v2_core_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 3; } UPB_INLINE const envoy_api_v2_core_AggregatedConfigSource* envoy_api_v2_core_ConfigSource_ads(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_AggregatedConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 3, NULL); } UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_ConfigSource_initial_fetch_timeout(const envoy_api_v2_core_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Duration*); } -UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_self(const envoy_api_v2_core_ConfigSource *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 5); } +UPB_INLINE bool envoy_api_v2_core_ConfigSource_has_self(const envoy_api_v2_core_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 5; } UPB_INLINE const envoy_api_v2_core_SelfConfigSource* envoy_api_v2_core_ConfigSource_self(const envoy_api_v2_core_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_SelfConfigSource*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 5, NULL); } UPB_INLINE int32_t envoy_api_v2_core_ConfigSource_resource_api_version(const envoy_api_v2_core_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c index 62f14929669..5c7d8abef18 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c @@ -21,7 +21,7 @@ static const upb_msglayout *const envoy_api_v2_core_EventServiceConfig_submsgs[1 }; static const upb_msglayout_field envoy_api_v2_core_EventServiceConfig__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_EventServiceConfig_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h index 6f67fb08a54..811203ea6da 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h @@ -46,7 +46,7 @@ typedef enum { } envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases; UPB_INLINE envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases envoy_api_v2_core_EventServiceConfig_config_source_specifier_case(const envoy_api_v2_core_EventServiceConfig* msg) { return (envoy_api_v2_core_EventServiceConfig_config_source_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_api_v2_core_EventServiceConfig_has_grpc_service(const envoy_api_v2_core_EventServiceConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_api_v2_core_EventServiceConfig_has_grpc_service(const envoy_api_v2_core_EventServiceConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const struct envoy_api_v2_core_GrpcService* envoy_api_v2_core_EventServiceConfig_grpc_service(const envoy_api_v2_core_EventServiceConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_GrpcService*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } UPB_INLINE void envoy_api_v2_core_EventServiceConfig_set_grpc_service(envoy_api_v2_core_EventServiceConfig *msg, struct envoy_api_v2_core_GrpcService* value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c index 68c2c7bbc46..bcf33a0744a 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c @@ -29,8 +29,8 @@ static const upb_msglayout *const envoy_api_v2_core_GrpcService_submsgs[4] = { }; static const upb_msglayout_field envoy_api_v2_core_GrpcService__fields[4] = { - {1, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, + {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, {3, UPB_SIZE(0, 0), 0, 3, 11, 1}, {5, UPB_SIZE(4, 8), 0, 2, 11, 3}, }; @@ -101,9 +101,9 @@ static const upb_msglayout *const envoy_api_v2_core_GrpcService_GoogleGrpc_Chann }; static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials__fields[3] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_msginit = { @@ -121,13 +121,13 @@ static const upb_msglayout *const envoy_api_v2_core_GrpcService_GoogleGrpc_CallC }; static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials__fields[7] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 4, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 2, 11, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 1, 11, 1}, - {7, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 3, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 4, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 2, 11, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 1, 11, 1}, + {7, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 3, 11, 1}, }; const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_msginit = { @@ -165,8 +165,8 @@ static const upb_msglayout *const envoy_api_v2_core_GrpcService_GoogleGrpc_CallC static const upb_msglayout_field envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h index 0d12135838a..968cc0b0baf 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h @@ -87,9 +87,9 @@ typedef enum { } envoy_api_v2_core_GrpcService_target_specifier_oneofcases; UPB_INLINE envoy_api_v2_core_GrpcService_target_specifier_oneofcases envoy_api_v2_core_GrpcService_target_specifier_case(const envoy_api_v2_core_GrpcService* msg) { return (envoy_api_v2_core_GrpcService_target_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_has_envoy_grpc(const envoy_api_v2_core_GrpcService *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_has_envoy_grpc(const envoy_api_v2_core_GrpcService *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; } UPB_INLINE const envoy_api_v2_core_GrpcService_EnvoyGrpc* envoy_api_v2_core_GrpcService_envoy_grpc(const envoy_api_v2_core_GrpcService *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_EnvoyGrpc*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_has_google_grpc(const envoy_api_v2_core_GrpcService *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_has_google_grpc(const envoy_api_v2_core_GrpcService *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc* envoy_api_v2_core_GrpcService_google_grpc(const envoy_api_v2_core_GrpcService *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } UPB_INLINE bool envoy_api_v2_core_GrpcService_has_timeout(const envoy_api_v2_core_GrpcService *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_GrpcService_timeout(const envoy_api_v2_core_GrpcService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); } @@ -333,11 +333,11 @@ typedef enum { } envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_oneofcases; UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_credential_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_has_ssl_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_has_ssl_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_ssl_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_has_google_default(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_has_google_default(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const struct google_protobuf_Empty* envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_google_default(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Empty*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_has_local_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_has_local_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_local_credentials(const envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_set_ssl_credentials(envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials *msg, envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials* value) { @@ -403,19 +403,19 @@ typedef enum { } envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_oneofcases; UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_credential_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_access_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_access_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; } UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_access_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_google_compute_engine(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_google_compute_engine(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; } UPB_INLINE const struct google_protobuf_Empty* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_google_compute_engine(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Empty*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, NULL); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_google_refresh_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_google_refresh_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 3; } UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_google_refresh_token(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_service_account_jwt_access(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 4); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_service_account_jwt_access(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 4; } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_service_account_jwt_access(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 4, NULL); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_google_iam(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 5); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_google_iam(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 5; } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_google_iam(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 5, NULL); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_from_plugin(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 6); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_from_plugin(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 6; } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_from_plugin(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 6, NULL); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_sts_service(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 7); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_has_sts_service(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 7; } UPB_INLINE const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_sts_service(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 7, NULL); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_set_access_token(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials *msg, upb_strview value) { @@ -555,9 +555,9 @@ typedef enum { UPB_INLINE envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_oneofcases envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_case(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin* msg) { return (envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_name(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_has_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_has_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_has_typed_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_has_typed_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_typed_config(const envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_set_name(envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c index 0cb8947f054..f62e741d480 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c @@ -45,11 +45,11 @@ static const upb_msglayout_field envoy_api_v2_core_HealthCheck__fields[21] = { {5, UPB_SIZE(32, 56), 0, 8, 11, 1}, {6, UPB_SIZE(36, 64), 0, 8, 11, 1}, {7, UPB_SIZE(40, 72), 0, 6, 11, 1}, - {8, UPB_SIZE(72, 136), UPB_SIZE(-76, -144), 3, 11, 1}, - {9, UPB_SIZE(72, 136), UPB_SIZE(-76, -144), 4, 11, 1}, - {11, UPB_SIZE(72, 136), UPB_SIZE(-76, -144), 2, 11, 1}, + {8, UPB_SIZE(72, 136), UPB_SIZE(-77, -145), 3, 11, 1}, + {9, UPB_SIZE(72, 136), UPB_SIZE(-77, -145), 4, 11, 1}, + {11, UPB_SIZE(72, 136), UPB_SIZE(-77, -145), 2, 11, 1}, {12, UPB_SIZE(44, 80), 0, 7, 11, 1}, - {13, UPB_SIZE(72, 136), UPB_SIZE(-76, -144), 1, 11, 1}, + {13, UPB_SIZE(72, 136), UPB_SIZE(-77, -145), 1, 11, 1}, {14, UPB_SIZE(48, 88), 0, 7, 11, 1}, {15, UPB_SIZE(52, 96), 0, 7, 11, 1}, {16, UPB_SIZE(56, 104), 0, 7, 11, 1}, @@ -68,8 +68,8 @@ const upb_msglayout envoy_api_v2_core_HealthCheck_msginit = { }; static const upb_msglayout_field envoy_api_v2_core_HealthCheck_Payload__fields[2] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 12, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 12, 1}, }; const upb_msglayout envoy_api_v2_core_HealthCheck_Payload_msginit = { @@ -148,8 +148,8 @@ static const upb_msglayout *const envoy_api_v2_core_HealthCheck_CustomHealthChec static const upb_msglayout_field envoy_api_v2_core_HealthCheck_CustomHealthCheck__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h index 663c1002fc4..4a904bde3c7 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h @@ -109,15 +109,15 @@ UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_alt_port(const envoy_api_v2_co UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_core_HealthCheck_alt_port(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const struct google_protobuf_UInt32Value*); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_reuse_connection(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_core_HealthCheck_reuse_connection(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct google_protobuf_BoolValue*); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_http_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(76, 144), 8); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_http_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(76, 144)) == 8; } UPB_INLINE const envoy_api_v2_core_HealthCheck_HttpHealthCheck* envoy_api_v2_core_HealthCheck_http_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_HttpHealthCheck*, UPB_SIZE(72, 136), UPB_SIZE(76, 144), 8, NULL); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_tcp_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(76, 144), 9); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_tcp_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(76, 144)) == 9; } UPB_INLINE const envoy_api_v2_core_HealthCheck_TcpHealthCheck* envoy_api_v2_core_HealthCheck_tcp_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_TcpHealthCheck*, UPB_SIZE(72, 136), UPB_SIZE(76, 144), 9, NULL); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_grpc_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(76, 144), 11); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_grpc_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(76, 144)) == 11; } UPB_INLINE const envoy_api_v2_core_HealthCheck_GrpcHealthCheck* envoy_api_v2_core_HealthCheck_grpc_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_GrpcHealthCheck*, UPB_SIZE(72, 136), UPB_SIZE(76, 144), 11, NULL); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_no_traffic_interval(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_no_traffic_interval(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const struct google_protobuf_Duration*); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_custom_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(76, 144), 13); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_custom_health_check(const envoy_api_v2_core_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(76, 144)) == 13; } UPB_INLINE const envoy_api_v2_core_HealthCheck_CustomHealthCheck* envoy_api_v2_core_HealthCheck_custom_health_check(const envoy_api_v2_core_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_HealthCheck_CustomHealthCheck*, UPB_SIZE(72, 136), UPB_SIZE(76, 144), 13, NULL); } UPB_INLINE bool envoy_api_v2_core_HealthCheck_has_unhealthy_interval(const envoy_api_v2_core_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 88)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HealthCheck_unhealthy_interval(const envoy_api_v2_core_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 88), const struct google_protobuf_Duration*); } @@ -382,9 +382,9 @@ typedef enum { } envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases; UPB_INLINE envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases envoy_api_v2_core_HealthCheck_Payload_payload_case(const envoy_api_v2_core_HealthCheck_Payload* msg) { return (envoy_api_v2_core_HealthCheck_Payload_payload_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_Payload_has_text(const envoy_api_v2_core_HealthCheck_Payload *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_Payload_has_text(const envoy_api_v2_core_HealthCheck_Payload *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; } UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_Payload_text(const envoy_api_v2_core_HealthCheck_Payload *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_Payload_has_binary(const envoy_api_v2_core_HealthCheck_Payload *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_Payload_has_binary(const envoy_api_v2_core_HealthCheck_Payload *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; } UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_Payload_binary(const envoy_api_v2_core_HealthCheck_Payload *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, upb_strview_make("", strlen(""))); } UPB_INLINE void envoy_api_v2_core_HealthCheck_Payload_set_text(envoy_api_v2_core_HealthCheck_Payload *msg, upb_strview value) { @@ -624,9 +624,9 @@ typedef enum { UPB_INLINE envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_case(const envoy_api_v2_core_HealthCheck_CustomHealthCheck* msg) { return (envoy_api_v2_core_HealthCheck_CustomHealthCheck_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_core_HealthCheck_CustomHealthCheck_name(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_CustomHealthCheck_has_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_CustomHealthCheck_has_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_core_HealthCheck_CustomHealthCheck_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_core_HealthCheck_CustomHealthCheck_has_typed_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_api_v2_core_HealthCheck_CustomHealthCheck_has_typed_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_core_HealthCheck_CustomHealthCheck_typed_config(const envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_core_HealthCheck_CustomHealthCheck_set_name(envoy_api_v2_core_HealthCheck_CustomHealthCheck *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c index ad1e0dcc35c..34e945c39f9 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c @@ -22,7 +22,7 @@ static const upb_msglayout *const envoy_api_v2_core_HttpUri_submsgs[1] = { static const upb_msglayout_field envoy_api_v2_core_HttpUri__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, + {2, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, {3, UPB_SIZE(8, 16), 0, 0, 11, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h index 324785f32fa..76ad993cc39 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h @@ -47,7 +47,7 @@ typedef enum { UPB_INLINE envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases envoy_api_v2_core_HttpUri_http_upstream_type_case(const envoy_api_v2_core_HttpUri* msg) { return (envoy_api_v2_core_HttpUri_http_upstream_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_uri(const envoy_api_v2_core_HttpUri *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_core_HttpUri_has_cluster(const envoy_api_v2_core_HttpUri *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 2); } +UPB_INLINE bool envoy_api_v2_core_HttpUri_has_cluster(const envoy_api_v2_core_HttpUri *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 2; } UPB_INLINE upb_strview envoy_api_v2_core_HttpUri_cluster(const envoy_api_v2_core_HttpUri *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 2, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_core_HttpUri_has_timeout(const envoy_api_v2_core_HttpUri *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_core_HttpUri_timeout(const envoy_api_v2_core_HttpUri *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c index 829a68440c1..07d783c2b58 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c @@ -77,7 +77,7 @@ static const upb_msglayout *const envoy_api_v2_core_Http1ProtocolOptions_HeaderK }; static const upb_msglayout_field envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h index 6267256322c..b9f69ad9250 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h @@ -252,7 +252,7 @@ typedef enum { } envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_oneofcases; UPB_INLINE envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_oneofcases envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_case(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat* msg) { return (envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_header_format_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_has_proper_case_words(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_has_proper_case_words(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords* envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_proper_case_words(const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } UPB_INLINE void envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_set_proper_case_words(envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat *msg, envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords* value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c index 86d78f15856..85c7167ea57 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c @@ -19,8 +19,8 @@ static const upb_msglayout_field envoy_api_v2_core_SocketOption__fields[6] = { {1, UPB_SIZE(24, 24), 0, 0, 9, 1}, {2, UPB_SIZE(0, 0), 0, 0, 3, 1}, {3, UPB_SIZE(8, 8), 0, 0, 3, 1}, - {4, UPB_SIZE(32, 40), UPB_SIZE(-40, -56), 0, 3, 1}, - {5, UPB_SIZE(32, 40), UPB_SIZE(-40, -56), 0, 12, 1}, + {4, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 3, 1}, + {5, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 12, 1}, {6, UPB_SIZE(16, 16), 0, 0, 14, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h index d84f64403c5..5627b4b5b8f 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h @@ -54,9 +54,9 @@ UPB_INLINE envoy_api_v2_core_SocketOption_value_oneofcases envoy_api_v2_core_Soc UPB_INLINE upb_strview envoy_api_v2_core_SocketOption_description(const envoy_api_v2_core_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); } UPB_INLINE int64_t envoy_api_v2_core_SocketOption_level(const envoy_api_v2_core_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } UPB_INLINE int64_t envoy_api_v2_core_SocketOption_name(const envoy_api_v2_core_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } -UPB_INLINE bool envoy_api_v2_core_SocketOption_has_int_value(const envoy_api_v2_core_SocketOption *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(40, 56), 4); } +UPB_INLINE bool envoy_api_v2_core_SocketOption_has_int_value(const envoy_api_v2_core_SocketOption *msg) { return _upb_getoneofcase(msg, UPB_SIZE(40, 56)) == 4; } UPB_INLINE int64_t envoy_api_v2_core_SocketOption_int_value(const envoy_api_v2_core_SocketOption *msg) { return UPB_READ_ONEOF(msg, int64_t, UPB_SIZE(32, 40), UPB_SIZE(40, 56), 4, 0); } -UPB_INLINE bool envoy_api_v2_core_SocketOption_has_buf_value(const envoy_api_v2_core_SocketOption *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(40, 56), 5); } +UPB_INLINE bool envoy_api_v2_core_SocketOption_has_buf_value(const envoy_api_v2_core_SocketOption *msg) { return _upb_getoneofcase(msg, UPB_SIZE(40, 56)) == 5; } UPB_INLINE upb_strview envoy_api_v2_core_SocketOption_buf_value(const envoy_api_v2_core_SocketOption *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(32, 40), UPB_SIZE(40, 56), 5, upb_strview_make("", strlen(""))); } UPB_INLINE int32_t envoy_api_v2_core_SocketOption_state(const envoy_api_v2_core_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c index 24e0e697c4c..ecdf2c2e03c 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c @@ -54,11 +54,11 @@ static const upb_msglayout *const envoy_api_v2_endpoint_LbEndpoint_submsgs[3] = }; static const upb_msglayout_field envoy_api_v2_endpoint_LbEndpoint__fields[5] = { - {1, UPB_SIZE(16, 24), UPB_SIZE(-24, -40), 1, 11, 1}, + {1, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 1, 11, 1}, {2, UPB_SIZE(0, 0), 0, 0, 14, 1}, {3, UPB_SIZE(8, 8), 0, 0, 11, 1}, {4, UPB_SIZE(12, 16), 0, 2, 11, 1}, - {5, UPB_SIZE(16, 24), UPB_SIZE(-24, -40), 0, 9, 1}, + {5, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 0, 9, 1}, }; const upb_msglayout envoy_api_v2_endpoint_LbEndpoint_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h index d17fa4b59ad..c23d58b55fd 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h @@ -134,14 +134,14 @@ typedef enum { } envoy_api_v2_endpoint_LbEndpoint_host_identifier_oneofcases; UPB_INLINE envoy_api_v2_endpoint_LbEndpoint_host_identifier_oneofcases envoy_api_v2_endpoint_LbEndpoint_host_identifier_case(const envoy_api_v2_endpoint_LbEndpoint* msg) { return (envoy_api_v2_endpoint_LbEndpoint_host_identifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(24, 40), int32_t); } -UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_endpoint(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(24, 40), 1); } +UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_endpoint(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 1; } UPB_INLINE const envoy_api_v2_endpoint_Endpoint* envoy_api_v2_endpoint_LbEndpoint_endpoint(const envoy_api_v2_endpoint_LbEndpoint *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_endpoint_Endpoint*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 1, NULL); } UPB_INLINE int32_t envoy_api_v2_endpoint_LbEndpoint_health_status(const envoy_api_v2_endpoint_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_metadata(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_endpoint_LbEndpoint_metadata(const envoy_api_v2_endpoint_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_api_v2_core_Metadata*); } UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_load_balancing_weight(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); } UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_endpoint_LbEndpoint_load_balancing_weight(const envoy_api_v2_endpoint_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); } -UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_endpoint_name(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(24, 40), 5); } +UPB_INLINE bool envoy_api_v2_endpoint_LbEndpoint_has_endpoint_name(const envoy_api_v2_endpoint_LbEndpoint *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 5; } UPB_INLINE upb_strview envoy_api_v2_endpoint_LbEndpoint_endpoint_name(const envoy_api_v2_endpoint_LbEndpoint *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 5, upb_strview_make("", strlen(""))); } UPB_INLINE void envoy_api_v2_endpoint_LbEndpoint_set_endpoint(envoy_api_v2_endpoint_LbEndpoint *msg, envoy_api_v2_endpoint_Endpoint* value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c index a47cb801256..455b3c2d414 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c @@ -90,7 +90,7 @@ static const upb_msglayout *const envoy_api_v2_Listener_ConnectionBalanceConfig_ }; static const upb_msglayout_field envoy_api_v2_Listener_ConnectionBalanceConfig__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h index 5b8744c2685..1bce86a19c4 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h @@ -374,7 +374,7 @@ typedef enum { } envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases; UPB_INLINE envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_case(const envoy_api_v2_Listener_ConnectionBalanceConfig* msg) { return (envoy_api_v2_Listener_ConnectionBalanceConfig_balance_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_api_v2_Listener_ConnectionBalanceConfig_has_exact_balance(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_api_v2_Listener_ConnectionBalanceConfig_has_exact_balance(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* envoy_api_v2_Listener_ConnectionBalanceConfig_exact_balance(const envoy_api_v2_Listener_ConnectionBalanceConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } UPB_INLINE void envoy_api_v2_Listener_ConnectionBalanceConfig_set_exact_balance(envoy_api_v2_Listener_ConnectionBalanceConfig *msg, envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance* value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c index 054c15af86d..ee6dbb6856d 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c @@ -29,8 +29,8 @@ static const upb_msglayout *const envoy_api_v2_listener_Filter_submsgs[2] = { static const upb_msglayout_field envoy_api_v2_listener_Filter__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_listener_Filter_msginit = { @@ -95,11 +95,11 @@ static const upb_msglayout *const envoy_api_v2_listener_ListenerFilterChainMatch }; static const upb_msglayout_field envoy_api_v2_listener_ListenerFilterChainMatchPredicate__fields[5] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 8, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 8, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, }; const upb_msglayout envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit = { @@ -130,8 +130,8 @@ static const upb_msglayout *const envoy_api_v2_listener_ListenerFilter_submsgs[3 static const upb_msglayout_field envoy_api_v2_listener_ListenerFilter__fields[4] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(12, 24), UPB_SIZE(-16, -32), 2, 11, 1}, - {3, UPB_SIZE(12, 24), UPB_SIZE(-16, -32), 1, 11, 1}, + {2, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 2, 11, 1}, + {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1}, {4, UPB_SIZE(8, 16), 0, 0, 11, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h index 9cd40854f6f..ef5e11ff854 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h @@ -85,9 +85,9 @@ typedef enum { UPB_INLINE envoy_api_v2_listener_Filter_config_type_oneofcases envoy_api_v2_listener_Filter_config_type_case(const envoy_api_v2_listener_Filter* msg) { return (envoy_api_v2_listener_Filter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_listener_Filter_name(const envoy_api_v2_listener_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_listener_Filter_has_config(const envoy_api_v2_listener_Filter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_listener_Filter_has_config(const envoy_api_v2_listener_Filter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_Filter_config(const envoy_api_v2_listener_Filter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_listener_Filter_has_typed_config(const envoy_api_v2_listener_Filter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } +UPB_INLINE bool envoy_api_v2_listener_Filter_has_typed_config(const envoy_api_v2_listener_Filter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_Filter_typed_config(const envoy_api_v2_listener_Filter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); } UPB_INLINE void envoy_api_v2_listener_Filter_set_name(envoy_api_v2_listener_Filter *msg, upb_strview value) { @@ -366,15 +366,15 @@ typedef enum { } envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_oneofcases; UPB_INLINE envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_oneofcases envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_case(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* msg) { return (envoy_api_v2_listener_ListenerFilterChainMatchPredicate_rule_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_or_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_or_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_or_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_and_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_and_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_and_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_not_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_not_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_not_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_listener_ListenerFilterChainMatchPredicate*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } -UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_any_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_any_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; } UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_any_match(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, false); } -UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_destination_port_range(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilterChainMatchPredicate_has_destination_port_range(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 5; } UPB_INLINE const struct envoy_type_Int32Range* envoy_api_v2_listener_ListenerFilterChainMatchPredicate_destination_port_range(const envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_Int32Range*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } UPB_INLINE void envoy_api_v2_listener_ListenerFilterChainMatchPredicate_set_or_match(envoy_api_v2_listener_ListenerFilterChainMatchPredicate *msg, envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet* value) { @@ -482,9 +482,9 @@ typedef enum { UPB_INLINE envoy_api_v2_listener_ListenerFilter_config_type_oneofcases envoy_api_v2_listener_ListenerFilter_config_type_case(const envoy_api_v2_listener_ListenerFilter* msg) { return (envoy_api_v2_listener_ListenerFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); } UPB_INLINE upb_strview envoy_api_v2_listener_ListenerFilter_name(const envoy_api_v2_listener_ListenerFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 2); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_ListenerFilter_config(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 2, NULL); } -UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_typed_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 3); } +UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_typed_config(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_ListenerFilter_typed_config(const envoy_api_v2_listener_ListenerFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); } UPB_INLINE bool envoy_api_v2_listener_ListenerFilter_has_filter_disabled(const envoy_api_v2_listener_ListenerFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const envoy_api_v2_listener_ListenerFilterChainMatchPredicate* envoy_api_v2_listener_ListenerFilter_filter_disabled(const envoy_api_v2_listener_ListenerFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_api_v2_listener_ListenerFilterChainMatchPredicate*); } diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c index b36d27a88dc..7c9df77d3b4 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c @@ -23,8 +23,8 @@ static const upb_msglayout *const envoy_api_v2_listener_UdpListenerConfig_submsg static const upb_msglayout_field envoy_api_v2_listener_UdpListenerConfig__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h index d9c4822dbd1..05c390880d2 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h @@ -53,9 +53,9 @@ typedef enum { UPB_INLINE envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases envoy_api_v2_listener_UdpListenerConfig_config_type_case(const envoy_api_v2_listener_UdpListenerConfig* msg) { return (envoy_api_v2_listener_UdpListenerConfig_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_listener_UdpListenerConfig_udp_listener_name(const envoy_api_v2_listener_UdpListenerConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_listener_UdpListenerConfig_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_api_v2_listener_UdpListenerConfig_has_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_listener_UdpListenerConfig_typed_config(const envoy_api_v2_listener_UdpListenerConfig *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_listener_UdpListenerConfig_set_udp_listener_name(envoy_api_v2_listener_UdpListenerConfig *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c index 95abfaf1ffe..4b613001f9f 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c @@ -129,11 +129,11 @@ static const upb_msglayout *const envoy_api_v2_route_Route_submsgs[13] = { static const upb_msglayout_field envoy_api_v2_route_Route__fields[16] = { {1, UPB_SIZE(8, 16), 0, 9, 11, 1}, - {2, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 8, 11, 1}, - {3, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 5, 11, 1}, + {2, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 8, 11, 1}, + {3, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 5, 11, 1}, {4, UPB_SIZE(12, 24), 0, 1, 11, 1}, {5, UPB_SIZE(16, 32), 0, 2, 11, 1}, - {7, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 3, 11, 1}, + {7, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 3, 11, 1}, {8, UPB_SIZE(28, 56), 0, 6, 11, _UPB_LABEL_MAP}, {9, UPB_SIZE(32, 64), 0, 0, 11, 3}, {10, UPB_SIZE(36, 72), 0, 0, 11, 3}, @@ -143,7 +143,7 @@ static const upb_msglayout_field envoy_api_v2_route_Route__fields[16] = { {14, UPB_SIZE(0, 0), 0, 0, 9, 1}, {15, UPB_SIZE(20, 40), 0, 10, 11, 1}, {16, UPB_SIZE(24, 48), 0, 11, 11, 1}, - {17, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 4, 11, 1}, + {17, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 4, 11, 1}, }; const upb_msglayout envoy_api_v2_route_Route_msginit = { @@ -266,15 +266,15 @@ static const upb_msglayout *const envoy_api_v2_route_RouteMatch_submsgs[7] = { }; static const upb_msglayout_field envoy_api_v2_route_RouteMatch__fields[10] = { - {1, UPB_SIZE(24, 48), UPB_SIZE(-32, -64), 0, 9, 1}, - {2, UPB_SIZE(24, 48), UPB_SIZE(-32, -64), 0, 9, 1}, - {3, UPB_SIZE(24, 48), UPB_SIZE(-32, -64), 0, 9, 1}, + {1, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 0, 9, 1}, + {2, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 0, 9, 1}, + {3, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 0, 9, 1}, {4, UPB_SIZE(0, 0), 0, 6, 11, 1}, {6, UPB_SIZE(16, 32), 0, 1, 11, 3}, {7, UPB_SIZE(20, 40), 0, 2, 11, 3}, {8, UPB_SIZE(4, 8), 0, 3, 11, 1}, {9, UPB_SIZE(8, 16), 0, 0, 11, 1}, - {10, UPB_SIZE(24, 48), UPB_SIZE(-32, -64), 5, 11, 1}, + {10, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 5, 11, 1}, {11, UPB_SIZE(12, 24), 0, 4, 11, 1}, }; @@ -318,9 +318,9 @@ static const upb_msglayout_field envoy_api_v2_route_CorsPolicy__fields[11] = { {4, UPB_SIZE(16, 32), 0, 0, 9, 1}, {5, UPB_SIZE(24, 48), 0, 0, 9, 1}, {6, UPB_SIZE(32, 64), 0, 2, 11, 1}, - {7, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 2, 11, 1}, + {7, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 2, 11, 1}, {8, UPB_SIZE(44, 88), 0, 0, 9, 3}, - {9, UPB_SIZE(52, 104), UPB_SIZE(-56, -112), 0, 11, 1}, + {9, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 0, 11, 1}, {10, UPB_SIZE(36, 72), 0, 0, 11, 1}, {11, UPB_SIZE(48, 96), 0, 1, 11, 3}, }; @@ -349,13 +349,13 @@ static const upb_msglayout *const envoy_api_v2_route_RouteAction_submsgs[19] = { }; static const upb_msglayout_field envoy_api_v2_route_RouteAction__fields[27] = { - {1, UPB_SIZE(100, 176), UPB_SIZE(-108, -192), 0, 9, 1}, - {2, UPB_SIZE(100, 176), UPB_SIZE(-108, -192), 0, 9, 1}, - {3, UPB_SIZE(100, 176), UPB_SIZE(-108, -192), 8, 11, 1}, + {1, UPB_SIZE(100, 176), UPB_SIZE(-109, -193), 0, 9, 1}, + {2, UPB_SIZE(100, 176), UPB_SIZE(-109, -193), 0, 9, 1}, + {3, UPB_SIZE(100, 176), UPB_SIZE(-109, -193), 8, 11, 1}, {4, UPB_SIZE(32, 40), 0, 0, 11, 1}, {5, UPB_SIZE(24, 24), 0, 0, 9, 1}, - {6, UPB_SIZE(112, 200), UPB_SIZE(-120, -216), 0, 9, 1}, - {7, UPB_SIZE(112, 200), UPB_SIZE(-120, -216), 11, 11, 1}, + {6, UPB_SIZE(112, 200), UPB_SIZE(-121, -217), 0, 9, 1}, + {7, UPB_SIZE(112, 200), UPB_SIZE(-121, -217), 11, 11, 1}, {8, UPB_SIZE(36, 48), 0, 12, 11, 1}, {9, UPB_SIZE(40, 56), 0, 4, 11, 1}, {10, UPB_SIZE(44, 64), 0, 6, 11, 1}, @@ -371,7 +371,7 @@ static const upb_msglayout_field envoy_api_v2_route_RouteAction__fields[27] = { {26, UPB_SIZE(16, 16), 0, 0, 14, 1}, {27, UPB_SIZE(64, 104), 0, 2, 11, 1}, {28, UPB_SIZE(68, 112), 0, 12, 11, 1}, - {29, UPB_SIZE(112, 200), UPB_SIZE(-120, -216), 0, 9, 1}, + {29, UPB_SIZE(112, 200), UPB_SIZE(-121, -217), 0, 9, 1}, {30, UPB_SIZE(96, 168), 0, 6, 11, 3}, {31, UPB_SIZE(72, 120), 0, 13, 11, 1}, {32, UPB_SIZE(76, 128), 0, 9, 11, 1}, @@ -411,12 +411,12 @@ static const upb_msglayout *const envoy_api_v2_route_RouteAction_HashPolicy_subm }; static const upb_msglayout_field envoy_api_v2_route_RouteAction_HashPolicy__fields[6] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 3, 11, 1}, - {2, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 1, 11, 1}, - {3, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 0, 11, 1}, + {1, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 3, 11, 1}, + {2, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 1, 11, 1}, + {3, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 0, 11, 1}, {4, UPB_SIZE(0, 0), 0, 0, 8, 1}, - {5, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 4, 11, 1}, - {6, UPB_SIZE(4, 8), UPB_SIZE(-8, -16), 2, 11, 1}, + {5, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 4, 11, 1}, + {6, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 2, 11, 1}, }; const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_msginit = { @@ -531,8 +531,8 @@ static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryPriority_s static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryPriority__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryPriority_msginit = { @@ -548,8 +548,8 @@ static const upb_msglayout *const envoy_api_v2_route_RetryPolicy_RetryHostPredic static const upb_msglayout_field envoy_api_v2_route_RetryPolicy_RetryHostPredicate__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit = { @@ -592,12 +592,12 @@ const upb_msglayout envoy_api_v2_route_HedgePolicy_msginit = { static const upb_msglayout_field envoy_api_v2_route_RedirectAction__fields[8] = { {1, UPB_SIZE(16, 16), 0, 0, 9, 1}, - {2, UPB_SIZE(24, 32), UPB_SIZE(-32, -48), 0, 9, 1}, + {2, UPB_SIZE(24, 32), UPB_SIZE(-33, -49), 0, 9, 1}, {3, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {4, UPB_SIZE(36, 56), UPB_SIZE(-44, -72), 0, 8, 1}, - {5, UPB_SIZE(24, 32), UPB_SIZE(-32, -48), 0, 9, 1}, + {4, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 8, 1}, + {5, UPB_SIZE(24, 32), UPB_SIZE(-33, -49), 0, 9, 1}, {6, UPB_SIZE(12, 12), 0, 0, 8, 1}, - {7, UPB_SIZE(36, 56), UPB_SIZE(-44, -72), 0, 9, 1}, + {7, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 9, 1}, {8, UPB_SIZE(8, 8), 0, 0, 13, 1}, }; @@ -699,12 +699,12 @@ static const upb_msglayout *const envoy_api_v2_route_RateLimit_Action_submsgs[6] }; static const upb_msglayout_field envoy_api_v2_route_RateLimit_Action__fields[6] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 5, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 4, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 3, 11, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, }; const upb_msglayout envoy_api_v2_route_RateLimit_Action_msginit = { @@ -776,14 +776,14 @@ static const upb_msglayout *const envoy_api_v2_route_HeaderMatcher_submsgs[2] = static const upb_msglayout_field envoy_api_v2_route_HeaderMatcher__fields[9] = { {1, UPB_SIZE(4, 8), 0, 0, 9, 1}, - {4, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, - {5, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, - {6, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 11, 1}, - {7, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 8, 1}, + {4, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, + {5, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, + {6, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 11, 1}, + {7, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 8, 1}, {8, UPB_SIZE(0, 0), 0, 0, 8, 1}, - {9, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, - {10, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 0, 9, 1}, - {11, UPB_SIZE(12, 24), UPB_SIZE(-20, -40), 1, 11, 1}, + {9, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, + {10, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1}, + {11, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 1, 11, 1}, }; const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit = { @@ -801,8 +801,8 @@ static const upb_msglayout_field envoy_api_v2_route_QueryParameterMatcher__field {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {3, UPB_SIZE(8, 16), 0, 0, 9, 1}, {4, UPB_SIZE(16, 32), 0, 1, 11, 1}, - {5, UPB_SIZE(20, 40), UPB_SIZE(-24, -48), 0, 11, 1}, - {6, UPB_SIZE(20, 40), UPB_SIZE(-24, -48), 0, 8, 1}, + {5, UPB_SIZE(20, 40), UPB_SIZE(-25, -49), 0, 11, 1}, + {6, UPB_SIZE(20, 40), UPB_SIZE(-25, -49), 0, 8, 1}, }; const upb_msglayout envoy_api_v2_route_QueryParameterMatcher_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h index 7d7b20a989f..e1f9ef80ccc 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h @@ -524,15 +524,15 @@ UPB_INLINE envoy_api_v2_route_Route_action_oneofcases envoy_api_v2_route_Route_a UPB_INLINE bool envoy_api_v2_route_Route_has_match(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const envoy_api_v2_route_RouteMatch* envoy_api_v2_route_Route_match(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_api_v2_route_RouteMatch*); } -UPB_INLINE bool envoy_api_v2_route_Route_has_route(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 2); } +UPB_INLINE bool envoy_api_v2_route_Route_has_route(const envoy_api_v2_route_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 2; } UPB_INLINE const envoy_api_v2_route_RouteAction* envoy_api_v2_route_Route_route(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 2, NULL); } -UPB_INLINE bool envoy_api_v2_route_Route_has_redirect(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 3); } +UPB_INLINE bool envoy_api_v2_route_Route_has_redirect(const envoy_api_v2_route_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 3; } UPB_INLINE const envoy_api_v2_route_RedirectAction* envoy_api_v2_route_Route_redirect(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RedirectAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 3, NULL); } UPB_INLINE bool envoy_api_v2_route_Route_has_metadata(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_Route_metadata(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_api_v2_core_Metadata*); } UPB_INLINE bool envoy_api_v2_route_Route_has_decorator(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const envoy_api_v2_route_Decorator* envoy_api_v2_route_Route_decorator(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_api_v2_route_Decorator*); } -UPB_INLINE bool envoy_api_v2_route_Route_has_direct_response(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 7); } +UPB_INLINE bool envoy_api_v2_route_Route_has_direct_response(const envoy_api_v2_route_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 7; } UPB_INLINE const envoy_api_v2_route_DirectResponseAction* envoy_api_v2_route_Route_direct_response(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_DirectResponseAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 7, NULL); } UPB_INLINE bool envoy_api_v2_route_Route_has_per_filter_config(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } UPB_INLINE size_t envoy_api_v2_route_Route_per_filter_config_size(const envoy_api_v2_route_Route *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 56)); } @@ -553,7 +553,7 @@ UPB_INLINE bool envoy_api_v2_route_Route_has_tracing(const envoy_api_v2_route_Ro UPB_INLINE const envoy_api_v2_route_Tracing* envoy_api_v2_route_Route_tracing(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const envoy_api_v2_route_Tracing*); } UPB_INLINE bool envoy_api_v2_route_Route_has_per_request_buffer_limit_bytes(const envoy_api_v2_route_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } UPB_INLINE const struct google_protobuf_UInt32Value* envoy_api_v2_route_Route_per_request_buffer_limit_bytes(const envoy_api_v2_route_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_UInt32Value*); } -UPB_INLINE bool envoy_api_v2_route_Route_has_filter_action(const envoy_api_v2_route_Route *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 17); } +UPB_INLINE bool envoy_api_v2_route_Route_has_filter_action(const envoy_api_v2_route_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 17; } UPB_INLINE const envoy_api_v2_route_FilterAction* envoy_api_v2_route_Route_filter_action(const envoy_api_v2_route_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_FilterAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 17, NULL); } UPB_INLINE void envoy_api_v2_route_Route_set_match(envoy_api_v2_route_Route *msg, envoy_api_v2_route_RouteMatch* value) { @@ -982,11 +982,11 @@ typedef enum { } envoy_api_v2_route_RouteMatch_path_specifier_oneofcases; UPB_INLINE envoy_api_v2_route_RouteMatch_path_specifier_oneofcases envoy_api_v2_route_RouteMatch_path_specifier_case(const envoy_api_v2_route_RouteMatch* msg) { return (envoy_api_v2_route_RouteMatch_path_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 64), int32_t); } -UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_prefix(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 64), 1); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_prefix(const envoy_api_v2_route_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 1; } UPB_INLINE upb_strview envoy_api_v2_route_RouteMatch_prefix(const envoy_api_v2_route_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 1, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_path(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 64), 2); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_path(const envoy_api_v2_route_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 2; } UPB_INLINE upb_strview envoy_api_v2_route_RouteMatch_path(const envoy_api_v2_route_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_regex(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 64), 3); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_regex(const envoy_api_v2_route_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 3; } UPB_INLINE upb_strview envoy_api_v2_route_RouteMatch_regex(const envoy_api_v2_route_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 3, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_case_sensitive(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteMatch_case_sensitive(const envoy_api_v2_route_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_BoolValue*); } @@ -998,7 +998,7 @@ UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_grpc(const envoy_api_v2_route_ UPB_INLINE const envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions* envoy_api_v2_route_RouteMatch_grpc(const envoy_api_v2_route_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions*); } UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_runtime_fraction(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_RouteMatch_runtime_fraction(const envoy_api_v2_route_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_api_v2_core_RuntimeFractionalPercent*); } -UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_safe_regex(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 64), 10); } +UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_safe_regex(const envoy_api_v2_route_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 10; } UPB_INLINE const struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_RouteMatch_safe_regex(const envoy_api_v2_route_RouteMatch *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 10, NULL); } UPB_INLINE bool envoy_api_v2_route_RouteMatch_has_tls_context(const envoy_api_v2_route_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions* envoy_api_v2_route_RouteMatch_tls_context(const envoy_api_v2_route_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_api_v2_route_RouteMatch_TlsContextMatchOptions*); } @@ -1187,10 +1187,10 @@ UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_expose_headers(const envoy_ UPB_INLINE upb_strview envoy_api_v2_route_CorsPolicy_max_age(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview); } UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_allow_credentials(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_CorsPolicy_allow_credentials(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_BoolValue*); } -UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 7); } +UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 7; } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_CorsPolicy_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 7, NULL); } UPB_INLINE upb_strview const* envoy_api_v2_route_CorsPolicy_allow_origin_regex(const envoy_api_v2_route_CorsPolicy *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); } -UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_filter_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(56, 112), 9); } +UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_filter_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 9; } UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_CorsPolicy_filter_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_RuntimeFractionalPercent*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 9, NULL); } UPB_INLINE bool envoy_api_v2_route_CorsPolicy_has_shadow_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } UPB_INLINE const struct envoy_api_v2_core_RuntimeFractionalPercent* envoy_api_v2_route_CorsPolicy_shadow_enabled(const envoy_api_v2_route_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct envoy_api_v2_core_RuntimeFractionalPercent*); } @@ -1321,18 +1321,18 @@ typedef enum { } envoy_api_v2_route_RouteAction_host_rewrite_specifier_oneofcases; UPB_INLINE envoy_api_v2_route_RouteAction_host_rewrite_specifier_oneofcases envoy_api_v2_route_RouteAction_host_rewrite_specifier_case(const envoy_api_v2_route_RouteAction* msg) { return (envoy_api_v2_route_RouteAction_host_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(120, 216), int32_t); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_has_cluster(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 192), 1); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_cluster(const envoy_api_v2_route_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(108, 192)) == 1; } UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_cluster(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(100, 176), UPB_SIZE(108, 192), 1, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_has_cluster_header(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 192), 2); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_cluster_header(const envoy_api_v2_route_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(108, 192)) == 2; } UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_cluster_header(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(100, 176), UPB_SIZE(108, 192), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_has_weighted_clusters(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(108, 192), 3); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_weighted_clusters(const envoy_api_v2_route_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(108, 192)) == 3; } UPB_INLINE const envoy_api_v2_route_WeightedCluster* envoy_api_v2_route_RouteAction_weighted_clusters(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_WeightedCluster*, UPB_SIZE(100, 176), UPB_SIZE(108, 192), 3, NULL); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_metadata_match(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 40)); } UPB_INLINE const struct envoy_api_v2_core_Metadata* envoy_api_v2_route_RouteAction_metadata_match(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), const struct envoy_api_v2_core_Metadata*); } UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_prefix_rewrite(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_has_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 216), 6); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 216)) == 6; } UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(112, 200), UPB_SIZE(120, 216), 6, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_has_auto_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 216), 7); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_auto_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 216)) == 7; } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_RouteAction_auto_host_rewrite(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(112, 200), UPB_SIZE(120, 216), 7, NULL); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_timeout(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 48)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_timeout(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), const struct google_protobuf_Duration*); } @@ -1361,7 +1361,7 @@ UPB_INLINE bool envoy_api_v2_route_RouteAction_has_hedge_policy(const envoy_api_ UPB_INLINE const envoy_api_v2_route_HedgePolicy* envoy_api_v2_route_RouteAction_hedge_policy(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), const envoy_api_v2_route_HedgePolicy*); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_grpc_timeout_offset(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 112)); } UPB_INLINE const struct google_protobuf_Duration* envoy_api_v2_route_RouteAction_grpc_timeout_offset(const envoy_api_v2_route_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), const struct google_protobuf_Duration*); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_has_auto_host_rewrite_header(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(120, 216), 29); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_has_auto_host_rewrite_header(const envoy_api_v2_route_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 216)) == 29; } UPB_INLINE upb_strview envoy_api_v2_route_RouteAction_auto_host_rewrite_header(const envoy_api_v2_route_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(112, 200), UPB_SIZE(120, 216), 29, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_route_RouteAction_has_request_mirror_policies(const envoy_api_v2_route_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 168)); } UPB_INLINE const envoy_api_v2_route_RouteAction_RequestMirrorPolicy* const* envoy_api_v2_route_RouteAction_request_mirror_policies(const envoy_api_v2_route_RouteAction *msg, size_t *len) { return (const envoy_api_v2_route_RouteAction_RequestMirrorPolicy* const*)_upb_array_accessor(msg, UPB_SIZE(96, 168), len); } @@ -1705,16 +1705,16 @@ typedef enum { } envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_oneofcases; UPB_INLINE envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_oneofcases envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_case(const envoy_api_v2_route_RouteAction_HashPolicy* msg) { return (envoy_api_v2_route_RouteAction_HashPolicy_policy_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_header(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_header(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_Header* envoy_api_v2_route_RouteAction_HashPolicy_header(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_Header*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 1, NULL); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_cookie(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_cookie(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_Cookie* envoy_api_v2_route_RouteAction_HashPolicy_cookie(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_Cookie*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 2, NULL); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_connection_properties(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_connection_properties(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 3; } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties* envoy_api_v2_route_RouteAction_HashPolicy_connection_properties(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 3, NULL); } UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_terminal(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_query_parameter(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 5); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_query_parameter(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 5; } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter* envoy_api_v2_route_RouteAction_HashPolicy_query_parameter(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 5, NULL); } -UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_filter_state(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 6); } +UPB_INLINE bool envoy_api_v2_route_RouteAction_HashPolicy_has_filter_state(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 6; } UPB_INLINE const envoy_api_v2_route_RouteAction_HashPolicy_FilterState* envoy_api_v2_route_RouteAction_HashPolicy_filter_state(const envoy_api_v2_route_RouteAction_HashPolicy *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RouteAction_HashPolicy_FilterState*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 6, NULL); } UPB_INLINE void envoy_api_v2_route_RouteAction_HashPolicy_set_header(envoy_api_v2_route_RouteAction_HashPolicy *msg, envoy_api_v2_route_RouteAction_HashPolicy_Header* value) { @@ -2091,9 +2091,9 @@ typedef enum { UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_oneofcases envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_case(const envoy_api_v2_route_RetryPolicy_RetryPriority* msg) { return (envoy_api_v2_route_RetryPolicy_RetryPriority_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_route_RetryPolicy_RetryPriority_name(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryPriority_has_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryPriority_has_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_RetryPolicy_RetryPriority_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryPriority_has_typed_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryPriority_has_typed_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_RetryPolicy_RetryPriority_typed_config(const envoy_api_v2_route_RetryPolicy_RetryPriority *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryPriority_set_name(envoy_api_v2_route_RetryPolicy_RetryPriority *msg, upb_strview value) { @@ -2146,9 +2146,9 @@ typedef enum { UPB_INLINE envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_oneofcases envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_case(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate* msg) { return (envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_api_v2_route_RetryPolicy_RetryHostPredicate_name(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryHostPredicate_has_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryHostPredicate_has_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_api_v2_route_RetryPolicy_RetryHostPredicate_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryHostPredicate_has_typed_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_api_v2_route_RetryPolicy_RetryHostPredicate_has_typed_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_api_v2_route_RetryPolicy_RetryHostPredicate_typed_config(const envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_api_v2_route_RetryPolicy_RetryHostPredicate_set_name(envoy_api_v2_route_RetryPolicy_RetryHostPredicate *msg, upb_strview value) { @@ -2300,15 +2300,15 @@ typedef enum { UPB_INLINE envoy_api_v2_route_RedirectAction_path_rewrite_specifier_oneofcases envoy_api_v2_route_RedirectAction_path_rewrite_specifier_case(const envoy_api_v2_route_RedirectAction* msg) { return (envoy_api_v2_route_RedirectAction_path_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 48), int32_t); } UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_host_redirect(const envoy_api_v2_route_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview); } -UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_path_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 48), 2); } +UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_path_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 48)) == 2; } UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_path_redirect(const envoy_api_v2_route_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), UPB_SIZE(32, 48), 2, upb_strview_make("", strlen(""))); } UPB_INLINE int32_t envoy_api_v2_route_RedirectAction_response_code(const envoy_api_v2_route_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } -UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_https_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(44, 72), 4); } +UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_https_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(44, 72)) == 4; } UPB_INLINE bool envoy_api_v2_route_RedirectAction_https_redirect(const envoy_api_v2_route_RedirectAction *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(36, 56), UPB_SIZE(44, 72), 4, false); } -UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_prefix_rewrite(const envoy_api_v2_route_RedirectAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(32, 48), 5); } +UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_prefix_rewrite(const envoy_api_v2_route_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 48)) == 5; } UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_prefix_rewrite(const envoy_api_v2_route_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), UPB_SIZE(32, 48), 5, upb_strview_make("", strlen(""))); } UPB_INLINE bool envoy_api_v2_route_RedirectAction_strip_query(const envoy_api_v2_route_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); } -UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_scheme_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(44, 72), 7); } +UPB_INLINE bool envoy_api_v2_route_RedirectAction_has_scheme_redirect(const envoy_api_v2_route_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(44, 72)) == 7; } UPB_INLINE upb_strview envoy_api_v2_route_RedirectAction_scheme_redirect(const envoy_api_v2_route_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(36, 56), UPB_SIZE(44, 72), 7, upb_strview_make("", strlen(""))); } UPB_INLINE uint32_t envoy_api_v2_route_RedirectAction_port_redirect(const envoy_api_v2_route_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } @@ -2595,17 +2595,17 @@ typedef enum { } envoy_api_v2_route_RateLimit_Action_action_specifier_oneofcases; UPB_INLINE envoy_api_v2_route_RateLimit_Action_action_specifier_oneofcases envoy_api_v2_route_RateLimit_Action_action_specifier_case(const envoy_api_v2_route_RateLimit_Action* msg) { return (envoy_api_v2_route_RateLimit_Action_action_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_source_cluster(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_source_cluster(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_api_v2_route_RateLimit_Action_SourceCluster* envoy_api_v2_route_RateLimit_Action_source_cluster(const envoy_api_v2_route_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RateLimit_Action_SourceCluster*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_destination_cluster(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_destination_cluster(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const envoy_api_v2_route_RateLimit_Action_DestinationCluster* envoy_api_v2_route_RateLimit_Action_destination_cluster(const envoy_api_v2_route_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RateLimit_Action_DestinationCluster*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_request_headers(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_request_headers(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE const envoy_api_v2_route_RateLimit_Action_RequestHeaders* envoy_api_v2_route_RateLimit_Action_request_headers(const envoy_api_v2_route_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RateLimit_Action_RequestHeaders*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } -UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_remote_address(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_remote_address(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; } UPB_INLINE const envoy_api_v2_route_RateLimit_Action_RemoteAddress* envoy_api_v2_route_RateLimit_Action_remote_address(const envoy_api_v2_route_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RateLimit_Action_RemoteAddress*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } -UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_generic_key(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_generic_key(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 5; } UPB_INLINE const envoy_api_v2_route_RateLimit_Action_GenericKey* envoy_api_v2_route_RateLimit_Action_generic_key(const envoy_api_v2_route_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RateLimit_Action_GenericKey*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } -UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_header_value_match(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } +UPB_INLINE bool envoy_api_v2_route_RateLimit_Action_has_header_value_match(const envoy_api_v2_route_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 6; } UPB_INLINE const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch* envoy_api_v2_route_RateLimit_Action_header_value_match(const envoy_api_v2_route_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_api_v2_route_RateLimit_Action_HeaderValueMatch*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); } UPB_INLINE void envoy_api_v2_route_RateLimit_Action_set_source_cluster(envoy_api_v2_route_RateLimit_Action *msg, envoy_api_v2_route_RateLimit_Action_SourceCluster* value) { @@ -2849,20 +2849,20 @@ typedef enum { UPB_INLINE envoy_api_v2_route_HeaderMatcher_header_match_specifier_oneofcases envoy_api_v2_route_HeaderMatcher_header_match_specifier_case(const envoy_api_v2_route_HeaderMatcher* msg) { return (envoy_api_v2_route_HeaderMatcher_header_match_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); } UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_name(const envoy_api_v2_route_HeaderMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_exact_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } +UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_exact_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 4; } UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_exact_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 4, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_regex_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 5); } +UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_regex_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 5; } UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_regex_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 5, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_range_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 6); } +UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_range_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 6; } UPB_INLINE const struct envoy_type_Int64Range* envoy_api_v2_route_HeaderMatcher_range_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_Int64Range*, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 6, NULL); } -UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_present_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 7); } +UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_present_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 7; } UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_present_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 7, false); } UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_invert_match(const envoy_api_v2_route_HeaderMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } -UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_prefix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 9); } +UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_prefix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 9; } UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_prefix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 9, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_suffix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 10); } +UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_suffix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 10; } UPB_INLINE upb_strview envoy_api_v2_route_HeaderMatcher_suffix_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 10, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_safe_regex_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 11); } +UPB_INLINE bool envoy_api_v2_route_HeaderMatcher_has_safe_regex_match(const envoy_api_v2_route_HeaderMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 11; } UPB_INLINE const struct envoy_type_matcher_RegexMatcher* envoy_api_v2_route_HeaderMatcher_safe_regex_match(const envoy_api_v2_route_HeaderMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 11, NULL); } UPB_INLINE void envoy_api_v2_route_HeaderMatcher_set_name(envoy_api_v2_route_HeaderMatcher *msg, upb_strview value) { @@ -2936,9 +2936,9 @@ UPB_INLINE upb_strview envoy_api_v2_route_QueryParameterMatcher_name(const envoy UPB_INLINE upb_strview envoy_api_v2_route_QueryParameterMatcher_value(const envoy_api_v2_route_QueryParameterMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_has_regex(const envoy_api_v2_route_QueryParameterMatcher *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const struct google_protobuf_BoolValue* envoy_api_v2_route_QueryParameterMatcher_regex(const envoy_api_v2_route_QueryParameterMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_BoolValue*); } -UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_has_string_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(24, 48), 5); } +UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_has_string_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 48)) == 5; } UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_api_v2_route_QueryParameterMatcher_string_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(20, 40), UPB_SIZE(24, 48), 5, NULL); } -UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_has_present_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(24, 48), 6); } +UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_has_present_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 48)) == 6; } UPB_INLINE bool envoy_api_v2_route_QueryParameterMatcher_present_match(const envoy_api_v2_route_QueryParameterMatcher *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(20, 40), UPB_SIZE(24, 48), 6, false); } UPB_INLINE void envoy_api_v2_route_QueryParameterMatcher_set_name(envoy_api_v2_route_QueryParameterMatcher *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c index 34999b89b43..05261163799 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +++ b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c @@ -46,7 +46,7 @@ const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_msginit = { }; static const upb_msglayout_field envoy_api_v2_ScopedRouteConfiguration_Key_Fragment__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, }; const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit = { diff --git a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h index c1bb1e0fdd2..ef8c79954bf 100644 --- a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +++ b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h @@ -119,7 +119,7 @@ typedef enum { } envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases; UPB_INLINE envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_case(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment* msg) { return (envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } -UPB_INLINE bool envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_has_string_key(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE bool envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_has_string_key(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; } UPB_INLINE upb_strview envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_string_key(const envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } UPB_INLINE void envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_set_string_key(envoy_api_v2_ScopedRouteConfiguration_Key_Fragment *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c index 8112cd269c6..1cb354eda1e 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c @@ -29,8 +29,8 @@ static const upb_msglayout *const envoy_config_filter_accesslog_v2_AccessLog_sub static const upb_msglayout_field envoy_config_filter_accesslog_v2_AccessLog__fields[4] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(8, 16), 0, 0, 11, 1}, - {3, UPB_SIZE(12, 24), UPB_SIZE(-16, -32), 2, 11, 1}, - {4, UPB_SIZE(12, 24), UPB_SIZE(-16, -32), 1, 11, 1}, + {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 2, 11, 1}, + {4, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1}, }; const upb_msglayout envoy_config_filter_accesslog_v2_AccessLog_msginit = { @@ -54,17 +54,17 @@ static const upb_msglayout *const envoy_config_filter_accesslog_v2_AccessLogFilt }; static const upb_msglayout_field envoy_config_filter_accesslog_v2_AccessLogFilter__fields[11] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 9, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 5, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 10, 11, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 8, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, - {7, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 6, 11, 1}, - {8, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 4, 11, 1}, - {9, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 7, 11, 1}, - {10, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 3, 11, 1}, - {11, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 9, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 10, 11, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 8, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1}, + {8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1}, + {9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 7, 11, 1}, + {10, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, + {11, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, }; const upb_msglayout envoy_config_filter_accesslog_v2_AccessLogFilter_msginit = { @@ -214,8 +214,8 @@ static const upb_msglayout *const envoy_config_filter_accesslog_v2_ExtensionFilt static const upb_msglayout_field envoy_config_filter_accesslog_v2_ExtensionFilter__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_config_filter_accesslog_v2_ExtensionFilter_msginit = { diff --git a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h index 908971438ef..559580c1293 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h @@ -123,9 +123,9 @@ UPB_INLINE envoy_config_filter_accesslog_v2_AccessLog_config_type_oneofcases env UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_AccessLog_name(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_filter(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const envoy_config_filter_accesslog_v2_AccessLogFilter* envoy_config_filter_accesslog_v2_AccessLog_filter(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_filter_accesslog_v2_AccessLogFilter*); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 3); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 3; } UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_AccessLog_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(16, 32), 4); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLog_has_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 4; } UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_accesslog_v2_AccessLog_typed_config(const envoy_config_filter_accesslog_v2_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 4, NULL); } UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLog_set_name(envoy_config_filter_accesslog_v2_AccessLog *msg, upb_strview value) { @@ -198,27 +198,27 @@ typedef enum { } envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases; UPB_INLINE envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_case(const envoy_config_filter_accesslog_v2_AccessLogFilter* msg) { return (envoy_config_filter_accesslog_v2_AccessLogFilter_filter_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_config_filter_accesslog_v2_StatusCodeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_status_code_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_StatusCodeFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_duration_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_duration_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const envoy_config_filter_accesslog_v2_DurationFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_duration_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_DurationFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_not_health_check_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_not_health_check_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE const envoy_config_filter_accesslog_v2_NotHealthCheckFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_not_health_check_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_NotHealthCheckFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_traceable_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_traceable_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; } UPB_INLINE const envoy_config_filter_accesslog_v2_TraceableFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_traceable_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_TraceableFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_runtime_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_runtime_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 5; } UPB_INLINE const envoy_config_filter_accesslog_v2_RuntimeFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_runtime_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_RuntimeFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_and_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_and_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 6; } UPB_INLINE const envoy_config_filter_accesslog_v2_AndFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_and_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_AndFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_or_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_or_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 7; } UPB_INLINE const envoy_config_filter_accesslog_v2_OrFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_or_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_OrFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_header_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_header_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 8; } UPB_INLINE const envoy_config_filter_accesslog_v2_HeaderFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_header_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_HeaderFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_response_flag_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_response_flag_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 9; } UPB_INLINE const envoy_config_filter_accesslog_v2_ResponseFlagFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_response_flag_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_ResponseFlagFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_grpc_status_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_grpc_status_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 10; } UPB_INLINE const envoy_config_filter_accesslog_v2_GrpcStatusFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_grpc_status_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_GrpcStatusFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_extension_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 11); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_AccessLogFilter_has_extension_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 11; } UPB_INLINE const envoy_config_filter_accesslog_v2_ExtensionFilter* envoy_config_filter_accesslog_v2_AccessLogFilter_extension_filter(const envoy_config_filter_accesslog_v2_AccessLogFilter *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_accesslog_v2_ExtensionFilter*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 11, NULL); } UPB_INLINE void envoy_config_filter_accesslog_v2_AccessLogFilter_set_status_code_filter(envoy_config_filter_accesslog_v2_AccessLogFilter *msg, envoy_config_filter_accesslog_v2_StatusCodeFilter* value) { @@ -690,9 +690,9 @@ typedef enum { UPB_INLINE envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_case(const envoy_config_filter_accesslog_v2_ExtensionFilter* msg) { return (envoy_config_filter_accesslog_v2_ExtensionFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_config_filter_accesslog_v2_ExtensionFilter_name(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_accesslog_v2_ExtensionFilter_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_config_filter_accesslog_v2_ExtensionFilter_has_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_accesslog_v2_ExtensionFilter_typed_config(const envoy_config_filter_accesslog_v2_ExtensionFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_config_filter_accesslog_v2_ExtensionFilter_set_name(envoy_config_filter_accesslog_v2_ExtensionFilter *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c index 7b2e8a1e969..c7f2bb10d5b 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c @@ -50,8 +50,8 @@ static const upb_msglayout *const envoy_config_filter_network_http_connection_ma static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager__fields[35] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, {2, UPB_SIZE(36, 40), 0, 0, 9, 1}, - {3, UPB_SIZE(140, 248), UPB_SIZE(-144, -256), 10, 11, 1}, - {4, UPB_SIZE(140, 248), UPB_SIZE(-144, -256), 0, 11, 1}, + {3, UPB_SIZE(140, 248), UPB_SIZE(-145, -257), 10, 11, 1}, + {4, UPB_SIZE(140, 248), UPB_SIZE(-145, -257), 0, 11, 1}, {5, UPB_SIZE(128, 224), 0, 9, 11, 3}, {6, UPB_SIZE(60, 88), 0, 13, 11, 1}, {7, UPB_SIZE(64, 96), 0, 7, 11, 1}, @@ -77,7 +77,7 @@ static const upb_msglayout_field envoy_config_filter_network_http_connection_man {28, UPB_SIZE(108, 184), 0, 14, 11, 1}, {29, UPB_SIZE(112, 192), 0, 15, 11, 1}, {30, UPB_SIZE(116, 200), 0, 13, 11, 1}, - {31, UPB_SIZE(140, 248), UPB_SIZE(-144, -256), 12, 11, 1}, + {31, UPB_SIZE(140, 248), UPB_SIZE(-145, -257), 12, 11, 1}, {32, UPB_SIZE(31, 31), 0, 0, 8, 1}, {33, UPB_SIZE(32, 32), 0, 0, 8, 1}, {34, UPB_SIZE(16, 16), 0, 0, 14, 1}, @@ -201,8 +201,8 @@ static const upb_msglayout_field envoy_config_filter_network_http_connection_man {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(8, 16), 0, 3, 11, 1}, {3, UPB_SIZE(12, 24), 0, 0, 11, 1}, - {4, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 2, 11, 1}, - {5, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 1, 11, 1}, + {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1}, + {5, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit = { @@ -230,7 +230,7 @@ static const upb_msglayout *const envoy_config_filter_network_http_connection_ma }; static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit = { @@ -246,8 +246,8 @@ static const upb_msglayout *const envoy_config_filter_network_http_connection_ma static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor__fields[4] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {3, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 0, 13, 1}, - {4, UPB_SIZE(16, 32), UPB_SIZE(-20, -40), 0, 11, 1}, + {3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 13, 1}, + {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 11, 1}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit = { @@ -288,8 +288,8 @@ static const upb_msglayout *const envoy_config_filter_network_http_connection_ma static const upb_msglayout_field envoy_config_filter_network_http_connection_manager_v2_HttpFilter__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit = { diff --git a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h index 725e874486e..3f4d4cc7846 100644 --- a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h @@ -146,9 +146,9 @@ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpConnection UPB_INLINE int32_t envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_codec_type(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_stat_prefix(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_rds(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(144, 256), 3); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_rds(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(144, 256)) == 3; } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_Rds* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_rds(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_Rds*, UPB_SIZE(140, 248), UPB_SIZE(144, 256), 3, NULL); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_route_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(144, 256), 4); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_route_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(144, 256)) == 4; } UPB_INLINE const struct envoy_api_v2_RouteConfiguration* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_config(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_RouteConfiguration*, UPB_SIZE(140, 248), UPB_SIZE(144, 256), 4, NULL); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_http_filters(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(128, 224)); } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_http_filters(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg, size_t *len) { return (const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(128, 224), len); } @@ -193,7 +193,7 @@ UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConne UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_max_request_headers_kb(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(112, 192), const struct google_protobuf_UInt32Value*); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_normalize_path(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(116, 200)); } UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_normalize_path(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(116, 200), const struct google_protobuf_BoolValue*); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_scoped_routes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(144, 256), 31); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_has_scoped_routes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(144, 256)) == 31; } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes* envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_scoped_routes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes*, UPB_SIZE(140, 248), UPB_SIZE(144, 256), 31, NULL); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_preserve_external_request_id(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(31, 31), bool); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_merge_slashes(const envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool); } @@ -845,9 +845,9 @@ UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRou UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scope_key_builder(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder*); } UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const struct envoy_api_v2_core_ConfigSource* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_rds_config_source(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_api_v2_core_ConfigSource*); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scoped_route_configurations_list(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scoped_route_configurations_list(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 4; } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_route_configurations_list(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scoped_rds(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 5); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_has_scoped_rds(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 5; } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRds* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_scoped_rds(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRds*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 5, NULL); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_set_name(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes *msg, upb_strview value) { @@ -953,7 +953,7 @@ typedef enum { } envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases; UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_case(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* msg) { return (envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_has_header_value_extractor(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_has_header_value_extractor(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_header_value_extractor(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_set_header_value_extractor(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg, envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor* value) { @@ -992,9 +992,9 @@ UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_S UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_name(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element_separator(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_has_index(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 3); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_has_index(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 3; } UPB_INLINE uint32_t envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_index(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, 0); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_has_element(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 40), 4); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_has_element(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 4; } UPB_INLINE const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement* envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_element(const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg) { return UPB_READ_ONEOF(msg, const envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_set_name(envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_strview value) { @@ -1095,9 +1095,9 @@ typedef enum { UPB_INLINE envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_case(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter* msg) { return (envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_config_filter_network_http_connection_manager_v2_HttpFilter_name(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpFilter_has_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpFilter_has_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpFilter_has_typed_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } +UPB_INLINE bool envoy_config_filter_network_http_connection_manager_v2_HttpFilter_has_typed_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; } UPB_INLINE const struct google_protobuf_Any* envoy_config_filter_network_http_connection_manager_v2_HttpFilter_typed_config(const envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); } UPB_INLINE void envoy_config_filter_network_http_connection_manager_v2_HttpFilter_set_name(envoy_config_filter_network_http_connection_manager_v2_HttpFilter *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c index 4369d629782..2b5153a3062 100644 --- a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c +++ b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c @@ -37,8 +37,8 @@ static const upb_msglayout *const envoy_config_trace_v2_Tracing_Http_submsgs[2] static const upb_msglayout_field envoy_config_trace_v2_Tracing_Http__fields[3] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, }; const upb_msglayout envoy_config_trace_v2_Tracing_Http_msginit = { diff --git a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h index f5d9d967501..630962cd3ee 100644 --- a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h +++ b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h @@ -83,9 +83,9 @@ typedef enum { UPB_INLINE envoy_config_trace_v2_Tracing_Http_config_type_oneofcases envoy_config_trace_v2_Tracing_Http_config_type_case(const envoy_config_trace_v2_Tracing_Http* msg) { return (envoy_config_trace_v2_Tracing_Http_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_config_trace_v2_Tracing_Http_name(const envoy_config_trace_v2_Tracing_Http *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_config_trace_v2_Tracing_Http_has_config(const envoy_config_trace_v2_Tracing_Http *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_config_trace_v2_Tracing_Http_has_config(const envoy_config_trace_v2_Tracing_Http *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const struct google_protobuf_Struct* envoy_config_trace_v2_Tracing_Http_config(const envoy_config_trace_v2_Tracing_Http *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_config_trace_v2_Tracing_Http_has_typed_config(const envoy_config_trace_v2_Tracing_Http *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_config_trace_v2_Tracing_Http_has_typed_config(const envoy_config_trace_v2_Tracing_Http *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const struct google_protobuf_Any* envoy_config_trace_v2_Tracing_Http_typed_config(const envoy_config_trace_v2_Tracing_Http *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } UPB_INLINE void envoy_config_trace_v2_Tracing_Http_set_name(envoy_config_trace_v2_Tracing_Http *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c index 0bc2960cbfa..dd8fe6cf22e 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c @@ -20,7 +20,7 @@ static const upb_msglayout *const envoy_type_matcher_RegexMatcher_submsgs[1] = { }; static const upb_msglayout_field envoy_type_matcher_RegexMatcher__fields[2] = { - {1, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, + {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, {2, UPB_SIZE(0, 0), 0, 0, 9, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h index 12845d9c886..f340559a2d9 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h @@ -52,7 +52,7 @@ typedef enum { } envoy_type_matcher_RegexMatcher_engine_type_oneofcases; UPB_INLINE envoy_type_matcher_RegexMatcher_engine_type_oneofcases envoy_type_matcher_RegexMatcher_engine_type_case(const envoy_type_matcher_RegexMatcher* msg) { return (envoy_type_matcher_RegexMatcher_engine_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE bool envoy_type_matcher_RegexMatcher_has_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } +UPB_INLINE bool envoy_type_matcher_RegexMatcher_has_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; } UPB_INLINE const envoy_type_matcher_RegexMatcher_GoogleRE2* envoy_type_matcher_RegexMatcher_google_re2(const envoy_type_matcher_RegexMatcher *msg) { return UPB_READ_ONEOF(msg, const envoy_type_matcher_RegexMatcher_GoogleRE2*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); } UPB_INLINE upb_strview envoy_type_matcher_RegexMatcher_regex(const envoy_type_matcher_RegexMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } diff --git a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c index 827908d806b..beab52346fe 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c @@ -21,11 +21,11 @@ static const upb_msglayout *const envoy_type_matcher_StringMatcher_submsgs[1] = }; static const upb_msglayout_field envoy_type_matcher_StringMatcher__fields[6] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, - {2, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, - {3, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, - {4, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, - {5, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 11, 1}, + {1, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, + {2, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, + {3, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, + {4, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, + {5, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 11, 1}, {6, UPB_SIZE(0, 0), 0, 0, 8, 1}, }; diff --git a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h index b08dc0f1b42..1547a04386c 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h @@ -53,15 +53,15 @@ typedef enum { } envoy_type_matcher_StringMatcher_match_pattern_oneofcases; UPB_INLINE envoy_type_matcher_StringMatcher_match_pattern_oneofcases envoy_type_matcher_StringMatcher_match_pattern_case(const envoy_type_matcher_StringMatcher* msg) { return (envoy_type_matcher_StringMatcher_match_pattern_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE bool envoy_type_matcher_StringMatcher_has_exact(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } +UPB_INLINE bool envoy_type_matcher_StringMatcher_has_exact(const envoy_type_matcher_StringMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; } UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_exact(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 1, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_type_matcher_StringMatcher_has_prefix(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_type_matcher_StringMatcher_has_prefix(const envoy_type_matcher_StringMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_prefix(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_type_matcher_StringMatcher_has_suffix(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_type_matcher_StringMatcher_has_suffix(const envoy_type_matcher_StringMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_suffix(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 3, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_type_matcher_StringMatcher_has_regex(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } +UPB_INLINE bool envoy_type_matcher_StringMatcher_has_regex(const envoy_type_matcher_StringMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; } UPB_INLINE upb_strview envoy_type_matcher_StringMatcher_regex(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 4, upb_strview_make("", strlen(""))); } -UPB_INLINE bool envoy_type_matcher_StringMatcher_has_safe_regex(const envoy_type_matcher_StringMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 5); } +UPB_INLINE bool envoy_type_matcher_StringMatcher_has_safe_regex(const envoy_type_matcher_StringMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; } UPB_INLINE const struct envoy_type_matcher_RegexMatcher* envoy_type_matcher_StringMatcher_safe_regex(const envoy_type_matcher_StringMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_RegexMatcher*, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 5, NULL); } UPB_INLINE bool envoy_type_matcher_StringMatcher_ignore_case(const envoy_type_matcher_StringMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } diff --git a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c index 8f5c25c58df..3f98ea08b8b 100644 --- a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +++ b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c @@ -31,7 +31,7 @@ const upb_msglayout envoy_type_metadata_v2_MetadataKey_msginit = { }; static const upb_msglayout_field envoy_type_metadata_v2_MetadataKey_PathSegment__fields[1] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, }; const upb_msglayout envoy_type_metadata_v2_MetadataKey_PathSegment_msginit = { @@ -48,10 +48,10 @@ static const upb_msglayout *const envoy_type_metadata_v2_MetadataKind_submsgs[4] }; static const upb_msglayout_field envoy_type_metadata_v2_MetadataKind__fields[4] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 3, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, }; const upb_msglayout envoy_type_metadata_v2_MetadataKind_msginit = { diff --git a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h index 2eb78568a7d..50b0164d13c 100644 --- a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +++ b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h @@ -97,7 +97,7 @@ typedef enum { } envoy_type_metadata_v2_MetadataKey_PathSegment_segment_oneofcases; UPB_INLINE envoy_type_metadata_v2_MetadataKey_PathSegment_segment_oneofcases envoy_type_metadata_v2_MetadataKey_PathSegment_segment_case(const envoy_type_metadata_v2_MetadataKey_PathSegment* msg) { return (envoy_type_metadata_v2_MetadataKey_PathSegment_segment_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } -UPB_INLINE bool envoy_type_metadata_v2_MetadataKey_PathSegment_has_key(const envoy_type_metadata_v2_MetadataKey_PathSegment *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE bool envoy_type_metadata_v2_MetadataKey_PathSegment_has_key(const envoy_type_metadata_v2_MetadataKey_PathSegment *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; } UPB_INLINE upb_strview envoy_type_metadata_v2_MetadataKey_PathSegment_key(const envoy_type_metadata_v2_MetadataKey_PathSegment *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); } UPB_INLINE void envoy_type_metadata_v2_MetadataKey_PathSegment_set_key(envoy_type_metadata_v2_MetadataKey_PathSegment *msg, upb_strview value) { @@ -127,13 +127,13 @@ typedef enum { } envoy_type_metadata_v2_MetadataKind_kind_oneofcases; UPB_INLINE envoy_type_metadata_v2_MetadataKind_kind_oneofcases envoy_type_metadata_v2_MetadataKind_kind_case(const envoy_type_metadata_v2_MetadataKind* msg) { return (envoy_type_metadata_v2_MetadataKind_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_request(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_request(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_type_metadata_v2_MetadataKind_Request* envoy_type_metadata_v2_MetadataKind_request(const envoy_type_metadata_v2_MetadataKind *msg) { return UPB_READ_ONEOF(msg, const envoy_type_metadata_v2_MetadataKind_Request*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_route(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_route(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const envoy_type_metadata_v2_MetadataKind_Route* envoy_type_metadata_v2_MetadataKind_route(const envoy_type_metadata_v2_MetadataKind *msg) { return UPB_READ_ONEOF(msg, const envoy_type_metadata_v2_MetadataKind_Route*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_cluster(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_cluster(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE const envoy_type_metadata_v2_MetadataKind_Cluster* envoy_type_metadata_v2_MetadataKind_cluster(const envoy_type_metadata_v2_MetadataKind *msg) { return UPB_READ_ONEOF(msg, const envoy_type_metadata_v2_MetadataKind_Cluster*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } -UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_host(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } +UPB_INLINE bool envoy_type_metadata_v2_MetadataKind_has_host(const envoy_type_metadata_v2_MetadataKind *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; } UPB_INLINE const envoy_type_metadata_v2_MetadataKind_Host* envoy_type_metadata_v2_MetadataKind_host(const envoy_type_metadata_v2_MetadataKind *msg) { return UPB_READ_ONEOF(msg, const envoy_type_metadata_v2_MetadataKind_Host*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } UPB_INLINE void envoy_type_metadata_v2_MetadataKind_set_request(envoy_type_metadata_v2_MetadataKind *msg, envoy_type_metadata_v2_MetadataKind_Request* value) { diff --git a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c index 549642c985a..064e7e26b50 100644 --- a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +++ b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c @@ -24,10 +24,10 @@ static const upb_msglayout *const envoy_type_tracing_v2_CustomTag_submsgs[4] = { static const upb_msglayout_field envoy_type_tracing_v2_CustomTag__fields[5] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 2, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {5, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 3, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 3, 11, 1}, }; const upb_msglayout envoy_type_tracing_v2_CustomTag_msginit = { diff --git a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h index 55e4cc8c584..0ad64e937be 100644 --- a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +++ b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h @@ -64,13 +64,13 @@ typedef enum { UPB_INLINE envoy_type_tracing_v2_CustomTag_type_oneofcases envoy_type_tracing_v2_CustomTag_type_case(const envoy_type_tracing_v2_CustomTag* msg) { return (envoy_type_tracing_v2_CustomTag_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } UPB_INLINE upb_strview envoy_type_tracing_v2_CustomTag_tag(const envoy_type_tracing_v2_CustomTag *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_literal(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_literal(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const envoy_type_tracing_v2_CustomTag_Literal* envoy_type_tracing_v2_CustomTag_literal(const envoy_type_tracing_v2_CustomTag *msg) { return UPB_READ_ONEOF(msg, const envoy_type_tracing_v2_CustomTag_Literal*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_environment(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_environment(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const envoy_type_tracing_v2_CustomTag_Environment* envoy_type_tracing_v2_CustomTag_environment(const envoy_type_tracing_v2_CustomTag *msg) { return UPB_READ_ONEOF(msg, const envoy_type_tracing_v2_CustomTag_Environment*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } -UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_request_header(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } +UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_request_header(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; } UPB_INLINE const envoy_type_tracing_v2_CustomTag_Header* envoy_type_tracing_v2_CustomTag_request_header(const envoy_type_tracing_v2_CustomTag *msg) { return UPB_READ_ONEOF(msg, const envoy_type_tracing_v2_CustomTag_Header*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); } -UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_metadata(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 5); } +UPB_INLINE bool envoy_type_tracing_v2_CustomTag_has_metadata(const envoy_type_tracing_v2_CustomTag *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; } UPB_INLINE const envoy_type_tracing_v2_CustomTag_Metadata* envoy_type_tracing_v2_CustomTag_metadata(const envoy_type_tracing_v2_CustomTag *msg) { return UPB_READ_ONEOF(msg, const envoy_type_tracing_v2_CustomTag_Metadata*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); } UPB_INLINE void envoy_type_tracing_v2_CustomTag_set_tag(envoy_type_tracing_v2_CustomTag *msg, upb_strview value) { diff --git a/src/core/ext/upb-generated/google/api/http.upb.c b/src/core/ext/upb-generated/google/api/http.upb.c index e5c621a52c1..8ad07dcd9fd 100644 --- a/src/core/ext/upb-generated/google/api/http.upb.c +++ b/src/core/ext/upb-generated/google/api/http.upb.c @@ -34,13 +34,13 @@ static const upb_msglayout *const google_api_HttpRule_submsgs[2] = { static const upb_msglayout_field google_api_HttpRule__fields[10] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, - {2, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, - {3, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, - {4, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, - {5, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, - {6, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 9, 1}, + {2, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {3, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {4, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {5, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, + {6, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1}, {7, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {8, UPB_SIZE(28, 56), UPB_SIZE(-36, -72), 0, 11, 1}, + {8, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 11, 1}, {11, UPB_SIZE(24, 48), 0, 1, 11, 3}, {12, UPB_SIZE(16, 32), 0, 0, 9, 1}, }; diff --git a/src/core/ext/upb-generated/google/api/http.upb.h b/src/core/ext/upb-generated/google/api/http.upb.h index d3a5d1a3e6b..9012b9f7482 100644 --- a/src/core/ext/upb-generated/google/api/http.upb.h +++ b/src/core/ext/upb-generated/google/api/http.upb.h @@ -91,18 +91,18 @@ typedef enum { UPB_INLINE google_api_HttpRule_pattern_oneofcases google_api_HttpRule_pattern_case(const google_api_HttpRule* msg) { return (google_api_HttpRule_pattern_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 72), int32_t); } UPB_INLINE upb_strview google_api_HttpRule_selector(const google_api_HttpRule *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } -UPB_INLINE bool google_api_HttpRule_has_get(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 2); } +UPB_INLINE bool google_api_HttpRule_has_get(const google_api_HttpRule *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 2; } UPB_INLINE upb_strview google_api_HttpRule_get(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE bool google_api_HttpRule_has_put(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 3); } +UPB_INLINE bool google_api_HttpRule_has_put(const google_api_HttpRule *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 3; } UPB_INLINE upb_strview google_api_HttpRule_put(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 3, upb_strview_make("", strlen(""))); } -UPB_INLINE bool google_api_HttpRule_has_post(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 4); } +UPB_INLINE bool google_api_HttpRule_has_post(const google_api_HttpRule *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 4; } UPB_INLINE upb_strview google_api_HttpRule_post(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 4, upb_strview_make("", strlen(""))); } -UPB_INLINE bool google_api_HttpRule_has_delete(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 5); } +UPB_INLINE bool google_api_HttpRule_has_delete(const google_api_HttpRule *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 5; } UPB_INLINE upb_strview google_api_HttpRule_delete(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 5, upb_strview_make("", strlen(""))); } -UPB_INLINE bool google_api_HttpRule_has_patch(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 6); } +UPB_INLINE bool google_api_HttpRule_has_patch(const google_api_HttpRule *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 6; } UPB_INLINE upb_strview google_api_HttpRule_patch(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 6, upb_strview_make("", strlen(""))); } UPB_INLINE upb_strview google_api_HttpRule_body(const google_api_HttpRule *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } -UPB_INLINE bool google_api_HttpRule_has_custom(const google_api_HttpRule *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(36, 72), 8); } +UPB_INLINE bool google_api_HttpRule_has_custom(const google_api_HttpRule *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 8; } UPB_INLINE const google_api_CustomHttpPattern* google_api_HttpRule_custom(const google_api_HttpRule *msg) { return UPB_READ_ONEOF(msg, const google_api_CustomHttpPattern*, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 8, NULL); } UPB_INLINE bool google_api_HttpRule_has_additional_bindings(const google_api_HttpRule *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } UPB_INLINE const google_api_HttpRule* const* google_api_HttpRule_additional_bindings(const google_api_HttpRule *msg, size_t *len) { return (const google_api_HttpRule* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h index 5316dd30516..64701a0cf21 100644 --- a/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h @@ -198,9 +198,9 @@ UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_prot return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_name(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_name(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_package(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_package(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE upb_strview const* google_protobuf_FileDescriptorProto_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_message_type(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); } @@ -211,13 +211,13 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_pro UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); } UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_FileOptions*); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_protobuf_SourceCodeInfo*); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(56, 112), len); } UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(60, 120), len); } -UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value) { @@ -355,7 +355,7 @@ UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_name(const google_protobuf_DescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_DescriptorProto_name(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_DescriptorProto_has_field(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_field(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } @@ -367,7 +367,7 @@ UPB_INLINE bool google_protobuf_DescriptorProto_has_extension_range(const google UPB_INLINE const google_protobuf_DescriptorProto_ExtensionRange* const* google_protobuf_DescriptorProto_extension_range(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_DescriptorProto_ExtensionRange* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } UPB_INLINE bool google_protobuf_DescriptorProto_has_extension(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_DescriptorProto_extension(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); } -UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_DescriptorProto_has_options(const google_protobuf_DescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const google_protobuf_MessageOptions* google_protobuf_DescriptorProto_options(const google_protobuf_DescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_MessageOptions*); } UPB_INLINE bool google_protobuf_DescriptorProto_has_oneof_decl(const google_protobuf_DescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); } UPB_INLINE const google_protobuf_OneofDescriptorProto* const* google_protobuf_DescriptorProto_oneof_decl(const google_protobuf_DescriptorProto *msg, size_t *len) { return (const google_protobuf_OneofDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); } @@ -508,11 +508,11 @@ UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len); } -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_start(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ExtensionRange_end(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_DescriptorProto_ExtensionRange_has_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE const google_protobuf_ExtensionRangeOptions* google_protobuf_DescriptorProto_ExtensionRange_options(const google_protobuf_DescriptorProto_ExtensionRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const google_protobuf_ExtensionRangeOptions*); } UPB_INLINE void google_protobuf_DescriptorProto_ExtensionRange_set_start(google_protobuf_DescriptorProto_ExtensionRange *msg, int32_t value) { @@ -551,9 +551,9 @@ UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const g return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len); } -UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_start(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_DescriptorProto_ReservedRange_has_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_DescriptorProto_ReservedRange_end(const google_protobuf_DescriptorProto_ReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_DescriptorProto_ReservedRange_set_start(google_protobuf_DescriptorProto_ReservedRange *msg, int32_t value) { @@ -610,27 +610,27 @@ UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_pro return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 7); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int32_t); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 8); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 9); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 11); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 11); } UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const google_protobuf_FieldOptions*); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), int32_t); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 10); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 10); } UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), upb_strview); } -UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool); } UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) { @@ -701,9 +701,9 @@ UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_pro return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_name(const google_protobuf_OneofDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_OneofDescriptorProto_name(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_OneofDescriptorProto_has_options(const google_protobuf_OneofDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const google_protobuf_OneofOptions* google_protobuf_OneofDescriptorProto_options(const google_protobuf_OneofDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_OneofOptions*); } UPB_INLINE void google_protobuf_OneofDescriptorProto_set_name(google_protobuf_OneofDescriptorProto *msg, upb_strview value) { @@ -738,11 +738,11 @@ UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_prot return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_name(const google_protobuf_EnumDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_EnumDescriptorProto_name(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_value(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_EnumValueDescriptorProto* const* google_protobuf_EnumDescriptorProto_value(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumValueDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } -UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_options(const google_protobuf_EnumDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const google_protobuf_EnumOptions* google_protobuf_EnumDescriptorProto_options(const google_protobuf_EnumDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_EnumOptions*); } UPB_INLINE bool google_protobuf_EnumDescriptorProto_has_reserved_range(const google_protobuf_EnumDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } UPB_INLINE const google_protobuf_EnumDescriptorProto_EnumReservedRange* const* google_protobuf_EnumDescriptorProto_reserved_range(const google_protobuf_EnumDescriptorProto *msg, size_t *len) { return (const google_protobuf_EnumDescriptorProto_EnumReservedRange* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } @@ -816,9 +816,9 @@ UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_start(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_EnumDescriptorProto_EnumReservedRange_has_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_EnumDescriptorProto_EnumReservedRange_end(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_protobuf_EnumDescriptorProto_EnumReservedRange_set_start(google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, int32_t value) { @@ -844,11 +844,11 @@ UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); } -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_protobuf_EnumValueOptions*); } UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value) { @@ -887,11 +887,11 @@ UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_p return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_name(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_ServiceDescriptorProto_name(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_method(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } UPB_INLINE const google_protobuf_MethodDescriptorProto* const* google_protobuf_ServiceDescriptorProto_method(const google_protobuf_ServiceDescriptorProto *msg, size_t *len) { return (const google_protobuf_MethodDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } -UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_ServiceDescriptorProto_has_options(const google_protobuf_ServiceDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const google_protobuf_ServiceOptions* google_protobuf_ServiceDescriptorProto_options(const google_protobuf_ServiceDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_protobuf_ServiceOptions*); } UPB_INLINE void google_protobuf_ServiceDescriptorProto_set_name(google_protobuf_ServiceDescriptorProto *msg, upb_strview value) { @@ -939,17 +939,17 @@ UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_pr return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_MethodOptions*); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } -UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value) { @@ -1000,45 +1000,45 @@ UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_Fil return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 11); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 11); } UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 12); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 12); } UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 13); } +UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 13); } UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 7); } UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 8); } UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 9); } UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 14); } +UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 14); } UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 15); } +UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 15); } UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 16); } +UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 16); } UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 17); } +UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 17); } UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 18); } +UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 18); } UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 144), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 10); } +UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 10); } UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } -UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 19); } +UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 19); } UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 160), upb_strview); } -UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_has_field(msg, 20); } +UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 20); } UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 176), upb_strview); } UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 192)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(108, 192), len); } @@ -1151,13 +1151,13 @@ UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_ return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_MessageOptions_has_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_MessageOptions_message_set_wire_format(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } -UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_MessageOptions_has_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_MessageOptions_no_standard_descriptor_accessor(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } -UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_MessageOptions_has_deprecated(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool google_protobuf_MessageOptions_deprecated(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); } -UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_MessageOptions_has_map_entry(const google_protobuf_MessageOptions *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE bool google_protobuf_MessageOptions_map_entry(const google_protobuf_MessageOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } UPB_INLINE bool google_protobuf_MessageOptions_has_uninterpreted_option(const google_protobuf_MessageOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MessageOptions_uninterpreted_option(const google_protobuf_MessageOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); } @@ -1206,17 +1206,17 @@ UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_Fi return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } -UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); } -UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); } -UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } -UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool); } UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 32)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } @@ -1304,9 +1304,9 @@ UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_Enu return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumOptions_has_allow_alias(const google_protobuf_EnumOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_EnumOptions_allow_alias(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } -UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_EnumOptions_has_deprecated(const google_protobuf_EnumOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_EnumOptions_deprecated(const google_protobuf_EnumOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE bool google_protobuf_EnumOptions_has_uninterpreted_option(const google_protobuf_EnumOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumOptions_uninterpreted_option(const google_protobuf_EnumOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } @@ -1347,7 +1347,7 @@ UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobu return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_EnumValueOptions_has_deprecated(const google_protobuf_EnumValueOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_EnumValueOptions_deprecated(const google_protobuf_EnumValueOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_EnumValueOptions_has_uninterpreted_option(const google_protobuf_EnumValueOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_EnumValueOptions_uninterpreted_option(const google_protobuf_EnumValueOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } @@ -1384,7 +1384,7 @@ UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_ServiceOptions_has_deprecated(const google_protobuf_ServiceOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_ServiceOptions_deprecated(const google_protobuf_ServiceOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE bool google_protobuf_ServiceOptions_has_uninterpreted_option(const google_protobuf_ServiceOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_ServiceOptions_uninterpreted_option(const google_protobuf_ServiceOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } @@ -1421,9 +1421,9 @@ UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_M return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len); } -UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); } -UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); } UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); } @@ -1466,17 +1466,17 @@ UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_prot UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); } UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(56, 80), len); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); } -UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool google_protobuf_UninterpretedOption_has_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE upb_strview google_protobuf_UninterpretedOption_aggregate_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview); } UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_mutable_name(google_protobuf_UninterpretedOption *msg, size_t *len) { @@ -1531,9 +1531,9 @@ UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const go return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len); } -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value) { @@ -1592,9 +1592,9 @@ UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_ UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_path(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } UPB_INLINE int32_t const* google_protobuf_SourceCodeInfo_Location_span(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_leading_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } -UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_has_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE upb_strview google_protobuf_SourceCodeInfo_Location_trailing_comments(const google_protobuf_SourceCodeInfo_Location *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); } UPB_INLINE upb_strview const* google_protobuf_SourceCodeInfo_Location_leading_detached_comments(const google_protobuf_SourceCodeInfo_Location *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); } @@ -1683,11 +1683,11 @@ UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const go } UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); } -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upb.c b/src/core/ext/upb-generated/google/protobuf/struct.upb.c index a896d1bacf7..a0d20a4fae0 100644 --- a/src/core/ext/upb-generated/google/protobuf/struct.upb.c +++ b/src/core/ext/upb-generated/google/protobuf/struct.upb.c @@ -47,12 +47,12 @@ static const upb_msglayout *const google_protobuf_Value_submsgs[2] = { }; static const upb_msglayout_field google_protobuf_Value__fields[6] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 14, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 1, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 9, 1}, - {4, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 8, 1}, - {5, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 1, 11, 1}, - {6, UPB_SIZE(0, 0), UPB_SIZE(-8, -16), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 14, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 1, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1}, + {4, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 8, 1}, + {5, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 1, 11, 1}, + {6, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1}, }; const upb_msglayout google_protobuf_Value_msginit = { diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upb.h b/src/core/ext/upb-generated/google/protobuf/struct.upb.h index 9e291e16ab8..962431ecf48 100644 --- a/src/core/ext/upb-generated/google/protobuf/struct.upb.h +++ b/src/core/ext/upb-generated/google/protobuf/struct.upb.h @@ -104,17 +104,17 @@ typedef enum { } google_protobuf_Value_kind_oneofcases; UPB_INLINE google_protobuf_Value_kind_oneofcases google_protobuf_Value_kind_case(const google_protobuf_Value* msg) { return (google_protobuf_Value_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } -UPB_INLINE bool google_protobuf_Value_has_null_value(const google_protobuf_Value *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE bool google_protobuf_Value_has_null_value(const google_protobuf_Value *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; } UPB_INLINE int32_t google_protobuf_Value_null_value(const google_protobuf_Value *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, google_protobuf_NULL_VALUE); } -UPB_INLINE bool google_protobuf_Value_has_number_value(const google_protobuf_Value *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } +UPB_INLINE bool google_protobuf_Value_has_number_value(const google_protobuf_Value *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; } UPB_INLINE double google_protobuf_Value_number_value(const google_protobuf_Value *msg) { return UPB_READ_ONEOF(msg, double, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, 0); } -UPB_INLINE bool google_protobuf_Value_has_string_value(const google_protobuf_Value *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); } +UPB_INLINE bool google_protobuf_Value_has_string_value(const google_protobuf_Value *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 3; } UPB_INLINE upb_strview google_protobuf_Value_string_value(const google_protobuf_Value *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, upb_strview_make("", strlen(""))); } -UPB_INLINE bool google_protobuf_Value_has_bool_value(const google_protobuf_Value *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 4); } +UPB_INLINE bool google_protobuf_Value_has_bool_value(const google_protobuf_Value *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 4; } UPB_INLINE bool google_protobuf_Value_bool_value(const google_protobuf_Value *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 4, false); } -UPB_INLINE bool google_protobuf_Value_has_struct_value(const google_protobuf_Value *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 5); } +UPB_INLINE bool google_protobuf_Value_has_struct_value(const google_protobuf_Value *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 5; } UPB_INLINE const google_protobuf_Struct* google_protobuf_Value_struct_value(const google_protobuf_Value *msg) { return UPB_READ_ONEOF(msg, const google_protobuf_Struct*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 5, NULL); } -UPB_INLINE bool google_protobuf_Value_has_list_value(const google_protobuf_Value *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 6); } +UPB_INLINE bool google_protobuf_Value_has_list_value(const google_protobuf_Value *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 6; } UPB_INLINE const google_protobuf_ListValue* google_protobuf_Value_list_value(const google_protobuf_Value *msg) { return UPB_READ_ONEOF(msg, const google_protobuf_ListValue*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 6, NULL); } UPB_INLINE void google_protobuf_Value_set_null_value(google_protobuf_Value *msg, int32_t value) { diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c index 989b36818fe..036b66fdcec 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c @@ -30,8 +30,8 @@ static const upb_msglayout *const grpc_gcp_Identity_submsgs[1] = { }; static const upb_msglayout_field grpc_gcp_Identity__fields[3] = { - {1, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, - {2, UPB_SIZE(4, 8), UPB_SIZE(-12, -24), 0, 9, 1}, + {1, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, + {2, UPB_SIZE(4, 8), UPB_SIZE(-13, -25), 0, 9, 1}, {3, UPB_SIZE(0, 0), 0, 0, 11, _UPB_LABEL_MAP}, }; @@ -146,9 +146,9 @@ static const upb_msglayout *const grpc_gcp_HandshakerReq_submsgs[3] = { }; static const upb_msglayout_field grpc_gcp_HandshakerReq__fields[3] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout grpc_gcp_HandshakerReq_msginit = { diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h index f113161da61..323f3cdbc6a 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h @@ -120,9 +120,9 @@ typedef enum { } grpc_gcp_Identity_identity_oneof_oneofcases; UPB_INLINE grpc_gcp_Identity_identity_oneof_oneofcases grpc_gcp_Identity_identity_oneof_case(const grpc_gcp_Identity* msg) { return (grpc_gcp_Identity_identity_oneof_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE bool grpc_gcp_Identity_has_service_account(const grpc_gcp_Identity *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } +UPB_INLINE bool grpc_gcp_Identity_has_service_account(const grpc_gcp_Identity *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; } UPB_INLINE upb_strview grpc_gcp_Identity_service_account(const grpc_gcp_Identity *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 1, upb_strview_make("", strlen(""))); } -UPB_INLINE bool grpc_gcp_Identity_has_hostname(const grpc_gcp_Identity *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool grpc_gcp_Identity_has_hostname(const grpc_gcp_Identity *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE upb_strview grpc_gcp_Identity_hostname(const grpc_gcp_Identity *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(4, 8), UPB_SIZE(12, 24), 2, upb_strview_make("", strlen(""))); } UPB_INLINE bool grpc_gcp_Identity_has_attributes(const grpc_gcp_Identity *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE size_t grpc_gcp_Identity_attributes_size(const grpc_gcp_Identity *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); } @@ -465,11 +465,11 @@ typedef enum { } grpc_gcp_HandshakerReq_req_oneof_oneofcases; UPB_INLINE grpc_gcp_HandshakerReq_req_oneof_oneofcases grpc_gcp_HandshakerReq_req_oneof_case(const grpc_gcp_HandshakerReq* msg) { return (grpc_gcp_HandshakerReq_req_oneof_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool grpc_gcp_HandshakerReq_has_client_start(const grpc_gcp_HandshakerReq *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool grpc_gcp_HandshakerReq_has_client_start(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const grpc_gcp_StartClientHandshakeReq* grpc_gcp_HandshakerReq_client_start(const grpc_gcp_HandshakerReq *msg) { return UPB_READ_ONEOF(msg, const grpc_gcp_StartClientHandshakeReq*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool grpc_gcp_HandshakerReq_has_server_start(const grpc_gcp_HandshakerReq *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool grpc_gcp_HandshakerReq_has_server_start(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const grpc_gcp_StartServerHandshakeReq* grpc_gcp_HandshakerReq_server_start(const grpc_gcp_HandshakerReq *msg) { return UPB_READ_ONEOF(msg, const grpc_gcp_StartServerHandshakeReq*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool grpc_gcp_HandshakerReq_has_next(const grpc_gcp_HandshakerReq *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool grpc_gcp_HandshakerReq_has_next(const grpc_gcp_HandshakerReq *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE const grpc_gcp_NextHandshakeMessageReq* grpc_gcp_HandshakerReq_next(const grpc_gcp_HandshakerReq *msg) { return UPB_READ_ONEOF(msg, const grpc_gcp_NextHandshakeMessageReq*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } UPB_INLINE void grpc_gcp_HandshakerReq_set_client_start(grpc_gcp_HandshakerReq *msg, grpc_gcp_StartClientHandshakeReq* value) { diff --git a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c index 3e20fd7f8e3..90b7cb7f622 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +++ b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c @@ -20,8 +20,8 @@ static const upb_msglayout *const grpc_lb_v1_LoadBalanceRequest_submsgs[2] = { }; static const upb_msglayout_field grpc_lb_v1_LoadBalanceRequest__fields[2] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout grpc_lb_v1_LoadBalanceRequest_msginit = { @@ -78,9 +78,9 @@ static const upb_msglayout *const grpc_lb_v1_LoadBalanceResponse_submsgs[3] = { }; static const upb_msglayout_field grpc_lb_v1_LoadBalanceResponse__fields[3] = { - {1, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 1, 11, 1}, - {2, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 2, 11, 1}, - {3, UPB_SIZE(0, 0), UPB_SIZE(-4, -8), 0, 11, 1}, + {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1}, + {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1}, + {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1}, }; const upb_msglayout grpc_lb_v1_LoadBalanceResponse_msginit = { diff --git a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h index 2cdb6faf3d2..2ce5afca1c4 100644 --- a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +++ b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h @@ -73,9 +73,9 @@ typedef enum { } grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases; UPB_INLINE grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_case(const grpc_lb_v1_LoadBalanceRequest* msg) { return (grpc_lb_v1_LoadBalanceRequest_load_balance_request_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const grpc_lb_v1_InitialLoadBalanceRequest* grpc_lb_v1_LoadBalanceRequest_initial_request(const grpc_lb_v1_LoadBalanceRequest *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_InitialLoadBalanceRequest*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_client_stats(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool grpc_lb_v1_LoadBalanceRequest_has_client_stats(const grpc_lb_v1_LoadBalanceRequest *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const grpc_lb_v1_ClientStats* grpc_lb_v1_LoadBalanceRequest_client_stats(const grpc_lb_v1_LoadBalanceRequest *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_ClientStats*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } UPB_INLINE void grpc_lb_v1_LoadBalanceRequest_set_initial_request(grpc_lb_v1_LoadBalanceRequest *msg, grpc_lb_v1_InitialLoadBalanceRequest* value) { @@ -230,11 +230,11 @@ typedef enum { } grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases; UPB_INLINE grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_case(const grpc_lb_v1_LoadBalanceResponse* msg) { return (grpc_lb_v1_LoadBalanceResponse_load_balance_response_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const grpc_lb_v1_InitialLoadBalanceResponse* grpc_lb_v1_LoadBalanceResponse_initial_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_InitialLoadBalanceResponse*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_server_list(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_server_list(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const grpc_lb_v1_ServerList* grpc_lb_v1_LoadBalanceResponse_server_list(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_ServerList*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_fallback_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool grpc_lb_v1_LoadBalanceResponse_has_fallback_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE const grpc_lb_v1_FallbackResponse* grpc_lb_v1_LoadBalanceResponse_fallback_response(const grpc_lb_v1_LoadBalanceResponse *msg) { return UPB_READ_ONEOF(msg, const grpc_lb_v1_FallbackResponse*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); } UPB_INLINE void grpc_lb_v1_LoadBalanceResponse_set_initial_response(grpc_lb_v1_LoadBalanceResponse *msg, grpc_lb_v1_InitialLoadBalanceResponse* value) { diff --git a/src/core/ext/upb-generated/validate/validate.upb.c b/src/core/ext/upb-generated/validate/validate.upb.c index a83d46932bb..1d6ab9bca75 100644 --- a/src/core/ext/upb-generated/validate/validate.upb.c +++ b/src/core/ext/upb-generated/validate/validate.upb.c @@ -41,28 +41,28 @@ static const upb_msglayout *const validate_FieldRules_submsgs[22] = { }; static const upb_msglayout_field validate_FieldRules__fields[22] = { - {1, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 8, 11, 1}, - {2, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 3, 11, 1}, - {3, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 9, 11, 1}, - {4, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 10, 11, 1}, - {5, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 20, 11, 1}, - {6, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 21, 11, 1}, - {7, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 16, 11, 1}, - {8, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 17, 11, 1}, - {9, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 6, 11, 1}, - {10, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 7, 11, 1}, - {11, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 14, 11, 1}, - {12, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 15, 11, 1}, - {13, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 1, 11, 1}, - {14, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 18, 11, 1}, - {15, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 2, 11, 1}, - {16, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 5, 11, 1}, + {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 8, 11, 1}, + {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 3, 11, 1}, + {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 9, 11, 1}, + {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 10, 11, 1}, + {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 20, 11, 1}, + {6, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 21, 11, 1}, + {7, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 16, 11, 1}, + {8, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 17, 11, 1}, + {9, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 6, 11, 1}, + {10, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 7, 11, 1}, + {11, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 14, 11, 1}, + {12, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 15, 11, 1}, + {13, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1}, + {14, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 18, 11, 1}, + {15, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 11, 1}, + {16, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 5, 11, 1}, {17, UPB_SIZE(4, 8), 1, 12, 11, 1}, - {18, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 13, 11, 1}, - {19, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 11, 11, 1}, - {20, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 0, 11, 1}, - {21, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 4, 11, 1}, - {22, UPB_SIZE(8, 16), UPB_SIZE(-12, -24), 19, 11, 1}, + {18, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 13, 11, 1}, + {19, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 11, 11, 1}, + {20, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1}, + {21, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 4, 11, 1}, + {22, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 19, 11, 1}, }; const upb_msglayout validate_FieldRules_msginit = { @@ -285,19 +285,19 @@ static const upb_msglayout_field validate_StringRules__fields[25] = { {9, UPB_SIZE(92, 128), 12, 0, 9, 1}, {10, UPB_SIZE(108, 160), 0, 0, 9, 3}, {11, UPB_SIZE(112, 168), 0, 0, 9, 3}, - {12, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, - {13, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, - {14, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, - {15, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, - {16, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, - {17, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, - {18, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {12, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {13, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {14, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {15, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {16, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {17, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {18, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, {19, UPB_SIZE(40, 40), 5, 0, 4, 1}, {20, UPB_SIZE(48, 48), 6, 0, 4, 1}, - {21, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, - {22, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 8, 1}, + {21, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, + {22, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1}, {23, UPB_SIZE(100, 144), 13, 0, 9, 1}, - {24, UPB_SIZE(120, 176), UPB_SIZE(-128, -184), 0, 14, 1}, + {24, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 14, 1}, {25, UPB_SIZE(56, 56), 7, 0, 8, 1}, }; @@ -317,9 +317,9 @@ static const upb_msglayout_field validate_BytesRules__fields[13] = { {7, UPB_SIZE(64, 96), 8, 0, 12, 1}, {8, UPB_SIZE(72, 112), 0, 0, 12, 3}, {9, UPB_SIZE(76, 120), 0, 0, 12, 3}, - {10, UPB_SIZE(80, 128), UPB_SIZE(-84, -132), 0, 8, 1}, - {11, UPB_SIZE(80, 128), UPB_SIZE(-84, -132), 0, 8, 1}, - {12, UPB_SIZE(80, 128), UPB_SIZE(-84, -132), 0, 8, 1}, + {10, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, + {11, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, + {12, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1}, {13, UPB_SIZE(24, 24), 3, 0, 4, 1}, }; diff --git a/src/core/ext/upb-generated/validate/validate.upb.h b/src/core/ext/upb-generated/validate/validate.upb.h index cebe2999ef5..7fde5b75a4b 100644 --- a/src/core/ext/upb-generated/validate/validate.upb.h +++ b/src/core/ext/upb-generated/validate/validate.upb.h @@ -140,49 +140,49 @@ typedef enum { } validate_FieldRules_type_oneofcases; UPB_INLINE validate_FieldRules_type_oneofcases validate_FieldRules_type_case(const validate_FieldRules* msg) { return (validate_FieldRules_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); } -UPB_INLINE bool validate_FieldRules_has_float(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 1); } +UPB_INLINE bool validate_FieldRules_has_float(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; } UPB_INLINE const validate_FloatRules* validate_FieldRules_float(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_FloatRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); } -UPB_INLINE bool validate_FieldRules_has_double(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 2); } +UPB_INLINE bool validate_FieldRules_has_double(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; } UPB_INLINE const validate_DoubleRules* validate_FieldRules_double(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_DoubleRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); } -UPB_INLINE bool validate_FieldRules_has_int32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 3); } +UPB_INLINE bool validate_FieldRules_has_int32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; } UPB_INLINE const validate_Int32Rules* validate_FieldRules_int32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Int32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); } -UPB_INLINE bool validate_FieldRules_has_int64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 4); } +UPB_INLINE bool validate_FieldRules_has_int64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; } UPB_INLINE const validate_Int64Rules* validate_FieldRules_int64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Int64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); } -UPB_INLINE bool validate_FieldRules_has_uint32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 5); } +UPB_INLINE bool validate_FieldRules_has_uint32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; } UPB_INLINE const validate_UInt32Rules* validate_FieldRules_uint32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_UInt32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); } -UPB_INLINE bool validate_FieldRules_has_uint64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 6); } +UPB_INLINE bool validate_FieldRules_has_uint64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 6; } UPB_INLINE const validate_UInt64Rules* validate_FieldRules_uint64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_UInt64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 6, NULL); } -UPB_INLINE bool validate_FieldRules_has_sint32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 7); } +UPB_INLINE bool validate_FieldRules_has_sint32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 7; } UPB_INLINE const validate_SInt32Rules* validate_FieldRules_sint32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SInt32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 7, NULL); } -UPB_INLINE bool validate_FieldRules_has_sint64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 8); } +UPB_INLINE bool validate_FieldRules_has_sint64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 8; } UPB_INLINE const validate_SInt64Rules* validate_FieldRules_sint64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SInt64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 8, NULL); } -UPB_INLINE bool validate_FieldRules_has_fixed32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 9); } +UPB_INLINE bool validate_FieldRules_has_fixed32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 9; } UPB_INLINE const validate_Fixed32Rules* validate_FieldRules_fixed32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Fixed32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 9, NULL); } -UPB_INLINE bool validate_FieldRules_has_fixed64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 10); } +UPB_INLINE bool validate_FieldRules_has_fixed64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 10; } UPB_INLINE const validate_Fixed64Rules* validate_FieldRules_fixed64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_Fixed64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 10, NULL); } -UPB_INLINE bool validate_FieldRules_has_sfixed32(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 11); } +UPB_INLINE bool validate_FieldRules_has_sfixed32(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 11; } UPB_INLINE const validate_SFixed32Rules* validate_FieldRules_sfixed32(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SFixed32Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 11, NULL); } -UPB_INLINE bool validate_FieldRules_has_sfixed64(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 12); } +UPB_INLINE bool validate_FieldRules_has_sfixed64(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 12; } UPB_INLINE const validate_SFixed64Rules* validate_FieldRules_sfixed64(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_SFixed64Rules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 12, NULL); } -UPB_INLINE bool validate_FieldRules_has_bool(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 13); } +UPB_INLINE bool validate_FieldRules_has_bool(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 13; } UPB_INLINE const validate_BoolRules* validate_FieldRules_bool(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_BoolRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 13, NULL); } -UPB_INLINE bool validate_FieldRules_has_string(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 14); } +UPB_INLINE bool validate_FieldRules_has_string(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 14; } UPB_INLINE const validate_StringRules* validate_FieldRules_string(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_StringRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 14, NULL); } -UPB_INLINE bool validate_FieldRules_has_bytes(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 15); } +UPB_INLINE bool validate_FieldRules_has_bytes(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 15; } UPB_INLINE const validate_BytesRules* validate_FieldRules_bytes(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_BytesRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 15, NULL); } -UPB_INLINE bool validate_FieldRules_has_enum(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 16); } +UPB_INLINE bool validate_FieldRules_has_enum(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 16; } UPB_INLINE const validate_EnumRules* validate_FieldRules_enum(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_EnumRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 16, NULL); } -UPB_INLINE bool validate_FieldRules_has_message(const validate_FieldRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_FieldRules_has_message(const validate_FieldRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE const validate_MessageRules* validate_FieldRules_message(const validate_FieldRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const validate_MessageRules*); } -UPB_INLINE bool validate_FieldRules_has_repeated(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 18); } +UPB_INLINE bool validate_FieldRules_has_repeated(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 18; } UPB_INLINE const validate_RepeatedRules* validate_FieldRules_repeated(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_RepeatedRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 18, NULL); } -UPB_INLINE bool validate_FieldRules_has_map(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 19); } +UPB_INLINE bool validate_FieldRules_has_map(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 19; } UPB_INLINE const validate_MapRules* validate_FieldRules_map(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_MapRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 19, NULL); } -UPB_INLINE bool validate_FieldRules_has_any(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 20); } +UPB_INLINE bool validate_FieldRules_has_any(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 20; } UPB_INLINE const validate_AnyRules* validate_FieldRules_any(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_AnyRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 20, NULL); } -UPB_INLINE bool validate_FieldRules_has_duration(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 21); } +UPB_INLINE bool validate_FieldRules_has_duration(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 21; } UPB_INLINE const validate_DurationRules* validate_FieldRules_duration(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_DurationRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 21, NULL); } -UPB_INLINE bool validate_FieldRules_has_timestamp(const validate_FieldRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 24), 22); } +UPB_INLINE bool validate_FieldRules_has_timestamp(const validate_FieldRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 22; } UPB_INLINE const validate_TimestampRules* validate_FieldRules_timestamp(const validate_FieldRules *msg) { return UPB_READ_ONEOF(msg, const validate_TimestampRules*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 22, NULL); } UPB_INLINE void validate_FieldRules_set_float(validate_FieldRules *msg, validate_FloatRules* value) { @@ -465,15 +465,15 @@ UPB_INLINE char *validate_FloatRules_serialize(const validate_FloatRules *msg, u return upb_encode(msg, &validate_FloatRules_msginit, arena, len); } -UPB_INLINE bool validate_FloatRules_has_const(const validate_FloatRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_FloatRules_has_const(const validate_FloatRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE float validate_FloatRules_const(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), float); } -UPB_INLINE bool validate_FloatRules_has_lt(const validate_FloatRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_FloatRules_has_lt(const validate_FloatRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE float validate_FloatRules_lt(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), float); } -UPB_INLINE bool validate_FloatRules_has_lte(const validate_FloatRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_FloatRules_has_lte(const validate_FloatRules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE float validate_FloatRules_lte(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), float); } -UPB_INLINE bool validate_FloatRules_has_gt(const validate_FloatRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_FloatRules_has_gt(const validate_FloatRules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE float validate_FloatRules_gt(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), float); } -UPB_INLINE bool validate_FloatRules_has_gte(const validate_FloatRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_FloatRules_has_gte(const validate_FloatRules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE float validate_FloatRules_gte(const validate_FloatRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), float); } UPB_INLINE float const* validate_FloatRules_in(const validate_FloatRules *msg, size_t *len) { return (float const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE float const* validate_FloatRules_not_in(const validate_FloatRules *msg, size_t *len) { return (float const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } @@ -533,15 +533,15 @@ UPB_INLINE char *validate_DoubleRules_serialize(const validate_DoubleRules *msg, return upb_encode(msg, &validate_DoubleRules_msginit, arena, len); } -UPB_INLINE bool validate_DoubleRules_has_const(const validate_DoubleRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_DoubleRules_has_const(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE double validate_DoubleRules_const(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double); } -UPB_INLINE bool validate_DoubleRules_has_lt(const validate_DoubleRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_DoubleRules_has_lt(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE double validate_DoubleRules_lt(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), double); } -UPB_INLINE bool validate_DoubleRules_has_lte(const validate_DoubleRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_DoubleRules_has_lte(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE double validate_DoubleRules_lte(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); } -UPB_INLINE bool validate_DoubleRules_has_gt(const validate_DoubleRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_DoubleRules_has_gt(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE double validate_DoubleRules_gt(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), double); } -UPB_INLINE bool validate_DoubleRules_has_gte(const validate_DoubleRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_DoubleRules_has_gte(const validate_DoubleRules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE double validate_DoubleRules_gte(const validate_DoubleRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), double); } UPB_INLINE double const* validate_DoubleRules_in(const validate_DoubleRules *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE double const* validate_DoubleRules_not_in(const validate_DoubleRules *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } @@ -601,15 +601,15 @@ UPB_INLINE char *validate_Int32Rules_serialize(const validate_Int32Rules *msg, u return upb_encode(msg, &validate_Int32Rules_msginit, arena, len); } -UPB_INLINE bool validate_Int32Rules_has_const(const validate_Int32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_Int32Rules_has_const(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t validate_Int32Rules_const(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool validate_Int32Rules_has_lt(const validate_Int32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_Int32Rules_has_lt(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t validate_Int32Rules_lt(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool validate_Int32Rules_has_lte(const validate_Int32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_Int32Rules_has_lte(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE int32_t validate_Int32Rules_lte(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); } -UPB_INLINE bool validate_Int32Rules_has_gt(const validate_Int32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_Int32Rules_has_gt(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE int32_t validate_Int32Rules_gt(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } -UPB_INLINE bool validate_Int32Rules_has_gte(const validate_Int32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_Int32Rules_has_gte(const validate_Int32Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE int32_t validate_Int32Rules_gte(const validate_Int32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t); } UPB_INLINE int32_t const* validate_Int32Rules_in(const validate_Int32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t const* validate_Int32Rules_not_in(const validate_Int32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } @@ -669,15 +669,15 @@ UPB_INLINE char *validate_Int64Rules_serialize(const validate_Int64Rules *msg, u return upb_encode(msg, &validate_Int64Rules_msginit, arena, len); } -UPB_INLINE bool validate_Int64Rules_has_const(const validate_Int64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_Int64Rules_has_const(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int64_t validate_Int64Rules_const(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } -UPB_INLINE bool validate_Int64Rules_has_lt(const validate_Int64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_Int64Rules_has_lt(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int64_t validate_Int64Rules_lt(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } -UPB_INLINE bool validate_Int64Rules_has_lte(const validate_Int64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_Int64Rules_has_lte(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE int64_t validate_Int64Rules_lte(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); } -UPB_INLINE bool validate_Int64Rules_has_gt(const validate_Int64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_Int64Rules_has_gt(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE int64_t validate_Int64Rules_gt(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); } -UPB_INLINE bool validate_Int64Rules_has_gte(const validate_Int64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_Int64Rules_has_gte(const validate_Int64Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE int64_t validate_Int64Rules_gte(const validate_Int64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t); } UPB_INLINE int64_t const* validate_Int64Rules_in(const validate_Int64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t const* validate_Int64Rules_not_in(const validate_Int64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } @@ -737,15 +737,15 @@ UPB_INLINE char *validate_UInt32Rules_serialize(const validate_UInt32Rules *msg, return upb_encode(msg, &validate_UInt32Rules_msginit, arena, len); } -UPB_INLINE bool validate_UInt32Rules_has_const(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_UInt32Rules_has_const(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint32_t validate_UInt32Rules_const(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); } -UPB_INLINE bool validate_UInt32Rules_has_lt(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_UInt32Rules_has_lt(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE uint32_t validate_UInt32Rules_lt(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } -UPB_INLINE bool validate_UInt32Rules_has_lte(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_UInt32Rules_has_lte(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE uint32_t validate_UInt32Rules_lte(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), uint32_t); } -UPB_INLINE bool validate_UInt32Rules_has_gt(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_UInt32Rules_has_gt(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE uint32_t validate_UInt32Rules_gt(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t); } -UPB_INLINE bool validate_UInt32Rules_has_gte(const validate_UInt32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_UInt32Rules_has_gte(const validate_UInt32Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE uint32_t validate_UInt32Rules_gte(const validate_UInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), uint32_t); } UPB_INLINE uint32_t const* validate_UInt32Rules_in(const validate_UInt32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE uint32_t const* validate_UInt32Rules_not_in(const validate_UInt32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } @@ -805,15 +805,15 @@ UPB_INLINE char *validate_UInt64Rules_serialize(const validate_UInt64Rules *msg, return upb_encode(msg, &validate_UInt64Rules_msginit, arena, len); } -UPB_INLINE bool validate_UInt64Rules_has_const(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_UInt64Rules_has_const(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint64_t validate_UInt64Rules_const(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } -UPB_INLINE bool validate_UInt64Rules_has_lt(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_UInt64Rules_has_lt(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE uint64_t validate_UInt64Rules_lt(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } -UPB_INLINE bool validate_UInt64Rules_has_lte(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_UInt64Rules_has_lte(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE uint64_t validate_UInt64Rules_lte(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } -UPB_INLINE bool validate_UInt64Rules_has_gt(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_UInt64Rules_has_gt(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE uint64_t validate_UInt64Rules_gt(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); } -UPB_INLINE bool validate_UInt64Rules_has_gte(const validate_UInt64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_UInt64Rules_has_gte(const validate_UInt64Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE uint64_t validate_UInt64Rules_gte(const validate_UInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t); } UPB_INLINE uint64_t const* validate_UInt64Rules_in(const validate_UInt64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE uint64_t const* validate_UInt64Rules_not_in(const validate_UInt64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } @@ -873,15 +873,15 @@ UPB_INLINE char *validate_SInt32Rules_serialize(const validate_SInt32Rules *msg, return upb_encode(msg, &validate_SInt32Rules_msginit, arena, len); } -UPB_INLINE bool validate_SInt32Rules_has_const(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_SInt32Rules_has_const(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t validate_SInt32Rules_const(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool validate_SInt32Rules_has_lt(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_SInt32Rules_has_lt(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t validate_SInt32Rules_lt(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool validate_SInt32Rules_has_lte(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_SInt32Rules_has_lte(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE int32_t validate_SInt32Rules_lte(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); } -UPB_INLINE bool validate_SInt32Rules_has_gt(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_SInt32Rules_has_gt(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE int32_t validate_SInt32Rules_gt(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } -UPB_INLINE bool validate_SInt32Rules_has_gte(const validate_SInt32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_SInt32Rules_has_gte(const validate_SInt32Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE int32_t validate_SInt32Rules_gte(const validate_SInt32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t); } UPB_INLINE int32_t const* validate_SInt32Rules_in(const validate_SInt32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t const* validate_SInt32Rules_not_in(const validate_SInt32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } @@ -941,15 +941,15 @@ UPB_INLINE char *validate_SInt64Rules_serialize(const validate_SInt64Rules *msg, return upb_encode(msg, &validate_SInt64Rules_msginit, arena, len); } -UPB_INLINE bool validate_SInt64Rules_has_const(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_SInt64Rules_has_const(const validate_SInt64Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int64_t validate_SInt64Rules_const(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } -UPB_INLINE bool validate_SInt64Rules_has_lt(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_SInt64Rules_has_lt(const validate_SInt64Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int64_t validate_SInt64Rules_lt(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } -UPB_INLINE bool validate_SInt64Rules_has_lte(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_SInt64Rules_has_lte(const validate_SInt64Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE int64_t validate_SInt64Rules_lte(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); } -UPB_INLINE bool validate_SInt64Rules_has_gt(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_SInt64Rules_has_gt(const validate_SInt64Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE int64_t validate_SInt64Rules_gt(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); } -UPB_INLINE bool validate_SInt64Rules_has_gte(const validate_SInt64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_SInt64Rules_has_gte(const validate_SInt64Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE int64_t validate_SInt64Rules_gte(const validate_SInt64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t); } UPB_INLINE int64_t const* validate_SInt64Rules_in(const validate_SInt64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t const* validate_SInt64Rules_not_in(const validate_SInt64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } @@ -1009,15 +1009,15 @@ UPB_INLINE char *validate_Fixed32Rules_serialize(const validate_Fixed32Rules *ms return upb_encode(msg, &validate_Fixed32Rules_msginit, arena, len); } -UPB_INLINE bool validate_Fixed32Rules_has_const(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_Fixed32Rules_has_const(const validate_Fixed32Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint32_t validate_Fixed32Rules_const(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); } -UPB_INLINE bool validate_Fixed32Rules_has_lt(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_Fixed32Rules_has_lt(const validate_Fixed32Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE uint32_t validate_Fixed32Rules_lt(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); } -UPB_INLINE bool validate_Fixed32Rules_has_lte(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_Fixed32Rules_has_lte(const validate_Fixed32Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE uint32_t validate_Fixed32Rules_lte(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), uint32_t); } -UPB_INLINE bool validate_Fixed32Rules_has_gt(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_Fixed32Rules_has_gt(const validate_Fixed32Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE uint32_t validate_Fixed32Rules_gt(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t); } -UPB_INLINE bool validate_Fixed32Rules_has_gte(const validate_Fixed32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_Fixed32Rules_has_gte(const validate_Fixed32Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE uint32_t validate_Fixed32Rules_gte(const validate_Fixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), uint32_t); } UPB_INLINE uint32_t const* validate_Fixed32Rules_in(const validate_Fixed32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE uint32_t const* validate_Fixed32Rules_not_in(const validate_Fixed32Rules *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } @@ -1077,15 +1077,15 @@ UPB_INLINE char *validate_Fixed64Rules_serialize(const validate_Fixed64Rules *ms return upb_encode(msg, &validate_Fixed64Rules_msginit, arena, len); } -UPB_INLINE bool validate_Fixed64Rules_has_const(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_Fixed64Rules_has_const(const validate_Fixed64Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint64_t validate_Fixed64Rules_const(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } -UPB_INLINE bool validate_Fixed64Rules_has_lt(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_Fixed64Rules_has_lt(const validate_Fixed64Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE uint64_t validate_Fixed64Rules_lt(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } -UPB_INLINE bool validate_Fixed64Rules_has_lte(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_Fixed64Rules_has_lte(const validate_Fixed64Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE uint64_t validate_Fixed64Rules_lte(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } -UPB_INLINE bool validate_Fixed64Rules_has_gt(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_Fixed64Rules_has_gt(const validate_Fixed64Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE uint64_t validate_Fixed64Rules_gt(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); } -UPB_INLINE bool validate_Fixed64Rules_has_gte(const validate_Fixed64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_Fixed64Rules_has_gte(const validate_Fixed64Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE uint64_t validate_Fixed64Rules_gte(const validate_Fixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t); } UPB_INLINE uint64_t const* validate_Fixed64Rules_in(const validate_Fixed64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE uint64_t const* validate_Fixed64Rules_not_in(const validate_Fixed64Rules *msg, size_t *len) { return (uint64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } @@ -1145,15 +1145,15 @@ UPB_INLINE char *validate_SFixed32Rules_serialize(const validate_SFixed32Rules * return upb_encode(msg, &validate_SFixed32Rules_msginit, arena, len); } -UPB_INLINE bool validate_SFixed32Rules_has_const(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_SFixed32Rules_has_const(const validate_SFixed32Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t validate_SFixed32Rules_const(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool validate_SFixed32Rules_has_lt(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_SFixed32Rules_has_lt(const validate_SFixed32Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int32_t validate_SFixed32Rules_lt(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } -UPB_INLINE bool validate_SFixed32Rules_has_lte(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_SFixed32Rules_has_lte(const validate_SFixed32Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE int32_t validate_SFixed32Rules_lte(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); } -UPB_INLINE bool validate_SFixed32Rules_has_gt(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_SFixed32Rules_has_gt(const validate_SFixed32Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE int32_t validate_SFixed32Rules_gt(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); } -UPB_INLINE bool validate_SFixed32Rules_has_gte(const validate_SFixed32Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_SFixed32Rules_has_gte(const validate_SFixed32Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE int32_t validate_SFixed32Rules_gte(const validate_SFixed32Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), int32_t); } UPB_INLINE int32_t const* validate_SFixed32Rules_in(const validate_SFixed32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(24, 24), len); } UPB_INLINE int32_t const* validate_SFixed32Rules_not_in(const validate_SFixed32Rules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); } @@ -1213,15 +1213,15 @@ UPB_INLINE char *validate_SFixed64Rules_serialize(const validate_SFixed64Rules * return upb_encode(msg, &validate_SFixed64Rules_msginit, arena, len); } -UPB_INLINE bool validate_SFixed64Rules_has_const(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_SFixed64Rules_has_const(const validate_SFixed64Rules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int64_t validate_SFixed64Rules_const(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); } -UPB_INLINE bool validate_SFixed64Rules_has_lt(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_SFixed64Rules_has_lt(const validate_SFixed64Rules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE int64_t validate_SFixed64Rules_lt(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); } -UPB_INLINE bool validate_SFixed64Rules_has_lte(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_SFixed64Rules_has_lte(const validate_SFixed64Rules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE int64_t validate_SFixed64Rules_lte(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); } -UPB_INLINE bool validate_SFixed64Rules_has_gt(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_SFixed64Rules_has_gt(const validate_SFixed64Rules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE int64_t validate_SFixed64Rules_gt(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); } -UPB_INLINE bool validate_SFixed64Rules_has_gte(const validate_SFixed64Rules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_SFixed64Rules_has_gte(const validate_SFixed64Rules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE int64_t validate_SFixed64Rules_gte(const validate_SFixed64Rules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), int64_t); } UPB_INLINE int64_t const* validate_SFixed64Rules_in(const validate_SFixed64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 48), len); } UPB_INLINE int64_t const* validate_SFixed64Rules_not_in(const validate_SFixed64Rules *msg, size_t *len) { return (int64_t const*)_upb_array_accessor(msg, UPB_SIZE(52, 56), len); } @@ -1281,7 +1281,7 @@ UPB_INLINE char *validate_BoolRules_serialize(const validate_BoolRules *msg, upb return upb_encode(msg, &validate_BoolRules_msginit, arena, len); } -UPB_INLINE bool validate_BoolRules_has_const(const validate_BoolRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_BoolRules_has_const(const validate_BoolRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool validate_BoolRules_const(const validate_BoolRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE void validate_BoolRules_set_const(validate_BoolRules *msg, bool value) { @@ -1318,53 +1318,53 @@ typedef enum { } validate_StringRules_well_known_oneofcases; UPB_INLINE validate_StringRules_well_known_oneofcases validate_StringRules_well_known_case(const validate_StringRules* msg) { return (validate_StringRules_well_known_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(128, 184), int32_t); } -UPB_INLINE bool validate_StringRules_has_const(const validate_StringRules *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE bool validate_StringRules_has_const(const validate_StringRules *msg) { return _upb_hasbit(msg, 8); } UPB_INLINE upb_strview validate_StringRules_const(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 64), upb_strview); } -UPB_INLINE bool validate_StringRules_has_min_len(const validate_StringRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_StringRules_has_min_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint64_t validate_StringRules_min_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } -UPB_INLINE bool validate_StringRules_has_max_len(const validate_StringRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_StringRules_has_max_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE uint64_t validate_StringRules_max_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } -UPB_INLINE bool validate_StringRules_has_min_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_StringRules_has_min_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE uint64_t validate_StringRules_min_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } -UPB_INLINE bool validate_StringRules_has_max_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_StringRules_has_max_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE uint64_t validate_StringRules_max_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); } -UPB_INLINE bool validate_StringRules_has_pattern(const validate_StringRules *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE bool validate_StringRules_has_pattern(const validate_StringRules *msg) { return _upb_hasbit(msg, 9); } UPB_INLINE upb_strview validate_StringRules_pattern(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 80), upb_strview); } -UPB_INLINE bool validate_StringRules_has_prefix(const validate_StringRules *msg) { return _upb_has_field(msg, 10); } +UPB_INLINE bool validate_StringRules_has_prefix(const validate_StringRules *msg) { return _upb_hasbit(msg, 10); } UPB_INLINE upb_strview validate_StringRules_prefix(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 96), upb_strview); } -UPB_INLINE bool validate_StringRules_has_suffix(const validate_StringRules *msg) { return _upb_has_field(msg, 11); } +UPB_INLINE bool validate_StringRules_has_suffix(const validate_StringRules *msg) { return _upb_hasbit(msg, 11); } UPB_INLINE upb_strview validate_StringRules_suffix(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 112), upb_strview); } -UPB_INLINE bool validate_StringRules_has_contains(const validate_StringRules *msg) { return _upb_has_field(msg, 12); } +UPB_INLINE bool validate_StringRules_has_contains(const validate_StringRules *msg) { return _upb_hasbit(msg, 12); } UPB_INLINE upb_strview validate_StringRules_contains(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 128), upb_strview); } UPB_INLINE upb_strview const* validate_StringRules_in(const validate_StringRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(108, 160), len); } UPB_INLINE upb_strview const* validate_StringRules_not_in(const validate_StringRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(112, 168), len); } -UPB_INLINE bool validate_StringRules_has_email(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 12); } +UPB_INLINE bool validate_StringRules_has_email(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 12; } UPB_INLINE bool validate_StringRules_email(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 12, false); } -UPB_INLINE bool validate_StringRules_has_hostname(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 13); } +UPB_INLINE bool validate_StringRules_has_hostname(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 13; } UPB_INLINE bool validate_StringRules_hostname(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 13, false); } -UPB_INLINE bool validate_StringRules_has_ip(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 14); } +UPB_INLINE bool validate_StringRules_has_ip(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 14; } UPB_INLINE bool validate_StringRules_ip(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 14, false); } -UPB_INLINE bool validate_StringRules_has_ipv4(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 15); } +UPB_INLINE bool validate_StringRules_has_ipv4(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 15; } UPB_INLINE bool validate_StringRules_ipv4(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 15, false); } -UPB_INLINE bool validate_StringRules_has_ipv6(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 16); } +UPB_INLINE bool validate_StringRules_has_ipv6(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 16; } UPB_INLINE bool validate_StringRules_ipv6(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 16, false); } -UPB_INLINE bool validate_StringRules_has_uri(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 17); } +UPB_INLINE bool validate_StringRules_has_uri(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 17; } UPB_INLINE bool validate_StringRules_uri(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 17, false); } -UPB_INLINE bool validate_StringRules_has_uri_ref(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 18); } +UPB_INLINE bool validate_StringRules_has_uri_ref(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 18; } UPB_INLINE bool validate_StringRules_uri_ref(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 18, false); } -UPB_INLINE bool validate_StringRules_has_len(const validate_StringRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_StringRules_has_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE uint64_t validate_StringRules_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t); } -UPB_INLINE bool validate_StringRules_has_len_bytes(const validate_StringRules *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool validate_StringRules_has_len_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE uint64_t validate_StringRules_len_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 48), uint64_t); } -UPB_INLINE bool validate_StringRules_has_address(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 21); } +UPB_INLINE bool validate_StringRules_has_address(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 21; } UPB_INLINE bool validate_StringRules_address(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 21, false); } -UPB_INLINE bool validate_StringRules_has_uuid(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 22); } +UPB_INLINE bool validate_StringRules_has_uuid(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 22; } UPB_INLINE bool validate_StringRules_uuid(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 22, false); } -UPB_INLINE bool validate_StringRules_has_not_contains(const validate_StringRules *msg) { return _upb_has_field(msg, 13); } +UPB_INLINE bool validate_StringRules_has_not_contains(const validate_StringRules *msg) { return _upb_hasbit(msg, 13); } UPB_INLINE upb_strview validate_StringRules_not_contains(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 144), upb_strview); } -UPB_INLINE bool validate_StringRules_has_well_known_regex(const validate_StringRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(128, 184), 24); } +UPB_INLINE bool validate_StringRules_has_well_known_regex(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 24; } UPB_INLINE int32_t validate_StringRules_well_known_regex(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 24, validate_UNKNOWN); } -UPB_INLINE bool validate_StringRules_has_strict(const validate_StringRules *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE bool validate_StringRules_has_strict(const validate_StringRules *msg) { return _upb_hasbit(msg, 7); } UPB_INLINE bool validate_StringRules_strict(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 56), bool); } UPB_INLINE void validate_StringRules_set_const(validate_StringRules *msg, upb_strview value) { @@ -1492,29 +1492,29 @@ typedef enum { } validate_BytesRules_well_known_oneofcases; UPB_INLINE validate_BytesRules_well_known_oneofcases validate_BytesRules_well_known_case(const validate_BytesRules* msg) { return (validate_BytesRules_well_known_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(84, 132), int32_t); } -UPB_INLINE bool validate_BytesRules_has_const(const validate_BytesRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_BytesRules_has_const(const validate_BytesRules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE upb_strview validate_BytesRules_const(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); } -UPB_INLINE bool validate_BytesRules_has_min_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_BytesRules_has_min_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint64_t validate_BytesRules_min_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } -UPB_INLINE bool validate_BytesRules_has_max_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_BytesRules_has_max_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE uint64_t validate_BytesRules_max_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } -UPB_INLINE bool validate_BytesRules_has_pattern(const validate_BytesRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_BytesRules_has_pattern(const validate_BytesRules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE upb_strview validate_BytesRules_pattern(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); } -UPB_INLINE bool validate_BytesRules_has_prefix(const validate_BytesRules *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool validate_BytesRules_has_prefix(const validate_BytesRules *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE upb_strview validate_BytesRules_prefix(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview); } -UPB_INLINE bool validate_BytesRules_has_suffix(const validate_BytesRules *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE bool validate_BytesRules_has_suffix(const validate_BytesRules *msg) { return _upb_hasbit(msg, 7); } UPB_INLINE upb_strview validate_BytesRules_suffix(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 80), upb_strview); } -UPB_INLINE bool validate_BytesRules_has_contains(const validate_BytesRules *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE bool validate_BytesRules_has_contains(const validate_BytesRules *msg) { return _upb_hasbit(msg, 8); } UPB_INLINE upb_strview validate_BytesRules_contains(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 96), upb_strview); } UPB_INLINE upb_strview const* validate_BytesRules_in(const validate_BytesRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(72, 112), len); } UPB_INLINE upb_strview const* validate_BytesRules_not_in(const validate_BytesRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(76, 120), len); } -UPB_INLINE bool validate_BytesRules_has_ip(const validate_BytesRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(84, 132), 10); } +UPB_INLINE bool validate_BytesRules_has_ip(const validate_BytesRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(84, 132)) == 10; } UPB_INLINE bool validate_BytesRules_ip(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 10, false); } -UPB_INLINE bool validate_BytesRules_has_ipv4(const validate_BytesRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(84, 132), 11); } +UPB_INLINE bool validate_BytesRules_has_ipv4(const validate_BytesRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(84, 132)) == 11; } UPB_INLINE bool validate_BytesRules_ipv4(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 11, false); } -UPB_INLINE bool validate_BytesRules_has_ipv6(const validate_BytesRules *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(84, 132), 12); } +UPB_INLINE bool validate_BytesRules_has_ipv6(const validate_BytesRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(84, 132)) == 12; } UPB_INLINE bool validate_BytesRules_ipv6(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 12, false); } -UPB_INLINE bool validate_BytesRules_has_len(const validate_BytesRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_BytesRules_has_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE uint64_t validate_BytesRules_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); } UPB_INLINE void validate_BytesRules_set_const(validate_BytesRules *msg, upb_strview value) { @@ -1593,9 +1593,9 @@ UPB_INLINE char *validate_EnumRules_serialize(const validate_EnumRules *msg, upb return upb_encode(msg, &validate_EnumRules_msginit, arena, len); } -UPB_INLINE bool validate_EnumRules_has_const(const validate_EnumRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_EnumRules_has_const(const validate_EnumRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE int32_t validate_EnumRules_const(const validate_EnumRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } -UPB_INLINE bool validate_EnumRules_has_defined_only(const validate_EnumRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_EnumRules_has_defined_only(const validate_EnumRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool validate_EnumRules_defined_only(const validate_EnumRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); } UPB_INLINE int32_t const* validate_EnumRules_in(const validate_EnumRules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); } UPB_INLINE int32_t const* validate_EnumRules_not_in(const validate_EnumRules *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(16, 24), len); } @@ -1643,9 +1643,9 @@ UPB_INLINE char *validate_MessageRules_serialize(const validate_MessageRules *ms return upb_encode(msg, &validate_MessageRules_msginit, arena, len); } -UPB_INLINE bool validate_MessageRules_has_skip(const validate_MessageRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_MessageRules_has_skip(const validate_MessageRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool validate_MessageRules_skip(const validate_MessageRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } -UPB_INLINE bool validate_MessageRules_has_required(const validate_MessageRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_MessageRules_has_required(const validate_MessageRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool validate_MessageRules_required(const validate_MessageRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } UPB_INLINE void validate_MessageRules_set_skip(validate_MessageRules *msg, bool value) { @@ -1671,13 +1671,13 @@ UPB_INLINE char *validate_RepeatedRules_serialize(const validate_RepeatedRules * return upb_encode(msg, &validate_RepeatedRules_msginit, arena, len); } -UPB_INLINE bool validate_RepeatedRules_has_min_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_RepeatedRules_has_min_items(const validate_RepeatedRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint64_t validate_RepeatedRules_min_items(const validate_RepeatedRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } -UPB_INLINE bool validate_RepeatedRules_has_max_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_RepeatedRules_has_max_items(const validate_RepeatedRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE uint64_t validate_RepeatedRules_max_items(const validate_RepeatedRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } -UPB_INLINE bool validate_RepeatedRules_has_unique(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_RepeatedRules_has_unique(const validate_RepeatedRules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool validate_RepeatedRules_unique(const validate_RepeatedRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } -UPB_INLINE bool validate_RepeatedRules_has_items(const validate_RepeatedRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_RepeatedRules_has_items(const validate_RepeatedRules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE const validate_FieldRules* validate_RepeatedRules_items(const validate_RepeatedRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), const validate_FieldRules*); } UPB_INLINE void validate_RepeatedRules_set_min_items(validate_RepeatedRules *msg, uint64_t value) { @@ -1720,15 +1720,15 @@ UPB_INLINE char *validate_MapRules_serialize(const validate_MapRules *msg, upb_a return upb_encode(msg, &validate_MapRules_msginit, arena, len); } -UPB_INLINE bool validate_MapRules_has_min_pairs(const validate_MapRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_MapRules_has_min_pairs(const validate_MapRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE uint64_t validate_MapRules_min_pairs(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); } -UPB_INLINE bool validate_MapRules_has_max_pairs(const validate_MapRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_MapRules_has_max_pairs(const validate_MapRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE uint64_t validate_MapRules_max_pairs(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); } -UPB_INLINE bool validate_MapRules_has_no_sparse(const validate_MapRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_MapRules_has_no_sparse(const validate_MapRules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool validate_MapRules_no_sparse(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); } -UPB_INLINE bool validate_MapRules_has_keys(const validate_MapRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_MapRules_has_keys(const validate_MapRules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE const validate_FieldRules* validate_MapRules_keys(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), const validate_FieldRules*); } -UPB_INLINE bool validate_MapRules_has_values(const validate_MapRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_MapRules_has_values(const validate_MapRules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE const validate_FieldRules* validate_MapRules_values(const validate_MapRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), const validate_FieldRules*); } UPB_INLINE void validate_MapRules_set_min_pairs(validate_MapRules *msg, uint64_t value) { @@ -1784,7 +1784,7 @@ UPB_INLINE char *validate_AnyRules_serialize(const validate_AnyRules *msg, upb_a return upb_encode(msg, &validate_AnyRules_msginit, arena, len); } -UPB_INLINE bool validate_AnyRules_has_required(const validate_AnyRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_AnyRules_has_required(const validate_AnyRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool validate_AnyRules_required(const validate_AnyRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } UPB_INLINE upb_strview const* validate_AnyRules_in(const validate_AnyRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE upb_strview const* validate_AnyRules_not_in(const validate_AnyRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } @@ -1828,17 +1828,17 @@ UPB_INLINE char *validate_DurationRules_serialize(const validate_DurationRules * return upb_encode(msg, &validate_DurationRules_msginit, arena, len); } -UPB_INLINE bool validate_DurationRules_has_required(const validate_DurationRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_DurationRules_has_required(const validate_DurationRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool validate_DurationRules_required(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); } -UPB_INLINE bool validate_DurationRules_has_const(const validate_DurationRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_DurationRules_has_const(const validate_DurationRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_const(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); } -UPB_INLINE bool validate_DurationRules_has_lt(const validate_DurationRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_DurationRules_has_lt(const validate_DurationRules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_lt(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); } -UPB_INLINE bool validate_DurationRules_has_lte(const validate_DurationRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_DurationRules_has_lte(const validate_DurationRules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_lte(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); } -UPB_INLINE bool validate_DurationRules_has_gt(const validate_DurationRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_DurationRules_has_gt(const validate_DurationRules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_gt(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Duration*); } -UPB_INLINE bool validate_DurationRules_has_gte(const validate_DurationRules *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool validate_DurationRules_has_gte(const validate_DurationRules *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE const struct google_protobuf_Duration* validate_DurationRules_gte(const validate_DurationRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_Duration*); } UPB_INLINE bool validate_DurationRules_has_in(const validate_DurationRules *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } UPB_INLINE const struct google_protobuf_Duration* const* validate_DurationRules_in(const validate_DurationRules *msg, size_t *len) { return (const struct google_protobuf_Duration* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); } @@ -1955,23 +1955,23 @@ UPB_INLINE char *validate_TimestampRules_serialize(const validate_TimestampRules return upb_encode(msg, &validate_TimestampRules_msginit, arena, len); } -UPB_INLINE bool validate_TimestampRules_has_required(const validate_TimestampRules *msg) { return _upb_has_field(msg, 1); } +UPB_INLINE bool validate_TimestampRules_has_required(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 1); } UPB_INLINE bool validate_TimestampRules_required(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); } -UPB_INLINE bool validate_TimestampRules_has_const(const validate_TimestampRules *msg) { return _upb_has_field(msg, 4); } +UPB_INLINE bool validate_TimestampRules_has_const(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 4); } UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_const(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Timestamp*); } -UPB_INLINE bool validate_TimestampRules_has_lt(const validate_TimestampRules *msg) { return _upb_has_field(msg, 5); } +UPB_INLINE bool validate_TimestampRules_has_lt(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 5); } UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lt(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_Timestamp*); } -UPB_INLINE bool validate_TimestampRules_has_lte(const validate_TimestampRules *msg) { return _upb_has_field(msg, 6); } +UPB_INLINE bool validate_TimestampRules_has_lte(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 6); } UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lte(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Timestamp*); } -UPB_INLINE bool validate_TimestampRules_has_gt(const validate_TimestampRules *msg) { return _upb_has_field(msg, 7); } +UPB_INLINE bool validate_TimestampRules_has_gt(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 7); } UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gt(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Timestamp*); } -UPB_INLINE bool validate_TimestampRules_has_gte(const validate_TimestampRules *msg) { return _upb_has_field(msg, 8); } +UPB_INLINE bool validate_TimestampRules_has_gte(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 8); } UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gte(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Timestamp*); } -UPB_INLINE bool validate_TimestampRules_has_lt_now(const validate_TimestampRules *msg) { return _upb_has_field(msg, 2); } +UPB_INLINE bool validate_TimestampRules_has_lt_now(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 2); } UPB_INLINE bool validate_TimestampRules_lt_now(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); } -UPB_INLINE bool validate_TimestampRules_has_gt_now(const validate_TimestampRules *msg) { return _upb_has_field(msg, 3); } +UPB_INLINE bool validate_TimestampRules_has_gt_now(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 3); } UPB_INLINE bool validate_TimestampRules_gt_now(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); } -UPB_INLINE bool validate_TimestampRules_has_within(const validate_TimestampRules *msg) { return _upb_has_field(msg, 9); } +UPB_INLINE bool validate_TimestampRules_has_within(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 9); } UPB_INLINE const struct google_protobuf_Duration* validate_TimestampRules_within(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_Duration*); } UPB_INLINE void validate_TimestampRules_set_required(validate_TimestampRules *msg, bool value) { From 86cf3bbe964aab22fc941d1161c62c7654451bfa Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 3 Jun 2020 11:15:44 -0700 Subject: [PATCH 036/239] attempt to fix ios build --- gRPC-Core.podspec | 2 +- templates/gRPC-Core.podspec.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 90c8791b144..2818ec0a2dc 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1617,7 +1617,7 @@ Pod::Spec.new do |s| # TODO (mxyan): Instead of this hack, add include path "third_party" to C core's include path? s.prepare_command = <<-END_OF_COMMAND sed -E -i '' 's;#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include Date: Wed, 3 Jun 2020 11:42:32 -0700 Subject: [PATCH 037/239] another attempt to fix ios build --- gRPC-C++.podspec | 4 ++-- gRPC-Core.podspec | 4 ++-- templates/gRPC-C++.podspec.template | 4 ++-- templates/gRPC-Core.podspec.template | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 58b39e823c2..cb43deccd1b 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -1125,8 +1125,8 @@ Pod::Spec.new do |s| s.prepare_command = <<-END_OF_COMMAND sed -E -i '' 's;#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include Date: Thu, 4 Jun 2020 13:32:27 -0700 Subject: [PATCH 038/239] Squashed 'third_party/upb/' changes from 7f5b8d73b0..b717575cef b717575cef Added -Wextra and -Wshorten-64-to-32 and fixed resulting errors. (#289) 2e335ab9d2 Merge pull request #288 from haberman/ubsan 408d34797d Disable UBSan, Clang is not available in upb's Kokoro image atm. 6b808a4072 Fixed all UBSan issues and added UBSan CI checks. git-subtree-dir: third_party/upb git-subtree-split: b717575ceff5e759a28f3ed3d60a65eee041a30c --- BUILD | 10 ++ generated_for_cmake/upb/json/parser.c | 146 ++++++++++++++------------ kokoro/ubuntu/build.sh | 14 ++- tests/conformance_upb.c | 2 +- tests/json/test_json.cc | 9 +- tests/pb/test_decoder.cc | 8 +- tests/test_cpp.cc | 4 +- tests/test_util.h | 6 +- upb/bindings/lua/upbc.cc | 4 +- upb/decode.c | 6 +- upb/def.c | 17 ++- upb/encode.c | 12 +-- upb/handlers.c | 22 ---- upb/json/parser.rl | 8 +- upb/json_decode.c | 26 +++-- upb/json_encode.c | 4 +- upb/msg.c | 11 +- upb/msg.h | 24 +++-- upb/pb/decoder.h | 4 +- upb/pb/varint.int.h | 3 +- upb/reflection.c | 61 ++++++----- upb/table.c | 32 +++--- upb/text_encode.c | 11 +- upb/upb.c | 4 +- upb/upb.h | 2 +- upbc/generator.cc | 6 +- 26 files changed, 242 insertions(+), 214 deletions(-) diff --git a/BUILD b/BUILD index 202154c9d05..bcecd387af4 100644 --- a/BUILD +++ b/BUILD @@ -28,6 +28,8 @@ exports_files([ CPPOPTS = [ # copybara:strip_for_google3_begin + "-Wextra", + # "-Wshorten-64-to-32", # not in GCC (and my Kokoro images doesn't have Clang) "-Werror", "-Wno-long-long", # copybara:strip_end @@ -164,6 +166,10 @@ cc_library( hdrs = [ "upb/text_encode.h", ], + copts = select({ + ":windows": [], + "//conditions:default": COPTS, + }), visibility = ["//visibility:public"], deps = [ ":port", @@ -181,6 +187,10 @@ cc_library( "upb/json_decode.h", "upb/json_encode.h", ], + copts = select({ + ":windows": [], + "//conditions:default": COPTS, + }), deps = [ ":port", ":reflection", diff --git a/generated_for_cmake/upb/json/parser.c b/generated_for_cmake/upb/json/parser.c index 1423add9c53..dd4fd82f2f3 100644 --- a/generated_for_cmake/upb/json/parser.c +++ b/generated_for_cmake/upb/json/parser.c @@ -644,7 +644,9 @@ static bool accumulate_append(upb_json_parser *p, const char *buf, size_t len, } if (p->accumulated != p->accumulate_buf) { - memcpy(p->accumulate_buf, p->accumulated, p->accumulated_len); + if (p->accumulated_len) { + memcpy(p->accumulate_buf, p->accumulated, p->accumulated_len); + } p->accumulated = p->accumulate_buf; } @@ -975,6 +977,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_sink_putint32(p->top->sink, parser_getsel(p), (int32_t)val); return true; } + UPB_UNREACHABLE(); } case UPB_TYPE_UINT32: { unsigned long val = strtoul(buf, &end, 0); @@ -986,6 +989,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_sink_putuint32(p->top->sink, parser_getsel(p), (uint32_t)val); return true; } + UPB_UNREACHABLE(); } /* XXX: We can't handle [u]int64 properly on 32-bit machines because * strto[u]ll isn't in C89. */ @@ -997,6 +1001,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_sink_putint64(p->top->sink, parser_getsel(p), val); return true; } + UPB_UNREACHABLE(); } case UPB_TYPE_UINT64: { unsigned long val = strtoul(p->accumulated, &end, 0); @@ -1008,6 +1013,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_sink_putuint64(p->top->sink, parser_getsel(p), val); return true; } + UPB_UNREACHABLE(); } default: break; @@ -2573,11 +2579,11 @@ static bool does_fieldmask_end(upb_json_parser *p) { * final state once, when the closing '"' is seen. */ -#line 2778 "upb/json/parser.rl" +#line 2784 "upb/json/parser.rl" -#line 2581 "upb/json/parser.c" +#line 2587 "upb/json/parser.c" static const char _json_actions[] = { 0, 1, 0, 1, 1, 1, 3, 1, 4, 1, 6, 1, 7, 1, 8, 1, @@ -2832,7 +2838,7 @@ static const int json_en_value_machine = 78; static const int json_en_main = 1; -#line 2781 "upb/json/parser.rl" +#line 2787 "upb/json/parser.rl" size_t parse(void *closure, const void *hd, const char *buf, size_t size, const upb_bufhandle *handle) { @@ -2855,7 +2861,7 @@ size_t parse(void *closure, const void *hd, const char *buf, size_t size, capture_resume(parser, buf); -#line 2859 "upb/json/parser.c" +#line 2865 "upb/json/parser.c" { int _klen; unsigned int _trans; @@ -2930,147 +2936,147 @@ _match: switch ( *_acts++ ) { case 1: -#line 2586 "upb/json/parser.rl" +#line 2592 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 2: -#line 2588 "upb/json/parser.rl" +#line 2594 "upb/json/parser.rl" { p--; {stack[top++] = cs; cs = 23;goto _again;} } break; case 3: -#line 2592 "upb/json/parser.rl" +#line 2598 "upb/json/parser.rl" { start_text(parser, p); } break; case 4: -#line 2593 "upb/json/parser.rl" +#line 2599 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_text(parser, p)); } break; case 5: -#line 2599 "upb/json/parser.rl" +#line 2605 "upb/json/parser.rl" { start_hex(parser); } break; case 6: -#line 2600 "upb/json/parser.rl" +#line 2606 "upb/json/parser.rl" { hexdigit(parser, p); } break; case 7: -#line 2601 "upb/json/parser.rl" +#line 2607 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_hex(parser)); } break; case 8: -#line 2607 "upb/json/parser.rl" +#line 2613 "upb/json/parser.rl" { CHECK_RETURN_TOP(escape(parser, p)); } break; case 9: -#line 2613 "upb/json/parser.rl" +#line 2619 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 10: -#line 2618 "upb/json/parser.rl" +#line 2624 "upb/json/parser.rl" { start_year(parser, p); } break; case 11: -#line 2619 "upb/json/parser.rl" +#line 2625 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_year(parser, p)); } break; case 12: -#line 2623 "upb/json/parser.rl" +#line 2629 "upb/json/parser.rl" { start_month(parser, p); } break; case 13: -#line 2624 "upb/json/parser.rl" +#line 2630 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_month(parser, p)); } break; case 14: -#line 2628 "upb/json/parser.rl" +#line 2634 "upb/json/parser.rl" { start_day(parser, p); } break; case 15: -#line 2629 "upb/json/parser.rl" +#line 2635 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_day(parser, p)); } break; case 16: -#line 2633 "upb/json/parser.rl" +#line 2639 "upb/json/parser.rl" { start_hour(parser, p); } break; case 17: -#line 2634 "upb/json/parser.rl" +#line 2640 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_hour(parser, p)); } break; case 18: -#line 2638 "upb/json/parser.rl" +#line 2644 "upb/json/parser.rl" { start_minute(parser, p); } break; case 19: -#line 2639 "upb/json/parser.rl" +#line 2645 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_minute(parser, p)); } break; case 20: -#line 2643 "upb/json/parser.rl" +#line 2649 "upb/json/parser.rl" { start_second(parser, p); } break; case 21: -#line 2644 "upb/json/parser.rl" +#line 2650 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_second(parser, p)); } break; case 22: -#line 2649 "upb/json/parser.rl" +#line 2655 "upb/json/parser.rl" { start_duration_base(parser, p); } break; case 23: -#line 2650 "upb/json/parser.rl" +#line 2656 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_duration_base(parser, p)); } break; case 24: -#line 2652 "upb/json/parser.rl" +#line 2658 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 25: -#line 2657 "upb/json/parser.rl" +#line 2663 "upb/json/parser.rl" { start_timestamp_base(parser); } break; case 26: -#line 2659 "upb/json/parser.rl" +#line 2665 "upb/json/parser.rl" { start_timestamp_fraction(parser, p); } break; case 27: -#line 2660 "upb/json/parser.rl" +#line 2666 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_timestamp_fraction(parser, p)); } break; case 28: -#line 2662 "upb/json/parser.rl" +#line 2668 "upb/json/parser.rl" { start_timestamp_zone(parser, p); } break; case 29: -#line 2663 "upb/json/parser.rl" +#line 2669 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_timestamp_zone(parser, p)); } break; case 30: -#line 2665 "upb/json/parser.rl" +#line 2671 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 31: -#line 2670 "upb/json/parser.rl" +#line 2676 "upb/json/parser.rl" { start_fieldmask_path_text(parser, p); } break; case 32: -#line 2671 "upb/json/parser.rl" +#line 2677 "upb/json/parser.rl" { end_fieldmask_path_text(parser, p); } break; case 33: -#line 2676 "upb/json/parser.rl" +#line 2682 "upb/json/parser.rl" { start_fieldmask_path(parser); } break; case 34: -#line 2677 "upb/json/parser.rl" +#line 2683 "upb/json/parser.rl" { end_fieldmask_path(parser); } break; case 35: -#line 2683 "upb/json/parser.rl" +#line 2689 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; case 36: -#line 2688 "upb/json/parser.rl" +#line 2694 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_TIMESTAMP)) { {stack[top++] = cs; cs = 47;goto _again;} @@ -3084,11 +3090,11 @@ _match: } break; case 37: -#line 2701 "upb/json/parser.rl" +#line 2707 "upb/json/parser.rl" { p--; {stack[top++] = cs; cs = 78;goto _again;} } break; case 38: -#line 2706 "upb/json/parser.rl" +#line 2712 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { start_any_member(parser, p); @@ -3098,11 +3104,11 @@ _match: } break; case 39: -#line 2713 "upb/json/parser.rl" +#line 2719 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_membername(parser)); } break; case 40: -#line 2716 "upb/json/parser.rl" +#line 2722 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { end_any_member(parser, p); @@ -3112,7 +3118,7 @@ _match: } break; case 41: -#line 2727 "upb/json/parser.rl" +#line 2733 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { start_any_object(parser, p); @@ -3122,7 +3128,7 @@ _match: } break; case 42: -#line 2736 "upb/json/parser.rl" +#line 2742 "upb/json/parser.rl" { if (is_wellknown_msg(parser, UPB_WELLKNOWN_ANY)) { CHECK_RETURN_TOP(end_any_object(parser, p)); @@ -3132,54 +3138,54 @@ _match: } break; case 43: -#line 2748 "upb/json/parser.rl" +#line 2754 "upb/json/parser.rl" { CHECK_RETURN_TOP(start_array(parser)); } break; case 44: -#line 2752 "upb/json/parser.rl" +#line 2758 "upb/json/parser.rl" { end_array(parser); } break; case 45: -#line 2757 "upb/json/parser.rl" +#line 2763 "upb/json/parser.rl" { CHECK_RETURN_TOP(start_number(parser, p)); } break; case 46: -#line 2758 "upb/json/parser.rl" +#line 2764 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_number(parser, p)); } break; case 47: -#line 2760 "upb/json/parser.rl" +#line 2766 "upb/json/parser.rl" { CHECK_RETURN_TOP(start_stringval(parser)); } break; case 48: -#line 2761 "upb/json/parser.rl" +#line 2767 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_stringval(parser)); } break; case 49: -#line 2763 "upb/json/parser.rl" +#line 2769 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_bool(parser, true)); } break; case 50: -#line 2765 "upb/json/parser.rl" +#line 2771 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_bool(parser, false)); } break; case 51: -#line 2767 "upb/json/parser.rl" +#line 2773 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_null(parser)); } break; case 52: -#line 2769 "upb/json/parser.rl" +#line 2775 "upb/json/parser.rl" { CHECK_RETURN_TOP(start_subobject_full(parser)); } break; case 53: -#line 2770 "upb/json/parser.rl" +#line 2776 "upb/json/parser.rl" { end_subobject_full(parser); } break; case 54: -#line 2775 "upb/json/parser.rl" +#line 2781 "upb/json/parser.rl" { p--; {cs = stack[--top]; goto _again;} } break; -#line 3183 "upb/json/parser.c" +#line 3189 "upb/json/parser.c" } } @@ -3196,32 +3202,32 @@ _again: while ( __nacts-- > 0 ) { switch ( *__acts++ ) { case 0: -#line 2584 "upb/json/parser.rl" +#line 2590 "upb/json/parser.rl" { p--; {cs = stack[--top]; if ( p == pe ) goto _test_eof; goto _again;} } break; case 46: -#line 2758 "upb/json/parser.rl" +#line 2764 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_number(parser, p)); } break; case 49: -#line 2763 "upb/json/parser.rl" +#line 2769 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_bool(parser, true)); } break; case 50: -#line 2765 "upb/json/parser.rl" +#line 2771 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_bool(parser, false)); } break; case 51: -#line 2767 "upb/json/parser.rl" +#line 2773 "upb/json/parser.rl" { CHECK_RETURN_TOP(end_null(parser)); } break; case 53: -#line 2770 "upb/json/parser.rl" +#line 2776 "upb/json/parser.rl" { end_subobject_full(parser); } break; -#line 3225 "upb/json/parser.c" +#line 3231 "upb/json/parser.c" } } } @@ -3229,7 +3235,7 @@ goto _again;} } _out: {} } -#line 2803 "upb/json/parser.rl" +#line 2809 "upb/json/parser.rl" if (p != pe) { upb_status_seterrf(parser->status, "Parse error at '%.*s'\n", pe - p, p); @@ -3272,13 +3278,13 @@ static void json_parser_reset(upb_json_parser *p) { /* Emit Ragel initialization of the parser. */ -#line 3276 "upb/json/parser.c" +#line 3282 "upb/json/parser.c" { cs = json_start; top = 0; } -#line 2845 "upb/json/parser.rl" +#line 2851 "upb/json/parser.rl" p->current_state = cs; p->parser_top = top; accumulate_clear(p); diff --git a/kokoro/ubuntu/build.sh b/kokoro/ubuntu/build.sh index e73deef0ab8..3888d15f6ae 100644 --- a/kokoro/ubuntu/build.sh +++ b/kokoro/ubuntu/build.sh @@ -1,12 +1,18 @@ #!/bin/bash +set -ex + # Install the latest version of Bazel. -use_bazel.sh latest +if [ -x "$(command -v use_bazel.sh)" ]; then + use_bazel.sh latest +fi # Verify/query CMake echo PATH=$PATH ls -l `which cmake` cmake --version +echo CC=${CC:-cc} +${CC:-cc} --version # Log the bazel path and version. which bazel @@ -19,4 +25,10 @@ if [[ $(uname) = "Linux" ]]; then # Verify the ASAN build. Have to exclude test_conformance_upb as protobuf # currently leaks memory in the conformance test runner. bazel test --copt=-fsanitize=address --linkopt=-fsanitize=address --test_output=errors -- :all -:test_conformance_upb + + # Verify the UBSan build. Have to exclude Lua as the version we are using + # fails some UBSan tests. + + # For some reason kokoro doesn't have Clang available right now. + #CC=clang CXX=clang++ bazel test -c dbg --copt=-fsanitize=undefined --copt=-fno-sanitize=function,vptr --linkopt=-fsanitize=undefined --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 -- :all -:test_lua fi diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index 4a04adf8e49..fe9f5224e52 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -138,7 +138,7 @@ void serialize_json(const upb_msg *msg, const upb_msgdef *m, const ctx *c) { upb_status_clear(&status); len = upb_json_encode(msg, m, c->symtab, opts, NULL, 0, &status); - if (len == -1) { + if (len == (size_t)-1) { const char *inerr = upb_status_errmsg(&status); size_t len = strlen(inerr); char *err = upb_arena_malloc(c->arena, len + 1); diff --git a/tests/json/test_json.cc b/tests/json/test_json.cc index e5f01035842..18ab07fe50a 100644 --- a/tests/json/test_json.cc +++ b/tests/json/test_json.cc @@ -149,6 +149,7 @@ static TestCase kTestSkipUnknown[] = { static TestCase kTestFailure[] = { { TEST("{\"optionalEnum\":\"UNKNOWN_ENUM_VALUE\"}"), + EXPECT("{}"), /* Actually we expect error, this is checked later. */ }, TEST_SENTINEL }; @@ -242,7 +243,7 @@ void test_json_roundtrip() { for (size_t i = 0; i < strlen(test_case->input); i++) { test_json_roundtrip_message(test_case->input, expected, - serialize_handlers, parser_method, i, + serialize_handlers, parser_method, (int)i, false); } } @@ -257,7 +258,7 @@ void test_json_roundtrip() { for (size_t i = 0; i < strlen(test_case->input); i++) { test_json_roundtrip_message(test_case->input, expected, - serialize_handlers, parser_method, i, + serialize_handlers, parser_method, (int)i, true); } } @@ -274,7 +275,7 @@ void test_json_roundtrip() { for (size_t i = 0; i < strlen(test_case->input); i++) { test_json_roundtrip_message(test_case->input, expected, - serialize_handlers, parser_method, i, + serialize_handlers, parser_method, (int)i, false); } } @@ -319,7 +320,7 @@ void test_json_failure() { test_case->input != NULL; test_case++) { for (size_t i = 0; i < strlen(test_case->input); i++) { test_json_parse_failure(test_case->input, serialize_handlers, - parser_method, i); + parser_method, (int)i); } } } diff --git a/tests/pb/test_decoder.cc b/tests/pb/test_decoder.cc index ef40f8f3e26..14fd72abbcc 100644 --- a/tests/pb/test_decoder.cc +++ b/tests/pb/test_decoder.cc @@ -509,8 +509,8 @@ void do_run_decoder(VerboseParserEnvironment* env, upb::pb::DecoderPtr decoder, } bool ok = env->Start() && - parse(env, decoder, i) && - parse(env, decoder, j - i) && + parse(env, decoder, (int)i) && + parse(env, decoder, (int)(j - i)) && parse(env, decoder, -1) && env->End(); @@ -1108,7 +1108,7 @@ void test_valid() { run_decoder(buf, &textbuf); } -void empty_callback(const void *closure, upb::Handlers* h_ptr) {} +void empty_callback(const void* /* closure */, upb::Handlers* /* h_ptr */) {} void test_emptyhandlers(upb::SymbolTable* symtab) { // Create an empty handlers to make sure that the decoder can handle empty @@ -1176,7 +1176,7 @@ extern "C" { int run_tests(int argc, char *argv[]) { if (argc > 1) - filter_hash = strtol(argv[1], NULL, 16); + filter_hash = (uint32_t)strtol(argv[1], NULL, 16); for (int i = 0; i < MAX_NESTING; i++) { closures[i] = i; } diff --git a/tests/test_cpp.cc b/tests/test_cpp.cc index 55cc077c880..4ca81e1c353 100644 --- a/tests/test_cpp.cc +++ b/tests/test_cpp.cc @@ -681,6 +681,7 @@ void DoNothingEndMessageHandler(C* closure, upb_status *status) { void RegisterMismatchedTypes(const void* closure, upb::Handlers* h_ptr) { upb::HandlersPtr h(h_ptr); + UPB_UNUSED(closure); upb::MessageDefPtr md(h.message_def()); ASSERT(md); @@ -797,6 +798,7 @@ void RegisterMismatchedTypes(const void* closure, upb::Handlers* h_ptr) { void RegisterMismatchedTypes2(const void* closure, upb::Handlers* h_ptr) { upb::HandlersPtr h(h_ptr); + UPB_UNUSED(closure); upb::MessageDefPtr md(h.message_def()); ASSERT(md); @@ -941,7 +943,7 @@ void TestArena() { extern "C" { -int run_tests(int argc, char *argv[]) { +int run_tests() { TestHandler(); TestHandler(); TestHandler(); diff --git a/tests/test_util.h b/tests/test_util.h index 485410082df..418a9d8899e 100644 --- a/tests/test_util.h +++ b/tests/test_util.h @@ -102,7 +102,7 @@ class VerboseParserEnvironment { bool ParseBuffer(int bytes) { if (bytes < 0) { - bytes = len_ - ofs_; + bytes = (int)(len_ - ofs_); } ASSERT((size_t)bytes <= (len_ - ofs_)); @@ -130,7 +130,7 @@ class VerboseParserEnvironment { (unsigned)bytes, (unsigned)ofs_, (unsigned)(ofs_ + bytes)); } - int parsed = sink_.PutBuffer(subc_, buf2, bytes, &global_handle); + int parsed = (int)sink_.PutBuffer(subc_, buf2, bytes, &global_handle); free(buf2); if (verbose_) { @@ -156,7 +156,7 @@ class VerboseParserEnvironment { } if (parsed > bytes && skip_until_ >= 0) { - skip_until_ = ofs_ + parsed; + skip_until_ = (int)(ofs_ + parsed); } ofs_ += UPB_MIN(parsed, bytes); diff --git a/upb/bindings/lua/upbc.cc b/upb/bindings/lua/upbc.cc index e7563bc0bab..c3988f6519b 100644 --- a/upb/bindings/lua/upbc.cc +++ b/upb/bindings/lua/upbc.cc @@ -73,9 +73,9 @@ static void PrintString(int max_cols, absl::string_view* str, bool LuaGenerator::Generate( const protobuf::FileDescriptor* file, - const std::string& parameter, + const std::string& /* parameter */, protoc::GeneratorContext* context, - std::string* error) const { + std::string* /* error */) const { std::string filename = Filename(file); protobuf::io::ZeroCopyOutputStream* out = context->Open(filename); protobuf::io::Printer printer(out, '$'); diff --git a/upb/decode.c b/upb/decode.c index 7ee199f51af..cecd68a8e74 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -155,7 +155,7 @@ static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg, UPB_NORETURN static void decode_err(upb_decstate *d) { longjmp(d->err, 1); } -static bool decode_reserve(upb_decstate *d, upb_array *arr, int elem) { +static bool decode_reserve(upb_decstate *d, upb_array *arr, size_t elem) { bool need_realloc = arr->size - arr->len < elem; if (need_realloc && !_upb_array_realloc(arr, arr->len + elem, d->arena)) { decode_err(d); @@ -324,7 +324,7 @@ static const char *decode_toarray(upb_decstate *d, const char *ptr, /* Fixed packed. */ int lg2 = op - OP_FIXPCK_LG2(0); int mask = (1 << lg2) - 1; - int count = val.str_val.size >> lg2; + size_t count = val.str_val.size >> lg2; if ((val.str_val.size & mask) != 0) { decode_err(d); /* Length isn't a round multiple of elem size. */ } @@ -408,7 +408,7 @@ static const char *decode_tomsg(upb_decstate *d, const char *ptr, upb_msg *msg, /* Set presence if necessary. */ if (field->presence < 0) { /* Oneof case */ - int32_t *oneof_case = _upb_oneofcase_field(msg, field); + uint32_t *oneof_case = _upb_oneofcase_field(msg, field); if (op == OP_SUBMSG && *oneof_case != field->number) { memset(mem, 0, sizeof(void*)); } diff --git a/upb/def.c b/upb/def.c index 50dccd8ff1e..10f6b94bf1e 100644 --- a/upb/def.c +++ b/upb/def.c @@ -18,7 +18,7 @@ static str_t *newstr(upb_alloc *alloc, const char *data, size_t len) { str_t *ret = upb_malloc(alloc, sizeof(*ret) + len); if (!ret) return NULL; ret->len = len; - memcpy(ret->str, data, len); + if (len) memcpy(ret->str, data, len); ret->str[len] = '\0'; return ret; } @@ -1909,11 +1909,11 @@ static bool build_filedef( } /* Now that all names are in the table, build layouts and resolve refs. */ - for (i = 0; i < file->ext_count; i++) { + for (i = 0; i < (size_t)file->ext_count; i++) { CHK(resolve_fielddef(ctx, file->package, (upb_fielddef*)&file->exts[i])); } - for (i = 0; i < file->msg_count; i++) { + for (i = 0; i < (size_t)file->msg_count; i++) { const upb_msgdef *m = &file->msgs[i]; int j; for (j = 0; j < m->field_count; j++) { @@ -1922,7 +1922,7 @@ static bool build_filedef( } if (!ctx->layouts) { - for (i = 0; i < file->msg_count; i++) { + for (i = 0; i < (size_t)file->msg_count; i++) { const upb_msgdef *m = &file->msgs[i]; make_layout(ctx->symtab, m); } @@ -1931,8 +1931,7 @@ static bool build_filedef( return true; } -static bool upb_symtab_addtotabs(upb_symtab *s, symtab_addctx *ctx, - upb_status *status) { +static bool upb_symtab_addtotabs(upb_symtab *s, symtab_addctx *ctx) { const upb_filedef *file = ctx->file; upb_alloc *alloc = upb_arena_alloc(s->arena); upb_strtable_iter iter; @@ -2075,10 +2074,8 @@ static const upb_filedef *_upb_symtab_addfile( ctx.layouts = layouts; ctx.status = status; - ok = file && - upb_strtable_init2(&addtab, UPB_CTYPE_CONSTPTR, ctx.tmp) && - build_filedef(&ctx, file, file_proto) && - upb_symtab_addtotabs(s, &ctx, status); + ok = file && upb_strtable_init2(&addtab, UPB_CTYPE_CONSTPTR, ctx.tmp) && + build_filedef(&ctx, file, file_proto) && upb_symtab_addtotabs(s, &ctx); upb_arena_free(tmparena); return ok ? file : NULL; diff --git a/upb/encode.c b/upb/encode.c index 010f5c5c394..87162325ad9 100644 --- a/upb/encode.c +++ b/upb/encode.c @@ -335,13 +335,11 @@ static bool upb_encode_map(upb_encstate *e, const char *field_mem, size_t size; upb_strview key = upb_strtable_iter_key(&i); const upb_value val = upb_strtable_iter_value(&i); - const void *keyp = - map->key_size == UPB_MAPTYPE_STRING ? (void *)&key : key.data; - const void *valp = - map->val_size == UPB_MAPTYPE_STRING ? upb_value_getptr(val) : &val; - - CHK(upb_encode_scalarfield(e, valp, entry, val_field, false)); - CHK(upb_encode_scalarfield(e, keyp, entry, key_field, false)); + upb_map_entry ent; + _upb_map_fromkey(key, &ent.k, map->key_size); + _upb_map_fromvalue(val, &ent.v, map->val_size); + CHK(upb_encode_scalarfield(e, &ent.v, entry, val_field, false)); + CHK(upb_encode_scalarfield(e, &ent.k, entry, key_field, false)); size = (e->limit - e->ptr) - pre_len; CHK(upb_put_varint(e, size)); CHK(upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED)); diff --git a/upb/handlers.c b/upb/handlers.c index 5cf7ccc0746..b90b32c71f0 100644 --- a/upb/handlers.c +++ b/upb/handlers.c @@ -152,28 +152,6 @@ const void *effective_closure_type(upb_handlers *h, const upb_fielddef *f, return ret; } -/* Checks whether the START* handler specified by f & type is missing even - * though it is required to convert the established type of an outer frame - * ("closure_type") into the established type of an inner frame (represented in - * the return closure type of this handler's attr. */ -bool checkstart(upb_handlers *h, const upb_fielddef *f, upb_handlertype_t type, - upb_status *status) { - const void *closure_type; - const upb_handlerattr *attr; - const void *return_closure_type; - - upb_selector_t sel = handlers_getsel(h, f, type); - if (h->table[sel].func) return true; - closure_type = effective_closure_type(h, f, type); - attr = &h->table[sel].attr; - return_closure_type = attr->return_closure_type; - if (closure_type && return_closure_type && - closure_type != return_closure_type) { - return false; - } - return true; -} - static upb_handlers *upb_handlers_new(const upb_msgdef *md, upb_handlercache *cache, upb_arena *arena) { diff --git a/upb/json/parser.rl b/upb/json/parser.rl index eccd53039ff..f1ea0762811 100644 --- a/upb/json/parser.rl +++ b/upb/json/parser.rl @@ -642,7 +642,9 @@ static bool accumulate_append(upb_json_parser *p, const char *buf, size_t len, } if (p->accumulated != p->accumulate_buf) { - memcpy(p->accumulate_buf, p->accumulated, p->accumulated_len); + if (p->accumulated_len) { + memcpy(p->accumulate_buf, p->accumulated, p->accumulated_len); + } p->accumulated = p->accumulate_buf; } @@ -973,6 +975,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_sink_putint32(p->top->sink, parser_getsel(p), (int32_t)val); return true; } + UPB_UNREACHABLE(); } case UPB_TYPE_UINT32: { unsigned long val = strtoul(buf, &end, 0); @@ -984,6 +987,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_sink_putuint32(p->top->sink, parser_getsel(p), (uint32_t)val); return true; } + UPB_UNREACHABLE(); } /* XXX: We can't handle [u]int64 properly on 32-bit machines because * strto[u]ll isn't in C89. */ @@ -995,6 +999,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_sink_putint64(p->top->sink, parser_getsel(p), val); return true; } + UPB_UNREACHABLE(); } case UPB_TYPE_UINT64: { unsigned long val = strtoul(p->accumulated, &end, 0); @@ -1006,6 +1011,7 @@ static bool parse_number_from_buffer(upb_json_parser *p, const char *buf, upb_sink_putuint64(p->top->sink, parser_getsel(p), val); return true; } + UPB_UNREACHABLE(); } default: break; diff --git a/upb/json_decode.c b/upb/json_decode.c index e49ee854c89..301f16a1453 100644 --- a/upb/json_decode.c +++ b/upb/json_decode.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -83,8 +84,9 @@ static bool jsondec_tryparsech(jsondec *d, char ch) { } static void jsondec_parselit(jsondec *d, const char *lit) { + size_t avail = d->end - d->ptr; size_t len = strlen(lit); - if (d->end - d->ptr < len || memcmp(d->ptr, lit, len) != 0) { + if (avail < len || memcmp(d->ptr, lit, len) != 0) { jsondec_errf(d, "Expected: '%s'", lit); } d->ptr += len; @@ -473,7 +475,7 @@ static void jsondec_skipval(jsondec *d) { /* Base64 decoding for bytes fields. ******************************************/ -static int jsondec_base64_tablelookup(const char ch) { +static unsigned int jsondec_base64_tablelookup(const char ch) { /* Table includes the normal base64 chars plus the URL-safe variant. */ const signed char table[256] = { -1, -1, -1, -1, -1, -1, -1, @@ -677,7 +679,7 @@ static upb_msgval jsondec_int(jsondec *d, const upb_fielddef *f) { if (val.int64_val > INT32_MAX || val.int64_val < INT32_MIN) { jsondec_err(d, "Integer out of range."); } - val.int32_val = val.int64_val; + val.int32_val = (int32_t)val.int64_val; } return val; @@ -713,7 +715,7 @@ static upb_msgval jsondec_uint(jsondec *d, const upb_fielddef *f) { if (val.uint64_val > UINT32_MAX) { jsondec_err(d, "Integer out of range."); } - val.uint32_val = val.uint64_val; + val.uint32_val = (uint32_t)val.uint64_val; } return val; @@ -960,15 +962,17 @@ static int jsondec_tsdigits(jsondec *d, const char **ptr, size_t digits, const char *end = p + digits; size_t after_len = after ? strlen(after) : 0; - assert(digits <= 9); /* int can't overflow. */ + UPB_ASSERT(digits <= 9); /* int can't overflow. */ if (jsondec_buftouint64(d, p, end, &val) != end || (after_len && memcmp(end, after, after_len) != 0)) { jsondec_err(d, "Malformed timestamp"); } + UPB_ASSERT(val < INT_MAX); + *ptr = end + after_len; - return val; + return (int)val; } static int jsondec_nanos(jsondec *d, const char **ptr, const char *end) { @@ -977,7 +981,7 @@ static int jsondec_nanos(jsondec *d, const char **ptr, const char *end) { if (p != end && *p == '.') { const char *nano_end = jsondec_buftouint64(d, p + 1, end, &nanos); - int digits = nano_end - p - 1; + int digits = (int)(nano_end - p - 1); int exp_lg10 = 9 - digits; if (digits > 9) { jsondec_err(d, "Too many digits for partial seconds"); @@ -986,14 +990,16 @@ static int jsondec_nanos(jsondec *d, const char **ptr, const char *end) { *ptr = nano_end; } - return nanos; + UPB_ASSERT(nanos < INT_MAX); + + return (int)nanos; } /* jsondec_epochdays(1970, 1, 1) == 1970-01-01 == 0. */ int jsondec_epochdays(int y, int m, int d) { const uint32_t year_base = 4800; /* Before min year, multiple of 400. */ const uint32_t m_adj = m - 3; /* March-based month. */ - const uint32_t carry = m_adj > m ? 1 : 0; + const uint32_t carry = m_adj > (uint32_t)m ? 1 : 0; const uint32_t adjust = carry ? 12 : 0; const uint32_t y_adj = y + year_base - carry; const uint32_t month_days = ((m_adj + adjust) * 62719 + 769) / 2048; @@ -1038,7 +1044,7 @@ static void jsondec_timestamp(jsondec *d, upb_msg *msg, const upb_msgdef *m) { switch (*ptr++) { case '-': neg = true; - /* Fallthrough intended. */ + /* fallthrough */ case '+': if ((end - ptr) != 5) goto malformed; ofs = jsondec_tsdigits(d, &ptr, 2, ":00"); diff --git a/upb/json_encode.c b/upb/json_encode.c index 04c9594ed7b..21f661f8f6e 100644 --- a/upb/json_encode.c +++ b/upb/json_encode.c @@ -52,7 +52,7 @@ static void jsonenc_putbytes(jsonenc *e, const void *data, size_t len) { memcpy(e->ptr, data, len); e->ptr += len; } else { - memcpy(e->ptr, data, have); + if (have) memcpy(e->ptr, data, have); e->ptr += have; e->overflow += (len - have); } @@ -117,7 +117,7 @@ static void jsonenc_timestamp(jsonenc *e, const upb_msg *msg, * Fliegel, H. F., and Van Flandern, T. C., "A Machine Algorithm for * Processing Calendar Dates," Communications of the Association of * Computing Machines, vol. 11 (1968), p. 657. */ - L = (seconds / 86400) + 68569 + 2440588; + L = (int)(seconds / 86400) + 68569 + 2440588; N = 4 * L / 146097; L = L - (146097 * N + 3) / 4; I = 4000 * (L + 1) / 1461001; diff --git a/upb/msg.c b/upb/msg.c index fd6c59b0b2d..25747c84817 100644 --- a/upb/msg.c +++ b/upb/msg.c @@ -35,16 +35,17 @@ static size_t upb_msg_sizeof(const upb_msglayout *l) { return l->size + upb_msg_internalsize(l); } -static upb_msg_internal *upb_msg_getinternal(upb_msg *msg) { - return UPB_PTR_AT(msg, -sizeof(upb_msg_internal), upb_msg_internal); +static const upb_msg_internal *upb_msg_getinternal_const(const upb_msg *msg) { + ptrdiff_t size = sizeof(upb_msg_internal); + return UPB_PTR_AT(msg, -size, upb_msg_internal); } -static const upb_msg_internal *upb_msg_getinternal_const(const upb_msg *msg) { - return UPB_PTR_AT(msg, -sizeof(upb_msg_internal), upb_msg_internal); +static upb_msg_internal *upb_msg_getinternal(upb_msg *msg) { + return (upb_msg_internal*)upb_msg_getinternal_const(msg); } void _upb_msg_clear(upb_msg *msg, const upb_msglayout *l) { - size_t internal = upb_msg_internalsize(l); + ptrdiff_t internal = upb_msg_internalsize(l); void *mem = UPB_PTR_AT(msg, -internal, char); memset(mem, 0, l->size + internal); } diff --git a/upb/msg.h b/upb/msg.h index 66f04a0e80f..1ded2cf3e25 100644 --- a/upb/msg.h +++ b/upb/msg.h @@ -40,10 +40,10 @@ enum { typedef struct { uint32_t number; uint16_t offset; - int16_t presence; /* If >0, hasbit_index. If <0, ~oneof_index. */ + int16_t presence; /* If >0, hasbit_index. If <0, ~oneof_index. */ uint16_t submsg_index; /* undefined if descriptortype != MESSAGE or GROUP. */ uint8_t descriptortype; - uint8_t label; + uint8_t label; /* google.protobuf.Label or _UPB_LABEL_* above. */ } upb_msglayout_field; typedef struct upb_msglayout { @@ -131,12 +131,12 @@ UPB_INLINE void _upb_clearhas_field(const upb_msg *msg, /** Oneof case access *********************************************************/ -UPB_INLINE int32_t *_upb_oneofcase(upb_msg *msg, size_t case_ofs) { - return PTR_AT(msg, case_ofs, int32_t); +UPB_INLINE uint32_t *_upb_oneofcase(upb_msg *msg, size_t case_ofs) { + return PTR_AT(msg, case_ofs, uint32_t); } -UPB_INLINE int32_t _upb_getoneofcase(const void *msg, size_t case_ofs) { - return *PTR_AT(msg, case_ofs, int32_t); +UPB_INLINE uint32_t _upb_getoneofcase(const void *msg, size_t case_ofs) { + return *PTR_AT(msg, case_ofs, uint32_t); } UPB_INLINE size_t _upb_oneofcase_ofs(const upb_msglayout_field *f) { @@ -144,13 +144,13 @@ UPB_INLINE size_t _upb_oneofcase_ofs(const upb_msglayout_field *f) { return ~(int64_t)f->presence; } -UPB_INLINE int32_t *_upb_oneofcase_field(upb_msg *msg, - const upb_msglayout_field *f) { +UPB_INLINE uint32_t *_upb_oneofcase_field(upb_msg *msg, + const upb_msglayout_field *f) { return _upb_oneofcase(msg, _upb_oneofcase_ofs(f)); } -UPB_INLINE int32_t _upb_getoneofcase_field(const upb_msg *msg, - const upb_msglayout_field *f) { +UPB_INLINE uint32_t _upb_getoneofcase_field(const upb_msg *msg, + const upb_msglayout_field *f) { return _upb_getoneofcase(msg, _upb_oneofcase_ofs(f)); } @@ -162,6 +162,10 @@ UPB_INLINE bool _upb_isrepeated(const upb_msglayout_field *field) { return (field->label & 3) == UPB_LABEL_REPEATED; } +UPB_INLINE bool _upb_repeated_or_map(const upb_msglayout_field *field) { + return field->label >= UPB_LABEL_REPEATED; +} + /** upb_array *****************************************************************/ /* Our internal representation for repeated fields. */ diff --git a/upb/pb/decoder.h b/upb/pb/decoder.h index 709db49e96a..8c4d8bf5d5c 100644 --- a/upb/pb/decoder.h +++ b/upb/pb/decoder.h @@ -158,7 +158,9 @@ class upb::pb::DecoderPtr { * Setting the limit will fail if the parser is currently suspended at a depth * greater than this, or if memory allocation of the stack fails. */ size_t max_nesting() { return upb_pbdecoder_maxnesting(ptr()); } - bool set_max_nesting(size_t max) { return upb_pbdecoder_maxnesting(ptr()); } + bool set_max_nesting(size_t max) { + return upb_pbdecoder_setmaxnesting(ptr(), max); + } void Reset() { upb_pbdecoder_reset(ptr()); } diff --git a/upb/pb/varint.int.h b/upb/pb/varint.int.h index 59158d3b753..8ab0d9f1418 100644 --- a/upb/pb/varint.int.h +++ b/upb/pb/varint.int.h @@ -111,7 +111,8 @@ UPB_INLINE upb_decoderet upb_vdecode_fast(const char *p) { UPB_INLINE int upb_value_size(uint64_t val) { #ifdef __GNUC__ - int high_bit = 63 - __builtin_clzll(val); /* 0-based, undef if val == 0. */ + /* 0-based, undef if val == 0. */ + int high_bit = val ? 63 - __builtin_clzll(val) : 0; #else int high_bit = 0; uint64_t tmp = val; diff --git a/upb/reflection.c b/upb/reflection.c index 057da629cc0..487241b2b56 100644 --- a/upb/reflection.c +++ b/upb/reflection.c @@ -7,27 +7,30 @@ #include "upb/port_def.inc" -static char field_size[] = { - 0,/* 0 */ - 8, /* UPB_DESCRIPTOR_TYPE_DOUBLE */ - 4, /* UPB_DESCRIPTOR_TYPE_FLOAT */ - 8, /* UPB_DESCRIPTOR_TYPE_INT64 */ - 8, /* UPB_DESCRIPTOR_TYPE_UINT64 */ - 4, /* UPB_DESCRIPTOR_TYPE_INT32 */ - 8, /* UPB_DESCRIPTOR_TYPE_FIXED64 */ - 4, /* UPB_DESCRIPTOR_TYPE_FIXED32 */ - 1, /* UPB_DESCRIPTOR_TYPE_BOOL */ - sizeof(upb_strview), /* UPB_DESCRIPTOR_TYPE_STRING */ - sizeof(void*), /* UPB_DESCRIPTOR_TYPE_GROUP */ - sizeof(void*), /* UPB_DESCRIPTOR_TYPE_MESSAGE */ - sizeof(upb_strview), /* UPB_DESCRIPTOR_TYPE_BYTES */ - 4, /* UPB_DESCRIPTOR_TYPE_UINT32 */ - 4, /* UPB_DESCRIPTOR_TYPE_ENUM */ - 4, /* UPB_DESCRIPTOR_TYPE_SFIXED32 */ - 8, /* UPB_DESCRIPTOR_TYPE_SFIXED64 */ - 4, /* UPB_DESCRIPTOR_TYPE_SINT32 */ - 8, /* UPB_DESCRIPTOR_TYPE_SINT64 */ -}; +static size_t get_field_size(const upb_msglayout_field *f) { + static unsigned char sizes[] = { + 0,/* 0 */ + 8, /* UPB_DESCRIPTOR_TYPE_DOUBLE */ + 4, /* UPB_DESCRIPTOR_TYPE_FLOAT */ + 8, /* UPB_DESCRIPTOR_TYPE_INT64 */ + 8, /* UPB_DESCRIPTOR_TYPE_UINT64 */ + 4, /* UPB_DESCRIPTOR_TYPE_INT32 */ + 8, /* UPB_DESCRIPTOR_TYPE_FIXED64 */ + 4, /* UPB_DESCRIPTOR_TYPE_FIXED32 */ + 1, /* UPB_DESCRIPTOR_TYPE_BOOL */ + sizeof(upb_strview), /* UPB_DESCRIPTOR_TYPE_STRING */ + sizeof(void*), /* UPB_DESCRIPTOR_TYPE_GROUP */ + sizeof(void*), /* UPB_DESCRIPTOR_TYPE_MESSAGE */ + sizeof(upb_strview), /* UPB_DESCRIPTOR_TYPE_BYTES */ + 4, /* UPB_DESCRIPTOR_TYPE_UINT32 */ + 4, /* UPB_DESCRIPTOR_TYPE_ENUM */ + 4, /* UPB_DESCRIPTOR_TYPE_SFIXED32 */ + 8, /* UPB_DESCRIPTOR_TYPE_SFIXED64 */ + 4, /* UPB_DESCRIPTOR_TYPE_SINT32 */ + 8, /* UPB_DESCRIPTOR_TYPE_SINT64 */ + }; + return _upb_repeated_or_map(f) ? sizeof(void *) : sizes[f->descriptortype]; +} /* Strings/bytes are special-cased in maps. */ static char _upb_fieldtype_to_mapsize[12] = { @@ -59,9 +62,7 @@ static upb_msgval _upb_msg_getraw(const upb_msg *msg, const upb_fielddef *f) { const upb_msglayout_field *field = upb_fielddef_layout(f); const char *mem = UPB_PTR_AT(msg, field->offset, char); upb_msgval val = {0}; - int size = upb_fielddef_isseq(f) ? sizeof(void *) - : field_size[field->descriptortype]; - memcpy(&val, mem, size); + memcpy(&val, mem, get_field_size(field)); return val; } @@ -175,9 +176,8 @@ void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, upb_arena *a) { const upb_msglayout_field *field = upb_fielddef_layout(f); char *mem = UPB_PTR_AT(msg, field->offset, char); - int size = upb_fielddef_isseq(f) ? sizeof(void *) - : field_size[field->descriptortype]; - memcpy(mem, &val, size); + UPB_UNUSED(a); /* We reserve the right to make set insert into a map. */ + memcpy(mem, &val, get_field_size(field)); if (field->presence > 0) { _upb_sethas_field(msg, field); } else if (in_oneof(field)) { @@ -188,18 +188,16 @@ void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val, void upb_msg_clearfield(upb_msg *msg, const upb_fielddef *f) { const upb_msglayout_field *field = upb_fielddef_layout(f); char *mem = UPB_PTR_AT(msg, field->offset, char); - int size = upb_fielddef_isseq(f) ? sizeof(void *) - : field_size[field->descriptortype]; if (field->presence > 0) { _upb_clearhas_field(msg, field); } else if (in_oneof(field)) { - int32_t *oneof_case = _upb_oneofcase_field(msg, field); + uint32_t *oneof_case = _upb_oneofcase_field(msg, field); if (*oneof_case != field->number) return; *oneof_case = 0; } - memset(mem, 0, size); + memset(mem, 0, get_field_size(field)); } void upb_msg_clear(upb_msg *msg, const upb_msgdef *m) { @@ -212,6 +210,7 @@ bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m, size_t i = *iter; const upb_msgval zero = {0}; const upb_fielddef *f; + UPB_UNUSED(ext_pool); while ((f = _upb_msgdef_field(m, (int)++i)) != NULL) { upb_msgval val = _upb_msg_getraw(msg, f); diff --git a/upb/table.c b/upb/table.c index c5ca3ac49bd..e89f72c6988 100644 --- a/upb/table.c +++ b/upb/table.c @@ -263,7 +263,7 @@ static upb_tabkey strcopy(lookupkey_t k2, upb_alloc *a) { char *str = upb_malloc(a, k2.str.len + sizeof(uint32_t) + 1); if (str == NULL) return 0; memcpy(str, &len, sizeof(uint32_t)); - memcpy(str + sizeof(uint32_t), k2.str.str, k2.str.len); + if (k2.str.len) memcpy(str + sizeof(uint32_t), k2.str.str, k2.str.len); str[sizeof(uint32_t) + k2.str.len] = '\0'; return (uintptr_t)str; } @@ -277,10 +277,11 @@ static uint32_t strhash(upb_tabkey key) { static bool streql(upb_tabkey k1, lookupkey_t k2) { uint32_t len; char *str = upb_tabstr(k1, &len); - return len == k2.str.len && memcmp(str, k2.str.str, len) == 0; + return len == k2.str.len && (len == 0 || memcmp(str, k2.str.str, len) == 0); } bool upb_strtable_init2(upb_strtable *t, upb_ctype_t ctype, upb_alloc *a) { + UPB_UNUSED(ctype); /* TODO(haberman): rm */ return init(&t->t, 2, a); } @@ -473,6 +474,7 @@ bool upb_inttable_sizedinit(upb_inttable *t, size_t asize, int hsize_lg2, } bool upb_inttable_init2(upb_inttable *t, upb_ctype_t ctype, upb_alloc *a) { + UPB_UNUSED(ctype); /* TODO(haberman): rm */ return upb_inttable_sizedinit(t, 0, 4, a); } @@ -786,8 +788,8 @@ uint32_t upb_murmur_hash2(const void * key, size_t len, uint32_t seed) { int32_t sr; switch(align) { - case 1: t |= data[2] << 16; - case 2: t |= data[1] << 8; + case 1: t |= data[2] << 16; /* fallthrough */ + case 2: t |= data[1] << 8; /* fallthrough */ case 3: t |= data[0]; } @@ -825,9 +827,9 @@ uint32_t upb_murmur_hash2(const void * key, size_t len, uint32_t seed) { uint32_t k; switch(align) { - case 3: d |= data[2] << 16; - case 2: d |= data[1] << 8; - case 1: d |= data[0]; + case 3: d |= data[2] << 16; /* fallthrough */ + case 2: d |= data[1] << 8; /* fallthrough */ + case 1: d |= data[0]; /* fallthrough */ } k = (t >> sr) | (d << sl); @@ -840,15 +842,15 @@ uint32_t upb_murmur_hash2(const void * key, size_t len, uint32_t seed) { * Handle tail bytes */ switch(len) { - case 3: h ^= data[2] << 16; - case 2: h ^= data[1] << 8; - case 1: h ^= data[0]; h *= m; + case 3: h ^= data[2] << 16; /* fallthrough */ + case 2: h ^= data[1] << 8; /* fallthrough */ + case 1: h ^= data[0]; h *= m; /* fallthrough */ }; } else { switch(len) { - case 3: d |= data[2] << 16; - case 2: d |= data[1] << 8; - case 1: d |= data[0]; + case 3: d |= data[2] << 16; /* fallthrough */ + case 2: d |= data[1] << 8; /* fallthrough */ + case 1: d |= data[0]; /* fallthrough */ case 0: h ^= (t >> sr) | (d << sl); h *= m; } } @@ -872,8 +874,8 @@ uint32_t upb_murmur_hash2(const void * key, size_t len, uint32_t seed) { * Handle tail bytes */ switch(len) { - case 3: h ^= data[2] << 16; - case 2: h ^= data[1] << 8; + case 3: h ^= data[2] << 16; /* fallthrough */ + case 2: h ^= data[1] << 8; /* fallthrough */ case 1: h ^= data[0]; h *= m; }; diff --git a/upb/text_encode.c b/upb/text_encode.c index d426e67ea27..7c99228131e 100644 --- a/upb/text_encode.c +++ b/upb/text_encode.c @@ -27,7 +27,7 @@ static void txtenc_putbytes(txtenc *e, const void *data, size_t len) { memcpy(e->ptr, data, len); e->ptr += len; } else { - memcpy(e->ptr, data, have); + if (have) memcpy(e->ptr, data, have); e->ptr += have; e->overflow += (len - have); } @@ -263,7 +263,7 @@ static const char *txtenc_unknown(txtenc *e, const char *ptr, const char *end, tag = (uint32_t)tag_64; if ((tag & 7) == UPB_WIRE_TYPE_END_GROUP) { - CHK((tag >> 3) == groupnum); + CHK((tag >> 3) == (uint32_t)groupnum); return ptr; } @@ -295,10 +295,11 @@ static const char *txtenc_unknown(txtenc *e, const char *ptr, const char *end, } case UPB_WIRE_TYPE_DELIMITED: { uint64_t len; + size_t avail = end - ptr; char *start = e->ptr; size_t start_overflow = e->overflow; CHK(ptr = txtenc_parsevarint(ptr, end, &len)); - CHK(end - ptr >= len); + CHK(avail >= len); /* Speculatively try to parse as message. */ txtenc_putstr(e, "{"); @@ -310,10 +311,12 @@ static const char *txtenc_unknown(txtenc *e, const char *ptr, const char *end, txtenc_putstr(e, "}"); } else { /* Didn't work out, print as raw bytes. */ + upb_strview str; e->indent_depth--; e->ptr = start; e->overflow = start_overflow; - upb_strview str = {ptr, len}; + str.data = ptr; + str.size = len; txtenc_string(e, str, true); } ptr += len; diff --git a/upb/upb.c b/upb/upb.c index 84852f49a63..c2d406950d3 100644 --- a/upb/upb.c +++ b/upb/upb.c @@ -110,10 +110,10 @@ static void upb_arena_addblock(upb_arena *a, void *ptr, size_t size) { mem_block *block = ptr; block->next = a->freelist; - block->size = size; + block->size = (uint32_t)size; block->cleanups = 0; a->freelist = block; - a->last_size = size; + a->last_size = block->size; if (!a->freelist_tail) a->freelist_tail = block; a->head.ptr = UPB_PTR_AT(block, memblock_reserve, char); diff --git a/upb/upb.h b/upb/upb.h index 19ee059b8f2..c3e1c5f3d59 100644 --- a/upb/upb.h +++ b/upb/upb.h @@ -271,7 +271,7 @@ typedef enum { UPB_DTYPE_SINT64 = 18 } upb_descriptortype_t; -#define UPB_MAP_BEGIN -1 +#define UPB_MAP_BEGIN ((size_t)-1) #include "upb/port_undef.inc" diff --git a/upbc/generator.cc b/upbc/generator.cc index af39cacd12e..d5c27fb2afa 100644 --- a/upbc/generator.cc +++ b/upbc/generator.cc @@ -43,7 +43,7 @@ static std::string DefSourceFilename(std::string proto_filename) { class Output { public: Output(protobuf::io::ZeroCopyOutputStream* stream) : stream_(stream) {} - ~Output() { stream_->BackUp(size_); } + ~Output() { stream_->BackUp((int)size_); } template void operator()(absl::string_view format, const Arg&... arg) { @@ -922,9 +922,9 @@ void WriteDefSource(const protobuf::FileDescriptor* file, Output& output) { } bool Generator::Generate(const protobuf::FileDescriptor* file, - const std::string& parameter, + const std::string& /* parameter */, protoc::GeneratorContext* context, - std::string* error) const { + std::string* /* error */) const { Output h_output(context->Open(HeaderFilename(file->name()))); WriteHeader(file, h_output); From f87b5cb505f9a58970f7a7e7021e190e9e230e42 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 4 Jun 2020 13:34:24 -0700 Subject: [PATCH 039/239] update bazel deps for upb --- bazel/grpc_deps.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index d8e9e14edfc..f1627b1df30 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -267,11 +267,11 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "43c4f950f01c3d6092c5b1f225188fb62a6080970ffe032b94c49924ed2a469d", - strip_prefix = "upb-7f5b8d73b0d1a481b279de3c6a558015ae1adca5", + sha256 = "c7fb7f909948649c07535cc1274a318d838e56ed77c108ee16874ba0f959a059", + strip_prefix = "upb-b717575ceff5e759a28f3ed3d60a65eee041a30c", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/7f5b8d73b0d1a481b279de3c6a558015ae1adca5.tar.gz", - "https://github.com/protocolbuffers/upb/archive/7f5b8d73b0d1a481b279de3c6a558015ae1adca5.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/b717575ceff5e759a28f3ed3d60a65eee041a30c.tar.gz", + "https://github.com/protocolbuffers/upb/archive/b717575ceff5e759a28f3ed3d60a65eee041a30c.tar.gz", ], ) From c6d2315315a77b62a9d6add8414aeda81641d37c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 4 Jun 2020 15:49:38 -0700 Subject: [PATCH 040/239] Squashed 'third_party/upb/' changes from b717575cef..363e39c171 363e39c171 Fix for extra compiler warnings. (#290) git-subtree-dir: third_party/upb git-subtree-split: 363e39c171a08b89bd546189d1244a6e191cacf0 --- upb/decode.c | 2 +- upb/msg.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/upb/decode.c b/upb/decode.c index cecd68a8e74..d1eec474dfd 100644 --- a/upb/decode.c +++ b/upb/decode.c @@ -222,7 +222,7 @@ static void decode_munge(int type, wireval *val) { static const upb_msglayout_field *upb_find_field(const upb_msglayout *l, uint32_t field_number) { - static upb_msglayout_field none = {0}; + static upb_msglayout_field none = {0, 0, 0, 0, 0, 0}; /* Lots of optimization opportunities here. */ int i; diff --git a/upb/msg.h b/upb/msg.h index 1ded2cf3e25..b321748ec05 100644 --- a/upb/msg.h +++ b/upb/msg.h @@ -141,7 +141,7 @@ UPB_INLINE uint32_t _upb_getoneofcase(const void *msg, size_t case_ofs) { UPB_INLINE size_t _upb_oneofcase_ofs(const upb_msglayout_field *f) { UPB_ASSERT(f->presence < 0); - return ~(int64_t)f->presence; + return ~(ptrdiff_t)f->presence; } UPB_INLINE uint32_t *_upb_oneofcase_field(upb_msg *msg, From 2f62b38028704a4dedaab1c85d6964715b6f346f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 4 Jun 2020 15:50:38 -0700 Subject: [PATCH 041/239] update bazel upb dep --- bazel/grpc_deps.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index f1627b1df30..43d198f80b6 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -267,11 +267,11 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "c7fb7f909948649c07535cc1274a318d838e56ed77c108ee16874ba0f959a059", - strip_prefix = "upb-b717575ceff5e759a28f3ed3d60a65eee041a30c", + sha256 = "d4b6a818628988a7a0785734755afd488d8d2da1de5ff0bcbf7d7b483741d5d0", + strip_prefix = "upb-363e39c171a08b89bd546189d1244a6e191cacf0", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/b717575ceff5e759a28f3ed3d60a65eee041a30c.tar.gz", - "https://github.com/protocolbuffers/upb/archive/b717575ceff5e759a28f3ed3d60a65eee041a30c.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/363e39c171a08b89bd546189d1244a6e191cacf0.tar.gz", + "https://github.com/protocolbuffers/upb/archive/363e39c171a08b89bd546189d1244a6e191cacf0.tar.gz", ], ) From a575049c03a7593bc9f298f02b5edfd290eeff44 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Mon, 8 Jun 2020 18:56:15 -0700 Subject: [PATCH 042/239] Changes needed to enable TLS 1.3. --- .../security/security_connector/ssl_utils.cc | 3 ++ src/core/tsi/ssl_transport_security.cc | 39 ++++++++++++++++--- .../SslCredentialsTest.cs | 6 ++- .../unit/_server_ssl_cert_config_test.py | 11 +++++- test/core/handshake/client_ssl.cc | 4 +- test/core/handshake/server_ssl_common.cc | 5 ++- test/core/tsi/ssl_transport_security_test.cc | 10 +++-- 7 files changed, 63 insertions(+), 15 deletions(-) diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index 664f3a18e61..2465496a2d3 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -67,6 +67,9 @@ static const char* cipher_suites = nullptr; // All cipher suites for default are compliant with HTTP2. GPR_GLOBAL_CONFIG_DEFINE_STRING( grpc_ssl_cipher_suites, + "TLS_AES_128_GCM_SHA256:" + "TLS_AES_256_GCM_SHA384:" + "TLS_CHACHA20_POLY1305_SHA256:" "ECDHE-ECDSA-AES128-GCM-SHA256:" "ECDHE-ECDSA-AES256-GCM-SHA384:" "ECDHE-RSA-AES128-GCM-SHA256:" diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index dda3f3c3d4a..3e6f0bb9dd2 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1410,6 +1410,28 @@ static void ssl_handshaker_destroy(tsi_handshaker* self) { gpr_free(impl); } +static tsi_result ssl_bytes_remaining(tsi_ssl_handshaker* impl, + unsigned char** bytes_remaining, + size_t* bytes_remaining_size) { + if (impl == nullptr || bytes_remaining == nullptr || + bytes_remaining_size == nullptr) { + return TSI_INVALID_ARGUMENT; + } + tsi_result result = TSI_OK; + size_t counter = 0; + size_t bytes_in_ssl_buffer = BIO_pending(SSL_get_rbio(impl->ssl)); + if (bytes_in_ssl_buffer == 0) return TSI_OK; + *bytes_remaining = static_cast(gpr_malloc(bytes_in_ssl_buffer)); + int read_success = 1; + while (read_success > 0 && counter < bytes_in_ssl_buffer) { + read_success = + BIO_read(SSL_get_rbio(impl->ssl), *bytes_remaining + counter, 1); + if (read_success == 1) counter += 1; + } + *bytes_remaining_size = counter; + return result; +} + static tsi_result ssl_handshaker_next( tsi_handshaker* self, const unsigned char* received_bytes, size_t received_bytes_size, const unsigned char** bytes_to_send, @@ -1450,9 +1472,10 @@ static tsi_result ssl_handshaker_next( if (ssl_handshaker_get_result(impl) == TSI_HANDSHAKE_IN_PROGRESS) { *handshaker_result = nullptr; } else { - size_t unused_bytes_size = received_bytes_size - bytes_consumed; - const unsigned char* unused_bytes = - unused_bytes_size == 0 ? nullptr : received_bytes + bytes_consumed; + unsigned char* unused_bytes = nullptr; + size_t unused_bytes_size = 0; + status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size); + if (status != TSI_OK) return status; status = ssl_handshaker_result_create(impl, unused_bytes, unused_bytes_size, handshaker_result); if (status == TSI_OK) { @@ -1805,8 +1828,11 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options( return TSI_INVALID_ARGUMENT; } -#if defined(OPENSSL_NO_TLS1_2_METHOD) || OPENSSL_API_COMPAT >= 0x10100000L +#if OPENSSL_VERSION_NUMBER >= 0x10100000 + // TODO(mattstev): Allow user to set min/max TLS version. + // https://github.com/grpc/grpc/issues/22403 ssl_context = SSL_CTX_new(TLS_method()); + SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION); #else ssl_context = SSL_CTX_new(TLSv1_2_method()); #endif @@ -1969,8 +1995,11 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options( for (i = 0; i < options->num_key_cert_pairs; i++) { do { -#if defined(OPENSSL_NO_TLS1_2_METHOD) || OPENSSL_API_COMPAT >= 0x10100000L +#if OPENSSL_VERSION_NUMBER >= 0x10100000 + // TODO(mattstev): Allow user to set min/max TLS version. + // https://github.com/grpc/grpc/issues/22403 impl->ssl_contexts[i] = SSL_CTX_new(TLS_method()); + SSL_CTX_set_min_proto_version(impl->ssl_contexts[i], TLS1_2_VERSION); #else impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method()); #endif diff --git a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs index 4c1189320fa..c7ff3216ec8 100644 --- a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs @@ -246,8 +246,10 @@ namespace Grpc.IntegrationTesting private void CheckRejected() { var ex = Assert.Throws(() => client.UnaryCall(new SimpleRequest { ResponseSize = 10 })); - Assert.AreEqual(StatusCode.Unavailable, ex.Status.StatusCode); - } + if (ex.Status.StatusCode != StatusCode.Unavailable & ex.Status.StatusCode != StatusCode.Unknown) { + Assert.Fail("Expect status to be either Unavailable or Unknown"); + } + } private async Task CheckAuthContextIsPopulated() { diff --git a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py index a0948600a25..6129db62742 100644 --- a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py +++ b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py @@ -161,8 +161,15 @@ class _ServerSSLCertReloadTest( else: with self.assertRaises(grpc.RpcError) as exception_context: client_stub.UnUn(request) - self.assertEqual(exception_context.exception.code(), - grpc.StatusCode.UNAVAILABLE) + # If TLS 1.2 is used, then the client receives an alert message + # before the handshake is complete, so the status is UNAVAILABLE. If + # TLS 1.3 is used, then the client receives the alert message after + # the handshake is complete, so the TSI handshaker returns the + # TSI_PROTOCOL_FAILURE result. This result does not have a + # corresponding status code, so this yields an UNKNOWN status. + self.assertTrue( + exception_context.exception.code() in [ + grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) def _do_one_shot_client_rpc(self, expect_success, diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc index daeebee269c..3e7f5120c26 100644 --- a/test/core/handshake/client_ssl.cc +++ b/test/core/handshake/client_ssl.cc @@ -161,7 +161,9 @@ static void server_thread(void* arg) { // Set the cipher list to match the one expressed in // src/core/tsi/ssl_transport_security.c. const char* cipher_list = - "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-" + "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_" + "SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-" + "AES256-" "SHA384:ECDHE-RSA-AES256-GCM-SHA384"; if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) { ERR_print_errors_fp(stderr); diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc index 1493094e3c3..d1bc7b1a596 100644 --- a/test/core/handshake/server_ssl_common.cc +++ b/test/core/handshake/server_ssl_common.cc @@ -203,8 +203,9 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len, // Set the cipher list to match the one expressed in // src/core/tsi/ssl_transport_security.c. const char* cipher_list = - "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-" - "SHA384:ECDHE-RSA-AES256-GCM-SHA384"; + "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_" + "SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-" + "AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384"; if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) { ERR_print_errors_fp(stderr); gpr_log(GPR_ERROR, "Couldn't set server cipher list."); diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index 8c4e736fc8b..6d2bc5e535c 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -317,10 +317,14 @@ static void ssl_test_check_handshaker_peers(tsi_test_fixture* fixture) { GPR_ASSERT(ssl_fixture->key_cert_lib != nullptr); ssl_key_cert_lib* key_cert_lib = ssl_fixture->key_cert_lib; tsi_peer peer; - bool expect_success = + bool expect_server_success = !(key_cert_lib->use_bad_server_cert || (key_cert_lib->use_bad_client_cert && ssl_fixture->force_client_auth)); - if (expect_success) { + // In TLS 1.3, the client-side handshake succeeds even if the client sends a + // bad certificate. In such a case, the server would fail the TLS handshake + // and send an alert to the client as the first application data message. + bool expect_client_success = !key_cert_lib->use_bad_server_cert; + if (expect_client_success) { GPR_ASSERT(tsi_handshaker_result_extract_peer( ssl_fixture->base.client_result, &peer) == TSI_OK); check_session_reusage(ssl_fixture, &peer); @@ -338,7 +342,7 @@ static void ssl_test_check_handshaker_peers(tsi_test_fixture* fixture) { } else { GPR_ASSERT(ssl_fixture->base.client_result == nullptr); } - if (expect_success) { + if (expect_server_success) { GPR_ASSERT(tsi_handshaker_result_extract_peer( ssl_fixture->base.server_result, &peer) == TSI_OK); check_session_reusage(ssl_fixture, &peer); From 451436e154d4f23f1860d9bfba93493dbed50e13 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 10 Jun 2020 16:57:53 -0700 Subject: [PATCH 043/239] Revert https://github.com/grpc/grpc/pull/18345 Move ResourceQuota to grpc. --- include/grpcpp/resource_quota.h | 55 ++++++++++++++++++++++++---- include/grpcpp/server_builder_impl.h | 5 +-- src/cpp/common/channel_arguments.cc | 2 +- src/cpp/common/resource_quota_cc.cc | 4 +- src/cpp/server/server_builder.cc | 2 +- 5 files changed, 53 insertions(+), 15 deletions(-) diff --git a/include/grpcpp/resource_quota.h b/include/grpcpp/resource_quota.h index 333767b95c5..16c0e35385b 100644 --- a/include/grpcpp/resource_quota.h +++ b/include/grpcpp/resource_quota.h @@ -1,6 +1,6 @@ /* * - * Copyright 2019 gRPC authors. + * Copyright 2016 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,14 +16,53 @@ * */ -#ifndef GRPCPP_RESOURCE_QUOTA_H -#define GRPCPP_RESOURCE_QUOTA_H +#ifndef GRPCPP_RESOURCE_QUOTA_IMPL_H +#define GRPCPP_RESOURCE_QUOTA_IMPL_H -#include +struct grpc_resource_quota; -namespace grpc { +#include +#include -typedef ::grpc_impl::ResourceQuota ResourceQuota; -} // namespace grpc +namespace grpc_impl { -#endif // GRPCPP_RESOURCE_QUOTA_H +/// ResourceQuota represents a bound on memory and thread usage by the gRPC +/// library. A ResourceQuota can be attached to a server (via \a ServerBuilder), +/// or a client channel (via \a ChannelArguments). +/// gRPC will attempt to keep memory and threads used by all attached entities +/// below the ResourceQuota bound. +class ResourceQuota final : private ::grpc::GrpcLibraryCodegen { + public: + /// \param name - a unique name for this ResourceQuota. + explicit ResourceQuota(const grpc::string& name); + ResourceQuota(); + ~ResourceQuota(); + + /// Resize this \a ResourceQuota to a new size. If \a new_size is smaller + /// than the current size of the pool, memory usage will be monotonically + /// decreased until it falls under \a new_size. + /// No time bound is given for this to occur however. + ResourceQuota& Resize(size_t new_size); + + /// Set the max number of threads that can be allocated from this + /// ResourceQuota object. + /// + /// If the new_max_threads value is smaller than the current value, no new + /// threads are allocated until the number of active threads fall below + /// new_max_threads. There is no time bound on when this may happen i.e none + /// of the current threads are forcefully destroyed and all threads run their + /// normal course. + ResourceQuota& SetMaxThreads(int new_max_threads); + + grpc_resource_quota* c_resource_quota() const { return impl_; } + + private: + ResourceQuota(const ResourceQuota& rhs); + ResourceQuota& operator=(const ResourceQuota& rhs); + + grpc_resource_quota* const impl_; +}; + +} // namespace grpc_impl + +#endif // GRPCPP_RESOURCE_QUOTA_IMPL_H diff --git a/include/grpcpp/server_builder_impl.h b/include/grpcpp/server_builder_impl.h index 171f1ac6c84..d4d5956d8b8 100644 --- a/include/grpcpp/server_builder_impl.h +++ b/include/grpcpp/server_builder_impl.h @@ -41,7 +41,6 @@ struct grpc_resource_quota; namespace grpc_impl { class CompletionQueue; -class ResourceQuota; class Server; class ServerCompletionQueue; class ServerCredentials; @@ -50,6 +49,7 @@ class ServerCredentials; namespace grpc { class AsyncGenericService; +class ResourceQuota; class Service; namespace testing { class ServerBuilderPluginTest; @@ -228,8 +228,7 @@ class ServerBuilder { grpc_compression_algorithm algorithm); /// Set the attached buffer pool for this server - ServerBuilder& SetResourceQuota( - const grpc_impl::ResourceQuota& resource_quota); + ServerBuilder& SetResourceQuota(const ResourceQuota& resource_quota); ServerBuilder& SetOption(std::unique_ptr option); diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index 4ef45970cdd..ba0220ab876 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -142,7 +142,7 @@ void ChannelArguments::SetUserAgentPrefix( } void ChannelArguments::SetResourceQuota( - const grpc_impl::ResourceQuota& resource_quota) { + const grpc::ResourceQuota& resource_quota) { SetPointerWithVtable(GRPC_ARG_RESOURCE_QUOTA, resource_quota.c_resource_quota(), grpc_resource_quota_arg_vtable()); diff --git a/src/cpp/common/resource_quota_cc.cc b/src/cpp/common/resource_quota_cc.cc index 4fab2975d89..276e5f79548 100644 --- a/src/cpp/common/resource_quota_cc.cc +++ b/src/cpp/common/resource_quota_cc.cc @@ -19,7 +19,7 @@ #include #include -namespace grpc_impl { +namespace grpc { ResourceQuota::ResourceQuota() : impl_(grpc_resource_quota_create(nullptr)) {} @@ -37,4 +37,4 @@ ResourceQuota& ResourceQuota::SetMaxThreads(int new_max_threads) { grpc_resource_quota_set_max_threads(impl_, new_max_threads); return *this; } -} // namespace grpc_impl +} // namespace grpc diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index d5e93476532..0acb486149d 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -193,7 +193,7 @@ ServerBuilder& ServerBuilder::SetDefaultCompressionAlgorithm( } ServerBuilder& ServerBuilder::SetResourceQuota( - const grpc_impl::ResourceQuota& resource_quota) { + const grpc::ResourceQuota& resource_quota) { if (resource_quota_ != nullptr) { grpc_resource_quota_unref(resource_quota_); } From f795f604c89cfe646b9ed0911228a2b2bae8a5c8 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 10 Jun 2020 17:27:22 -0700 Subject: [PATCH 044/239] Add build changes to move ResourceQuota from grpc_impl to grpc --- BUILD | 1 - BUILD.gn | 1 - CMakeLists.txt | 2 -- Makefile | 2 -- gRPC-C++.podspec | 1 - include/grpcpp/resource_quota.h | 10 +++++----- include/grpcpp/server_builder_impl.h | 2 +- tools/doxygen/Doxyfile.c++ | 1 - tools/doxygen/Doxyfile.c++.internal | 1 - 9 files changed, 6 insertions(+), 15 deletions(-) diff --git a/BUILD b/BUILD index 0d2a7ca058c..655a1b017b9 100644 --- a/BUILD +++ b/BUILD @@ -250,7 +250,6 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/impl/server_initializer_impl.h", "include/grpcpp/impl/service_type.h", "include/grpcpp/resource_quota.h", - "include/grpcpp/resource_quota_impl.h", "include/grpcpp/security/auth_context.h", "include/grpcpp/security/auth_metadata_processor.h", "include/grpcpp/security/auth_metadata_processor_impl.h", diff --git a/BUILD.gn b/BUILD.gn index a16d298f1be..e444c251c08 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1175,7 +1175,6 @@ config("grpc_config") { "include/grpcpp/impl/server_initializer_impl.h", "include/grpcpp/impl/service_type.h", "include/grpcpp/resource_quota.h", - "include/grpcpp/resource_quota_impl.h", "include/grpcpp/security/auth_context.h", "include/grpcpp/security/auth_metadata_processor.h", "include/grpcpp/security/auth_metadata_processor_impl.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 323f7800627..aabacf1cc0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2737,7 +2737,6 @@ foreach(_hdr include/grpcpp/impl/server_initializer_impl.h include/grpcpp/impl/service_type.h include/grpcpp/resource_quota.h - include/grpcpp/resource_quota_impl.h include/grpcpp/security/auth_context.h include/grpcpp/security/auth_metadata_processor.h include/grpcpp/security/auth_metadata_processor_impl.h @@ -3431,7 +3430,6 @@ foreach(_hdr include/grpcpp/impl/server_initializer_impl.h include/grpcpp/impl/service_type.h include/grpcpp/resource_quota.h - include/grpcpp/resource_quota_impl.h include/grpcpp/security/auth_context.h include/grpcpp/security/auth_metadata_processor.h include/grpcpp/security/auth_metadata_processor_impl.h diff --git a/Makefile b/Makefile index bbaccc44513..75fab892c73 100644 --- a/Makefile +++ b/Makefile @@ -4933,7 +4933,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/impl/server_initializer_impl.h \ include/grpcpp/impl/service_type.h \ include/grpcpp/resource_quota.h \ - include/grpcpp/resource_quota_impl.h \ include/grpcpp/security/auth_context.h \ include/grpcpp/security/auth_metadata_processor.h \ include/grpcpp/security/auth_metadata_processor_impl.h \ @@ -5632,7 +5631,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/impl/server_initializer_impl.h \ include/grpcpp/impl/service_type.h \ include/grpcpp/resource_quota.h \ - include/grpcpp/resource_quota_impl.h \ include/grpcpp/security/auth_context.h \ include/grpcpp/security/auth_metadata_processor.h \ include/grpcpp/security/auth_metadata_processor_impl.h \ diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index d8f404abc1f..c786ae57a24 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -164,7 +164,6 @@ Pod::Spec.new do |s| 'include/grpcpp/impl/server_initializer_impl.h', 'include/grpcpp/impl/service_type.h', 'include/grpcpp/resource_quota.h', - 'include/grpcpp/resource_quota_impl.h', 'include/grpcpp/security/auth_context.h', 'include/grpcpp/security/auth_metadata_processor.h', 'include/grpcpp/security/auth_metadata_processor_impl.h', diff --git a/include/grpcpp/resource_quota.h b/include/grpcpp/resource_quota.h index 16c0e35385b..3c75b271e6d 100644 --- a/include/grpcpp/resource_quota.h +++ b/include/grpcpp/resource_quota.h @@ -16,15 +16,15 @@ * */ -#ifndef GRPCPP_RESOURCE_QUOTA_IMPL_H -#define GRPCPP_RESOURCE_QUOTA_IMPL_H +#ifndef GRPCPP_RESOURCE_QUOTA_H +#define GRPCPP_RESOURCE_QUOTA_H struct grpc_resource_quota; #include #include -namespace grpc_impl { +namespace grpc { /// ResourceQuota represents a bound on memory and thread usage by the gRPC /// library. A ResourceQuota can be attached to a server (via \a ServerBuilder), @@ -63,6 +63,6 @@ class ResourceQuota final : private ::grpc::GrpcLibraryCodegen { grpc_resource_quota* const impl_; }; -} // namespace grpc_impl +} // namespace grpc -#endif // GRPCPP_RESOURCE_QUOTA_IMPL_H +#endif // GRPCPP_RESOURCE_QUOTA_H diff --git a/include/grpcpp/server_builder_impl.h b/include/grpcpp/server_builder_impl.h index d4d5956d8b8..59aa54f4eca 100644 --- a/include/grpcpp/server_builder_impl.h +++ b/include/grpcpp/server_builder_impl.h @@ -228,7 +228,7 @@ class ServerBuilder { grpc_compression_algorithm algorithm); /// Set the attached buffer pool for this server - ServerBuilder& SetResourceQuota(const ResourceQuota& resource_quota); + ServerBuilder& SetResourceQuota(const grpc::ResourceQuota& resource_quota); ServerBuilder& SetOption(std::unique_ptr option); diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index f9fcb6142ee..f1f50fbebe3 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -1023,7 +1023,6 @@ include/grpcpp/impl/server_initializer.h \ include/grpcpp/impl/server_initializer_impl.h \ include/grpcpp/impl/service_type.h \ include/grpcpp/resource_quota.h \ -include/grpcpp/resource_quota_impl.h \ include/grpcpp/security/auth_context.h \ include/grpcpp/security/auth_metadata_processor.h \ include/grpcpp/security/auth_metadata_processor_impl.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 613e824f4d7..1856fc54f89 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1023,7 +1023,6 @@ include/grpcpp/impl/server_initializer.h \ include/grpcpp/impl/server_initializer_impl.h \ include/grpcpp/impl/service_type.h \ include/grpcpp/resource_quota.h \ -include/grpcpp/resource_quota_impl.h \ include/grpcpp/security/auth_context.h \ include/grpcpp/security/auth_metadata_processor.h \ include/grpcpp/security/auth_metadata_processor_impl.h \ From 89763a96fd41e8cfd11469db6e4092253c1971f5 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 10 Jun 2020 17:36:58 -0700 Subject: [PATCH 045/239] Move OpenCensus back to ::grpc from ::grpc_impl Revert - Revert "Revert "Fold opencensus into grpc_impl namespace"" #18396 --- BUILD | 1 - include/grpcpp/opencensus.h | 42 ++++++----- include/grpcpp/opencensus_impl.h | 47 ------------- src/cpp/ext/filters/census/grpc_plugin.cc | 69 +++++++++---------- src/cpp/ext/filters/census/views.cc | 15 ++++ .../microbenchmarks/bm_opencensus_plugin.cc | 8 +-- 6 files changed, 76 insertions(+), 106 deletions(-) delete mode 100644 include/grpcpp/opencensus_impl.h diff --git a/BUILD b/BUILD index 8fe2d6d2e15..a62ca7e8ec2 100644 --- a/BUILD +++ b/BUILD @@ -2322,7 +2322,6 @@ grpc_cc_library( ], hdrs = [ "include/grpcpp/opencensus.h", - "include/grpcpp/opencensus_impl.h", "src/cpp/ext/filters/census/channel_filter.h", "src/cpp/ext/filters/census/client_filter.h", "src/cpp/ext/filters/census/context.h", diff --git a/include/grpcpp/opencensus.h b/include/grpcpp/opencensus.h index 39bac6bc28c..dbcb7c9caeb 100644 --- a/include/grpcpp/opencensus.h +++ b/include/grpcpp/opencensus.h @@ -1,6 +1,6 @@ /* * - * Copyright 2018 gRPC authors. + * Copyright 2019 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,24 +16,32 @@ * */ -#ifndef GRPCPP_OPENCENSUS_H -#define GRPCPP_OPENCENSUS_H +#ifndef GRPCPP_OPENCENSUS_IMPL_H +#define GRPCPP_OPENCENSUS_IMPL_H -#include "grpcpp/opencensus_impl.h" +#include "opencensus/trace/span.h" -namespace grpc { +namespace grpc_impl { +class ServerContext; +// These symbols in this file will not be included in the binary unless +// grpc_opencensus_plugin build target was added as a dependency. At the moment +// it is only setup to be built with Bazel. -static inline void RegisterOpenCensusPlugin() { - ::grpc_impl::RegisterOpenCensusPlugin(); -} -static inline void RegisterOpenCensusViewsForExport() { - ::grpc_impl::RegisterOpenCensusViewsForExport(); -} -static inline ::opencensus::trace::Span GetSpanFromServerContext( - ::grpc_impl::ServerContext* context) { - return ::grpc_impl::GetSpanFromServerContext(context); -} +// Registers the OpenCensus plugin with gRPC, so that it will be used for future +// RPCs. This must be called before any views are created. +void RegisterOpenCensusPlugin(); -} // namespace grpc +// RPC stats definitions, defined by +// https://github.com/census-instrumentation/opencensus-specs/blob/master/stats/gRPC.md -#endif // GRPCPP_OPENCENSUS_H +// Registers the cumulative gRPC views so that they will be exported by any +// registered stats exporter. For on-task stats, construct a View using the +// ViewDescriptors below. +void RegisterOpenCensusViewsForExport(); + +// Returns the tracing Span for the current RPC. +::opencensus::trace::Span GetSpanFromServerContext(ServerContext* context); + +} // namespace grpc_impl + +#endif // GRPCPP_OPENCENSUS_IMPL_H diff --git a/include/grpcpp/opencensus_impl.h b/include/grpcpp/opencensus_impl.h deleted file mode 100644 index dbcb7c9caeb..00000000000 --- a/include/grpcpp/opencensus_impl.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * - * Copyright 2019 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPCPP_OPENCENSUS_IMPL_H -#define GRPCPP_OPENCENSUS_IMPL_H - -#include "opencensus/trace/span.h" - -namespace grpc_impl { -class ServerContext; -// These symbols in this file will not be included in the binary unless -// grpc_opencensus_plugin build target was added as a dependency. At the moment -// it is only setup to be built with Bazel. - -// Registers the OpenCensus plugin with gRPC, so that it will be used for future -// RPCs. This must be called before any views are created. -void RegisterOpenCensusPlugin(); - -// RPC stats definitions, defined by -// https://github.com/census-instrumentation/opencensus-specs/blob/master/stats/gRPC.md - -// Registers the cumulative gRPC views so that they will be exported by any -// registered stats exporter. For on-task stats, construct a View using the -// ViewDescriptors below. -void RegisterOpenCensusViewsForExport(); - -// Returns the tracing Span for the current RPC. -::opencensus::trace::Span GetSpanFromServerContext(ServerContext* context); - -} // namespace grpc_impl - -#endif // GRPCPP_OPENCENSUS_IMPL_H diff --git a/src/cpp/ext/filters/census/grpc_plugin.cc b/src/cpp/ext/filters/census/grpc_plugin.cc index 63d6f1bde48..3e07f3fd6d4 100644 --- a/src/cpp/ext/filters/census/grpc_plugin.cc +++ b/src/cpp/ext/filters/census/grpc_plugin.cc @@ -31,6 +31,40 @@ namespace grpc { +void RegisterOpenCensusPlugin() { + grpc::RegisterChannelFilter( + "opencensus_client", GRPC_CLIENT_CHANNEL, INT_MAX /* priority */, + nullptr /* condition function */); + grpc::RegisterChannelFilter( + "opencensus_server", GRPC_SERVER_CHANNEL, INT_MAX /* priority */, + nullptr /* condition function */); + + // Access measures to ensure they are initialized. Otherwise, creating a view + // before the first RPC would cause an error. + grpc::RpcClientSentBytesPerRpc(); + grpc::RpcClientReceivedBytesPerRpc(); + grpc::RpcClientRoundtripLatency(); + grpc::RpcClientServerLatency(); + grpc::RpcClientSentMessagesPerRpc(); + grpc::RpcClientReceivedMessagesPerRpc(); + + grpc::RpcServerSentBytesPerRpc(); + grpc::RpcServerReceivedBytesPerRpc(); + grpc::RpcServerServerLatency(); + grpc::RpcServerSentMessagesPerRpc(); + grpc::RpcServerReceivedMessagesPerRpc(); +} + +::opencensus::trace::Span GetSpanFromServerContext( + grpc::ServerContext* context) { + return reinterpret_cast(context->census_context()) + ->Span(); +} + + + // These measure definitions should be kept in sync across opencensus // implementations--see // https://github.com/census-instrumentation/opencensus-java/blob/master/contrib/grpc_metrics/src/main/java/io/opencensus/contrib/grpc/metrics/RpcMeasureConstants.java. @@ -99,38 +133,3 @@ ABSL_CONST_INIT const absl::string_view ABSL_CONST_INIT const absl::string_view kRpcServerServerLatencyMeasureName = "grpc.io/server/server_latency"; } // namespace grpc -namespace grpc_impl { - -void RegisterOpenCensusPlugin() { - grpc::RegisterChannelFilter( - "opencensus_client", GRPC_CLIENT_CHANNEL, INT_MAX /* priority */, - nullptr /* condition function */); - grpc::RegisterChannelFilter( - "opencensus_server", GRPC_SERVER_CHANNEL, INT_MAX /* priority */, - nullptr /* condition function */); - - // Access measures to ensure they are initialized. Otherwise, creating a view - // before the first RPC would cause an error. - grpc::RpcClientSentBytesPerRpc(); - grpc::RpcClientReceivedBytesPerRpc(); - grpc::RpcClientRoundtripLatency(); - grpc::RpcClientServerLatency(); - grpc::RpcClientSentMessagesPerRpc(); - grpc::RpcClientReceivedMessagesPerRpc(); - - grpc::RpcServerSentBytesPerRpc(); - grpc::RpcServerReceivedBytesPerRpc(); - grpc::RpcServerServerLatency(); - grpc::RpcServerSentMessagesPerRpc(); - grpc::RpcServerReceivedMessagesPerRpc(); -} - -::opencensus::trace::Span GetSpanFromServerContext( - grpc::ServerContext* context) { - return reinterpret_cast(context->census_context()) - ->Span(); -} - -} // namespace grpc_impl diff --git a/src/cpp/ext/filters/census/views.cc b/src/cpp/ext/filters/census/views.cc index d7e3c81a955..df7874b39af 100644 --- a/src/cpp/ext/filters/census/views.cc +++ b/src/cpp/ext/filters/census/views.cc @@ -88,6 +88,21 @@ ViewDescriptor HourDescriptor() { } // namespace +void RegisterOpenCensusViewsForExport() { + ClientSentMessagesPerRpcCumulative().RegisterForExport(); + ClientSentBytesPerRpcCumulative().RegisterForExport(); + ClientReceivedMessagesPerRpcCumulative().RegisterForExport(); + ClientReceivedBytesPerRpcCumulative().RegisterForExport(); + ClientRoundtripLatencyCumulative().RegisterForExport(); + ClientServerLatencyCumulative().RegisterForExport(); + + ServerSentMessagesPerRpcCumulative().RegisterForExport(); + ServerSentBytesPerRpcCumulative().RegisterForExport(); + ServerReceivedMessagesPerRpcCumulative().RegisterForExport(); + ServerReceivedBytesPerRpcCumulative().RegisterForExport(); + ServerServerLatencyCumulative().RegisterForExport(); +} + // client cumulative const ViewDescriptor& ClientSentBytesPerRpcCumulative() { const static ViewDescriptor descriptor = diff --git a/test/cpp/microbenchmarks/bm_opencensus_plugin.cc b/test/cpp/microbenchmarks/bm_opencensus_plugin.cc index 908d34aa19f..8b50d249c8c 100644 --- a/test/cpp/microbenchmarks/bm_opencensus_plugin.cc +++ b/test/cpp/microbenchmarks/bm_opencensus_plugin.cc @@ -24,17 +24,13 @@ #include "absl/strings/str_cat.h" #include "include/grpc/grpc.h" #include "include/grpcpp/grpcpp.h" -#include "include/grpcpp/opencensus.h" #include "opencensus/stats/stats.h" #include "src/cpp/ext/filters/census/grpc_plugin.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/cpp/microbenchmarks/helpers.h" -using ::grpc::RegisterOpenCensusPlugin; -using ::grpc::RegisterOpenCensusViewsForExport; - absl::once_flag once; -void RegisterOnce() { absl::call_once(once, RegisterOpenCensusPlugin); } +void RegisterOnce() { absl::call_once(once, grpc::RegisterOpenCensusPlugin); } class EchoServer final : public grpc::testing::EchoTestService::Service { grpc::Status Echo(grpc::ServerContext* context, @@ -111,7 +107,7 @@ static void BM_E2eLatencyCensusEnabled(benchmark::State& state) { RegisterOnce(); // This we can safely repeat, and doing so clears accumulated data to avoid // initialization costs varying between runs. - RegisterOpenCensusViewsForExport(); + grpc::RegisterOpenCensusViewsForExport(); EchoServerThread server; std::unique_ptr stub = From e55267a6fdf0d779e1f2ce6005239599c8556cda Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 10 Jun 2020 17:41:45 -0700 Subject: [PATCH 046/239] Resolve conflicts --- include/grpcpp/opencensus.h | 10 ++++---- src/cpp/ext/filters/census/grpc_plugin.cc | 28 +++++++++++------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/grpcpp/opencensus.h b/include/grpcpp/opencensus.h index dbcb7c9caeb..0da949ab73c 100644 --- a/include/grpcpp/opencensus.h +++ b/include/grpcpp/opencensus.h @@ -16,12 +16,12 @@ * */ -#ifndef GRPCPP_OPENCENSUS_IMPL_H -#define GRPCPP_OPENCENSUS_IMPL_H +#ifndef GRPCPP_OPENCENSUS_H +#define GRPCPP_OPENCENSUS_H #include "opencensus/trace/span.h" -namespace grpc_impl { +namespace grpc { class ServerContext; // These symbols in this file will not be included in the binary unless // grpc_opencensus_plugin build target was added as a dependency. At the moment @@ -42,6 +42,6 @@ void RegisterOpenCensusViewsForExport(); // Returns the tracing Span for the current RPC. ::opencensus::trace::Span GetSpanFromServerContext(ServerContext* context); -} // namespace grpc_impl +} // namespace grpc -#endif // GRPCPP_OPENCENSUS_IMPL_H +#endif // GRPCPP_OPENCENSUS_H diff --git a/src/cpp/ext/filters/census/grpc_plugin.cc b/src/cpp/ext/filters/census/grpc_plugin.cc index 3e07f3fd6d4..70034067d2a 100644 --- a/src/cpp/ext/filters/census/grpc_plugin.cc +++ b/src/cpp/ext/filters/census/grpc_plugin.cc @@ -32,29 +32,29 @@ namespace grpc { void RegisterOpenCensusPlugin() { - grpc::RegisterChannelFilter( "opencensus_client", GRPC_CLIENT_CHANNEL, INT_MAX /* priority */, nullptr /* condition function */); - grpc::RegisterChannelFilter( "opencensus_server", GRPC_SERVER_CHANNEL, INT_MAX /* priority */, nullptr /* condition function */); // Access measures to ensure they are initialized. Otherwise, creating a view // before the first RPC would cause an error. - grpc::RpcClientSentBytesPerRpc(); - grpc::RpcClientReceivedBytesPerRpc(); - grpc::RpcClientRoundtripLatency(); - grpc::RpcClientServerLatency(); - grpc::RpcClientSentMessagesPerRpc(); - grpc::RpcClientReceivedMessagesPerRpc(); - - grpc::RpcServerSentBytesPerRpc(); - grpc::RpcServerReceivedBytesPerRpc(); - grpc::RpcServerServerLatency(); - grpc::RpcServerSentMessagesPerRpc(); - grpc::RpcServerReceivedMessagesPerRpc(); + RpcClientSentBytesPerRpc(); + RpcClientReceivedBytesPerRpc(); + RpcClientRoundtripLatency(); + RpcClientServerLatency(); + RpcClientSentMessagesPerRpc(); + RpcClientReceivedMessagesPerRpc(); + + RpcServerSentBytesPerRpc(); + RpcServerReceivedBytesPerRpc(); + RpcServerServerLatency(); + RpcServerSentMessagesPerRpc(); + RpcServerReceivedMessagesPerRpc(); } ::opencensus::trace::Span GetSpanFromServerContext( From 934cf3e3df67440ef3810a9d60a164f14e0629c1 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 10 Jun 2020 22:47:29 -0700 Subject: [PATCH 047/239] Move ServerBuilder back to ::grpc from ::grpc_impl Revert #18510 --- BUILD | 1 - BUILD.gn | 1 - CMakeLists.txt | 2 - Makefile | 2 - gRPC-C++.podspec | 1 - .../impl/codegen/completion_queue_impl.h | 6 +- include/grpcpp/impl/server_builder_plugin.h | 5 +- include/grpcpp/server_builder.h | 390 +++++++++++++++- include/grpcpp/server_builder_impl.h | 418 ------------------ include/grpcpp/server_impl.h | 2 +- src/cpp/server/server_builder.cc | 28 +- tools/doxygen/Doxyfile.c++ | 1 - tools/doxygen/Doxyfile.c++.internal | 1 - 13 files changed, 408 insertions(+), 450 deletions(-) delete mode 100644 include/grpcpp/server_builder_impl.h diff --git a/BUILD b/BUILD index 0d2a7ca058c..9b434b44752 100644 --- a/BUILD +++ b/BUILD @@ -262,7 +262,6 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/server.h", "include/grpcpp/server_impl.h", "include/grpcpp/server_builder.h", - "include/grpcpp/server_builder_impl.h", "include/grpcpp/server_context.h", "include/grpcpp/server_posix.h", "include/grpcpp/server_posix_impl.h", diff --git a/BUILD.gn b/BUILD.gn index a16d298f1be..ab0e1d86c27 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1186,7 +1186,6 @@ config("grpc_config") { "include/grpcpp/security/tls_credentials_options.h", "include/grpcpp/server.h", "include/grpcpp/server_builder.h", - "include/grpcpp/server_builder_impl.h", "include/grpcpp/server_context.h", "include/grpcpp/server_impl.h", "include/grpcpp/server_posix.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 323f7800627..a00c1490f8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2748,7 +2748,6 @@ foreach(_hdr include/grpcpp/security/tls_credentials_options.h include/grpcpp/server.h include/grpcpp/server_builder.h - include/grpcpp/server_builder_impl.h include/grpcpp/server_context.h include/grpcpp/server_impl.h include/grpcpp/server_posix.h @@ -3442,7 +3441,6 @@ foreach(_hdr include/grpcpp/security/tls_credentials_options.h include/grpcpp/server.h include/grpcpp/server_builder.h - include/grpcpp/server_builder_impl.h include/grpcpp/server_context.h include/grpcpp/server_impl.h include/grpcpp/server_posix.h diff --git a/Makefile b/Makefile index bbaccc44513..dc8f685469b 100644 --- a/Makefile +++ b/Makefile @@ -4944,7 +4944,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ - include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ @@ -5643,7 +5642,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ - include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index d8f404abc1f..49ae71865e8 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -175,7 +175,6 @@ Pod::Spec.new do |s| 'include/grpcpp/security/tls_credentials_options.h', 'include/grpcpp/server.h', 'include/grpcpp/server_builder.h', - 'include/grpcpp/server_builder_impl.h', 'include/grpcpp/server_context.h', 'include/grpcpp/server_impl.h', 'include/grpcpp/server_posix.h', diff --git a/include/grpcpp/impl/codegen/completion_queue_impl.h b/include/grpcpp/impl/codegen/completion_queue_impl.h index c65b12197dc..ecb06f67f18 100644 --- a/include/grpcpp/impl/codegen/completion_queue_impl.h +++ b/include/grpcpp/impl/codegen/completion_queue_impl.h @@ -48,7 +48,6 @@ namespace grpc_impl { class Channel; class Server; -class ServerBuilder; template class ClientReader; template @@ -79,6 +78,7 @@ class ErrorMethodHandler; namespace grpc { class ChannelInterface; +class ServerBuilder; class ServerInterface; namespace internal { @@ -255,7 +255,7 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen { private: // Friends for access to server registration lists that enable checking and // logging on shutdown - friend class ::grpc_impl::ServerBuilder; + friend class ServerBuilder; friend class ::grpc_impl::Server; // Friend synchronous wrappers so that they can access Pluck(), which is @@ -445,7 +445,7 @@ class ServerCompletionQueue : public CompletionQueue { polling_type_(polling_type) {} grpc_cq_polling_type polling_type_; - friend class ::grpc_impl::ServerBuilder; + friend class ServerBuilder; friend class ::grpc_impl::Server; }; diff --git a/include/grpcpp/impl/server_builder_plugin.h b/include/grpcpp/impl/server_builder_plugin.h index 203e5465bc3..daed32142b1 100644 --- a/include/grpcpp/impl/server_builder_plugin.h +++ b/include/grpcpp/impl/server_builder_plugin.h @@ -26,11 +26,12 @@ namespace grpc_impl { -class ServerBuilder; class ServerInitializer; } // namespace grpc_impl namespace grpc { +class ServerBuilder; + /// This interface is meant for internal usage only. Implementations of this /// interface should add themselves to a \a ServerBuilder instance through the /// \a InternalAddPluginFactory method. @@ -42,7 +43,7 @@ class ServerBuilderPlugin { /// UpdateServerBuilder will be called at an early stage in /// ServerBuilder::BuildAndStart(), right after the ServerBuilderOptions have /// done their updates. - virtual void UpdateServerBuilder(grpc_impl::ServerBuilder* /*builder*/) {} + virtual void UpdateServerBuilder(ServerBuilder* /*builder*/) {} /// InitServer will be called in ServerBuilder::BuildAndStart(), after the /// Server instance is created. diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index d9ec7c42f3d..87aebe8e6ba 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -1,6 +1,6 @@ /* * - * Copyright 2019 gRPC authors. + * Copyright 2015-2016 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,11 +19,395 @@ #ifndef GRPCPP_SERVER_BUILDER_H #define GRPCPP_SERVER_BUILDER_H -#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct grpc_resource_quota; + +namespace grpc_impl { + +class CompletionQueue; +class Server; +class ServerCompletionQueue; +class ServerCredentials; +} // namespace grpc_impl namespace grpc { -typedef ::grpc_impl::ServerBuilder ServerBuilder; +class AsyncGenericService; +class Service; +namespace testing { +class ServerBuilderPluginTest; +} // namespace testing + +namespace internal { +class ExternalConnectionAcceptorImpl; +} // namespace internal + +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL +namespace experimental { +#endif +class CallbackGenericService; +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL +} // namespace experimental +#endif + +namespace experimental { +// EXPERIMENTAL API: +// Interface for a grpc server to build transports with connections created out +// of band. +// See ServerBuilder's AddExternalConnectionAcceptor API. +class ExternalConnectionAcceptor { + public: + struct NewConnectionParameters { + int listener_fd = -1; + int fd = -1; + ByteBuffer read_buffer; // data intended for the grpc server + }; + virtual ~ExternalConnectionAcceptor() {} + // If called before grpc::Server is started or after it is shut down, the new + // connection will be closed. + virtual void HandleNewConnection(NewConnectionParameters* p) = 0; +}; + +} // namespace experimental + +/// A builder class for the creation and startup of \a grpc::Server instances. +class ServerBuilder { + public: + ServerBuilder(); + virtual ~ServerBuilder(); + + ////////////////////////////////////////////////////////////////////////////// + // Primary API's + + /// Return a running server which is ready for processing calls. + /// Before calling, one typically needs to ensure that: + /// 1. a service is registered - so that the server knows what to serve + /// (via RegisterService, or RegisterAsyncGenericService) + /// 2. a listening port has been added - so the server knows where to receive + /// traffic (via AddListeningPort) + /// 3. [for async api only] completion queues have been added via + /// AddCompletionQueue + /// + /// Will return a nullptr on errors. + virtual std::unique_ptr BuildAndStart(); + + /// Register a service. This call does not take ownership of the service. + /// The service must exist for the lifetime of the \a Server instance returned + /// by \a BuildAndStart(). + /// Matches requests with any :authority + ServerBuilder& RegisterService(grpc::Service* service); + + /// Enlists an endpoint \a addr (port with an optional IP address) to + /// bind the \a grpc::Server object to be created to. + /// + /// It can be invoked multiple times. + /// + /// \param addr_uri The address to try to bind to the server in URI form. If + /// the scheme name is omitted, "dns:///" is assumed. To bind to any address, + /// please use IPv6 any, i.e., [::]:, which also accepts IPv4 + /// connections. Valid values include dns:///localhost:1234, / + /// 192.168.1.1:31416, dns:///[::1]:27182, etc.). + /// \param creds The credentials associated with the server. + /// \param selected_port[out] If not `nullptr`, gets populated with the port + /// number bound to the \a grpc::Server for the corresponding endpoint after + /// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort + /// does not modify this pointer. + ServerBuilder& AddListeningPort( + const grpc::string& addr_uri, + std::shared_ptr creds, + int* selected_port = nullptr); + + /// Add a completion queue for handling asynchronous services. + /// + /// Best performance is typically obtained by using one thread per polling + /// completion queue. + /// + /// Caller is required to shutdown the server prior to shutting down the + /// returned completion queue. Caller is also required to drain the + /// completion queue after shutting it down. A typical usage scenario: + /// + /// // While building the server: + /// ServerBuilder builder; + /// ... + /// cq_ = builder.AddCompletionQueue(); + /// server_ = builder.BuildAndStart(); + /// + /// // While shutting down the server; + /// server_->Shutdown(); + /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! + /// // Drain the cq_ that was created + /// void* ignored_tag; + /// bool ignored_ok; + /// while (cq_->Next(&ignored_tag, &ignored_ok)) { } + /// + /// \param is_frequently_polled This is an optional parameter to inform gRPC + /// library about whether this completion queue would be frequently polled + /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is + /// 'true' and is the recommended setting. Setting this to 'false' (i.e. + /// not polling the completion queue frequently) will have a significantly + /// negative performance impact and hence should not be used in production + /// use cases. + std::unique_ptr AddCompletionQueue( + bool is_frequently_polled = true); + + ////////////////////////////////////////////////////////////////////////////// + // Less commonly used RegisterService variants + + /// Register a service. This call does not take ownership of the service. + /// The service must exist for the lifetime of the \a Server instance + /// returned by \a BuildAndStart(). Only matches requests with :authority \a + /// host + ServerBuilder& RegisterService(const grpc::string& host, + grpc::Service* service); + + /// Register a generic service. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterAsyncGenericService( + grpc::AsyncGenericService* service); + + ////////////////////////////////////////////////////////////////////////////// + // Fine control knobs + + /// Set max receive message size in bytes. + /// The default is GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH. + ServerBuilder& SetMaxReceiveMessageSize(int max_receive_message_size) { + max_receive_message_size_ = max_receive_message_size; + return *this; + } + + /// Set max send message size in bytes. + /// The default is GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH. + ServerBuilder& SetMaxSendMessageSize(int max_send_message_size) { + max_send_message_size_ = max_send_message_size; + return *this; + } + + /// \deprecated For backward compatibility. + ServerBuilder& SetMaxMessageSize(int max_message_size) { + return SetMaxReceiveMessageSize(max_message_size); + } + + /// Set the support status for compression algorithms. All algorithms are + /// enabled by default. + /// + /// Incoming calls compressed with an unsupported algorithm will fail with + /// \a GRPC_STATUS_UNIMPLEMENTED. + ServerBuilder& SetCompressionAlgorithmSupportStatus( + grpc_compression_algorithm algorithm, bool enabled); + + /// The default compression level to use for all channel calls in the + /// absence of a call-specific level. + ServerBuilder& SetDefaultCompressionLevel(grpc_compression_level level); + + /// The default compression algorithm to use for all channel calls in the + /// absence of a call-specific level. Note that it overrides any compression + /// level set by \a SetDefaultCompressionLevel. + ServerBuilder& SetDefaultCompressionAlgorithm( + grpc_compression_algorithm algorithm); + + /// Set the attached buffer pool for this server + ServerBuilder& SetResourceQuota( + const grpc_impl::ResourceQuota& resource_quota); + + ServerBuilder& SetOption(std::unique_ptr option); + + /// Options for synchronous servers. + enum SyncServerOption { + NUM_CQS, ///< Number of completion queues. + MIN_POLLERS, ///< Minimum number of polling threads. + MAX_POLLERS, ///< Maximum number of polling threads. + CQ_TIMEOUT_MSEC ///< Completion queue timeout in milliseconds. + }; + + /// Only useful if this is a Synchronous server. + ServerBuilder& SetSyncServerOption(SyncServerOption option, int value); + + /// Add a channel argument (an escape hatch to tuning core library parameters + /// directly) + template + ServerBuilder& AddChannelArgument(const grpc::string& arg, const T& value) { + return SetOption(grpc::MakeChannelArgumentOption(arg, value)); + } + + /// For internal use only: Register a ServerBuilderPlugin factory function. + static void InternalAddPluginFactory( + std::unique_ptr (*CreatePlugin)()); + + /// Enable a server workaround. Do not use unless you know what the workaround + /// does. For explanation and detailed descriptions of workarounds, see + /// doc/workarounds.md. + ServerBuilder& EnableWorkaround(grpc_workaround_list id); + + /// NOTE: class experimental_type is not part of the public API of this class. + /// TODO(yashykt): Integrate into public API when this is no longer + /// experimental. + class experimental_type { + public: + explicit experimental_type(grpc_impl::ServerBuilder* builder) + : builder_(builder) {} + + void SetInterceptorCreators( + std::vector> + interceptor_creators) { + builder_->interceptor_creators_ = std::move(interceptor_creators); + } + +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL + /// Register a generic service that uses the callback API. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterCallbackGenericService( + grpc::experimental::CallbackGenericService* service); +#endif + + enum class ExternalConnectionType { + FROM_FD = 0 // in the form of a file descriptor + }; + + /// Register an acceptor to handle the externally accepted connection in + /// grpc server. The returned acceptor can be used to pass the connection + /// to grpc server, where a channel will be created with the provided + /// server credentials. + std::unique_ptr + AddExternalConnectionAcceptor(ExternalConnectionType type, + std::shared_ptr creds); + + private: + ServerBuilder* builder_; + }; + +#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + /// Register a generic service that uses the callback API. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterCallbackGenericService( + grpc::CallbackGenericService* service); +#endif + + /// NOTE: The function experimental() is not stable public API. It is a view + /// to the experimental components of this class. It may be changed or removed + /// at any time. + experimental_type experimental() { return experimental_type(this); } + + protected: + /// Experimental, to be deprecated + struct Port { + grpc::string addr; + std::shared_ptr creds; + int* selected_port; + }; + + /// Experimental, to be deprecated + typedef std::unique_ptr HostString; + struct NamedService { + explicit NamedService(grpc::Service* s) : service(s) {} + NamedService(const grpc::string& h, grpc::Service* s) + : host(new grpc::string(h)), service(s) {} + HostString host; + grpc::Service* service; + }; + + /// Experimental, to be deprecated + std::vector ports() { return ports_; } + + /// Experimental, to be deprecated + std::vector services() { + std::vector service_refs; + for (auto& ptr : services_) { + service_refs.push_back(ptr.get()); + } + return service_refs; + } + + /// Experimental, to be deprecated + std::vector options() { + std::vector option_refs; + for (auto& ptr : options_) { + option_refs.push_back(ptr.get()); + } + return option_refs; + } + + private: + friend class ::grpc::testing::ServerBuilderPluginTest; + + struct SyncServerSettings { + SyncServerSettings() + : num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} + + /// Number of server completion queues to create to listen to incoming RPCs. + int num_cqs; + + /// Minimum number of threads per completion queue that should be listening + /// to incoming RPCs. + int min_pollers; + + /// Maximum number of threads per completion queue that can be listening to + /// incoming RPCs. + int max_pollers; + + /// The timeout for server completion queue's AsyncNext call. + int cq_timeout_msec; + }; + + int max_receive_message_size_; + int max_send_message_size_; + std::vector> options_; + std::vector> services_; + std::vector ports_; + + SyncServerSettings sync_server_settings_; + + /// List of completion queues added via \a AddCompletionQueue method. + std::vector cqs_; + + std::shared_ptr creds_; + std::vector> plugins_; + grpc_resource_quota* resource_quota_; + grpc::AsyncGenericService* generic_service_{nullptr}; +#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + grpc::CallbackGenericService* callback_generic_service_{nullptr}; +#else + grpc::experimental::CallbackGenericService* callback_generic_service_{ + nullptr}; +#endif + + struct { + bool is_set; + grpc_compression_level level; + } maybe_default_compression_level_; + struct { + bool is_set; + grpc_compression_algorithm algorithm; + } maybe_default_compression_algorithm_; + uint32_t enabled_compression_algorithms_bitset_; + std::vector< + std::unique_ptr> + interceptor_creators_; + std::vector> + acceptors_; +}; } // namespace grpc diff --git a/include/grpcpp/server_builder_impl.h b/include/grpcpp/server_builder_impl.h deleted file mode 100644 index 171f1ac6c84..00000000000 --- a/include/grpcpp/server_builder_impl.h +++ /dev/null @@ -1,418 +0,0 @@ -/* - * - * Copyright 2015-2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPCPP_SERVER_BUILDER_IMPL_H -#define GRPCPP_SERVER_BUILDER_IMPL_H - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct grpc_resource_quota; - -namespace grpc_impl { - -class CompletionQueue; -class ResourceQuota; -class Server; -class ServerCompletionQueue; -class ServerCredentials; -} // namespace grpc_impl - -namespace grpc { - -class AsyncGenericService; -class Service; -namespace testing { -class ServerBuilderPluginTest; -} // namespace testing - -namespace internal { -class ExternalConnectionAcceptorImpl; -} // namespace internal - -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL -namespace experimental { -#endif -class CallbackGenericService; -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL -} // namespace experimental -#endif - -namespace experimental { -// EXPERIMENTAL API: -// Interface for a grpc server to build transports with connections created out -// of band. -// See ServerBuilder's AddExternalConnectionAcceptor API. -class ExternalConnectionAcceptor { - public: - struct NewConnectionParameters { - int listener_fd = -1; - int fd = -1; - ByteBuffer read_buffer; // data intended for the grpc server - }; - virtual ~ExternalConnectionAcceptor() {} - // If called before grpc::Server is started or after it is shut down, the new - // connection will be closed. - virtual void HandleNewConnection(NewConnectionParameters* p) = 0; -}; - -} // namespace experimental -} // namespace grpc - -namespace grpc_impl { - -/// A builder class for the creation and startup of \a grpc::Server instances. -class ServerBuilder { - public: - ServerBuilder(); - virtual ~ServerBuilder(); - - ////////////////////////////////////////////////////////////////////////////// - // Primary API's - - /// Return a running server which is ready for processing calls. - /// Before calling, one typically needs to ensure that: - /// 1. a service is registered - so that the server knows what to serve - /// (via RegisterService, or RegisterAsyncGenericService) - /// 2. a listening port has been added - so the server knows where to receive - /// traffic (via AddListeningPort) - /// 3. [for async api only] completion queues have been added via - /// AddCompletionQueue - /// - /// Will return a nullptr on errors. - virtual std::unique_ptr BuildAndStart(); - - /// Register a service. This call does not take ownership of the service. - /// The service must exist for the lifetime of the \a Server instance returned - /// by \a BuildAndStart(). - /// Matches requests with any :authority - ServerBuilder& RegisterService(grpc::Service* service); - - /// Enlists an endpoint \a addr (port with an optional IP address) to - /// bind the \a grpc::Server object to be created to. - /// - /// It can be invoked multiple times. - /// - /// \param addr_uri The address to try to bind to the server in URI form. If - /// the scheme name is omitted, "dns:///" is assumed. To bind to any address, - /// please use IPv6 any, i.e., [::]:, which also accepts IPv4 - /// connections. Valid values include dns:///localhost:1234, / - /// 192.168.1.1:31416, dns:///[::1]:27182, etc.). - /// \param creds The credentials associated with the server. - /// \param selected_port[out] If not `nullptr`, gets populated with the port - /// number bound to the \a grpc::Server for the corresponding endpoint after - /// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort - /// does not modify this pointer. - ServerBuilder& AddListeningPort( - const grpc::string& addr_uri, - std::shared_ptr creds, - int* selected_port = nullptr); - - /// Add a completion queue for handling asynchronous services. - /// - /// Best performance is typically obtained by using one thread per polling - /// completion queue. - /// - /// Caller is required to shutdown the server prior to shutting down the - /// returned completion queue. Caller is also required to drain the - /// completion queue after shutting it down. A typical usage scenario: - /// - /// // While building the server: - /// ServerBuilder builder; - /// ... - /// cq_ = builder.AddCompletionQueue(); - /// server_ = builder.BuildAndStart(); - /// - /// // While shutting down the server; - /// server_->Shutdown(); - /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! - /// // Drain the cq_ that was created - /// void* ignored_tag; - /// bool ignored_ok; - /// while (cq_->Next(&ignored_tag, &ignored_ok)) { } - /// - /// \param is_frequently_polled This is an optional parameter to inform gRPC - /// library about whether this completion queue would be frequently polled - /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is - /// 'true' and is the recommended setting. Setting this to 'false' (i.e. - /// not polling the completion queue frequently) will have a significantly - /// negative performance impact and hence should not be used in production - /// use cases. - std::unique_ptr AddCompletionQueue( - bool is_frequently_polled = true); - - ////////////////////////////////////////////////////////////////////////////// - // Less commonly used RegisterService variants - - /// Register a service. This call does not take ownership of the service. - /// The service must exist for the lifetime of the \a Server instance - /// returned by \a BuildAndStart(). Only matches requests with :authority \a - /// host - ServerBuilder& RegisterService(const grpc::string& host, - grpc::Service* service); - - /// Register a generic service. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterAsyncGenericService( - grpc::AsyncGenericService* service); - - ////////////////////////////////////////////////////////////////////////////// - // Fine control knobs - - /// Set max receive message size in bytes. - /// The default is GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH. - ServerBuilder& SetMaxReceiveMessageSize(int max_receive_message_size) { - max_receive_message_size_ = max_receive_message_size; - return *this; - } - - /// Set max send message size in bytes. - /// The default is GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH. - ServerBuilder& SetMaxSendMessageSize(int max_send_message_size) { - max_send_message_size_ = max_send_message_size; - return *this; - } - - /// \deprecated For backward compatibility. - ServerBuilder& SetMaxMessageSize(int max_message_size) { - return SetMaxReceiveMessageSize(max_message_size); - } - - /// Set the support status for compression algorithms. All algorithms are - /// enabled by default. - /// - /// Incoming calls compressed with an unsupported algorithm will fail with - /// \a GRPC_STATUS_UNIMPLEMENTED. - ServerBuilder& SetCompressionAlgorithmSupportStatus( - grpc_compression_algorithm algorithm, bool enabled); - - /// The default compression level to use for all channel calls in the - /// absence of a call-specific level. - ServerBuilder& SetDefaultCompressionLevel(grpc_compression_level level); - - /// The default compression algorithm to use for all channel calls in the - /// absence of a call-specific level. Note that it overrides any compression - /// level set by \a SetDefaultCompressionLevel. - ServerBuilder& SetDefaultCompressionAlgorithm( - grpc_compression_algorithm algorithm); - - /// Set the attached buffer pool for this server - ServerBuilder& SetResourceQuota( - const grpc_impl::ResourceQuota& resource_quota); - - ServerBuilder& SetOption(std::unique_ptr option); - - /// Options for synchronous servers. - enum SyncServerOption { - NUM_CQS, ///< Number of completion queues. - MIN_POLLERS, ///< Minimum number of polling threads. - MAX_POLLERS, ///< Maximum number of polling threads. - CQ_TIMEOUT_MSEC ///< Completion queue timeout in milliseconds. - }; - - /// Only useful if this is a Synchronous server. - ServerBuilder& SetSyncServerOption(SyncServerOption option, int value); - - /// Add a channel argument (an escape hatch to tuning core library parameters - /// directly) - template - ServerBuilder& AddChannelArgument(const grpc::string& arg, const T& value) { - return SetOption(grpc::MakeChannelArgumentOption(arg, value)); - } - - /// For internal use only: Register a ServerBuilderPlugin factory function. - static void InternalAddPluginFactory( - std::unique_ptr (*CreatePlugin)()); - - /// Enable a server workaround. Do not use unless you know what the workaround - /// does. For explanation and detailed descriptions of workarounds, see - /// doc/workarounds.md. - ServerBuilder& EnableWorkaround(grpc_workaround_list id); - - /// NOTE: class experimental_type is not part of the public API of this class. - /// TODO(yashykt): Integrate into public API when this is no longer - /// experimental. - class experimental_type { - public: - explicit experimental_type(grpc_impl::ServerBuilder* builder) - : builder_(builder) {} - - void SetInterceptorCreators( - std::vector> - interceptor_creators) { - builder_->interceptor_creators_ = std::move(interceptor_creators); - } - -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL - /// Register a generic service that uses the callback API. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterCallbackGenericService( - grpc::experimental::CallbackGenericService* service); -#endif - - enum class ExternalConnectionType { - FROM_FD = 0 // in the form of a file descriptor - }; - - /// Register an acceptor to handle the externally accepted connection in - /// grpc server. The returned acceptor can be used to pass the connection - /// to grpc server, where a channel will be created with the provided - /// server credentials. - std::unique_ptr - AddExternalConnectionAcceptor(ExternalConnectionType type, - std::shared_ptr creds); - - private: - ServerBuilder* builder_; - }; - -#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL - /// Register a generic service that uses the callback API. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterCallbackGenericService( - grpc::CallbackGenericService* service); -#endif - - /// NOTE: The function experimental() is not stable public API. It is a view - /// to the experimental components of this class. It may be changed or removed - /// at any time. - experimental_type experimental() { return experimental_type(this); } - - protected: - /// Experimental, to be deprecated - struct Port { - grpc::string addr; - std::shared_ptr creds; - int* selected_port; - }; - - /// Experimental, to be deprecated - typedef std::unique_ptr HostString; - struct NamedService { - explicit NamedService(grpc::Service* s) : service(s) {} - NamedService(const grpc::string& h, grpc::Service* s) - : host(new grpc::string(h)), service(s) {} - HostString host; - grpc::Service* service; - }; - - /// Experimental, to be deprecated - std::vector ports() { return ports_; } - - /// Experimental, to be deprecated - std::vector services() { - std::vector service_refs; - for (auto& ptr : services_) { - service_refs.push_back(ptr.get()); - } - return service_refs; - } - - /// Experimental, to be deprecated - std::vector options() { - std::vector option_refs; - for (auto& ptr : options_) { - option_refs.push_back(ptr.get()); - } - return option_refs; - } - - private: - friend class ::grpc::testing::ServerBuilderPluginTest; - - struct SyncServerSettings { - SyncServerSettings() - : num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} - - /// Number of server completion queues to create to listen to incoming RPCs. - int num_cqs; - - /// Minimum number of threads per completion queue that should be listening - /// to incoming RPCs. - int min_pollers; - - /// Maximum number of threads per completion queue that can be listening to - /// incoming RPCs. - int max_pollers; - - /// The timeout for server completion queue's AsyncNext call. - int cq_timeout_msec; - }; - - int max_receive_message_size_; - int max_send_message_size_; - std::vector> options_; - std::vector> services_; - std::vector ports_; - - SyncServerSettings sync_server_settings_; - - /// List of completion queues added via \a AddCompletionQueue method. - std::vector cqs_; - - std::shared_ptr creds_; - std::vector> plugins_; - grpc_resource_quota* resource_quota_; - grpc::AsyncGenericService* generic_service_{nullptr}; -#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL - grpc::CallbackGenericService* callback_generic_service_{nullptr}; -#else - grpc::experimental::CallbackGenericService* callback_generic_service_{ - nullptr}; -#endif - - struct { - bool is_set; - grpc_compression_level level; - } maybe_default_compression_level_; - struct { - bool is_set; - grpc_compression_algorithm algorithm; - } maybe_default_compression_algorithm_; - uint32_t enabled_compression_algorithms_bitset_; - std::vector< - std::unique_ptr> - interceptor_creators_; - std::vector> - acceptors_; -}; - -} // namespace grpc_impl - -#endif // GRPCPP_SERVER_BUILDER_IMPL_H diff --git a/include/grpcpp/server_impl.h b/include/grpcpp/server_impl.h index 5cbfee436de..8e8690b5ce5 100644 --- a/include/grpcpp/server_impl.h +++ b/include/grpcpp/server_impl.h @@ -222,7 +222,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { } friend class grpc::AsyncGenericService; - friend class grpc_impl::ServerBuilder; + friend class ServerBuilder; friend class grpc_impl::ServerInitializer; class SyncRequest; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index d5e93476532..60fc6201d66 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -32,15 +32,15 @@ #include "src/cpp/server/external_connection_acceptor_impl.h" #include "src/cpp/server/thread_pool_interface.h" -namespace grpc_impl { +namespace grpc { -static std::vector (*)()>* +static std::vector (*)()>* g_plugin_factory_list; static gpr_once once_init_plugin_list = GPR_ONCE_INIT; static void do_plugin_list_init(void) { g_plugin_factory_list = - new std::vector (*)()>(); + new std::vector (*)()>(); } ServerBuilder::ServerBuilder() @@ -78,19 +78,19 @@ std::unique_ptr ServerBuilder::AddCompletionQueue( return std::unique_ptr(cq); } -ServerBuilder& ServerBuilder::RegisterService(grpc::Service* service) { +ServerBuilder& ServerBuilder::RegisterService(Service* service) { services_.emplace_back(new NamedService(service)); return *this; } ServerBuilder& ServerBuilder::RegisterService(const grpc::string& addr, - grpc::Service* service) { + Service* service) { services_.emplace_back(new NamedService(addr, service)); return *this; } ServerBuilder& ServerBuilder::RegisterAsyncGenericService( - grpc::AsyncGenericService* service) { + AsyncGenericService* service) { if (generic_service_ || callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -104,7 +104,7 @@ ServerBuilder& ServerBuilder::RegisterAsyncGenericService( #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL ServerBuilder& ServerBuilder::RegisterCallbackGenericService( - grpc::CallbackGenericService* service) { + CallbackGenericService* service) { if (generic_service_ || callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -117,7 +117,7 @@ ServerBuilder& ServerBuilder::RegisterCallbackGenericService( } #else ServerBuilder& ServerBuilder::experimental_type::RegisterCallbackGenericService( - grpc::experimental::CallbackGenericService* service) { + experimental::CallbackGenericService* service) { if (builder_->generic_service_ || builder_->callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -144,7 +144,7 @@ ServerBuilder::experimental_type::AddExternalConnectionAcceptor( } ServerBuilder& ServerBuilder::SetOption( - std::unique_ptr option) { + std::unique_ptr option) { options_.push_back(std::move(option)); return *this; } @@ -193,7 +193,7 @@ ServerBuilder& ServerBuilder::SetDefaultCompressionAlgorithm( } ServerBuilder& ServerBuilder::SetResourceQuota( - const grpc_impl::ResourceQuota& resource_quota) { + const ResourceQuota& resource_quota) { if (resource_quota_ != nullptr) { grpc_resource_quota_unref(resource_quota_); } @@ -204,7 +204,7 @@ ServerBuilder& ServerBuilder::SetResourceQuota( ServerBuilder& ServerBuilder::AddListeningPort( const grpc::string& addr_uri, - std::shared_ptr creds, int* selected_port) { + std::shared_ptr creds, int* selected_port) { const grpc::string uri_scheme = "dns:"; grpc::string addr = addr_uri; if (addr_uri.compare(0, uri_scheme.size(), uri_scheme) == 0) { @@ -218,7 +218,7 @@ ServerBuilder& ServerBuilder::AddListeningPort( } std::unique_ptr ServerBuilder::BuildAndStart() { - grpc::ChannelArguments args; + ChannelArguments args; for (const auto& option : options_) { option->UpdateArguments(&args); @@ -431,7 +431,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { } void ServerBuilder::InternalAddPluginFactory( - std::unique_ptr (*CreatePlugin)()) { + std::unique_ptr (*CreatePlugin)()) { gpr_once_init(&once_init_plugin_list, do_plugin_list_init); (*g_plugin_factory_list).push_back(CreatePlugin); } @@ -446,4 +446,4 @@ ServerBuilder& ServerBuilder::EnableWorkaround(grpc_workaround_list id) { } } -} // namespace grpc_impl +} // namespace grpc diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index f9fcb6142ee..44b36b3af28 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -1034,7 +1034,6 @@ include/grpcpp/security/server_credentials_impl.h \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ -include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 613e824f4d7..4d814499176 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1034,7 +1034,6 @@ include/grpcpp/security/server_credentials_impl.h \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ -include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ From ac68bf72b6db760065310a847c6b53d8cbf623b9 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 10 Jun 2020 23:00:45 -0700 Subject: [PATCH 048/239] Move HealthCheckInterface from ::grpc_impl to ::grpc Revert #18371 --- BUILD | 1 - BUILD.gn | 1 - CMakeLists.txt | 2 - Makefile | 2 - .../grpcpp/health_check_service_interface.h | 39 +++++++++---- .../health_check_service_interface_impl.h | 55 ------------------- src/cpp/server/health/health_check_service.cc | 6 +- tools/doxygen/Doxyfile.c++ | 1 - tools/doxygen/Doxyfile.c++.internal | 1 - 9 files changed, 31 insertions(+), 77 deletions(-) delete mode 100644 include/grpcpp/health_check_service_interface_impl.h diff --git a/BUILD b/BUILD index 0d2a7ca058c..c47bb757799 100644 --- a/BUILD +++ b/BUILD @@ -233,7 +233,6 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/generic/generic_stub_impl.h", "include/grpcpp/grpcpp.h", "include/grpcpp/health_check_service_interface.h", - "include/grpcpp/health_check_service_interface_impl.h", "include/grpcpp/impl/call.h", "include/grpcpp/impl/channel_argument_option.h", "include/grpcpp/impl/client_unary_call.h", diff --git a/BUILD.gn b/BUILD.gn index a16d298f1be..1c0f07f61f0 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1100,7 +1100,6 @@ config("grpc_config") { "include/grpcpp/generic/generic_stub_impl.h", "include/grpcpp/grpcpp.h", "include/grpcpp/health_check_service_interface.h", - "include/grpcpp/health_check_service_interface_impl.h", "include/grpcpp/impl/call.h", "include/grpcpp/impl/channel_argument_option.h", "include/grpcpp/impl/client_unary_call.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 323f7800627..72ccbcb9777 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2662,7 +2662,6 @@ foreach(_hdr include/grpcpp/generic/generic_stub_impl.h include/grpcpp/grpcpp.h include/grpcpp/health_check_service_interface.h - include/grpcpp/health_check_service_interface_impl.h include/grpcpp/impl/call.h include/grpcpp/impl/channel_argument_option.h include/grpcpp/impl/client_unary_call.h @@ -3356,7 +3355,6 @@ foreach(_hdr include/grpcpp/generic/generic_stub_impl.h include/grpcpp/grpcpp.h include/grpcpp/health_check_service_interface.h - include/grpcpp/health_check_service_interface_impl.h include/grpcpp/impl/call.h include/grpcpp/impl/channel_argument_option.h include/grpcpp/impl/client_unary_call.h diff --git a/Makefile b/Makefile index bbaccc44513..19b0eb2295a 100644 --- a/Makefile +++ b/Makefile @@ -4858,7 +4858,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/generic/generic_stub_impl.h \ include/grpcpp/grpcpp.h \ include/grpcpp/health_check_service_interface.h \ - include/grpcpp/health_check_service_interface_impl.h \ include/grpcpp/impl/call.h \ include/grpcpp/impl/channel_argument_option.h \ include/grpcpp/impl/client_unary_call.h \ @@ -5557,7 +5556,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/generic/generic_stub_impl.h \ include/grpcpp/grpcpp.h \ include/grpcpp/health_check_service_interface.h \ - include/grpcpp/health_check_service_interface_impl.h \ include/grpcpp/impl/call.h \ include/grpcpp/impl/channel_argument_option.h \ include/grpcpp/impl/client_unary_call.h \ diff --git a/include/grpcpp/health_check_service_interface.h b/include/grpcpp/health_check_service_interface.h index a51b0d18bba..dfd4c3983af 100644 --- a/include/grpcpp/health_check_service_interface.h +++ b/include/grpcpp/health_check_service_interface.h @@ -1,6 +1,6 @@ /* * - * Copyright 2019 gRPC authors. + * Copyright 2016 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,22 +19,39 @@ #ifndef GRPCPP_HEALTH_CHECK_SERVICE_INTERFACE_H #define GRPCPP_HEALTH_CHECK_SERVICE_INTERFACE_H -#include +#include namespace grpc { const char kHealthCheckServiceInterfaceArg[] = "grpc.health_check_service_interface"; -typedef ::grpc_impl::HealthCheckServiceInterface HealthCheckServiceInterface; - -static inline void EnableDefaultHealthCheckService(bool enable) { - ::grpc_impl::EnableDefaultHealthCheckService(enable); -} - -static inline bool DefaultHealthCheckServiceEnabled() { - return ::grpc_impl::DefaultHealthCheckServiceEnabled(); -} +/// The gRPC server uses this interface to expose the health checking service +/// without depending on protobuf. +class HealthCheckServiceInterface { + public: + virtual ~HealthCheckServiceInterface() {} + + /// Set or change the serving status of the given \a service_name. + virtual void SetServingStatus(const grpc::string& service_name, + bool serving) = 0; + /// Apply to all registered service names. + virtual void SetServingStatus(bool serving) = 0; + + /// Set all registered service names to not serving and prevent future + /// state changes. + virtual void Shutdown() {} +}; + +/// Enable/disable the default health checking service. This applies to all C++ +/// servers created afterwards. For each server, user can override the default +/// with a HealthCheckServiceServerBuilderOption. +/// NOT thread safe. +void EnableDefaultHealthCheckService(bool enable); + +/// Returns whether the default health checking service is enabled. +/// NOT thread safe. +bool DefaultHealthCheckServiceEnabled(); } // namespace grpc diff --git a/include/grpcpp/health_check_service_interface_impl.h b/include/grpcpp/health_check_service_interface_impl.h deleted file mode 100644 index 025dadb4e59..00000000000 --- a/include/grpcpp/health_check_service_interface_impl.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPCPP_HEALTH_CHECK_SERVICE_INTERFACE_IMPL_H -#define GRPCPP_HEALTH_CHECK_SERVICE_INTERFACE_IMPL_H - -#include - -namespace grpc_impl { - -/// The gRPC server uses this interface to expose the health checking service -/// without depending on protobuf. -class HealthCheckServiceInterface { - public: - virtual ~HealthCheckServiceInterface() {} - - /// Set or change the serving status of the given \a service_name. - virtual void SetServingStatus(const grpc::string& service_name, - bool serving) = 0; - /// Apply to all registered service names. - virtual void SetServingStatus(bool serving) = 0; - - /// Set all registered service names to not serving and prevent future - /// state changes. - virtual void Shutdown() {} -}; - -/// Enable/disable the default health checking service. This applies to all C++ -/// servers created afterwards. For each server, user can override the default -/// with a HealthCheckServiceServerBuilderOption. -/// NOT thread safe. -void EnableDefaultHealthCheckService(bool enable); - -/// Returns whether the default health checking service is enabled. -/// NOT thread safe. -bool DefaultHealthCheckServiceEnabled(); - -} // namespace grpc_impl - -#endif // GRPCPP_HEALTH_CHECK_SERVICE_INTERFACE_IMPL_H diff --git a/src/cpp/server/health/health_check_service.cc b/src/cpp/server/health/health_check_service.cc index ca0b49a1ae8..a0fa2d62f58 100644 --- a/src/cpp/server/health/health_check_service.cc +++ b/src/cpp/server/health/health_check_service.cc @@ -16,9 +16,9 @@ * */ -#include +#include -namespace grpc_impl { +namespace grpc { namespace { bool g_grpc_default_health_check_service_enabled = false; } // namespace @@ -31,4 +31,4 @@ void EnableDefaultHealthCheckService(bool enable) { g_grpc_default_health_check_service_enabled = enable; } -} // namespace grpc_impl +} // namespace grpc diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index f9fcb6142ee..d97d243e2c1 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -948,7 +948,6 @@ include/grpcpp/generic/generic_stub.h \ include/grpcpp/generic/generic_stub_impl.h \ include/grpcpp/grpcpp.h \ include/grpcpp/health_check_service_interface.h \ -include/grpcpp/health_check_service_interface_impl.h \ include/grpcpp/impl/call.h \ include/grpcpp/impl/channel_argument_option.h \ include/grpcpp/impl/client_unary_call.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 613e824f4d7..38ce6ca8494 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -948,7 +948,6 @@ include/grpcpp/generic/generic_stub.h \ include/grpcpp/generic/generic_stub_impl.h \ include/grpcpp/grpcpp.h \ include/grpcpp/health_check_service_interface.h \ -include/grpcpp/health_check_service_interface_impl.h \ include/grpcpp/impl/call.h \ include/grpcpp/impl/channel_argument_option.h \ include/grpcpp/impl/client_unary_call.h \ From 83ad5a4567adb3140328a9eabd13b3c05db9345b Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 11 Jun 2020 10:53:17 -0700 Subject: [PATCH 049/239] Cleanup |ssl_bytes_remaining| per Yang's comments. --- src/core/tsi/ssl_transport_security.cc | 38 +++++++++++++++++--------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 3e6f0bb9dd2..7f3295ccee9 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1410,6 +1410,8 @@ static void ssl_handshaker_destroy(tsi_handshaker* self) { gpr_free(impl); } +// Removes the bytes remaining in |impl->SSL|'s read BIO and writes them to +// |bytes_remaining|. static tsi_result ssl_bytes_remaining(tsi_ssl_handshaker* impl, unsigned char** bytes_remaining, size_t* bytes_remaining_size) { @@ -1417,19 +1419,25 @@ static tsi_result ssl_bytes_remaining(tsi_ssl_handshaker* impl, bytes_remaining_size == nullptr) { return TSI_INVALID_ARGUMENT; } - tsi_result result = TSI_OK; - size_t counter = 0; - size_t bytes_in_ssl_buffer = BIO_pending(SSL_get_rbio(impl->ssl)); - if (bytes_in_ssl_buffer == 0) return TSI_OK; - *bytes_remaining = static_cast(gpr_malloc(bytes_in_ssl_buffer)); - int read_success = 1; - while (read_success > 0 && counter < bytes_in_ssl_buffer) { - read_success = - BIO_read(SSL_get_rbio(impl->ssl), *bytes_remaining + counter, 1); - if (read_success == 1) counter += 1; - } - *bytes_remaining_size = counter; - return result; + // Atempt to read all of the bytes in SSL's read BIO. These bytes should + // contain (encrypted) application data that was appended to a ClientFinished + // or ServerFinished record. + size_t bytes_in_ssl = BIO_pending(SSL_get_rbio(impl->ssl)); + if (bytes_in_ssl == 0) return TSI_OK; + *bytes_remaining = static_cast(gpr_malloc(bytes_in_ssl)); + int bytes_read = + BIO_read(SSL_get_rbio(impl->ssl), *bytes_remaining, bytes_in_ssl); + // If an unexpected number of bytes were read, return an error status and free + // all of the bytes that were read. + if (bytes_read != bytes_in_ssl) { + gpr_log(GPR_INFO, + "Failed to read the expected number of bytes from SSL object."); + gpr_free(*bytes_remaining); + *bytes_remaining = nullptr; + return TSI_INTERNAL_ERROR; + } + *bytes_remaining_size = bytes_read; + return TSI_OK; } static tsi_result ssl_handshaker_next( @@ -1472,6 +1480,10 @@ static tsi_result ssl_handshaker_next( if (ssl_handshaker_get_result(impl) == TSI_HANDSHAKE_IN_PROGRESS) { *handshaker_result = nullptr; } else { + // In TLS 1.3, the ClientFinished or ServerFinished record may have + // (encrypted) application data appended to the end of the record. In TLS + // 1.2, this is explicitly disallowed by the RFC; application data will + // never be appended to a handshake record. unsigned char* unused_bytes = nullptr; size_t unused_bytes_size = 0; status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size); From 7d0ae9cf2e2dc84146bb171ad2805772b2ddb59e Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 11 Jun 2020 11:29:24 -0700 Subject: [PATCH 050/239] Check unused bytes size is smaller than received bytes size, and fix Python format in _server_ssl_cert_config_test.py --- src/core/tsi/ssl_transport_security.cc | 4 + .../unit/_server_ssl_cert_config_test.py | 826 +++++++++--------- 2 files changed, 424 insertions(+), 406 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 7f3295ccee9..4f2e8ec4d91 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1488,6 +1488,10 @@ static tsi_result ssl_handshaker_next( size_t unused_bytes_size = 0; status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size); if (status != TSI_OK) return status; + if (unused_bytes_size > received_bytes_size) { + gpr_log(GPR_INFO, "More unused bytes than received bytes."); + return TSI_INTERNAL_ERROR; + } status = ssl_handshaker_result_create(impl, unused_bytes, unused_bytes_size, handshaker_result); if (status == TSI_OK) { diff --git a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py index 6129db62742..f23860e45cd 100644 --- a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py +++ b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py @@ -50,20 +50,24 @@ CA_1_PEM = resources.cert_hier_1_root_ca_cert() CA_2_PEM = resources.cert_hier_2_root_ca_cert() CLIENT_KEY_1_PEM = resources.cert_hier_1_client_1_key() -CLIENT_CERT_CHAIN_1_PEM = (resources.cert_hier_1_client_1_cert() + - resources.cert_hier_1_intermediate_ca_cert()) +CLIENT_CERT_CHAIN_1_PEM = ( + resources.cert_hier_1_client_1_cert() + + resources.cert_hier_1_intermediate_ca_cert()) CLIENT_KEY_2_PEM = resources.cert_hier_2_client_1_key() -CLIENT_CERT_CHAIN_2_PEM = (resources.cert_hier_2_client_1_cert() + - resources.cert_hier_2_intermediate_ca_cert()) +CLIENT_CERT_CHAIN_2_PEM = ( + resources.cert_hier_2_client_1_cert() + + resources.cert_hier_2_intermediate_ca_cert()) SERVER_KEY_1_PEM = resources.cert_hier_1_server_1_key() -SERVER_CERT_CHAIN_1_PEM = (resources.cert_hier_1_server_1_cert() + - resources.cert_hier_1_intermediate_ca_cert()) +SERVER_CERT_CHAIN_1_PEM = ( + resources.cert_hier_1_server_1_cert() + + resources.cert_hier_1_intermediate_ca_cert()) SERVER_KEY_2_PEM = resources.cert_hier_2_server_1_key() -SERVER_CERT_CHAIN_2_PEM = (resources.cert_hier_2_server_1_cert() + - resources.cert_hier_2_intermediate_ca_cert()) +SERVER_CERT_CHAIN_2_PEM = ( + resources.cert_hier_2_server_1_cert() + + resources.cert_hier_2_intermediate_ca_cert()) # for use with the CertConfigFetcher. Roughly a simple custom mock # implementation @@ -71,326 +75,334 @@ Call = collections.namedtuple('Call', ['did_raise', 'returned_cert_config']) def _create_channel(port, credentials): - return grpc.secure_channel('localhost:{}'.format(port), credentials) + return grpc.secure_channel('localhost:{}'.format(port), credentials) def _create_client_stub(channel, expect_success): - if expect_success: - # per Nathaniel: there's some robustness issue if we start - # using a channel without waiting for it to be actually ready - grpc.channel_ready_future(channel).result(timeout=10) - return services_pb2_grpc.FirstServiceStub(channel) + if expect_success: + # per Nathaniel: there's some robustness issue if we start + # using a channel without waiting for it to be actually ready + grpc.channel_ready_future(channel).result(timeout=10) + return services_pb2_grpc.FirstServiceStub(channel) class CertConfigFetcher(object): - def __init__(self): - self._lock = threading.Lock() - self._calls = [] - self._should_raise = False - self._cert_config = None - - def reset(self): - with self._lock: - self._calls = [] - self._should_raise = False - self._cert_config = None - - def configure(self, should_raise, cert_config): - assert not (should_raise and cert_config), ( - "should not specify both should_raise and a cert_config at the same time" - ) - with self._lock: - self._should_raise = should_raise - self._cert_config = cert_config - - def getCalls(self): - with self._lock: - return self._calls - - def __call__(self): - with self._lock: - if self._should_raise: - self._calls.append(Call(True, None)) - raise ValueError('just for fun, should not affect the test') - else: - self._calls.append(Call(False, self._cert_config)) - return self._cert_config + def __init__(self): + self._lock = threading.Lock() + self._calls = [] + self._should_raise = False + self._cert_config = None + + def reset(self): + with self._lock: + self._calls = [] + self._should_raise = False + self._cert_config = None + + def configure(self, should_raise, cert_config): + assert not (should_raise and cert_config), ( + 'should not specify both should_raise and a cert_config at the same time' + ) + with self._lock: + self._should_raise = should_raise + self._cert_config = cert_config + + def getCalls(self): + with self._lock: + return self._calls + + def __call__(self): + with self._lock: + if self._should_raise: + self._calls.append(Call(True, None)) + raise ValueError('just for fun, should not affect the test') + else: + self._calls.append(Call(False, self._cert_config)) + return self._cert_config class _ServerSSLCertReloadTest( - six.with_metaclass(abc.ABCMeta, unittest.TestCase)): - - def __init__(self, *args, **kwargs): - super(_ServerSSLCertReloadTest, self).__init__(*args, **kwargs) - self.server = None - self.port = None - - @abc.abstractmethod - def require_client_auth(self): - raise NotImplementedError() - - def setUp(self): - self.server = test_common.test_server() - services_pb2_grpc.add_FirstServiceServicer_to_server( - _server_application.FirstServiceServicer(), self.server) - switch_cert_on_client_num = 10 - initial_cert_config = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_1_PEM, SERVER_CERT_CHAIN_1_PEM)], - root_certificates=CA_2_PEM) - self.cert_config_fetcher = CertConfigFetcher() - server_credentials = grpc.dynamic_ssl_server_credentials( - initial_cert_config, - self.cert_config_fetcher, - require_client_authentication=self.require_client_auth()) - self.port = self.server.add_secure_port('[::]:0', server_credentials) - self.server.start() - - def tearDown(self): - if self.server: - self.server.stop(None) - - def _perform_rpc(self, client_stub, expect_success): - # we don't care about the actual response of the rpc; only - # whether we can perform it or not, and if not, the status - # code must be UNAVAILABLE - request = _application_common.UNARY_UNARY_REQUEST - if expect_success: - response = client_stub.UnUn(request) - self.assertEqual(response, _application_common.UNARY_UNARY_RESPONSE) - else: - with self.assertRaises(grpc.RpcError) as exception_context: - client_stub.UnUn(request) - # If TLS 1.2 is used, then the client receives an alert message - # before the handshake is complete, so the status is UNAVAILABLE. If - # TLS 1.3 is used, then the client receives the alert message after - # the handshake is complete, so the TSI handshaker returns the - # TSI_PROTOCOL_FAILURE result. This result does not have a - # corresponding status code, so this yields an UNKNOWN status. - self.assertTrue( - exception_context.exception.code() in [ - grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) - - def _do_one_shot_client_rpc(self, - expect_success, - root_certificates=None, - private_key=None, - certificate_chain=None): - credentials = grpc.ssl_channel_credentials( - root_certificates=root_certificates, - private_key=private_key, - certificate_chain=certificate_chain) - with _create_channel(self.port, credentials) as client_channel: - client_stub = _create_client_stub(client_channel, expect_success) - self._perform_rpc(client_stub, expect_success) - - def _test(self): - # things should work... - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc(True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # client should reject server... - # fails because client trusts ca2 and so will reject server - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc(False, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) - - # should work again... - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(True, None) - self._do_one_shot_client_rpc(True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertTrue(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # if with_client_auth, then client should be rejected by - # server because client uses key/cert1, but server trusts ca2, - # so server will reject - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc(not self.require_client_auth(), - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) - - # should work again... - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc(True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # now create the "persistent" clients - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - channel_A = _create_channel( - self.port, - grpc.ssl_channel_credentials( - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM)) - persistent_client_stub_A = _create_client_stub(channel_A, True) - self._perform_rpc(persistent_client_stub_A, True) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - channel_B = _create_channel( - self.port, - grpc.ssl_channel_credentials( - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM)) - persistent_client_stub_B = _create_client_stub(channel_B, True) - self._perform_rpc(persistent_client_stub_B, True) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # moment of truth!! client should reject server because the - # server switch cert... - cert_config = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], - root_certificates=CA_1_PEM) - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, cert_config) - self._do_one_shot_client_rpc(False, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertEqual(call.returned_cert_config, cert_config, - 'i= {}'.format(i)) - - # now should work again... - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc(True, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # client should be rejected by server if with_client_auth - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc(not self.require_client_auth(), - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) - - # here client should reject server... - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc(False, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) - - # persistent clients should continue to work - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._perform_rpc(persistent_client_stub_A, True) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 0) - - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._perform_rpc(persistent_client_stub_B, True) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 0) - - channel_A.close() - channel_B.close() + six.with_metaclass(abc.ABCMeta, unittest.TestCase)): + + def __init__(self, *args, **kwargs): + super(_ServerSSLCertReloadTest, self).__init__(*args, **kwargs) + self.server = None + self.port = None + + @abc.abstractmethod + def require_client_auth(self): + raise NotImplementedError() + + def setUp(self): + self.server = test_common.test_server() + services_pb2_grpc.add_FirstServiceServicer_to_server( + _server_application.FirstServiceServicer(), self.server) + switch_cert_on_client_num = 10 + initial_cert_config = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_1_PEM, SERVER_CERT_CHAIN_1_PEM)], + root_certificates=CA_2_PEM) + self.cert_config_fetcher = CertConfigFetcher() + server_credentials = grpc.dynamic_ssl_server_credentials( + initial_cert_config, + self.cert_config_fetcher, + require_client_authentication=self.require_client_auth()) + self.port = self.server.add_secure_port('[::]:0', server_credentials) + self.server.start() + + def tearDown(self): + if self.server: + self.server.stop(None) + + def _perform_rpc(self, client_stub, expect_success): + # we don't care about the actual response of the rpc; only + # whether we can perform it or not, and if not, the status + # code must be UNAVAILABLE + request = _application_common.UNARY_UNARY_REQUEST + if expect_success: + response = client_stub.UnUn(request) + self.assertEqual(response, _application_common.UNARY_UNARY_RESPONSE) + else: + with self.assertRaises(grpc.RpcError) as exception_context: + client_stub.UnUn(request) + # If TLS 1.2 is used, then the client receives an alert message + # before the handshake is complete, so the status is UNAVAILABLE. If + # TLS 1.3 is used, then the client receives the alert message after + # the handshake is complete, so the TSI handshaker returns the + # TSI_PROTOCOL_FAILURE result. This result does not have a + # corresponding status code, so this yields an UNKNOWN status. + self.assertTrue(exception_context.exception.code() in + [grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) + + def _do_one_shot_client_rpc(self, + expect_success, + root_certificates=None, + private_key=None, + certificate_chain=None): + credentials = grpc.ssl_channel_credentials( + root_certificates=root_certificates, + private_key=private_key, + certificate_chain=certificate_chain) + with _create_channel(self.port, credentials) as client_channel: + client_stub = _create_client_stub(client_channel, expect_success) + self._perform_rpc(client_stub, expect_success) + + def _test(self): + # things should work... + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc( + True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # client should reject server... + # fails because client trusts ca2 and so will reject server + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc( + False, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) + + # should work again... + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(True, None) + self._do_one_shot_client_rpc( + True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertTrue(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # if with_client_auth, then client should be rejected by + # server because client uses key/cert1, but server trusts ca2, + # so server will reject + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc( + not self.require_client_auth(), + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) + + # should work again... + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc( + True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # now create the "persistent" clients + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + channel_A = _create_channel( + self.port, + grpc.ssl_channel_credentials( + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM)) + persistent_client_stub_A = _create_client_stub(channel_A, True) + self._perform_rpc(persistent_client_stub_A, True) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + channel_B = _create_channel( + self.port, + grpc.ssl_channel_credentials( + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM)) + persistent_client_stub_B = _create_client_stub(channel_B, True) + self._perform_rpc(persistent_client_stub_B, True) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # moment of truth!! client should reject server because the + # server switch cert... + cert_config = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], + root_certificates=CA_1_PEM) + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, cert_config) + self._do_one_shot_client_rpc( + False, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertEqual(call.returned_cert_config, cert_config, + 'i= {}'.format(i)) + + # now should work again... + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc( + True, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # client should be rejected by server if with_client_auth + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc( + not self.require_client_auth(), + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) + + # here client should reject server... + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc( + False, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) + + # persistent clients should continue to work + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._perform_rpc(persistent_client_stub_A, True) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 0) + + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._perform_rpc(persistent_client_stub_B, True) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 0) + + channel_A.close() + channel_B.close() class ServerSSLCertConfigFetcherParamsChecks(unittest.TestCase): - def test_check_on_initial_config(self): - with self.assertRaises(TypeError): - grpc.dynamic_ssl_server_credentials(None, str) - with self.assertRaises(TypeError): - grpc.dynamic_ssl_server_credentials(1, str) + def test_check_on_initial_config(self): + with self.assertRaises(TypeError): + grpc.dynamic_ssl_server_credentials(None, str) + with self.assertRaises(TypeError): + grpc.dynamic_ssl_server_credentials(1, str) - def test_check_on_config_fetcher(self): - cert_config = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], - root_certificates=CA_1_PEM) - with self.assertRaises(TypeError): - grpc.dynamic_ssl_server_credentials(cert_config, None) - with self.assertRaises(TypeError): - grpc.dynamic_ssl_server_credentials(cert_config, 1) + def test_check_on_config_fetcher(self): + cert_config = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], + root_certificates=CA_1_PEM) + with self.assertRaises(TypeError): + grpc.dynamic_ssl_server_credentials(cert_config, None) + with self.assertRaises(TypeError): + grpc.dynamic_ssl_server_credentials(cert_config, 1) class ServerSSLCertReloadTestWithClientAuth(_ServerSSLCertReloadTest): - def require_client_auth(self): - return True + def require_client_auth(self): + return True - test = _ServerSSLCertReloadTest._test + test = _ServerSSLCertReloadTest._test class ServerSSLCertReloadTestWithoutClientAuth(_ServerSSLCertReloadTest): - def require_client_auth(self): - return False + def require_client_auth(self): + return False - test = _ServerSSLCertReloadTest._test + test = _ServerSSLCertReloadTest._test class ServerSSLCertReloadTestCertConfigReuse(_ServerSSLCertReloadTest): - """Ensures that `ServerCertificateConfiguration` instances can be reused. + """Ensures that `ServerCertificateConfiguration` instances can be reused. Because gRPC Core takes ownership of the `grpc_ssl_server_certificate_config` encapsulated by @@ -401,112 +413,114 @@ class ServerSSLCertReloadTestCertConfigReuse(_ServerSSLCertReloadTest): re-used by user application. """ - def require_client_auth(self): - return True - - def setUp(self): - self.server = test_common.test_server() - services_pb2_grpc.add_FirstServiceServicer_to_server( - _server_application.FirstServiceServicer(), self.server) - self.cert_config_A = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_1_PEM, SERVER_CERT_CHAIN_1_PEM)], - root_certificates=CA_2_PEM) - self.cert_config_B = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], - root_certificates=CA_1_PEM) - self.cert_config_fetcher = CertConfigFetcher() - server_credentials = grpc.dynamic_ssl_server_credentials( - self.cert_config_A, - self.cert_config_fetcher, - require_client_authentication=True) - self.port = self.server.add_secure_port('[::]:0', server_credentials) - self.server.start() - - def test_cert_config_reuse(self): - - # succeed with A - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_A) - self._do_one_shot_client_rpc(True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertEqual(actual_calls[0].returned_cert_config, - self.cert_config_A) - - # fail with A - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_A) - self._do_one_shot_client_rpc(False, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertEqual(call.returned_cert_config, self.cert_config_A, - 'i= {}'.format(i)) - - # succeed again with A - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_A) - self._do_one_shot_client_rpc(True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertEqual(actual_calls[0].returned_cert_config, - self.cert_config_A) - - # succeed with B - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_B) - self._do_one_shot_client_rpc(True, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertEqual(actual_calls[0].returned_cert_config, - self.cert_config_B) - - # fail with B - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_B) - self._do_one_shot_client_rpc(False, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertEqual(call.returned_cert_config, self.cert_config_B, - 'i= {}'.format(i)) - - # succeed again with B - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_B) - self._do_one_shot_client_rpc(True, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertEqual(actual_calls[0].returned_cert_config, - self.cert_config_B) + def require_client_auth(self): + return True + + def setUp(self): + self.server = test_common.test_server() + services_pb2_grpc.add_FirstServiceServicer_to_server( + _server_application.FirstServiceServicer(), self.server) + self.cert_config_A = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_1_PEM, SERVER_CERT_CHAIN_1_PEM)], + root_certificates=CA_2_PEM) + self.cert_config_B = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], + root_certificates=CA_1_PEM) + self.cert_config_fetcher = CertConfigFetcher() + server_credentials = grpc.dynamic_ssl_server_credentials( + self.cert_config_A, + self.cert_config_fetcher, + require_client_authentication=True) + self.port = self.server.add_secure_port('[::]:0', server_credentials) + self.server.start() + + def test_cert_config_reuse(self): + + # succeed with A + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_A) + self._do_one_shot_client_rpc( + True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertEqual(actual_calls[0].returned_cert_config, self.cert_config_A) + + # fail with A + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_A) + self._do_one_shot_client_rpc( + False, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertEqual(call.returned_cert_config, self.cert_config_A, + 'i= {}'.format(i)) + + # succeed again with A + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_A) + self._do_one_shot_client_rpc( + True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertEqual(actual_calls[0].returned_cert_config, self.cert_config_A) + + # succeed with B + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_B) + self._do_one_shot_client_rpc( + True, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertEqual(actual_calls[0].returned_cert_config, self.cert_config_B) + + # fail with B + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_B) + self._do_one_shot_client_rpc( + False, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertEqual(call.returned_cert_config, self.cert_config_B, + 'i= {}'.format(i)) + + # succeed again with B + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_B) + self._do_one_shot_client_rpc( + True, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertEqual(actual_calls[0].returned_cert_config, self.cert_config_B) if __name__ == '__main__': - logging.basicConfig() - unittest.main(verbosity=2) + logging.basicConfig() + unittest.main(verbosity=2) From 264592275b8145dce878c571b1f462776e9988d2 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 11 Jun 2020 11:30:22 -0700 Subject: [PATCH 051/239] Revert "Check unused bytes size is smaller than received bytes size, and fix Python format in _server_ssl_cert_config_test.py" This reverts commit 7d0ae9cf2e2dc84146bb171ad2805772b2ddb59e. --- src/core/tsi/ssl_transport_security.cc | 4 - .../unit/_server_ssl_cert_config_test.py | 826 +++++++++--------- 2 files changed, 406 insertions(+), 424 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 4f2e8ec4d91..7f3295ccee9 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1488,10 +1488,6 @@ static tsi_result ssl_handshaker_next( size_t unused_bytes_size = 0; status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size); if (status != TSI_OK) return status; - if (unused_bytes_size > received_bytes_size) { - gpr_log(GPR_INFO, "More unused bytes than received bytes."); - return TSI_INTERNAL_ERROR; - } status = ssl_handshaker_result_create(impl, unused_bytes, unused_bytes_size, handshaker_result); if (status == TSI_OK) { diff --git a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py index f23860e45cd..6129db62742 100644 --- a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py +++ b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py @@ -50,24 +50,20 @@ CA_1_PEM = resources.cert_hier_1_root_ca_cert() CA_2_PEM = resources.cert_hier_2_root_ca_cert() CLIENT_KEY_1_PEM = resources.cert_hier_1_client_1_key() -CLIENT_CERT_CHAIN_1_PEM = ( - resources.cert_hier_1_client_1_cert() + - resources.cert_hier_1_intermediate_ca_cert()) +CLIENT_CERT_CHAIN_1_PEM = (resources.cert_hier_1_client_1_cert() + + resources.cert_hier_1_intermediate_ca_cert()) CLIENT_KEY_2_PEM = resources.cert_hier_2_client_1_key() -CLIENT_CERT_CHAIN_2_PEM = ( - resources.cert_hier_2_client_1_cert() + - resources.cert_hier_2_intermediate_ca_cert()) +CLIENT_CERT_CHAIN_2_PEM = (resources.cert_hier_2_client_1_cert() + + resources.cert_hier_2_intermediate_ca_cert()) SERVER_KEY_1_PEM = resources.cert_hier_1_server_1_key() -SERVER_CERT_CHAIN_1_PEM = ( - resources.cert_hier_1_server_1_cert() + - resources.cert_hier_1_intermediate_ca_cert()) +SERVER_CERT_CHAIN_1_PEM = (resources.cert_hier_1_server_1_cert() + + resources.cert_hier_1_intermediate_ca_cert()) SERVER_KEY_2_PEM = resources.cert_hier_2_server_1_key() -SERVER_CERT_CHAIN_2_PEM = ( - resources.cert_hier_2_server_1_cert() + - resources.cert_hier_2_intermediate_ca_cert()) +SERVER_CERT_CHAIN_2_PEM = (resources.cert_hier_2_server_1_cert() + + resources.cert_hier_2_intermediate_ca_cert()) # for use with the CertConfigFetcher. Roughly a simple custom mock # implementation @@ -75,334 +71,326 @@ Call = collections.namedtuple('Call', ['did_raise', 'returned_cert_config']) def _create_channel(port, credentials): - return grpc.secure_channel('localhost:{}'.format(port), credentials) + return grpc.secure_channel('localhost:{}'.format(port), credentials) def _create_client_stub(channel, expect_success): - if expect_success: - # per Nathaniel: there's some robustness issue if we start - # using a channel without waiting for it to be actually ready - grpc.channel_ready_future(channel).result(timeout=10) - return services_pb2_grpc.FirstServiceStub(channel) + if expect_success: + # per Nathaniel: there's some robustness issue if we start + # using a channel without waiting for it to be actually ready + grpc.channel_ready_future(channel).result(timeout=10) + return services_pb2_grpc.FirstServiceStub(channel) class CertConfigFetcher(object): - def __init__(self): - self._lock = threading.Lock() - self._calls = [] - self._should_raise = False - self._cert_config = None - - def reset(self): - with self._lock: - self._calls = [] - self._should_raise = False - self._cert_config = None - - def configure(self, should_raise, cert_config): - assert not (should_raise and cert_config), ( - 'should not specify both should_raise and a cert_config at the same time' - ) - with self._lock: - self._should_raise = should_raise - self._cert_config = cert_config - - def getCalls(self): - with self._lock: - return self._calls - - def __call__(self): - with self._lock: - if self._should_raise: - self._calls.append(Call(True, None)) - raise ValueError('just for fun, should not affect the test') - else: - self._calls.append(Call(False, self._cert_config)) - return self._cert_config + def __init__(self): + self._lock = threading.Lock() + self._calls = [] + self._should_raise = False + self._cert_config = None + + def reset(self): + with self._lock: + self._calls = [] + self._should_raise = False + self._cert_config = None + + def configure(self, should_raise, cert_config): + assert not (should_raise and cert_config), ( + "should not specify both should_raise and a cert_config at the same time" + ) + with self._lock: + self._should_raise = should_raise + self._cert_config = cert_config + + def getCalls(self): + with self._lock: + return self._calls + + def __call__(self): + with self._lock: + if self._should_raise: + self._calls.append(Call(True, None)) + raise ValueError('just for fun, should not affect the test') + else: + self._calls.append(Call(False, self._cert_config)) + return self._cert_config class _ServerSSLCertReloadTest( - six.with_metaclass(abc.ABCMeta, unittest.TestCase)): - - def __init__(self, *args, **kwargs): - super(_ServerSSLCertReloadTest, self).__init__(*args, **kwargs) - self.server = None - self.port = None - - @abc.abstractmethod - def require_client_auth(self): - raise NotImplementedError() - - def setUp(self): - self.server = test_common.test_server() - services_pb2_grpc.add_FirstServiceServicer_to_server( - _server_application.FirstServiceServicer(), self.server) - switch_cert_on_client_num = 10 - initial_cert_config = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_1_PEM, SERVER_CERT_CHAIN_1_PEM)], - root_certificates=CA_2_PEM) - self.cert_config_fetcher = CertConfigFetcher() - server_credentials = grpc.dynamic_ssl_server_credentials( - initial_cert_config, - self.cert_config_fetcher, - require_client_authentication=self.require_client_auth()) - self.port = self.server.add_secure_port('[::]:0', server_credentials) - self.server.start() - - def tearDown(self): - if self.server: - self.server.stop(None) - - def _perform_rpc(self, client_stub, expect_success): - # we don't care about the actual response of the rpc; only - # whether we can perform it or not, and if not, the status - # code must be UNAVAILABLE - request = _application_common.UNARY_UNARY_REQUEST - if expect_success: - response = client_stub.UnUn(request) - self.assertEqual(response, _application_common.UNARY_UNARY_RESPONSE) - else: - with self.assertRaises(grpc.RpcError) as exception_context: - client_stub.UnUn(request) - # If TLS 1.2 is used, then the client receives an alert message - # before the handshake is complete, so the status is UNAVAILABLE. If - # TLS 1.3 is used, then the client receives the alert message after - # the handshake is complete, so the TSI handshaker returns the - # TSI_PROTOCOL_FAILURE result. This result does not have a - # corresponding status code, so this yields an UNKNOWN status. - self.assertTrue(exception_context.exception.code() in - [grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) - - def _do_one_shot_client_rpc(self, - expect_success, - root_certificates=None, - private_key=None, - certificate_chain=None): - credentials = grpc.ssl_channel_credentials( - root_certificates=root_certificates, - private_key=private_key, - certificate_chain=certificate_chain) - with _create_channel(self.port, credentials) as client_channel: - client_stub = _create_client_stub(client_channel, expect_success) - self._perform_rpc(client_stub, expect_success) - - def _test(self): - # things should work... - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc( - True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # client should reject server... - # fails because client trusts ca2 and so will reject server - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc( - False, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) - - # should work again... - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(True, None) - self._do_one_shot_client_rpc( - True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertTrue(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # if with_client_auth, then client should be rejected by - # server because client uses key/cert1, but server trusts ca2, - # so server will reject - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc( - not self.require_client_auth(), - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) - - # should work again... - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc( - True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # now create the "persistent" clients - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - channel_A = _create_channel( - self.port, - grpc.ssl_channel_credentials( - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM)) - persistent_client_stub_A = _create_client_stub(channel_A, True) - self._perform_rpc(persistent_client_stub_A, True) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - channel_B = _create_channel( - self.port, - grpc.ssl_channel_credentials( - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM)) - persistent_client_stub_B = _create_client_stub(channel_B, True) - self._perform_rpc(persistent_client_stub_B, True) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # moment of truth!! client should reject server because the - # server switch cert... - cert_config = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], - root_certificates=CA_1_PEM) - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, cert_config) - self._do_one_shot_client_rpc( - False, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertEqual(call.returned_cert_config, cert_config, - 'i= {}'.format(i)) - - # now should work again... - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc( - True, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertIsNone(actual_calls[0].returned_cert_config) - - # client should be rejected by server if with_client_auth - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc( - not self.require_client_auth(), - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) - - # here client should reject server... - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._do_one_shot_client_rpc( - False, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) - - # persistent clients should continue to work - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._perform_rpc(persistent_client_stub_A, True) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 0) - - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, None) - self._perform_rpc(persistent_client_stub_B, True) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 0) - - channel_A.close() - channel_B.close() + six.with_metaclass(abc.ABCMeta, unittest.TestCase)): + + def __init__(self, *args, **kwargs): + super(_ServerSSLCertReloadTest, self).__init__(*args, **kwargs) + self.server = None + self.port = None + + @abc.abstractmethod + def require_client_auth(self): + raise NotImplementedError() + + def setUp(self): + self.server = test_common.test_server() + services_pb2_grpc.add_FirstServiceServicer_to_server( + _server_application.FirstServiceServicer(), self.server) + switch_cert_on_client_num = 10 + initial_cert_config = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_1_PEM, SERVER_CERT_CHAIN_1_PEM)], + root_certificates=CA_2_PEM) + self.cert_config_fetcher = CertConfigFetcher() + server_credentials = grpc.dynamic_ssl_server_credentials( + initial_cert_config, + self.cert_config_fetcher, + require_client_authentication=self.require_client_auth()) + self.port = self.server.add_secure_port('[::]:0', server_credentials) + self.server.start() + + def tearDown(self): + if self.server: + self.server.stop(None) + + def _perform_rpc(self, client_stub, expect_success): + # we don't care about the actual response of the rpc; only + # whether we can perform it or not, and if not, the status + # code must be UNAVAILABLE + request = _application_common.UNARY_UNARY_REQUEST + if expect_success: + response = client_stub.UnUn(request) + self.assertEqual(response, _application_common.UNARY_UNARY_RESPONSE) + else: + with self.assertRaises(grpc.RpcError) as exception_context: + client_stub.UnUn(request) + # If TLS 1.2 is used, then the client receives an alert message + # before the handshake is complete, so the status is UNAVAILABLE. If + # TLS 1.3 is used, then the client receives the alert message after + # the handshake is complete, so the TSI handshaker returns the + # TSI_PROTOCOL_FAILURE result. This result does not have a + # corresponding status code, so this yields an UNKNOWN status. + self.assertTrue( + exception_context.exception.code() in [ + grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) + + def _do_one_shot_client_rpc(self, + expect_success, + root_certificates=None, + private_key=None, + certificate_chain=None): + credentials = grpc.ssl_channel_credentials( + root_certificates=root_certificates, + private_key=private_key, + certificate_chain=certificate_chain) + with _create_channel(self.port, credentials) as client_channel: + client_stub = _create_client_stub(client_channel, expect_success) + self._perform_rpc(client_stub, expect_success) + + def _test(self): + # things should work... + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc(True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # client should reject server... + # fails because client trusts ca2 and so will reject server + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc(False, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) + + # should work again... + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(True, None) + self._do_one_shot_client_rpc(True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertTrue(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # if with_client_auth, then client should be rejected by + # server because client uses key/cert1, but server trusts ca2, + # so server will reject + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc(not self.require_client_auth(), + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) + + # should work again... + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc(True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # now create the "persistent" clients + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + channel_A = _create_channel( + self.port, + grpc.ssl_channel_credentials( + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM)) + persistent_client_stub_A = _create_client_stub(channel_A, True) + self._perform_rpc(persistent_client_stub_A, True) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + channel_B = _create_channel( + self.port, + grpc.ssl_channel_credentials( + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM)) + persistent_client_stub_B = _create_client_stub(channel_B, True) + self._perform_rpc(persistent_client_stub_B, True) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # moment of truth!! client should reject server because the + # server switch cert... + cert_config = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], + root_certificates=CA_1_PEM) + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, cert_config) + self._do_one_shot_client_rpc(False, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertEqual(call.returned_cert_config, cert_config, + 'i= {}'.format(i)) + + # now should work again... + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc(True, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertIsNone(actual_calls[0].returned_cert_config) + + # client should be rejected by server if with_client_auth + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc(not self.require_client_auth(), + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) + + # here client should reject server... + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._do_one_shot_client_rpc(False, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertIsNone(call.returned_cert_config, 'i= {}'.format(i)) + + # persistent clients should continue to work + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._perform_rpc(persistent_client_stub_A, True) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 0) + + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, None) + self._perform_rpc(persistent_client_stub_B, True) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 0) + + channel_A.close() + channel_B.close() class ServerSSLCertConfigFetcherParamsChecks(unittest.TestCase): - def test_check_on_initial_config(self): - with self.assertRaises(TypeError): - grpc.dynamic_ssl_server_credentials(None, str) - with self.assertRaises(TypeError): - grpc.dynamic_ssl_server_credentials(1, str) + def test_check_on_initial_config(self): + with self.assertRaises(TypeError): + grpc.dynamic_ssl_server_credentials(None, str) + with self.assertRaises(TypeError): + grpc.dynamic_ssl_server_credentials(1, str) - def test_check_on_config_fetcher(self): - cert_config = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], - root_certificates=CA_1_PEM) - with self.assertRaises(TypeError): - grpc.dynamic_ssl_server_credentials(cert_config, None) - with self.assertRaises(TypeError): - grpc.dynamic_ssl_server_credentials(cert_config, 1) + def test_check_on_config_fetcher(self): + cert_config = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], + root_certificates=CA_1_PEM) + with self.assertRaises(TypeError): + grpc.dynamic_ssl_server_credentials(cert_config, None) + with self.assertRaises(TypeError): + grpc.dynamic_ssl_server_credentials(cert_config, 1) class ServerSSLCertReloadTestWithClientAuth(_ServerSSLCertReloadTest): - def require_client_auth(self): - return True + def require_client_auth(self): + return True - test = _ServerSSLCertReloadTest._test + test = _ServerSSLCertReloadTest._test class ServerSSLCertReloadTestWithoutClientAuth(_ServerSSLCertReloadTest): - def require_client_auth(self): - return False + def require_client_auth(self): + return False - test = _ServerSSLCertReloadTest._test + test = _ServerSSLCertReloadTest._test class ServerSSLCertReloadTestCertConfigReuse(_ServerSSLCertReloadTest): - """Ensures that `ServerCertificateConfiguration` instances can be reused. + """Ensures that `ServerCertificateConfiguration` instances can be reused. Because gRPC Core takes ownership of the `grpc_ssl_server_certificate_config` encapsulated by @@ -413,114 +401,112 @@ class ServerSSLCertReloadTestCertConfigReuse(_ServerSSLCertReloadTest): re-used by user application. """ - def require_client_auth(self): - return True - - def setUp(self): - self.server = test_common.test_server() - services_pb2_grpc.add_FirstServiceServicer_to_server( - _server_application.FirstServiceServicer(), self.server) - self.cert_config_A = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_1_PEM, SERVER_CERT_CHAIN_1_PEM)], - root_certificates=CA_2_PEM) - self.cert_config_B = grpc.ssl_server_certificate_configuration( - [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], - root_certificates=CA_1_PEM) - self.cert_config_fetcher = CertConfigFetcher() - server_credentials = grpc.dynamic_ssl_server_credentials( - self.cert_config_A, - self.cert_config_fetcher, - require_client_authentication=True) - self.port = self.server.add_secure_port('[::]:0', server_credentials) - self.server.start() - - def test_cert_config_reuse(self): - - # succeed with A - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_A) - self._do_one_shot_client_rpc( - True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertEqual(actual_calls[0].returned_cert_config, self.cert_config_A) - - # fail with A - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_A) - self._do_one_shot_client_rpc( - False, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertEqual(call.returned_cert_config, self.cert_config_A, - 'i= {}'.format(i)) - - # succeed again with A - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_A) - self._do_one_shot_client_rpc( - True, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertEqual(actual_calls[0].returned_cert_config, self.cert_config_A) - - # succeed with B - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_B) - self._do_one_shot_client_rpc( - True, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertEqual(actual_calls[0].returned_cert_config, self.cert_config_B) - - # fail with B - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_B) - self._do_one_shot_client_rpc( - False, - root_certificates=CA_1_PEM, - private_key=CLIENT_KEY_2_PEM, - certificate_chain=CLIENT_CERT_CHAIN_2_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertGreaterEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - for i, call in enumerate(actual_calls): - self.assertFalse(call.did_raise, 'i= {}'.format(i)) - self.assertEqual(call.returned_cert_config, self.cert_config_B, - 'i= {}'.format(i)) - - # succeed again with B - self.cert_config_fetcher.reset() - self.cert_config_fetcher.configure(False, self.cert_config_B) - self._do_one_shot_client_rpc( - True, - root_certificates=CA_2_PEM, - private_key=CLIENT_KEY_1_PEM, - certificate_chain=CLIENT_CERT_CHAIN_1_PEM) - actual_calls = self.cert_config_fetcher.getCalls() - self.assertEqual(len(actual_calls), 1) - self.assertFalse(actual_calls[0].did_raise) - self.assertEqual(actual_calls[0].returned_cert_config, self.cert_config_B) + def require_client_auth(self): + return True + + def setUp(self): + self.server = test_common.test_server() + services_pb2_grpc.add_FirstServiceServicer_to_server( + _server_application.FirstServiceServicer(), self.server) + self.cert_config_A = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_1_PEM, SERVER_CERT_CHAIN_1_PEM)], + root_certificates=CA_2_PEM) + self.cert_config_B = grpc.ssl_server_certificate_configuration( + [(SERVER_KEY_2_PEM, SERVER_CERT_CHAIN_2_PEM)], + root_certificates=CA_1_PEM) + self.cert_config_fetcher = CertConfigFetcher() + server_credentials = grpc.dynamic_ssl_server_credentials( + self.cert_config_A, + self.cert_config_fetcher, + require_client_authentication=True) + self.port = self.server.add_secure_port('[::]:0', server_credentials) + self.server.start() + + def test_cert_config_reuse(self): + + # succeed with A + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_A) + self._do_one_shot_client_rpc(True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertEqual(actual_calls[0].returned_cert_config, + self.cert_config_A) + + # fail with A + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_A) + self._do_one_shot_client_rpc(False, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertEqual(call.returned_cert_config, self.cert_config_A, + 'i= {}'.format(i)) + + # succeed again with A + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_A) + self._do_one_shot_client_rpc(True, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertEqual(actual_calls[0].returned_cert_config, + self.cert_config_A) + + # succeed with B + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_B) + self._do_one_shot_client_rpc(True, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertEqual(actual_calls[0].returned_cert_config, + self.cert_config_B) + + # fail with B + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_B) + self._do_one_shot_client_rpc(False, + root_certificates=CA_1_PEM, + private_key=CLIENT_KEY_2_PEM, + certificate_chain=CLIENT_CERT_CHAIN_2_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertGreaterEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + for i, call in enumerate(actual_calls): + self.assertFalse(call.did_raise, 'i= {}'.format(i)) + self.assertEqual(call.returned_cert_config, self.cert_config_B, + 'i= {}'.format(i)) + + # succeed again with B + self.cert_config_fetcher.reset() + self.cert_config_fetcher.configure(False, self.cert_config_B) + self._do_one_shot_client_rpc(True, + root_certificates=CA_2_PEM, + private_key=CLIENT_KEY_1_PEM, + certificate_chain=CLIENT_CERT_CHAIN_1_PEM) + actual_calls = self.cert_config_fetcher.getCalls() + self.assertEqual(len(actual_calls), 1) + self.assertFalse(actual_calls[0].did_raise) + self.assertEqual(actual_calls[0].returned_cert_config, + self.cert_config_B) if __name__ == '__main__': - logging.basicConfig() - unittest.main(verbosity=2) + logging.basicConfig() + unittest.main(verbosity=2) From 432823cbf65e9ec293bf26054295dd8166d8a0b3 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 11 Jun 2020 11:54:28 -0700 Subject: [PATCH 052/239] Add check that unused bytes size is at most received bytes size. --- src/core/tsi/ssl_transport_security.cc | 9 +++++++-- .../tests/unit/_server_ssl_cert_config_test.py | 5 ++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 7f3295ccee9..c013690fbd8 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1429,14 +1429,14 @@ static tsi_result ssl_bytes_remaining(tsi_ssl_handshaker* impl, BIO_read(SSL_get_rbio(impl->ssl), *bytes_remaining, bytes_in_ssl); // If an unexpected number of bytes were read, return an error status and free // all of the bytes that were read. - if (bytes_read != bytes_in_ssl) { + if (bytes_read < 0 || static_cast(bytes_read) != bytes_in_ssl) { gpr_log(GPR_INFO, "Failed to read the expected number of bytes from SSL object."); gpr_free(*bytes_remaining); *bytes_remaining = nullptr; return TSI_INTERNAL_ERROR; } - *bytes_remaining_size = bytes_read; + *bytes_remaining_size = static_cast(bytes_read); return TSI_OK; } @@ -1488,6 +1488,11 @@ static tsi_result ssl_handshaker_next( size_t unused_bytes_size = 0; status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size); if (status != TSI_OK) return status; + if (unused_bytes_size > received_bytes_size) { + gpr_log(GPR_INFO, "More unused bytes than received bytes."); + gpr_free(unused_bytes); + return TSI_INTERNAL_ERROR; + } status = ssl_handshaker_result_create(impl, unused_bytes, unused_bytes_size, handshaker_result); if (status == TSI_OK) { diff --git a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py index 6129db62742..958baf99805 100644 --- a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py +++ b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py @@ -167,9 +167,8 @@ class _ServerSSLCertReloadTest( # the handshake is complete, so the TSI handshaker returns the # TSI_PROTOCOL_FAILURE result. This result does not have a # corresponding status code, so this yields an UNKNOWN status. - self.assertTrue( - exception_context.exception.code() in [ - grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) + self.assertTrue(exception_context.exception.code() in + [grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) def _do_one_shot_client_rpc(self, expect_success, From c60ba7e77fdabe407cdbeee227088d191aaa7674 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 11 Jun 2020 12:04:46 -0700 Subject: [PATCH 053/239] Add back source-only ruby packages for master --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 3b23d0b1b40..a488eb03f0b 100755 --- a/Rakefile +++ b/Rakefile @@ -142,7 +142,7 @@ task 'gem:native' do gem update --system --no-document && \ bundle && \ - rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem \ + rake native:#{plat} pkg/#{spec.full_name}-#{plat}.gem pkg/#{spec.full_name}.gem \ RUBY_CC_VERSION=2.7.0:2.6.0:2.5.0:2.4.0:2.3.0 \ V=#{verbose} \ GRPC_CONFIG=#{grpc_config} From b48f821048df6009f1f8fc99fba104d428554b2f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 11 Jun 2020 13:00:14 -0700 Subject: [PATCH 054/239] Squashed 'third_party/upb/' changes from 363e39c171..92e63da733 92e63da733 Merge pull request #295 from haberman/mac-compile-fix e179dda212 Added initialization of all members to satisfy compiler warnings. f7fcc0df37 Fix divide by zero vs2019 compilation error #293 (#294) 7d38c201fa Enabled conformance tests to run under ASAN. This apears to work now. (#292) 0dc2394da5 Changes to support import into google3 (#291) git-subtree-dir: third_party/upb git-subtree-split: 92e63da73328d01b417cf26c2de7b0a27a0f83af --- BUILD | 20 +++++++++++++++----- bazel/build_defs.bzl | 3 ++- bazel/upb_proto_library.bzl | 2 +- bazel/workspace_deps.bzl | 2 +- kokoro/ubuntu/build.sh | 2 +- tests/conformance_upb_failures.txt | 2 +- upb/def.c | 2 +- upb/json_decode.c | 2 +- upb/json_decode.h | 1 - upb/port_def.inc | 5 +++++ upb/port_undef.inc | 1 + 11 files changed, 29 insertions(+), 13 deletions(-) diff --git a/BUILD b/BUILD index bcecd387af4..cfc734a9b4e 100644 --- a/BUILD +++ b/BUILD @@ -1,7 +1,3 @@ -load( - "@rules_proto//proto:defs.bzl", - "proto_library", -) load( "//bazel:build_defs.bzl", "generated_file_staleness_test", @@ -14,10 +10,17 @@ load( "upb_proto_library", "upb_proto_reflection_library", ) + +# copybara:strip_for_google3_begin +load( + "@rules_proto//proto:defs.bzl", + "proto_library", +) load( "//:upb/bindings/lua/lua_proto_library.bzl", "lua_proto_library", ) +# copybara:strip_end licenses(["notice"]) # BSD (Google-authored w/ possible external contributions) @@ -627,11 +630,15 @@ cc_binary( srcs = [ "tests/conformance_upb.c", ], + data = [ + "tests/conformance_upb_failures.txt", + ], copts = select({ ":windows": [], "//conditions:default": COPTS, }) + ["-Ibazel-out/k8-fastbuild/bin"], deps = [ + ":port", ":conformance_proto_upb", ":conformance_proto_upbdefs", ":json", @@ -646,7 +653,10 @@ cc_binary( make_shell_script( name = "gen_test_conformance_upb", out = "test_conformance_upb.sh", - contents = "external/com_google_protobuf/conformance_test_runner --enforce_recommended ./conformance_upb", + contents = "external/com_google_protobuf/conformance_test_runner " + + " --enforce_recommended " + + " --failure_list ./tests/conformance_upb_failures.txt" + + " ./conformance_upb", ) sh_test( diff --git a/bazel/build_defs.bzl b/bazel/build_defs.bzl index c51aded057d..121ae270c9d 100644 --- a/bazel/build_defs.bzl +++ b/bazel/build_defs.bzl @@ -50,7 +50,8 @@ def _remove_suffix(str, suffix): return str[:-len(suffix)] def make_shell_script(name, contents, out): - contents = (runfiles_init + contents).replace("$", "$$") + contents = runfiles_init + contents # copybara:strip_for_google3 + contents = contents.replace("$", "$$") native.genrule( name = "gen_" + name, outs = [out], diff --git a/bazel/upb_proto_library.bzl b/bazel/upb_proto_library.bzl index 3499ea94860..4dce00826dc 100644 --- a/bazel/upb_proto_library.bzl +++ b/bazel/upb_proto_library.bzl @@ -5,7 +5,7 @@ load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_tools//tools/cpp:toolchain_utils.bzl", "find_cpp_toolchain") -load("@rules_proto//proto:defs.bzl", "ProtoInfo") +load("@rules_proto//proto:defs.bzl", "ProtoInfo") # copybara:strip_for_google3 # Generic support code ######################################################### diff --git a/bazel/workspace_deps.bzl b/bazel/workspace_deps.bzl index 5e3e8a69005..967dfe36d92 100644 --- a/bazel/workspace_deps.bzl +++ b/bazel/workspace_deps.bzl @@ -16,7 +16,7 @@ def upb_deps(): git_repository, name = "com_google_protobuf", remote = "https://github.com/protocolbuffers/protobuf.git", - commit = "62832897c3cf14c93b91c412f7e64086cd272cb7", # Need to use Git until proto3 optional is released + commit = "5f5efe50c5bef20042645b51a697f58b0704ac89", # Need to use Git until proto3 optional is released ) maybe( diff --git a/kokoro/ubuntu/build.sh b/kokoro/ubuntu/build.sh index 3888d15f6ae..c0261a75886 100644 --- a/kokoro/ubuntu/build.sh +++ b/kokoro/ubuntu/build.sh @@ -24,7 +24,7 @@ bazel test --test_output=errors :all if [[ $(uname) = "Linux" ]]; then # Verify the ASAN build. Have to exclude test_conformance_upb as protobuf # currently leaks memory in the conformance test runner. - bazel test --copt=-fsanitize=address --linkopt=-fsanitize=address --test_output=errors -- :all -:test_conformance_upb + bazel test --copt=-fsanitize=address --linkopt=-fsanitize=address --test_output=errors :all # Verify the UBSan build. Have to exclude Lua as the version we are using # fails some UBSan tests. diff --git a/tests/conformance_upb_failures.txt b/tests/conformance_upb_failures.txt index 05aab585e77..d9290df9877 100644 --- a/tests/conformance_upb_failures.txt +++ b/tests/conformance_upb_failures.txt @@ -1 +1 @@ -Required.ProtobufInput.PrematureEofInSubmessageValue.MESSAGE +Recommended.Proto2.JsonInput.FieldNameExtension.Validator diff --git a/upb/def.c b/upb/def.c index 10f6b94bf1e..8f143354001 100644 --- a/upb/def.c +++ b/upb/def.c @@ -1802,7 +1802,7 @@ static bool build_filedef( const google_protobuf_FieldDescriptorProto *const *exts; const upb_strview* strs; size_t i, n; - decl_counts counts = {0}; + decl_counts counts = {0, 0, 0}; count_types_in_file(file_proto, &counts); diff --git a/upb/json_decode.c b/upb/json_decode.c index 301f16a1453..9c70173165e 100644 --- a/upb/json_decode.c +++ b/upb/json_decode.c @@ -733,7 +733,7 @@ static upb_msgval jsondec_double(jsondec *d, const upb_fielddef *f) { case JD_STRING: str = jsondec_string(d); if (jsondec_streql(str, "NaN")) { - val.double_val = 0.0 / 0.0; + val.double_val = UPB_NAN; } else if (jsondec_streql(str, "Infinity")) { val.double_val = UPB_INFINITY; } else if (jsondec_streql(str, "-Infinity")) { diff --git a/upb/json_decode.h b/upb/json_decode.h index 01ab9580f05..a0ba1ee596c 100644 --- a/upb/json_decode.h +++ b/upb/json_decode.h @@ -3,7 +3,6 @@ #define UPB_JSONDECODE_H_ #include "upb/def.h" -#include "upb/msg.h" #ifdef __cplusplus extern "C" { diff --git a/upb/port_def.inc b/upb/port_def.inc index 61675d37c05..9e9c506597f 100644 --- a/upb/port_def.inc +++ b/upb/port_def.inc @@ -172,3 +172,8 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg); #else #define UPB_INFINITY (1.0 / 0.0) #endif +#ifdef NAN +#define UPB_NAN NAN +#else +#define UPB_NAN (0.0 / 0.0) +#endif diff --git a/upb/port_undef.inc b/upb/port_undef.inc index c322d471608..c2b5f4a322b 100644 --- a/upb/port_undef.inc +++ b/upb/port_undef.inc @@ -21,6 +21,7 @@ #undef UPB_ASSERT_DEBUGVAR #undef UPB_UNREACHABLE #undef UPB_INFINITY +#undef UPB_NAN #undef UPB_MSVC_VSNPRINTF #undef _upb_snprintf #undef _upb_vsnprintf From f7f2659c84d807d6126e594fd3f3c36e88b1745f Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 11 Jun 2020 13:01:59 -0700 Subject: [PATCH 055/239] update bazel build dep for upb --- bazel/grpc_deps.bzl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 43d198f80b6..da6fc62ff12 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -267,11 +267,11 @@ def grpc_deps(): if "upb" not in native.existing_rules(): http_archive( name = "upb", - sha256 = "d4b6a818628988a7a0785734755afd488d8d2da1de5ff0bcbf7d7b483741d5d0", - strip_prefix = "upb-363e39c171a08b89bd546189d1244a6e191cacf0", + sha256 = "79f7de61203c4ee5e4fcb2f17c5f3338119d6eb94aca8bce05332d2c1cfee108", + strip_prefix = "upb-92e63da73328d01b417cf26c2de7b0a27a0f83af", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/363e39c171a08b89bd546189d1244a6e191cacf0.tar.gz", - "https://github.com/protocolbuffers/upb/archive/363e39c171a08b89bd546189d1244a6e191cacf0.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/92e63da73328d01b417cf26c2de7b0a27a0f83af.tar.gz", + "https://github.com/protocolbuffers/upb/archive/92e63da73328d01b417cf26c2de7b0a27a0f83af.tar.gz", ], ) From 039e009faacf35fccde1414dff1a0c55fe3d8aba Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 11 Jun 2020 19:21:51 -0700 Subject: [PATCH 056/239] Fix memory leak, per Yang's comment. --- src/core/tsi/ssl_transport_security.cc | 13 +++++-------- .../tests/unit/_server_ssl_cert_config_test.py | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index c013690fbd8..476aec47144 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1299,7 +1299,7 @@ static const tsi_handshaker_result_vtable handshaker_result_vtable = { }; static tsi_result ssl_handshaker_result_create( - tsi_ssl_handshaker* handshaker, const unsigned char* unused_bytes, + tsi_ssl_handshaker* handshaker, unsigned char* unused_bytes, size_t unused_bytes_size, tsi_handshaker_result** handshaker_result) { if (handshaker == nullptr || handshaker_result == nullptr || (unused_bytes_size > 0 && unused_bytes == nullptr)) { @@ -1313,11 +1313,8 @@ static tsi_result ssl_handshaker_result_create( handshaker->ssl = nullptr; result->network_io = handshaker->network_io; handshaker->network_io = nullptr; - if (unused_bytes_size > 0) { - result->unused_bytes = - static_cast(gpr_malloc(unused_bytes_size)); - memcpy(result->unused_bytes, unused_bytes, unused_bytes_size); - } + /* Transfer ownership of |unused_bytes| to the handshaker result. */ + result->unused_bytes = unused_bytes; result->unused_bytes_size = unused_bytes_size; *handshaker_result = &result->base; return TSI_OK; @@ -1425,8 +1422,8 @@ static tsi_result ssl_bytes_remaining(tsi_ssl_handshaker* impl, size_t bytes_in_ssl = BIO_pending(SSL_get_rbio(impl->ssl)); if (bytes_in_ssl == 0) return TSI_OK; *bytes_remaining = static_cast(gpr_malloc(bytes_in_ssl)); - int bytes_read = - BIO_read(SSL_get_rbio(impl->ssl), *bytes_remaining, bytes_in_ssl); + int bytes_read = BIO_read(SSL_get_rbio(impl->ssl), *bytes_remaining, + static_cast(bytes_in_ssl)); // If an unexpected number of bytes were read, return an error status and free // all of the bytes that were read. if (bytes_read < 0 || static_cast(bytes_read) != bytes_in_ssl) { diff --git a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py index 958baf99805..35d992a33d6 100644 --- a/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py +++ b/src/python/grpcio_tests/tests/unit/_server_ssl_cert_config_test.py @@ -167,8 +167,8 @@ class _ServerSSLCertReloadTest( # the handshake is complete, so the TSI handshaker returns the # TSI_PROTOCOL_FAILURE result. This result does not have a # corresponding status code, so this yields an UNKNOWN status. - self.assertTrue(exception_context.exception.code() in - [grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) + self.assertTrue(exception_context.exception.code( + ) in [grpc.StatusCode.UNAVAILABLE, grpc.StatusCode.UNKNOWN]) def _do_one_shot_client_rpc(self, expect_success, From 8456213e8bde9518bf100790db45363bf537b43d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 15 Jun 2020 16:02:03 -0700 Subject: [PATCH 057/239] gen_upb_api --- .../envoy/config/rbac/v2/rbac.upb.c | 2 +- .../envoy/config/rbac/v2/rbac.upb.h | 192 ++++++------ .../envoy/type/matcher/path.upb.h | 9 +- .../google/api/expr/v1alpha1/syntax.upb.c | 8 +- .../google/api/expr/v1alpha1/syntax.upb.h | 285 +++++++++--------- 5 files changed, 239 insertions(+), 257 deletions(-) diff --git a/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upb.c b/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upb.c index 55c543c01d6..93385f0abb2 100644 --- a/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upb.c +++ b/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upb.c @@ -26,7 +26,7 @@ static const upb_msglayout *const envoy_config_rbac_v2_RBAC_submsgs[1] = { static const upb_msglayout_field envoy_config_rbac_v2_RBAC__fields[2] = { {1, UPB_SIZE(0, 0), 0, 0, 14, 1}, - {2, UPB_SIZE(8, 8), 0, 0, 11, 3}, + {2, UPB_SIZE(8, 8), 0, 0, 11, _UPB_LABEL_MAP}, }; const upb_msglayout envoy_config_rbac_v2_RBAC_msginit = { diff --git a/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upb.h b/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upb.h index 0330bdf113b..699cce736de 100644 --- a/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upb.h +++ b/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_CONFIG_RBAC_V2_RBAC_PROTO_UPB_H_ #define ENVOY_CONFIG_RBAC_V2_RBAC_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -66,7 +65,7 @@ typedef enum { /* envoy.config.rbac.v2.RBAC */ UPB_INLINE envoy_config_rbac_v2_RBAC *envoy_config_rbac_v2_RBAC_new(upb_arena *arena) { - return (envoy_config_rbac_v2_RBAC *)upb_msg_new(&envoy_config_rbac_v2_RBAC_msginit, arena); + return (envoy_config_rbac_v2_RBAC *)_upb_msg_new(&envoy_config_rbac_v2_RBAC_msginit, arena); } UPB_INLINE envoy_config_rbac_v2_RBAC *envoy_config_rbac_v2_RBAC_parse(const char *buf, size_t size, upb_arena *arena) { @@ -77,63 +76,42 @@ UPB_INLINE char *envoy_config_rbac_v2_RBAC_serialize(const envoy_config_rbac_v2_ return upb_encode(msg, &envoy_config_rbac_v2_RBAC_msginit, arena, len); } -UPB_INLINE int32_t envoy_config_rbac_v2_RBAC_action(const envoy_config_rbac_v2_RBAC *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE const envoy_config_rbac_v2_RBAC_PoliciesEntry* const* envoy_config_rbac_v2_RBAC_policies(const envoy_config_rbac_v2_RBAC *msg, size_t *len) { return (const envoy_config_rbac_v2_RBAC_PoliciesEntry* const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); } +UPB_INLINE int32_t envoy_config_rbac_v2_RBAC_action(const envoy_config_rbac_v2_RBAC *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE bool envoy_config_rbac_v2_RBAC_has_policies(const envoy_config_rbac_v2_RBAC *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } +UPB_INLINE size_t envoy_config_rbac_v2_RBAC_policies_size(const envoy_config_rbac_v2_RBAC *msg) {return _upb_msg_map_size(msg, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_config_rbac_v2_RBAC_policies_get(const envoy_config_rbac_v2_RBAC *msg, upb_strview key, envoy_config_rbac_v2_Policy* *val) { return _upb_msg_map_get(msg, UPB_SIZE(8, 8), &key, 0, val, sizeof(*val)); } +UPB_INLINE const envoy_config_rbac_v2_RBAC_PoliciesEntry* envoy_config_rbac_v2_RBAC_policies_next(const envoy_config_rbac_v2_RBAC *msg, size_t* iter) { return (const envoy_config_rbac_v2_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(8, 8), iter); } UPB_INLINE void envoy_config_rbac_v2_RBAC_set_action(envoy_config_rbac_v2_RBAC *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; -} -UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry** envoy_config_rbac_v2_RBAC_mutable_policies(envoy_config_rbac_v2_RBAC *msg, size_t *len) { - return (envoy_config_rbac_v2_RBAC_PoliciesEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len); -} -UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry** envoy_config_rbac_v2_RBAC_resize_policies(envoy_config_rbac_v2_RBAC *msg, size_t len, upb_arena *arena) { - return (envoy_config_rbac_v2_RBAC_PoliciesEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct envoy_config_rbac_v2_RBAC_PoliciesEntry* envoy_config_rbac_v2_RBAC_add_policies(envoy_config_rbac_v2_RBAC *msg, upb_arena *arena) { - struct envoy_config_rbac_v2_RBAC_PoliciesEntry* sub = (struct envoy_config_rbac_v2_RBAC_PoliciesEntry*)upb_msg_new(&envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(8, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } +UPB_INLINE void envoy_config_rbac_v2_RBAC_policies_clear(envoy_config_rbac_v2_RBAC *msg) { _upb_msg_map_clear(msg, UPB_SIZE(8, 8)); } +UPB_INLINE bool envoy_config_rbac_v2_RBAC_policies_set(envoy_config_rbac_v2_RBAC *msg, upb_strview key, envoy_config_rbac_v2_Policy* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(8, 8), &key, 0, &val, sizeof(val), a); } +UPB_INLINE bool envoy_config_rbac_v2_RBAC_policies_delete(envoy_config_rbac_v2_RBAC *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(8, 8), &key, 0); } +UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry* envoy_config_rbac_v2_RBAC_policies_nextmutable(envoy_config_rbac_v2_RBAC *msg, size_t* iter) { return (envoy_config_rbac_v2_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(8, 8), iter); } /* envoy.config.rbac.v2.RBAC.PoliciesEntry */ -UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry *envoy_config_rbac_v2_RBAC_PoliciesEntry_new(upb_arena *arena) { - return (envoy_config_rbac_v2_RBAC_PoliciesEntry *)upb_msg_new(&envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, arena); -} -UPB_INLINE envoy_config_rbac_v2_RBAC_PoliciesEntry *envoy_config_rbac_v2_RBAC_PoliciesEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - envoy_config_rbac_v2_RBAC_PoliciesEntry *ret = envoy_config_rbac_v2_RBAC_PoliciesEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE upb_strview envoy_config_rbac_v2_RBAC_PoliciesEntry_key(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg) { + upb_strview ret; + _upb_msg_map_key(msg, &ret, 0); + return ret; } -UPB_INLINE char *envoy_config_rbac_v2_RBAC_PoliciesEntry_serialize(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, arena, len); +UPB_INLINE bool envoy_config_rbac_v2_RBAC_PoliciesEntry_has_value(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const envoy_config_rbac_v2_Policy* envoy_config_rbac_v2_RBAC_PoliciesEntry_value(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg) { + envoy_config_rbac_v2_Policy* ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE upb_strview envoy_config_rbac_v2_RBAC_PoliciesEntry_key(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const envoy_config_rbac_v2_Policy* envoy_config_rbac_v2_RBAC_PoliciesEntry_value(const envoy_config_rbac_v2_RBAC_PoliciesEntry *msg) { return UPB_FIELD_AT(msg, const envoy_config_rbac_v2_Policy*, UPB_SIZE(8, 16)); } - -UPB_INLINE void envoy_config_rbac_v2_RBAC_PoliciesEntry_set_key(envoy_config_rbac_v2_RBAC_PoliciesEntry *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void envoy_config_rbac_v2_RBAC_PoliciesEntry_set_value(envoy_config_rbac_v2_RBAC_PoliciesEntry *msg, envoy_config_rbac_v2_Policy* value) { - UPB_FIELD_AT(msg, envoy_config_rbac_v2_Policy*, UPB_SIZE(8, 16)) = value; -} -UPB_INLINE struct envoy_config_rbac_v2_Policy* envoy_config_rbac_v2_RBAC_PoliciesEntry_mutable_value(envoy_config_rbac_v2_RBAC_PoliciesEntry *msg, upb_arena *arena) { - struct envoy_config_rbac_v2_Policy* sub = (struct envoy_config_rbac_v2_Policy*)envoy_config_rbac_v2_RBAC_PoliciesEntry_value(msg); - if (sub == NULL) { - sub = (struct envoy_config_rbac_v2_Policy*)upb_msg_new(&envoy_config_rbac_v2_Policy_msginit, arena); - if (!sub) return NULL; - envoy_config_rbac_v2_RBAC_PoliciesEntry_set_value(msg, sub); - } - return sub; + _upb_msg_map_set_value(msg, &value, sizeof(envoy_config_rbac_v2_Policy*)); } /* envoy.config.rbac.v2.Policy */ UPB_INLINE envoy_config_rbac_v2_Policy *envoy_config_rbac_v2_Policy_new(upb_arena *arena) { - return (envoy_config_rbac_v2_Policy *)upb_msg_new(&envoy_config_rbac_v2_Policy_msginit, arena); + return (envoy_config_rbac_v2_Policy *)_upb_msg_new(&envoy_config_rbac_v2_Policy_msginit, arena); } UPB_INLINE envoy_config_rbac_v2_Policy *envoy_config_rbac_v2_Policy_parse(const char *buf, size_t size, upb_arena *arena) { @@ -144,18 +122,21 @@ UPB_INLINE char *envoy_config_rbac_v2_Policy_serialize(const envoy_config_rbac_v return upb_encode(msg, &envoy_config_rbac_v2_Policy_msginit, arena, len); } +UPB_INLINE bool envoy_config_rbac_v2_Policy_has_permissions(const envoy_config_rbac_v2_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } UPB_INLINE const envoy_config_rbac_v2_Permission* const* envoy_config_rbac_v2_Policy_permissions(const envoy_config_rbac_v2_Policy *msg, size_t *len) { return (const envoy_config_rbac_v2_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); } +UPB_INLINE bool envoy_config_rbac_v2_Policy_has_principals(const envoy_config_rbac_v2_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const envoy_config_rbac_v2_Principal* const* envoy_config_rbac_v2_Policy_principals(const envoy_config_rbac_v2_Policy *msg, size_t *len) { return (const envoy_config_rbac_v2_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } -UPB_INLINE const struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v2_Policy_condition(const envoy_config_rbac_v2_Policy *msg) { return UPB_FIELD_AT(msg, const struct google_api_expr_v1alpha1_Expr*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_rbac_v2_Policy_has_condition(const envoy_config_rbac_v2_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v2_Policy_condition(const envoy_config_rbac_v2_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_api_expr_v1alpha1_Expr*); } UPB_INLINE envoy_config_rbac_v2_Permission** envoy_config_rbac_v2_Policy_mutable_permissions(envoy_config_rbac_v2_Policy *msg, size_t *len) { return (envoy_config_rbac_v2_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len); } UPB_INLINE envoy_config_rbac_v2_Permission** envoy_config_rbac_v2_Policy_resize_permissions(envoy_config_rbac_v2_Policy *msg, size_t len, upb_arena *arena) { - return (envoy_config_rbac_v2_Permission**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_rbac_v2_Permission**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Policy_add_permissions(envoy_config_rbac_v2_Policy *msg, upb_arena *arena) { - struct envoy_config_rbac_v2_Permission* sub = (struct envoy_config_rbac_v2_Permission*)upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); + struct envoy_config_rbac_v2_Permission* sub = (struct envoy_config_rbac_v2_Permission*)_upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -165,22 +146,22 @@ UPB_INLINE envoy_config_rbac_v2_Principal** envoy_config_rbac_v2_Policy_mutable_ return (envoy_config_rbac_v2_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE envoy_config_rbac_v2_Principal** envoy_config_rbac_v2_Policy_resize_principals(envoy_config_rbac_v2_Policy *msg, size_t len, upb_arena *arena) { - return (envoy_config_rbac_v2_Principal**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_rbac_v2_Principal**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Policy_add_principals(envoy_config_rbac_v2_Policy *msg, upb_arena *arena) { - struct envoy_config_rbac_v2_Principal* sub = (struct envoy_config_rbac_v2_Principal*)upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); + struct envoy_config_rbac_v2_Principal* sub = (struct envoy_config_rbac_v2_Principal*)_upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; return sub; } UPB_INLINE void envoy_config_rbac_v2_Policy_set_condition(envoy_config_rbac_v2_Policy *msg, struct google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, struct google_api_expr_v1alpha1_Expr*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v2_Policy_mutable_condition(envoy_config_rbac_v2_Policy *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)envoy_config_rbac_v2_Policy_condition(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Policy_set_condition(msg, sub); } @@ -190,7 +171,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v2_Policy_mut /* envoy.config.rbac.v2.Permission */ UPB_INLINE envoy_config_rbac_v2_Permission *envoy_config_rbac_v2_Permission_new(upb_arena *arena) { - return (envoy_config_rbac_v2_Permission *)upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); + return (envoy_config_rbac_v2_Permission *)_upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); } UPB_INLINE envoy_config_rbac_v2_Permission *envoy_config_rbac_v2_Permission_parse(const char *buf, size_t size, upb_arena *arena) { @@ -214,27 +195,27 @@ typedef enum { envoy_config_rbac_v2_Permission_rule_requested_server_name = 9, envoy_config_rbac_v2_Permission_rule_NOT_SET = 0 } envoy_config_rbac_v2_Permission_rule_oneofcases; -UPB_INLINE envoy_config_rbac_v2_Permission_rule_oneofcases envoy_config_rbac_v2_Permission_rule_case(const envoy_config_rbac_v2_Permission* msg) { return (envoy_config_rbac_v2_Permission_rule_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_config_rbac_v2_Permission_rule_oneofcases envoy_config_rbac_v2_Permission_rule_case(const envoy_config_rbac_v2_Permission* msg) { return (envoy_config_rbac_v2_Permission_rule_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_and_rules(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_and_rules(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_config_rbac_v2_Permission_Set* envoy_config_rbac_v2_Permission_and_rules(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Permission_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_or_rules(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_or_rules(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const envoy_config_rbac_v2_Permission_Set* envoy_config_rbac_v2_Permission_or_rules(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Permission_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_any(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_any(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE bool envoy_config_rbac_v2_Permission_any(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, false); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_header(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_header(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; } UPB_INLINE const struct envoy_api_v2_route_HeaderMatcher* envoy_config_rbac_v2_Permission_header(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_destination_ip(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_destination_ip(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 5; } UPB_INLINE const struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Permission_destination_ip(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_destination_port(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_destination_port(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 6; } UPB_INLINE uint32_t envoy_config_rbac_v2_Permission_destination_port(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, 0); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_metadata(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_metadata(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 7; } UPB_INLINE const struct envoy_type_matcher_MetadataMatcher* envoy_config_rbac_v2_Permission_metadata(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_MetadataMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_not_rule(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_not_rule(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 8; } UPB_INLINE const envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Permission_not_rule(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Permission*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_requested_server_name(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_requested_server_name(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 9; } UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Permission_requested_server_name(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Permission_has_url_path(const envoy_config_rbac_v2_Permission *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_has_url_path(const envoy_config_rbac_v2_Permission *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 10; } UPB_INLINE const struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Permission_url_path(const envoy_config_rbac_v2_Permission *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_PathMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); } UPB_INLINE void envoy_config_rbac_v2_Permission_set_and_rules(envoy_config_rbac_v2_Permission *msg, envoy_config_rbac_v2_Permission_Set* value) { @@ -243,7 +224,7 @@ UPB_INLINE void envoy_config_rbac_v2_Permission_set_and_rules(envoy_config_rbac_ UPB_INLINE struct envoy_config_rbac_v2_Permission_Set* envoy_config_rbac_v2_Permission_mutable_and_rules(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { struct envoy_config_rbac_v2_Permission_Set* sub = (struct envoy_config_rbac_v2_Permission_Set*)envoy_config_rbac_v2_Permission_and_rules(msg); if (sub == NULL) { - sub = (struct envoy_config_rbac_v2_Permission_Set*)upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); + sub = (struct envoy_config_rbac_v2_Permission_Set*)_upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Permission_set_and_rules(msg, sub); } @@ -255,7 +236,7 @@ UPB_INLINE void envoy_config_rbac_v2_Permission_set_or_rules(envoy_config_rbac_v UPB_INLINE struct envoy_config_rbac_v2_Permission_Set* envoy_config_rbac_v2_Permission_mutable_or_rules(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { struct envoy_config_rbac_v2_Permission_Set* sub = (struct envoy_config_rbac_v2_Permission_Set*)envoy_config_rbac_v2_Permission_or_rules(msg); if (sub == NULL) { - sub = (struct envoy_config_rbac_v2_Permission_Set*)upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); + sub = (struct envoy_config_rbac_v2_Permission_Set*)_upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Permission_set_or_rules(msg, sub); } @@ -270,7 +251,7 @@ UPB_INLINE void envoy_config_rbac_v2_Permission_set_header(envoy_config_rbac_v2_ UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_rbac_v2_Permission_mutable_header(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)envoy_config_rbac_v2_Permission_header(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + sub = (struct envoy_api_v2_route_HeaderMatcher*)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Permission_set_header(msg, sub); } @@ -282,7 +263,7 @@ UPB_INLINE void envoy_config_rbac_v2_Permission_set_destination_ip(envoy_config_ UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Permission_mutable_destination_ip(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)envoy_config_rbac_v2_Permission_destination_ip(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); + sub = (struct envoy_api_v2_core_CidrRange*)_upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Permission_set_destination_ip(msg, sub); } @@ -297,7 +278,7 @@ UPB_INLINE void envoy_config_rbac_v2_Permission_set_metadata(envoy_config_rbac_v UPB_INLINE struct envoy_type_matcher_MetadataMatcher* envoy_config_rbac_v2_Permission_mutable_metadata(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { struct envoy_type_matcher_MetadataMatcher* sub = (struct envoy_type_matcher_MetadataMatcher*)envoy_config_rbac_v2_Permission_metadata(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_MetadataMatcher*)upb_msg_new(&envoy_type_matcher_MetadataMatcher_msginit, arena); + sub = (struct envoy_type_matcher_MetadataMatcher*)_upb_msg_new(&envoy_type_matcher_MetadataMatcher_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Permission_set_metadata(msg, sub); } @@ -309,7 +290,7 @@ UPB_INLINE void envoy_config_rbac_v2_Permission_set_not_rule(envoy_config_rbac_v UPB_INLINE struct envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Permission_mutable_not_rule(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { struct envoy_config_rbac_v2_Permission* sub = (struct envoy_config_rbac_v2_Permission*)envoy_config_rbac_v2_Permission_not_rule(msg); if (sub == NULL) { - sub = (struct envoy_config_rbac_v2_Permission*)upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); + sub = (struct envoy_config_rbac_v2_Permission*)_upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Permission_set_not_rule(msg, sub); } @@ -321,7 +302,7 @@ UPB_INLINE void envoy_config_rbac_v2_Permission_set_requested_server_name(envoy_ UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Permission_mutable_requested_server_name(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)envoy_config_rbac_v2_Permission_requested_server_name(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + sub = (struct envoy_type_matcher_StringMatcher*)_upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Permission_set_requested_server_name(msg, sub); } @@ -333,7 +314,7 @@ UPB_INLINE void envoy_config_rbac_v2_Permission_set_url_path(envoy_config_rbac_v UPB_INLINE struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Permission_mutable_url_path(envoy_config_rbac_v2_Permission *msg, upb_arena *arena) { struct envoy_type_matcher_PathMatcher* sub = (struct envoy_type_matcher_PathMatcher*)envoy_config_rbac_v2_Permission_url_path(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_PathMatcher*)upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); + sub = (struct envoy_type_matcher_PathMatcher*)_upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Permission_set_url_path(msg, sub); } @@ -343,7 +324,7 @@ UPB_INLINE struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Permissio /* envoy.config.rbac.v2.Permission.Set */ UPB_INLINE envoy_config_rbac_v2_Permission_Set *envoy_config_rbac_v2_Permission_Set_new(upb_arena *arena) { - return (envoy_config_rbac_v2_Permission_Set *)upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); + return (envoy_config_rbac_v2_Permission_Set *)_upb_msg_new(&envoy_config_rbac_v2_Permission_Set_msginit, arena); } UPB_INLINE envoy_config_rbac_v2_Permission_Set *envoy_config_rbac_v2_Permission_Set_parse(const char *buf, size_t size, upb_arena *arena) { @@ -354,16 +335,17 @@ UPB_INLINE char *envoy_config_rbac_v2_Permission_Set_serialize(const envoy_confi return upb_encode(msg, &envoy_config_rbac_v2_Permission_Set_msginit, arena, len); } +UPB_INLINE bool envoy_config_rbac_v2_Permission_Set_has_rules(const envoy_config_rbac_v2_Permission_Set *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_config_rbac_v2_Permission* const* envoy_config_rbac_v2_Permission_Set_rules(const envoy_config_rbac_v2_Permission_Set *msg, size_t *len) { return (const envoy_config_rbac_v2_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_rbac_v2_Permission** envoy_config_rbac_v2_Permission_Set_mutable_rules(envoy_config_rbac_v2_Permission_Set *msg, size_t *len) { return (envoy_config_rbac_v2_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_rbac_v2_Permission** envoy_config_rbac_v2_Permission_Set_resize_rules(envoy_config_rbac_v2_Permission_Set *msg, size_t len, upb_arena *arena) { - return (envoy_config_rbac_v2_Permission**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_rbac_v2_Permission**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Permission_Set_add_rules(envoy_config_rbac_v2_Permission_Set *msg, upb_arena *arena) { - struct envoy_config_rbac_v2_Permission* sub = (struct envoy_config_rbac_v2_Permission*)upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); + struct envoy_config_rbac_v2_Permission* sub = (struct envoy_config_rbac_v2_Permission*)_upb_msg_new(&envoy_config_rbac_v2_Permission_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -373,7 +355,7 @@ UPB_INLINE struct envoy_config_rbac_v2_Permission* envoy_config_rbac_v2_Permissi /* envoy.config.rbac.v2.Principal */ UPB_INLINE envoy_config_rbac_v2_Principal *envoy_config_rbac_v2_Principal_new(upb_arena *arena) { - return (envoy_config_rbac_v2_Principal *)upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); + return (envoy_config_rbac_v2_Principal *)_upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); } UPB_INLINE envoy_config_rbac_v2_Principal *envoy_config_rbac_v2_Principal_parse(const char *buf, size_t size, upb_arena *arena) { @@ -398,29 +380,29 @@ typedef enum { envoy_config_rbac_v2_Principal_identifier_not_id = 8, envoy_config_rbac_v2_Principal_identifier_NOT_SET = 0 } envoy_config_rbac_v2_Principal_identifier_oneofcases; -UPB_INLINE envoy_config_rbac_v2_Principal_identifier_oneofcases envoy_config_rbac_v2_Principal_identifier_case(const envoy_config_rbac_v2_Principal* msg) { return (envoy_config_rbac_v2_Principal_identifier_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_config_rbac_v2_Principal_identifier_oneofcases envoy_config_rbac_v2_Principal_identifier_case(const envoy_config_rbac_v2_Principal* msg) { return (envoy_config_rbac_v2_Principal_identifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_and_ids(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_and_ids(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const envoy_config_rbac_v2_Principal_Set* envoy_config_rbac_v2_Principal_and_ids(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Principal_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_or_ids(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 2); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_or_ids(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; } UPB_INLINE const envoy_config_rbac_v2_Principal_Set* envoy_config_rbac_v2_Principal_or_ids(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Principal_Set*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_any(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 3); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_any(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; } UPB_INLINE bool envoy_config_rbac_v2_Principal_any(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, false); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_authenticated(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 4); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_authenticated(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 4; } UPB_INLINE const envoy_config_rbac_v2_Principal_Authenticated* envoy_config_rbac_v2_Principal_authenticated(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Principal_Authenticated*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 4, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_source_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 5); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_source_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 5; } UPB_INLINE const struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_source_ip(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 5, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_header(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 6); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_header(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 6; } UPB_INLINE const struct envoy_api_v2_route_HeaderMatcher* envoy_config_rbac_v2_Principal_header(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_route_HeaderMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_metadata(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 7); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_metadata(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 7; } UPB_INLINE const struct envoy_type_matcher_MetadataMatcher* envoy_config_rbac_v2_Principal_metadata(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_MetadataMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_not_id(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 8); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_not_id(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 8; } UPB_INLINE const envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Principal_not_id(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const envoy_config_rbac_v2_Principal*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_url_path(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 9); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_url_path(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 9; } UPB_INLINE const struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Principal_url_path(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_PathMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_direct_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 10); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_direct_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 10; } UPB_INLINE const struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_direct_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 10, NULL); } -UPB_INLINE bool envoy_config_rbac_v2_Principal_has_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 11); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_has_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 11; } UPB_INLINE const struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_remote_ip(const envoy_config_rbac_v2_Principal *msg) { return UPB_READ_ONEOF(msg, const struct envoy_api_v2_core_CidrRange*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 11, NULL); } UPB_INLINE void envoy_config_rbac_v2_Principal_set_and_ids(envoy_config_rbac_v2_Principal *msg, envoy_config_rbac_v2_Principal_Set* value) { @@ -429,7 +411,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_and_ids(envoy_config_rbac_v2_ UPB_INLINE struct envoy_config_rbac_v2_Principal_Set* envoy_config_rbac_v2_Principal_mutable_and_ids(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_config_rbac_v2_Principal_Set* sub = (struct envoy_config_rbac_v2_Principal_Set*)envoy_config_rbac_v2_Principal_and_ids(msg); if (sub == NULL) { - sub = (struct envoy_config_rbac_v2_Principal_Set*)upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); + sub = (struct envoy_config_rbac_v2_Principal_Set*)_upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_and_ids(msg, sub); } @@ -441,7 +423,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_or_ids(envoy_config_rbac_v2_P UPB_INLINE struct envoy_config_rbac_v2_Principal_Set* envoy_config_rbac_v2_Principal_mutable_or_ids(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_config_rbac_v2_Principal_Set* sub = (struct envoy_config_rbac_v2_Principal_Set*)envoy_config_rbac_v2_Principal_or_ids(msg); if (sub == NULL) { - sub = (struct envoy_config_rbac_v2_Principal_Set*)upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); + sub = (struct envoy_config_rbac_v2_Principal_Set*)_upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_or_ids(msg, sub); } @@ -456,7 +438,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_authenticated(envoy_config_rb UPB_INLINE struct envoy_config_rbac_v2_Principal_Authenticated* envoy_config_rbac_v2_Principal_mutable_authenticated(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_config_rbac_v2_Principal_Authenticated* sub = (struct envoy_config_rbac_v2_Principal_Authenticated*)envoy_config_rbac_v2_Principal_authenticated(msg); if (sub == NULL) { - sub = (struct envoy_config_rbac_v2_Principal_Authenticated*)upb_msg_new(&envoy_config_rbac_v2_Principal_Authenticated_msginit, arena); + sub = (struct envoy_config_rbac_v2_Principal_Authenticated*)_upb_msg_new(&envoy_config_rbac_v2_Principal_Authenticated_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_authenticated(msg, sub); } @@ -468,7 +450,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_source_ip(envoy_config_rbac_v UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_mutable_source_ip(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)envoy_config_rbac_v2_Principal_source_ip(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); + sub = (struct envoy_api_v2_core_CidrRange*)_upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_source_ip(msg, sub); } @@ -480,7 +462,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_header(envoy_config_rbac_v2_P UPB_INLINE struct envoy_api_v2_route_HeaderMatcher* envoy_config_rbac_v2_Principal_mutable_header(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_api_v2_route_HeaderMatcher* sub = (struct envoy_api_v2_route_HeaderMatcher*)envoy_config_rbac_v2_Principal_header(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_route_HeaderMatcher*)upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); + sub = (struct envoy_api_v2_route_HeaderMatcher*)_upb_msg_new(&envoy_api_v2_route_HeaderMatcher_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_header(msg, sub); } @@ -492,7 +474,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_metadata(envoy_config_rbac_v2 UPB_INLINE struct envoy_type_matcher_MetadataMatcher* envoy_config_rbac_v2_Principal_mutable_metadata(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_type_matcher_MetadataMatcher* sub = (struct envoy_type_matcher_MetadataMatcher*)envoy_config_rbac_v2_Principal_metadata(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_MetadataMatcher*)upb_msg_new(&envoy_type_matcher_MetadataMatcher_msginit, arena); + sub = (struct envoy_type_matcher_MetadataMatcher*)_upb_msg_new(&envoy_type_matcher_MetadataMatcher_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_metadata(msg, sub); } @@ -504,7 +486,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_not_id(envoy_config_rbac_v2_P UPB_INLINE struct envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Principal_mutable_not_id(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_config_rbac_v2_Principal* sub = (struct envoy_config_rbac_v2_Principal*)envoy_config_rbac_v2_Principal_not_id(msg); if (sub == NULL) { - sub = (struct envoy_config_rbac_v2_Principal*)upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); + sub = (struct envoy_config_rbac_v2_Principal*)_upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_not_id(msg, sub); } @@ -516,7 +498,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_url_path(envoy_config_rbac_v2 UPB_INLINE struct envoy_type_matcher_PathMatcher* envoy_config_rbac_v2_Principal_mutable_url_path(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_type_matcher_PathMatcher* sub = (struct envoy_type_matcher_PathMatcher*)envoy_config_rbac_v2_Principal_url_path(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_PathMatcher*)upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); + sub = (struct envoy_type_matcher_PathMatcher*)_upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_url_path(msg, sub); } @@ -528,7 +510,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_direct_remote_ip(envoy_config UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_mutable_direct_remote_ip(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)envoy_config_rbac_v2_Principal_direct_remote_ip(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); + sub = (struct envoy_api_v2_core_CidrRange*)_upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_direct_remote_ip(msg, sub); } @@ -540,7 +522,7 @@ UPB_INLINE void envoy_config_rbac_v2_Principal_set_remote_ip(envoy_config_rbac_v UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_mutable_remote_ip(envoy_config_rbac_v2_Principal *msg, upb_arena *arena) { struct envoy_api_v2_core_CidrRange* sub = (struct envoy_api_v2_core_CidrRange*)envoy_config_rbac_v2_Principal_remote_ip(msg); if (sub == NULL) { - sub = (struct envoy_api_v2_core_CidrRange*)upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); + sub = (struct envoy_api_v2_core_CidrRange*)_upb_msg_new(&envoy_api_v2_core_CidrRange_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_set_remote_ip(msg, sub); } @@ -550,7 +532,7 @@ UPB_INLINE struct envoy_api_v2_core_CidrRange* envoy_config_rbac_v2_Principal_mu /* envoy.config.rbac.v2.Principal.Set */ UPB_INLINE envoy_config_rbac_v2_Principal_Set *envoy_config_rbac_v2_Principal_Set_new(upb_arena *arena) { - return (envoy_config_rbac_v2_Principal_Set *)upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); + return (envoy_config_rbac_v2_Principal_Set *)_upb_msg_new(&envoy_config_rbac_v2_Principal_Set_msginit, arena); } UPB_INLINE envoy_config_rbac_v2_Principal_Set *envoy_config_rbac_v2_Principal_Set_parse(const char *buf, size_t size, upb_arena *arena) { @@ -561,16 +543,17 @@ UPB_INLINE char *envoy_config_rbac_v2_Principal_Set_serialize(const envoy_config return upb_encode(msg, &envoy_config_rbac_v2_Principal_Set_msginit, arena, len); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_Set_has_ids(const envoy_config_rbac_v2_Principal_Set *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const envoy_config_rbac_v2_Principal* const* envoy_config_rbac_v2_Principal_Set_ids(const envoy_config_rbac_v2_Principal_Set *msg, size_t *len) { return (const envoy_config_rbac_v2_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_rbac_v2_Principal** envoy_config_rbac_v2_Principal_Set_mutable_ids(envoy_config_rbac_v2_Principal_Set *msg, size_t *len) { return (envoy_config_rbac_v2_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE envoy_config_rbac_v2_Principal** envoy_config_rbac_v2_Principal_Set_resize_ids(envoy_config_rbac_v2_Principal_Set *msg, size_t len, upb_arena *arena) { - return (envoy_config_rbac_v2_Principal**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (envoy_config_rbac_v2_Principal**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Principal_Set_add_ids(envoy_config_rbac_v2_Principal_Set *msg, upb_arena *arena) { - struct envoy_config_rbac_v2_Principal* sub = (struct envoy_config_rbac_v2_Principal*)upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); + struct envoy_config_rbac_v2_Principal* sub = (struct envoy_config_rbac_v2_Principal*)_upb_msg_new(&envoy_config_rbac_v2_Principal_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -580,7 +563,7 @@ UPB_INLINE struct envoy_config_rbac_v2_Principal* envoy_config_rbac_v2_Principal /* envoy.config.rbac.v2.Principal.Authenticated */ UPB_INLINE envoy_config_rbac_v2_Principal_Authenticated *envoy_config_rbac_v2_Principal_Authenticated_new(upb_arena *arena) { - return (envoy_config_rbac_v2_Principal_Authenticated *)upb_msg_new(&envoy_config_rbac_v2_Principal_Authenticated_msginit, arena); + return (envoy_config_rbac_v2_Principal_Authenticated *)_upb_msg_new(&envoy_config_rbac_v2_Principal_Authenticated_msginit, arena); } UPB_INLINE envoy_config_rbac_v2_Principal_Authenticated *envoy_config_rbac_v2_Principal_Authenticated_parse(const char *buf, size_t size, upb_arena *arena) { @@ -591,15 +574,16 @@ UPB_INLINE char *envoy_config_rbac_v2_Principal_Authenticated_serialize(const en return upb_encode(msg, &envoy_config_rbac_v2_Principal_Authenticated_msginit, arena, len); } -UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Principal_Authenticated_principal_name(const envoy_config_rbac_v2_Principal_Authenticated *msg) { return UPB_FIELD_AT(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0)); } +UPB_INLINE bool envoy_config_rbac_v2_Principal_Authenticated_has_principal_name(const envoy_config_rbac_v2_Principal_Authenticated *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Principal_Authenticated_principal_name(const envoy_config_rbac_v2_Principal_Authenticated *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_matcher_StringMatcher*); } UPB_INLINE void envoy_config_rbac_v2_Principal_Authenticated_set_principal_name(envoy_config_rbac_v2_Principal_Authenticated *msg, struct envoy_type_matcher_StringMatcher* value) { - UPB_FIELD_AT(msg, struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_matcher_StringMatcher*) = value; } UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_config_rbac_v2_Principal_Authenticated_mutable_principal_name(envoy_config_rbac_v2_Principal_Authenticated *msg, upb_arena *arena) { struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)envoy_config_rbac_v2_Principal_Authenticated_principal_name(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + sub = (struct envoy_type_matcher_StringMatcher*)_upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); if (!sub) return NULL; envoy_config_rbac_v2_Principal_Authenticated_set_principal_name(msg, sub); } diff --git a/src/core/ext/upb-generated/envoy/type/matcher/path.upb.h b/src/core/ext/upb-generated/envoy/type/matcher/path.upb.h index 47655a2aa99..34b06e484c6 100644 --- a/src/core/ext/upb-generated/envoy/type/matcher/path.upb.h +++ b/src/core/ext/upb-generated/envoy/type/matcher/path.upb.h @@ -9,7 +9,6 @@ #ifndef ENVOY_TYPE_MATCHER_PATH_PROTO_UPB_H_ #define ENVOY_TYPE_MATCHER_PATH_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -30,7 +29,7 @@ extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; /* envoy.type.matcher.PathMatcher */ UPB_INLINE envoy_type_matcher_PathMatcher *envoy_type_matcher_PathMatcher_new(upb_arena *arena) { - return (envoy_type_matcher_PathMatcher *)upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); + return (envoy_type_matcher_PathMatcher *)_upb_msg_new(&envoy_type_matcher_PathMatcher_msginit, arena); } UPB_INLINE envoy_type_matcher_PathMatcher *envoy_type_matcher_PathMatcher_parse(const char *buf, size_t size, upb_arena *arena) { @@ -45,9 +44,9 @@ typedef enum { envoy_type_matcher_PathMatcher_rule_path = 1, envoy_type_matcher_PathMatcher_rule_NOT_SET = 0 } envoy_type_matcher_PathMatcher_rule_oneofcases; -UPB_INLINE envoy_type_matcher_PathMatcher_rule_oneofcases envoy_type_matcher_PathMatcher_rule_case(const envoy_type_matcher_PathMatcher* msg) { return (envoy_type_matcher_PathMatcher_rule_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 8)); } +UPB_INLINE envoy_type_matcher_PathMatcher_rule_oneofcases envoy_type_matcher_PathMatcher_rule_case(const envoy_type_matcher_PathMatcher* msg) { return (envoy_type_matcher_PathMatcher_rule_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); } -UPB_INLINE bool envoy_type_matcher_PathMatcher_has_path(const envoy_type_matcher_PathMatcher *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(4, 8), 1); } +UPB_INLINE bool envoy_type_matcher_PathMatcher_has_path(const envoy_type_matcher_PathMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; } UPB_INLINE const struct envoy_type_matcher_StringMatcher* envoy_type_matcher_PathMatcher_path(const envoy_type_matcher_PathMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_StringMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); } UPB_INLINE void envoy_type_matcher_PathMatcher_set_path(envoy_type_matcher_PathMatcher *msg, struct envoy_type_matcher_StringMatcher* value) { @@ -56,7 +55,7 @@ UPB_INLINE void envoy_type_matcher_PathMatcher_set_path(envoy_type_matcher_PathM UPB_INLINE struct envoy_type_matcher_StringMatcher* envoy_type_matcher_PathMatcher_mutable_path(envoy_type_matcher_PathMatcher *msg, upb_arena *arena) { struct envoy_type_matcher_StringMatcher* sub = (struct envoy_type_matcher_StringMatcher*)envoy_type_matcher_PathMatcher_path(msg); if (sub == NULL) { - sub = (struct envoy_type_matcher_StringMatcher*)upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); + sub = (struct envoy_type_matcher_StringMatcher*)_upb_msg_new(&envoy_type_matcher_StringMatcher_msginit, arena); if (!sub) return NULL; envoy_type_matcher_PathMatcher_set_path(msg, sub); } diff --git a/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c b/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c index ba15ac0b501..0169d39b4dd 100644 --- a/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +++ b/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c @@ -196,8 +196,8 @@ static const upb_msglayout *const google_api_expr_v1alpha1_SourceInfo_submsgs[1] static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo__fields[4] = { {1, UPB_SIZE(0, 0), 0, 0, 9, 1}, {2, UPB_SIZE(8, 16), 0, 0, 9, 1}, - {3, UPB_SIZE(16, 32), 0, 0, 5, 3}, - {4, UPB_SIZE(20, 40), 0, 0, 11, 3}, + {3, UPB_SIZE(16, 32), 0, 0, 5, _UPB_LABEL_PACKED}, + {4, UPB_SIZE(20, 40), 0, 0, 11, _UPB_LABEL_MAP}, }; const upb_msglayout google_api_expr_v1alpha1_SourceInfo_msginit = { @@ -208,13 +208,13 @@ const upb_msglayout google_api_expr_v1alpha1_SourceInfo_msginit = { static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo_PositionsEntry__fields[2] = { {1, UPB_SIZE(0, 0), 0, 0, 3, 1}, - {2, UPB_SIZE(8, 8), 0, 0, 5, 1}, + {2, UPB_SIZE(8, 16), 0, 0, 5, 1}, }; const upb_msglayout google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit = { NULL, &google_api_expr_v1alpha1_SourceInfo_PositionsEntry__fields[0], - UPB_SIZE(16, 16), 2, false, + UPB_SIZE(16, 32), 2, false, }; static const upb_msglayout_field google_api_expr_v1alpha1_SourcePosition__fields[4] = { diff --git a/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h b/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h index 8a04020469b..a3cab46af1a 100644 --- a/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +++ b/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h @@ -9,7 +9,6 @@ #ifndef GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPB_H_ #define GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPB_H_ -#include "upb/generated_util.h" #include "upb/msg.h" #include "upb/decode.h" #include "upb/encode.h" @@ -68,7 +67,7 @@ extern const upb_msglayout google_protobuf_Timestamp_msginit; /* google.api.expr.v1alpha1.ParsedExpr */ UPB_INLINE google_api_expr_v1alpha1_ParsedExpr *google_api_expr_v1alpha1_ParsedExpr_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_ParsedExpr *)upb_msg_new(&google_api_expr_v1alpha1_ParsedExpr_msginit, arena); + return (google_api_expr_v1alpha1_ParsedExpr *)_upb_msg_new(&google_api_expr_v1alpha1_ParsedExpr_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_ParsedExpr *google_api_expr_v1alpha1_ParsedExpr_parse(const char *buf, size_t size, upb_arena *arena) { @@ -79,28 +78,30 @@ UPB_INLINE char *google_api_expr_v1alpha1_ParsedExpr_serialize(const google_api_ return upb_encode(msg, &google_api_expr_v1alpha1_ParsedExpr_msginit, arena, len); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_expr(const google_api_expr_v1alpha1_ParsedExpr *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(0, 0)); } -UPB_INLINE const google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_source_info(const google_api_expr_v1alpha1_ParsedExpr *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_SourceInfo*, UPB_SIZE(4, 8)); } +UPB_INLINE bool google_api_expr_v1alpha1_ParsedExpr_has_expr(const google_api_expr_v1alpha1_ParsedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_expr(const google_api_expr_v1alpha1_ParsedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const google_api_expr_v1alpha1_Expr*); } +UPB_INLINE bool google_api_expr_v1alpha1_ParsedExpr_has_source_info(const google_api_expr_v1alpha1_ParsedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); } +UPB_INLINE const google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_source_info(const google_api_expr_v1alpha1_ParsedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_SourceInfo*); } UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_set_expr(google_api_expr_v1alpha1_ParsedExpr *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_mutable_expr(google_api_expr_v1alpha1_ParsedExpr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_ParsedExpr_expr(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_ParsedExpr_set_expr(msg, sub); } return sub; } UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_set_source_info(google_api_expr_v1alpha1_ParsedExpr *msg, google_api_expr_v1alpha1_SourceInfo* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_SourceInfo*, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_SourceInfo*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_mutable_source_info(google_api_expr_v1alpha1_ParsedExpr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_SourceInfo* sub = (struct google_api_expr_v1alpha1_SourceInfo*)google_api_expr_v1alpha1_ParsedExpr_source_info(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_SourceInfo*)upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_msginit, arena); + sub = (struct google_api_expr_v1alpha1_SourceInfo*)_upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_ParsedExpr_set_source_info(msg, sub); } @@ -110,7 +111,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ /* google.api.expr.v1alpha1.Expr */ UPB_INLINE google_api_expr_v1alpha1_Expr *google_api_expr_v1alpha1_Expr_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr *)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + return (google_api_expr_v1alpha1_Expr *)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Expr *google_api_expr_v1alpha1_Expr_parse(const char *buf, size_t size, upb_arena *arena) { @@ -131,26 +132,26 @@ typedef enum { google_api_expr_v1alpha1_Expr_expr_kind_comprehension_expr = 9, google_api_expr_v1alpha1_Expr_expr_kind_NOT_SET = 0 } google_api_expr_v1alpha1_Expr_expr_kind_oneofcases; -UPB_INLINE google_api_expr_v1alpha1_Expr_expr_kind_oneofcases google_api_expr_v1alpha1_Expr_expr_kind_case(const google_api_expr_v1alpha1_Expr* msg) { return (google_api_expr_v1alpha1_Expr_expr_kind_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(12, 16)); } +UPB_INLINE google_api_expr_v1alpha1_Expr_expr_kind_oneofcases google_api_expr_v1alpha1_Expr_expr_kind_case(const google_api_expr_v1alpha1_Expr* msg) { return (google_api_expr_v1alpha1_Expr_expr_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 16), int32_t); } -UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_id(const google_api_expr_v1alpha1_Expr *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_const_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 3); } +UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_id(const google_api_expr_v1alpha1_Expr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_const_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 3; } UPB_INLINE const google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Expr_const_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Constant*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 3, NULL); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_ident_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 4); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_ident_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 4; } UPB_INLINE const google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_ident_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Ident*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 4, NULL); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_select_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 5); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_select_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 5; } UPB_INLINE const google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_select_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Select*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 5, NULL); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_call_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 6); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_call_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 6; } UPB_INLINE const google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_call_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Call*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 6, NULL); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_list_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 7); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_list_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 7; } UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_list_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_CreateList*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 7, NULL); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_struct_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 8); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_struct_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 8; } UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_struct_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_CreateStruct*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 8, NULL); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_comprehension_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(12, 16), 9); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_has_comprehension_expr(const google_api_expr_v1alpha1_Expr *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 9; } UPB_INLINE const google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_comprehension_expr(const google_api_expr_v1alpha1_Expr *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr_Comprehension*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 9, NULL); } UPB_INLINE void google_api_expr_v1alpha1_Expr_set_id(google_api_expr_v1alpha1_Expr *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } UPB_INLINE void google_api_expr_v1alpha1_Expr_set_const_expr(google_api_expr_v1alpha1_Expr *msg, google_api_expr_v1alpha1_Constant* value) { UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Constant*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 3); @@ -158,7 +159,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_set_const_expr(google_api_expr_v1a UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Expr_mutable_const_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Expr_const_expr(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Constant*)upb_msg_new(&google_api_expr_v1alpha1_Constant_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Constant*)_upb_msg_new(&google_api_expr_v1alpha1_Constant_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_set_const_expr(msg, sub); } @@ -170,7 +171,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_set_ident_expr(google_api_expr_v1a UPB_INLINE struct google_api_expr_v1alpha1_Expr_Ident* google_api_expr_v1alpha1_Expr_mutable_ident_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr_Ident* sub = (struct google_api_expr_v1alpha1_Expr_Ident*)google_api_expr_v1alpha1_Expr_ident_expr(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr_Ident*)upb_msg_new(&google_api_expr_v1alpha1_Expr_Ident_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr_Ident*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_Ident_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_set_ident_expr(msg, sub); } @@ -182,7 +183,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_set_select_expr(google_api_expr_v1 UPB_INLINE struct google_api_expr_v1alpha1_Expr_Select* google_api_expr_v1alpha1_Expr_mutable_select_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr_Select* sub = (struct google_api_expr_v1alpha1_Expr_Select*)google_api_expr_v1alpha1_Expr_select_expr(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr_Select*)upb_msg_new(&google_api_expr_v1alpha1_Expr_Select_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr_Select*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_Select_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_set_select_expr(msg, sub); } @@ -194,7 +195,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_set_call_expr(google_api_expr_v1al UPB_INLINE struct google_api_expr_v1alpha1_Expr_Call* google_api_expr_v1alpha1_Expr_mutable_call_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr_Call* sub = (struct google_api_expr_v1alpha1_Expr_Call*)google_api_expr_v1alpha1_Expr_call_expr(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr_Call*)upb_msg_new(&google_api_expr_v1alpha1_Expr_Call_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr_Call*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_Call_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_set_call_expr(msg, sub); } @@ -206,7 +207,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_set_list_expr(google_api_expr_v1al UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateList* google_api_expr_v1alpha1_Expr_mutable_list_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr_CreateList* sub = (struct google_api_expr_v1alpha1_Expr_CreateList*)google_api_expr_v1alpha1_Expr_list_expr(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr_CreateList*)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateList_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr_CreateList*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateList_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_set_list_expr(msg, sub); } @@ -218,7 +219,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_set_struct_expr(google_api_expr_v1 UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateStruct* google_api_expr_v1alpha1_Expr_mutable_struct_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr_CreateStruct* sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct*)google_api_expr_v1alpha1_Expr_struct_expr(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct*)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_set_struct_expr(msg, sub); } @@ -230,7 +231,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_set_comprehension_expr(google_api_ UPB_INLINE struct google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v1alpha1_Expr_mutable_comprehension_expr(google_api_expr_v1alpha1_Expr *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr_Comprehension* sub = (struct google_api_expr_v1alpha1_Expr_Comprehension*)google_api_expr_v1alpha1_Expr_comprehension_expr(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr_Comprehension*)upb_msg_new(&google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr_Comprehension*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_set_comprehension_expr(msg, sub); } @@ -240,7 +241,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr_Comprehension* google_api_expr_v /* google.api.expr.v1alpha1.Expr.Ident */ UPB_INLINE google_api_expr_v1alpha1_Expr_Ident *google_api_expr_v1alpha1_Expr_Ident_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr_Ident *)upb_msg_new(&google_api_expr_v1alpha1_Expr_Ident_msginit, arena); + return (google_api_expr_v1alpha1_Expr_Ident *)_upb_msg_new(&google_api_expr_v1alpha1_Expr_Ident_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Expr_Ident *google_api_expr_v1alpha1_Expr_Ident_parse(const char *buf, size_t size, upb_arena *arena) { @@ -251,16 +252,16 @@ UPB_INLINE char *google_api_expr_v1alpha1_Expr_Ident_serialize(const google_api_ return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Ident_msginit, arena, len); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Ident_name(const google_api_expr_v1alpha1_Expr_Ident *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Ident_name(const google_api_expr_v1alpha1_Expr_Ident *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } UPB_INLINE void google_api_expr_v1alpha1_Expr_Ident_set_name(google_api_expr_v1alpha1_Expr_Ident *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } /* google.api.expr.v1alpha1.Expr.Select */ UPB_INLINE google_api_expr_v1alpha1_Expr_Select *google_api_expr_v1alpha1_Expr_Select_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr_Select *)upb_msg_new(&google_api_expr_v1alpha1_Expr_Select_msginit, arena); + return (google_api_expr_v1alpha1_Expr_Select *)_upb_msg_new(&google_api_expr_v1alpha1_Expr_Select_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Expr_Select *google_api_expr_v1alpha1_Expr_Select_parse(const char *buf, size_t size, upb_arena *arena) { @@ -271,33 +272,34 @@ UPB_INLINE char *google_api_expr_v1alpha1_Expr_Select_serialize(const google_api return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Select_msginit, arena, len); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_operand(const google_api_expr_v1alpha1_Expr_Select *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 24)); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Select_field(const google_api_expr_v1alpha1_Expr_Select *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_test_only(const google_api_expr_v1alpha1_Expr_Select *msg) { return UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_has_operand(const google_api_expr_v1alpha1_Expr_Select *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_operand(const google_api_expr_v1alpha1_Expr_Select *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_api_expr_v1alpha1_Expr*); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Select_field(const google_api_expr_v1alpha1_Expr_Select *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_test_only(const google_api_expr_v1alpha1_Expr_Select *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); } UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_operand(google_api_expr_v1alpha1_Expr_Select *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 24)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_mutable_operand(google_api_expr_v1alpha1_Expr_Select *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Select_operand(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_Select_set_operand(msg, sub); } return sub; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_field(google_api_expr_v1alpha1_Expr_Select *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(4, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_test_only(google_api_expr_v1alpha1_Expr_Select *msg, bool value) { - UPB_FIELD_AT(msg, bool, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value; } /* google.api.expr.v1alpha1.Expr.Call */ UPB_INLINE google_api_expr_v1alpha1_Expr_Call *google_api_expr_v1alpha1_Expr_Call_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr_Call *)upb_msg_new(&google_api_expr_v1alpha1_Expr_Call_msginit, arena); + return (google_api_expr_v1alpha1_Expr_Call *)_upb_msg_new(&google_api_expr_v1alpha1_Expr_Call_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Expr_Call *google_api_expr_v1alpha1_Expr_Call_parse(const char *buf, size_t size, upb_arena *arena) { @@ -308,33 +310,35 @@ UPB_INLINE char *google_api_expr_v1alpha1_Expr_Call_serialize(const google_api_e return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Call_msginit, arena, len); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_target(const google_api_expr_v1alpha1_Expr_Call *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 16)); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Call_function(const google_api_expr_v1alpha1_Expr_Call *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Call_has_target(const google_api_expr_v1alpha1_Expr_Call *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_target(const google_api_expr_v1alpha1_Expr_Call *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const google_api_expr_v1alpha1_Expr*); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Call_function(const google_api_expr_v1alpha1_Expr_Call *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Call_has_args(const google_api_expr_v1alpha1_Expr_Call *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); } UPB_INLINE const google_api_expr_v1alpha1_Expr* const* google_api_expr_v1alpha1_Expr_Call_args(const google_api_expr_v1alpha1_Expr_Call *msg, size_t *len) { return (const google_api_expr_v1alpha1_Expr* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_set_target(google_api_expr_v1alpha1_Expr_Call *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_mutable_target(google_api_expr_v1alpha1_Expr_Call *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Call_target(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_Call_set_target(msg, sub); } return sub; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_set_function(google_api_expr_v1alpha1_Expr_Call *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_Call_mutable_args(google_api_expr_v1alpha1_Expr_Call *msg, size_t *len) { return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len); } UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_Call_resize_args(google_api_expr_v1alpha1_Expr_Call *msg, size_t len, upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_add_args(google_api_expr_v1alpha1_Expr_Call *msg, upb_arena *arena) { - struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -344,7 +348,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C /* google.api.expr.v1alpha1.Expr.CreateList */ UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList *google_api_expr_v1alpha1_Expr_CreateList_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr_CreateList *)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateList_msginit, arena); + return (google_api_expr_v1alpha1_Expr_CreateList *)_upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateList_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList *google_api_expr_v1alpha1_Expr_CreateList_parse(const char *buf, size_t size, upb_arena *arena) { @@ -355,16 +359,17 @@ UPB_INLINE char *google_api_expr_v1alpha1_Expr_CreateList_serialize(const google return upb_encode(msg, &google_api_expr_v1alpha1_Expr_CreateList_msginit, arena, len); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateList_has_elements(const google_api_expr_v1alpha1_Expr_CreateList *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); } UPB_INLINE const google_api_expr_v1alpha1_Expr* const* google_api_expr_v1alpha1_Expr_CreateList_elements(const google_api_expr_v1alpha1_Expr_CreateList *msg, size_t *len) { return (const google_api_expr_v1alpha1_Expr* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_CreateList_mutable_elements(google_api_expr_v1alpha1_Expr_CreateList *msg, size_t *len) { return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len); } UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_CreateList_resize_elements(google_api_expr_v1alpha1_Expr_CreateList *msg, size_t len, upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateList_add_elements(google_api_expr_v1alpha1_Expr_CreateList *msg, upb_arena *arena) { - struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -374,7 +379,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C /* google.api.expr.v1alpha1.Expr.CreateStruct */ UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct *google_api_expr_v1alpha1_Expr_CreateStruct_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr_CreateStruct *)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena); + return (google_api_expr_v1alpha1_Expr_CreateStruct *)_upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct *google_api_expr_v1alpha1_Expr_CreateStruct_parse(const char *buf, size_t size, upb_arena *arena) { @@ -385,20 +390,21 @@ UPB_INLINE char *google_api_expr_v1alpha1_Expr_CreateStruct_serialize(const goog return upb_encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena, len); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_CreateStruct_message_name(const google_api_expr_v1alpha1_Expr_CreateStruct *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_CreateStruct_message_name(const google_api_expr_v1alpha1_Expr_CreateStruct *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_has_entries(const google_api_expr_v1alpha1_Expr_CreateStruct *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); } UPB_INLINE const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* const* google_api_expr_v1alpha1_Expr_CreateStruct_entries(const google_api_expr_v1alpha1_Expr_CreateStruct *msg, size_t *len) { return (const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_set_message_name(google_api_expr_v1alpha1_Expr_CreateStruct *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry** google_api_expr_v1alpha1_Expr_CreateStruct_mutable_entries(google_api_expr_v1alpha1_Expr_CreateStruct *msg, size_t *len) { return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len); } UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry** google_api_expr_v1alpha1_Expr_CreateStruct_resize_entries(google_api_expr_v1alpha1_Expr_CreateStruct *msg, size_t len, upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); + return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena); } UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* google_api_expr_v1alpha1_Expr_CreateStruct_add_entries(google_api_expr_v1alpha1_Expr_CreateStruct *msg, upb_arena *arena) { - struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry*)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena); + struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena); bool ok = _upb_array_append_accessor( msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); if (!ok) return NULL; @@ -408,7 +414,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* google_api_e /* google.api.expr.v1alpha1.Expr.CreateStruct.Entry */ UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry *google_api_expr_v1alpha1_Expr_CreateStruct_Entry_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry *)upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena); + return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry *)_upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry *google_api_expr_v1alpha1_Expr_CreateStruct_Entry_parse(const char *buf, size_t size, upb_arena *arena) { @@ -424,17 +430,18 @@ typedef enum { google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_map_key = 3, google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_NOT_SET = 0 } google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases; -UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_case(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) { return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(20, 32)); } +UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_case(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) { return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 32), int32_t); } -UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_CreateStruct_Entry_id(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 2); } +UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_CreateStruct_Entry_id(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 2; } UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_CreateStruct_Entry_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 2, upb_strview_make("", strlen(""))); } -UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(20, 32), 3); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 3; } UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 3, NULL); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 8)); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const google_api_expr_v1alpha1_Expr*); } UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_id(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value; } UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_field_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_strview value) { UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 2); @@ -445,19 +452,19 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_map_key(goo UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_mutable_map_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_map_key(msg, sub); } return sub; } UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_value(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_mutable_value(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_value(msg, sub); } @@ -467,7 +474,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C /* google.api.expr.v1alpha1.Expr.Comprehension */ UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension *google_api_expr_v1alpha1_Expr_Comprehension_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Expr_Comprehension *)upb_msg_new(&google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena); + return (google_api_expr_v1alpha1_Expr_Comprehension *)_upb_msg_new(&google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension *google_api_expr_v1alpha1_Expr_Comprehension_parse(const char *buf, size_t size, upb_arena *arena) { @@ -478,75 +485,80 @@ UPB_INLINE char *google_api_expr_v1alpha1_Expr_Comprehension_serialize(const goo return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena, len); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_iter_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(16, 32)); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_accu_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(20, 40)); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(24, 48)); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(28, 56)); } -UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_result(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return UPB_FIELD_AT(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(32, 64)); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_iter_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const google_api_expr_v1alpha1_Expr*); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_accu_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const google_api_expr_v1alpha1_Expr*); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const google_api_expr_v1alpha1_Expr*); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_api_expr_v1alpha1_Expr*); } +UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_result(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); } +UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_result(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_api_expr_v1alpha1_Expr*); } UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_iter_var(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_iter_range(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(16, 32)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(16, 32), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_iter_range(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_iter_range(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_Comprehension_set_iter_range(msg, sub); } return sub; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_accu_var(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_accu_init(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(20, 40)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(20, 40), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_accu_init(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_accu_init(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_Comprehension_set_accu_init(msg, sub); } return sub; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_loop_condition(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(24, 48)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(24, 48), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_loop_condition(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_Comprehension_set_loop_condition(msg, sub); } return sub; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_loop_step(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(28, 56)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_loop_step(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_loop_step(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_Comprehension_set_loop_step(msg, sub); } return sub; } UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_result(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) { - UPB_FIELD_AT(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(32, 64)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_api_expr_v1alpha1_Expr*) = value; } UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_result(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) { struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_result(msg); if (sub == NULL) { - sub = (struct google_api_expr_v1alpha1_Expr*)upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); + sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Expr_Comprehension_set_result(msg, sub); } @@ -556,7 +568,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C /* google.api.expr.v1alpha1.Constant */ UPB_INLINE google_api_expr_v1alpha1_Constant *google_api_expr_v1alpha1_Constant_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_Constant *)upb_msg_new(&google_api_expr_v1alpha1_Constant_msginit, arena); + return (google_api_expr_v1alpha1_Constant *)_upb_msg_new(&google_api_expr_v1alpha1_Constant_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_Constant *google_api_expr_v1alpha1_Constant_parse(const char *buf, size_t size, upb_arena *arena) { @@ -579,25 +591,25 @@ typedef enum { google_api_expr_v1alpha1_Constant_constant_kind_timestamp_value = 9, google_api_expr_v1alpha1_Constant_constant_kind_NOT_SET = 0 } google_api_expr_v1alpha1_Constant_constant_kind_oneofcases; -UPB_INLINE google_api_expr_v1alpha1_Constant_constant_kind_oneofcases google_api_expr_v1alpha1_Constant_constant_kind_case(const google_api_expr_v1alpha1_Constant* msg) { return (google_api_expr_v1alpha1_Constant_constant_kind_oneofcases)UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 16)); } +UPB_INLINE google_api_expr_v1alpha1_Constant_constant_kind_oneofcases google_api_expr_v1alpha1_Constant_constant_kind_case(const google_api_expr_v1alpha1_Constant* msg) { return (google_api_expr_v1alpha1_Constant_constant_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_null_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 1); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_null_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; } UPB_INLINE int32_t google_api_expr_v1alpha1_Constant_null_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, google_protobuf_NULL_VALUE); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_bool_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 2); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_bool_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; } UPB_INLINE bool google_api_expr_v1alpha1_Constant_bool_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, false); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_int64_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 3); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_int64_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 3; } UPB_INLINE int64_t google_api_expr_v1alpha1_Constant_int64_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, int64_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 3, 0); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_uint64_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 4); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_uint64_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 4; } UPB_INLINE uint64_t google_api_expr_v1alpha1_Constant_uint64_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, uint64_t, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 4, 0); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_double_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 5); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_double_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 5; } UPB_INLINE double google_api_expr_v1alpha1_Constant_double_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, double, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 5, 0); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_string_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 6); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_string_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 6; } UPB_INLINE upb_strview google_api_expr_v1alpha1_Constant_string_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 6, upb_strview_make("", strlen(""))); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_bytes_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 7); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_bytes_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 7; } UPB_INLINE upb_strview google_api_expr_v1alpha1_Constant_bytes_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 7, upb_strview_make("", strlen(""))); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_duration_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 8); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_duration_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 8; } UPB_INLINE const struct google_protobuf_Duration* google_api_expr_v1alpha1_Constant_duration_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Duration*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 8, NULL); } -UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_timestamp_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_has_oneof_field(msg, UPB_SIZE(8, 16), 9); } +UPB_INLINE bool google_api_expr_v1alpha1_Constant_has_timestamp_value(const google_api_expr_v1alpha1_Constant *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 9; } UPB_INLINE const struct google_protobuf_Timestamp* google_api_expr_v1alpha1_Constant_timestamp_value(const google_api_expr_v1alpha1_Constant *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Timestamp*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 9, NULL); } UPB_INLINE void google_api_expr_v1alpha1_Constant_set_null_value(google_api_expr_v1alpha1_Constant *msg, int32_t value) { @@ -627,7 +639,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Constant_set_duration_value(google_api_ UPB_INLINE struct google_protobuf_Duration* google_api_expr_v1alpha1_Constant_mutable_duration_value(google_api_expr_v1alpha1_Constant *msg, upb_arena *arena) { struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)google_api_expr_v1alpha1_Constant_duration_value(msg); if (sub == NULL) { - sub = (struct google_protobuf_Duration*)upb_msg_new(&google_protobuf_Duration_msginit, arena); + sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Constant_set_duration_value(msg, sub); } @@ -639,7 +651,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Constant_set_timestamp_value(google_api UPB_INLINE struct google_protobuf_Timestamp* google_api_expr_v1alpha1_Constant_mutable_timestamp_value(google_api_expr_v1alpha1_Constant *msg, upb_arena *arena) { struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)google_api_expr_v1alpha1_Constant_timestamp_value(msg); if (sub == NULL) { - sub = (struct google_protobuf_Timestamp*)upb_msg_new(&google_protobuf_Timestamp_msginit, arena); + sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena); if (!sub) return NULL; google_api_expr_v1alpha1_Constant_set_timestamp_value(msg, sub); } @@ -649,7 +661,7 @@ UPB_INLINE struct google_protobuf_Timestamp* google_api_expr_v1alpha1_Constant_m /* google.api.expr.v1alpha1.SourceInfo */ UPB_INLINE google_api_expr_v1alpha1_SourceInfo *google_api_expr_v1alpha1_SourceInfo_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_SourceInfo *)upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_msginit, arena); + return (google_api_expr_v1alpha1_SourceInfo *)_upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_SourceInfo *google_api_expr_v1alpha1_SourceInfo_parse(const char *buf, size_t size, upb_arena *arena) { @@ -660,69 +672,56 @@ UPB_INLINE char *google_api_expr_v1alpha1_SourceInfo_serialize(const google_api_ return upb_encode(msg, &google_api_expr_v1alpha1_SourceInfo_msginit, arena, len); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_SourceInfo_syntax_version(const google_api_expr_v1alpha1_SourceInfo *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_SourceInfo_location(const google_api_expr_v1alpha1_SourceInfo *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_SourceInfo_syntax_version(const google_api_expr_v1alpha1_SourceInfo *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_SourceInfo_location(const google_api_expr_v1alpha1_SourceInfo *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); } UPB_INLINE int32_t const* google_api_expr_v1alpha1_SourceInfo_line_offsets(const google_api_expr_v1alpha1_SourceInfo *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); } -UPB_INLINE const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* const* google_api_expr_v1alpha1_SourceInfo_positions(const google_api_expr_v1alpha1_SourceInfo *msg, size_t *len) { return (const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); } +UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_has_positions(const google_api_expr_v1alpha1_SourceInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); } +UPB_INLINE size_t google_api_expr_v1alpha1_SourceInfo_positions_size(const google_api_expr_v1alpha1_SourceInfo *msg) {return _upb_msg_map_size(msg, UPB_SIZE(20, 40)); } +UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_get(const google_api_expr_v1alpha1_SourceInfo *msg, int64_t key, int32_t *val) { return _upb_msg_map_get(msg, UPB_SIZE(20, 40), &key, sizeof(key), val, sizeof(*val)); } +UPB_INLINE const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* google_api_expr_v1alpha1_SourceInfo_positions_next(const google_api_expr_v1alpha1_SourceInfo *msg, size_t* iter) { return (const google_api_expr_v1alpha1_SourceInfo_PositionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter); } UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_set_syntax_version(google_api_expr_v1alpha1_SourceInfo *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value; } UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_set_location(google_api_expr_v1alpha1_SourceInfo *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(8, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value; } UPB_INLINE int32_t* google_api_expr_v1alpha1_SourceInfo_mutable_line_offsets(google_api_expr_v1alpha1_SourceInfo *msg, size_t *len) { return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len); } UPB_INLINE int32_t* google_api_expr_v1alpha1_SourceInfo_resize_line_offsets(google_api_expr_v1alpha1_SourceInfo *msg, size_t len, upb_arena *arena) { - return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_SIZE(4, 4), UPB_TYPE_INT32, arena); + return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_INT32, arena); } UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_add_line_offsets(google_api_expr_v1alpha1_SourceInfo *msg, int32_t val, upb_arena *arena) { - return _upb_array_append_accessor( - msg, UPB_SIZE(16, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, arena); -} -UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry** google_api_expr_v1alpha1_SourceInfo_mutable_positions(google_api_expr_v1alpha1_SourceInfo *msg, size_t *len) { - return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len); -} -UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry** google_api_expr_v1alpha1_SourceInfo_resize_positions(google_api_expr_v1alpha1_SourceInfo *msg, size_t len, upb_arena *arena) { - return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, arena); -} -UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry* google_api_expr_v1alpha1_SourceInfo_add_positions(google_api_expr_v1alpha1_SourceInfo *msg, upb_arena *arena) { - struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry* sub = (struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry*)upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, arena); - bool ok = _upb_array_append_accessor( - msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena); - if (!ok) return NULL; - return sub; + return _upb_array_append_accessor(msg, UPB_SIZE(16, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val, + arena); } +UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_positions_clear(google_api_expr_v1alpha1_SourceInfo *msg) { _upb_msg_map_clear(msg, UPB_SIZE(20, 40)); } +UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_set(google_api_expr_v1alpha1_SourceInfo *msg, int64_t key, int32_t val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(20, 40), &key, sizeof(key), &val, sizeof(val), a); } +UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_delete(google_api_expr_v1alpha1_SourceInfo *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(20, 40), &key, sizeof(key)); } +UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry* google_api_expr_v1alpha1_SourceInfo_positions_nextmutable(google_api_expr_v1alpha1_SourceInfo *msg, size_t* iter) { return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter); } /* google.api.expr.v1alpha1.SourceInfo.PositionsEntry */ -UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry *google_api_expr_v1alpha1_SourceInfo_PositionsEntry_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry *)upb_msg_new(&google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, arena); -} -UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry *google_api_expr_v1alpha1_SourceInfo_PositionsEntry_parse(const char *buf, size_t size, - upb_arena *arena) { - google_api_expr_v1alpha1_SourceInfo_PositionsEntry *ret = google_api_expr_v1alpha1_SourceInfo_PositionsEntry_new(arena); - return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, arena)) ? ret : NULL; +UPB_INLINE int64_t google_api_expr_v1alpha1_SourceInfo_PositionsEntry_key(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg) { + int64_t ret; + _upb_msg_map_key(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE char *google_api_expr_v1alpha1_SourceInfo_PositionsEntry_serialize(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg, upb_arena *arena, size_t *len) { - return upb_encode(msg, &google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, arena, len); +UPB_INLINE int32_t google_api_expr_v1alpha1_SourceInfo_PositionsEntry_value(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg) { + int32_t ret; + _upb_msg_map_value(msg, &ret, sizeof(ret)); + return ret; } -UPB_INLINE int64_t google_api_expr_v1alpha1_SourceInfo_PositionsEntry_key(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg) { return UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)); } -UPB_INLINE int32_t google_api_expr_v1alpha1_SourceInfo_PositionsEntry_value(const google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } - -UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_PositionsEntry_set_key(google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg, int64_t value) { - UPB_FIELD_AT(msg, int64_t, UPB_SIZE(0, 0)) = value; -} UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_PositionsEntry_set_value(google_api_expr_v1alpha1_SourceInfo_PositionsEntry *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + _upb_msg_map_set_value(msg, &value, sizeof(int32_t)); } /* google.api.expr.v1alpha1.SourcePosition */ UPB_INLINE google_api_expr_v1alpha1_SourcePosition *google_api_expr_v1alpha1_SourcePosition_new(upb_arena *arena) { - return (google_api_expr_v1alpha1_SourcePosition *)upb_msg_new(&google_api_expr_v1alpha1_SourcePosition_msginit, arena); + return (google_api_expr_v1alpha1_SourcePosition *)_upb_msg_new(&google_api_expr_v1alpha1_SourcePosition_msginit, arena); } UPB_INLINE google_api_expr_v1alpha1_SourcePosition *google_api_expr_v1alpha1_SourcePosition_parse(const char *buf, size_t size, upb_arena *arena) { @@ -733,22 +732,22 @@ UPB_INLINE char *google_api_expr_v1alpha1_SourcePosition_serialize(const google_ return upb_encode(msg, &google_api_expr_v1alpha1_SourcePosition_msginit, arena, len); } -UPB_INLINE upb_strview google_api_expr_v1alpha1_SourcePosition_location(const google_api_expr_v1alpha1_SourcePosition *msg) { return UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)); } -UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_offset(const google_api_expr_v1alpha1_SourcePosition *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)); } -UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_line(const google_api_expr_v1alpha1_SourcePosition *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)); } -UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_column(const google_api_expr_v1alpha1_SourcePosition *msg) { return UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)); } +UPB_INLINE upb_strview google_api_expr_v1alpha1_SourcePosition_location(const google_api_expr_v1alpha1_SourcePosition *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); } +UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_offset(const google_api_expr_v1alpha1_SourcePosition *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); } +UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_line(const google_api_expr_v1alpha1_SourcePosition *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); } +UPB_INLINE int32_t google_api_expr_v1alpha1_SourcePosition_column(const google_api_expr_v1alpha1_SourcePosition *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); } UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_location(google_api_expr_v1alpha1_SourcePosition *msg, upb_strview value) { - UPB_FIELD_AT(msg, upb_strview, UPB_SIZE(12, 16)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value; } UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_offset(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(0, 0)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value; } UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_line(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(4, 4)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value; } UPB_INLINE void google_api_expr_v1alpha1_SourcePosition_set_column(google_api_expr_v1alpha1_SourcePosition *msg, int32_t value) { - UPB_FIELD_AT(msg, int32_t, UPB_SIZE(8, 8)) = value; + *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value; } #ifdef __cplusplus From 47ec56beb43cfcb37f35572401d28a6101274b7b Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Tue, 5 May 2020 11:34:45 +0200 Subject: [PATCH 058/239] Avoid collisions in cs files generated by Grpc.Tools --- .../Grpc.Tools.Tests/DepFileUtilTest.cs | 28 +++++++++ src/csharp/Grpc.Tools/DepFileUtil.cs | 62 ++++++++++++++++--- src/csharp/Grpc.Tools/GeneratorServices.cs | 11 ++-- src/csharp/Grpc.Tools/ProtoCompile.cs | 22 ++++++- 4 files changed, 106 insertions(+), 17 deletions(-) diff --git a/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs b/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs index e89a8f4b5d3..4da62f5773e 100644 --- a/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs +++ b/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs @@ -67,6 +67,34 @@ namespace Grpc.Tools.Tests Assert.AreNotEqual(unsame1, unsame2); } + [Test] + public void GetOutputDirWithHash_IsSane() + { + StringAssert.IsMatch(@"^out[\\/][a-f0-9]{16}$", + DepFileUtil.GetOutputDirWithHash("out", "foo.proto")); + StringAssert.IsMatch(@"^[a-f0-9]{16}$", + DepFileUtil.GetOutputDirWithHash("", "foo.proto")); + } + + [Test] + public void GetOutputDirWithHash_HashesDir() + { + string PickHash(string fname) => DepFileUtil.GetOutputDirWithHash("", fname); + + string same1 = PickHash("dir1/dir2/foo.proto"); + string same2 = PickHash("dir1/dir2/proto.foo"); + string same3 = PickHash("dir1/dir2/proto"); + string same4 = PickHash("dir1/dir2/.proto"); + string unsame1 = PickHash("dir2/foo.proto"); + string unsame2 = PickHash("/dir2/foo.proto"); + + Assert.AreEqual(same1, same2); + Assert.AreEqual(same1, same3); + Assert.AreEqual(same1, same4); + Assert.AreNotEqual(same1, unsame1); + Assert.AreNotEqual(unsame1, unsame2); + } + ////////////////////////////////////////////////////////////////////////// // Full file reading tests diff --git a/src/csharp/Grpc.Tools/DepFileUtil.cs b/src/csharp/Grpc.Tools/DepFileUtil.cs index 440d3d535c8..15ffed24546 100644 --- a/src/csharp/Grpc.Tools/DepFileUtil.cs +++ b/src/csharp/Grpc.Tools/DepFileUtil.cs @@ -138,6 +138,24 @@ namespace Grpc.Tools return result.ToArray(); } + /// + /// Construct the directory hash from a relative file name + /// + /// Relative path to the proto item, e. g. "foo/file.proto" + /// + /// Directory hash based on the file name, e. g. "deadbeef12345678" + /// + private static string GetDirectoryHash(string proto) + { + string dirname = Path.GetDirectoryName(proto); + if (Platform.IsFsCaseInsensitive) + { + dirname = dirname.ToLowerInvariant(); + } + + return HashString64Hex(dirname); + } + /// /// Construct relative dependency file name from directory hash and file name /// @@ -145,7 +163,7 @@ namespace Grpc.Tools /// Relative path to the proto item, e. g. "foo/file.proto" /// /// Full relative path to the dependency file, e. g. - /// "out/deadbeef12345678_file.protodep" + /// "out/deadbeef12345678/file.protodep" /// /// /// Since a project may contain proto files with the same filename but in different @@ -158,21 +176,45 @@ namespace Grpc.Tools /// project and solution directories, which are also some level deep from the root. /// Instead of creating long and unwieldy names for these proto sources, we cache /// the full path of the name without the filename, and append the filename to it, - /// as in e. g. "foo/file.proto" will yield the name "deadbeef12345678_file", where - /// "deadbeef12345678" is a presumed hash value of the string "foo/". This allows + /// as in e. g. "foo/file.proto" will yield the name "deadbeef12345678/file", where + /// "deadbeef12345678" is a presumed hash value of the string "foo". This allows /// the file names be short, unique (up to a hash collision), and still allowing /// the user to guess their provenance. /// public static string GetDepFilenameForProto(string protoDepDir, string proto) { - string dirname = Path.GetDirectoryName(proto); - if (Platform.IsFsCaseInsensitive) - { - dirname = dirname.ToLowerInvariant(); - } - string dirhash = HashString64Hex(dirname); + string outdir = GetOutputDirWithHash(protoDepDir, proto); string filename = Path.GetFileNameWithoutExtension(proto); - return Path.Combine(protoDepDir, $"{dirhash}_{filename}.protodep"); + return Path.Combine(outdir, $"{filename}.protodep"); + } + + /// + /// Construct relative output directory with directory hash + /// + /// Relative path to the output directory, e. g. "out" + /// Relative path to the proto item, e. g. "foo/file.proto" + /// + /// Full relative path to the directory, e. g. "out/deadbeef12345678" + /// + /// + /// Since a project may contain proto files with the same filename but in different + /// directories, a unique directory for the generated files is constructed based on the + /// proto file names directory. The directory path can be arbitrary, for example, + /// it can be outside of the project, or an absolute path including a drive letter, + /// or a UNC network path. A name constructed from such a path by, for example, + /// replacing disallowed name characters with an underscore, may well be over + /// filesystem's allowed path length, since it will be located under the project + /// and solution directories, which are also some level deep from the root. + /// Instead of creating long and unwieldy names for these proto sources, we cache + /// the full path of the name without the filename, as in e. g. "foo/file.proto" + /// will yield the name "deadbeef12345678", where that is a presumed hash value + /// of the string "foo". This allows the path to be short, unique (up to a hash + /// collision), and still allowing the user to guess their provenance. + /// + public static string GetOutputDirWithHash(string outputDir, string proto) + { + var dirhash = GetDirectoryHash(proto); + return Path.Combine(outputDir, dirhash); } // Get a 64-bit hash for a directory string. We treat it as if it were diff --git a/src/csharp/Grpc.Tools/GeneratorServices.cs b/src/csharp/Grpc.Tools/GeneratorServices.cs index 903dd3dacd9..4e2d2f748f5 100644 --- a/src/csharp/Grpc.Tools/GeneratorServices.cs +++ b/src/csharp/Grpc.Tools/GeneratorServices.cs @@ -67,19 +67,20 @@ namespace Grpc.Tools { bool doGrpc = GrpcOutputPossible(protoItem); var outputs = new string[doGrpc ? 2 : 1]; - string basename = Path.GetFileNameWithoutExtension(protoItem.ItemSpec); + var itemSpec = protoItem.ItemSpec; + string basename = Path.GetFileNameWithoutExtension(itemSpec); - string outdir = protoItem.GetMetadata(Metadata.OutputDir); + string outdir = DepFileUtil.GetOutputDirWithHash(protoItem.GetMetadata(Metadata.OutputDir), itemSpec); string filename = LowerUnderscoreToUpperCamelProtocWay(basename); outputs[0] = Path.Combine(outdir, filename) + ".cs"; if (doGrpc) { - // Override outdir if kGrpcOutputDir present, default to proto output. + // Override outdir if GrpcOutputDir present, default to proto output. string grpcdir = protoItem.GetMetadata(Metadata.GrpcOutputDir); + grpcdir = grpcdir == "" ? outdir : DepFileUtil.GetOutputDirWithHash(grpcdir, itemSpec); filename = LowerUnderscoreToUpperCamelGrpcWay(basename); - outputs[1] = Path.Combine( - grpcdir != "" ? grpcdir : outdir, filename) + "Grpc.cs"; + outputs[1] = Path.Combine(grpcdir, filename) + "Grpc.cs"; } return outputs; } diff --git a/src/csharp/Grpc.Tools/ProtoCompile.cs b/src/csharp/Grpc.Tools/ProtoCompile.cs index 36a0ea36cee..8625c2a5aab 100644 --- a/src/csharp/Grpc.Tools/ProtoCompile.cs +++ b/src/csharp/Grpc.Tools/ProtoCompile.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Text; using System.Text.RegularExpressions; using Microsoft.Build.Framework; @@ -413,16 +414,21 @@ namespace Grpc.Tools // Called by the base ToolTask to get response file contents. protected override string GenerateResponseFileCommands() { + var outDir = TrimEndSlash(MaybeEnhanceOutputDir(OutputDir, Protobuf)); + var grpcOutDir = TrimEndSlash(MaybeEnhanceOutputDir(GrpcOutputDir, Protobuf)); + var cmd = new ProtocResponseFileBuilder(); - cmd.AddSwitchMaybe(Generator + "_out", TrimEndSlash(OutputDir)); + cmd.AddSwitchMaybe(Generator + "_out", outDir); cmd.AddSwitchMaybe(Generator + "_opt", OutputOptions); cmd.AddSwitchMaybe("plugin=protoc-gen-grpc", GrpcPluginExe); - cmd.AddSwitchMaybe("grpc_out", TrimEndSlash(GrpcOutputDir)); + cmd.AddSwitchMaybe("grpc_out", grpcOutDir); cmd.AddSwitchMaybe("grpc_opt", GrpcOutputOptions); if (ProtoPath != null) { foreach (string path in ProtoPath) + { cmd.AddSwitchMaybe("proto_path", TrimEndSlash(path)); + } } cmd.AddSwitchMaybe("dependency_out", DependencyOut); cmd.AddSwitchMaybe("error_format", "msvs"); @@ -433,6 +439,18 @@ namespace Grpc.Tools return cmd.ToString(); } + // If possible, disambiguate output dir by adding a hash of the proto file's path + static string MaybeEnhanceOutputDir(string outputDir, ITaskItem[] protobufs) + { + if (protobufs.Length != 1) + { + return outputDir; + } + + var protoFile = protobufs[0].ItemSpec; + return DepFileUtil.GetOutputDirWithHash(outputDir, protoFile); + } + // Protoc cannot digest trailing slashes in directory names, // curiously under Linux, but not in Windows. static string TrimEndSlash(string dir) From 31cd1000b2ea612904179bbb347f539afdf0ed54 Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Tue, 5 May 2020 11:36:05 +0200 Subject: [PATCH 059/239] Create generated directories --- .../Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets | 1 + 1 file changed, 1 insertion(+) diff --git a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets index 90e6ed7282c..40c5d5bd3dc 100644 --- a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets @@ -261,6 +261,7 @@ + From da4fe1e051a66b29d7c0c177f1bba28f9bc463c4 Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Tue, 5 May 2020 11:47:11 +0200 Subject: [PATCH 060/239] Updated unit tests --- src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs b/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs index 4da62f5773e..6b22e7f1a00 100644 --- a/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs +++ b/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs @@ -41,9 +41,9 @@ namespace Grpc.Tools.Tests [Test] public void GetDepFilenameForProto_IsSane() { - StringAssert.IsMatch(@"^out[\\/][a-f0-9]{16}_foo.protodep$", + StringAssert.IsMatch(@"^out[\\/][a-f0-9]{16}[\\/]foo.protodep$", DepFileUtil.GetDepFilenameForProto("out", "foo.proto")); - StringAssert.IsMatch(@"^[a-f0-9]{16}_foo.protodep$", + StringAssert.IsMatch(@"^[a-f0-9]{16}[\\/]foo.protodep$", DepFileUtil.GetDepFilenameForProto("", "foo.proto")); } From 6bcc37b07cb10d4882be3d3d707963ec39fbec43 Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Tue, 5 May 2020 14:41:40 +0200 Subject: [PATCH 061/239] Reverted GetDepFilenameForProto Otherwise it creates conflicts with non-standard $(Protobuf_DepFilesPath) --- .../Grpc.Tools.Tests/DepFileUtilTest.cs | 4 +- src/csharp/Grpc.Tools/DepFileUtil.cs | 52 ++++++++----------- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs b/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs index 6b22e7f1a00..4da62f5773e 100644 --- a/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs +++ b/src/csharp/Grpc.Tools.Tests/DepFileUtilTest.cs @@ -41,9 +41,9 @@ namespace Grpc.Tools.Tests [Test] public void GetDepFilenameForProto_IsSane() { - StringAssert.IsMatch(@"^out[\\/][a-f0-9]{16}[\\/]foo.protodep$", + StringAssert.IsMatch(@"^out[\\/][a-f0-9]{16}_foo.protodep$", DepFileUtil.GetDepFilenameForProto("out", "foo.proto")); - StringAssert.IsMatch(@"^[a-f0-9]{16}[\\/]foo.protodep$", + StringAssert.IsMatch(@"^[a-f0-9]{16}_foo.protodep$", DepFileUtil.GetDepFilenameForProto("", "foo.proto")); } diff --git a/src/csharp/Grpc.Tools/DepFileUtil.cs b/src/csharp/Grpc.Tools/DepFileUtil.cs index 15ffed24546..0c08fcb72e6 100644 --- a/src/csharp/Grpc.Tools/DepFileUtil.cs +++ b/src/csharp/Grpc.Tools/DepFileUtil.cs @@ -145,6 +145,21 @@ namespace Grpc.Tools /// /// Directory hash based on the file name, e. g. "deadbeef12345678" /// + /// + /// Since a project may contain proto files with the same filename but in different + /// directories, a unique directory for the generated files is constructed based on the + /// proto file names directory. The directory path can be arbitrary, for example, + /// it can be outside of the project, or an absolute path including a drive letter, + /// or a UNC network path. A name constructed from such a path by, for example, + /// replacing disallowed name characters with an underscore, may well be over + /// filesystem's allowed path length, since it will be located under the project + /// and solution directories, which are also some level deep from the root. + /// Instead of creating long and unwieldy names for these proto sources, we cache + /// the full path of the name without the filename, as in e. g. "foo/file.proto" + /// will yield the name "deadbeef12345678", where that is a presumed hash value + /// of the string "foo". This allows the path to be short, unique (up to a hash + /// collision), and still allowing the user to guess their provenance. + /// private static string GetDirectoryHash(string proto) { string dirname = Path.GetDirectoryName(proto); @@ -163,29 +178,16 @@ namespace Grpc.Tools /// Relative path to the proto item, e. g. "foo/file.proto" /// /// Full relative path to the dependency file, e. g. - /// "out/deadbeef12345678/file.protodep" + /// "out/deadbeef12345678_file.protodep" /// /// - /// Since a project may contain proto files with the same filename but in different - /// directories, a unique filename for the dependency file is constructed based on the - /// proto file name both name and directory. The directory path can be arbitrary, - /// for example, it can be outside of the project, or an absolute path including - /// a drive letter, or a UNC network path. A name constructed from such a path by, - /// for example, replacing disallowed name characters with an underscore, may well - /// be over filesystem's allowed path length, since it will be located under the - /// project and solution directories, which are also some level deep from the root. - /// Instead of creating long and unwieldy names for these proto sources, we cache - /// the full path of the name without the filename, and append the filename to it, - /// as in e. g. "foo/file.proto" will yield the name "deadbeef12345678/file", where - /// "deadbeef12345678" is a presumed hash value of the string "foo". This allows - /// the file names be short, unique (up to a hash collision), and still allowing - /// the user to guess their provenance. + /// See for notes on directory hash. /// public static string GetDepFilenameForProto(string protoDepDir, string proto) { - string outdir = GetOutputDirWithHash(protoDepDir, proto); + string dirhash = GetDirectoryHash(proto); string filename = Path.GetFileNameWithoutExtension(proto); - return Path.Combine(outdir, $"{filename}.protodep"); + return Path.Combine(protoDepDir, $"{dirhash}_{filename}.protodep"); } /// @@ -197,23 +199,11 @@ namespace Grpc.Tools /// Full relative path to the directory, e. g. "out/deadbeef12345678" /// /// - /// Since a project may contain proto files with the same filename but in different - /// directories, a unique directory for the generated files is constructed based on the - /// proto file names directory. The directory path can be arbitrary, for example, - /// it can be outside of the project, or an absolute path including a drive letter, - /// or a UNC network path. A name constructed from such a path by, for example, - /// replacing disallowed name characters with an underscore, may well be over - /// filesystem's allowed path length, since it will be located under the project - /// and solution directories, which are also some level deep from the root. - /// Instead of creating long and unwieldy names for these proto sources, we cache - /// the full path of the name without the filename, as in e. g. "foo/file.proto" - /// will yield the name "deadbeef12345678", where that is a presumed hash value - /// of the string "foo". This allows the path to be short, unique (up to a hash - /// collision), and still allowing the user to guess their provenance. + /// See for notes on directory hash. /// public static string GetOutputDirWithHash(string outputDir, string proto) { - var dirhash = GetDirectoryHash(proto); + string dirhash = GetDirectoryHash(proto); return Path.Combine(outputDir, dirhash); } From 906ce37a35427fee4df40c039dbe9ba74c0d9604 Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Tue, 5 May 2020 14:42:17 +0200 Subject: [PATCH 062/239] Improved folder generation --- .../build/_protobuf/Google.Protobuf.Tools.targets | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets index 40c5d5bd3dc..8b286593647 100644 --- a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets @@ -259,9 +259,11 @@ Condition=" '$(DisableProtobufDesignTimeBuild)' != 'true' " DependsOnTargets="Protobuf_PrepareCompileOptions;_Protobuf_GatherStaleFiles"> - - - + + <_Protobuf_ExpectedGenerated Include="@(Protobuf_ExpectedOutputs)" + Condition = " '%(Source)' != '' and '@(_Protobuf_OutOfDateProto)' != '' " /> + + From 5494c54cee7ef72b21cb68014cb6acba3facd3e6 Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Wed, 6 May 2020 15:07:21 +0200 Subject: [PATCH 063/239] Use same logic in csharp as in cpp --- .../Grpc.Tools.Tests/CSharpGeneratorTest.cs | 10 ++ src/csharp/Grpc.Tools/DepFileUtil.cs | 46 ++++++++++ src/csharp/Grpc.Tools/GeneratorServices.cs | 91 +++++++------------ src/csharp/Grpc.Tools/ProtoCompile.cs | 19 +--- src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs | 16 ++++ .../_protobuf/Google.Protobuf.Tools.targets | 13 ++- 6 files changed, 117 insertions(+), 78 deletions(-) diff --git a/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTest.cs b/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTest.cs index 320bb6dc9fc..642ebf92cef 100644 --- a/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTest.cs +++ b/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTest.cs @@ -84,5 +84,15 @@ namespace Grpc.Tools.Tests Assert.AreEqual(1, poss.Length); Assert.That(poss[0], Is.EqualTo("out/Foo.cs") | Is.EqualTo("out\\Foo.cs")); } + + [Test] + public void OutputDirPatched() + { + var item = Utils.MakeItem("sub/foo.proto", "OutputDir", "out"); + _generator.PatchOutputDirectory(item); + var poss = _generator.GetPossibleOutputs(item); + Assert.AreEqual(1, poss.Length); + Assert.That(poss[0], Is.EqualTo("out/sub/Foo.cs") | Is.EqualTo("out\\sub\\Foo.cs")); + } }; } diff --git a/src/csharp/Grpc.Tools/DepFileUtil.cs b/src/csharp/Grpc.Tools/DepFileUtil.cs index 0c08fcb72e6..22fc2d00c24 100644 --- a/src/csharp/Grpc.Tools/DepFileUtil.cs +++ b/src/csharp/Grpc.Tools/DepFileUtil.cs @@ -301,5 +301,51 @@ namespace Grpc.Tools return new string[0]; } } + + // Calculate part of proto path relative to root. Protoc is very picky + // about them matching exactly, so can be we. Expect root be exact prefix + // to proto, minus some slash normalization. + internal static string GetRelativeDir(string root, string proto, TaskLoggingHelper log) + { + string protoDir = Path.GetDirectoryName(proto); + string rootDir = EndWithSlash(Path.GetDirectoryName(EndWithSlash(root))); + if (rootDir == s_dotSlash) + { + // Special case, otherwise we can return "./" instead of "" below! + return protoDir; + } + if (Platform.IsFsCaseInsensitive) + { + protoDir = protoDir.ToLowerInvariant(); + rootDir = rootDir.ToLowerInvariant(); + } + protoDir = EndWithSlash(protoDir); + if (!protoDir.StartsWith(rootDir)) + { + log.LogWarning("Protobuf item '{0}' has the ProtoRoot metadata '{1}' " + + "which is not prefix to its path. Cannot compute relative path.", + proto, root); + return ""; + } + return protoDir.Substring(rootDir.Length); + } + + // './' or '.\', normalized per system. + internal static string s_dotSlash = "." + Path.DirectorySeparatorChar; + + internal static string EndWithSlash(string str) + { + if (str == "") + { + return s_dotSlash; + } + + if (str[str.Length - 1] != '\\' && str[str.Length - 1] != '/') + { + return str + Path.DirectorySeparatorChar; + } + + return str; + } }; } diff --git a/src/csharp/Grpc.Tools/GeneratorServices.cs b/src/csharp/Grpc.Tools/GeneratorServices.cs index 4e2d2f748f5..af4b64c2479 100644 --- a/src/csharp/Grpc.Tools/GeneratorServices.cs +++ b/src/csharp/Grpc.Tools/GeneratorServices.cs @@ -55,7 +55,15 @@ namespace Grpc.Tools && !gsm.EqualNoCase("false"); } - public abstract string[] GetPossibleOutputs(ITaskItem proto); + // Update OutputDir and GrpcOutputDir for the item and all subsequent + // targets using this item. This should only be done if the real + // output directories for protoc should be modified. + public virtual void PatchOutputDirectory(ITaskItem protoItem) + { + // Nothing to do + } + + public abstract string[] GetPossibleOutputs(ITaskItem protoItem); }; // C# generator services. @@ -63,22 +71,40 @@ namespace Grpc.Tools { public CSharpGeneratorServices(TaskLoggingHelper log) : base(log) { } + public override void PatchOutputDirectory(ITaskItem protoItem) + { + string root = protoItem.GetMetadata(Metadata.ProtoRoot); + string proto = protoItem.ItemSpec; + string relative = DepFileUtil.GetRelativeDir(root, proto, Log); + + string outdir = protoItem.GetMetadata(Metadata.OutputDir); + string pathStem = Path.Combine(outdir, relative); + protoItem.SetMetadata(Metadata.OutputDir, pathStem); + + // Override outdir if GrpcOutputDir present, default to proto output. + string grpcdir = protoItem.GetMetadata(Metadata.GrpcOutputDir); + if (grpcdir != "") + { + pathStem = Path.Combine(grpcdir, relative); + } + protoItem.SetMetadata(Metadata.GrpcOutputDir, pathStem); + } + public override string[] GetPossibleOutputs(ITaskItem protoItem) { bool doGrpc = GrpcOutputPossible(protoItem); + string proto = protoItem.ItemSpec; + string basename = Path.GetFileNameWithoutExtension(proto); + var outputs = new string[doGrpc ? 2 : 1]; - var itemSpec = protoItem.ItemSpec; - string basename = Path.GetFileNameWithoutExtension(itemSpec); + string outdir = protoItem.GetMetadata(Metadata.OutputDir); - string outdir = DepFileUtil.GetOutputDirWithHash(protoItem.GetMetadata(Metadata.OutputDir), itemSpec); string filename = LowerUnderscoreToUpperCamelProtocWay(basename); outputs[0] = Path.Combine(outdir, filename) + ".cs"; if (doGrpc) { - // Override outdir if GrpcOutputDir present, default to proto output. string grpcdir = protoItem.GetMetadata(Metadata.GrpcOutputDir); - grpcdir = grpcdir == "" ? outdir : DepFileUtil.GetOutputDirWithHash(grpcdir, itemSpec); filename = LowerUnderscoreToUpperCamelGrpcWay(basename); outputs[1] = Path.Combine(grpcdir, filename) + "Grpc.cs"; } @@ -143,7 +169,7 @@ namespace Grpc.Tools string proto = protoItem.ItemSpec; string filename = Path.GetFileNameWithoutExtension(proto); // E. g., ("foo/", "foo/bar/x.proto") => "bar" - string relative = GetRelativeDir(root, proto); + string relative = DepFileUtil.GetRelativeDir(root, proto, Log); var outputs = new string[doGrpc ? 4 : 2]; string outdir = protoItem.GetMetadata(Metadata.OutputDir); @@ -152,7 +178,7 @@ namespace Grpc.Tools outputs[1] = fileStem + ".pb.h"; if (doGrpc) { - // Override outdir if kGrpcOutputDir present, default to proto output. + // Override outdir if GrpcOutputDir present, default to proto output. outdir = protoItem.GetMetadata(Metadata.GrpcOutputDir); if (outdir != "") { @@ -163,52 +189,5 @@ namespace Grpc.Tools } return outputs; } - - // Calculate part of proto path relative to root. Protoc is very picky - // about them matching exactly, so can be we. Expect root be exact prefix - // to proto, minus some slash normalization. - string GetRelativeDir(string root, string proto) - { - string protoDir = Path.GetDirectoryName(proto); - string rootDir = EndWithSlash(Path.GetDirectoryName(EndWithSlash(root))); - if (rootDir == s_dotSlash) - { - // Special case, otherwise we can return "./" instead of "" below! - return protoDir; - } - if (Platform.IsFsCaseInsensitive) - { - protoDir = protoDir.ToLowerInvariant(); - rootDir = rootDir.ToLowerInvariant(); - } - protoDir = EndWithSlash(protoDir); - if (!protoDir.StartsWith(rootDir)) - { - Log.LogWarning("Protobuf item '{0}' has the ProtoRoot metadata '{1}' " + - "which is not prefix to its path. Cannot compute relative path.", - proto, root); - return ""; - } - return protoDir.Substring(rootDir.Length); - } - - // './' or '.\', normalized per system. - static string s_dotSlash = "." + Path.DirectorySeparatorChar; - - static string EndWithSlash(string str) - { - if (str == "") - { - return s_dotSlash; - } - else if (str[str.Length - 1] != '\\' && str[str.Length - 1] != '/') - { - return str + Path.DirectorySeparatorChar; - } - else - { - return str; - } - } - }; + } } diff --git a/src/csharp/Grpc.Tools/ProtoCompile.cs b/src/csharp/Grpc.Tools/ProtoCompile.cs index 8625c2a5aab..e1f01a554bc 100644 --- a/src/csharp/Grpc.Tools/ProtoCompile.cs +++ b/src/csharp/Grpc.Tools/ProtoCompile.cs @@ -414,14 +414,11 @@ namespace Grpc.Tools // Called by the base ToolTask to get response file contents. protected override string GenerateResponseFileCommands() { - var outDir = TrimEndSlash(MaybeEnhanceOutputDir(OutputDir, Protobuf)); - var grpcOutDir = TrimEndSlash(MaybeEnhanceOutputDir(GrpcOutputDir, Protobuf)); - var cmd = new ProtocResponseFileBuilder(); - cmd.AddSwitchMaybe(Generator + "_out", outDir); + cmd.AddSwitchMaybe(Generator + "_out", TrimEndSlash(OutputDir)); cmd.AddSwitchMaybe(Generator + "_opt", OutputOptions); cmd.AddSwitchMaybe("plugin=protoc-gen-grpc", GrpcPluginExe); - cmd.AddSwitchMaybe("grpc_out", grpcOutDir); + cmd.AddSwitchMaybe("grpc_out", TrimEndSlash(GrpcOutputDir)); cmd.AddSwitchMaybe("grpc_opt", GrpcOutputOptions); if (ProtoPath != null) { @@ -439,18 +436,6 @@ namespace Grpc.Tools return cmd.ToString(); } - // If possible, disambiguate output dir by adding a hash of the proto file's path - static string MaybeEnhanceOutputDir(string outputDir, ITaskItem[] protobufs) - { - if (protobufs.Length != 1) - { - return outputDir; - } - - var protoFile = protobufs[0].ItemSpec; - return DepFileUtil.GetOutputDirWithHash(outputDir, protoFile); - } - // Protoc cannot digest trailing slashes in directory names, // curiously under Linux, but not in Windows. static string TrimEndSlash(string dir) diff --git a/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs b/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs index 24c0dd8482d..ea146ec090e 100644 --- a/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs +++ b/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs @@ -17,6 +17,7 @@ #endregion using System.Collections.Generic; +using System.IO; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; @@ -40,6 +41,14 @@ namespace Grpc.Tools [Required] public ITaskItem[] Protobuf { get; set; } + /// + /// All Proto files in the project. A patched copy of all items from + /// Protobuf that might contain updated OutputDir and GrpcOutputDir + /// attributes. + /// + [Output] + public ITaskItem[] PatchedProtobuf { get; set; } + /// /// Output items per each potential output. We do not look at existing /// cached dependency even if they exist, since file may be refactored, @@ -68,8 +77,13 @@ namespace Grpc.Tools // Get language-specific possible output. The generator expects certain // metadata be set on the proto item. var possible = new List(); + var patched = new List(); foreach (var proto in Protobuf) { + // This operates on a local copy and has no effect on the MSBuild instance! + generator.PatchOutputDirectory(proto); + patched.Add(proto); + var outputs = generator.GetPossibleOutputs(proto); foreach (string output in outputs) { @@ -78,6 +92,8 @@ namespace Grpc.Tools possible.Add(ti); } } + + PatchedProtobuf = patched.ToArray(); PossibleOutputs = possible.ToArray(); return !Log.HasLoggedErrors; diff --git a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets index 8b286593647..eaa228059dd 100644 --- a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets @@ -167,7 +167,13 @@ Protobuf="@(Protobuf_Compile)" Generator="$(Protobuf_Generator)"> + + + + + + - - <_Protobuf_ExpectedGenerated Include="@(Protobuf_ExpectedOutputs)" - Condition = " '%(Source)' != '' and '@(_Protobuf_OutOfDateProto)' != '' " /> - - + + From 18b4dd65621294756264c5693b50c11366164cfc Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Wed, 6 May 2020 15:10:38 +0200 Subject: [PATCH 064/239] Removed unused usings --- src/csharp/Grpc.Tools/Common.cs | 1 - src/csharp/Grpc.Tools/GeneratorServices.cs | 1 - src/csharp/Grpc.Tools/ProtoCompile.cs | 1 - src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs | 1 - 4 files changed, 4 deletions(-) diff --git a/src/csharp/Grpc.Tools/Common.cs b/src/csharp/Grpc.Tools/Common.cs index 13cd6a32316..187ed9d84cb 100644 --- a/src/csharp/Grpc.Tools/Common.cs +++ b/src/csharp/Grpc.Tools/Common.cs @@ -19,7 +19,6 @@ using System; using System.IO; using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; using System.Security; [assembly: InternalsVisibleTo("Grpc.Tools.Tests")] diff --git a/src/csharp/Grpc.Tools/GeneratorServices.cs b/src/csharp/Grpc.Tools/GeneratorServices.cs index af4b64c2479..0ade66972f1 100644 --- a/src/csharp/Grpc.Tools/GeneratorServices.cs +++ b/src/csharp/Grpc.Tools/GeneratorServices.cs @@ -16,7 +16,6 @@ #endregion -using System; using System.IO; using System.Text; using Microsoft.Build.Framework; diff --git a/src/csharp/Grpc.Tools/ProtoCompile.cs b/src/csharp/Grpc.Tools/ProtoCompile.cs index e1f01a554bc..68bd7ef2e02 100644 --- a/src/csharp/Grpc.Tools/ProtoCompile.cs +++ b/src/csharp/Grpc.Tools/ProtoCompile.cs @@ -18,7 +18,6 @@ using System; using System.Collections.Generic; -using System.IO; using System.Text; using System.Text.RegularExpressions; using Microsoft.Build.Framework; diff --git a/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs b/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs index ea146ec090e..3300b3ef0c7 100644 --- a/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs +++ b/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs @@ -17,7 +17,6 @@ #endregion using System.Collections.Generic; -using System.IO; using Microsoft.Build.Framework; using Microsoft.Build.Utilities; From 861cdf3d015d35bdd79ff730c9dd8c171cb497dc Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Wed, 6 May 2020 15:27:37 +0200 Subject: [PATCH 065/239] Reverted whitespace changes --- .../Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets index eaa228059dd..db299b29ff0 100644 --- a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets @@ -265,8 +265,8 @@ Condition=" '$(DisableProtobufDesignTimeBuild)' != 'true' " DependsOnTargets="Protobuf_PrepareCompileOptions;_Protobuf_GatherStaleFiles"> - - + + From d0c7eac97b4c34ced3703c88abeb22120c4361dc Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Wed, 6 May 2020 15:56:28 +0200 Subject: [PATCH 066/239] Readded InteropServices Needed #if NETCORE --- src/csharp/Grpc.Tools/Common.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/csharp/Grpc.Tools/Common.cs b/src/csharp/Grpc.Tools/Common.cs index 187ed9d84cb..13cd6a32316 100644 --- a/src/csharp/Grpc.Tools/Common.cs +++ b/src/csharp/Grpc.Tools/Common.cs @@ -19,6 +19,7 @@ using System; using System.IO; using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; using System.Security; [assembly: InternalsVisibleTo("Grpc.Tools.Tests")] From 446f72d7a35b81c499e4a222f9ee1f5538e35d3a Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Tue, 16 Jun 2020 12:31:32 +0200 Subject: [PATCH 067/239] Bring closer to master --- src/csharp/Grpc.Tools/DepFileUtil.cs | 112 ++++++--------------- src/csharp/Grpc.Tools/GeneratorServices.cs | 54 +++++++++- 2 files changed, 82 insertions(+), 84 deletions(-) diff --git a/src/csharp/Grpc.Tools/DepFileUtil.cs b/src/csharp/Grpc.Tools/DepFileUtil.cs index 22fc2d00c24..c17f4553fcd 100644 --- a/src/csharp/Grpc.Tools/DepFileUtil.cs +++ b/src/csharp/Grpc.Tools/DepFileUtil.cs @@ -138,39 +138,6 @@ namespace Grpc.Tools return result.ToArray(); } - /// - /// Construct the directory hash from a relative file name - /// - /// Relative path to the proto item, e. g. "foo/file.proto" - /// - /// Directory hash based on the file name, e. g. "deadbeef12345678" - /// - /// - /// Since a project may contain proto files with the same filename but in different - /// directories, a unique directory for the generated files is constructed based on the - /// proto file names directory. The directory path can be arbitrary, for example, - /// it can be outside of the project, or an absolute path including a drive letter, - /// or a UNC network path. A name constructed from such a path by, for example, - /// replacing disallowed name characters with an underscore, may well be over - /// filesystem's allowed path length, since it will be located under the project - /// and solution directories, which are also some level deep from the root. - /// Instead of creating long and unwieldy names for these proto sources, we cache - /// the full path of the name without the filename, as in e. g. "foo/file.proto" - /// will yield the name "deadbeef12345678", where that is a presumed hash value - /// of the string "foo". This allows the path to be short, unique (up to a hash - /// collision), and still allowing the user to guess their provenance. - /// - private static string GetDirectoryHash(string proto) - { - string dirname = Path.GetDirectoryName(proto); - if (Platform.IsFsCaseInsensitive) - { - dirname = dirname.ToLowerInvariant(); - } - - return HashString64Hex(dirname); - } - /// /// Construct relative dependency file name from directory hash and file name /// @@ -207,6 +174,39 @@ namespace Grpc.Tools return Path.Combine(outputDir, dirhash); } + /// + /// Construct the directory hash from a relative file name + /// + /// Relative path to the proto item, e. g. "foo/file.proto" + /// + /// Directory hash based on the file name, e. g. "deadbeef12345678" + /// + /// + /// Since a project may contain proto files with the same filename but in different + /// directories, a unique directory for the generated files is constructed based on the + /// proto file names directory. The directory path can be arbitrary, for example, + /// it can be outside of the project, or an absolute path including a drive letter, + /// or a UNC network path. A name constructed from such a path by, for example, + /// replacing disallowed name characters with an underscore, may well be over + /// filesystem's allowed path length, since it will be located under the project + /// and solution directories, which are also some level deep from the root. + /// Instead of creating long and unwieldy names for these proto sources, we cache + /// the full path of the name without the filename, as in e. g. "foo/file.proto" + /// will yield the name "deadbeef12345678", where that is a presumed hash value + /// of the string "foo". This allows the path to be short, unique (up to a hash + /// collision), and still allowing the user to guess their provenance. + /// + private static string GetDirectoryHash(string proto) + { + string dirname = Path.GetDirectoryName(proto); + if (Platform.IsFsCaseInsensitive) + { + dirname = dirname.ToLowerInvariant(); + } + + return HashString64Hex(dirname); + } + // Get a 64-bit hash for a directory string. We treat it as if it were // unique, since there are not so many distinct proto paths in a project. // We take the first 64 bit of the string SHA1. @@ -301,51 +301,5 @@ namespace Grpc.Tools return new string[0]; } } - - // Calculate part of proto path relative to root. Protoc is very picky - // about them matching exactly, so can be we. Expect root be exact prefix - // to proto, minus some slash normalization. - internal static string GetRelativeDir(string root, string proto, TaskLoggingHelper log) - { - string protoDir = Path.GetDirectoryName(proto); - string rootDir = EndWithSlash(Path.GetDirectoryName(EndWithSlash(root))); - if (rootDir == s_dotSlash) - { - // Special case, otherwise we can return "./" instead of "" below! - return protoDir; - } - if (Platform.IsFsCaseInsensitive) - { - protoDir = protoDir.ToLowerInvariant(); - rootDir = rootDir.ToLowerInvariant(); - } - protoDir = EndWithSlash(protoDir); - if (!protoDir.StartsWith(rootDir)) - { - log.LogWarning("Protobuf item '{0}' has the ProtoRoot metadata '{1}' " + - "which is not prefix to its path. Cannot compute relative path.", - proto, root); - return ""; - } - return protoDir.Substring(rootDir.Length); - } - - // './' or '.\', normalized per system. - internal static string s_dotSlash = "." + Path.DirectorySeparatorChar; - - internal static string EndWithSlash(string str) - { - if (str == "") - { - return s_dotSlash; - } - - if (str[str.Length - 1] != '\\' && str[str.Length - 1] != '/') - { - return str + Path.DirectorySeparatorChar; - } - - return str; - } }; } diff --git a/src/csharp/Grpc.Tools/GeneratorServices.cs b/src/csharp/Grpc.Tools/GeneratorServices.cs index 0ade66972f1..efa67e02ab0 100644 --- a/src/csharp/Grpc.Tools/GeneratorServices.cs +++ b/src/csharp/Grpc.Tools/GeneratorServices.cs @@ -63,6 +63,52 @@ namespace Grpc.Tools } public abstract string[] GetPossibleOutputs(ITaskItem protoItem); + + // Calculate part of proto path relative to root. Protoc is very picky + // about them matching exactly, so can be we. Expect root be exact prefix + // to proto, minus some slash normalization. + protected static string GetRelativeDir(string root, string proto, TaskLoggingHelper log) + { + string protoDir = Path.GetDirectoryName(proto); + string rootDir = EndWithSlash(Path.GetDirectoryName(EndWithSlash(root))); + if (rootDir == s_dotSlash) + { + // Special case, otherwise we can return "./" instead of "" below! + return protoDir; + } + if (Platform.IsFsCaseInsensitive) + { + protoDir = protoDir.ToLowerInvariant(); + rootDir = rootDir.ToLowerInvariant(); + } + protoDir = EndWithSlash(protoDir); + if (!protoDir.StartsWith(rootDir)) + { + log.LogWarning("Protobuf item '{0}' has the ProtoRoot metadata '{1}' " + + "which is not prefix to its path. Cannot compute relative path.", + proto, root); + return ""; + } + return protoDir.Substring(rootDir.Length); + } + + // './' or '.\', normalized per system. + protected static string s_dotSlash = "." + Path.DirectorySeparatorChar; + + protected static string EndWithSlash(string str) + { + if (str == "") + { + return s_dotSlash; + } + + if (str[str.Length - 1] != '\\' && str[str.Length - 1] != '/') + { + return str + Path.DirectorySeparatorChar; + } + + return str; + } }; // C# generator services. @@ -74,7 +120,7 @@ namespace Grpc.Tools { string root = protoItem.GetMetadata(Metadata.ProtoRoot); string proto = protoItem.ItemSpec; - string relative = DepFileUtil.GetRelativeDir(root, proto, Log); + string relative = GetRelativeDir(root, proto, Log); string outdir = protoItem.GetMetadata(Metadata.OutputDir); string pathStem = Path.Combine(outdir, relative); @@ -92,12 +138,10 @@ namespace Grpc.Tools public override string[] GetPossibleOutputs(ITaskItem protoItem) { bool doGrpc = GrpcOutputPossible(protoItem); + var outputs = new string[doGrpc ? 2 : 1]; string proto = protoItem.ItemSpec; string basename = Path.GetFileNameWithoutExtension(proto); - - var outputs = new string[doGrpc ? 2 : 1]; string outdir = protoItem.GetMetadata(Metadata.OutputDir); - string filename = LowerUnderscoreToUpperCamelProtocWay(basename); outputs[0] = Path.Combine(outdir, filename) + ".cs"; @@ -168,7 +212,7 @@ namespace Grpc.Tools string proto = protoItem.ItemSpec; string filename = Path.GetFileNameWithoutExtension(proto); // E. g., ("foo/", "foo/bar/x.proto") => "bar" - string relative = DepFileUtil.GetRelativeDir(root, proto, Log); + string relative = GetRelativeDir(root, proto, Log); var outputs = new string[doGrpc ? 4 : 2]; string outdir = protoItem.GetMetadata(Metadata.OutputDir); From e165a33048e2dcb0a122bfddc7f2082133889e72 Mon Sep 17 00:00:00 2001 From: "Kraemer, Benjamin" Date: Tue, 16 Jun 2020 14:13:44 +0200 Subject: [PATCH 068/239] Add support for Protobuf_ProtoRoot --- .../Grpc.Tools.Tests/CSharpGeneratorTest.cs | 4 ++-- src/csharp/Grpc.Tools/GeneratorServices.cs | 19 +++++++++++-------- src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs | 9 ++++----- .../_protobuf/Google.Protobuf.Tools.targets | 1 + 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTest.cs b/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTest.cs index 642ebf92cef..c53f0bdf8d4 100644 --- a/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTest.cs +++ b/src/csharp/Grpc.Tools.Tests/CSharpGeneratorTest.cs @@ -89,8 +89,8 @@ namespace Grpc.Tools.Tests public void OutputDirPatched() { var item = Utils.MakeItem("sub/foo.proto", "OutputDir", "out"); - _generator.PatchOutputDirectory(item); - var poss = _generator.GetPossibleOutputs(item); + var output = _generator.PatchOutputDirectory(item); + var poss = _generator.GetPossibleOutputs(output); Assert.AreEqual(1, poss.Length); Assert.That(poss[0], Is.EqualTo("out/sub/Foo.cs") | Is.EqualTo("out\\sub\\Foo.cs")); } diff --git a/src/csharp/Grpc.Tools/GeneratorServices.cs b/src/csharp/Grpc.Tools/GeneratorServices.cs index efa67e02ab0..0608bb9d54d 100644 --- a/src/csharp/Grpc.Tools/GeneratorServices.cs +++ b/src/csharp/Grpc.Tools/GeneratorServices.cs @@ -57,9 +57,10 @@ namespace Grpc.Tools // Update OutputDir and GrpcOutputDir for the item and all subsequent // targets using this item. This should only be done if the real // output directories for protoc should be modified. - public virtual void PatchOutputDirectory(ITaskItem protoItem) + public virtual ITaskItem PatchOutputDirectory(ITaskItem protoItem) { // Nothing to do + return protoItem; } public abstract string[] GetPossibleOutputs(ITaskItem protoItem); @@ -116,23 +117,25 @@ namespace Grpc.Tools { public CSharpGeneratorServices(TaskLoggingHelper log) : base(log) { } - public override void PatchOutputDirectory(ITaskItem protoItem) + public override ITaskItem PatchOutputDirectory(ITaskItem protoItem) { - string root = protoItem.GetMetadata(Metadata.ProtoRoot); - string proto = protoItem.ItemSpec; + var outputItem = new TaskItem(protoItem); + string root = outputItem.GetMetadata(Metadata.ProtoRoot); + string proto = outputItem.ItemSpec; string relative = GetRelativeDir(root, proto, Log); - string outdir = protoItem.GetMetadata(Metadata.OutputDir); + string outdir = outputItem.GetMetadata(Metadata.OutputDir); string pathStem = Path.Combine(outdir, relative); - protoItem.SetMetadata(Metadata.OutputDir, pathStem); + outputItem.SetMetadata(Metadata.OutputDir, pathStem); // Override outdir if GrpcOutputDir present, default to proto output. - string grpcdir = protoItem.GetMetadata(Metadata.GrpcOutputDir); + string grpcdir = outputItem.GetMetadata(Metadata.GrpcOutputDir); if (grpcdir != "") { pathStem = Path.Combine(grpcdir, relative); } - protoItem.SetMetadata(Metadata.GrpcOutputDir, pathStem); + outputItem.SetMetadata(Metadata.GrpcOutputDir, pathStem); + return outputItem; } public override string[] GetPossibleOutputs(ITaskItem protoItem) diff --git a/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs b/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs index 3300b3ef0c7..0bd9c86a224 100644 --- a/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs +++ b/src/csharp/Grpc.Tools/ProtoCompilerOutputs.cs @@ -79,15 +79,14 @@ namespace Grpc.Tools var patched = new List(); foreach (var proto in Protobuf) { - // This operates on a local copy and has no effect on the MSBuild instance! - generator.PatchOutputDirectory(proto); - patched.Add(proto); + var patchedProto = generator.PatchOutputDirectory(proto); + patched.Add(patchedProto); - var outputs = generator.GetPossibleOutputs(proto); + var outputs = generator.GetPossibleOutputs(patchedProto); foreach (string output in outputs) { var ti = new TaskItem(output); - ti.SetMetadata(Metadata.Source, proto.ItemSpec); + ti.SetMetadata(Metadata.Source, patchedProto.ItemSpec); possible.Add(ti); } } diff --git a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets index db299b29ff0..fa1cf8f9673 100644 --- a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets @@ -135,6 +135,7 @@ %(RelativeDir) + $(Protobuf_ProtoRoot) From 4c4933e056cb2c1889c51242fa8317ea268083df Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 16 Jun 2020 08:40:59 -0400 Subject: [PATCH 069/239] Docs: fix links to quick start pages --- doc/python/sphinx/grpc.rst | 2 +- examples/cpp/README.md | 2 +- examples/cpp/helloworld/README.md | 2 +- examples/python/README.md | 2 +- examples/python/helloworld/README.md | 2 +- src/php/README.md | 32 ++++++++++++++-------------- src/ruby/README.md | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) diff --git a/doc/python/sphinx/grpc.rst b/doc/python/sphinx/grpc.rst index 67867a683e9..665392f28d0 100644 --- a/doc/python/sphinx/grpc.rst +++ b/doc/python/sphinx/grpc.rst @@ -6,7 +6,7 @@ gRPC Tutorial -------- -If you want to see gRPC in action first, visit the `Python Quickstart `_. +If you want to see gRPC in action first, visit the `Python Quickstart `_. Or, if you would like dive in with more extensive usage of gRPC Python, check `gRPC Basics - Python `_ out. diff --git a/examples/cpp/README.md b/examples/cpp/README.md index a0ff629b1a0..5254b30c832 100644 --- a/examples/cpp/README.md +++ b/examples/cpp/README.md @@ -9,5 +9,5 @@ README files. [gRPC Basics]: https://grpc.io/docs/tutorials/basic/cpp [Hello World]: helloworld -[Quick Start]: https://grpc.io/docs/quickstart/cpp +[Quick Start]: https://grpc.io/docs/languages/cpp/quickstart [Route Guide]: route_guide diff --git a/examples/cpp/helloworld/README.md b/examples/cpp/helloworld/README.md index e13c83281a7..a06cc8e3cb2 100644 --- a/examples/cpp/helloworld/README.md +++ b/examples/cpp/helloworld/README.md @@ -3,4 +3,4 @@ You can find a complete set of instructions for building gRPC and running the Hello World app in the [C++ Quick Start][]. -[C++ Quick Start]: https://grpc.io/docs/quickstart/cpp +[C++ Quick Start]: https://grpc.io/docs/languages/cpp/quickstart diff --git a/examples/python/README.md b/examples/python/README.md index 63d61e439b6..be57d89785d 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -1 +1 @@ -[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/quickstart/python.html) +[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/languages/python/quickstart) diff --git a/examples/python/helloworld/README.md b/examples/python/helloworld/README.md index 63d61e439b6..be57d89785d 100644 --- a/examples/python/helloworld/README.md +++ b/examples/python/helloworld/README.md @@ -1 +1 @@ -[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/quickstart/python.html) +[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/languages/python/quickstart) diff --git a/src/php/README.md b/src/php/README.md index 9aa66896684..e3723cd2faf 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -3,7 +3,7 @@ This directory contains source code for PHP implementation of gRPC layered on shared C library. The same installation guides with more examples and -tutorials can be seen at [grpc.io](https://grpc.io/docs/quickstart/php.html). +tutorials can be seen at [grpc.io](https://grpc.io/docs/languages/php/quickstart). gRPC PHP installation instructions for Google Cloud Platform is in [cloud.google.com](https://cloud.google.com/php/grpc). @@ -36,7 +36,7 @@ or specific version $ [sudo] pecl install grpc-1.25.0 ``` -Note: for users on CentOS/RHEL 6, unfortunately this step won’t work. +Note: for users on CentOS/RHEL 6, unfortunately this step won’t work. Please follow the instructions below to compile the PECL extension from source. @@ -74,8 +74,8 @@ $ make $ [sudo] make install ``` -This will compile and install the `grpc` extension into the -standard PHP extension directory. You should be able to run +This will compile and install the `grpc` extension into the +standard PHP extension directory. You should be able to run the [unit tests](#unit-tests), with the `grpc` extension installed. @@ -100,7 +100,7 @@ composer package as well. Add this to your project's `composer.json` file. } ``` -To run tests with generated stub code from `.proto` files, you will also +To run tests with generated stub code from `.proto` files, you will also need the `composer` and `protoc` binaries. You can find out how to get these below. @@ -120,7 +120,7 @@ classes. If you don't have it already, you need to install the protobuf compiler `protoc`, version 3.5.0+ (the newer the better) for the current gRPC version. -If you installed already, make the protobuf version is compatible to the +If you installed already, make the protobuf version is compatible to the grpc version you installed. If you build grpc.so from the souce, you can check the version of grpc inside package.xml file. @@ -128,15 +128,15 @@ The compatibility between the grpc and protobuf version is listed as table below: grpc | protobuf ---- | --- +--- | --- v1.0.0 | 3.0.0(GA) v1.0.1 | 3.0.2 -v1.1.0 | 3.1.0 -v1.2.0 | 3.2.0 -v1.2.0 | 3.2.0 -v1.3.4 | 3.3.0 +v1.1.0 | 3.1.0 +v1.2.0 | 3.2.0 +v1.2.0 | 3.2.0 +v1.3.4 | 3.3.0 v1.3.5 | 3.2.0 -v1.4.0 | 3.3.0 +v1.4.0 | 3.3.0 v1.6.0 | 3.4.0 v1.8.0 | 3.5.0 v1.12.0 | 3.5.2 @@ -197,7 +197,7 @@ version you build this plugin. ### `protobuf` runtime library There are two `protobuf` runtime libraries to choose from. They are identical -in terms of APIs offered. The C implementation provides better performance, +in terms of APIs offered. The C implementation provides better performance, while the native implementation is easier to install. #### C implementation (for better performance) @@ -365,11 +365,11 @@ $client = new Helloworld\GreeterClient('localhost:50051', [ ]); ``` -### Compression +### Compression You can customize the compression behavior on the client side, by specifying the following options when constructing your PHP client. -``` +``` Possible values for grpc.default_compression_algorithm: 0 - No compression 1 - Compress with DEFLATE algorithm @@ -387,7 +387,7 @@ Here's an example on how you can put them all together: ``` $client = new Helloworld\GreeterClient('localhost:50051', [ 'credentials' => Grpc\ChannelCredentials::createInsecure(), - 'grpc.default_compression_algorithm' => 2, + 'grpc.default_compression_algorithm' => 2, 'grpc.default_compression_level' => 2, ]); diff --git a/src/ruby/README.md b/src/ruby/README.md index f6fce3ed22e..8187d7f3b5c 100644 --- a/src/ruby/README.md +++ b/src/ruby/README.md @@ -74,5 +74,5 @@ Directory structure is the layout for [ruby extensions][] [ruby extensions]:http://guides.rubygems.org/gems-with-extensions/ [rubydoc]: http://www.rubydoc.info/gems/grpc -[grpc.io]: https://grpc.io/docs/quickstart/ruby.html +[grpc.io]: https://grpc.io/docs/languages/ruby/quickstart [Debian jessie-backports]:http://backports.debian.org/Instructions/ From 5ac3aa789f28c50419cdbf06981cb429998be9c9 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 16 Jun 2020 08:47:24 -0400 Subject: [PATCH 070/239] Docs: fix links to grpc.io tutorial pages --- doc/python/sphinx/grpc.rst | 2 +- examples/cpp/README.md | 2 +- examples/cpp/route_guide/README.md | 2 +- examples/csharp/Helloworld/README.md | 2 +- examples/csharp/HelloworldLegacyCsproj/README.md | 4 ++-- examples/csharp/RouteGuide/README.md | 2 +- examples/node/README.md | 2 +- examples/node/dynamic_codegen/route_guide/README.md | 2 +- examples/node/static_codegen/route_guide/README.md | 2 +- examples/objective-c/auth_sample/README.md | 2 +- examples/objective-c/helloworld/README.md | 2 +- examples/objective-c/route_guide/README.md | 2 +- examples/php/README.md | 2 +- examples/php/route_guide/README.md | 2 +- examples/python/metadata/README.md | 2 +- examples/python/multiplex/README.md | 2 +- examples/python/route_guide/README.md | 2 +- examples/ruby/README.md | 2 +- examples/ruby/route_guide/README.md | 2 +- src/cpp/README.md | 4 ++-- src/csharp/README.md | 12 ++++++------ 21 files changed, 28 insertions(+), 28 deletions(-) diff --git a/doc/python/sphinx/grpc.rst b/doc/python/sphinx/grpc.rst index 665392f28d0..4717eb12332 100644 --- a/doc/python/sphinx/grpc.rst +++ b/doc/python/sphinx/grpc.rst @@ -7,7 +7,7 @@ Tutorial -------- If you want to see gRPC in action first, visit the `Python Quickstart `_. -Or, if you would like dive in with more extensive usage of gRPC Python, check `gRPC Basics - Python `_ out. +Or, if you would like dive in with more extensive usage of gRPC Python, check `gRPC Basics - Python `_ out. Example diff --git a/examples/cpp/README.md b/examples/cpp/README.md index 5254b30c832..7c281de30c0 100644 --- a/examples/cpp/README.md +++ b/examples/cpp/README.md @@ -7,7 +7,7 @@ For information about the other examples in this directory, see their respective README files. -[gRPC Basics]: https://grpc.io/docs/tutorials/basic/cpp +[gRPC Basics]: https://grpc.io/docs/languages/cpp/basics [Hello World]: helloworld [Quick Start]: https://grpc.io/docs/languages/cpp/quickstart [Route Guide]: route_guide diff --git a/examples/cpp/route_guide/README.md b/examples/cpp/route_guide/README.md index 1d1956d275d..2b2376ca180 100644 --- a/examples/cpp/route_guide/README.md +++ b/examples/cpp/route_guide/README.md @@ -3,4 +3,4 @@ The files in this folder are the samples used in [gRPC Basics: C++][], a detailed tutorial for using gRPC in C++. -[gRPC Basics: C++]:https://grpc.io/docs/tutorials/basic/cpp +[gRPC Basics: C++]:https://grpc.io/docs/languages/cpp/basics diff --git a/examples/csharp/Helloworld/README.md b/examples/csharp/Helloworld/README.md index e4771ee91a1..8897d4fc00c 100644 --- a/examples/csharp/Helloworld/README.md +++ b/examples/csharp/Helloworld/README.md @@ -36,4 +36,4 @@ Tutorial You can find a more detailed tutorial about Grpc in [gRPC Basics: C#][] [helloworld.proto]:../../protos/helloworld.proto -[gRPC Basics: C#]:https://grpc.io/docs/tutorials/basic/csharp.html +[gRPC Basics: C#]:https://grpc.io/docs/languages/csharp/basics diff --git a/examples/csharp/HelloworldLegacyCsproj/README.md b/examples/csharp/HelloworldLegacyCsproj/README.md index 4435faeb086..3f3889fe216 100644 --- a/examples/csharp/HelloworldLegacyCsproj/README.md +++ b/examples/csharp/HelloworldLegacyCsproj/README.md @@ -40,7 +40,7 @@ download all of the NuGet dependencies of gRPC. Using these IDEs, a workaround is as follows: * Obtain a nuget executable for your platform and update it with - `nuget update -self`. + `nuget update -self`. * Navigate to this directory and run `nuget restore`. * Now that packages have been restored into their proper package folder, build the solution from your IDE. @@ -71,4 +71,4 @@ Tutorial You can find a more detailed tutorial in [gRPC Basics: C#][] [helloworld.proto]:../../protos/helloworld.proto -[gRPC Basics: C#]:https://grpc.io/docs/tutorials/basic/csharp.html +[gRPC Basics: C#]:https://grpc.io/docs/languages/csharp/basics diff --git a/examples/csharp/RouteGuide/README.md b/examples/csharp/RouteGuide/README.md index 3cfb14ae9a9..bfdb9e14f06 100644 --- a/examples/csharp/RouteGuide/README.md +++ b/examples/csharp/RouteGuide/README.md @@ -3,4 +3,4 @@ The files in this folder are the samples used in [gRPC Basics: C#][], a detailed tutorial for using gRPC in C#. -[gRPC Basics: C#]:https://grpc.io/docs/tutorials/basic/csharp.html +[gRPC Basics: C#]:https://grpc.io/docs/languages/csharp/basics diff --git a/examples/node/README.md b/examples/node/README.md index 0264e9d66b7..b45488b8b56 100644 --- a/examples/node/README.md +++ b/examples/node/README.md @@ -47,4 +47,4 @@ TUTORIAL You can find a more detailed tutorial in [gRPC Basics: Node.js][] [Install gRPC Node]:../../src/node -[gRPC Basics: Node.js]:https://grpc.io/docs/tutorials/basic/node.html +[gRPC Basics: Node.js]:https://grpc.io/docs/languages/node/basics diff --git a/examples/node/dynamic_codegen/route_guide/README.md b/examples/node/dynamic_codegen/route_guide/README.md index 7d6b0b7debe..fcd147054a6 100644 --- a/examples/node/dynamic_codegen/route_guide/README.md +++ b/examples/node/dynamic_codegen/route_guide/README.md @@ -2,4 +2,4 @@ The files in this folder are the samples used in [gRPC Basics: Node.js][], a detailed tutorial for using gRPC in Node.js. -[gRPC Basics: Node.js]:https://grpc.io/docs/tutorials/basic/node.html +[gRPC Basics: Node.js]:https://grpc.io/docs/languages/node/basics diff --git a/examples/node/static_codegen/route_guide/README.md b/examples/node/static_codegen/route_guide/README.md index 7d6b0b7debe..fcd147054a6 100644 --- a/examples/node/static_codegen/route_guide/README.md +++ b/examples/node/static_codegen/route_guide/README.md @@ -2,4 +2,4 @@ The files in this folder are the samples used in [gRPC Basics: Node.js][], a detailed tutorial for using gRPC in Node.js. -[gRPC Basics: Node.js]:https://grpc.io/docs/tutorials/basic/node.html +[gRPC Basics: Node.js]:https://grpc.io/docs/languages/node/basics diff --git a/examples/objective-c/auth_sample/README.md b/examples/objective-c/auth_sample/README.md index a0063de3f2f..6e90be39b16 100644 --- a/examples/objective-c/auth_sample/README.md +++ b/examples/objective-c/auth_sample/README.md @@ -1,3 +1,3 @@ # OAuth2 on gRPC: Objective-C -This is the supporting code for the tutorial "[OAuth2 on gRPC: Objective-C](https://grpc.io/docs/tutorials/auth/oauth2-objective-c.html)." +This is the supporting code for the tutorial "[OAuth2 on gRPC: Objective-C](https://grpc.io/docs/languages/objective-c/oauth2)." diff --git a/examples/objective-c/helloworld/README.md b/examples/objective-c/helloworld/README.md index c57e07ca931..2bb6d6c7b6d 100644 --- a/examples/objective-c/helloworld/README.md +++ b/examples/objective-c/helloworld/README.md @@ -104,4 +104,4 @@ $ bazel run :HelloWorld --ios_simulator_version='' --ios_sumlator_devic ## Tutorial -You can find a more detailed tutorial in [gRPC Basics: Objective-C](https://grpc.io/docs/tutorials/basic/objective-c.html). +You can find a more detailed tutorial in [gRPC Basics: Objective-C](https://grpc.io/docs/languages/objective/basics-c.html). diff --git a/examples/objective-c/route_guide/README.md b/examples/objective-c/route_guide/README.md index 60e5304651a..d32f1699cb9 100644 --- a/examples/objective-c/route_guide/README.md +++ b/examples/objective-c/route_guide/README.md @@ -1,4 +1,4 @@ # gRPC Basics: Objective-C -This is the supporting code for the tutorial "[gRPC Basics: Objective-C](https://grpc.io/docs/tutorials/basic/objective-c.html)." +This is the supporting code for the tutorial "[gRPC Basics: Objective-C](https://grpc.io/docs/languages/objective/basics-c.html)." diff --git a/examples/php/README.md b/examples/php/README.md index 75b9e6fb829..2182e39628a 100644 --- a/examples/php/README.md +++ b/examples/php/README.md @@ -53,4 +53,4 @@ This requires `php` >= 5.5, `pecl`, `composer` You can find a more detailed tutorial in [gRPC Basics: PHP][] [Node]:https://github.com/grpc/grpc/tree/master/examples/node -[gRPC Basics: PHP]:https://grpc.io/docs/tutorials/basic/php.html +[gRPC Basics: PHP]:https://grpc.io/docs/languages/php/basics diff --git a/examples/php/route_guide/README.md b/examples/php/route_guide/README.md index 6bea70dea03..e5abfbba053 100644 --- a/examples/php/route_guide/README.md +++ b/examples/php/route_guide/README.md @@ -3,4 +3,4 @@ The files in this folder are the samples used in [gRPC Basics: PHP][], a detailed tutorial for using gRPC in PHP. -[gRPC Basics: PHP]:https://grpc.io/docs/tutorials/basic/php.html +[gRPC Basics: PHP]:https://grpc.io/docs/languages/php/basics diff --git a/examples/python/metadata/README.md b/examples/python/metadata/README.md index 5aa75d504a8..26ffa44f6fa 100644 --- a/examples/python/metadata/README.md +++ b/examples/python/metadata/README.md @@ -2,5 +2,5 @@ An example showing how to add custom HTTP2 headers (or [metadata](https://grpc.i HTTP2 supports initial headers and trailing headers, which gRPC utilizes both of them ([learn more](https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md)). -More complete documentation lives at [grpc.io](https://grpc.io/docs/tutorials/basic/python.html). +More complete documentation lives at [grpc.io](https://grpc.io/docs/languages/python/basics). For API reference please see [API](https://grpc.io/grpc/python/grpc.html). diff --git a/examples/python/multiplex/README.md b/examples/python/multiplex/README.md index 2316cd39e88..8afdb4dffeb 100644 --- a/examples/python/multiplex/README.md +++ b/examples/python/multiplex/README.md @@ -1,3 +1,3 @@ An example showing two stubs sharing a channel and two servicers sharing a server. -More complete documentation lives at [grpc.io](https://grpc.io/docs/tutorials/basic/python.html). +More complete documentation lives at [grpc.io](https://grpc.io/docs/languages/python/basics). diff --git a/examples/python/route_guide/README.md b/examples/python/route_guide/README.md index 890e66ebad0..6f7a2f0fdf0 100644 --- a/examples/python/route_guide/README.md +++ b/examples/python/route_guide/README.md @@ -1 +1 @@ -[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/tutorials/basic/python.html) +[This code's documentation lives on the grpc.io site.](https://grpc.io/docs/languages/python/basics) diff --git a/examples/ruby/README.md b/examples/ruby/README.md index c6af1a5a5e8..2a3dec338fe 100644 --- a/examples/ruby/README.md +++ b/examples/ruby/README.md @@ -60,4 +60,4 @@ You can find a more detailed tutorial in [gRPC Basics: Ruby][] [helloworld.proto]:../protos/helloworld.proto [RVM]:https://www.rvm.io/ [Install gRPC ruby]:../../src/ruby#installation -[gRPC Basics: Ruby]:https://grpc.io/docs/tutorials/basic/ruby.html +[gRPC Basics: Ruby]:https://grpc.io/docs/languages/ruby/basics diff --git a/examples/ruby/route_guide/README.md b/examples/ruby/route_guide/README.md index 12537c859e1..83501d4babf 100644 --- a/examples/ruby/route_guide/README.md +++ b/examples/ruby/route_guide/README.md @@ -3,4 +3,4 @@ The files in this folder are the samples used in [gRPC Basics: Ruby][], a detailed tutorial for using gRPC in Ruby. -[gRPC Basics: Ruby]:https://grpc.io/docs/tutorials/basic/ruby.html +[gRPC Basics: Ruby]:https://grpc.io/docs/languages/ruby/basics diff --git a/src/cpp/README.md b/src/cpp/README.md index 4f2dbc6014b..967a0a43b7f 100755 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -167,10 +167,10 @@ documentation site at [grpc.io](https://grpc.io), specifically: * [Overview](https://grpc.io/docs): An introduction to gRPC with a simple Hello World example in all our supported languages, including C++. -* [gRPC Basics - C++](https://grpc.io/docs/tutorials/basic/cpp): +* [gRPC Basics - C++](https://grpc.io/docs/languages/cpp/basics): A tutorial that steps you through creating a simple gRPC C++ example application. -* [Asynchronous Basics - C++](https://grpc.io/docs/tutorials/async/helloasync-cpp): +* [Asynchronous Basics - C++](https://grpc.io/docs/languages/cpp/async): A tutorial that shows you how to use gRPC C++'s asynchronous/non-blocking APIs. diff --git a/src/csharp/README.md b/src/csharp/README.md index 089588254fd..f45d6e33706 100644 --- a/src/csharp/README.md +++ b/src/csharp/README.md @@ -18,7 +18,7 @@ The following documentation is for the original gRPC C# implementation only (the SUPPORTED PLATFORMS ------------------ -- [.NET Core](https://dotnet.github.io/) on Linux, Windows and Mac OS X +- [.NET Core](https://dotnet.github.io/) on Linux, Windows and Mac OS X - .NET Framework 4.5+ (Windows) - Mono 4+ on Linux, Windows and Mac OS X @@ -39,7 +39,7 @@ HOW TO USE - Open Visual Studio and start a new project/solution (alternatively, you can create a new project from command line with `dotnet` SDK) -- Add the [Grpc](https://www.nuget.org/packages/Grpc/) NuGet package as a dependency (Project options -> Manage NuGet Packages). +- Add the [Grpc](https://www.nuget.org/packages/Grpc/) NuGet package as a dependency (Project options -> Manage NuGet Packages). - To be able to generate code from Protocol Buffer (`.proto`) file definitions, add the [Grpc.Tools](https://www.nuget.org/packages/Grpc.Tools/) NuGet package which provides [code generation integrated into your build](BUILD-INTEGRATION.md). @@ -78,11 +78,11 @@ If you are a user of gRPC C#, go to Usage section above. **Windows, Linux or Mac OS X** - The easiest way to build is using the `run_tests.py` script that will take care of building the `grpc_csharp_ext` native library. - + ``` - # NOTE: make sure all necessary git submodules with dependencies + # NOTE: make sure all necessary git submodules with dependencies # are available by running "git submodule update --init" - + # from the gRPC repository root $ python tools/run_tests/run_tests.py -l csharp -c dbg --build_only ``` @@ -126,4 +126,4 @@ Internally, gRPC C# uses a native library written in C (gRPC C core) and invokes [API Reference]: https://grpc.io/grpc/csharp/api/Grpc.Core.html [Helloworld Example]: ../../examples/csharp/Helloworld -[RouteGuide Tutorial]: https://grpc.io/docs/tutorials/basic/csharp.html +[RouteGuide Tutorial]: https://grpc.io/docs/languages/csharp/basics From ff391fef8b6a9e1f855f035520819a02ddb5b24b Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 16 Jun 2020 08:53:21 -0400 Subject: [PATCH 071/239] Fix broken link to Objective-C tutorial --- examples/objective-c/helloworld/README.md | 2 +- examples/objective-c/route_guide/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/objective-c/helloworld/README.md b/examples/objective-c/helloworld/README.md index 2bb6d6c7b6d..2fa390dc917 100644 --- a/examples/objective-c/helloworld/README.md +++ b/examples/objective-c/helloworld/README.md @@ -104,4 +104,4 @@ $ bazel run :HelloWorld --ios_simulator_version='' --ios_sumlator_devic ## Tutorial -You can find a more detailed tutorial in [gRPC Basics: Objective-C](https://grpc.io/docs/languages/objective/basics-c.html). +You can find a more detailed tutorial in [gRPC Basics: Objective-C](https://grpc.io/docs/languages/objective-c/basics). diff --git a/examples/objective-c/route_guide/README.md b/examples/objective-c/route_guide/README.md index d32f1699cb9..4cc57ceb58e 100644 --- a/examples/objective-c/route_guide/README.md +++ b/examples/objective-c/route_guide/README.md @@ -1,4 +1,4 @@ # gRPC Basics: Objective-C -This is the supporting code for the tutorial "[gRPC Basics: Objective-C](https://grpc.io/docs/languages/objective/basics-c.html)." +This is the supporting code for the tutorial "[gRPC Basics: Objective-C](https://grpc.io/docs/languages/objective-c/basics)." From 891ca8a4435a2100438b4099a2d7ee176bbfb05a Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 16 Jun 2020 08:57:05 -0400 Subject: [PATCH 072/239] Guides links updates --- tools/run_tests/performance/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/performance/README.md b/tools/run_tests/performance/README.md index 6b41e97809c..1d0949882a9 100644 --- a/tools/run_tests/performance/README.md +++ b/tools/run_tests/performance/README.md @@ -1,7 +1,7 @@ # Overview of performance test suite, with steps for manual runs: For design of the tests, see -https://grpc.io/docs/guides/benchmarking.html. +https://grpc.io/docs/guides/benchmarking. ## Pre-reqs for running these manually: In general the benchmark workers and driver build scripts expect From bd9cd82621b44585d5a054de4b673e0c379100f3 Mon Sep 17 00:00:00 2001 From: Amanda Tarafa Mas Date: Thu, 9 Jan 2020 13:39:39 +0000 Subject: [PATCH 073/239] Updates Google.Apis.Auth dependency from v1.21.0 to 1.46.0. --- src/csharp/Grpc.Auth/Grpc.Auth.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.csproj b/src/csharp/Grpc.Auth/Grpc.Auth.csproj index 1e559c19872..a6f70eae260 100755 --- a/src/csharp/Grpc.Auth/Grpc.Auth.csproj +++ b/src/csharp/Grpc.Auth/Grpc.Auth.csproj @@ -1,4 +1,4 @@ - + @@ -33,7 +33,7 @@ - + From 7b9ee30caa009789a5310a2793322d286828e48e Mon Sep 17 00:00:00 2001 From: Amanda Tarafa Mas Date: Thu, 9 Jan 2020 16:13:53 +0000 Subject: [PATCH 074/239] Support for ITokenAccessWithHeaders --- .../Grpc.Auth/GoogleAuthInterceptors.cs | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs b/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs index e6c973431d7..b3ffe356972 100644 --- a/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs +++ b/src/csharp/Grpc.Auth/GoogleAuthInterceptors.cs @@ -16,7 +16,6 @@ #endregion -using System; using System.Threading; using System.Threading.Tasks; @@ -43,6 +42,11 @@ namespace Grpc.Auth /// The interceptor. public static AsyncAuthInterceptor FromCredential(ITokenAccess credential) { + if (credential is ITokenAccessWithHeaders credentialWithHeaders) + { + return FromCredential(credentialWithHeaders); + } + return new AsyncAuthInterceptor(async (context, metadata) => { var accessToken = await credential.GetAccessTokenForRequestAsync(context.ServiceUrl, CancellationToken.None).ConfigureAwait(false); @@ -50,6 +54,28 @@ namespace Grpc.Auth }); } + /// + /// Creates an that will obtain access token and associated information + /// from any credential type that implements + /// + /// The credential to use to obtain access tokens. + /// The interceptor. + public static AsyncAuthInterceptor FromCredential(ITokenAccessWithHeaders credential) + { + return new AsyncAuthInterceptor(async (context, metadata) => + { + AccessTokenWithHeaders tokenAndHeaders = await credential.GetAccessTokenWithHeadersForRequestAsync(context.ServiceUrl, CancellationToken.None).ConfigureAwait(false); + metadata.Add(CreateBearerTokenHeader(tokenAndHeaders.AccessToken)); + foreach (var header in tokenAndHeaders.Headers) + { + foreach (var headerValue in header.Value) + { + metadata.Add(new Metadata.Entry(header.Key, headerValue)); + } + } + }); + } + /// /// Creates an that will use given access token as authorization. /// From 65ecbbde6103a8cae6c7937fde4d5ab922e82526 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 16 Jun 2020 10:45:14 -0700 Subject: [PATCH 075/239] Make grpc_artifact_centos6 updated --- tools/dockerfile/grpc_artifact_centos6_x64/Dockerfile | 1 + tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/dockerfile/grpc_artifact_centos6_x64/Dockerfile b/tools/dockerfile/grpc_artifact_centos6_x64/Dockerfile index d60d591852d..e765c876165 100644 --- a/tools/dockerfile/grpc_artifact_centos6_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_centos6_x64/Dockerfile @@ -13,6 +13,7 @@ # limitations under the License. # Docker file for building gRPC artifacts. +# Updated: 2020-06-16 ################## # Base diff --git a/tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile b/tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile index f03cdd441b1..3e71c5439a5 100644 --- a/tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile @@ -13,6 +13,7 @@ # limitations under the License. # Docker file for building gRPC artifacts. +# Updated: 2020-06-16 ################## # Base From 65590e1dd3eb7ac062f8201ca1ec4978d67eb0ef Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 16 Jun 2020 11:15:58 -0700 Subject: [PATCH 076/239] Make rvm install 32bit artifacts explicitly on i686 --- tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile b/tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile index 3e71c5439a5..0afe909f5c9 100644 --- a/tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_centos6_x86/Dockerfile @@ -32,7 +32,7 @@ RUN gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A RUN \curl -sSL https://get.rvm.io | bash -s stable # Install Ruby 2.6 -RUN /bin/bash -l -c "rvm install ruby-2.6" +RUN /bin/bash -l -c "rvm install ruby-2.6 --32" RUN /bin/bash -l -c "rvm use --default ruby-2.6" RUN /bin/bash -l -c "echo 'gem: --no-document' > ~/.gemrc" RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" From 83e679fad1ccb6b4e3ddcb768e4d6c4f44dd8420 Mon Sep 17 00:00:00 2001 From: yulin-liang Date: Tue, 16 Jun 2020 11:16:28 -0700 Subject: [PATCH 077/239] Objc update WKT generated import paths. --- src/compiler/objective_c_plugin.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 2738a733d1f..5a5fa0e4082 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -52,15 +52,16 @@ inline ::grpc::string ImportProtoHeaders( ::grpc::string base_name = header; grpc_generator::StripPrefix(&base_name, "google/protobuf/"); + ::grpc::string file_name = "GPB" + base_name; // create the import code snippet ::grpc::string framework_header = - ::grpc::string(ProtobufLibraryFrameworkName) + "/" + base_name; + ::grpc::string(ProtobufLibraryFrameworkName) + "/" + file_name; static const ::grpc::string kFrameworkImportsCondition = "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS"; return PreprocIfElse(kFrameworkImportsCondition, indent + SystemImport(framework_header), - indent + LocalImport(header)); + indent + LocalImport(file_name)); } } // namespace From b42402839eb679c8e442a5b4c323f3d393147032 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 16 Jun 2020 14:01:22 -0700 Subject: [PATCH 078/239] Pass repo manager duty to nicolasnoble --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/cleanup_request.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/ISSUE_TEMPLATE/question.md | 2 +- .github/pull_request_template.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 663fcbde3fb..d103ec92af2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Report a bug about: Create a report to help us improve labels: kind/bug, priority/P2 -assignees: markdroth +assignees: nicolasnoble --- diff --git a/.github/ISSUE_TEMPLATE/cleanup_request.md b/.github/ISSUE_TEMPLATE/cleanup_request.md index cd547e286c1..284797c9e59 100644 --- a/.github/ISSUE_TEMPLATE/cleanup_request.md +++ b/.github/ISSUE_TEMPLATE/cleanup_request.md @@ -2,7 +2,7 @@ name: Request a cleanup about: Suggest a cleanup in our repository labels: kind/internal cleanup, priority/P2 -assignees: markdroth +assignees: nicolasnoble --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 717752f9207..f538eae6194 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Request a feature about: Suggest an idea for this project labels: kind/enhancement, priority/P2 -assignees: markdroth +assignees: nicolasnoble --- diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index 48f55c83d73..da5741aa267 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -2,7 +2,7 @@ name: Ask a question about: Ask a question labels: kind/question, priority/P3 -assignees: markdroth +assignees: nicolasnoble --- diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a85cfad9c7a..57af6c21597 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,4 +8,4 @@ If you know who should review your pull request, please remove the mentioning be --> -@markdroth +@nicolasnoble From 50c4dd363727983cc480a41f138bf4d0b1b2a604 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 17 Jun 2020 13:36:29 +0200 Subject: [PATCH 079/239] Improve third_party readme --- third_party/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/third_party/README.md b/third_party/README.md index 76f6d67aafb..fc035cb814c 100644 --- a/third_party/README.md +++ b/third_party/README.md @@ -25,6 +25,16 @@ gRPC depends on several third-party libraries, their source code is available Also keep in mind that adding a new dependency can be quite disruptive for the users and community - it means that all users will need to update their projects accordingly (for C++ projects often non-trivial) and the community-provided C++ packages (e.g. vcpkg) will need to be updated as well. + +## Checklist for adding a new third-party dependency + +**READ THIS BEFORE YOU ADD A NEW DEPENDENCY** + +- [ ] Make sure you understand the hidden costs of adding a dependency (see section above) and that you understand the complexities of updating the build files. Maintenance of the build files isn't for free, so expect to be involved in maintenance tasks, cleanup and support (e.g resolving user bugs) of the build files in the future. + +- [ ] Once your change is ready, start an [adhoc run of artifact - packages - distribtests flow](https://fusion.corp.google.com/projectanalysis/summary/KOKORO/prod%3Agrpc%2Fcore%2Fexperimental%2Fgrpc_build_artifacts_multiplatform) and make sure everything passes (for technical reasons, not all the distribtests can run on each PR automatically). + +- [ ] Check the impact of the new dependency on the size of our distribution packages (compare BEFORE and AFTER) and post the comparison on your PR (it should not be approved without checking the impact sizes of packages first). The package sizes AFTER can be obtained from the adhoc package build from bullet point above. ## Instructions for updating dependencies @@ -34,6 +44,7 @@ Usually the process is 2. update the dependency in `grpc_deps.bzl` to the same commit 3. update `tools/run_tests/sanity/check_submodules.sh` to make the sanity test pass 4. (when needed) run `tools/buildgen/generate_projects.sh` to regenerate the generated files +5. populate the bazel download mirror by running `bazel/update_mirror.sh` Updating some dependencies requires extra care. From 08e117ae806225fd704ab4221c1014b5fa495482 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Wed, 17 Jun 2020 16:12:59 -0700 Subject: [PATCH 080/239] Improve build slightly --- setup.py | 1 + src/python/grpcio/_parallel_compile_patch.py | 5 ++- src/python/grpcio/commands.py | 45 +++++++++++++++++++- 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 807d005899d..3f27ebd4c14 100644 --- a/setup.py +++ b/setup.py @@ -383,6 +383,7 @@ COMMAND_CLASS = { 'build_py': commands.BuildPy, 'build_ext': commands.BuildExt, 'gather': commands.Gather, + 'clean': commands.Clean, } # Ensure that package data is copied over before any commands have been run: diff --git a/src/python/grpcio/_parallel_compile_patch.py b/src/python/grpcio/_parallel_compile_patch.py index b34aa17fd0b..e4d50c38311 100644 --- a/src/python/grpcio/_parallel_compile_patch.py +++ b/src/python/grpcio/_parallel_compile_patch.py @@ -22,7 +22,10 @@ import os try: BUILD_EXT_COMPILER_JOBS = int( - os.environ.get('GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS', '1')) + os.environ['GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS']) +except KeyError: + import multiprocessing + BUILD_EXT_COMPILER_JOBS = multiprocessing.cpu_count() except ValueError: BUILD_EXT_COMPILER_JOBS = 1 diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index b9106826b5d..6d7a286632d 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -13,6 +13,8 @@ # limitations under the License. """Provides distutils command classes for the GRPC Python setup process.""" +from __future__ import print_function + import distutils import glob import os @@ -218,7 +220,10 @@ class BuildExt(build_ext.build_ext): if platform.system() != 'Windows': return False # TODO(lidiz) Remove the generated a.out for success tests. - cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'], + cc_test = subprocess.Popen([ + distutils.ccompiler.executable_filename, '-x', 'c', + '-std=c++11', '-' + ], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -290,3 +295,41 @@ class Gather(setuptools.Command): self.distribution.install_requires) if self.test and self.distribution.tests_require: self.distribution.fetch_build_eggs(self.distribution.tests_require) + + +class Clean(setuptools.Command): + """Command to clean build artifacts.""" + + description = 'Clean build artifacts.' + user_options = [] + + _FILE_PATTERNS = [ + 'python_build', + 'src/python/grpcio/__pycache__/', + 'src/python/grpcio/grpc/_cython/cygrpc.cpp', + 'src/python/grpcio/grpc/_cython/*.so', + 'src/python/grpcio/grpcio.egg-info/', + ] + _CURRENT_DIRECTORY = os.path.normpath( + os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../..")) + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + for path_spec in self._FILE_PATTERNS: + this_glob = os.path.normpath( + os.path.join(Clean._CURRENT_DIRECTORY, path_spec)) + abs_paths = glob.glob(this_glob) + for path in abs_paths: + if not str(path).startswith(Clean._CURRENT_DIRECTORY): + raise ValueError( + "Cowardly refusing to delete {}.".format(path)) + print("Removing {}".format(os.path.relpath(path))) + if os.path.isfile(path): + os.remove(str(path)) + else: + shutil.rmtree(str(path)) From f22e247183876cffbb3768eb73199fd31eb277fd Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Wed, 17 Jun 2020 22:00:15 -0700 Subject: [PATCH 081/239] Add script to install all Python modules --- tools/distrib/install_all_python_modules.sh | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 tools/distrib/install_all_python_modules.sh diff --git a/tools/distrib/install_all_python_modules.sh b/tools/distrib/install_all_python_modules.sh new file mode 100755 index 00000000000..fd036cb9a5e --- /dev/null +++ b/tools/distrib/install_all_python_modules.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +echo "It's recommended that you run this script from a virtual environment." + +set -e + +BASEDIR=$(dirname "$0") +BASEDIR=$(realpath "$BASEDIR")/../.. + +(cd "$BASEDIR"; + pip install cython; + python setup.py install; + pushd tools/distrib/python/grpcio_tools; + ../make_grpcio_tools.py + GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install . + popd; + pushd src/python; + for PACKAGE in ./grpcio_*; do + pushd "${PACKAGE}"; + python setup.py preprocess; + python setup.py install; + popd; + done + popd; +) From edcf2100503e4aa658df1f57b37973c05cb4370b Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Wed, 17 Jun 2020 22:00:54 -0700 Subject: [PATCH 082/239] Use proper compiler --- src/python/grpcio/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 6d7a286632d..61332995393 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -221,7 +221,7 @@ class BuildExt(build_ext.build_ext): return False # TODO(lidiz) Remove the generated a.out for success tests. cc_test = subprocess.Popen([ - distutils.ccompiler.executable_filename, '-x', 'c', + self.compiler.compiler[0], '-x', 'c', '-std=c++11', '-' ], stdin=subprocess.PIPE, From d74e52ad8509309ee6c338d7147ad2740a673fa7 Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Wed, 17 Jun 2020 22:52:03 -0700 Subject: [PATCH 083/239] Use grpc health checks for PHP and Ruby xDS tests The test suite now dynamically updates the server's health status (via the gRPC health service) to simulate failing backends; this requires grpc health checks, which means the --use_stable_apis flag is no longer compatible with these checks (it should probably be removed, but will leave that for a follow-up). --- tools/internal_ci/linux/grpc_xds_php_test_in_docker.sh | 1 - tools/internal_ci/linux/grpc_xds_ruby_test_in_docker.sh | 1 - tools/run_tests/run_xds_tests.py | 6 +++++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/internal_ci/linux/grpc_xds_php_test_in_docker.sh b/tools/internal_ci/linux/grpc_xds_php_test_in_docker.sh index b6b1b168a98..0d1deffcf5e 100755 --- a/tools/internal_ci/linux/grpc_xds_php_test_in_docker.sh +++ b/tools/internal_ci/linux/grpc_xds_php_test_in_docker.sh @@ -65,6 +65,5 @@ GRPC_VERBOSITY=debug GRPC_TRACE=xds_client,xds_resolver,xds_routing_lb,cds_lb,ed --source_image=projects/grpc-testing/global/images/xds-test-server \ --path_to_server_binary=/java_server/grpc-java/interop-testing/build/install/grpc-interop-testing/bin/xds-test-server \ --gcp_suffix=$(date '+%s') \ - --only_stable_gcp_apis \ --verbose \ --client_cmd='php -d extension=grpc.so -d extension=pthreads.so src/php/tests/interop/xds_client.php --server=xds:///{server_uri} --stats_port={stats_port} --qps={qps}' diff --git a/tools/internal_ci/linux/grpc_xds_ruby_test_in_docker.sh b/tools/internal_ci/linux/grpc_xds_ruby_test_in_docker.sh index 6f381729fa9..c88f6e3e5f3 100644 --- a/tools/internal_ci/linux/grpc_xds_ruby_test_in_docker.sh +++ b/tools/internal_ci/linux/grpc_xds_ruby_test_in_docker.sh @@ -55,6 +55,5 @@ GRPC_VERBOSITY=debug GRPC_TRACE=xds_client,xds_resolver,xds_routing_lb,cds_lb,ed --source_image=projects/grpc-testing/global/images/xds-test-server \ --path_to_server_binary=/java_server/grpc-java/interop-testing/build/install/grpc-interop-testing/bin/xds-test-server \ --gcp_suffix=$(date '+%s') \ - --only_stable_gcp_apis \ --verbose \ --client_cmd='ruby src/ruby/pb/test/xds_client.rb --server=xds:///{server_uri} --stats_port={stats_port} --qps={qps}' diff --git a/tools/run_tests/run_xds_tests.py b/tools/run_tests/run_xds_tests.py index 81c913f5795..3073d301ded 100755 --- a/tools/run_tests/run_xds_tests.py +++ b/tools/run_tests/run_xds_tests.py @@ -186,8 +186,12 @@ argp.add_argument('--log_client_output', help='Log captured client output', default=False, action='store_true') +# TODO(ericgribkoff) Remove this flag once all test environments are verified to +# have access to the alpha compute APIs. argp.add_argument('--only_stable_gcp_apis', - help='Do not use alpha compute APIs', + help='Do not use alpha compute APIs. Some tests may be ' + 'incompatible with this option (gRPC health checks are ' + 'currently alpha and required for simulating server failure', default=False, action='store_true') args = argp.parse_args() From af222241a7f7adb8ab49ea4a027c7464cab3e25e Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Thu, 18 Jun 2020 10:40:31 -0700 Subject: [PATCH 084/239] Give up on getting compiler executable from distutils --- src/python/grpcio/commands.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 61332995393..dc441a2efd6 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -220,10 +220,7 @@ class BuildExt(build_ext.build_ext): if platform.system() != 'Windows': return False # TODO(lidiz) Remove the generated a.out for success tests. - cc_test = subprocess.Popen([ - self.compiler.compiler[0], '-x', 'c', - '-std=c++11', '-' - ], + cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) From e994c9550265204ed662c0ef9b25b83374898937 Mon Sep 17 00:00:00 2001 From: yulin-liang Date: Thu, 18 Jun 2020 11:50:04 -0700 Subject: [PATCH 085/239] Fix flaky test:ios-test-cronettests --- .../xcshareddata/xcschemes/CronetTests.xcscheme | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme index 0156c906971..16d3d4e62fd 100644 --- a/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme +++ b/src/objective-c/tests/Tests.xcodeproj/xcshareddata/xcschemes/CronetTests.xcscheme @@ -44,8 +44,6 @@ - - - - + + + + Date: Thu, 18 Jun 2020 12:45:02 -0700 Subject: [PATCH 086/239] Add ConfigSelector API. --- BUILD | 2 + BUILD.gn | 2 + CMakeLists.txt | 2 + Makefile | 2 + build_autogenerated.yaml | 4 + config.m4 | 1 + config.w32 | 1 + gRPC-C++.podspec | 2 + gRPC-Core.podspec | 3 + grpc.gemspec | 2 + grpc.gyp | 2 + package.xml | 2 + .../filters/client_channel/client_channel.cc | 588 +++++++++++------- .../filters/client_channel/config_selector.cc | 62 ++ .../filters/client_channel/config_selector.h | 91 +++ .../client_channel/resolving_lb_policy.cc | 61 +- .../client_channel/resolving_lb_policy.h | 57 +- src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.c++.internal | 2 + tools/doxygen/Doxyfile.core.internal | 2 + 20 files changed, 603 insertions(+), 286 deletions(-) create mode 100644 src/core/ext/filters/client_channel/config_selector.cc create mode 100644 src/core/ext/filters/client_channel/config_selector.h diff --git a/BUILD b/BUILD index 99750d060cc..48c1c1cffb7 100644 --- a/BUILD +++ b/BUILD @@ -1028,6 +1028,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/client_channel_channelz.cc", "src/core/ext/filters/client_channel/client_channel_factory.cc", "src/core/ext/filters/client_channel/client_channel_plugin.cc", + "src/core/ext/filters/client_channel/config_selector.cc", "src/core/ext/filters/client_channel/global_subchannel_pool.cc", "src/core/ext/filters/client_channel/health/health_check_client.cc", "src/core/ext/filters/client_channel/http_connect_handshaker.cc", @@ -1055,6 +1056,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/client_channel.h", "src/core/ext/filters/client_channel/client_channel_channelz.h", "src/core/ext/filters/client_channel/client_channel_factory.h", + "src/core/ext/filters/client_channel/config_selector.h", "src/core/ext/filters/client_channel/connector.h", "src/core/ext/filters/client_channel/global_subchannel_pool.h", "src/core/ext/filters/client_channel/health/health_check_client.h", diff --git a/BUILD.gn b/BUILD.gn index 378250dd2c0..2d9c2593a5a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -211,6 +211,8 @@ config("grpc_config") { "src/core/ext/filters/client_channel/client_channel_factory.cc", "src/core/ext/filters/client_channel/client_channel_factory.h", "src/core/ext/filters/client_channel/client_channel_plugin.cc", + "src/core/ext/filters/client_channel/config_selector.cc", + "src/core/ext/filters/client_channel/config_selector.h", "src/core/ext/filters/client_channel/connector.h", "src/core/ext/filters/client_channel/global_subchannel_pool.cc", "src/core/ext/filters/client_channel/global_subchannel_pool.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e0c695a5bc..3666c7cdcb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1328,6 +1328,7 @@ add_library(grpc src/core/ext/filters/client_channel/client_channel_channelz.cc src/core/ext/filters/client_channel/client_channel_factory.cc src/core/ext/filters/client_channel/client_channel_plugin.cc + src/core/ext/filters/client_channel/config_selector.cc src/core/ext/filters/client_channel/global_subchannel_pool.cc src/core/ext/filters/client_channel/health/health_check_client.cc src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -1999,6 +2000,7 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/client_channel_channelz.cc src/core/ext/filters/client_channel/client_channel_factory.cc src/core/ext/filters/client_channel/client_channel_plugin.cc + src/core/ext/filters/client_channel/config_selector.cc src/core/ext/filters/client_channel/global_subchannel_pool.cc src/core/ext/filters/client_channel/health/health_check_client.cc src/core/ext/filters/client_channel/http_connect_handshaker.cc diff --git a/Makefile b/Makefile index 83c7600a698..a57b45bfd02 100644 --- a/Makefile +++ b/Makefile @@ -3630,6 +3630,7 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/client_channel_channelz.cc \ src/core/ext/filters/client_channel/client_channel_factory.cc \ src/core/ext/filters/client_channel/client_channel_plugin.cc \ + src/core/ext/filters/client_channel/config_selector.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/health/health_check_client.cc \ src/core/ext/filters/client_channel/http_connect_handshaker.cc \ @@ -4275,6 +4276,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/client_channel_channelz.cc \ src/core/ext/filters/client_channel/client_channel_factory.cc \ src/core/ext/filters/client_channel/client_channel_plugin.cc \ + src/core/ext/filters/client_channel/config_selector.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/health/health_check_client.cc \ src/core/ext/filters/client_channel/http_connect_handshaker.cc \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 5f09c7b3e73..e71ab653e9e 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -377,6 +377,7 @@ libs: - src/core/ext/filters/client_channel/client_channel.h - src/core/ext/filters/client_channel/client_channel_channelz.h - src/core/ext/filters/client_channel/client_channel_factory.h + - src/core/ext/filters/client_channel/config_selector.h - src/core/ext/filters/client_channel/connector.h - src/core/ext/filters/client_channel/global_subchannel_pool.h - src/core/ext/filters/client_channel/health/health_check_client.h @@ -746,6 +747,7 @@ libs: - src/core/ext/filters/client_channel/client_channel_channelz.cc - src/core/ext/filters/client_channel/client_channel_factory.cc - src/core/ext/filters/client_channel/client_channel_plugin.cc + - src/core/ext/filters/client_channel/config_selector.cc - src/core/ext/filters/client_channel/global_subchannel_pool.cc - src/core/ext/filters/client_channel/health/health_check_client.cc - src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -1300,6 +1302,7 @@ libs: - src/core/ext/filters/client_channel/client_channel.h - src/core/ext/filters/client_channel/client_channel_channelz.h - src/core/ext/filters/client_channel/client_channel_factory.h + - src/core/ext/filters/client_channel/config_selector.h - src/core/ext/filters/client_channel/connector.h - src/core/ext/filters/client_channel/global_subchannel_pool.h - src/core/ext/filters/client_channel/health/health_check_client.h @@ -1605,6 +1608,7 @@ libs: - src/core/ext/filters/client_channel/client_channel_channelz.cc - src/core/ext/filters/client_channel/client_channel_factory.cc - src/core/ext/filters/client_channel/client_channel_plugin.cc + - src/core/ext/filters/client_channel/config_selector.cc - src/core/ext/filters/client_channel/global_subchannel_pool.cc - src/core/ext/filters/client_channel/health/health_check_client.cc - src/core/ext/filters/client_channel/http_connect_handshaker.cc diff --git a/config.m4 b/config.m4 index cd1019abcd9..5ee9f1c8d58 100644 --- a/config.m4 +++ b/config.m4 @@ -45,6 +45,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/client_channel_channelz.cc \ src/core/ext/filters/client_channel/client_channel_factory.cc \ src/core/ext/filters/client_channel/client_channel_plugin.cc \ + src/core/ext/filters/client_channel/config_selector.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/health/health_check_client.cc \ src/core/ext/filters/client_channel/http_connect_handshaker.cc \ diff --git a/config.w32 b/config.w32 index 8109f9103af..1c533a33302 100644 --- a/config.w32 +++ b/config.w32 @@ -14,6 +14,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\client_channel_channelz.cc " + "src\\core\\ext\\filters\\client_channel\\client_channel_factory.cc " + "src\\core\\ext\\filters\\client_channel\\client_channel_plugin.cc " + + "src\\core\\ext\\filters\\client_channel\\config_selector.cc " + "src\\core\\ext\\filters\\client_channel\\global_subchannel_pool.cc " + "src\\core\\ext\\filters\\client_channel\\health\\health_check_client.cc " + "src\\core\\ext\\filters\\client_channel\\http_connect_handshaker.cc " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 8851119c07f..f34c2cb79a7 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -227,6 +227,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_channelz.h', 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/config_selector.h', 'src/core/ext/filters/client_channel/connector.h', 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/health/health_check_client.h', @@ -687,6 +688,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_channelz.h', 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/config_selector.h', 'src/core/ext/filters/client_channel/connector.h', 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/health/health_check_client.h', diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 695768422c2..aaf5609a9c3 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -195,6 +195,8 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/client_channel_factory.cc', 'src/core/ext/filters/client_channel/client_channel_factory.h', 'src/core/ext/filters/client_channel/client_channel_plugin.cc', + 'src/core/ext/filters/client_channel/config_selector.cc', + 'src/core/ext/filters/client_channel/config_selector.h', 'src/core/ext/filters/client_channel/connector.h', 'src/core/ext/filters/client_channel/global_subchannel_pool.cc', 'src/core/ext/filters/client_channel/global_subchannel_pool.h', @@ -1051,6 +1053,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/client_channel.h', 'src/core/ext/filters/client_channel/client_channel_channelz.h', 'src/core/ext/filters/client_channel/client_channel_factory.h', + 'src/core/ext/filters/client_channel/config_selector.h', 'src/core/ext/filters/client_channel/connector.h', 'src/core/ext/filters/client_channel/global_subchannel_pool.h', 'src/core/ext/filters/client_channel/health/health_check_client.h', diff --git a/grpc.gemspec b/grpc.gemspec index af04b9d9de4..881f55a81c2 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -117,6 +117,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/client_channel_factory.cc ) s.files += %w( src/core/ext/filters/client_channel/client_channel_factory.h ) s.files += %w( src/core/ext/filters/client_channel/client_channel_plugin.cc ) + s.files += %w( src/core/ext/filters/client_channel/config_selector.cc ) + s.files += %w( src/core/ext/filters/client_channel/config_selector.h ) s.files += %w( src/core/ext/filters/client_channel/connector.h ) s.files += %w( src/core/ext/filters/client_channel/global_subchannel_pool.cc ) s.files += %w( src/core/ext/filters/client_channel/global_subchannel_pool.h ) diff --git a/grpc.gyp b/grpc.gyp index 4022227f5e3..e8bed76e891 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -440,6 +440,7 @@ 'src/core/ext/filters/client_channel/client_channel_channelz.cc', 'src/core/ext/filters/client_channel/client_channel_factory.cc', 'src/core/ext/filters/client_channel/client_channel_plugin.cc', + 'src/core/ext/filters/client_channel/config_selector.cc', 'src/core/ext/filters/client_channel/global_subchannel_pool.cc', 'src/core/ext/filters/client_channel/health/health_check_client.cc', 'src/core/ext/filters/client_channel/http_connect_handshaker.cc', @@ -947,6 +948,7 @@ 'src/core/ext/filters/client_channel/client_channel_channelz.cc', 'src/core/ext/filters/client_channel/client_channel_factory.cc', 'src/core/ext/filters/client_channel/client_channel_plugin.cc', + 'src/core/ext/filters/client_channel/config_selector.cc', 'src/core/ext/filters/client_channel/global_subchannel_pool.cc', 'src/core/ext/filters/client_channel/health/health_check_client.cc', 'src/core/ext/filters/client_channel/http_connect_handshaker.cc', diff --git a/package.xml b/package.xml index 0166a778789..262c66a6ac3 100644 --- a/package.xml +++ b/package.xml @@ -97,6 +97,8 @@ + + diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index d8af25d8f2f..8533be0fe2b 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -40,6 +40,7 @@ #include "src/core/ext/filters/client_channel/backend_metric.h" #include "src/core/ext/filters/client_channel/backup_poller.h" +#include "src/core/ext/filters/client_channel/config_selector.h" #include "src/core/ext/filters/client_channel/global_subchannel_pool.h" #include "src/core/ext/filters/client_channel/http_connect_handshaker.h" #include "src/core/ext/filters/client_channel/lb_policy_registry.h" @@ -149,12 +150,16 @@ class ChannelData { bool received_service_config_data() const { return received_service_config_data_; } + grpc_error* resolver_transient_failure_error() const { + return resolver_transient_failure_error_; + } RefCountedPtr retry_throttle_data() const { return retry_throttle_data_; } RefCountedPtr service_config() const { return service_config_; } + ConfigSelector* config_selector() const { return config_selector_.get(); } WorkSerializer* work_serializer() const { return work_serializer_.get(); } RefCountedPtr GetConnectedSubchannelInDataPlane( @@ -234,6 +239,29 @@ class ChannelData { Atomic done_{false}; }; + class ChannelConfigHelper + : public ResolvingLoadBalancingPolicy::ChannelConfigHelper { + public: + explicit ChannelConfigHelper(ChannelData* chand) : chand_(chand) {} + + ApplyServiceConfigResult ApplyServiceConfig( + const Resolver::Result& result) override; + + void ApplyConfigSelector( + bool service_config_changed, + RefCountedPtr config_selector) override; + + void ResolverTransientFailure(grpc_error* error) override; + + private: + static void ProcessLbPolicy( + const Resolver::Result& resolver_result, + const internal::ClientChannelGlobalParsedConfig* parsed_service_config, + RefCountedPtr* lb_policy_config); + + ChannelData* chand_; + }; + ChannelData(grpc_channel_element_args* args, grpc_error** error); ~ChannelData(); @@ -241,30 +269,20 @@ class ChannelData { grpc_connectivity_state state, const char* reason, std::unique_ptr picker); - void UpdateServiceConfigLocked( - RefCountedPtr retry_throttle_data, - RefCountedPtr service_config); + void UpdateServiceConfigInDataPlaneLocked( + bool service_config_changed, + RefCountedPtr config_selector); void CreateResolvingLoadBalancingPolicyLocked(); void DestroyResolvingLoadBalancingPolicyLocked(); - static bool ProcessResolverResultLocked( - void* arg, const Resolver::Result& result, - RefCountedPtr* lb_policy_config, - grpc_error** service_config_error, bool* no_valid_service_config); - grpc_error* DoPingLocked(grpc_transport_op* op); void StartTransportOpLocked(grpc_transport_op* op); void TryToConnectLocked(); - void ProcessLbPolicy( - const Resolver::Result& resolver_result, - const internal::ClientChannelGlobalParsedConfig* parsed_service_config, - RefCountedPtr* lb_policy_config); - // // Fields set at construction and never modified. // @@ -278,6 +296,7 @@ class ChannelData { grpc_core::UniquePtr server_name_; grpc_core::UniquePtr target_uri_; channelz::ChannelNode* channelz_node_; + ChannelConfigHelper channel_config_helper_; // // Fields used in the data plane. Guarded by data_plane_mu. @@ -286,9 +305,11 @@ class ChannelData { std::unique_ptr picker_; QueuedPick* queued_picks_ = nullptr; // Linked list of queued picks. // Data from service config. + grpc_error* resolver_transient_failure_error_ = GRPC_ERROR_NONE; bool received_service_config_data_ = false; RefCountedPtr retry_throttle_data_; RefCountedPtr service_config_; + RefCountedPtr config_selector_; // // Fields used in the control plane. Guarded by work_serializer. @@ -300,6 +321,7 @@ class ChannelData { ConnectivityStateTracker state_tracker_; grpc_core::UniquePtr health_check_service_name_; RefCountedPtr saved_service_config_; + RefCountedPtr saved_config_selector_; bool received_first_resolver_result_ = false; // The number of SubchannelWrapper instances referencing a given Subchannel. std::map subchannel_refcount_map_; @@ -352,9 +374,6 @@ class CallData { RefCountedPtr subchannel_call() { return subchannel_call_; } - // Invoked by channel for queued picks once resolver results are available. - void MaybeApplyServiceConfigToCallLocked(grpc_call_element* elem); - // Invoked by channel for queued picks when the picker is updated. static void PickSubchannel(void* arg, grpc_error* error); @@ -742,13 +761,17 @@ class CallData { void CreateSubchannelCall(grpc_call_element* elem); // Invoked when a pick is completed, on both success or failure. static void PickDone(void* arg, grpc_error* error); - // Removes the call from the channel's list of queued picks. - void RemoveCallFromQueuedPicksLocked(grpc_call_element* elem); - // Adds the call to the channel's list of queued picks. - void AddCallToQueuedPicksLocked(grpc_call_element* elem); + // Removes the call from the channel's list of queued picks if present. + void MaybeRemoveCallFromQueuedPicksLocked(grpc_call_element* elem); + // Adds the call to the channel's list of queued picks if not already present. + void MaybeAddCallToQueuedPicksLocked(grpc_call_element* elem); // Applies service config to the call. Must be invoked once we know // that the resolver has returned results to the channel. - void ApplyServiceConfigToCallLocked(grpc_call_element* elem); + // If an error is returned, the error indicates the status with which + // the call should be failed. + grpc_error* ApplyServiceConfigToCallLocked( + grpc_call_element* elem, grpc_metadata_batch* initial_metadata); + void MaybeInvokeConfigSelectorCommitCallback(); // State for handling deadlines. // The code in deadline_filter.c requires this to be the first field. @@ -769,6 +792,7 @@ class CallData { RefCountedPtr retry_throttle_data_; const ClientChannelMethodParsedConfig* method_params_ = nullptr; std::map call_attributes_; + std::function on_call_committed_; RefCountedPtr subchannel_call_; @@ -1335,6 +1359,180 @@ class ChannelData::ClientChannelControlHelper ChannelData* chand_; }; +// +// ChannelData::ChannelConfigHelper +// + +// Synchronous callback from ResolvingLoadBalancingPolicy to process a +// resolver result update. +ChannelData::ChannelConfigHelper::ApplyServiceConfigResult +ChannelData::ChannelConfigHelper::ApplyServiceConfig( + const Resolver::Result& result) { + ApplyServiceConfigResult service_config_result; + RefCountedPtr service_config; + // If resolver did not return a service config or returned an invalid service + // config, we need a fallback service config. + if (result.service_config_error != GRPC_ERROR_NONE) { + // If the service config was invalid, then fallback to the saved service + // config. If there is no saved config either, use the default service + // config. + if (chand_->saved_service_config_ != nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { + gpr_log(GPR_INFO, + "chand=%p: resolver returned invalid service config. " + "Continuing to use previous service config.", + chand_); + } + service_config = chand_->saved_service_config_; + } else if (chand_->default_service_config_ != nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { + gpr_log(GPR_INFO, + "chand=%p: resolver returned invalid service config. Using " + "default service config provided by client API.", + chand_); + } + service_config = chand_->default_service_config_; + } + } else if (result.service_config == nullptr) { + if (chand_->default_service_config_ != nullptr) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { + gpr_log(GPR_INFO, + "chand=%p: resolver returned no service config. Using default " + "service config provided by client API.", + chand_); + } + service_config = chand_->default_service_config_; + } + } else { + service_config = result.service_config; + } + service_config_result.service_config_error = + GRPC_ERROR_REF(result.service_config_error); + if (service_config == nullptr && + result.service_config_error != GRPC_ERROR_NONE) { + service_config_result.no_valid_service_config = true; + return service_config_result; + } + // Process service config. + grpc_core::UniquePtr service_config_json; + const internal::ClientChannelGlobalParsedConfig* parsed_service_config = + nullptr; + if (service_config != nullptr) { + parsed_service_config = + static_cast( + service_config->GetGlobalParsedConfig( + internal::ClientChannelServiceConfigParser::ParserIndex())); + } + // Check if the config has changed. + service_config_result.service_config_changed = + ((service_config == nullptr) != + (chand_->saved_service_config_ == nullptr)) || + (service_config != nullptr && + service_config->json_string() != + chand_->saved_service_config_->json_string()); + if (service_config_result.service_config_changed) { + service_config_json.reset(gpr_strdup( + service_config != nullptr ? service_config->json_string().c_str() + : "")); + if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { + gpr_log(GPR_INFO, + "chand=%p: resolver returned updated service config: \"%s\"", + chand_, service_config_json.get()); + } + // Save health check service name. + if (service_config != nullptr) { + chand_->health_check_service_name_.reset( + gpr_strdup(parsed_service_config->health_check_service_name())); + } else { + chand_->health_check_service_name_.reset(); + } + // Update health check service name used by existing subchannel wrappers. + for (auto* subchannel_wrapper : chand_->subchannel_wrappers_) { + subchannel_wrapper->UpdateHealthCheckServiceName( + grpc_core::UniquePtr( + gpr_strdup(chand_->health_check_service_name_.get()))); + } + // Save service config. + chand_->saved_service_config_ = std::move(service_config); + } + // Find LB policy config. + ProcessLbPolicy(result, parsed_service_config, + &service_config_result.lb_policy_config); + grpc_core::UniquePtr lb_policy_name( + gpr_strdup((service_config_result.lb_policy_config)->name())); + // Swap out the data used by GetChannelInfo(). + { + MutexLock lock(&chand_->info_mu_); + chand_->info_lb_policy_name_ = std::move(lb_policy_name); + if (service_config_json != nullptr) { + chand_->info_service_config_json_ = std::move(service_config_json); + } + } + // Return results. + return service_config_result; +} + +void ChannelData::ChannelConfigHelper::ApplyConfigSelector( + bool service_config_changed, + RefCountedPtr config_selector) { + chand_->UpdateServiceConfigInDataPlaneLocked(service_config_changed, + std::move(config_selector)); +} + +void ChannelData::ChannelConfigHelper::ResolverTransientFailure( + grpc_error* error) { + MutexLock lock(&chand_->data_plane_mu_); + GRPC_ERROR_UNREF(chand_->resolver_transient_failure_error_); + chand_->resolver_transient_failure_error_ = error; +} + +void ChannelData::ChannelConfigHelper::ProcessLbPolicy( + const Resolver::Result& resolver_result, + const internal::ClientChannelGlobalParsedConfig* parsed_service_config, + RefCountedPtr* lb_policy_config) { + // Prefer the LB policy config found in the service config. + if (parsed_service_config != nullptr && + parsed_service_config->parsed_lb_config() != nullptr) { + *lb_policy_config = parsed_service_config->parsed_lb_config(); + return; + } + // Try the deprecated LB policy name from the service config. + // If not, try the setting from channel args. + const char* policy_name = nullptr; + if (parsed_service_config != nullptr && + !parsed_service_config->parsed_deprecated_lb_policy().empty()) { + policy_name = parsed_service_config->parsed_deprecated_lb_policy().c_str(); + } else { + const grpc_arg* channel_arg = + grpc_channel_args_find(resolver_result.args, GRPC_ARG_LB_POLICY_NAME); + policy_name = grpc_channel_arg_get_string(channel_arg); + } + // Use pick_first if nothing was specified and we didn't select grpclb + // above. + if (policy_name == nullptr) policy_name = "pick_first"; + // Now that we have the policy name, construct an empty config for it. + Json config_json = Json::Array{Json::Object{ + {policy_name, Json::Object{}}, + }}; + grpc_error* parse_error = GRPC_ERROR_NONE; + *lb_policy_config = LoadBalancingPolicyRegistry::ParseLoadBalancingConfig( + config_json, &parse_error); + // The policy name came from one of three places: + // - The deprecated loadBalancingPolicy field in the service config, + // in which case the code in ClientChannelServiceConfigParser + // already verified that the policy does not require a config. + // - One of the hard-coded values here, all of which are known to not + // require a config. + // - A channel arg, in which case the application did something that + // is a misuse of our API. + // In the first two cases, these assertions will always be true. In + // the last case, this is probably fine for now. + // TODO(roth): If the last case becomes a problem, add better error + // handling here. + GPR_ASSERT(*lb_policy_config != nullptr); + GPR_ASSERT(parse_error == GRPC_ERROR_NONE); +} + // // ChannelData implementation // @@ -1393,6 +1591,7 @@ ChannelData::ChannelData(grpc_channel_element_args* args, grpc_error** error) client_channel_factory_( ClientChannelFactory::GetFromChannelArgs(args->channel_args)), channelz_node_(GetChannelzNode(args->channel_args)), + channel_config_helper_(this), work_serializer_(std::make_shared()), interested_parties_(grpc_pollset_set_create()), subchannel_pool_(GetSubchannelPool(args->channel_args)), @@ -1461,6 +1660,7 @@ ChannelData::~ChannelData() { } DestroyResolvingLoadBalancingPolicyLocked(); grpc_channel_args_destroy(channel_args_); + GRPC_ERROR_UNREF(resolver_transient_failure_error_); // Stop backup polling. grpc_client_channel_stop_backup_polling(interested_parties_); grpc_pollset_set_destroy(interested_parties_); @@ -1475,6 +1675,7 @@ void ChannelData::UpdateStateAndPickerLocked( if (picker_ == nullptr) { health_check_service_name_.reset(); saved_service_config_.reset(); + saved_config_selector_.reset(); received_first_resolver_result_ = false; } // Update connectivity state. @@ -1497,9 +1698,11 @@ void ChannelData::UpdateStateAndPickerLocked( // - refs to subchannel wrappers in the keys of pending_subchannel_updates_ // - ref stored in retry_throttle_data_ // - ref stored in service_config_ + // - ref stored in config_selector_ // - ownership of the existing picker in picker_ RefCountedPtr retry_throttle_data_to_unref; RefCountedPtr service_config_to_unref; + RefCountedPtr config_selector_to_unref; { MutexLock lock(&data_plane_mu_); // Handle subchannel updates. @@ -1524,6 +1727,7 @@ void ChannelData::UpdateStateAndPickerLocked( // Note: We save the objects to unref until after the lock is released. retry_throttle_data_to_unref = std::move(retry_throttle_data_); service_config_to_unref = std::move(service_config_); + config_selector_to_unref = std::move(config_selector_); } // Re-process queued picks. for (QueuedPick* pick = queued_picks_; pick != nullptr; pick = pick->next) { @@ -1540,24 +1744,72 @@ void ChannelData::UpdateStateAndPickerLocked( pending_subchannel_updates_.clear(); } -void ChannelData::UpdateServiceConfigLocked( - RefCountedPtr retry_throttle_data, - RefCountedPtr service_config) { +void ChannelData::UpdateServiceConfigInDataPlaneLocked( + bool service_config_changed, + RefCountedPtr config_selector) { + // Check if ConfigSelector has changed. + const bool config_selector_changed = + saved_config_selector_ != config_selector; + saved_config_selector_ = config_selector; + // We want to set the service config at least once, even if the + // resolver does not return a config, because that ensures that we + // disable retries if they are not enabled in the service config. + // TODO(roth): Consider removing the received_first_resolver_result_ check + // when we implement transparent retries. + if (!service_config_changed && !config_selector_changed && + received_first_resolver_result_) { + return; + } + received_first_resolver_result_ = true; + // Get retry throttle data from service config. + RefCountedPtr retry_throttle_data; + if (saved_service_config_ != nullptr) { + const internal::ClientChannelGlobalParsedConfig* parsed_service_config = + static_cast( + saved_service_config_->GetGlobalParsedConfig( + internal::ClientChannelServiceConfigParser::ParserIndex())); + if (parsed_service_config != nullptr) { + absl::optional + retry_throttle_config = parsed_service_config->retry_throttling(); + if (retry_throttle_config.has_value()) { + retry_throttle_data = + internal::ServerRetryThrottleMap::GetDataForServer( + server_name_.get(), + retry_throttle_config.value().max_milli_tokens, + retry_throttle_config.value().milli_token_ratio); + } + } + } + // Create default config selector if not provided by resolver. + if (config_selector == nullptr) { + config_selector = + MakeRefCounted(saved_service_config_); + } // Grab data plane lock to update service config. // // We defer unreffing the old values (and deallocating memory) until // after releasing the lock to keep the critical section small. + RefCountedPtr service_config_to_unref = saved_service_config_; + RefCountedPtr config_selector_to_unref = + std::move(config_selector); { MutexLock lock(&data_plane_mu_); + GRPC_ERROR_UNREF(resolver_transient_failure_error_); + resolver_transient_failure_error_ = GRPC_ERROR_NONE; // Update service config. received_service_config_data_ = true; // Old values will be unreffed after lock is released. retry_throttle_data_.swap(retry_throttle_data); - service_config_.swap(service_config); - // Apply service config to queued picks. + service_config_.swap(service_config_to_unref); + config_selector_.swap(config_selector_to_unref); + // Re-process queued picks. for (QueuedPick* pick = queued_picks_; pick != nullptr; pick = pick->next) { - CallData* calld = static_cast(pick->elem->call_data); - calld->MaybeApplyServiceConfigToCallLocked(pick->elem); + grpc_call_element* elem = pick->elem; + CallData* calld = static_cast(elem->call_data); + grpc_error* error = GRPC_ERROR_NONE; + if (calld->PickSubchannelLocked(elem, &error)) { + calld->AsyncPickDone(elem, error); + } } } // Old values will be unreffed after lock is released when they go out @@ -1574,7 +1826,7 @@ void ChannelData::CreateResolvingLoadBalancingPolicyLocked() { grpc_core::UniquePtr target_uri(gpr_strdup(target_uri_.get())); resolving_lb_policy_.reset(new ResolvingLoadBalancingPolicy( std::move(lb_args), &grpc_client_channel_routing_trace, - std::move(target_uri), ProcessResolverResultLocked, this)); + std::move(target_uri), &channel_config_helper_)); grpc_pollset_set_add_pollset_set(resolving_lb_policy_->interested_parties(), interested_parties_); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { @@ -1591,180 +1843,6 @@ void ChannelData::DestroyResolvingLoadBalancingPolicyLocked() { } } -void ChannelData::ProcessLbPolicy( - const Resolver::Result& resolver_result, - const internal::ClientChannelGlobalParsedConfig* parsed_service_config, - RefCountedPtr* lb_policy_config) { - // Prefer the LB policy config found in the service config. - if (parsed_service_config != nullptr && - parsed_service_config->parsed_lb_config() != nullptr) { - *lb_policy_config = parsed_service_config->parsed_lb_config(); - return; - } - // Try the deprecated LB policy name from the service config. - // If not, try the setting from channel args. - const char* policy_name = nullptr; - if (parsed_service_config != nullptr && - !parsed_service_config->parsed_deprecated_lb_policy().empty()) { - policy_name = parsed_service_config->parsed_deprecated_lb_policy().c_str(); - } else { - const grpc_arg* channel_arg = - grpc_channel_args_find(resolver_result.args, GRPC_ARG_LB_POLICY_NAME); - policy_name = grpc_channel_arg_get_string(channel_arg); - } - // Use pick_first if nothing was specified and we didn't select grpclb - // above. - if (policy_name == nullptr) policy_name = "pick_first"; - // Now that we have the policy name, construct an empty config for it. - Json config_json = Json::Array{Json::Object{ - {policy_name, Json::Object{}}, - }}; - grpc_error* parse_error = GRPC_ERROR_NONE; - *lb_policy_config = LoadBalancingPolicyRegistry::ParseLoadBalancingConfig( - config_json, &parse_error); - // The policy name came from one of three places: - // - The deprecated loadBalancingPolicy field in the service config, - // in which case the code in ClientChannelServiceConfigParser - // already verified that the policy does not require a config. - // - One of the hard-coded values here, all of which are known to not - // require a config. - // - A channel arg, in which case the application did something that - // is a misuse of our API. - // In the first two cases, these assertions will always be true. In - // the last case, this is probably fine for now. - // TODO(roth): If the last case becomes a problem, add better error - // handling here. - GPR_ASSERT(*lb_policy_config != nullptr); - GPR_ASSERT(parse_error == GRPC_ERROR_NONE); -} - -// Synchronous callback from ResolvingLoadBalancingPolicy to process a -// resolver result update. -bool ChannelData::ProcessResolverResultLocked( - void* arg, const Resolver::Result& result, - RefCountedPtr* lb_policy_config, - grpc_error** service_config_error, bool* no_valid_service_config) { - ChannelData* chand = static_cast(arg); - RefCountedPtr service_config; - // If resolver did not return a service config or returned an invalid service - // config, we need a fallback service config. - if (result.service_config_error != GRPC_ERROR_NONE) { - // If the service config was invalid, then fallback to the saved service - // config. If there is no saved config either, use the default service - // config. - if (chand->saved_service_config_ != nullptr) { - if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { - gpr_log(GPR_INFO, - "chand=%p: resolver returned invalid service config. " - "Continuing to use previous service config.", - chand); - } - service_config = chand->saved_service_config_; - } else if (chand->default_service_config_ != nullptr) { - if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { - gpr_log(GPR_INFO, - "chand=%p: resolver returned invalid service config. Using " - "default service config provided by client API.", - chand); - } - service_config = chand->default_service_config_; - } - } else if (result.service_config == nullptr) { - if (chand->default_service_config_ != nullptr) { - if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { - gpr_log(GPR_INFO, - "chand=%p: resolver returned no service config. Using default " - "service config provided by client API.", - chand); - } - service_config = chand->default_service_config_; - } - } else { - service_config = result.service_config; - } - *service_config_error = GRPC_ERROR_REF(result.service_config_error); - if (service_config == nullptr && - result.service_config_error != GRPC_ERROR_NONE) { - *no_valid_service_config = true; - return false; - } - // Process service config. - grpc_core::UniquePtr service_config_json; - const internal::ClientChannelGlobalParsedConfig* parsed_service_config = - nullptr; - if (service_config != nullptr) { - parsed_service_config = - static_cast( - service_config->GetGlobalParsedConfig( - internal::ClientChannelServiceConfigParser::ParserIndex())); - } - // Check if the config has changed. - const bool service_config_changed = - ((service_config == nullptr) != - (chand->saved_service_config_ == nullptr)) || - (service_config != nullptr && - service_config->json_string() != - chand->saved_service_config_->json_string()); - if (service_config_changed) { - service_config_json.reset(gpr_strdup( - service_config != nullptr ? service_config->json_string().c_str() - : "")); - if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { - gpr_log(GPR_INFO, - "chand=%p: resolver returned updated service config: \"%s\"", - chand, service_config_json.get()); - } - // Save health check service name. - if (service_config != nullptr) { - chand->health_check_service_name_.reset( - gpr_strdup(parsed_service_config->health_check_service_name())); - } else { - chand->health_check_service_name_.reset(); - } - // Update health check service name used by existing subchannel wrappers. - for (auto* subchannel_wrapper : chand->subchannel_wrappers_) { - subchannel_wrapper->UpdateHealthCheckServiceName( - grpc_core::UniquePtr( - gpr_strdup(chand->health_check_service_name_.get()))); - } - // Save service config. - chand->saved_service_config_ = std::move(service_config); - } - // We want to set the service config at least once. This should not really be - // needed, but we are doing it as a defensive approach. This can be removed, - // if we feel it is unnecessary. - if (service_config_changed || !chand->received_first_resolver_result_) { - chand->received_first_resolver_result_ = true; - RefCountedPtr retry_throttle_data; - if (parsed_service_config != nullptr) { - absl::optional - retry_throttle_config = parsed_service_config->retry_throttling(); - if (retry_throttle_config.has_value()) { - retry_throttle_data = - internal::ServerRetryThrottleMap::GetDataForServer( - chand->server_name_.get(), - retry_throttle_config.value().max_milli_tokens, - retry_throttle_config.value().milli_token_ratio); - } - } - chand->UpdateServiceConfigLocked(std::move(retry_throttle_data), - chand->saved_service_config_); - } - chand->ProcessLbPolicy(result, parsed_service_config, lb_policy_config); - grpc_core::UniquePtr lb_policy_name( - gpr_strdup((*lb_policy_config)->name())); - // Swap out the data used by GetChannelInfo(). - { - MutexLock lock(&chand->info_mu_); - chand->info_lb_policy_name_ = std::move(lb_policy_name); - if (service_config_json != nullptr) { - chand->info_service_config_json_ = std::move(service_config_json); - } - } - // Return results. - return service_config_changed; -} - grpc_error* ChannelData::DoPingLocked(grpc_transport_op* op) { if (state_tracker_.state() != GRPC_CHANNEL_READY) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING("channel not connected"); @@ -2807,6 +2885,7 @@ void CallData::RecvInitialMetadataReady(void* arg, grpc_error* error) { } // Received valid initial metadata, so commit the call. calld->RetryCommit(elem, retry_state); + calld->MaybeInvokeConfigSelectorCommitCallback(); // Invoke the callback to return the result to the surface. // Manually invoking a callback function; it does not take ownership of error. calld->InvokeRecvInitialMetadataCallback(batch_data, error); @@ -2893,6 +2972,7 @@ void CallData::RecvMessageReady(void* arg, grpc_error* error) { } // Received a valid message, so commit the call. calld->RetryCommit(elem, retry_state); + calld->MaybeInvokeConfigSelectorCommitCallback(); // Invoke the callback to return the result to the surface. // Manually invoking a callback function; it does not take ownership of error. calld->InvokeRecvMessageCallback(batch_data, error); @@ -3094,6 +3174,7 @@ void CallData::RecvTrailingMetadataReady(void* arg, grpc_error* error) { } // Not retrying, so commit the call. calld->RetryCommit(elem, retry_state); + calld->MaybeInvokeConfigSelectorCommitCallback(); // Run any necessary closures. calld->RunClosuresForCompletedCall(batch_data, GRPC_ERROR_REF(error)); } @@ -3716,7 +3797,7 @@ class CallData::QueuedPickCanceller { } if (calld->pick_canceller_ == self && error != GRPC_ERROR_NONE) { // Remove pick from list of queued picks. - calld->RemoveCallFromQueuedPicksLocked(self->elem_); + calld->MaybeRemoveCallFromQueuedPicksLocked(self->elem_); // Fail pending batches on the call. calld->PendingBatchesFail(self->elem_, GRPC_ERROR_REF(error), YieldCallCombinerIfPendingBatchesFound); @@ -3729,7 +3810,8 @@ class CallData::QueuedPickCanceller { grpc_closure closure_; }; -void CallData::RemoveCallFromQueuedPicksLocked(grpc_call_element* elem) { +void CallData::MaybeRemoveCallFromQueuedPicksLocked(grpc_call_element* elem) { + if (!pick_queued_) return; auto* chand = static_cast(elem->channel_data); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { gpr_log(GPR_INFO, "chand=%p calld=%p: removing from queued picks list", @@ -3741,7 +3823,8 @@ void CallData::RemoveCallFromQueuedPicksLocked(grpc_call_element* elem) { pick_canceller_ = nullptr; } -void CallData::AddCallToQueuedPicksLocked(grpc_call_element* elem) { +void CallData::MaybeAddCallToQueuedPicksLocked(grpc_call_element* elem) { + if (pick_queued_) return; auto* chand = static_cast(elem->channel_data); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { gpr_log(GPR_INFO, "chand=%p calld=%p: adding to queued picks list", chand, @@ -3754,23 +3837,29 @@ void CallData::AddCallToQueuedPicksLocked(grpc_call_element* elem) { pick_canceller_ = new QueuedPickCanceller(elem); } -void CallData::ApplyServiceConfigToCallLocked(grpc_call_element* elem) { +grpc_error* CallData::ApplyServiceConfigToCallLocked( + grpc_call_element* elem, grpc_metadata_batch* initial_metadata) { ChannelData* chand = static_cast(elem->channel_data); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { gpr_log(GPR_INFO, "chand=%p calld=%p: applying service config to call", chand, this); } + ConfigSelector* config_selector = chand->config_selector(); auto service_config = chand->service_config(); if (service_config != nullptr) { + // Use the ConfigSelector to determine the config for the call. + ConfigSelector::CallConfig call_config = + config_selector->GetCallConfig({&path_, initial_metadata}); + if (call_config.error != GRPC_ERROR_NONE) return call_config.error; + call_attributes_ = std::move(call_config.call_attributes); + on_call_committed_ = std::move(call_config.on_call_committed); // Create a ServiceConfigCallData for the call. This stores a ref to the // ServiceConfig and caches the right set of parsed configs to use for // the call. The MethodConfig will store itself in the call context, // so that it can be accessed by filters in the subchannel, and it // will be cleaned up when the call ends. - const auto* method_params_vector = - service_config->GetMethodParsedConfigVector(path_); auto* service_config_call_data = arena_->New( - std::move(service_config), method_params_vector, call_context_); + std::move(service_config), call_config.method_configs, call_context_); // Apply our own method params to the call. method_params_ = static_cast( service_config_call_data->GetMethodParsedConfig( @@ -3812,16 +3901,13 @@ void CallData::ApplyServiceConfigToCallLocked(grpc_call_element* elem) { if (method_params_ == nullptr || method_params_->retry_policy() == nullptr) { enable_retries_ = false; } + return GRPC_ERROR_NONE; } -void CallData::MaybeApplyServiceConfigToCallLocked(grpc_call_element* elem) { - ChannelData* chand = static_cast(elem->channel_data); - // Apply service config data to the call only once, and only if the - // channel has the data available. - if (GPR_LIKELY(chand->received_service_config_data() && - !service_config_applied_)) { - service_config_applied_ = true; - ApplyServiceConfigToCallLocked(elem); +void CallData::MaybeInvokeConfigSelectorCommitCallback() { + if (on_call_committed_ != nullptr) { + on_call_committed_(); + on_call_committed_ = nullptr; } } @@ -3882,11 +3968,45 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem, GRPC_ERROR_NONE); // Queue the pick, so that it will be attempted once the channel // becomes connected. - AddCallToQueuedPicksLocked(elem); + MaybeAddCallToQueuedPicksLocked(elem); + return false; + } + grpc_metadata_batch* initial_metadata_batch = + seen_send_initial_metadata_ + ? &send_initial_metadata_ + : pending_batches_[0] + .batch->payload->send_initial_metadata.send_initial_metadata; + // Grab initial metadata flags so that we can check later if the call has + // wait_for_ready enabled. + const uint32_t send_initial_metadata_flags = + seen_send_initial_metadata_ ? send_initial_metadata_flags_ + : pending_batches_[0] + .batch->payload->send_initial_metadata + .send_initial_metadata_flags; + // Avoid picking if we haven't yet received service config data. + if (GPR_UNLIKELY(!chand->received_service_config_data())) { + // If the resolver returned transient failure before returning the + // first service config, fail any non-wait_for_ready calls. + grpc_error* resolver_error = chand->resolver_transient_failure_error(); + if (resolver_error != GRPC_ERROR_NONE && + (send_initial_metadata_flags & GRPC_INITIAL_METADATA_WAIT_FOR_READY) == + 0) { + MaybeRemoveCallFromQueuedPicksLocked(elem); + *error = GRPC_ERROR_REF(resolver_error); + return true; + } + // Either the resolver has not yet returned a result, or it has + // returned transient failure but the call is wait_for_ready. In + // either case, queue the call. + MaybeAddCallToQueuedPicksLocked(elem); return false; } - // Apply service config to call if needed. - MaybeApplyServiceConfigToCallLocked(elem); + // Apply service config to call if not yet applied. + if (GPR_LIKELY(!service_config_applied_)) { + service_config_applied_ = true; + *error = ApplyServiceConfigToCallLocked(elem, initial_metadata_batch); + if (*error != GRPC_ERROR_NONE) return true; + } // If this is a retry, use the send_initial_metadata payload that // we've cached; otherwise, use the pending batch. The // send_initial_metadata batch will be the first pending batch in the @@ -3899,20 +4019,8 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem, // attempt) to the LB policy instead the one from the parent channel. LoadBalancingPolicy::PickArgs pick_args; pick_args.call_state = &lb_call_state_; - Metadata initial_metadata( - this, - seen_send_initial_metadata_ - ? &send_initial_metadata_ - : pending_batches_[0] - .batch->payload->send_initial_metadata.send_initial_metadata); + Metadata initial_metadata(this, initial_metadata_batch); pick_args.initial_metadata = &initial_metadata; - // Grab initial metadata flags so that we can check later if the call has - // wait_for_ready enabled. - const uint32_t send_initial_metadata_flags = - seen_send_initial_metadata_ ? send_initial_metadata_flags_ - : pending_batches_[0] - .batch->payload->send_initial_metadata - .send_initial_metadata_flags; // Attempt pick. auto result = chand->picker()->Pick(pick_args); if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) { @@ -3927,7 +4035,8 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem, grpc_error* disconnect_error = chand->disconnect_error(); if (disconnect_error != GRPC_ERROR_NONE) { GRPC_ERROR_UNREF(result.error); - if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem); + MaybeRemoveCallFromQueuedPicksLocked(elem); + MaybeInvokeConfigSelectorCommitCallback(); *error = GRPC_ERROR_REF(disconnect_error); return true; } @@ -3948,8 +4057,9 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem, "Failed to pick subchannel", &result.error, 1); GRPC_ERROR_UNREF(result.error); *error = new_error; + MaybeInvokeConfigSelectorCommitCallback(); } - if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem); + MaybeRemoveCallFromQueuedPicksLocked(elem); return !retried; } // If wait_for_ready is true, then queue to retry when we get a new @@ -3958,22 +4068,24 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem, } // Fallthrough case LoadBalancingPolicy::PickResult::PICK_QUEUE: - if (!pick_queued_) AddCallToQueuedPicksLocked(elem); + MaybeAddCallToQueuedPicksLocked(elem); return false; default: // PICK_COMPLETE - if (pick_queued_) RemoveCallFromQueuedPicksLocked(elem); + MaybeRemoveCallFromQueuedPicksLocked(elem); // Handle drops. if (GPR_UNLIKELY(result.subchannel == nullptr)) { result.error = grpc_error_set_int( GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Call dropped by load balancing policy"), GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE); + MaybeInvokeConfigSelectorCommitCallback(); } else { // Grab a ref to the connected subchannel while we're still // holding the data plane mutex. connected_subchannel_ = chand->GetConnectedSubchannelInDataPlane(result.subchannel.get()); GPR_ASSERT(connected_subchannel_ != nullptr); + if (retry_committed_) MaybeInvokeConfigSelectorCommitCallback(); } lb_recv_trailing_metadata_ready_ = result.recv_trailing_metadata_ready; *error = result.error; diff --git a/src/core/ext/filters/client_channel/config_selector.cc b/src/core/ext/filters/client_channel/config_selector.cc new file mode 100644 index 00000000000..e5d2a3f0be3 --- /dev/null +++ b/src/core/ext/filters/client_channel/config_selector.cc @@ -0,0 +1,62 @@ +// +// Copyright 2020 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#include + +#include "src/core/ext/filters/client_channel/config_selector.h" + +#include "src/core/lib/channel/channel_args.h" + +// Channel arg key for ConfigSelector. +#define GRPC_ARG_CONFIG_SELECTOR "grpc.internal.config_selector" + +namespace grpc_core { + +namespace { + +void* ConfigSelectorArgCopy(void* p) { + ConfigSelector* config_selector = static_cast(p); + config_selector->Ref().release(); + return p; +} + +void ConfigSelectorArgDestroy(void* p) { + ConfigSelector* config_selector = static_cast(p); + config_selector->Unref(); +} + +int ConfigSelectorArgCmp(void* p, void* q) { return GPR_ICMP(p, q); } + +const grpc_arg_pointer_vtable kChannelArgVtable = { + ConfigSelectorArgCopy, ConfigSelectorArgDestroy, ConfigSelectorArgCmp}; + +} // namespace + +grpc_arg ConfigSelector::MakeChannelArg() const { + return grpc_channel_arg_pointer_create( + const_cast(GRPC_ARG_CONFIG_SELECTOR), + const_cast(this), &kChannelArgVtable); +} + +RefCountedPtr ConfigSelector::GetFromChannelArgs( + const grpc_channel_args& args) { + ConfigSelector* config_selector = + grpc_channel_args_find_pointer(&args, + GRPC_ARG_CONFIG_SELECTOR); + return config_selector != nullptr ? config_selector->Ref() : nullptr; +} + +} // namespace grpc_core diff --git a/src/core/ext/filters/client_channel/config_selector.h b/src/core/ext/filters/client_channel/config_selector.h new file mode 100644 index 00000000000..efd27341fa5 --- /dev/null +++ b/src/core/ext/filters/client_channel/config_selector.h @@ -0,0 +1,91 @@ +// +// Copyright 2020 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONFIG_SELECTOR_H +#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONFIG_SELECTOR_H + +#include + +#include +#include + +#include "absl/strings/string_view.h" + +#include +#include + +#include "src/core/ext/filters/client_channel/service_config.h" +#include "src/core/ext/filters/client_channel/service_config_parser.h" +#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/transport/metadata_batch.h" + +namespace grpc_core { + +// Internal API used to allow resolver implementations to override +// MethodConfig and provide input to LB policies on a per-call basis. +class ConfigSelector : public RefCounted { + public: + struct GetCallConfigArgs { + grpc_slice* path; + grpc_metadata_batch* initial_metadata; + }; + + struct CallConfig { + // Can be set to indicate the call should be failed. + grpc_error* error = GRPC_ERROR_NONE; + // The per-method parsed configs that will be passed to + // ServiceConfigCallData. + const ServiceConfigParser::ParsedConfigVector* method_configs = nullptr; + // Call attributes that will be accessible to LB policy implementations. + std::map call_attributes; + // A callback that, if set, will be invoked when the call is + // committed (i.e., when we know that we will never again need to + // ask the picker for a subchannel for this call). + std::function on_call_committed; + }; + + virtual ~ConfigSelector() = default; + + virtual CallConfig GetCallConfig(GetCallConfigArgs args) = 0; + + grpc_arg MakeChannelArg() const; + static RefCountedPtr GetFromChannelArgs( + const grpc_channel_args& args); +}; + +// Default ConfigSelector that gets the MethodConfig from the service config. +class DefaultConfigSelector : public ConfigSelector { + public: + explicit DefaultConfigSelector(RefCountedPtr service_config) + : service_config_(std::move(service_config)) {} + + CallConfig GetCallConfig(GetCallConfigArgs args) override { + CallConfig call_config; + if (service_config_ != nullptr) { + call_config.method_configs = + service_config_->GetMethodParsedConfigVector(*args.path); + } + return call_config; + } + + private: + RefCountedPtr service_config_; +}; + +} // namespace grpc_core + +#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CONFIG_SELECTOR_H */ diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.cc b/src/core/ext/filters/client_channel/resolving_lb_policy.cc index 74a5c29968b..356123c50ae 100644 --- a/src/core/ext/filters/client_channel/resolving_lb_policy.cc +++ b/src/core/ext/filters/client_channel/resolving_lb_policy.cc @@ -145,14 +145,12 @@ class ResolvingLoadBalancingPolicy::ResolvingControlHelper ResolvingLoadBalancingPolicy::ResolvingLoadBalancingPolicy( Args args, TraceFlag* tracer, grpc_core::UniquePtr target_uri, - ProcessResolverResultCallback process_resolver_result, - void* process_resolver_result_user_data) + ChannelConfigHelper* helper) : LoadBalancingPolicy(std::move(args)), tracer_(tracer), target_uri_(std::move(target_uri)), - process_resolver_result_(process_resolver_result), - process_resolver_result_user_data_(process_resolver_result_user_data) { - GPR_ASSERT(process_resolver_result != nullptr); + helper_(helper) { + GPR_ASSERT(helper_ != nullptr); resolver_ = ResolverRegistry::CreateResolver( target_uri_.get(), args.args, interested_parties(), work_serializer(), absl::make_unique(Ref())); @@ -214,6 +212,7 @@ void ResolvingLoadBalancingPolicy::OnResolverError(grpc_error* error) { if (lb_policy_ == nullptr) { grpc_error* state_error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Resolver transient failure", &error, 1); + helper_->ResolverTransientFailure(GRPC_ERROR_REF(state_error)); channel_control_helper()->UpdateState( GRPC_CHANNEL_TRANSIENT_FAILURE, absl::make_unique(state_error)); @@ -304,45 +303,51 @@ void ResolvingLoadBalancingPolicy::OnResolverResultChangedLocked( TraceStringVector trace_strings; const bool resolution_contains_addresses = result.addresses.size() > 0; // Process the resolver result. - RefCountedPtr lb_policy_config; - bool service_config_changed = false; - std::string service_config_error_string; - if (process_resolver_result_ != nullptr) { - grpc_error* service_config_error = GRPC_ERROR_NONE; - bool no_valid_service_config = false; - service_config_changed = process_resolver_result_( - process_resolver_result_user_data_, result, &lb_policy_config, - &service_config_error, &no_valid_service_config); - if (service_config_error != GRPC_ERROR_NONE) { - service_config_error_string = grpc_error_string(service_config_error); - if (no_valid_service_config) { + ChannelConfigHelper::ApplyServiceConfigResult service_config_result; + if (helper_ != nullptr) { + service_config_result = helper_->ApplyServiceConfig(result); + if (service_config_result.service_config_error != GRPC_ERROR_NONE) { + if (service_config_result.no_valid_service_config) { // We received an invalid service config and we don't have a // fallback service config. - OnResolverError(service_config_error); - } else { - GRPC_ERROR_UNREF(service_config_error); + OnResolverError(service_config_result.service_config_error); + service_config_result.service_config_error = GRPC_ERROR_NONE; } } } else { - lb_policy_config = child_lb_config_; + service_config_result.lb_policy_config = child_lb_config_; } - if (lb_policy_config != nullptr) { - // Create or update LB policy, as needed. - CreateOrUpdateLbPolicyLocked(std::move(lb_policy_config), - std::move(result)); + // Before we send the args to the LB policy, grab the ConfigSelector for + // later use. + RefCountedPtr config_selector = + ConfigSelector::GetFromChannelArgs(*result.args); + // Create or update LB policy, as needed. + if (service_config_result.lb_policy_config != nullptr) { + CreateOrUpdateLbPolicyLocked( + std::move(service_config_result.lb_policy_config), std::move(result)); + } + // Apply ConfigSelector to channel. + // This needs to happen after the LB policy has been updated, since + // the ConfigSelector may need the LB policy to know about new + // destinations before it can send RPCs to those destinations. + if (helper_ != nullptr) { + helper_->ApplyConfigSelector(service_config_result.service_config_changed, + std::move(config_selector)); } // Add channel trace event. - if (service_config_changed) { + if (service_config_result.service_config_changed) { // TODO(ncteisen): might be worth somehow including a snippet of the // config in the trace, at the risk of bloating the trace logs. trace_strings.push_back("Service config changed"); } - if (!service_config_error_string.empty()) { - trace_strings.push_back(service_config_error_string.c_str()); + if (service_config_result.service_config_error != GRPC_ERROR_NONE) { + trace_strings.push_back( + grpc_error_string(service_config_result.service_config_error)); } MaybeAddTraceMessagesForAddressChangesLocked(resolution_contains_addresses, &trace_strings); ConcatenateAndAddChannelTraceLocked(trace_strings); + GRPC_ERROR_UNREF(service_config_result.service_config_error); } } // namespace grpc_core diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.h b/src/core/ext/filters/client_channel/resolving_lb_policy.h index 39815e28039..98ea37fbb64 100644 --- a/src/core/ext/filters/client_channel/resolving_lb_policy.h +++ b/src/core/ext/filters/client_channel/resolving_lb_policy.h @@ -23,6 +23,7 @@ #include "absl/container/inlined_vector.h" +#include "src/core/ext/filters/client_channel/config_selector.h" #include "src/core/ext/filters/client_channel/lb_policy.h" #include "src/core/ext/filters/client_channel/lb_policy_factory.h" #include "src/core/ext/filters/client_channel/resolver.h" @@ -52,22 +53,37 @@ namespace grpc_core { // child LB policy and config to use. class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy { public: - // Synchronous callback that takes the resolver result and sets - // lb_policy_config to point to the right data. - // Returns true if the service config has changed since the last result. - // If the returned no_valid_service_config is true, that means that we - // don't have a valid service config to use, and we should set the channel - // to be in TRANSIENT_FAILURE. - typedef bool (*ProcessResolverResultCallback)( - void* user_data, const Resolver::Result& result, - RefCountedPtr* lb_policy_config, - grpc_error** service_config_error, bool* no_valid_service_config); - // If error is set when this returns, then construction failed, and - // the caller may not use the new object. - ResolvingLoadBalancingPolicy( - Args args, TraceFlag* tracer, grpc_core::UniquePtr target_uri, - ProcessResolverResultCallback process_resolver_result, - void* process_resolver_result_user_data); + class ChannelConfigHelper { + public: + struct ApplyServiceConfigResult { + // Set to true if the service config has changed since the last result. + bool service_config_changed = false; + // Set to true if we don't have a valid service config to use. + // This tells the ResolvingLoadBalancingPolicy to put the channel + // into TRANSIENT_FAILURE. + bool no_valid_service_config = false; + // A service config parsing error occurred. + grpc_error* service_config_error = GRPC_ERROR_NONE; + // The LB policy config to use. + RefCountedPtr lb_policy_config; + }; + + // Applies the service config to the channel. + virtual ApplyServiceConfigResult ApplyServiceConfig( + const Resolver::Result& result) = 0; + + // Applies the ConfigSelector to the channel. + virtual void ApplyConfigSelector( + bool service_config_changed, + RefCountedPtr config_selector) = 0; + + // Indicates a resolver transient failure. + virtual void ResolverTransientFailure(grpc_error* error) = 0; + }; + + ResolvingLoadBalancingPolicy(Args args, TraceFlag* tracer, + grpc_core::UniquePtr target_uri, + ChannelConfigHelper* helper); virtual const char* name() const override { return "resolving_lb"; } @@ -105,15 +121,16 @@ class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy { // Passed in from caller at construction time. TraceFlag* tracer_; grpc_core::UniquePtr target_uri_; - ProcessResolverResultCallback process_resolver_result_ = nullptr; - void* process_resolver_result_user_data_ = nullptr; - grpc_core::UniquePtr child_policy_name_; - RefCountedPtr child_lb_config_; + ChannelConfigHelper* helper_; // Resolver and associated state. OrphanablePtr resolver_; bool previous_resolution_contained_addresses_ = false; + // Determined by resolver results. + grpc_core::UniquePtr child_policy_name_; + RefCountedPtr child_lb_config_; + // Child LB policy. OrphanablePtr lb_policy_; }; diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 37bed16955f..a25f10239f6 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -23,6 +23,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/client_channel_channelz.cc', 'src/core/ext/filters/client_channel/client_channel_factory.cc', 'src/core/ext/filters/client_channel/client_channel_plugin.cc', + 'src/core/ext/filters/client_channel/config_selector.cc', 'src/core/ext/filters/client_channel/global_subchannel_pool.cc', 'src/core/ext/filters/client_channel/health/health_check_client.cc', 'src/core/ext/filters/client_channel/http_connect_handshaker.cc', diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index e69d345dfbb..1a81817d3a9 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1081,6 +1081,8 @@ src/core/ext/filters/client_channel/client_channel_channelz.h \ src/core/ext/filters/client_channel/client_channel_factory.cc \ src/core/ext/filters/client_channel/client_channel_factory.h \ src/core/ext/filters/client_channel/client_channel_plugin.cc \ +src/core/ext/filters/client_channel/config_selector.cc \ +src/core/ext/filters/client_channel/config_selector.h \ src/core/ext/filters/client_channel/connector.h \ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index bff4f23c4a4..a4443ebd080 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -878,6 +878,8 @@ src/core/ext/filters/client_channel/client_channel_channelz.h \ src/core/ext/filters/client_channel/client_channel_factory.cc \ src/core/ext/filters/client_channel/client_channel_factory.h \ src/core/ext/filters/client_channel/client_channel_plugin.cc \ +src/core/ext/filters/client_channel/config_selector.cc \ +src/core/ext/filters/client_channel/config_selector.h \ src/core/ext/filters/client_channel/connector.h \ src/core/ext/filters/client_channel/global_subchannel_pool.cc \ src/core/ext/filters/client_channel/global_subchannel_pool.h \ From 32c0846d4503d563fd90594738466568c33de56f Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 18 Jun 2020 20:25:50 -0700 Subject: [PATCH 087/239] Add TLS 1.2 testing. --- include/grpc/grpc_security_constants.h | 3 + .../credentials/ssl/ssl_credentials.cc | 20 +++++ .../credentials/ssl/ssl_credentials.h | 10 +++ .../ssl/ssl_security_connector.cc | 4 + .../ssl/ssl_security_connector.h | 5 ++ src/core/tsi/ssl_transport_security.cc | 50 +++++++++++-- src/core/tsi/ssl_transport_security.h | 16 +++- test/core/end2end/end2end_tests.h | 1 + test/core/end2end/fixtures/h2_oauth2.cc | 50 ++++++++++++- test/core/end2end/fixtures/h2_ssl.cc | 50 ++++++++++++- .../end2end/fixtures/h2_ssl_cred_reload.cc | 50 ++++++++++++- .../end2end/tests/filter_call_init_fails.cc | 10 ++- test/core/tsi/ssl_transport_security_test.cc | 73 ++++++++++++------- 13 files changed, 297 insertions(+), 45 deletions(-) diff --git a/include/grpc/grpc_security_constants.h b/include/grpc/grpc_security_constants.h index e50829409b3..a62f76753b9 100644 --- a/include/grpc/grpc_security_constants.h +++ b/include/grpc/grpc_security_constants.h @@ -139,6 +139,9 @@ typedef enum { */ typedef enum { UDS = 0, LOCAL_TCP } grpc_local_connect_type; +/** The TLS versions that are supported by the SSL stack. **/ +typedef enum { TLS1_2, TLS1_3 } grpc_tls_version; + #ifdef __cplusplus } #endif diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.cc b/src/core/lib/security/credentials/ssl/ssl_credentials.cc index 48d78f39583..3bb7790f5c9 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.cc +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.cc @@ -117,6 +117,16 @@ void grpc_ssl_credentials::build_config( } } +void grpc_ssl_credentials::set_min_tls_version( + grpc_tls_version min_tls_version) { + config_.min_tls_version = min_tls_version; +} + +void grpc_ssl_credentials::set_max_tls_version( + grpc_tls_version max_tls_version) { + config_.max_tls_version = max_tls_version; +} + /* Deprecated in favor of grpc_ssl_credentials_create_ex. Will be removed * once all of its call sites are migrated to grpc_ssl_credentials_create_ex. */ grpc_channel_credentials* grpc_ssl_credentials_create( @@ -213,6 +223,16 @@ void grpc_ssl_server_credentials::build_config( config_.num_key_cert_pairs = num_key_cert_pairs; } +void grpc_ssl_server_credentials::set_min_tls_version( + grpc_tls_version min_tls_version) { + config_.min_tls_version = min_tls_version; +} + +void grpc_ssl_server_credentials::set_max_tls_version( + grpc_tls_version max_tls_version) { + config_.max_tls_version = max_tls_version; +} + grpc_ssl_server_certificate_config* grpc_ssl_server_certificate_config_create( const char* pem_root_certs, const grpc_ssl_pem_key_cert_pair* pem_key_cert_pairs, diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.h b/src/core/lib/security/credentials/ssl/ssl_credentials.h index 545a27f0be4..4c90813f8d2 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.h +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.h @@ -38,6 +38,11 @@ class grpc_ssl_credentials : public grpc_channel_credentials { const char* target, const grpc_channel_args* args, grpc_channel_args** new_args) override; + // TODO(mattstev): Plumb to wrapped languages. Until then, setting the TLS + // version should be done for testing purposes only. + void set_min_tls_version(grpc_tls_version min_tls_version); + void set_max_tls_version(grpc_tls_version max_tls_version); + private: void build_config(const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair, @@ -77,6 +82,11 @@ class grpc_ssl_server_credentials final : public grpc_server_credentials { config); } + // TODO(mattstev): Plumb to wrapped languages. Until then, setting the TLS + // version should be done for testing purposes only. + void set_min_tls_version(grpc_tls_version min_tls_version); + void set_max_tls_version(grpc_tls_version max_tls_version); + const grpc_ssl_server_config& config() const { return config_; } private: diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc index ae93406d7bb..6dccda47d95 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc @@ -107,6 +107,8 @@ class grpc_ssl_channel_security_connector final } options.cipher_suites = grpc_get_ssl_cipher_suites(); options.session_cache = ssl_session_cache; + options.min_tls_version = config->min_tls_version; + options.max_tls_version = config->max_tls_version; const tsi_result result = tsi_create_ssl_client_handshaker_factory_with_options( &options, &client_handshaker_factory_); @@ -251,6 +253,8 @@ class grpc_ssl_server_security_connector options.cipher_suites = grpc_get_ssl_cipher_suites(); options.alpn_protocols = alpn_protocol_strings; options.num_alpn_protocols = static_cast(num_alpn_protocols); + options.min_tls_version = server_credentials->config().min_tls_version; + options.max_tls_version = server_credentials->config().max_tls_version; const tsi_result result = tsi_create_ssl_server_handshaker_factory_with_options( &options, &server_handshaker_factory_); diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.h b/src/core/lib/security/security_connector/ssl/ssl_security_connector.h index f11e8190a30..04c32bb2a8c 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.h @@ -33,7 +33,10 @@ struct grpc_ssl_config { tsi_ssl_pem_key_cert_pair* pem_key_cert_pair; char* pem_root_certs; verify_peer_options verify_options; + grpc_tls_version min_tls_version = grpc_tls_version::TLS1_2; + grpc_tls_version max_tls_version = grpc_tls_version::TLS1_3; }; + /* Creates an SSL channel_security_connector. - request_metadata_creds is the credentials object which metadata will be sent with each request. This parameter can be NULL. @@ -62,6 +65,8 @@ struct grpc_ssl_server_config { char* pem_root_certs = nullptr; grpc_ssl_client_certificate_request_type client_certificate_request = GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE; + grpc_tls_version min_tls_version = grpc_tls_version::TLS1_2; + grpc_tls_version max_tls_version = grpc_tls_version::TLS1_3; }; /* Creates an SSL server_security_connector. - config is the SSL config to be used for the SSL channel establishment. diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 476aec47144..c6c8c5749c1 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -888,6 +888,43 @@ static int NullVerifyCallback(int /*preverify_ok*/, X509_STORE_CTX* /*ctx*/) { return 1; } +// Sets the min and max TLS version of |ssl_context| to |min_tls_version| and +// |max_tls_version|, respectively. +static tsi_result tsi_set_min_and_max_tls_versions( + SSL_CTX* ssl_context, grpc_tls_version min_tls_version, + grpc_tls_version max_tls_version) { + if (ssl_context == nullptr) { + gpr_log(GPR_INFO, + "Invalid nullptr argument to |tsi_set_min_and_max_tls_versions|."); + return TSI_INVALID_ARGUMENT; + } + // Set the min TLS version of the SSL context. + switch (min_tls_version) { + case grpc_tls_version::TLS1_2: + SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION); + break; + case grpc_tls_version::TLS1_3: + SSL_CTX_set_min_proto_version(ssl_context, TLS1_3_VERSION); + break; + default: + gpr_log(GPR_INFO, "TLS version is not supported."); + return TSI_FAILED_PRECONDITION; + } + // Set the max TLS version of the SSL context. + switch (max_tls_version) { + case grpc_tls_version::TLS1_2: + SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION); + break; + case grpc_tls_version::TLS1_3: + SSL_CTX_set_max_proto_version(ssl_context, TLS1_3_VERSION); + break; + default: + gpr_log(GPR_INFO, "TLS version is not supported."); + return TSI_FAILED_PRECONDITION; + } + return TSI_OK; +} + /* --- tsi_ssl_root_certs_store methods implementation. ---*/ tsi_ssl_root_certs_store* tsi_ssl_root_certs_store_create( @@ -1843,10 +1880,10 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options( } #if OPENSSL_VERSION_NUMBER >= 0x10100000 - // TODO(mattstev): Allow user to set min/max TLS version. - // https://github.com/grpc/grpc/issues/22403 ssl_context = SSL_CTX_new(TLS_method()); - SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION); + result = tsi_set_min_and_max_tls_versions( + ssl_context, options->min_tls_version, options->max_tls_version); + if (result != TSI_OK) return result; #else ssl_context = SSL_CTX_new(TLSv1_2_method()); #endif @@ -2010,10 +2047,11 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options( for (i = 0; i < options->num_key_cert_pairs; i++) { do { #if OPENSSL_VERSION_NUMBER >= 0x10100000 - // TODO(mattstev): Allow user to set min/max TLS version. - // https://github.com/grpc/grpc/issues/22403 impl->ssl_contexts[i] = SSL_CTX_new(TLS_method()); - SSL_CTX_set_min_proto_version(impl->ssl_contexts[i], TLS1_2_VERSION); + result = tsi_set_min_and_max_tls_versions(impl->ssl_contexts[i], + options->min_tls_version, + options->max_tls_version); + if (result != TSI_OK) return result; #else impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method()); #endif diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/tsi/ssl_transport_security.h index 5ace7ff35be..e49e2731d12 100644 --- a/src/core/tsi/ssl_transport_security.h +++ b/src/core/tsi/ssl_transport_security.h @@ -21,6 +21,7 @@ #include +#include #include "absl/strings/string_view.h" #include "src/core/tsi/transport_security_interface.h" @@ -152,6 +153,10 @@ struct tsi_ssl_client_handshaker_options { /* skip server certificate verification. */ bool skip_server_certificate_verification; + /* The min and max TLS versions that will be negotiated by the handshaker. */ + grpc_tls_version min_tls_version; + grpc_tls_version max_tls_version; + tsi_ssl_client_handshaker_options() : pem_key_cert_pair(nullptr), pem_root_certs(nullptr), @@ -160,7 +165,9 @@ struct tsi_ssl_client_handshaker_options { alpn_protocols(nullptr), num_alpn_protocols(0), session_cache(nullptr), - skip_server_certificate_verification(false) {} + skip_server_certificate_verification(false), + min_tls_version(grpc_tls_version::TLS1_2), + max_tls_version(grpc_tls_version::TLS1_3) {} }; /* Creates a client handshaker factory. @@ -276,6 +283,9 @@ struct tsi_ssl_server_handshaker_options { const char* session_ticket_key; /* session_ticket_key_size is a size of session ticket encryption key. */ size_t session_ticket_key_size; + /* The min and max TLS versions that will be negotiated by the handshaker. */ + grpc_tls_version min_tls_version; + grpc_tls_version max_tls_version; tsi_ssl_server_handshaker_options() : pem_key_cert_pairs(nullptr), @@ -286,7 +296,9 @@ struct tsi_ssl_server_handshaker_options { alpn_protocols(nullptr), num_alpn_protocols(0), session_ticket_key(nullptr), - session_ticket_key_size(0) {} + session_ticket_key_size(0), + min_tls_version(grpc_tls_version::TLS1_2), + max_tls_version(grpc_tls_version::TLS1_3) {} }; /* Creates a server handshaker factory. diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h index 6a12ca690e3..6be694c76c3 100644 --- a/test/core/end2end/end2end_tests.h +++ b/test/core/end2end/end2end_tests.h @@ -35,6 +35,7 @@ typedef struct grpc_end2end_test_config grpc_end2end_test_config; #define FEATURE_MASK_DOES_NOT_SUPPORT_NETWORK_STATUS_CHANGE 128 #define FEATURE_MASK_SUPPORTS_WORKAROUNDS 256 #define FEATURE_MASK_DOES_NOT_SUPPORT_SEND_CALL_CREDENTIALS 512 +#define FEATURE_MASK_DOES_NOT_SUPPORT_CLIENT_HANDSHAKE_COMPLETE_FIRST 1024 #define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check" diff --git a/test/core/end2end/fixtures/h2_oauth2.cc b/test/core/end2end/fixtures/h2_oauth2.cc index ce37f89e478..2cc53d0cfa5 100644 --- a/test/core/end2end/fixtures/h2_oauth2.cc +++ b/test/core/end2end/fixtures/h2_oauth2.cc @@ -26,6 +26,7 @@ #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/credentials/ssl/ssl_credentials.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -40,6 +41,7 @@ static const char* client_identity = "Brainy Smurf"; struct fullstack_secure_fixture_data { std::string localaddr; + grpc_tls_version tls_version; }; static const grpc_metadata* find_metadata(const grpc_metadata* md, @@ -93,18 +95,32 @@ static void process_oauth2_failure(void* state, grpc_auth_context* /*ctx*/, } static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( - grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) { + grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/, + grpc_tls_version tls_version) { grpc_end2end_test_fixture f; int port = grpc_pick_unused_port_or_die(); fullstack_secure_fixture_data* ffd = new fullstack_secure_fixture_data(); memset(&f, 0, sizeof(f)); ffd->localaddr = grpc_core::JoinHostPort("localhost", port); + ffd->tls_version = tls_version; f.fixture_data = ffd; f.cq = grpc_completion_queue_create_for_next(nullptr); f.shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr); return f; } +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack_tls1_2( + grpc_channel_args* client_args, grpc_channel_args* server_args) { + return chttp2_create_fixture_secure_fullstack(client_args, server_args, + grpc_tls_version::TLS1_2); +} + +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack_tls1_3( + grpc_channel_args* client_args, grpc_channel_args* server_args) { + return chttp2_create_fixture_secure_fullstack(client_args, server_args, + grpc_tls_version::TLS1_3); +} + static void chttp2_init_client_secure_fullstack( grpc_end2end_test_fixture* f, grpc_channel_args* client_args, grpc_channel_credentials* creds) { @@ -148,6 +164,15 @@ static void chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack( reinterpret_cast GRPC_SLICE_START_PTR(ca_slice); grpc_channel_credentials* ssl_creds = grpc_ssl_credentials_create(test_root_cert, nullptr, nullptr, nullptr); + if (f != nullptr && ssl_creds != nullptr) { + // Set the min and max TLS version. + grpc_ssl_credentials* creds = + reinterpret_cast(ssl_creds); + fullstack_secure_fixture_data* ffd = + static_cast(f->fixture_data); + creds->set_min_tls_version(ffd->tls_version); + creds->set_max_tls_version(ffd->tls_version); + } grpc_call_credentials* oauth2_creds = grpc_md_only_test_credentials_create( "authorization", oauth2_md, true /* is_async */); grpc_channel_credentials* ssl_oauth2_creds = @@ -213,6 +238,15 @@ static void chttp2_init_server_simple_ssl_secure_fullstack( grpc_ssl_pem_key_cert_pair pem_key_cert_pair = {server_key, server_cert}; grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create( nullptr, &pem_key_cert_pair, 1, 0, nullptr); + if (f != nullptr && ssl_creds != nullptr) { + // Set the min and max TLS version. + grpc_ssl_server_credentials* creds = + reinterpret_cast(ssl_creds); + fullstack_secure_fixture_data* ffd = + static_cast(f->fixture_data); + creds->set_min_tls_version(ffd->tls_version); + creds->set_max_tls_version(ffd->tls_version); + } grpc_server_credentials_set_auth_metadata_processor( ssl_creds, test_processor_create(fail_server_auth_check(server_args))); chttp2_init_server_secure_fullstack(f, server_args, ssl_creds); @@ -223,12 +257,22 @@ static void chttp2_init_server_simple_ssl_secure_fullstack( /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/simple_ssl_with_oauth2_fullstack", + {"chttp2/simple_ssl_with_oauth2_fullstack_tls1_2", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, - "foo.test.google.fr", chttp2_create_fixture_secure_fullstack, + "foo.test.google.fr", chttp2_create_fixture_secure_fullstack_tls1_2, + chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack, + chttp2_init_server_simple_ssl_secure_fullstack, + chttp2_tear_down_secure_fullstack}, + {"chttp2/simple_ssl_with_oauth2_fullstack_tls1_3", + FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER | + FEATURE_MASK_DOES_NOT_SUPPORT_CLIENT_HANDSHAKE_COMPLETE_FIRST, + "foo.test.google.fr", chttp2_create_fixture_secure_fullstack_tls1_3, chttp2_init_client_simple_ssl_with_oauth2_secure_fullstack, chttp2_init_server_simple_ssl_secure_fullstack, chttp2_tear_down_secure_fullstack}, diff --git a/test/core/end2end/fixtures/h2_ssl.cc b/test/core/end2end/fixtures/h2_ssl.cc index c44e0699a32..2d1ef42c995 100644 --- a/test/core/end2end/fixtures/h2_ssl.cc +++ b/test/core/end2end/fixtures/h2_ssl.cc @@ -27,6 +27,7 @@ #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/credentials/ssl/ssl_credentials.h" #include "src/core/lib/security/security_connector/ssl_utils_config.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/util/port.h" @@ -38,16 +39,19 @@ struct fullstack_secure_fixture_data { std::string localaddr; + grpc_tls_version tls_version; }; static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( - grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) { + grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/, + grpc_tls_version tls_version) { grpc_end2end_test_fixture f; int port = grpc_pick_unused_port_or_die(); fullstack_secure_fixture_data* ffd = new fullstack_secure_fixture_data(); memset(&f, 0, sizeof(f)); ffd->localaddr = grpc_core::JoinHostPort("localhost", port); + ffd->tls_version = tls_version; f.fixture_data = ffd; f.cq = grpc_completion_queue_create_for_next(nullptr); @@ -56,6 +60,18 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( return f; } +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack_tls1_2( + grpc_channel_args* client_args, grpc_channel_args* server_args) { + return chttp2_create_fixture_secure_fullstack(client_args, server_args, + grpc_tls_version::TLS1_2); +} + +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack_tls1_3( + grpc_channel_args* client_args, grpc_channel_args* server_args) { + return chttp2_create_fixture_secure_fullstack(client_args, server_args, + grpc_tls_version::TLS1_3); +} + static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/, const grpc_metadata* /*md*/, size_t /*md_count*/, @@ -102,6 +118,15 @@ static void chttp2_init_client_simple_ssl_secure_fullstack( grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { grpc_channel_credentials* ssl_creds = grpc_ssl_credentials_create(nullptr, nullptr, nullptr, nullptr); + if (f != nullptr && ssl_creds != nullptr) { + // Set the min and max TLS version. + grpc_ssl_credentials* creds = + reinterpret_cast(ssl_creds); + fullstack_secure_fixture_data* ffd = + static_cast(f->fixture_data); + creds->set_min_tls_version(ffd->tls_version); + creds->set_max_tls_version(ffd->tls_version); + } grpc_arg ssl_name_override = { GRPC_ARG_STRING, const_cast(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG), @@ -138,6 +163,15 @@ static void chttp2_init_server_simple_ssl_secure_fullstack( grpc_ssl_pem_key_cert_pair pem_key_cert_pair = {server_key, server_cert}; grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create( nullptr, &pem_key_cert_pair, 1, 0, nullptr); + if (f != nullptr && ssl_creds != nullptr) { + // Set the min and max TLS version. + grpc_ssl_server_credentials* creds = + reinterpret_cast(ssl_creds); + fullstack_secure_fixture_data* ffd = + static_cast(f->fixture_data); + creds->set_min_tls_version(ffd->tls_version); + creds->set_max_tls_version(ffd->tls_version); + } grpc_slice_unref(cert_slice); grpc_slice_unref(key_slice); if (fail_server_auth_check(server_args)) { @@ -151,12 +185,22 @@ static void chttp2_init_server_simple_ssl_secure_fullstack( /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/simple_ssl_fullstack", + {"chttp2/simple_ssl_fullstack_tls1_2", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, - "foo.test.google.fr", chttp2_create_fixture_secure_fullstack, + "foo.test.google.fr", chttp2_create_fixture_secure_fullstack_tls1_2, + chttp2_init_client_simple_ssl_secure_fullstack, + chttp2_init_server_simple_ssl_secure_fullstack, + chttp2_tear_down_secure_fullstack}, + {"chttp2/simple_ssl_fullstack_tls1_3", + FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER | + FEATURE_MASK_DOES_NOT_SUPPORT_CLIENT_HANDSHAKE_COMPLETE_FIRST, + "foo.test.google.fr", chttp2_create_fixture_secure_fullstack_tls1_3, chttp2_init_client_simple_ssl_secure_fullstack, chttp2_init_server_simple_ssl_secure_fullstack, chttp2_tear_down_secure_fullstack}, diff --git a/test/core/end2end/fixtures/h2_ssl_cred_reload.cc b/test/core/end2end/fixtures/h2_ssl_cred_reload.cc index 96f796d0b27..bf78cda091a 100644 --- a/test/core/end2end/fixtures/h2_ssl_cred_reload.cc +++ b/test/core/end2end/fixtures/h2_ssl_cred_reload.cc @@ -27,6 +27,7 @@ #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/load_file.h" #include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/credentials/ssl/ssl_credentials.h" #include "src/core/lib/security/security_connector/ssl_utils_config.h" #include "test/core/end2end/end2end_tests.h" #include "test/core/util/port.h" @@ -38,6 +39,7 @@ struct fullstack_secure_fixture_data { std::string localaddr; + grpc_tls_version tls_version; bool server_credential_reloaded = false; }; @@ -77,12 +79,14 @@ ssl_server_certificate_config_callback( } static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( - grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) { + grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/, + grpc_tls_version tls_version) { grpc_end2end_test_fixture f; int port = grpc_pick_unused_port_or_die(); fullstack_secure_fixture_data* ffd = new fullstack_secure_fixture_data(); memset(&f, 0, sizeof(f)); ffd->localaddr = grpc_core::JoinHostPort("localhost", port); + ffd->tls_version = tls_version; f.fixture_data = ffd; f.cq = grpc_completion_queue_create_for_next(nullptr); @@ -91,6 +95,18 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( return f; } +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack_tls1_2( + grpc_channel_args* client_args, grpc_channel_args* server_args) { + return chttp2_create_fixture_secure_fullstack(client_args, server_args, + grpc_tls_version::TLS1_2); +} + +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack_tls1_3( + grpc_channel_args* client_args, grpc_channel_args* server_args) { + return chttp2_create_fixture_secure_fullstack(client_args, server_args, + grpc_tls_version::TLS1_3); +} + static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/, const grpc_metadata* /*md*/, size_t /*md_count*/, @@ -138,6 +154,15 @@ static void chttp2_init_client_simple_ssl_secure_fullstack( grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { grpc_channel_credentials* ssl_creds = grpc_ssl_credentials_create(nullptr, nullptr, nullptr, nullptr); + if (f != nullptr && ssl_creds != nullptr) { + // Set the min and max TLS version. + grpc_ssl_credentials* creds = + reinterpret_cast(ssl_creds); + fullstack_secure_fixture_data* ffd = + static_cast(f->fixture_data); + creds->set_min_tls_version(ffd->tls_version); + creds->set_max_tls_version(ffd->tls_version); + } grpc_arg ssl_name_override = { GRPC_ARG_STRING, const_cast(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG), @@ -168,6 +193,15 @@ static void chttp2_init_server_simple_ssl_secure_fullstack( ssl_server_certificate_config_callback, f->fixture_data); grpc_server_credentials* ssl_creds = grpc_ssl_server_credentials_create_with_options(options); + if (f != nullptr && ssl_creds != nullptr) { + // Set the min and max TLS version. + grpc_ssl_server_credentials* creds = + reinterpret_cast(ssl_creds); + fullstack_secure_fixture_data* ffd = + static_cast(f->fixture_data); + creds->set_min_tls_version(ffd->tls_version); + creds->set_max_tls_version(ffd->tls_version); + } if (fail_server_auth_check(server_args)) { grpc_auth_metadata_processor processor = {process_auth_failure, nullptr, nullptr}; @@ -179,12 +213,22 @@ static void chttp2_init_server_simple_ssl_secure_fullstack( /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/simple_ssl_fullstack", + {"chttp2/simple_ssl_fullstack_tls1_2", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, - "foo.test.google.fr", chttp2_create_fixture_secure_fullstack, + "foo.test.google.fr", chttp2_create_fixture_secure_fullstack_tls1_2, + chttp2_init_client_simple_ssl_secure_fullstack, + chttp2_init_server_simple_ssl_secure_fullstack, + chttp2_tear_down_secure_fullstack}, + {"chttp2/simple_ssl_fullstack_tls1_3", + FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER | + FEATURE_MASK_DOES_NOT_SUPPORT_CLIENT_HANDSHAKE_COMPLETE_FIRST, + "foo.test.google.fr", chttp2_create_fixture_secure_fullstack_tls1_3, chttp2_init_client_simple_ssl_secure_fullstack, chttp2_init_server_simple_ssl_secure_fullstack, chttp2_tear_down_secure_fullstack}, diff --git a/test/core/end2end/tests/filter_call_init_fails.cc b/test/core/end2end/tests/filter_call_init_fails.cc index a5785d7338b..062c83632b5 100644 --- a/test/core/end2end/tests/filter_call_init_fails.cc +++ b/test/core/end2end/tests/filter_call_init_fails.cc @@ -508,7 +508,15 @@ void filter_call_init_fails(grpc_end2end_test_config config) { g_enable_client_channel_filter = true; test_client_channel_filter(config); g_enable_client_channel_filter = false; - if (config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL) { + // If the client handshake completes before the server handshake and the + // client is able to send application data before the server handshake + // completes, then testing the CLIENT_SUBCHANNEL filter will cause the server + // to hang waiting for the final handshake message from the client. This + // handshake message will never arrive because it would have been sent with + // the first application data message, which failed because of the filter. + if ((config.feature_mask & FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL) && + !(config.feature_mask & + FEATURE_MASK_DOES_NOT_SUPPORT_CLIENT_HANDSHAKE_COMPLETE_FIRST)) { gpr_log(GPR_INFO, "Testing CLIENT_SUBCHANNEL filter."); g_enable_client_subchannel_filter = true; test_client_subchannel_filter(config); diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index 6d2bc5e535c..1f1915c84b9 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -55,6 +55,9 @@ const size_t kSessionTicketEncryptionKeySize = 80; const size_t kSessionTicketEncryptionKeySize = 48; #endif +// Indicates the TLS version used for the test. +static grpc_tls_version test_tls_version = grpc_tls_version::TLS1_3; + typedef enum AlpnMode { NO_ALPN, ALPN_CLIENT_NO_SERVER, @@ -127,6 +130,8 @@ static void ssl_test_setup_handshakers(tsi_test_fixture* fixture) { if (ssl_fixture->session_cache != nullptr) { client_options.session_cache = ssl_fixture->session_cache; } + client_options.min_tls_version = test_tls_version; + client_options.max_tls_version = test_tls_version; GPR_ASSERT(tsi_create_ssl_client_handshaker_factory_with_options( &client_options, &ssl_fixture->client_handshaker_factory) == TSI_OK); @@ -159,6 +164,8 @@ static void ssl_test_setup_handshakers(tsi_test_fixture* fixture) { } server_options.session_ticket_key = ssl_fixture->session_ticket_key; server_options.session_ticket_key_size = ssl_fixture->session_ticket_key_size; + server_options.min_tls_version = test_tls_version; + server_options.max_tls_version = test_tls_version; GPR_ASSERT(tsi_create_ssl_server_handshaker_factory_with_options( &server_options, &ssl_fixture->server_handshaker_factory) == TSI_OK); @@ -317,13 +324,17 @@ static void ssl_test_check_handshaker_peers(tsi_test_fixture* fixture) { GPR_ASSERT(ssl_fixture->key_cert_lib != nullptr); ssl_key_cert_lib* key_cert_lib = ssl_fixture->key_cert_lib; tsi_peer peer; + // In TLS 1.3, the client-side handshake succeeds even if the client sends a + // bad certificate. In such a case, the server would fail the TLS handshake + // and send an alert to the client as the first application data message. In + // TLS 1.2, the client-side handshake will fail if the client sends a bad + // certificate. bool expect_server_success = !(key_cert_lib->use_bad_server_cert || (key_cert_lib->use_bad_client_cert && ssl_fixture->force_client_auth)); - // In TLS 1.3, the client-side handshake succeeds even if the client sends a - // bad certificate. In such a case, the server would fail the TLS handshake - // and send an alert to the client as the first application data message. - bool expect_client_success = !key_cert_lib->use_bad_server_cert; + bool expect_client_success = test_tls_version == grpc_tls_version::TLS1_2 + ? expect_server_success + : !key_cert_lib->use_bad_server_cert; if (expect_client_success) { GPR_ASSERT(tsi_handshaker_result_extract_peer( ssl_fixture->base.client_result, &peer) == TSI_OK); @@ -954,31 +965,39 @@ void ssl_tsi_test_extract_cert_chain() { int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); grpc_init(); - ssl_tsi_test_do_handshake_tiny_handshake_buffer(); - ssl_tsi_test_do_handshake_small_handshake_buffer(); - ssl_tsi_test_do_handshake(); - ssl_tsi_test_do_handshake_with_root_store(); - ssl_tsi_test_do_handshake_with_client_authentication(); - ssl_tsi_test_do_handshake_with_client_authentication_and_root_store(); - ssl_tsi_test_do_handshake_with_server_name_indication_exact_domain(); - ssl_tsi_test_do_handshake_with_server_name_indication_wild_star_domain(); - ssl_tsi_test_do_handshake_with_wrong_server_name_indication(); - ssl_tsi_test_do_handshake_with_bad_server_cert(); - ssl_tsi_test_do_handshake_with_bad_client_cert(); + const size_t number_tls_versions = 2; + const grpc_tls_version tls_versions[] = {grpc_tls_version::TLS1_2, + grpc_tls_version::TLS1_3}; + for (size_t i = 0; i < number_tls_versions; i++) { + // Set the TLS version to be used in the tests. + test_tls_version = tls_versions[i]; + // Run all the tests using that TLS version for both the client and server. + ssl_tsi_test_do_handshake_tiny_handshake_buffer(); + ssl_tsi_test_do_handshake_small_handshake_buffer(); + ssl_tsi_test_do_handshake(); + ssl_tsi_test_do_handshake_with_root_store(); + ssl_tsi_test_do_handshake_with_client_authentication(); + ssl_tsi_test_do_handshake_with_client_authentication_and_root_store(); + ssl_tsi_test_do_handshake_with_server_name_indication_exact_domain(); + ssl_tsi_test_do_handshake_with_server_name_indication_wild_star_domain(); + ssl_tsi_test_do_handshake_with_wrong_server_name_indication(); + ssl_tsi_test_do_handshake_with_bad_server_cert(); + ssl_tsi_test_do_handshake_with_bad_client_cert(); #ifdef OPENSSL_IS_BORINGSSL - // BoringSSL and OpenSSL have different behaviors on mismatched ALPN. - ssl_tsi_test_do_handshake_alpn_client_no_server(); - ssl_tsi_test_do_handshake_alpn_client_server_mismatch(); + // BoringSSL and OpenSSL have different behaviors on mismatched ALPN. + ssl_tsi_test_do_handshake_alpn_client_no_server(); + ssl_tsi_test_do_handshake_alpn_client_server_mismatch(); #endif - ssl_tsi_test_do_handshake_alpn_server_no_client(); - ssl_tsi_test_do_handshake_alpn_client_server_ok(); - ssl_tsi_test_do_handshake_session_cache(); - ssl_tsi_test_do_round_trip_for_all_configs(); - ssl_tsi_test_do_round_trip_odd_buffer_size(); - ssl_tsi_test_handshaker_factory_internals(); - ssl_tsi_test_duplicate_root_certificates(); - ssl_tsi_test_extract_x509_subject_names(); - ssl_tsi_test_extract_cert_chain(); + ssl_tsi_test_do_handshake_alpn_server_no_client(); + ssl_tsi_test_do_handshake_alpn_client_server_ok(); + ssl_tsi_test_do_handshake_session_cache(); + ssl_tsi_test_do_round_trip_for_all_configs(); + ssl_tsi_test_do_round_trip_odd_buffer_size(); + ssl_tsi_test_handshaker_factory_internals(); + ssl_tsi_test_duplicate_root_certificates(); + ssl_tsi_test_extract_x509_subject_names(); + ssl_tsi_test_extract_cert_chain(); + } grpc_shutdown(); return 0; } From 673982014b0329024a5987362bc157e6fc68ef95 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 18 Jun 2020 21:20:49 -0700 Subject: [PATCH 088/239] Add #ifdef around use of SSL_ctx_min/max_proto_version --- src/core/tsi/ssl_transport_security.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index c6c8c5749c1..d0dece5fd5b 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -900,24 +900,28 @@ static tsi_result tsi_set_min_and_max_tls_versions( } // Set the min TLS version of the SSL context. switch (min_tls_version) { +#if OPENSSL_VERSION_NUMBER >= 0x10100000 case grpc_tls_version::TLS1_2: SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION); break; case grpc_tls_version::TLS1_3: SSL_CTX_set_min_proto_version(ssl_context, TLS1_3_VERSION); break; +#endif default: gpr_log(GPR_INFO, "TLS version is not supported."); return TSI_FAILED_PRECONDITION; } // Set the max TLS version of the SSL context. switch (max_tls_version) { +#if OPENSSL_VERSION_NUMBER >= 0x10100000 case grpc_tls_version::TLS1_2: SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION); break; case grpc_tls_version::TLS1_3: SSL_CTX_set_max_proto_version(ssl_context, TLS1_3_VERSION); break; +#endif default: gpr_log(GPR_INFO, "TLS version is not supported."); return TSI_FAILED_PRECONDITION; From 67f0106b8af792b9f77b5a34a90ceebc537d6b02 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Fri, 19 Jun 2020 09:14:13 -0700 Subject: [PATCH 089/239] Add include of tls1.h for OpenSSL. --- src/core/tsi/ssl_transport_security.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index d0dece5fd5b..a13b09a99ff 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -49,6 +49,11 @@ extern "C" { #include #include #include +#ifndef OPENSSL_IS_BORINGSSL +/* For the TLS1_3_version macro in OpenSSL. In BoringSSL, this macro is defined + * in ssl.h. */ +#include +#endif #include #include } From 98bb4b612448303eadd2282746303e08e6665fbb Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Fri, 19 Jun 2020 09:54:04 -0700 Subject: [PATCH 090/239] Copyright header --- tools/distrib/install_all_python_modules.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/distrib/install_all_python_modules.sh b/tools/distrib/install_all_python_modules.sh index fd036cb9a5e..51a11341bb6 100755 --- a/tools/distrib/install_all_python_modules.sh +++ b/tools/distrib/install_all_python_modules.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright 2020 The gRPC Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. echo "It's recommended that you run this script from a virtual environment." From 4009dc1115d2233136e890abf467e4e09171bfb0 Mon Sep 17 00:00:00 2001 From: Chengyuan Zhang Date: Fri, 19 Jun 2020 10:12:49 -0700 Subject: [PATCH 091/239] Add grpc-java v1.30.1 to interop test client matrix --- tools/interop_matrix/client_matrix.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index 7278730cef6..e38c1c77ee9 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -220,6 +220,7 @@ LANG_RELEASE_MATRIX = { ('v1.28.1', ReleaseInfo()), ('v1.29.0', ReleaseInfo()), ('v1.30.0', ReleaseInfo()), + ('v1.30.1', ReleaseInfo()), ]), 'python': OrderedDict([ From 52931a4e1ac9fdd6de40be7101f85a7cd4d71a8b Mon Sep 17 00:00:00 2001 From: Hannah Shi Date: Fri, 19 Jun 2020 18:30:37 +0000 Subject: [PATCH 092/239] update comments of ext files to fit doxygen use --- src/php/ext/grpc/call.c | 7 ++++++- src/php/ext/grpc/call_credentials.c | 5 +++++ src/php/ext/grpc/channel.c | 5 +++++ src/php/ext/grpc/channel_credentials.c | 11 ++++++++--- src/php/ext/grpc/server.c | 5 +++++ src/php/ext/grpc/server_credentials.c | 11 ++++++++--- src/php/ext/grpc/timeval.c | 5 +++++ 7 files changed, 42 insertions(+), 7 deletions(-) diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index 66b26716b13..03f4d56901f 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -16,6 +16,11 @@ * */ +/** + * class Call + * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/call.c + */ + #include "call.h" #include @@ -193,7 +198,7 @@ zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned TSRMLS_DC) { * Must not be closed. * @param string $method The method to call * @param Timeval $deadline_obj The deadline for completing the call - * @param string $host_override The host is set by user (optional) + * @param string $host_override = "" The host is set by user (optional) */ PHP_METHOD(Call, __construct) { zval *channel_obj; diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c index 484b9b54bf4..a57a8410366 100644 --- a/src/php/ext/grpc/call_credentials.c +++ b/src/php/ext/grpc/call_credentials.c @@ -16,6 +16,11 @@ * */ +/** + * class CallCredentials + * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/call_credentials.c + */ + #include "call_credentials.h" #include diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c index 059e8333db1..47483812b25 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -16,6 +16,11 @@ * */ +/** + * class Channel + * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/channel.c + */ + #include "channel.h" #include diff --git a/src/php/ext/grpc/channel_credentials.c b/src/php/ext/grpc/channel_credentials.c index 4fa99b1012d..a1611d13518 100644 --- a/src/php/ext/grpc/channel_credentials.c +++ b/src/php/ext/grpc/channel_credentials.c @@ -16,6 +16,11 @@ * */ +/** + * class ChannelCredentials + * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/channel_credentials.c + */ + #include "channel_credentials.h" #include @@ -134,10 +139,10 @@ PHP_METHOD(ChannelCredentials, createDefault) { /** * Create SSL credentials. - * @param string $pem_root_certs PEM encoding of the server root certificates - * @param string $pem_key_cert_pair.private_key PEM encoding of the client's + * @param string $pem_root_certs = "" PEM encoding of the server root certificates (optional) + * @param string $private_key = "" PEM encoding of the client's * private key (optional) - * @param string $pem_key_cert_pair.cert_chain PEM encoding of the client's + * @param string $cert_chain = "" PEM encoding of the client's * certificate chain (optional) * @return ChannelCredentials The new SSL credentials object */ diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c index 8c7eaee203f..7f3c3b8e3bb 100644 --- a/src/php/ext/grpc/server.c +++ b/src/php/ext/grpc/server.c @@ -16,6 +16,11 @@ * */ +/** + * class Server + * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/server.c + */ + #include "server.h" #include diff --git a/src/php/ext/grpc/server_credentials.c b/src/php/ext/grpc/server_credentials.c index 72ce50fff72..2c2f9c185f3 100644 --- a/src/php/ext/grpc/server_credentials.c +++ b/src/php/ext/grpc/server_credentials.c @@ -16,6 +16,11 @@ * */ +/** + * class ServerCredentials + * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/server_credentials.c + */ + #include "server_credentials.h" #include @@ -56,9 +61,9 @@ zval *grpc_php_wrap_server_credentials(grpc_server_credentials /** * Create SSL credentials. - * @param string pem_root_certs PEM encoding of the server root certificates - * @param string pem_private_key PEM encoding of the client's private key - * @param string pem_cert_chain PEM encoding of the client's certificate chain + * @param string $pem_root_certs PEM encoding of the server root certificates + * @param string $pem_private_key PEM encoding of the client's private key + * @param string $pem_cert_chain PEM encoding of the client's certificate chain * @return Credentials The new SSL credentials object */ PHP_METHOD(ServerCredentials, createSsl) { diff --git a/src/php/ext/grpc/timeval.c b/src/php/ext/grpc/timeval.c index 8f0048def6e..3cfab86849c 100644 --- a/src/php/ext/grpc/timeval.c +++ b/src/php/ext/grpc/timeval.c @@ -16,6 +16,11 @@ * */ +/** + * class Timeval + * @see https://github.com/grpc/grpc/tree/master/src/php/ext/grpc/timeval.c + */ + #include "timeval.h" #include From 492889f1c032156a4afcad0cead314a1b8bbbbe0 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 19 Jun 2020 11:32:18 -0700 Subject: [PATCH 093/239] Convert chttp2 server connection-handling code to C++. --- CMakeLists.txt | 69 +- Makefile | 84 +- build_autogenerated.yaml | 25 +- .../transport/chttp2/server/chttp2_server.cc | 724 +++++++++--------- .../transport/chttp2/server/chttp2_server.h | 8 +- .../chttp2/server/insecure/server_chttp2.cc | 2 +- .../server/secure/server_secure_chttp2.cc | 2 +- src/core/lib/surface/server.cc | 149 ++-- src/core/lib/surface/server.h | 35 +- test/core/surface/BUILD | 3 + test/core/surface/server_chttp2_test.cc | 30 +- tools/run_tests/generated/tests.json | 48 +- 12 files changed, 618 insertions(+), 561 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e0c695a5bc..97db934faac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -569,7 +569,6 @@ if(gRPC_BUILD_TESTS) add_dependencies(buildtests_c secure_endpoint_test) add_dependencies(buildtests_c security_connector_test) add_dependencies(buildtests_c sequential_connectivity_test) - add_dependencies(buildtests_c server_chttp2_test) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_c server_ssl_test) endif() @@ -793,6 +792,7 @@ if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) add_dependencies(buildtests_cxx server_builder_with_socket_mutator_test) endif() + add_dependencies(buildtests_cxx server_chttp2_test) add_dependencies(buildtests_cxx server_context_test_spouse_test) add_dependencies(buildtests_cxx server_early_return_test) add_dependencies(buildtests_cxx server_interceptors_end2end_test) @@ -6830,35 +6830,6 @@ target_link_libraries(sequential_connectivity_test ) -endif() -if(gRPC_BUILD_TESTS) - -add_executable(server_chttp2_test - test/core/surface/server_chttp2_test.cc -) - -target_include_directories(server_chttp2_test - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/include - ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} - ${_gRPC_SSL_INCLUDE_DIR} - ${_gRPC_UPB_GENERATED_DIR} - ${_gRPC_UPB_GRPC_GENERATED_DIR} - ${_gRPC_UPB_INCLUDE_DIR} - ${_gRPC_ZLIB_INCLUDE_DIR} -) - -target_link_libraries(server_chttp2_test - ${_gRPC_ALLTARGETS_LIBRARIES} - grpc_test_util - grpc - gpr - address_sorting - upb -) - - endif() if(gRPC_BUILD_TESTS) if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) @@ -13004,6 +12975,44 @@ endif() endif() if(gRPC_BUILD_TESTS) +add_executable(server_chttp2_test + test/core/surface/server_chttp2_test.cc + third_party/googletest/googletest/src/gtest-all.cc + third_party/googletest/googlemock/src/gmock-all.cc +) + +target_include_directories(server_chttp2_test + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/include + ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_SSL_INCLUDE_DIR} + ${_gRPC_UPB_GENERATED_DIR} + ${_gRPC_UPB_GRPC_GENERATED_DIR} + ${_gRPC_UPB_INCLUDE_DIR} + ${_gRPC_ZLIB_INCLUDE_DIR} + third_party/googletest/googletest/include + third_party/googletest/googletest + third_party/googletest/googlemock/include + third_party/googletest/googlemock + ${_gRPC_PROTO_GENS_DIR} +) + +target_link_libraries(server_chttp2_test + ${_gRPC_PROTOBUF_LIBRARIES} + ${_gRPC_ALLTARGETS_LIBRARIES} + grpc_test_util + grpc + gpr + address_sorting + upb + ${_gRPC_GFLAGS_LIBRARIES} +) + + +endif() +if(gRPC_BUILD_TESTS) + add_executable(server_context_test_spouse_test test/cpp/test/server_context_test_spouse_test.cc third_party/googletest/googletest/src/gtest-all.cc diff --git a/Makefile b/Makefile index 83c7600a698..bc95743cad9 100644 --- a/Makefile +++ b/Makefile @@ -1112,7 +1112,6 @@ secure_channel_create_test: $(BINDIR)/$(CONFIG)/secure_channel_create_test secure_endpoint_test: $(BINDIR)/$(CONFIG)/secure_endpoint_test security_connector_test: $(BINDIR)/$(CONFIG)/security_connector_test sequential_connectivity_test: $(BINDIR)/$(CONFIG)/sequential_connectivity_test -server_chttp2_test: $(BINDIR)/$(CONFIG)/server_chttp2_test server_ssl_test: $(BINDIR)/$(CONFIG)/server_ssl_test server_test: $(BINDIR)/$(CONFIG)/server_test slice_buffer_test: $(BINDIR)/$(CONFIG)/slice_buffer_test @@ -1269,6 +1268,7 @@ secure_auth_context_test: $(BINDIR)/$(CONFIG)/secure_auth_context_test server_builder_plugin_test: $(BINDIR)/$(CONFIG)/server_builder_plugin_test server_builder_test: $(BINDIR)/$(CONFIG)/server_builder_test server_builder_with_socket_mutator_test: $(BINDIR)/$(CONFIG)/server_builder_with_socket_mutator_test +server_chttp2_test: $(BINDIR)/$(CONFIG)/server_chttp2_test server_context_test_spouse_test: $(BINDIR)/$(CONFIG)/server_context_test_spouse_test server_early_return_test: $(BINDIR)/$(CONFIG)/server_early_return_test server_fuzzer: $(BINDIR)/$(CONFIG)/server_fuzzer @@ -1487,7 +1487,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/secure_endpoint_test \ $(BINDIR)/$(CONFIG)/security_connector_test \ $(BINDIR)/$(CONFIG)/sequential_connectivity_test \ - $(BINDIR)/$(CONFIG)/server_chttp2_test \ $(BINDIR)/$(CONFIG)/server_ssl_test \ $(BINDIR)/$(CONFIG)/server_test \ $(BINDIR)/$(CONFIG)/slice_buffer_test \ @@ -1631,6 +1630,7 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/server_builder_plugin_test \ $(BINDIR)/$(CONFIG)/server_builder_test \ $(BINDIR)/$(CONFIG)/server_builder_with_socket_mutator_test \ + $(BINDIR)/$(CONFIG)/server_chttp2_test \ $(BINDIR)/$(CONFIG)/server_context_test_spouse_test \ $(BINDIR)/$(CONFIG)/server_early_return_test \ $(BINDIR)/$(CONFIG)/server_interceptors_end2end_test \ @@ -1788,6 +1788,7 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/server_builder_plugin_test \ $(BINDIR)/$(CONFIG)/server_builder_test \ $(BINDIR)/$(CONFIG)/server_builder_with_socket_mutator_test \ + $(BINDIR)/$(CONFIG)/server_chttp2_test \ $(BINDIR)/$(CONFIG)/server_context_test_spouse_test \ $(BINDIR)/$(CONFIG)/server_early_return_test \ $(BINDIR)/$(CONFIG)/server_interceptors_end2end_test \ @@ -2043,8 +2044,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/secure_endpoint_test || ( echo test secure_endpoint_test failed ; exit 1 ) $(E) "[RUN] Testing security_connector_test" $(Q) $(BINDIR)/$(CONFIG)/security_connector_test || ( echo test security_connector_test failed ; exit 1 ) - $(E) "[RUN] Testing server_chttp2_test" - $(Q) $(BINDIR)/$(CONFIG)/server_chttp2_test || ( echo test server_chttp2_test failed ; exit 1 ) $(E) "[RUN] Testing server_ssl_test" $(Q) $(BINDIR)/$(CONFIG)/server_ssl_test || ( echo test server_ssl_test failed ; exit 1 ) $(E) "[RUN] Testing server_test" @@ -2299,6 +2298,8 @@ test_cxx: buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/server_builder_test || ( echo test server_builder_test failed ; exit 1 ) $(E) "[RUN] Testing server_builder_with_socket_mutator_test" $(Q) $(BINDIR)/$(CONFIG)/server_builder_with_socket_mutator_test || ( echo test server_builder_with_socket_mutator_test failed ; exit 1 ) + $(E) "[RUN] Testing server_chttp2_test" + $(Q) $(BINDIR)/$(CONFIG)/server_chttp2_test || ( echo test server_chttp2_test failed ; exit 1 ) $(E) "[RUN] Testing server_context_test_spouse_test" $(Q) $(BINDIR)/$(CONFIG)/server_context_test_spouse_test || ( echo test server_context_test_spouse_test failed ; exit 1 ) $(E) "[RUN] Testing server_early_return_test" @@ -10056,38 +10057,6 @@ endif endif -SERVER_CHTTP2_TEST_SRC = \ - test/core/surface/server_chttp2_test.cc \ - -SERVER_CHTTP2_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SERVER_CHTTP2_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/server_chttp2_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/server_chttp2_test: $(SERVER_CHTTP2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(SERVER_CHTTP2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/server_chttp2_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/surface/server_chttp2_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a - -deps_server_chttp2_test: $(SERVER_CHTTP2_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(SERVER_CHTTP2_TEST_OBJS:.o=.dep) -endif -endif - - SERVER_SSL_TEST_SRC = \ test/core/handshake/server_ssl.cc \ test/core/handshake/server_ssl_common.cc \ @@ -17223,6 +17192,49 @@ endif $(OBJDIR)/$(CONFIG)/test/cpp/server/server_builder_with_socket_mutator_test.o: $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/simple_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/simple_messages.grpc.pb.cc +SERVER_CHTTP2_TEST_SRC = \ + test/core/surface/server_chttp2_test.cc \ + +SERVER_CHTTP2_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SERVER_CHTTP2_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/server_chttp2_test: openssl_dep_error + +else + + + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. + +$(BINDIR)/$(CONFIG)/server_chttp2_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/server_chttp2_test: $(PROTOBUF_DEP) $(SERVER_CHTTP2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(SERVER_CHTTP2_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/server_chttp2_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/core/surface/server_chttp2_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a + +deps_server_chttp2_test: $(SERVER_CHTTP2_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(SERVER_CHTTP2_TEST_OBJS:.o=.dep) +endif +endif + + SERVER_CONTEXT_TEST_SPOUSE_TEST_SRC = \ test/cpp/test/server_context_test_spouse_test.cc \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 5f09c7b3e73..294f1609ece 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -4136,18 +4136,6 @@ targets: - gpr - address_sorting - upb -- name: server_chttp2_test - build: test - language: c - headers: [] - src: - - test/core/surface/server_chttp2_test.cc - deps: - - grpc_test_util - - grpc - - gpr - - address_sorting - - upb - name: server_ssl_test build: test language: c @@ -6932,6 +6920,19 @@ targets: - linux - posix - mac +- name: server_chttp2_test + gtest: true + build: test + language: c++ + headers: [] + src: + - test/core/surface/server_chttp2_test.cc + deps: + - grpc_test_util + - grpc + - gpr + - address_sorting + - upb - name: server_context_test_spouse_test gtest: true build: test diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index 446a214c183..b173ba02499 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -39,6 +39,8 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/handshaker.h" #include "src/core/lib/channel/handshaker_registry.h" +#include "src/core/lib/gprpp/ref_counted.h" +#include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/resource_quota.h" @@ -47,405 +49,439 @@ #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" -struct server_state { - grpc_server* server; - grpc_tcp_server* tcp_server; - grpc_channel_args* args; - gpr_mu mu; - bool shutdown; - grpc_closure tcp_server_shutdown_complete; - grpc_closure* server_destroy_listener_done; - grpc_core::HandshakeManager* pending_handshake_mgrs; - grpc_core::RefCountedPtr - channelz_listen_socket; -}; +namespace grpc_core { +namespace { + +class Chttp2ServerListener : public ServerListenerInterface { + public: + static grpc_error* Create(grpc_server* server, const char* addr, + grpc_channel_args* args, int* port_num); + + static grpc_error* CreateWithAcceptor(grpc_server* server, const char* name, + grpc_channel_args* args); + + // Do not instantiate directly. Use one of the factory methods above. + Chttp2ServerListener(grpc_server* server, grpc_channel_args* args); + ~Chttp2ServerListener(); + + void Start(grpc_server* server, grpc_pollset** pollsets, + size_t npollsets) override; + + channelz::ListenSocketNode* channelz_listen_socket_node() const override { + return channelz_listen_socket_.get(); + } + + void SetOnDestroyDone(grpc_closure* on_destroy_done) override; + + void Orphan() override; + + private: + class ConnectionState : public RefCounted { + public: + ConnectionState(Chttp2ServerListener* listener, + grpc_pollset* accepting_pollset, + grpc_tcp_server_acceptor* acceptor, + RefCountedPtr handshake_mgr, + grpc_channel_args* args, grpc_endpoint* endpoint); + + ~ConnectionState(); + + private: + static void OnTimeout(void* arg, grpc_error* error); + static void OnReceiveSettings(void* arg, grpc_error* error); + static void OnHandshakeDone(void* arg, grpc_error* error); -struct server_connection_state { - gpr_refcount refs; - server_state* svr_state; - grpc_pollset* accepting_pollset; - grpc_tcp_server_acceptor* acceptor; - grpc_core::RefCountedPtr handshake_mgr; - // State for enforcing handshake timeout on receiving HTTP/2 settings. - grpc_chttp2_transport* transport; - grpc_millis deadline; - grpc_timer timer; - grpc_closure on_timeout; - grpc_closure on_receive_settings; - grpc_pollset_set* interested_parties; + Chttp2ServerListener* const listener_; + grpc_pollset* const accepting_pollset_; + grpc_tcp_server_acceptor* const acceptor_; + RefCountedPtr handshake_mgr_; + // State for enforcing handshake timeout on receiving HTTP/2 settings. + grpc_chttp2_transport* transport_ = nullptr; + grpc_millis deadline_; + grpc_timer timer_; + grpc_closure on_timeout_; + grpc_closure on_receive_settings_; + grpc_pollset_set* const interested_parties_; + }; + + static void OnAccept(void* arg, grpc_endpoint* tcp, + grpc_pollset* accepting_pollset, + grpc_tcp_server_acceptor* acceptor); + + RefCountedPtr CreateHandshakeManager(); + + static void TcpServerShutdownComplete(void* arg, grpc_error* error); + + static void DestroyListener(grpc_server* /*server*/, void* arg, + grpc_closure* destroy_done); + + grpc_server* const server_; + grpc_channel_args* const args_; + grpc_tcp_server* tcp_server_; + Mutex mu_; + bool shutdown_ = true; + grpc_closure tcp_server_shutdown_complete_; + grpc_closure* on_destroy_done_ = nullptr; + HandshakeManager* pending_handshake_mgrs_ = nullptr; + RefCountedPtr channelz_listen_socket_; }; -static void server_connection_state_unref( - server_connection_state* connection_state) { - if (gpr_unref(&connection_state->refs)) { - if (connection_state->transport != nullptr) { - GRPC_CHTTP2_UNREF_TRANSPORT(connection_state->transport, - "receive settings timeout"); - } - grpc_pollset_set_del_pollset(connection_state->interested_parties, - connection_state->accepting_pollset); - grpc_pollset_set_destroy(connection_state->interested_parties); - gpr_free(connection_state); +// +// Chttp2ServerListener::ConnectionState +// + +grpc_millis GetConnectionDeadline(const grpc_channel_args* args) { + int timeout_ms = + grpc_channel_args_find_integer(args, GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS, + {120 * GPR_MS_PER_SEC, 1, INT_MAX}); + return ExecCtx::Get()->Now() + timeout_ms; +} + +Chttp2ServerListener::ConnectionState::ConnectionState( + Chttp2ServerListener* listener, grpc_pollset* accepting_pollset, + grpc_tcp_server_acceptor* acceptor, + RefCountedPtr handshake_mgr, grpc_channel_args* args, + grpc_endpoint* endpoint) + : listener_(listener), + accepting_pollset_(accepting_pollset), + acceptor_(acceptor), + handshake_mgr_(std::move(handshake_mgr)), + deadline_(GetConnectionDeadline(args)), + interested_parties_(grpc_pollset_set_create()) { + grpc_pollset_set_add_pollset(interested_parties_, accepting_pollset_); + HandshakerRegistry::AddHandshakers(HANDSHAKER_SERVER, args, + interested_parties_, handshake_mgr_.get()); + handshake_mgr_->DoHandshake(endpoint, args, deadline_, acceptor_, + OnHandshakeDone, this); +} + +Chttp2ServerListener::ConnectionState::~ConnectionState() { + if (transport_ != nullptr) { + GRPC_CHTTP2_UNREF_TRANSPORT(transport_, "receive settings timeout"); } + grpc_pollset_set_del_pollset(interested_parties_, accepting_pollset_); + grpc_pollset_set_destroy(interested_parties_); } -static void on_timeout(void* arg, grpc_error* error) { - server_connection_state* connection_state = - static_cast(arg); +void Chttp2ServerListener::ConnectionState::OnTimeout(void* arg, + grpc_error* error) { + ConnectionState* self = static_cast(arg); // Note that we may be called with GRPC_ERROR_NONE when the timer fires // or with an error indicating that the timer system is being shut down. if (error != GRPC_ERROR_CANCELLED) { grpc_transport_op* op = grpc_make_transport_op(nullptr); op->disconnect_with_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Did not receive HTTP/2 settings before handshake timeout"); - grpc_transport_perform_op(&connection_state->transport->base, op); + grpc_transport_perform_op(&self->transport_->base, op); } - server_connection_state_unref(connection_state); + self->Unref(); } -static void on_receive_settings(void* arg, grpc_error* error) { - server_connection_state* connection_state = - static_cast(arg); +void Chttp2ServerListener::ConnectionState::OnReceiveSettings( + void* arg, grpc_error* error) { + ConnectionState* self = static_cast(arg); if (error == GRPC_ERROR_NONE) { - grpc_timer_cancel(&connection_state->timer); + grpc_timer_cancel(&self->timer_); } - server_connection_state_unref(connection_state); + self->Unref(); } -static void on_handshake_done(void* arg, grpc_error* error) { - auto* args = static_cast(arg); - server_connection_state* connection_state = - static_cast(args->user_data); - gpr_mu_lock(&connection_state->svr_state->mu); - grpc_resource_user* resource_user = grpc_server_get_default_resource_user( - connection_state->svr_state->server); - if (error != GRPC_ERROR_NONE || connection_state->svr_state->shutdown) { - const char* error_str = grpc_error_string(error); - gpr_log(GPR_DEBUG, "Handshaking failed: %s", error_str); - grpc_resource_user* resource_user = grpc_server_get_default_resource_user( - connection_state->svr_state->server); - if (resource_user != nullptr) { - grpc_resource_user_free(resource_user, GRPC_RESOURCE_QUOTA_CHANNEL_SIZE); - } - if (error == GRPC_ERROR_NONE && args->endpoint != nullptr) { - // We were shut down after handshaking completed successfully, so - // destroy the endpoint here. - // TODO(ctiller): It is currently necessary to shutdown endpoints - // before destroying them, even if we know that there are no - // pending read/write callbacks. This should be fixed, at which - // point this can be removed. - grpc_endpoint_shutdown(args->endpoint, GRPC_ERROR_NONE); - grpc_endpoint_destroy(args->endpoint); - grpc_channel_args_destroy(args->args); - grpc_slice_buffer_destroy_internal(args->read_buffer); - gpr_free(args->read_buffer); - } - } else { - // If the handshaking succeeded but there is no endpoint, then the - // handshaker may have handed off the connection to some external - // code, so we can just clean up here without creating a transport. - if (args->endpoint != nullptr) { - grpc_transport* transport = grpc_create_chttp2_transport( - args->args, args->endpoint, false, resource_user); - grpc_server_setup_transport( - connection_state->svr_state->server, transport, - connection_state->accepting_pollset, args->args, - grpc_chttp2_transport_get_socket_node(transport), resource_user); - // Use notify_on_receive_settings callback to enforce the - // handshake deadline. - connection_state->transport = - reinterpret_cast(transport); - gpr_ref(&connection_state->refs); - GRPC_CLOSURE_INIT(&connection_state->on_receive_settings, - on_receive_settings, connection_state, - grpc_schedule_on_exec_ctx); - grpc_chttp2_transport_start_reading( - transport, args->read_buffer, &connection_state->on_receive_settings); - grpc_channel_args_destroy(args->args); - gpr_ref(&connection_state->refs); - GRPC_CHTTP2_REF_TRANSPORT((grpc_chttp2_transport*)transport, - "receive settings timeout"); - GRPC_CLOSURE_INIT(&connection_state->on_timeout, on_timeout, - connection_state, grpc_schedule_on_exec_ctx); - grpc_timer_init(&connection_state->timer, connection_state->deadline, - &connection_state->on_timeout); - } else { +void Chttp2ServerListener::ConnectionState::OnHandshakeDone(void* arg, + grpc_error* error) { + auto* args = static_cast(arg); + ConnectionState* self = static_cast(args->user_data); + { + MutexLock lock(&self->listener_->mu_); + grpc_resource_user* resource_user = + grpc_server_get_default_resource_user(self->listener_->server_); + if (error != GRPC_ERROR_NONE || self->listener_->shutdown_) { + const char* error_str = grpc_error_string(error); + gpr_log(GPR_DEBUG, "Handshaking failed: %s", error_str); + grpc_resource_user* resource_user = + grpc_server_get_default_resource_user(self->listener_->server_); if (resource_user != nullptr) { grpc_resource_user_free(resource_user, GRPC_RESOURCE_QUOTA_CHANNEL_SIZE); } + if (error == GRPC_ERROR_NONE && args->endpoint != nullptr) { + // We were shut down after handshaking completed successfully, so + // destroy the endpoint here. + // TODO(ctiller): It is currently necessary to shutdown endpoints + // before destroying them, even if we know that there are no + // pending read/write callbacks. This should be fixed, at which + // point this can be removed. + grpc_endpoint_shutdown(args->endpoint, GRPC_ERROR_NONE); + grpc_endpoint_destroy(args->endpoint); + grpc_channel_args_destroy(args->args); + grpc_slice_buffer_destroy_internal(args->read_buffer); + gpr_free(args->read_buffer); + } + } else { + // If the handshaking succeeded but there is no endpoint, then the + // handshaker may have handed off the connection to some external + // code, so we can just clean up here without creating a transport. + if (args->endpoint != nullptr) { + grpc_transport* transport = grpc_create_chttp2_transport( + args->args, args->endpoint, false, resource_user); + grpc_server_setup_transport( + self->listener_->server_, transport, self->accepting_pollset_, + args->args, grpc_chttp2_transport_get_socket_node(transport), + resource_user); + // Use notify_on_receive_settings callback to enforce the + // handshake deadline. + // Note: The reinterpret_cast<>s here are safe, because + // grpc_chttp2_transport is a C-style extension of + // grpc_transport, so this is morally equivalent of a + // static_cast<> to a derived class. + // TODO(roth): Change to static_cast<> when we C++-ify the + // transport API. + self->transport_ = reinterpret_cast(transport); + self->Ref().release(); // Held by OnReceiveSettings(). + GRPC_CLOSURE_INIT(&self->on_receive_settings_, OnReceiveSettings, self, + grpc_schedule_on_exec_ctx); + grpc_chttp2_transport_start_reading(transport, args->read_buffer, + &self->on_receive_settings_); + grpc_channel_args_destroy(args->args); + self->Ref().release(); // Held by OnTimeout(). + GRPC_CHTTP2_REF_TRANSPORT( + reinterpret_cast(transport), + "receive settings timeout"); + GRPC_CLOSURE_INIT(&self->on_timeout_, OnTimeout, self, + grpc_schedule_on_exec_ctx); + grpc_timer_init(&self->timer_, self->deadline_, &self->on_timeout_); + } else { + if (resource_user != nullptr) { + grpc_resource_user_free(resource_user, + GRPC_RESOURCE_QUOTA_CHANNEL_SIZE); + } + } } + self->handshake_mgr_->RemoveFromPendingMgrList( + &self->listener_->pending_handshake_mgrs_); } - connection_state->handshake_mgr->RemoveFromPendingMgrList( - &connection_state->svr_state->pending_handshake_mgrs); - gpr_mu_unlock(&connection_state->svr_state->mu); - connection_state->handshake_mgr.reset(); - gpr_free(connection_state->acceptor); - grpc_tcp_server_unref(connection_state->svr_state->tcp_server); - server_connection_state_unref(connection_state); + self->handshake_mgr_.reset(); + gpr_free(self->acceptor_); + grpc_tcp_server_unref(self->listener_->tcp_server_); + self->Unref(); } -static void on_accept(void* arg, grpc_endpoint* tcp, - grpc_pollset* accepting_pollset, - grpc_tcp_server_acceptor* acceptor) { - server_state* state = static_cast(arg); - gpr_mu_lock(&state->mu); - if (state->shutdown) { - gpr_mu_unlock(&state->mu); - grpc_endpoint_shutdown(tcp, GRPC_ERROR_NONE); - grpc_endpoint_destroy(tcp); - gpr_free(acceptor); - return; +// +// Chttp2ServerListener +// + +grpc_error* Chttp2ServerListener::Create(grpc_server* server, const char* addr, + grpc_channel_args* args, + int* port_num) { + std::vector error_list; + grpc_resolved_addresses* resolved = nullptr; + Chttp2ServerListener* listener = nullptr; + // The bulk of this method is inside of a lambda to make cleanup + // easier without using goto. + grpc_error* error = [&]() { + *port_num = -1; + /* resolve address */ + grpc_error* error = grpc_blocking_resolve_address(addr, "https", &resolved); + if (error != GRPC_ERROR_NONE) return error; + // Create Chttp2ServerListener. + listener = new Chttp2ServerListener(server, args); + error = grpc_tcp_server_create(&listener->tcp_server_shutdown_complete_, + args, &listener->tcp_server_); + if (error != GRPC_ERROR_NONE) return error; + for (size_t i = 0; i < resolved->naddrs; i++) { + int port_temp; + error = grpc_tcp_server_add_port(listener->tcp_server_, + &resolved->addrs[i], &port_temp); + if (error != GRPC_ERROR_NONE) { + error_list.push_back(error); + } else { + if (*port_num == -1) { + *port_num = port_temp; + } else { + GPR_ASSERT(*port_num == port_temp); + } + } + } + if (error_list.size() == resolved->naddrs) { + std::string msg = + absl::StrFormat("No address added out of total %" PRIuPTR " resolved", + resolved->naddrs); + return GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING( + msg.c_str(), error_list.data(), error_list.size()); + } else if (!error_list.empty()) { + std::string msg = absl::StrFormat( + "Only %" PRIuPTR " addresses added out of total %" PRIuPTR + " resolved", + resolved->naddrs - error_list.size(), resolved->naddrs); + error = GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING( + msg.c_str(), error_list.data(), error_list.size()); + gpr_log(GPR_INFO, "WARNING: %s", grpc_error_string(error)); + GRPC_ERROR_UNREF(error); + /* we managed to bind some addresses: continue */ + } + // Create channelz node. + if (grpc_channel_args_find_bool(args, GRPC_ARG_ENABLE_CHANNELZ, + GRPC_ENABLE_CHANNELZ_DEFAULT)) { + listener->channelz_listen_socket_ = + MakeRefCounted( + addr, absl::StrFormat("chttp2 listener %s", addr)); + } + /* Register with the server only upon success */ + grpc_server_add_listener(server, + OrphanablePtr(listener)); + return GRPC_ERROR_NONE; + }(); + if (resolved != nullptr) { + grpc_resolved_addresses_destroy(resolved); + } + if (error != GRPC_ERROR_NONE) { + if (listener != nullptr) { + if (listener->tcp_server_ != nullptr) { + grpc_tcp_server_unref(listener->tcp_server_); + } else { + delete listener; + } + } else { + grpc_channel_args_destroy(args); + } + *port_num = 0; + } + for (grpc_error* error : error_list) { + GRPC_ERROR_UNREF(error); } + return error; +} + +grpc_error* Chttp2ServerListener::CreateWithAcceptor(grpc_server* server, + const char* name, + grpc_channel_args* args) { + Chttp2ServerListener* listener = new Chttp2ServerListener(server, args); + grpc_error* error = grpc_tcp_server_create( + &listener->tcp_server_shutdown_complete_, args, &listener->tcp_server_); + if (error != GRPC_ERROR_NONE) { + delete listener; + return error; + } + // TODO(yangg) channelz + TcpServerFdHandler** arg_val = + grpc_channel_args_find_pointer(args, name); + *arg_val = grpc_tcp_server_create_fd_handler(listener->tcp_server_); + grpc_server_add_listener(server, + OrphanablePtr(listener)); + return GRPC_ERROR_NONE; +} + +Chttp2ServerListener::Chttp2ServerListener(grpc_server* server, + grpc_channel_args* args) + : server_(server), args_(args) { + GRPC_CLOSURE_INIT(&tcp_server_shutdown_complete_, TcpServerShutdownComplete, + this, grpc_schedule_on_exec_ctx); +} + +Chttp2ServerListener::~Chttp2ServerListener() { + grpc_channel_args_destroy(args_); +} + +/* Server callback: start listening on our ports */ +void Chttp2ServerListener::Start(grpc_server* /*server*/, + grpc_pollset** pollsets, + size_t pollset_count) { + { + MutexLock lock(&mu_); + shutdown_ = false; + } + grpc_tcp_server_start(tcp_server_, pollsets, pollset_count, OnAccept, this); +} + +void Chttp2ServerListener::SetOnDestroyDone(grpc_closure* on_destroy_done) { + MutexLock lock(&mu_); + on_destroy_done_ = on_destroy_done; +} + +RefCountedPtr Chttp2ServerListener::CreateHandshakeManager() { + MutexLock lock(&mu_); + if (shutdown_) return nullptr; grpc_resource_user* resource_user = - grpc_server_get_default_resource_user(state->server); + grpc_server_get_default_resource_user(server_); if (resource_user != nullptr && !grpc_resource_user_safe_alloc(resource_user, GRPC_RESOURCE_QUOTA_CHANNEL_SIZE)) { - gpr_log( - GPR_ERROR, - "Memory quota exhausted, rejecting the connection, no handshaking."); - gpr_mu_unlock(&state->mu); + gpr_log(GPR_ERROR, + "Memory quota exhausted, rejecting connection, no handshaking."); + return nullptr; + } + auto handshake_mgr = MakeRefCounted(); + handshake_mgr->AddToPendingMgrList(&pending_handshake_mgrs_); + grpc_tcp_server_ref(tcp_server_); // Ref held by ConnectionState. + return handshake_mgr; +} + +void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp, + grpc_pollset* accepting_pollset, + grpc_tcp_server_acceptor* acceptor) { + Chttp2ServerListener* self = static_cast(arg); + RefCountedPtr handshake_mgr = + self->CreateHandshakeManager(); + if (handshake_mgr == nullptr) { grpc_endpoint_shutdown(tcp, GRPC_ERROR_NONE); grpc_endpoint_destroy(tcp); gpr_free(acceptor); return; } - auto handshake_mgr = grpc_core::MakeRefCounted(); - handshake_mgr->AddToPendingMgrList(&state->pending_handshake_mgrs); - grpc_tcp_server_ref(state->tcp_server); - gpr_mu_unlock(&state->mu); - server_connection_state* connection_state = - static_cast( - gpr_zalloc(sizeof(*connection_state))); - gpr_ref_init(&connection_state->refs, 1); - connection_state->svr_state = state; - connection_state->accepting_pollset = accepting_pollset; - connection_state->acceptor = acceptor; - connection_state->handshake_mgr = handshake_mgr; - connection_state->interested_parties = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(connection_state->interested_parties, - connection_state->accepting_pollset); - grpc_core::HandshakerRegistry::AddHandshakers( - grpc_core::HANDSHAKER_SERVER, state->args, - connection_state->interested_parties, - connection_state->handshake_mgr.get()); - const grpc_arg* timeout_arg = - grpc_channel_args_find(state->args, GRPC_ARG_SERVER_HANDSHAKE_TIMEOUT_MS); - connection_state->deadline = - grpc_core::ExecCtx::Get()->Now() + - grpc_channel_arg_get_integer(timeout_arg, - {120 * GPR_MS_PER_SEC, 1, INT_MAX}); - connection_state->handshake_mgr->DoHandshake( - tcp, state->args, connection_state->deadline, acceptor, on_handshake_done, - connection_state); -} - -/* Server callback: start listening on our ports */ -static void server_start_listener(grpc_server* /*server*/, void* arg, - grpc_pollset** pollsets, - size_t pollset_count) { - server_state* state = static_cast(arg); - gpr_mu_lock(&state->mu); - state->shutdown = false; - gpr_mu_unlock(&state->mu); - grpc_tcp_server_start(state->tcp_server, pollsets, pollset_count, on_accept, - state); + // Deletes itself when done. + new ConnectionState(self, accepting_pollset, acceptor, + std::move(handshake_mgr), self->args_, tcp); } -static void tcp_server_shutdown_complete(void* arg, grpc_error* error) { - server_state* state = static_cast(arg); +void Chttp2ServerListener::TcpServerShutdownComplete(void* arg, + grpc_error* error) { + Chttp2ServerListener* self = static_cast(arg); /* ensure all threads have unlocked */ - gpr_mu_lock(&state->mu); - grpc_closure* destroy_done = state->server_destroy_listener_done; - GPR_ASSERT(state->shutdown); - if (state->pending_handshake_mgrs != nullptr) { - state->pending_handshake_mgrs->ShutdownAllPending(GRPC_ERROR_REF(error)); + grpc_closure* destroy_done = nullptr; + { + MutexLock lock(&self->mu_); + destroy_done = self->on_destroy_done_; + GPR_ASSERT(self->shutdown_); + if (self->pending_handshake_mgrs_ != nullptr) { + self->pending_handshake_mgrs_->ShutdownAllPending(GRPC_ERROR_REF(error)); + } + self->channelz_listen_socket_.reset(); } - state->channelz_listen_socket.reset(); - gpr_mu_unlock(&state->mu); // Flush queued work before destroying handshaker factory, since that // may do a synchronous unref. - grpc_core::ExecCtx::Get()->Flush(); + ExecCtx::Get()->Flush(); if (destroy_done != nullptr) { - grpc_core::ExecCtx::Run(DEBUG_LOCATION, destroy_done, - GRPC_ERROR_REF(error)); - grpc_core::ExecCtx::Get()->Flush(); + ExecCtx::Run(DEBUG_LOCATION, destroy_done, GRPC_ERROR_REF(error)); + ExecCtx::Get()->Flush(); } - grpc_channel_args_destroy(state->args); - gpr_mu_destroy(&state->mu); - gpr_free(state); + delete self; } /* Server callback: destroy the tcp listener (so we don't generate further callbacks) */ -static void server_destroy_listener(grpc_server* /*server*/, void* arg, - grpc_closure* destroy_done) { - server_state* state = static_cast(arg); - gpr_mu_lock(&state->mu); - state->shutdown = true; - state->server_destroy_listener_done = destroy_done; - grpc_tcp_server* tcp_server = state->tcp_server; - gpr_mu_unlock(&state->mu); +void Chttp2ServerListener::Orphan() { + grpc_tcp_server* tcp_server; + { + MutexLock lock(&mu_); + shutdown_ = true; + tcp_server = tcp_server_; + } grpc_tcp_server_shutdown_listeners(tcp_server); grpc_tcp_server_unref(tcp_server); } -static grpc_error* chttp2_server_add_acceptor(grpc_server* server, - const char* name, - grpc_channel_args* args) { - grpc_tcp_server* tcp_server = nullptr; - grpc_error* err = GRPC_ERROR_NONE; - server_state* state = nullptr; - const grpc_arg* arg = nullptr; - grpc_core::TcpServerFdHandler** arg_val = nullptr; - state = static_cast(gpr_zalloc(sizeof(*state))); - GRPC_CLOSURE_INIT(&state->tcp_server_shutdown_complete, - tcp_server_shutdown_complete, state, - grpc_schedule_on_exec_ctx); - err = grpc_tcp_server_create(&state->tcp_server_shutdown_complete, args, - &tcp_server); - if (err != GRPC_ERROR_NONE) { - goto error; - } - state->server = server; - state->tcp_server = tcp_server; - state->args = args; - state->shutdown = true; - gpr_mu_init(&state->mu); - // TODO(yangg) channelz - arg = grpc_channel_args_find(args, name); - GPR_ASSERT(arg->type == GRPC_ARG_POINTER); - arg_val = static_cast(arg->value.pointer.p); - *arg_val = grpc_tcp_server_create_fd_handler(tcp_server); - - grpc_server_add_listener(server, state, server_start_listener, - server_destroy_listener, /* node */ nullptr); - return err; - -/* Error path: cleanup and return */ -error: - GPR_ASSERT(err != GRPC_ERROR_NONE); - if (tcp_server) { - grpc_tcp_server_unref(tcp_server); - } else { - grpc_channel_args_destroy(args); - gpr_free(state); - } - return err; -} +} // namespace -grpc_error* grpc_chttp2_server_add_port(grpc_server* server, const char* addr, - grpc_channel_args* args, - int* port_num) { - grpc_resolved_addresses* resolved = nullptr; - grpc_tcp_server* tcp_server = nullptr; - size_t i; - size_t count = 0; - int port_temp; - grpc_error* err = GRPC_ERROR_NONE; - server_state* state = nullptr; - grpc_error** errors = nullptr; - size_t naddrs = 0; - const grpc_arg* arg = nullptr; - - *port_num = -1; +// +// Chttp2ServerAddPort() +// +grpc_error* Chttp2ServerAddPort(grpc_server* server, const char* addr, + grpc_channel_args* args, int* port_num) { if (strncmp(addr, "external:", 9) == 0) { - return chttp2_server_add_acceptor(server, addr, args); - } - - /* resolve address */ - err = grpc_blocking_resolve_address(addr, "https", &resolved); - if (err != GRPC_ERROR_NONE) { - goto error; - } - state = static_cast(gpr_zalloc(sizeof(*state))); - GRPC_CLOSURE_INIT(&state->tcp_server_shutdown_complete, - tcp_server_shutdown_complete, state, - grpc_schedule_on_exec_ctx); - err = grpc_tcp_server_create(&state->tcp_server_shutdown_complete, args, - &tcp_server); - if (err != GRPC_ERROR_NONE) { - goto error; - } - - state->server = server; - state->tcp_server = tcp_server; - state->args = args; - state->shutdown = true; - gpr_mu_init(&state->mu); - - naddrs = resolved->naddrs; - errors = static_cast(gpr_malloc(sizeof(*errors) * naddrs)); - for (i = 0; i < naddrs; i++) { - errors[i] = - grpc_tcp_server_add_port(tcp_server, &resolved->addrs[i], &port_temp); - if (errors[i] == GRPC_ERROR_NONE) { - if (*port_num == -1) { - *port_num = port_temp; - } else { - GPR_ASSERT(*port_num == port_temp); - } - count++; - } + return grpc_core::Chttp2ServerListener::CreateWithAcceptor(server, addr, + args); } - if (count == 0) { - char* msg; - gpr_asprintf(&msg, "No address added out of total %" PRIuPTR " resolved", - naddrs); - err = GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(msg, errors, naddrs); - gpr_free(msg); - goto error; - } else if (count != naddrs) { - char* msg; - gpr_asprintf(&msg, - "Only %" PRIuPTR " addresses added out of total %" PRIuPTR - " resolved", - count, naddrs); - err = GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(msg, errors, naddrs); - gpr_free(msg); - - const char* warning_message = grpc_error_string(err); - gpr_log(GPR_INFO, "WARNING: %s", warning_message); - - /* we managed to bind some addresses: continue */ - } - grpc_resolved_addresses_destroy(resolved); - - arg = grpc_channel_args_find(args, GRPC_ARG_ENABLE_CHANNELZ); - if (grpc_channel_arg_get_bool(arg, GRPC_ENABLE_CHANNELZ_DEFAULT)) { - state->channelz_listen_socket = - grpc_core::MakeRefCounted( - addr, absl::StrFormat("chttp2 listener %s", addr)); - } - - /* Register with the server only upon success */ - grpc_server_add_listener(server, state, server_start_listener, - server_destroy_listener, - state->channelz_listen_socket); - goto done; - -/* Error path: cleanup and return */ -error: - GPR_ASSERT(err != GRPC_ERROR_NONE); - if (resolved) { - grpc_resolved_addresses_destroy(resolved); - } - if (tcp_server) { - grpc_tcp_server_unref(tcp_server); - } else { - grpc_channel_args_destroy(args); - gpr_free(state); - } - *port_num = 0; - -done: - if (errors != nullptr) { - for (i = 0; i < naddrs; i++) { - GRPC_ERROR_UNREF(errors[i]); - } - gpr_free(errors); - } - return err; + return grpc_core::Chttp2ServerListener::Create(server, addr, args, port_num); } + +} // namespace grpc_core diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.h b/src/core/ext/transport/chttp2/server/chttp2_server.h index 6e51001b53b..8f651bb5ce9 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.h +++ b/src/core/ext/transport/chttp2/server/chttp2_server.h @@ -25,9 +25,13 @@ #include "src/core/lib/iomgr/error.h" +namespace grpc_core { + /// Adds a port to \a server. Sets \a port_num to the port number. /// Takes ownership of \a args. -grpc_error* grpc_chttp2_server_add_port(grpc_server* server, const char* addr, - grpc_channel_args* args, int* port_num); +grpc_error* Chttp2ServerAddPort(grpc_server* server, const char* addr, + grpc_channel_args* args, int* port_num); + +} // namespace grpc_core #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H */ diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc index 99f18cdf39f..7220591a30f 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc @@ -32,7 +32,7 @@ int grpc_server_add_insecure_http2_port(grpc_server* server, const char* addr) { int port_num = 0; GRPC_API_TRACE("grpc_server_add_insecure_http2_port(server=%p, addr=%s)", 2, (server, addr)); - grpc_error* err = grpc_chttp2_server_add_port( + grpc_error* err = grpc_core::Chttp2ServerAddPort( server, addr, grpc_channel_args_copy(grpc_server_get_channel_args(server)), &port_num); if (err != GRPC_ERROR_NONE) { diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc index 98fdb620704..6e203ed4e92 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc @@ -72,7 +72,7 @@ int grpc_server_add_secure_http2_port(grpc_server* server, const char* addr, grpc_channel_args_copy_and_add(grpc_server_get_channel_args(server), args_to_add, GPR_ARRAY_SIZE(args_to_add)); // Add server port. - err = grpc_chttp2_server_add_port(server, addr, args, &port_num); + err = grpc_core::Chttp2ServerAddPort(server, addr, args, &port_num); done: sc.reset(DEBUG_LOCATION, "server"); diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc index d22b52ad6fe..6999704e138 100644 --- a/src/core/lib/surface/server.cc +++ b/src/core/lib/surface/server.cc @@ -24,12 +24,14 @@ #include #include +#include +#include +#include + #include #include #include -#include - #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/channelz.h" #include "src/core/lib/channel/connected_channel.h" @@ -57,13 +59,12 @@ namespace { void server_on_recv_initial_metadata(void* ptr, grpc_error* error); void server_recv_trailing_metadata_ready(void* user_data, grpc_error* error); -struct listener { - void* arg; - void (*start)(grpc_server* server, void* arg, grpc_pollset** pollsets, - size_t pollset_count); - void (*destroy)(grpc_server* server, void* arg, grpc_closure* closure); - struct listener* next; - intptr_t socket_uuid; +struct Listener { + explicit Listener( + grpc_core::OrphanablePtr l) + : listener(std::move(l)) {} + + grpc_core::OrphanablePtr listener; grpc_closure destroy_done; }; @@ -297,15 +298,15 @@ struct channel_broadcaster { } // namespace struct grpc_server { - grpc_channel_args* channel_args; + grpc_channel_args* channel_args = nullptr; - grpc_resource_user* default_resource_user; + grpc_resource_user* default_resource_user = nullptr; - grpc_completion_queue** cqs; - grpc_pollset** pollsets; - size_t cq_count; - size_t pollset_count; - bool started; + grpc_completion_queue** cqs = nullptr; + grpc_pollset** pollsets = nullptr; + size_t cq_count = 0; + size_t pollset_count = 0; + bool started = false; /* The two following mutexes control access to server-state mu_global controls access to non-call-related state (e.g., channel state) @@ -319,26 +320,26 @@ struct grpc_server { /* startup synchronization: flag is protected by mu_global, signals whether we are doing the listener start routine or not */ - bool starting; + bool starting = false; gpr_cv starting_cv; // TODO(vjpai): Convert from a linked-list head pointer to a std::vector once // grpc_server has a real constructor/destructor - registered_method* registered_methods; + registered_method* registered_methods = nullptr; /** one request matcher for unregistered methods */ // TODO(vjpai): Convert to a std::unique_ptr once grpc_server has a real // constructor and destructor. - RequestMatcherInterface* unregistered_request_matcher; + RequestMatcherInterface* unregistered_request_matcher = nullptr; - gpr_atm shutdown_flag; - uint8_t shutdown_published; - size_t num_shutdown_tags; - shutdown_tag* shutdown_tags; + gpr_atm shutdown_flag = 0; + uint8_t shutdown_published = 0; + size_t num_shutdown_tags = 0; + shutdown_tag* shutdown_tags = nullptr; channel_data root_channel_data; - listener* listeners; - int listeners_destroyed; + std::list listeners; + int listeners_destroyed = 0; grpc_core::RefCount internal_refcount; /** when did we print the last shutdown progress message */ @@ -675,7 +676,6 @@ void server_ref(grpc_server* server) { server->internal_refcount.Ref(); } void server_delete(grpc_server* server) { registered_method* rm; size_t i; - server->channelz_server.reset(); grpc_channel_args_destroy(server->channel_args); gpr_mu_destroy(&server->mu_global); gpr_mu_destroy(&server->mu_call); @@ -691,7 +691,7 @@ void server_delete(grpc_server* server) { gpr_free(server->cqs); gpr_free(server->pollsets); gpr_free(server->shutdown_tags); - gpr_free(server); + delete server; } void server_unref(grpc_server* server) { @@ -881,15 +881,6 @@ void start_new_rpc(grpc_call_element* elem) { GRPC_SRM_PAYLOAD_NONE); } -int num_listeners(grpc_server* server) { - listener* l; - int n = 0; - for (l = server->listeners; l; l = l->next) { - n++; - } - return n; -} - void done_shutdown_event(void* server, grpc_cq_completion* /*completion*/) { server_unref(static_cast(server)); } @@ -929,17 +920,17 @@ void maybe_finish_shutdown(grpc_server* server) { gpr_mu_unlock(&server->mu_call); if (server->root_channel_data.next != &server->root_channel_data || - server->listeners_destroyed < num_listeners(server)) { + server->listeners_destroyed < server->listeners.size()) { if (gpr_time_cmp(gpr_time_sub(gpr_now(GPR_CLOCK_REALTIME), server->last_shutdown_message_time), gpr_time_from_seconds(1, GPR_TIMESPAN)) >= 0) { server->last_shutdown_message_time = gpr_now(GPR_CLOCK_REALTIME); gpr_log(GPR_DEBUG, - "Waiting for %d channels and %d/%d listeners to be destroyed" - " before shutting down server", + "Waiting for %d channels and %" PRIuPTR "/%" PRIuPTR + " listeners to be destroyed before shutting down server", num_channels(server), - num_listeners(server) - server->listeners_destroyed, - num_listeners(server)); + server->listeners.size() - server->listeners_destroyed, + server->listeners.size()); } return; } @@ -1312,26 +1303,21 @@ grpc_server* grpc_server_create(const grpc_channel_args* args, void* reserved) { grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE("grpc_server_create(%p, %p)", 2, (args, reserved)); - grpc_server* server = - static_cast(gpr_zalloc(sizeof(grpc_server))); + grpc_server* server = new grpc_server; gpr_mu_init(&server->mu_global); gpr_mu_init(&server->mu_call); gpr_cv_init(&server->starting_cv); - /* decremented by grpc_server_destroy */ - new (&server->internal_refcount) grpc_core::RefCount(); server->root_channel_data.next = server->root_channel_data.prev = &server->root_channel_data; server->channel_args = grpc_channel_args_copy(args); - const grpc_arg* arg = grpc_channel_args_find(args, GRPC_ARG_ENABLE_CHANNELZ); - if (grpc_channel_arg_get_bool(arg, GRPC_ENABLE_CHANNELZ_DEFAULT)) { - arg = grpc_channel_args_find( - args, GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE); - size_t channel_tracer_max_memory = grpc_channel_arg_get_integer( - arg, + if (grpc_channel_args_find_bool(args, GRPC_ARG_ENABLE_CHANNELZ, + GRPC_ENABLE_CHANNELZ_DEFAULT)) { + size_t channel_tracer_max_memory = grpc_channel_args_find_integer( + args, GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE, {GRPC_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE_DEFAULT, 0, INT_MAX}); server->channelz_server = grpc_core::MakeRefCounted( @@ -1414,8 +1400,8 @@ void grpc_server_start(grpc_server* server) { server->starting = true; gpr_mu_unlock(&server->mu_global); - for (listener* l = server->listeners; l; l = l->next) { - l->start(server, l->arg, server->pollsets, server->pollset_count); + for (auto& listener : server->listeners) { + listener.listener->Start(server, server->pollsets, server->pollset_count); } gpr_mu_lock(&server->mu_global); @@ -1547,7 +1533,6 @@ void grpc_server_setup_transport( */ void grpc_server_shutdown_and_notify(grpc_server* server, grpc_completion_queue* cq, void* tag) { - listener* l; shutdown_tag* sdt; channel_broadcaster broadcaster; grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; @@ -1599,13 +1584,18 @@ void grpc_server_shutdown_and_notify(grpc_server* server, gpr_mu_unlock(&server->mu_global); /* Shutdown listeners */ - for (l = server->listeners; l; l = l->next) { - GRPC_CLOSURE_INIT(&l->destroy_done, listener_destroy_done, server, - grpc_schedule_on_exec_ctx); - l->destroy(server, l->arg, &l->destroy_done); - if (server->channelz_server != nullptr && l->socket_uuid != 0) { - server->channelz_server->RemoveChildListenSocket(l->socket_uuid); + for (auto& listener : server->listeners) { + grpc_core::channelz::ListenSocketNode* channelz_listen_socket_node = + listener.listener->channelz_listen_socket_node(); + if (server->channelz_server != nullptr && + channelz_listen_socket_node != nullptr) { + server->channelz_server->RemoveChildListenSocket( + channelz_listen_socket_node->uuid()); } + GRPC_CLOSURE_INIT(&listener.destroy_done, listener_destroy_done, server, + grpc_schedule_on_exec_ctx); + listener.listener->SetOnDestroyDone(&listener.destroy_done); + listener.listener.reset(); } channel_broadcaster_shutdown(&broadcaster, true /* send_goaway */, @@ -1636,46 +1626,29 @@ void grpc_server_cancel_all_calls(grpc_server* server) { } void grpc_server_destroy(grpc_server* server) { - listener* l; grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; GRPC_API_TRACE("grpc_server_destroy(server=%p)", 1, (server)); gpr_mu_lock(&server->mu_global); - GPR_ASSERT(gpr_atm_acq_load(&server->shutdown_flag) || !server->listeners); - GPR_ASSERT(server->listeners_destroyed == num_listeners(server)); - - while (server->listeners) { - l = server->listeners; - server->listeners = l->next; - gpr_free(l); - } - + GPR_ASSERT(gpr_atm_acq_load(&server->shutdown_flag) || + server->listeners.empty()); + GPR_ASSERT(server->listeners_destroyed == server->listeners.size()); gpr_mu_unlock(&server->mu_global); server_unref(server); } void grpc_server_add_listener( - grpc_server* server, void* listener_arg, - void (*start)(grpc_server* server, void* arg, grpc_pollset** pollsets, - size_t pollset_count), - void (*destroy)(grpc_server* server, void* arg, grpc_closure* on_done), - grpc_core::RefCountedPtr node) { - listener* l = static_cast(gpr_malloc(sizeof(listener))); - l->arg = listener_arg; - l->start = start; - l->destroy = destroy; - l->socket_uuid = 0; - if (node != nullptr) { - l->socket_uuid = node->uuid(); - if (server->channelz_server != nullptr) { - server->channelz_server->AddChildListenSocket(std::move(node)); - } - } - l->next = server->listeners; - server->listeners = l; + grpc_server* server, + grpc_core::OrphanablePtr listener) { + grpc_core::channelz::ListenSocketNode* listen_socket_node = + listener->channelz_listen_socket_node(); + if (listen_socket_node != nullptr && server->channelz_server != nullptr) { + server->channelz_server->AddChildListenSocket(listen_socket_node->Ref()); + } + server->listeners.emplace_back(std::move(listener)); } namespace { diff --git a/src/core/lib/surface/server.h b/src/core/lib/surface/server.h index 3f11c83caa9..04385e1d284 100644 --- a/src/core/lib/surface/server.h +++ b/src/core/lib/surface/server.h @@ -32,14 +32,35 @@ extern const grpc_channel_filter grpc_server_top_filter; /** Lightweight tracing of server channel state */ extern grpc_core::TraceFlag grpc_server_channel_trace; -/* Add a listener to the server: when the server starts, it will call start, - and when it shuts down, it will call destroy */ +namespace grpc_core { + +/// Interface for listeners. +/// Implementations must override the Orphan() method, which should stop +/// listening and initiate destruction of the listener. +class ServerListenerInterface : public Orphanable { + public: + virtual ~ServerListenerInterface() = default; + + /// Starts listening. + virtual void Start(grpc_server* server, grpc_pollset** pollsets, + size_t npollsets) = 0; + + /// Returns the channelz node for the listen socket, or null if not + /// supported. + virtual channelz::ListenSocketNode* channelz_listen_socket_node() const = 0; + + /// Sets a closure to be invoked by the listener when its destruction + /// is complete. + virtual void SetOnDestroyDone(grpc_closure* on_destroy_done) = 0; +}; + +} // namespace grpc_core + +/* Add a listener to the server: when the server starts, it will call Start(), + and when it shuts down, it will orphan the listener. */ void grpc_server_add_listener( - grpc_server* server, void* listener_arg, - void (*start)(grpc_server* server, void* arg, grpc_pollset** pollsets, - size_t npollsets), - void (*destroy)(grpc_server* server, void* arg, grpc_closure* on_done), - grpc_core::RefCountedPtr node); + grpc_server* server, + grpc_core::OrphanablePtr listener); /* Setup a transport - creates a channel stack, binds the transport to the server */ diff --git a/test/core/surface/BUILD b/test/core/surface/BUILD index 7d789393c91..91f42cca637 100644 --- a/test/core/surface/BUILD +++ b/test/core/surface/BUILD @@ -156,6 +156,9 @@ grpc_cc_test( grpc_cc_test( name = "server_chttp2_test", srcs = ["server_chttp2_test.cc"], + external_deps = [ + "gtest", + ], language = "C++", deps = [ "//:gpr", diff --git a/test/core/surface/server_chttp2_test.cc b/test/core/surface/server_chttp2_test.cc index 3399b07a1c0..e74b0e75617 100644 --- a/test/core/surface/server_chttp2_test.cc +++ b/test/core/surface/server_chttp2_test.cc @@ -16,6 +16,8 @@ * */ +#include + #include #include #include @@ -29,21 +31,19 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -void test_unparsable_target(void) { +TEST(ServerChttp2, UnparseableTarget) { grpc_channel_args args = {0, nullptr}; grpc_server* server = grpc_server_create(&args, nullptr); int port = grpc_server_add_insecure_http2_port(server, "["); - GPR_ASSERT(port == 0); + EXPECT_EQ(port, 0); grpc_server_destroy(server); } // GRPC_ARG_ALLOW_REUSEPORT isn't supported for custom servers #ifndef GRPC_UV -void test_add_same_port_twice() { - grpc_arg a; - a.type = GRPC_ARG_INTEGER; - a.key = const_cast(GRPC_ARG_ALLOW_REUSEPORT); - a.value.integer = 0; +TEST(ServerChttp2, AddSamePortTwice) { + grpc_arg a = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_ALLOW_REUSEPORT), 0); grpc_channel_args args = {1, &a}; int port = grpc_pick_unused_port_or_die(); @@ -52,10 +52,10 @@ void test_add_same_port_twice() { grpc_server_credentials* fake_creds = grpc_fake_transport_security_server_credentials_create(); std::string addr = grpc_core::JoinHostPort("localhost", port); - GPR_ASSERT( - grpc_server_add_secure_http2_port(server, addr.c_str(), fake_creds)); - GPR_ASSERT( - grpc_server_add_secure_http2_port(server, addr.c_str(), fake_creds) == 0); + EXPECT_EQ(grpc_server_add_secure_http2_port(server, addr.c_str(), fake_creds), + port); + EXPECT_EQ(grpc_server_add_secure_http2_port(server, addr.c_str(), fake_creds), + 0); grpc_server_credentials_release(fake_creds); grpc_server_shutdown_and_notify(server, cq, nullptr); @@ -68,11 +68,9 @@ void test_add_same_port_twice() { int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); + ::testing::InitGoogleTest(&argc, argv); grpc_init(); - test_unparsable_target(); -#ifndef GRPC_UV - test_add_same_port_twice(); -#endif + int ret = RUN_ALL_TESTS(); grpc_shutdown(); - return 0; + return ret; } diff --git a/tools/run_tests/generated/tests.json b/tools/run_tests/generated/tests.json index d111b2fd8d7..e5db6477cf4 100644 --- a/tools/run_tests/generated/tests.json +++ b/tools/run_tests/generated/tests.json @@ -2351,30 +2351,6 @@ ], "uses_polling": true }, - { - "args": [], - "benchmark": false, - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "exclude_iomgrs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "server_chttp2_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "uses_polling": true - }, { "args": [], "benchmark": false, @@ -5239,6 +5215,30 @@ ], "uses_polling": true }, + { + "args": [], + "benchmark": false, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "exclude_iomgrs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "server_chttp2_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "uses_polling": true + }, { "args": [], "benchmark": false, From b3469c723eaf7ee3bd489181b7ce555d8981c57c Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 19 Jun 2020 13:49:16 -0700 Subject: [PATCH 094/239] Pre-assigned the server port and added more logs --- test/cpp/qps/json_run_localhost.cc | 10 +++++++--- test/cpp/qps/qps_worker.cc | 6 +++--- test/cpp/qps/server_async.cc | 8 +++++++- test/cpp/qps/server_callback.cc | 8 +++++++- test/cpp/qps/server_sync.cc | 8 +++++++- 5 files changed, 31 insertions(+), 9 deletions(-) diff --git a/test/cpp/qps/json_run_localhost.cc b/test/cpp/qps/json_run_localhost.cc index e7383a245ba..eaa6e4a1b5f 100644 --- a/test/cpp/qps/json_run_localhost.cc +++ b/test/cpp/qps/json_run_localhost.cc @@ -88,12 +88,16 @@ int main(int argc, char** argv) { bool first = true; for (int i = 0; i < kNumWorkers; i++) { - const auto port = grpc_pick_unused_port_or_die(); + const auto driver_port = grpc_pick_unused_port_or_die(); + // ServerPort can be used or not later depending on the type of worker + // but we like to issue all ports required here to avoid port conflict. + const auto server_port = grpc_pick_unused_port_or_die(); std::vector args = {bin_dir + "/qps_worker", "-driver_port", - as_string(port)}; + as_string(driver_port), "-server_port", + as_string(server_port)}; g_workers[i] = new SubProcess(args); if (!first) env << ","; - env << "localhost:" << port; + env << "localhost:" << driver_port; first = false; } diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index fd207765ca5..5d6a2fa1f1a 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -280,6 +280,7 @@ QpsWorker::QpsWorker(int driver_port, int server_port, gpr_atm_rel_store(&done_, static_cast(0)); std::unique_ptr builder = CreateQpsServerBuilder(); + builder->AddChannelArgument(GRPC_ARG_ALLOW_REUSEPORT, 0); if (driver_port >= 0) { std::string server_address = grpc_core::JoinHostPort("::", driver_port); builder->AddListeningPort( @@ -291,11 +292,10 @@ QpsWorker::QpsWorker(int driver_port, int server_port, server_ = builder->BuildAndStart(); if (server_ == nullptr) { gpr_log(GPR_ERROR, - "QpsWorker: Fail to BuildAndStart(driver_port=%d, server_port=%d)", + "QpsWorker: Fail to BuildAndStart(port=%d) (server_port=%d)", driver_port, server_port); } else { - gpr_log(GPR_INFO, - "QpsWorker: BuildAndStart(driver_port=%d, server_port=%d) done", + gpr_log(GPR_INFO, "QpsWorker: BuildAndStart(port=%d) (server_port=%d)", driver_port, server_port); } } diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index 6a07accb151..51d410b1cbf 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -82,7 +82,8 @@ class AsyncQpsServerTest final : public grpc::testing::Server { if (port_num >= 0) { std::string server_address = grpc_core::JoinHostPort("::", port_num); builder->AddListeningPort(server_address.c_str(), - Server::CreateServerCredentials(config)); + Server::CreateServerCredentials(config), + &port_num); } register_service(builder.get(), &async_service_); @@ -105,6 +106,11 @@ class AsyncQpsServerTest final : public grpc::testing::Server { ApplyConfigToBuilder(config, builder.get()); server_ = builder->BuildAndStart(); + if (server_ == nullptr) { + gpr_log(GPR_ERROR, "Server: Fail to BuildAndStart(port=%d)", port_num); + } else { + gpr_log(GPR_INFO, "Server: BuildAndStart(port=%d)", port_num); + } auto process_rpc_bound = std::bind(process_rpc, config.payload_config(), std::placeholders::_1, diff --git a/test/cpp/qps/server_callback.cc b/test/cpp/qps/server_callback.cc index e4aa10946d2..a0a95312229 100644 --- a/test/cpp/qps/server_callback.cc +++ b/test/cpp/qps/server_callback.cc @@ -104,7 +104,8 @@ class CallbackServer final : public grpc::testing::Server { if (port_num >= 0) { std::string server_address = grpc_core::JoinHostPort("::", port_num); builder->AddListeningPort(server_address.c_str(), - Server::CreateServerCredentials(config)); + Server::CreateServerCredentials(config), + &port_num); } ApplyConfigToBuilder(config, builder.get()); @@ -112,6 +113,11 @@ class CallbackServer final : public grpc::testing::Server { builder->RegisterService(&service_); impl_ = builder->BuildAndStart(); + if (impl_ == nullptr) { + gpr_log(GPR_ERROR, "Server: Fail to BuildAndStart(port=%d)", port_num); + } else { + gpr_log(GPR_INFO, "Server: BuildAndStart(port=%d)", port_num); + } } std::shared_ptr InProcessChannel( diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc index 19d406a167c..13b3c248ac2 100644 --- a/test/cpp/qps/server_sync.cc +++ b/test/cpp/qps/server_sync.cc @@ -162,7 +162,8 @@ class SynchronousServer final : public grpc::testing::Server { if (port_num >= 0) { std::string server_address = grpc_core::JoinHostPort("::", port_num); builder->AddListeningPort(server_address.c_str(), - Server::CreateServerCredentials(config)); + Server::CreateServerCredentials(config), + &port_num); } ApplyConfigToBuilder(config, builder.get()); @@ -170,6 +171,11 @@ class SynchronousServer final : public grpc::testing::Server { builder->RegisterService(&service_); impl_ = builder->BuildAndStart(); + if (impl_ == nullptr) { + gpr_log(GPR_ERROR, "Server: Fail to BuildAndStart(port=%d)", port_num); + } else { + gpr_log(GPR_INFO, "Server: BuildAndStart(port=%d)", port_num); + } } std::shared_ptr InProcessChannel( From 0497ad8bb0c02995f16a76b2ce85753a026f08bc Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 10 Jun 2020 15:25:40 -0700 Subject: [PATCH 095/239] Add missing message-size check before decompressing Add and fix tests for limit check before decompression Code restructuring to allow easy reuse of service config call data Regenerate projects Reviewer comments --- BUILD | 2 + BUILD.gn | 1 + CMakeLists.txt | 2 + Makefile | 2 + build_autogenerated.yaml | 2 + config.m4 | 1 + config.w32 | 1 + gRPC-Core.podspec | 1 + grpc.gemspec | 1 + grpc.gyp | 2 + package.xml | 1 + .../service_config_channel_arg_filter.cc | 142 ++++++++ .../ext/filters/http/http_filters_plugin.cc | 3 +- .../message_decompress_filter.cc | 92 +++-- .../message_decompress_filter.h | 4 +- .../message_size/message_size_filter.cc | 106 +++--- .../message_size/message_size_filter.h | 6 + .../plugin_registry/grpc_plugin_registry.cc | 4 + .../grpc_unsecure_plugin_registry.cc | 4 + src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/end2end/tests/max_message_length.cc | 332 ++++++++++++++++++ test/cpp/microbenchmarks/bm_call_create.cc | 3 +- tools/doxygen/Doxyfile.c++.internal | 1 + tools/doxygen/Doxyfile.core.internal | 1 + 24 files changed, 622 insertions(+), 93 deletions(-) create mode 100644 src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc diff --git a/BUILD b/BUILD index 0d2a7ca058c..bbb1d8dfeea 100644 --- a/BUILD +++ b/BUILD @@ -1044,6 +1044,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/retry_throttle.cc", "src/core/ext/filters/client_channel/server_address.cc", "src/core/ext/filters/client_channel/service_config.cc", + "src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc", "src/core/ext/filters/client_channel/service_config_parser.cc", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel_pool_interface.cc", @@ -1184,6 +1185,7 @@ grpc_cc_library( language = "c++", deps = [ "grpc_base", + "grpc_message_size_filter", ], ) diff --git a/BUILD.gn b/BUILD.gn index a16d298f1be..5e5f8622b34 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -293,6 +293,7 @@ config("grpc_config") { "src/core/ext/filters/client_channel/service_config.cc", "src/core/ext/filters/client_channel/service_config.h", "src/core/ext/filters/client_channel/service_config_call_data.h", + "src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc", "src/core/ext/filters/client_channel/service_config_parser.cc", "src/core/ext/filters/client_channel/service_config_parser.h", "src/core/ext/filters/client_channel/subchannel.cc", diff --git a/CMakeLists.txt b/CMakeLists.txt index 323f7800627..730dc9b0775 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1375,6 +1375,7 @@ add_library(grpc src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/server_address.cc src/core/ext/filters/client_channel/service_config.cc + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc src/core/ext/filters/client_channel/service_config_parser.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -2046,6 +2047,7 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/server_address.cc src/core/ext/filters/client_channel/service_config.cc + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc src/core/ext/filters/client_channel/service_config_parser.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_pool_interface.cc diff --git a/Makefile b/Makefile index bbaccc44513..2de807dead0 100644 --- a/Makefile +++ b/Makefile @@ -3677,6 +3677,7 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ @@ -4322,6 +4323,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 9eb53b8e576..57ee5eabde8 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -793,6 +793,7 @@ libs: - src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/server_address.cc - src/core/ext/filters/client_channel/service_config.cc + - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc - src/core/ext/filters/client_channel/service_config_parser.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -1652,6 +1653,7 @@ libs: - src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/server_address.cc - src/core/ext/filters/client_channel/service_config.cc + - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc - src/core/ext/filters/client_channel/service_config_parser.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_pool_interface.cc diff --git a/config.m4 b/config.m4 index cd1019abcd9..4f0fd8513d9 100644 --- a/config.m4 +++ b/config.m4 @@ -92,6 +92,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ diff --git a/config.w32 b/config.w32 index 8109f9103af..093add492ad 100644 --- a/config.w32 +++ b/config.w32 @@ -61,6 +61,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " + "src\\core\\ext\\filters\\client_channel\\server_address.cc " + "src\\core\\ext\\filters\\client_channel\\service_config.cc " + + "src\\core\\ext\\filters\\client_channel\\service_config_channel_arg_filter.cc " + "src\\core\\ext\\filters\\client_channel\\service_config_parser.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel_pool_interface.cc " + diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 695768422c2..e4ae503d0a2 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -277,6 +277,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/service_config.cc', 'src/core/ext/filters/client_channel/service_config.h', 'src/core/ext/filters/client_channel/service_config_call_data.h', + 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/service_config_parser.h', 'src/core/ext/filters/client_channel/subchannel.cc', diff --git a/grpc.gemspec b/grpc.gemspec index af04b9d9de4..66abcc3f64f 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -199,6 +199,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/service_config.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config.h ) s.files += %w( src/core/ext/filters/client_channel/service_config_call_data.h ) + s.files += %w( src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config_parser.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config_parser.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel.cc ) diff --git a/grpc.gyp b/grpc.gyp index b80efd83534..bc1a11e3cca 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -487,6 +487,7 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', + 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', @@ -994,6 +995,7 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', + 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', diff --git a/package.xml b/package.xml index 0166a778789..93b22c15c0b 100644 --- a/package.xml +++ b/package.xml @@ -179,6 +179,7 @@ + diff --git a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc new file mode 100644 index 00000000000..9aad7c71307 --- /dev/null +++ b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc @@ -0,0 +1,142 @@ +// +// Copyright 2020 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// This filter reads GRPC_ARG_SERVICE_CONFIG and populates ServiceConfigCallData +// in the call context per call for direct channels. + +#include + +#include "src/core/ext/filters/client_channel/service_config_call_data.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack_builder.h" +#include "src/core/lib/surface/channel_init.h" + +namespace grpc_core { + +namespace { + +class ServiceConfigChannelArgCallData {}; + +class ServiceConfigChannelArgChannelData { + public: + explicit ServiceConfigChannelArgChannelData( + const grpc_channel_element_args* args) { + const char* service_config_str = grpc_channel_arg_find_string( + args->channel_args, GRPC_ARG_SERVICE_CONFIG); + if (service_config_str != nullptr) { + grpc_error* service_config_error = GRPC_ERROR_NONE; + auto svc_cfg = grpc_core::ServiceConfig::Create(service_config_str, + &service_config_error); + if (service_config_error == GRPC_ERROR_NONE) { + svc_cfg_ = std::move(svc_cfg); + } else { + gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); + } + GRPC_ERROR_UNREF(service_config_error); + } + } + + grpc_core::RefCountedPtr svc_cfg() const { + return svc_cfg_; + } + + private: + grpc_core::RefCountedPtr svc_cfg_; +}; + +grpc_error* ServiceConfigChannelArgInitCallElem( + grpc_call_element* elem, const grpc_call_element_args* args) { + ServiceConfigChannelArgChannelData* chand = + static_cast(elem->channel_data); + if (chand->svc_cfg() != nullptr) { + GPR_DEBUG_ASSERT(args->context != nullptr); + args->arena->New( + chand->svc_cfg(), + chand->svc_cfg()->GetMethodParsedConfigVector(args->path), + args->context); + } + return GRPC_ERROR_NONE; +} + +void ServiceConfigChannelArgDestroyCallElem( + grpc_call_element* /* elem */, const grpc_call_final_info* /* final_info */, + grpc_closure* /* then_schedule_closure */) {} + +grpc_error* ServiceConfigChannelArgInitChannelElem( + grpc_channel_element* elem, grpc_channel_element_args* args) { + ServiceConfigChannelArgChannelData* chand = + static_cast(elem->channel_data); + new (chand) ServiceConfigChannelArgChannelData(args); + const char* service_config_str = grpc_channel_arg_get_string( + grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG)); + if (service_config_str != nullptr) { + grpc_error* service_config_error = GRPC_ERROR_NONE; + auto svc_cfg = grpc_core::ServiceConfig::Create(service_config_str, + &service_config_error); + if (service_config_error == GRPC_ERROR_NONE) { + chand->svc_cfg = std::move(svc_cfg); + } else { + gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); + } + GRPC_ERROR_UNREF(service_config_error); + } + return GRPC_ERROR_NONE; +} + +void ServiceConfigChannelArgDestroyChannelElem(grpc_channel_element* elem) { + ServiceConfigChannelArgChannelData* chand = + static_cast(elem->channel_data); + chand->~ServiceConfigChannelArgChannelData(); +} + +const grpc_channel_filter ServiceConfigChannelArgFilter = { + grpc_call_next_op, + grpc_channel_next_op, + sizeof(ServiceConfigChannelArgCallData), + ServiceConfigChannelArgInitCallElem, + grpc_call_stack_ignore_set_pollset_or_pollset_set, + ServiceConfigChannelArgDestroyCallElem, + sizeof(ServiceConfigChannelArgChannelData), + ServiceConfigChannelArgInitChannelElem, + ServiceConfigChannelArgDestroyChannelElem, + grpc_channel_next_get_info, + "service_config_channel_arg"}; + +bool maybe_add_service_config_channel_arg_filter( + grpc_channel_stack_builder* builder, void* /* arg */) { + const grpc_channel_args* channel_args = + grpc_channel_stack_builder_get_channel_arguments(builder); + if (grpc_channel_args_want_minimal_stack(channel_args) || + grpc_channel_arg_get_string(grpc_channel_args_find( + channel_args, GRPC_ARG_SERVICE_CONFIG)) == nullptr) { + return true; + } + return grpc_channel_stack_builder_prepend_filter( + builder, &ServiceConfigChannelArgFilter, nullptr, nullptr); +} + +} // namespace + +} // namespace grpc_core + +void grpc_service_config_channel_arg_filter_init(void) { + grpc_channel_init_register_stage( + GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, + grpc_core::maybe_add_service_config_channel_arg_filter, nullptr); +} + +void grpc_service_config_channel_arg_filter_shutdown(void) {} diff --git a/src/core/ext/filters/http/http_filters_plugin.cc b/src/core/ext/filters/http/http_filters_plugin.cc index 2fedc7fe3d7..637dc3030f2 100644 --- a/src/core/ext/filters/http/http_filters_plugin.cc +++ b/src/core/ext/filters/http/http_filters_plugin.cc @@ -38,7 +38,8 @@ static optional_filter compress_filter = { &grpc_message_compress_filter, GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION}; static optional_filter decompress_filter = { - &grpc_message_decompress_filter, GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION}; + &grpc_core::MessageDecompressFilter, + GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION}; static bool is_building_http_like_transport( grpc_channel_stack_builder* builder) { diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc index d12f4013bb2..122c74e1e98 100644 --- a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc @@ -18,6 +18,8 @@ #include +#include "src/core/ext/filters/http/message_compress/message_decompress_filter.h" + #include #include @@ -27,7 +29,8 @@ #include #include -#include "src/core/ext/filters/http/message_compress/message_decompress_filter.h" +#include "absl/strings/str_format.h" +#include "src/core/ext/filters/message_size/message_size_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/compression/algorithm_metadata.h" #include "src/core/lib/compression/compression_args.h" @@ -37,14 +40,25 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" +namespace grpc_core { namespace { -class ChannelData {}; +class ChannelData { + public: + explicit ChannelData(const grpc_channel_element_args* args) + : max_recv_size_(get_max_recv_size(args->channel_args)) {} + + int max_recv_size() const { return max_recv_size_; } + + private: + int max_recv_size_; +}; class CallData { public: - explicit CallData(const grpc_call_element_args& args) - : call_combiner_(args.call_combiner) { + CallData(const grpc_call_element_args& args, const ChannelData* chand) + : call_combiner_(args.call_combiner), + max_recv_message_length_(chand->max_recv_size()) { // Initialize state for recv_initial_metadata_ready callback GRPC_CLOSURE_INIT(&on_recv_initial_metadata_ready_, OnRecvInitialMetadataReady, this, @@ -59,6 +73,13 @@ class CallData { GRPC_CLOSURE_INIT(&on_recv_trailing_metadata_ready_, OnRecvTrailingMetadataReady, this, grpc_schedule_on_exec_ctx); + const MessageSizeParsedConfig* limits = + get_message_size_config_from_call_context(args.context); + if (limits != nullptr && limits->limits().max_recv_size >= 0 && + (limits->limits().max_recv_size < max_recv_message_length_ || + max_recv_message_length_ < 0)) { + max_recv_message_length_ = limits->limits().max_recv_size; + } } ~CallData() { grpc_slice_buffer_destroy_internal(&recv_slices_); } @@ -82,7 +103,7 @@ class CallData { void MaybeResumeOnRecvTrailingMetadataReady(); static void OnRecvTrailingMetadataReady(void* arg, grpc_error* error); - grpc_core::CallCombiner* call_combiner_; + CallCombiner* call_combiner_; // Overall error for the call grpc_error* error_ = GRPC_ERROR_NONE; // Fields for handling recv_initial_metadata_ready callback @@ -91,17 +112,18 @@ class CallData { grpc_metadata_batch* recv_initial_metadata_ = nullptr; // Fields for handling recv_message_ready callback bool seen_recv_message_ready_ = false; + int max_recv_message_length_; grpc_message_compression_algorithm algorithm_ = GRPC_MESSAGE_COMPRESS_NONE; grpc_closure on_recv_message_ready_; grpc_closure* original_recv_message_ready_ = nullptr; grpc_closure on_recv_message_next_done_; - grpc_core::OrphanablePtr* recv_message_ = nullptr; + OrphanablePtr* recv_message_ = nullptr; // recv_slices_ holds the slices read from the original recv_message stream. // It is initialized during construction and reset when a new stream is // created using it. grpc_slice_buffer recv_slices_; - std::aligned_storage::type + std::aligned_storage::type recv_replacement_stream_; // Fields for handling recv_trailing_metadata_ready callback bool seen_recv_trailing_metadata_ready_ = false; @@ -139,7 +161,7 @@ void CallData::OnRecvInitialMetadataReady(void* arg, grpc_error* error) { calld->MaybeResumeOnRecvTrailingMetadataReady(); grpc_closure* closure = calld->original_recv_initial_metadata_ready_; calld->original_recv_initial_metadata_ready_ = nullptr; - grpc_core::Closure::Run(DEBUG_LOCATION, closure, GRPC_ERROR_REF(error)); + Closure::Run(DEBUG_LOCATION, closure, GRPC_ERROR_REF(error)); } void CallData::MaybeResumeOnRecvMessageReady() { @@ -170,6 +192,19 @@ void CallData::OnRecvMessageReady(void* arg, grpc_error* error) { 0) { return calld->ContinueRecvMessageReadyCallback(GRPC_ERROR_NONE); } + if (calld->max_recv_message_length_ >= 0 && + (*calld->recv_message_)->length() > + static_cast(calld->max_recv_message_length_)) { + std::string message_string = absl::StrFormat( + "Received message larger than max (%u vs. %d)", + (*calld->recv_message_)->length(), calld->max_recv_message_length_); + GPR_DEBUG_ASSERT(calld->error_ == GRPC_ERROR_NONE); + calld->error_ = grpc_error_set_int( + GRPC_ERROR_CREATE_FROM_COPIED_STRING(message_string.c_str()), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED); + return calld->ContinueRecvMessageReadyCallback( + GRPC_ERROR_REF(calld->error_)); + } grpc_slice_buffer_destroy_internal(&calld->recv_slices_); grpc_slice_buffer_init(&calld->recv_slices_); return calld->ContinueReadingRecvMessage(); @@ -241,9 +276,9 @@ void CallData::FinishRecvMessage() { // Initializing recv_replacement_stream_ with decompressed_slices removes // all the slices from decompressed_slices leaving it empty. new (&recv_replacement_stream_) - grpc_core::SliceBufferByteStream(&decompressed_slices, recv_flags); - recv_message_->reset(reinterpret_cast( - &recv_replacement_stream_)); + SliceBufferByteStream(&decompressed_slices, recv_flags); + recv_message_->reset( + reinterpret_cast(&recv_replacement_stream_)); recv_message_ = nullptr; } ContinueRecvMessageReadyCallback(GRPC_ERROR_REF(error_)); @@ -254,7 +289,7 @@ void CallData::ContinueRecvMessageReadyCallback(grpc_error* error) { // The surface will clean up the receiving stream if there is an error. grpc_closure* closure = original_recv_message_ready_; original_recv_message_ready_ = nullptr; - grpc_core::Closure::Run(DEBUG_LOCATION, closure, error); + Closure::Run(DEBUG_LOCATION, closure, error); } void CallData::MaybeResumeOnRecvTrailingMetadataReady() { @@ -283,7 +318,7 @@ void CallData::OnRecvTrailingMetadataReady(void* arg, grpc_error* error) { calld->error_ = GRPC_ERROR_NONE; grpc_closure* closure = calld->original_recv_trailing_metadata_ready_; calld->original_recv_trailing_metadata_ready_ = nullptr; - grpc_core::Closure::Run(DEBUG_LOCATION, closure, error); + Closure::Run(DEBUG_LOCATION, closure, error); } void CallData::DecompressStartTransportStreamOpBatch( @@ -322,37 +357,44 @@ void DecompressStartTransportStreamOpBatch( calld->DecompressStartTransportStreamOpBatch(elem, batch); } -static grpc_error* DecompressInitCallElem(grpc_call_element* elem, - const grpc_call_element_args* args) { - new (elem->call_data) CallData(*args); +grpc_error* DecompressInitCallElem(grpc_call_element* elem, + const grpc_call_element_args* args) { + ChannelData* chand = static_cast(elem->channel_data); + new (elem->call_data) CallData(*args, chand); return GRPC_ERROR_NONE; } -static void DecompressDestroyCallElem( - grpc_call_element* elem, const grpc_call_final_info* /*final_info*/, - grpc_closure* /*ignored*/) { +void DecompressDestroyCallElem(grpc_call_element* elem, + const grpc_call_final_info* /*final_info*/, + grpc_closure* /*ignored*/) { CallData* calld = static_cast(elem->call_data); calld->~CallData(); } -static grpc_error* DecompressInitChannelElem( - grpc_channel_element* /*elem*/, grpc_channel_element_args* /*args*/) { +grpc_error* DecompressInitChannelElem(grpc_channel_element* elem, + grpc_channel_element_args* args) { + ChannelData* chand = static_cast(elem->channel_data); + new (chand) ChannelData(args); return GRPC_ERROR_NONE; } -void DecompressDestroyChannelElem(grpc_channel_element* /*elem*/) {} +void DecompressDestroyChannelElem(grpc_channel_element* elem) { + ChannelData* chand = static_cast(elem->channel_data); + chand->~ChannelData(); +} } // namespace -const grpc_channel_filter grpc_message_decompress_filter = { +const grpc_channel_filter MessageDecompressFilter = { DecompressStartTransportStreamOpBatch, grpc_channel_next_op, sizeof(CallData), DecompressInitCallElem, grpc_call_stack_ignore_set_pollset_or_pollset_set, DecompressDestroyCallElem, - 0, // sizeof(ChannelData) + sizeof(ChannelData), DecompressInitChannelElem, DecompressDestroyChannelElem, grpc_channel_next_get_info, "message_decompress"}; +} // namespace grpc_core diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.h b/src/core/ext/filters/http/message_compress/message_decompress_filter.h index 7d567bf08a2..f19a4ca0cbd 100644 --- a/src/core/ext/filters/http/message_compress/message_decompress_filter.h +++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.h @@ -23,7 +23,9 @@ #include "src/core/lib/channel/channel_stack.h" -extern const grpc_channel_filter grpc_message_decompress_filter; +namespace grpc_core { +extern const grpc_channel_filter MessageDecompressFilter; +} // namespace grpc_core #endif /* GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_DECOMPRESS_FILTER_H \ */ diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index d2ef5477636..53b4da451f5 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -45,6 +45,25 @@ namespace { size_t g_message_size_parser_index; } // namespace +// +// MessageSizeParsedConfig +// + +const MessageSizeParsedConfig* MessageSizeParsedConfig::GetFromCallContext( + const grpc_call_context_element* context) { + if (context == nullptr) return nullptr; + auto* svc_cfg_call_data = static_cast( + context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value); + if (svc_cfg_call_data == nullptr) return nullptr; + return static_cast( + svc_cfg_call_data->GetMethodParsedConfig( + MessageSizeParser::ParserIndex())); +} + +// +// MessageSizeParser +// + std::unique_ptr MessageSizeParser::ParsePerMethodParams(const Json& json, grpc_error** error) { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); @@ -97,12 +116,26 @@ void MessageSizeParser::Register() { } size_t MessageSizeParser::ParserIndex() { return g_message_size_parser_index; } + +int GetMaxRecvSizeFromChannelArgs(const grpc_channel_args* args) { + if (grpc_channel_args_want_minimal_stack(args)) return -1; + return grpc_channel_args_find_integer( + args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, + {GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, -1, INT_MAX}); +} + +int GetMaxSendSizeFromChannelArgs(const grpc_channel_args* args) { + if (grpc_channel_args_want_minimal_stack(args)) return -1; + return grpc_channel_args_find_integer( + args, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH, + {GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH, -1, INT_MAX}); +} + } // namespace grpc_core namespace { struct channel_data { grpc_core::MessageSizeParsedConfig::message_size_limits limits; - grpc_core::RefCountedPtr svc_cfg; }; struct call_data { @@ -118,24 +151,8 @@ struct call_data { // Note: Per-method config is only available on the client, so we // apply the max request size to the send limit and the max response // size to the receive limit. - const grpc_core::MessageSizeParsedConfig* limits = nullptr; - grpc_core::ServiceConfigCallData* svc_cfg_call_data = nullptr; - if (args.context != nullptr) { - svc_cfg_call_data = static_cast( - args.context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value); - } - if (svc_cfg_call_data != nullptr) { - limits = static_cast( - svc_cfg_call_data->GetMethodParsedConfig( - grpc_core::MessageSizeParser::ParserIndex())); - } else if (chand.svc_cfg != nullptr) { - const auto* objs_vector = - chand.svc_cfg->GetMethodParsedConfigVector(args.path); - if (objs_vector != nullptr) { - limits = static_cast( - (*objs_vector)[grpc_core::MessageSizeParser::ParserIndex()].get()); - } - } + const grpc_core::MessageSizeParsedConfig* limits = + grpc_core::get_message_size_config_from_call_context(args.context); if (limits != nullptr) { if (limits->limits().max_send_size >= 0 && (limits->limits().max_send_size < this->limits.max_send_size || @@ -288,35 +305,11 @@ static void message_size_destroy_call_elem( calld->~call_data(); } -static int default_size(const grpc_channel_args* args, - int without_minimal_stack) { - if (grpc_channel_args_want_minimal_stack(args)) { - return -1; - } - return without_minimal_stack; -} - grpc_core::MessageSizeParsedConfig::message_size_limits get_message_size_limits( const grpc_channel_args* channel_args) { grpc_core::MessageSizeParsedConfig::message_size_limits lim; - lim.max_send_size = - default_size(channel_args, GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH); - lim.max_recv_size = - default_size(channel_args, GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH); - for (size_t i = 0; i < channel_args->num_args; ++i) { - if (strcmp(channel_args->args[i].key, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH) == - 0) { - const grpc_integer_options options = {lim.max_send_size, -1, INT_MAX}; - lim.max_send_size = - grpc_channel_arg_get_integer(&channel_args->args[i], options); - } - if (strcmp(channel_args->args[i].key, - GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH) == 0) { - const grpc_integer_options options = {lim.max_recv_size, -1, INT_MAX}; - lim.max_recv_size = - grpc_channel_arg_get_integer(&channel_args->args[i], options); - } - } + lim.max_send_size = grpc_core::get_max_send_size(channel_args); + lim.max_recv_size = grpc_core::get_max_recv_size(channel_args); return lim; } @@ -327,26 +320,6 @@ static grpc_error* message_size_init_channel_elem( channel_data* chand = static_cast(elem->channel_data); new (chand) channel_data(); chand->limits = get_message_size_limits(args->channel_args); - // TODO(yashykt): We only need to read GRPC_ARG_SERVICE_CONFIG in the case of - // direct channels. (Service config is otherwise stored in the call_context by - // client_channel filter.) If we ever need a second filter that also needs to - // parse GRPC_ARG_SERVICE_CONFIG, we should refactor this code and add a - // separate filter that reads GRPC_ARG_SERVICE_CONFIG and saves the parsed - // config in the call_context. - const grpc_arg* channel_arg = - grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); - const char* service_config_str = grpc_channel_arg_get_string(channel_arg); - if (service_config_str != nullptr) { - grpc_error* service_config_error = GRPC_ERROR_NONE; - auto svc_cfg = grpc_core::ServiceConfig::Create(service_config_str, - &service_config_error); - if (service_config_error == GRPC_ERROR_NONE) { - chand->svc_cfg = std::move(svc_cfg); - } else { - gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); - } - GRPC_ERROR_UNREF(service_config_error); - } return GRPC_ERROR_NONE; } @@ -387,6 +360,9 @@ static bool maybe_add_message_size_filter(grpc_channel_stack_builder* builder, void* /*arg*/) { const grpc_channel_args* channel_args = grpc_channel_stack_builder_get_channel_arguments(builder); + if (grpc_channel_args_want_minimal_stack(channel_args)) { + return true; + } bool enable = false; grpc_core::MessageSizeParsedConfig::message_size_limits lim = get_message_size_limits(channel_args); diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h index 132d7b2af0f..ea0dd0266d0 100644 --- a/src/core/ext/filters/message_size/message_size_filter.h +++ b/src/core/ext/filters/message_size/message_size_filter.h @@ -40,6 +40,9 @@ class MessageSizeParsedConfig : public ServiceConfigParser::ParsedConfig { const message_size_limits& limits() const { return limits_; } + static const MessageSizeParsedConfig* GetFromCallContext( + const grpc_call_context_element* context); + private: message_size_limits limits_; }; @@ -54,6 +57,9 @@ class MessageSizeParser : public ServiceConfigParser::Parser { static size_t ParserIndex(); }; +int GetMaxRecvSizeFromChannelArgs(const grpc_channel_args* args); +int GetMaxSendSizeFromChannelArgs(const grpc_channel_args* args); + } // namespace grpc_core #endif /* GRPC_CORE_EXT_FILTERS_MESSAGE_SIZE_MESSAGE_SIZE_FILTER_H */ diff --git a/src/core/plugin_registry/grpc_plugin_registry.cc b/src/core/plugin_registry/grpc_plugin_registry.cc index f1c3cbf4036..ef8b10df647 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_plugin_registry.cc @@ -64,6 +64,8 @@ void grpc_max_age_filter_init(void); void grpc_max_age_filter_shutdown(void); void grpc_message_size_filter_init(void); void grpc_message_size_filter_shutdown(void); +void grpc_service_config_channel_arg_filter_init(void); +void grpc_service_config_channel_arg_filter_shutdown(void); void grpc_client_authority_filter_init(void); void grpc_client_authority_filter_shutdown(void); void grpc_workaround_cronet_compression_filter_init(void); @@ -114,6 +116,8 @@ void grpc_register_built_in_plugins(void) { grpc_max_age_filter_shutdown); grpc_register_plugin(grpc_message_size_filter_init, grpc_message_size_filter_shutdown); + grpc_register_plugin(grpc_service_config_channel_arg_filter_init, + grpc_service_config_channel_arg_filter_shutdown); grpc_register_plugin(grpc_client_authority_filter_init, grpc_client_authority_filter_shutdown); grpc_register_plugin(grpc_workaround_cronet_compression_filter_init, diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc index de53f173294..525fa108d81 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc @@ -64,6 +64,8 @@ void grpc_max_age_filter_init(void); void grpc_max_age_filter_shutdown(void); void grpc_message_size_filter_init(void); void grpc_message_size_filter_shutdown(void); +void grpc_service_config_channel_arg_filter_init(void); +void grpc_service_config_channel_arg_filter_shutdown(void); void grpc_client_authority_filter_init(void); void grpc_client_authority_filter_shutdown(void); void grpc_workaround_cronet_compression_filter_init(void); @@ -114,6 +116,8 @@ void grpc_register_built_in_plugins(void) { grpc_max_age_filter_shutdown); grpc_register_plugin(grpc_message_size_filter_init, grpc_message_size_filter_shutdown); + grpc_register_plugin(grpc_service_config_channel_arg_filter_init, + grpc_service_config_channel_arg_filter_shutdown); grpc_register_plugin(grpc_client_authority_filter_init, grpc_client_authority_filter_shutdown); grpc_register_plugin(grpc_workaround_cronet_compression_filter_init, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 37bed16955f..7afe714e078 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -70,6 +70,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', + 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc index 40e752a3d63..256cc982940 100644 --- a/test/core/end2end/tests/max_message_length.cc +++ b/test/core/end2end/tests/max_message_length.cc @@ -29,6 +29,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/transport/metadata.h" #include "test/core/end2end/cq_verifier.h" @@ -466,6 +467,328 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, grpc_byte_buffer_destroy(response_payload); grpc_byte_buffer_destroy(recv_payload); + grpc_call_unref(c); + if (s != nullptr) grpc_call_unref(s); + cq_verifier_destroy(cqv); + end_test(&f); + config.tear_down_data(&f); +} + +static grpc_metadata gzip_compression_override() { + grpc_metadata gzip_compression_override; + gzip_compression_override.key = GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST; + gzip_compression_override.value = grpc_slice_from_static_string("gzip"); + memset(&gzip_compression_override.internal_data, 0, + sizeof(gzip_compression_override.internal_data)); + return gzip_compression_override; +} + +// Test receive message limit with compressed request larger than the limit +static void test_max_receive_message_length_on_compressed_request( + grpc_end2end_test_config config, bool minimal_stack) { + gpr_log(GPR_INFO, + "test max receive message length on compressed request with " + "minimal_stack=%d", + minimal_stack); + grpc_end2end_test_fixture f; + grpc_call* c = nullptr; + grpc_call* s = nullptr; + cq_verifier* cqv; + grpc_op ops[6]; + grpc_op* op; + grpc_slice request_payload_slice = grpc_slice_malloc(1024); + memset(GRPC_SLICE_START_PTR(request_payload_slice), 'a', 1024); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* recv_payload = nullptr; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + grpc_slice details, status_details; + int was_cancelled = 2; + + // Set limit via channel args. + grpc_arg arg[2]; + arg[0] = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH), 5); + arg[1] = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_MINIMAL_STACK), minimal_stack); + grpc_channel_args* server_args = + grpc_channel_args_copy_and_add(nullptr, arg, 2); + + f = begin_test(config, "test_max_request_message_length", nullptr, + server_args); + { + grpc_core::ExecCtx exec_ctx; + grpc_channel_args_destroy(server_args); + } + cqv = cq_verifier_create(f.cq); + c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + nullptr, gpr_inf_future(GPR_CLOCK_REALTIME), + nullptr); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + grpc_metadata compression_md = gzip_compression_override(); + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 1; + op->data.send_initial_metadata.metadata = &compression_md; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op->flags = 0; + op->reserved = nullptr; + op++; + error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), 1); + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &recv_payload; + op->flags = 0; + op->reserved = nullptr; + op++; + if (minimal_stack) { + /* Expect the RPC to proceed normally for a minimal stack */ + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + status_details = grpc_slice_from_static_string("xyz"); + op->data.send_status_from_server.status_details = &status_details; + op->flags = 0; + op->reserved = nullptr; + op++; + } + error = grpc_call_start_batch(s, ops, static_cast(op - ops), tag(102), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), 1); + CQ_EXPECT_COMPLETION(cqv, tag(1), 1); + cq_verify(cqv); + + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + if (minimal_stack) { + /* We do not perform message size checks for minimal stack. */ + GPR_ASSERT(status == GRPC_STATUS_OK); + } else { + GPR_ASSERT(was_cancelled == 1); + GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED); + GPR_ASSERT(grpc_slice_str_cmp( + details, "Received message larger than max (29 vs. 5)") == + 0); + } + grpc_slice_unref(details); + grpc_slice_unref(request_payload_slice); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(recv_payload); + grpc_call_unref(c); + if (s != nullptr) grpc_call_unref(s); + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +// Test receive message limit with compressed response larger than the limit. +static void test_max_receive_message_length_on_compressed_response( + grpc_end2end_test_config config, bool minimal_stack) { + gpr_log(GPR_INFO, + "testing max receive message length on compressed response with " + "minimal_stack=%d", + minimal_stack); + grpc_end2end_test_fixture f; + grpc_call* c = nullptr; + grpc_call* s = nullptr; + cq_verifier* cqv; + grpc_op ops[6]; + grpc_op* op; + grpc_slice response_payload_slice = grpc_slice_malloc(1024); + memset(GRPC_SLICE_START_PTR(response_payload_slice), 'a', 1024); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* recv_payload = nullptr; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + + // Set limit via channel args. + grpc_arg arg[2]; + arg[0] = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH), 5); + arg[1] = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_MINIMAL_STACK), minimal_stack); + grpc_channel_args* client_args = + grpc_channel_args_copy_and_add(nullptr, arg, 2); + + f = begin_test(config, "test_max_response_message_length", client_args, + nullptr); + { + grpc_core::ExecCtx exec_ctx; + grpc_channel_args_destroy(client_args); + } + cqv = cq_verifier_create(f.cq); + + c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + nullptr, gpr_inf_future(GPR_CLOCK_REALTIME), + nullptr); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &recv_payload; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op->flags = 0; + op->reserved = nullptr; + op++; + error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), 1); + cq_verify(cqv); + + grpc_metadata compression_md = gzip_compression_override(); + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 1; + op->data.send_initial_metadata.metadata = &compression_md; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = response_payload; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + op->data.send_status_from_server.status_details = &status_details; + op->flags = 0; + op->reserved = nullptr; + op++; + error = grpc_call_start_batch(s, ops, static_cast(op - ops), tag(102), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), 1); + CQ_EXPECT_COMPLETION(cqv, tag(1), 1); + cq_verify(cqv); + + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + if (minimal_stack) { + /* We do not perform message size checks for minimal stack. */ + GPR_ASSERT(status == GRPC_STATUS_OK); + } else { + GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED); + GPR_ASSERT(grpc_slice_str_cmp( + details, "Received message larger than max (29 vs. 5)") == + 0); + } + grpc_slice_unref(details); + grpc_slice_unref(response_payload_slice); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(recv_payload); + grpc_call_unref(c); if (s != nullptr) grpc_call_unref(s); @@ -500,6 +823,15 @@ void max_message_length(grpc_end2end_test_config config) { test_max_message_length_on_response(config, false /* send_limit */, true /* use_service_config */, true /* use_string_json_value */); + /* The following tests are not useful for inproc transport and do not work + * with our simple proxy. */ + if (strcmp(config.name, "inproc") != 0 && + (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) == 0) { + test_max_receive_message_length_on_compressed_request(config, false); + test_max_receive_message_length_on_compressed_request(config, true); + test_max_receive_message_length_on_compressed_response(config, false); + test_max_receive_message_length_on_compressed_response(config, true); + } } void max_message_length_pre_init(void) {} diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index 803ad38f1c5..b4a70272ea6 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -529,9 +529,10 @@ static void BM_IsolatedFilter(benchmark::State& state) { grpc_call_final_info final_info; TestOp test_op_data; const int kArenaSize = 4096; + grpc_call_context_element context[GRPC_CONTEXT_COUNT] = {}; grpc_call_element_args call_args{call_stack, nullptr, - nullptr, + context, method, start_time, deadline, diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 613e824f4d7..3a4fdf1b017 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1162,6 +1162,7 @@ src/core/ext/filters/client_channel/server_address.h \ src/core/ext/filters/client_channel/service_config.cc \ src/core/ext/filters/client_channel/service_config.h \ src/core/ext/filters/client_channel/service_config_call_data.h \ +src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/service_config_parser.h \ src/core/ext/filters/client_channel/subchannel.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b026c8b1f8a..1ed428487fe 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -962,6 +962,7 @@ src/core/ext/filters/client_channel/server_address.h \ src/core/ext/filters/client_channel/service_config.cc \ src/core/ext/filters/client_channel/service_config.h \ src/core/ext/filters/client_channel/service_config_call_data.h \ +src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/service_config_parser.h \ src/core/ext/filters/client_channel/subchannel.cc \ From 5041fcc1caca525067e2f02d585effda00681d1f Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 19 Jun 2020 11:46:16 -0700 Subject: [PATCH 096/239] Reviewer comments --- .../service_config_channel_arg_filter.cc | 71 ++++++++++--------- .../message_decompress_filter.cc | 4 +- .../message_size/message_size_filter.cc | 6 +- 3 files changed, 41 insertions(+), 40 deletions(-) diff --git a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc index 9aad7c71307..9c7af64bd97 100644 --- a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +++ b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc @@ -29,20 +29,18 @@ namespace grpc_core { namespace { -class ServiceConfigChannelArgCallData {}; - class ServiceConfigChannelArgChannelData { public: explicit ServiceConfigChannelArgChannelData( const grpc_channel_element_args* args) { - const char* service_config_str = grpc_channel_arg_find_string( + const char* service_config_str = grpc_channel_args_find_string( args->channel_args, GRPC_ARG_SERVICE_CONFIG); if (service_config_str != nullptr) { grpc_error* service_config_error = GRPC_ERROR_NONE; - auto svc_cfg = grpc_core::ServiceConfig::Create(service_config_str, - &service_config_error); + auto service_config = grpc_core::ServiceConfig::Create( + service_config_str, &service_config_error); if (service_config_error == GRPC_ERROR_NONE) { - svc_cfg_ = std::move(svc_cfg); + service_config_ = std::move(service_config); } else { gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); } @@ -50,50 +48,53 @@ class ServiceConfigChannelArgChannelData { } } - grpc_core::RefCountedPtr svc_cfg() const { - return svc_cfg_; + grpc_core::RefCountedPtr service_config() const { + return service_config_; } private: - grpc_core::RefCountedPtr svc_cfg_; + grpc_core::RefCountedPtr service_config_; +}; + +class ServiceConfigChannelArgCallData { + public: + ServiceConfigChannelArgCallData(grpc_call_element* elem, + const grpc_call_element_args* args) { + ServiceConfigChannelArgChannelData* chand = + static_cast(elem->channel_data); + grpc_core::RefCountedPtr service_config = + chand->service_config(); + if (service_config != nullptr) { + GPR_DEBUG_ASSERT(args->context != nullptr); + const auto* method_params_vector = + service_config->GetMethodParsedConfigVector(args->path); + args->arena->New( + std::move(service_config), method_params_vector, args->context); + } + } }; grpc_error* ServiceConfigChannelArgInitCallElem( grpc_call_element* elem, const grpc_call_element_args* args) { - ServiceConfigChannelArgChannelData* chand = - static_cast(elem->channel_data); - if (chand->svc_cfg() != nullptr) { - GPR_DEBUG_ASSERT(args->context != nullptr); - args->arena->New( - chand->svc_cfg(), - chand->svc_cfg()->GetMethodParsedConfigVector(args->path), - args->context); - } + ServiceConfigChannelArgCallData* calld = + static_cast(elem->call_data); + new (calld) ServiceConfigChannelArgCallData(elem, args); return GRPC_ERROR_NONE; } void ServiceConfigChannelArgDestroyCallElem( - grpc_call_element* /* elem */, const grpc_call_final_info* /* final_info */, - grpc_closure* /* then_schedule_closure */) {} + grpc_call_element* elem, const grpc_call_final_info* /* final_info */, + grpc_closure* /* then_schedule_closure */) { + ServiceConfigChannelArgCallData* calld = + static_cast(elem->call_data); + calld->~ServiceConfigChannelArgCallData(); +} grpc_error* ServiceConfigChannelArgInitChannelElem( grpc_channel_element* elem, grpc_channel_element_args* args) { ServiceConfigChannelArgChannelData* chand = static_cast(elem->channel_data); new (chand) ServiceConfigChannelArgChannelData(args); - const char* service_config_str = grpc_channel_arg_get_string( - grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG)); - if (service_config_str != nullptr) { - grpc_error* service_config_error = GRPC_ERROR_NONE; - auto svc_cfg = grpc_core::ServiceConfig::Create(service_config_str, - &service_config_error); - if (service_config_error == GRPC_ERROR_NONE) { - chand->svc_cfg = std::move(svc_cfg); - } else { - gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); - } - GRPC_ERROR_UNREF(service_config_error); - } return GRPC_ERROR_NONE; } @@ -121,8 +122,8 @@ bool maybe_add_service_config_channel_arg_filter( const grpc_channel_args* channel_args = grpc_channel_stack_builder_get_channel_arguments(builder); if (grpc_channel_args_want_minimal_stack(channel_args) || - grpc_channel_arg_get_string(grpc_channel_args_find( - channel_args, GRPC_ARG_SERVICE_CONFIG)) == nullptr) { + grpc_channel_args_find_string(channel_args, GRPC_ARG_SERVICE_CONFIG) == + nullptr) { return true; } return grpc_channel_stack_builder_prepend_filter( diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc index 122c74e1e98..c16ea66e7a3 100644 --- a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc @@ -46,7 +46,7 @@ namespace { class ChannelData { public: explicit ChannelData(const grpc_channel_element_args* args) - : max_recv_size_(get_max_recv_size(args->channel_args)) {} + : max_recv_size_(GetMaxRecvSizeFromChannelArgs(args->channel_args)) {} int max_recv_size() const { return max_recv_size_; } @@ -74,7 +74,7 @@ class CallData { OnRecvTrailingMetadataReady, this, grpc_schedule_on_exec_ctx); const MessageSizeParsedConfig* limits = - get_message_size_config_from_call_context(args.context); + MessageSizeParsedConfig::GetFromCallContext(args.context); if (limits != nullptr && limits->limits().max_recv_size >= 0 && (limits->limits().max_recv_size < max_recv_message_length_ || max_recv_message_length_ < 0)) { diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 53b4da451f5..89fdab6fae8 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -152,7 +152,7 @@ struct call_data { // apply the max request size to the send limit and the max response // size to the receive limit. const grpc_core::MessageSizeParsedConfig* limits = - grpc_core::get_message_size_config_from_call_context(args.context); + grpc_core::MessageSizeParsedConfig::GetFromCallContext(args.context); if (limits != nullptr) { if (limits->limits().max_send_size >= 0 && (limits->limits().max_send_size < this->limits.max_send_size || @@ -308,8 +308,8 @@ static void message_size_destroy_call_elem( grpc_core::MessageSizeParsedConfig::message_size_limits get_message_size_limits( const grpc_channel_args* channel_args) { grpc_core::MessageSizeParsedConfig::message_size_limits lim; - lim.max_send_size = grpc_core::get_max_send_size(channel_args); - lim.max_recv_size = grpc_core::get_max_recv_size(channel_args); + lim.max_send_size = grpc_core::GetMaxSendSizeFromChannelArgs(channel_args); + lim.max_recv_size = grpc_core::GetMaxRecvSizeFromChannelArgs(channel_args); return lim; } From b57a11a82bf803f56893881f3c0a0ac19abaf27b Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 19 Jun 2020 14:47:41 -0700 Subject: [PATCH 097/239] Reviewer comments --- .../service_config_channel_arg_filter.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc index 9c7af64bd97..6b8e6373af7 100644 --- a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +++ b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc @@ -37,8 +37,8 @@ class ServiceConfigChannelArgChannelData { args->channel_args, GRPC_ARG_SERVICE_CONFIG); if (service_config_str != nullptr) { grpc_error* service_config_error = GRPC_ERROR_NONE; - auto service_config = grpc_core::ServiceConfig::Create( - service_config_str, &service_config_error); + auto service_config = + ServiceConfig::Create(service_config_str, &service_config_error); if (service_config_error == GRPC_ERROR_NONE) { service_config_ = std::move(service_config); } else { @@ -48,12 +48,12 @@ class ServiceConfigChannelArgChannelData { } } - grpc_core::RefCountedPtr service_config() const { + RefCountedPtr service_config() const { return service_config_; } private: - grpc_core::RefCountedPtr service_config_; + RefCountedPtr service_config_; }; class ServiceConfigChannelArgCallData { @@ -62,8 +62,7 @@ class ServiceConfigChannelArgCallData { const grpc_call_element_args* args) { ServiceConfigChannelArgChannelData* chand = static_cast(elem->channel_data); - grpc_core::RefCountedPtr service_config = - chand->service_config(); + RefCountedPtr service_config = chand->service_config(); if (service_config != nullptr) { GPR_DEBUG_ASSERT(args->context != nullptr); const auto* method_params_vector = From 4fcf9d01d204bd03e9f4b364130a18796cc8fd6e Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Fri, 19 Jun 2020 15:31:55 -0700 Subject: [PATCH 098/239] Address review comments --- src/python/grpcio/commands.py | 4 ++-- tools/distrib/install_all_python_modules.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index dc441a2efd6..fb678eb2d53 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -300,13 +300,13 @@ class Clean(setuptools.Command): description = 'Clean build artifacts.' user_options = [] - _FILE_PATTERNS = [ + _FILE_PATTERNS = ( 'python_build', 'src/python/grpcio/__pycache__/', 'src/python/grpcio/grpc/_cython/cygrpc.cpp', 'src/python/grpcio/grpc/_cython/*.so', 'src/python/grpcio/grpcio.egg-info/', - ] + ) _CURRENT_DIRECTORY = os.path.normpath( os.path.join(os.path.dirname(os.path.realpath(__file__)), "../../..")) diff --git a/tools/distrib/install_all_python_modules.sh b/tools/distrib/install_all_python_modules.sh index 51a11341bb6..8189a0ffc3b 100755 --- a/tools/distrib/install_all_python_modules.sh +++ b/tools/distrib/install_all_python_modules.sh @@ -21,7 +21,7 @@ BASEDIR=$(dirname "$0") BASEDIR=$(realpath "$BASEDIR")/../.. (cd "$BASEDIR"; - pip install cython; + pip install --upgrade cython; python setup.py install; pushd tools/distrib/python/grpcio_tools; ../make_grpcio_tools.py From d8c9ab16456947f1ca73f14fef36e5536e911526 Mon Sep 17 00:00:00 2001 From: "T.J. Mercier" Date: Fri, 19 Jun 2020 20:54:26 -0700 Subject: [PATCH 099/239] I is a reserved identifier --- include/grpcpp/impl/codegen/call_op_set.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/grpcpp/impl/codegen/call_op_set.h b/include/grpcpp/impl/codegen/call_op_set.h index ba91404eb0c..afdcec46d47 100644 --- a/include/grpcpp/impl/codegen/call_op_set.h +++ b/include/grpcpp/impl/codegen/call_op_set.h @@ -198,9 +198,10 @@ class WriteOptions { namespace internal { -/// Default argument for CallOpSet. I is unused by the class, but can be -/// used for generating multiple names for the same thing. -template +/// Default argument for CallOpSet. The Unused parameter is unused by +/// the class, but can be used for generating multiple names for the +/// same thing. +template class CallNoOp { protected: void AddOp(grpc_op* /*ops*/, size_t* /*nops*/) {} From 5be0b22dc0ac2dc9864b057d5096ec9725b81313 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 16 Jun 2020 09:08:18 -0400 Subject: [PATCH 100/239] Update links to grpc.io guides in header files --- include/grpcpp/grpcpp.h | 2 +- include/grpcpp/impl/codegen/client_context_impl.h | 2 +- include/grpcpp/security/credentials_impl.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grpcpp/grpcpp.h b/include/grpcpp/grpcpp.h index aa8a24203bc..923def19ace 100644 --- a/include/grpcpp/grpcpp.h +++ b/include/grpcpp/grpcpp.h @@ -21,7 +21,7 @@ /// The gRPC C++ API mainly consists of the following classes: ///
/// - grpc::Channel, which represents the connection to an endpoint. See [the -/// gRPC Concepts page](https://grpc.io/docs/guides/concepts.html) for more +/// gRPC Concepts page](https://grpc.io/docs/what-is-grpc/core-concepts) for more /// details. Channels are created by the factory function grpc::CreateChannel. /// /// - grpc::CompletionQueue, the producer-consumer queue used for all diff --git a/include/grpcpp/impl/codegen/client_context_impl.h b/include/grpcpp/impl/codegen/client_context_impl.h index b8e90722b25..f44b1f764bb 100644 --- a/include/grpcpp/impl/codegen/client_context_impl.h +++ b/include/grpcpp/impl/codegen/client_context_impl.h @@ -319,7 +319,7 @@ class ClientContext { /// /// It is legal to call this only before initial metadata is sent. /// - /// \see https://grpc.io/docs/guides/auth.html + /// \see https://grpc.io/docs/guides/auth void set_credentials( const std::shared_ptr& creds); diff --git a/include/grpcpp/security/credentials_impl.h b/include/grpcpp/security/credentials_impl.h index aed58283722..2148cf8d32b 100644 --- a/include/grpcpp/security/credentials_impl.h +++ b/include/grpcpp/security/credentials_impl.h @@ -62,7 +62,7 @@ std::shared_ptr CreateCustomChannelWithInterceptors( /// It can make various assertions, e.g., about the client’s identity, role /// for all the calls on that channel. /// -/// \see https://grpc.io/docs/guides/auth.html +/// \see https://grpc.io/docs/guides/auth class ChannelCredentials : private grpc::GrpcLibraryCodegen { public: ChannelCredentials(); @@ -107,7 +107,7 @@ class ChannelCredentials : private grpc::GrpcLibraryCodegen { /// A call credentials object encapsulates the state needed by a client to /// authenticate with a server for a given call on a channel. /// -/// \see https://grpc.io/docs/guides/auth.html +/// \see https://grpc.io/docs/guides/auth class CallCredentials : private grpc::GrpcLibraryCodegen { public: CallCredentials(); From a5c9b22cc9867262787c209a1897e9284264b988 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 22 Jun 2020 11:39:03 -0400 Subject: [PATCH 101/239] Fix the grpcpp.h formatting. --- include/grpcpp/grpcpp.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/grpcpp/grpcpp.h b/include/grpcpp/grpcpp.h index 923def19ace..41dc09581cd 100644 --- a/include/grpcpp/grpcpp.h +++ b/include/grpcpp/grpcpp.h @@ -21,8 +21,9 @@ /// The gRPC C++ API mainly consists of the following classes: ///
/// - grpc::Channel, which represents the connection to an endpoint. See [the -/// gRPC Concepts page](https://grpc.io/docs/what-is-grpc/core-concepts) for more -/// details. Channels are created by the factory function grpc::CreateChannel. +/// gRPC Concepts page](https://grpc.io/docs/what-is-grpc/core-concepts) for +/// more details. Channels are created by the factory function +/// grpc::CreateChannel. /// /// - grpc::CompletionQueue, the producer-consumer queue used for all /// asynchronous communication with the gRPC runtime. From 2a3b1f0eb7b8424fef4a3636d99abb93bd0d7ca2 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 22 Jun 2020 09:25:59 -0700 Subject: [PATCH 102/239] Revert log changes --- test/cpp/qps/qps_worker.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 5d6a2fa1f1a..c364216bc02 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -292,10 +292,11 @@ QpsWorker::QpsWorker(int driver_port, int server_port, server_ = builder->BuildAndStart(); if (server_ == nullptr) { gpr_log(GPR_ERROR, - "QpsWorker: Fail to BuildAndStart(port=%d) (server_port=%d)", + "QpsWorker: Fail to BuildAndStart(driver_port=%d, server_port=%d)", driver_port, server_port); } else { - gpr_log(GPR_INFO, "QpsWorker: BuildAndStart(port=%d) (server_port=%d)", + gpr_log(GPR_INFO, + "QpsWorker: BuildAndStart(driver_port=%d, server_port=%d) done", driver_port, server_port); } } From 3a14c1a43260aab95976944eb428296d9db5e463 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Mon, 22 Jun 2020 12:03:09 -0700 Subject: [PATCH 103/239] Add tls1.h header regardless of what SSL library is used. --- src/core/tsi/ssl_transport_security.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index a13b09a99ff..9058a7e82e8 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -49,11 +49,7 @@ extern "C" { #include #include #include -#ifndef OPENSSL_IS_BORINGSSL -/* For the TLS1_3_version macro in OpenSSL. In BoringSSL, this macro is defined - * in ssl.h. */ #include -#endif #include #include } From 11a29eb95a2b1e7e1cb583b782fb1883cd40f775 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Mon, 22 Jun 2020 10:22:19 -0700 Subject: [PATCH 104/239] Implement methods to access auth context and peer info --- .../grpc/_cython/_cygrpc/aio/server.pyx.pxi | 49 +++++ .../grpc/experimental/aio/_base_server.py | 43 +++- src/python/grpcio_tests/tests_aio/tests.json | 2 + .../tests_aio/unit/auth_context_test.py | 194 ++++++++++++++++++ .../tests_aio/unit/context_peer_test.py | 65 ++++++ 5 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 src/python/grpcio_tests/tests_aio/unit/auth_context_test.py create mode 100644 src/python/grpcio_tests/tests_aio/unit/context_peer_test.py diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi index b842ec6f2ba..63dbfdd75c0 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi @@ -213,6 +213,43 @@ cdef class _ServicerContext: def disable_next_message_compression(self): self._rpc_state.disable_next_compression = True + def peer(self): + cdef char *c_peer = NULL + c_peer = grpc_call_get_peer(self._rpc_state.call) + peer = (c_peer).decode('utf8') + gpr_free(c_peer) + return peer + + def peer_identities(self): + cdef Call query_call = Call() + query_call.c_call = self._rpc_state.call + identities = peer_identities(query_call) + query_call.c_call = NULL + return identities + + def peer_identity_key(self): + cdef Call query_call = Call() + query_call.c_call = self._rpc_state.call + identity_key = peer_identity_key(query_call) + query_call.c_call = NULL + if identity_key: + return identity_key.decode('utf8') + else: + return None + + def auth_context(self): + cdef Call query_call = Call() + query_call.c_call = self._rpc_state.call + bytes_ctx = auth_context(query_call) + query_call.c_call = NULL + if bytes_ctx: + ctx = {} + for key in bytes_ctx: + ctx[key.decode('utf8')] = bytes_ctx[key] + return ctx + else: + return {} + cdef class _SyncServicerContext: """Sync servicer context for sync handler compatibility.""" @@ -260,6 +297,18 @@ cdef class _SyncServicerContext: def add_callback(self, object callback): self._callbacks.append(callback) + def peer(self): + return self._context.peer() + + def peer_identities(self): + return self._context.peer_identities() + + def peer_identity_key(self): + return self._context.peer_identity_key() + + def auth_context(self): + return self._context.auth_context() + async def _run_interceptor(object interceptors, object query_handler, object handler_call_details): diff --git a/src/python/grpcio/grpc/experimental/aio/_base_server.py b/src/python/grpcio/grpc/experimental/aio/_base_server.py index 86c15fc86b0..926c8651714 100644 --- a/src/python/grpcio/grpc/experimental/aio/_base_server.py +++ b/src/python/grpcio/grpc/experimental/aio/_base_server.py @@ -14,7 +14,7 @@ """Abstract base classes for server-side classes.""" import abc -from typing import Generic, Optional, Sequence +from typing import Generic, Mapping, Optional, Iterable, Sequence import grpc @@ -251,3 +251,44 @@ class ServicerContext(Generic[RequestType, ResponseType], abc.ABC): This method will override any compression configuration set during server creation or set on the call. """ + + @abc.abstractmethod + def peer(self) -> str: + """Identifies the peer that invoked the RPC being serviced. + + Returns: + A string identifying the peer that invoked the RPC being serviced. + The string format is determined by gRPC runtime. + """ + + @abc.abstractmethod + def peer_identities(self) -> Optional[Iterable[bytes]]: + """Gets one or more peer identity(s). + + Equivalent to + servicer_context.auth_context().get(servicer_context.peer_identity_key()) + + Returns: + An iterable of the identities, or None if the call is not + authenticated. Each identity is returned as a raw bytes type. + """ + + @abc.abstractmethod + def peer_identity_key(self) -> Optional[str]: + """The auth property used to identify the peer. + + For example, "x509_common_name" or "x509_subject_alternative_name" are + used to identify an SSL peer. + + Returns: + The auth property (string) that indicates the + peer identity, or None if the call is not authenticated. + """ + + @abc.abstractmethod + def auth_context(self) -> Mapping[str, Iterable[bytes]]: + """Gets the auth context for the call. + + Returns: + A map of strings to an iterable of bytes for each auth property. + """ diff --git a/src/python/grpcio_tests/tests_aio/tests.json b/src/python/grpcio_tests/tests_aio/tests.json index f01d7d0570d..68ff13e5ccc 100644 --- a/src/python/grpcio_tests/tests_aio/tests.json +++ b/src/python/grpcio_tests/tests_aio/tests.json @@ -9,6 +9,7 @@ "unit._metadata_test.TestTypeMetadata", "unit.abort_test.TestAbort", "unit.aio_rpc_error_test.TestAioRpcError", + "unit.auth_context_test.TestAuthContext", "unit.call_test.TestStreamStreamCall", "unit.call_test.TestStreamUnaryCall", "unit.call_test.TestUnaryStreamCall", @@ -16,6 +17,7 @@ "unit.channel_argument_test.TestChannelArgument", "unit.channel_ready_test.TestChannelReady", "unit.channel_test.TestChannel", + "unit.context_peer.TestContextPeer", "unit.client_stream_stream_interceptor_test.TestStreamStreamClientInterceptor", "unit.client_stream_unary_interceptor_test.TestStreamUnaryClientInterceptor", "unit.client_unary_stream_interceptor_test.TestUnaryStreamClientInterceptor", diff --git a/src/python/grpcio_tests/tests_aio/unit/auth_context_test.py b/src/python/grpcio_tests/tests_aio/unit/auth_context_test.py new file mode 100644 index 00000000000..fb303714682 --- /dev/null +++ b/src/python/grpcio_tests/tests_aio/unit/auth_context_test.py @@ -0,0 +1,194 @@ +# Copyright 2020 The gRPC Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Porting auth context tests from sync stack.""" + +import pickle +import unittest +import logging + +import grpc +from grpc.experimental import aio +from grpc.experimental import session_cache +import six + +from tests.unit import resources +from tests_aio.unit._test_base import AioTestBase + +_REQUEST = b'\x00\x00\x00' +_RESPONSE = b'\x00\x00\x00' + +_UNARY_UNARY = '/test/UnaryUnary' + +_SERVER_HOST_OVERRIDE = 'foo.test.google.fr' +_CLIENT_IDS = ( + b'*.test.google.fr', + b'waterzooi.test.google.be', + b'*.test.youtube.com', + b'192.168.1.3', +) +_ID = 'id' +_ID_KEY = 'id_key' +_AUTH_CTX = 'auth_ctx' + +_PRIVATE_KEY = resources.private_key() +_CERTIFICATE_CHAIN = resources.certificate_chain() +_TEST_ROOT_CERTIFICATES = resources.test_root_certificates() +_SERVER_CERTS = ((_PRIVATE_KEY, _CERTIFICATE_CHAIN),) +_PROPERTY_OPTIONS = (( + 'grpc.ssl_target_name_override', + _SERVER_HOST_OVERRIDE, +),) + + +async def handle_unary_unary(unused_request: bytes, + servicer_context: aio.ServicerContext): + return pickle.dumps({ + _ID: servicer_context.peer_identities(), + _ID_KEY: servicer_context.peer_identity_key(), + _AUTH_CTX: servicer_context.auth_context() + }) + + +class TestAuthContext(AioTestBase): + + async def test_insecure(self): + handler = grpc.method_handlers_generic_handler('test', { + 'UnaryUnary': + grpc.unary_unary_rpc_method_handler(handle_unary_unary) + }) + server = aio.server() + server.add_generic_rpc_handlers((handler,)) + port = server.add_insecure_port('[::]:0') + await server.start() + + async with aio.insecure_channel('localhost:%d' % port) as channel: + response = await channel.unary_unary(_UNARY_UNARY)(_REQUEST) + await server.stop(None) + + auth_data = pickle.loads(response) + self.assertIsNone(auth_data[_ID]) + self.assertIsNone(auth_data[_ID_KEY]) + self.assertDictEqual({}, auth_data[_AUTH_CTX]) + + async def test_secure_no_cert(self): + handler = grpc.method_handlers_generic_handler('test', { + 'UnaryUnary': + grpc.unary_unary_rpc_method_handler(handle_unary_unary) + }) + server = aio.server() + server.add_generic_rpc_handlers((handler,)) + server_cred = grpc.ssl_server_credentials(_SERVER_CERTS) + port = server.add_secure_port('[::]:0', server_cred) + await server.start() + + channel_creds = grpc.ssl_channel_credentials( + root_certificates=_TEST_ROOT_CERTIFICATES) + channel = aio.secure_channel('localhost:{}'.format(port), + channel_creds, + options=_PROPERTY_OPTIONS) + response = await channel.unary_unary(_UNARY_UNARY)(_REQUEST) + await channel.close() + await server.stop(None) + + auth_data = pickle.loads(response) + self.assertIsNone(auth_data[_ID]) + self.assertIsNone(auth_data[_ID_KEY]) + self.assertDictEqual( + { + 'security_level': [b'TSI_PRIVACY_AND_INTEGRITY'], + 'transport_security_type': [b'ssl'], + 'ssl_session_reused': [b'false'], + }, auth_data[_AUTH_CTX]) + + async def test_secure_client_cert(self): + handler = grpc.method_handlers_generic_handler('test', { + 'UnaryUnary': + grpc.unary_unary_rpc_method_handler(handle_unary_unary) + }) + server = aio.server() + server.add_generic_rpc_handlers((handler,)) + server_cred = grpc.ssl_server_credentials( + _SERVER_CERTS, + root_certificates=_TEST_ROOT_CERTIFICATES, + require_client_auth=True) + port = server.add_secure_port('[::]:0', server_cred) + await server.start() + + channel_creds = grpc.ssl_channel_credentials( + root_certificates=_TEST_ROOT_CERTIFICATES, + private_key=_PRIVATE_KEY, + certificate_chain=_CERTIFICATE_CHAIN) + channel = aio.secure_channel('localhost:{}'.format(port), + channel_creds, + options=_PROPERTY_OPTIONS) + + response = await channel.unary_unary(_UNARY_UNARY)(_REQUEST) + await channel.close() + await server.stop(None) + + auth_data = pickle.loads(response) + auth_ctx = auth_data[_AUTH_CTX] + self.assertCountEqual(_CLIENT_IDS, auth_data[_ID]) + self.assertEqual('x509_subject_alternative_name', auth_data[_ID_KEY]) + self.assertSequenceEqual([b'ssl'], auth_ctx['transport_security_type']) + self.assertSequenceEqual([b'*.test.google.com'], + auth_ctx['x509_common_name']) + + async def _do_one_shot_client_rpc(self, channel_creds, channel_options, + port, expect_ssl_session_reused): + channel = aio.secure_channel('localhost:{}'.format(port), + channel_creds, + options=channel_options) + response = await channel.unary_unary(_UNARY_UNARY)(_REQUEST) + auth_data = pickle.loads(response) + self.assertEqual(expect_ssl_session_reused, + auth_data[_AUTH_CTX]['ssl_session_reused']) + await channel.close() + + async def test_session_resumption(self): + # Set up a secure server + handler = grpc.method_handlers_generic_handler('test', { + 'UnaryUnary': + grpc.unary_unary_rpc_method_handler(handle_unary_unary) + }) + server = aio.server() + server.add_generic_rpc_handlers((handler,)) + server_cred = grpc.ssl_server_credentials(_SERVER_CERTS) + port = server.add_secure_port('[::]:0', server_cred) + await server.start() + + # Create a cache for TLS session tickets + cache = session_cache.ssl_session_cache_lru(1) + channel_creds = grpc.ssl_channel_credentials( + root_certificates=_TEST_ROOT_CERTIFICATES) + channel_options = _PROPERTY_OPTIONS + ( + ('grpc.ssl_session_cache', cache),) + + # Initial connection has no session to resume + await self._do_one_shot_client_rpc(channel_creds, + channel_options, + port, + expect_ssl_session_reused=[b'false']) + + # Subsequent connections resume sessions + await self._do_one_shot_client_rpc(channel_creds, + channel_options, + port, + expect_ssl_session_reused=[b'true']) + await server.stop(None) + + +if __name__ == '__main__': + logging.basicConfig(level=logging.DEBUG) + unittest.main() diff --git a/src/python/grpcio_tests/tests_aio/unit/context_peer_test.py b/src/python/grpcio_tests/tests_aio/unit/context_peer_test.py new file mode 100644 index 00000000000..ea5f4621afb --- /dev/null +++ b/src/python/grpcio_tests/tests_aio/unit/context_peer_test.py @@ -0,0 +1,65 @@ +# Copyright 2020 The gRPC Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Testing the server context ability to access peer info.""" + +import asyncio +import logging +import os +import unittest +from typing import Callable, Iterable, Sequence, Tuple + +import grpc +from grpc.experimental import aio + +from src.proto.grpc.testing import messages_pb2, test_pb2_grpc +from tests.unit.framework.common import test_constants +from tests_aio.unit import _common +from tests_aio.unit._test_base import AioTestBase +from tests_aio.unit._test_server import TestServiceServicer, start_test_server + +_REQUEST = b'\x03\x07' +_TEST_METHOD = '/test/UnaryUnary' + + +class TestContextPeer(AioTestBase): + + async def test_peer(self): + + @grpc.unary_unary_rpc_method_handler + async def check_peer_unary_unary(request: bytes, + context: aio.ServicerContext): + self.assertEqual(_REQUEST, request) + # The peer address could be ipv4 or ipv6 + self.assertIn('ip', context.peer()) + return request + + # Creates a server + server = aio.server() + handlers = grpc.method_handlers_generic_handler( + 'test', {'UnaryUnary': check_peer_unary_unary}) + server.add_generic_rpc_handlers((handlers,)) + port = server.add_insecure_port('[::]:0') + await server.start() + + # Creates a channel + async with aio.insecure_channel('localhost:%d' % port) as channel: + response = await channel.unary_unary(_TEST_METHOD)(_REQUEST) + self.assertEqual(_REQUEST, response) + + await server.stop(None) + + +if __name__ == '__main__': + logging.basicConfig(level=logging.DEBUG) + unittest.main(verbosity=2) From 048ff291467bc89b459b559520d3ad71ffac6260 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Mon, 22 Jun 2020 12:31:50 -0700 Subject: [PATCH 105/239] Add #if defined(TLS1_3_VERSION). --- src/core/tsi/ssl_transport_security.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 9058a7e82e8..687d6337774 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -905,9 +905,11 @@ static tsi_result tsi_set_min_and_max_tls_versions( case grpc_tls_version::TLS1_2: SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION); break; +#if defined(TLS1_3_VERSION) case grpc_tls_version::TLS1_3: SSL_CTX_set_min_proto_version(ssl_context, TLS1_3_VERSION); break; +#endif #endif default: gpr_log(GPR_INFO, "TLS version is not supported."); @@ -919,9 +921,11 @@ static tsi_result tsi_set_min_and_max_tls_versions( case grpc_tls_version::TLS1_2: SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION); break; +#if defined(TLS1_3_VERSION) case grpc_tls_version::TLS1_3: SSL_CTX_set_max_proto_version(ssl_context, TLS1_3_VERSION); break; +#endif #endif default: gpr_log(GPR_INFO, "TLS version is not supported."); From b96381694cdfe854af70dc37c535064b21619a5c Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Mon, 22 Jun 2020 12:57:09 -0700 Subject: [PATCH 106/239] Sort tests.json alphabetically --- src/python/grpcio_tests/tests_aio/tests.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio_tests/tests_aio/tests.json b/src/python/grpcio_tests/tests_aio/tests.json index 68ff13e5ccc..d10aadeaddd 100644 --- a/src/python/grpcio_tests/tests_aio/tests.json +++ b/src/python/grpcio_tests/tests_aio/tests.json @@ -17,7 +17,6 @@ "unit.channel_argument_test.TestChannelArgument", "unit.channel_ready_test.TestChannelReady", "unit.channel_test.TestChannel", - "unit.context_peer.TestContextPeer", "unit.client_stream_stream_interceptor_test.TestStreamStreamClientInterceptor", "unit.client_stream_unary_interceptor_test.TestStreamUnaryClientInterceptor", "unit.client_unary_stream_interceptor_test.TestUnaryStreamClientInterceptor", @@ -27,6 +26,7 @@ "unit.compatibility_test.TestCompatibility", "unit.compression_test.TestCompression", "unit.connectivity_test.TestConnectivityState", + "unit.context_peer.TestContextPeer", "unit.done_callback_test.TestDoneCallback", "unit.init_test.TestChannel", "unit.metadata_test.TestMetadata", From c9c01d38faab2d5f7e2ac12f2e8876c3abe343c8 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 22 Jun 2020 13:24:43 -0700 Subject: [PATCH 107/239] add missing virtual dtor --- src/core/ext/filters/client_channel/resolving_lb_policy.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/ext/filters/client_channel/resolving_lb_policy.h b/src/core/ext/filters/client_channel/resolving_lb_policy.h index 98ea37fbb64..b44dc1a94e3 100644 --- a/src/core/ext/filters/client_channel/resolving_lb_policy.h +++ b/src/core/ext/filters/client_channel/resolving_lb_policy.h @@ -68,6 +68,8 @@ class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy { RefCountedPtr lb_policy_config; }; + virtual ~ChannelConfigHelper() = default; + // Applies the service config to the channel. virtual ApplyServiceConfigResult ApplyServiceConfig( const Resolver::Result& result) = 0; From ae49a8503889b0644039a92aeeaa71c9b4acf363 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Mon, 22 Jun 2020 13:47:30 -0700 Subject: [PATCH 108/239] Fix the typo --- src/python/grpcio_tests/tests_aio/tests.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio_tests/tests_aio/tests.json b/src/python/grpcio_tests/tests_aio/tests.json index d10aadeaddd..37aa427dacf 100644 --- a/src/python/grpcio_tests/tests_aio/tests.json +++ b/src/python/grpcio_tests/tests_aio/tests.json @@ -26,7 +26,7 @@ "unit.compatibility_test.TestCompatibility", "unit.compression_test.TestCompression", "unit.connectivity_test.TestConnectivityState", - "unit.context_peer.TestContextPeer", + "unit.context_peer_test.TestContextPeer", "unit.done_callback_test.TestDoneCallback", "unit.init_test.TestChannel", "unit.metadata_test.TestMetadata", From 0ac5d5e111add30cf81cce4c5115e66b97ff21d2 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Mon, 22 Jun 2020 14:00:22 -0700 Subject: [PATCH 109/239] Fix build error --- include/grpcpp/server_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 87aebe8e6ba..4b7ffa16cc4 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -261,7 +261,7 @@ class ServerBuilder { /// experimental. class experimental_type { public: - explicit experimental_type(grpc_impl::ServerBuilder* builder) + explicit experimental_type(ServerBuilder* builder) : builder_(builder) {} void SetInterceptorCreators( From c7f2956b67f0999bd6e1cef7eb2e89c628ec0a7a Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 22 Jun 2020 16:18:36 -0700 Subject: [PATCH 110/239] Revert "Add message-size check before message decompression" --- BUILD | 2 - BUILD.gn | 1 - CMakeLists.txt | 2 - Makefile | 2 - build_autogenerated.yaml | 2 - config.m4 | 1 - config.w32 | 1 - gRPC-Core.podspec | 1 - grpc.gemspec | 1 - grpc.gyp | 2 - package.xml | 1 - .../service_config_channel_arg_filter.cc | 142 -------- .../ext/filters/http/http_filters_plugin.cc | 3 +- .../message_decompress_filter.cc | 92 ++--- .../message_decompress_filter.h | 4 +- .../message_size/message_size_filter.cc | 106 +++--- .../message_size/message_size_filter.h | 6 - .../plugin_registry/grpc_plugin_registry.cc | 4 - .../grpc_unsecure_plugin_registry.cc | 4 - src/python/grpcio/grpc_core_dependencies.py | 1 - test/core/end2end/tests/max_message_length.cc | 332 ------------------ test/cpp/microbenchmarks/bm_call_create.cc | 3 +- tools/doxygen/Doxyfile.c++.internal | 1 - tools/doxygen/Doxyfile.core.internal | 1 - 24 files changed, 93 insertions(+), 622 deletions(-) delete mode 100644 src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc diff --git a/BUILD b/BUILD index 56a55a30509..48c1c1cffb7 100644 --- a/BUILD +++ b/BUILD @@ -1046,7 +1046,6 @@ grpc_cc_library( "src/core/ext/filters/client_channel/retry_throttle.cc", "src/core/ext/filters/client_channel/server_address.cc", "src/core/ext/filters/client_channel/service_config.cc", - "src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc", "src/core/ext/filters/client_channel/service_config_parser.cc", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel_pool_interface.cc", @@ -1188,7 +1187,6 @@ grpc_cc_library( language = "c++", deps = [ "grpc_base", - "grpc_message_size_filter", ], ) diff --git a/BUILD.gn b/BUILD.gn index 3834e5a0ab7..2d9c2593a5a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -295,7 +295,6 @@ config("grpc_config") { "src/core/ext/filters/client_channel/service_config.cc", "src/core/ext/filters/client_channel/service_config.h", "src/core/ext/filters/client_channel/service_config_call_data.h", - "src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc", "src/core/ext/filters/client_channel/service_config_parser.cc", "src/core/ext/filters/client_channel/service_config_parser.h", "src/core/ext/filters/client_channel/subchannel.cc", diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f8bac94432..7515cafaf5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1376,7 +1376,6 @@ add_library(grpc src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/server_address.cc src/core/ext/filters/client_channel/service_config.cc - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc src/core/ext/filters/client_channel/service_config_parser.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -2049,7 +2048,6 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/server_address.cc src/core/ext/filters/client_channel/service_config.cc - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc src/core/ext/filters/client_channel/service_config_parser.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_pool_interface.cc diff --git a/Makefile b/Makefile index de3331162a6..39a4d43a316 100644 --- a/Makefile +++ b/Makefile @@ -3679,7 +3679,6 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ @@ -4326,7 +4325,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index fac33c197a2..3ac9f3c74b9 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -795,7 +795,6 @@ libs: - src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/server_address.cc - src/core/ext/filters/client_channel/service_config.cc - - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc - src/core/ext/filters/client_channel/service_config_parser.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -1657,7 +1656,6 @@ libs: - src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/server_address.cc - src/core/ext/filters/client_channel/service_config.cc - - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc - src/core/ext/filters/client_channel/service_config_parser.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_pool_interface.cc diff --git a/config.m4 b/config.m4 index a6bf9a21b6c..5ee9f1c8d58 100644 --- a/config.m4 +++ b/config.m4 @@ -93,7 +93,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ diff --git a/config.w32 b/config.w32 index 03cf0684684..1c533a33302 100644 --- a/config.w32 +++ b/config.w32 @@ -62,7 +62,6 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " + "src\\core\\ext\\filters\\client_channel\\server_address.cc " + "src\\core\\ext\\filters\\client_channel\\service_config.cc " + - "src\\core\\ext\\filters\\client_channel\\service_config_channel_arg_filter.cc " + "src\\core\\ext\\filters\\client_channel\\service_config_parser.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel_pool_interface.cc " + diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 43a47a09fa7..aaf5609a9c3 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -279,7 +279,6 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/service_config.cc', 'src/core/ext/filters/client_channel/service_config.h', 'src/core/ext/filters/client_channel/service_config_call_data.h', - 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/service_config_parser.h', 'src/core/ext/filters/client_channel/subchannel.cc', diff --git a/grpc.gemspec b/grpc.gemspec index 72ec55f0c86..881f55a81c2 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -201,7 +201,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/service_config.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config.h ) s.files += %w( src/core/ext/filters/client_channel/service_config_call_data.h ) - s.files += %w( src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config_parser.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config_parser.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel.cc ) diff --git a/grpc.gyp b/grpc.gyp index 587e6ba8d94..e8bed76e891 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -488,7 +488,6 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', - 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', @@ -997,7 +996,6 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', - 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', diff --git a/package.xml b/package.xml index 7553fe27739..262c66a6ac3 100644 --- a/package.xml +++ b/package.xml @@ -181,7 +181,6 @@ - diff --git a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc deleted file mode 100644 index 6b8e6373af7..00000000000 --- a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +++ /dev/null @@ -1,142 +0,0 @@ -// -// Copyright 2020 gRPC authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// This filter reads GRPC_ARG_SERVICE_CONFIG and populates ServiceConfigCallData -// in the call context per call for direct channels. - -#include - -#include "src/core/ext/filters/client_channel/service_config_call_data.h" -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/channel/channel_stack_builder.h" -#include "src/core/lib/surface/channel_init.h" - -namespace grpc_core { - -namespace { - -class ServiceConfigChannelArgChannelData { - public: - explicit ServiceConfigChannelArgChannelData( - const grpc_channel_element_args* args) { - const char* service_config_str = grpc_channel_args_find_string( - args->channel_args, GRPC_ARG_SERVICE_CONFIG); - if (service_config_str != nullptr) { - grpc_error* service_config_error = GRPC_ERROR_NONE; - auto service_config = - ServiceConfig::Create(service_config_str, &service_config_error); - if (service_config_error == GRPC_ERROR_NONE) { - service_config_ = std::move(service_config); - } else { - gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); - } - GRPC_ERROR_UNREF(service_config_error); - } - } - - RefCountedPtr service_config() const { - return service_config_; - } - - private: - RefCountedPtr service_config_; -}; - -class ServiceConfigChannelArgCallData { - public: - ServiceConfigChannelArgCallData(grpc_call_element* elem, - const grpc_call_element_args* args) { - ServiceConfigChannelArgChannelData* chand = - static_cast(elem->channel_data); - RefCountedPtr service_config = chand->service_config(); - if (service_config != nullptr) { - GPR_DEBUG_ASSERT(args->context != nullptr); - const auto* method_params_vector = - service_config->GetMethodParsedConfigVector(args->path); - args->arena->New( - std::move(service_config), method_params_vector, args->context); - } - } -}; - -grpc_error* ServiceConfigChannelArgInitCallElem( - grpc_call_element* elem, const grpc_call_element_args* args) { - ServiceConfigChannelArgCallData* calld = - static_cast(elem->call_data); - new (calld) ServiceConfigChannelArgCallData(elem, args); - return GRPC_ERROR_NONE; -} - -void ServiceConfigChannelArgDestroyCallElem( - grpc_call_element* elem, const grpc_call_final_info* /* final_info */, - grpc_closure* /* then_schedule_closure */) { - ServiceConfigChannelArgCallData* calld = - static_cast(elem->call_data); - calld->~ServiceConfigChannelArgCallData(); -} - -grpc_error* ServiceConfigChannelArgInitChannelElem( - grpc_channel_element* elem, grpc_channel_element_args* args) { - ServiceConfigChannelArgChannelData* chand = - static_cast(elem->channel_data); - new (chand) ServiceConfigChannelArgChannelData(args); - return GRPC_ERROR_NONE; -} - -void ServiceConfigChannelArgDestroyChannelElem(grpc_channel_element* elem) { - ServiceConfigChannelArgChannelData* chand = - static_cast(elem->channel_data); - chand->~ServiceConfigChannelArgChannelData(); -} - -const grpc_channel_filter ServiceConfigChannelArgFilter = { - grpc_call_next_op, - grpc_channel_next_op, - sizeof(ServiceConfigChannelArgCallData), - ServiceConfigChannelArgInitCallElem, - grpc_call_stack_ignore_set_pollset_or_pollset_set, - ServiceConfigChannelArgDestroyCallElem, - sizeof(ServiceConfigChannelArgChannelData), - ServiceConfigChannelArgInitChannelElem, - ServiceConfigChannelArgDestroyChannelElem, - grpc_channel_next_get_info, - "service_config_channel_arg"}; - -bool maybe_add_service_config_channel_arg_filter( - grpc_channel_stack_builder* builder, void* /* arg */) { - const grpc_channel_args* channel_args = - grpc_channel_stack_builder_get_channel_arguments(builder); - if (grpc_channel_args_want_minimal_stack(channel_args) || - grpc_channel_args_find_string(channel_args, GRPC_ARG_SERVICE_CONFIG) == - nullptr) { - return true; - } - return grpc_channel_stack_builder_prepend_filter( - builder, &ServiceConfigChannelArgFilter, nullptr, nullptr); -} - -} // namespace - -} // namespace grpc_core - -void grpc_service_config_channel_arg_filter_init(void) { - grpc_channel_init_register_stage( - GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, - grpc_core::maybe_add_service_config_channel_arg_filter, nullptr); -} - -void grpc_service_config_channel_arg_filter_shutdown(void) {} diff --git a/src/core/ext/filters/http/http_filters_plugin.cc b/src/core/ext/filters/http/http_filters_plugin.cc index 637dc3030f2..2fedc7fe3d7 100644 --- a/src/core/ext/filters/http/http_filters_plugin.cc +++ b/src/core/ext/filters/http/http_filters_plugin.cc @@ -38,8 +38,7 @@ static optional_filter compress_filter = { &grpc_message_compress_filter, GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION}; static optional_filter decompress_filter = { - &grpc_core::MessageDecompressFilter, - GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION}; + &grpc_message_decompress_filter, GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION}; static bool is_building_http_like_transport( grpc_channel_stack_builder* builder) { diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc index c16ea66e7a3..d12f4013bb2 100644 --- a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc @@ -18,8 +18,6 @@ #include -#include "src/core/ext/filters/http/message_compress/message_decompress_filter.h" - #include #include @@ -29,8 +27,7 @@ #include #include -#include "absl/strings/str_format.h" -#include "src/core/ext/filters/message_size/message_size_filter.h" +#include "src/core/ext/filters/http/message_compress/message_decompress_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/compression/algorithm_metadata.h" #include "src/core/lib/compression/compression_args.h" @@ -40,25 +37,14 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" -namespace grpc_core { namespace { -class ChannelData { - public: - explicit ChannelData(const grpc_channel_element_args* args) - : max_recv_size_(GetMaxRecvSizeFromChannelArgs(args->channel_args)) {} - - int max_recv_size() const { return max_recv_size_; } - - private: - int max_recv_size_; -}; +class ChannelData {}; class CallData { public: - CallData(const grpc_call_element_args& args, const ChannelData* chand) - : call_combiner_(args.call_combiner), - max_recv_message_length_(chand->max_recv_size()) { + explicit CallData(const grpc_call_element_args& args) + : call_combiner_(args.call_combiner) { // Initialize state for recv_initial_metadata_ready callback GRPC_CLOSURE_INIT(&on_recv_initial_metadata_ready_, OnRecvInitialMetadataReady, this, @@ -73,13 +59,6 @@ class CallData { GRPC_CLOSURE_INIT(&on_recv_trailing_metadata_ready_, OnRecvTrailingMetadataReady, this, grpc_schedule_on_exec_ctx); - const MessageSizeParsedConfig* limits = - MessageSizeParsedConfig::GetFromCallContext(args.context); - if (limits != nullptr && limits->limits().max_recv_size >= 0 && - (limits->limits().max_recv_size < max_recv_message_length_ || - max_recv_message_length_ < 0)) { - max_recv_message_length_ = limits->limits().max_recv_size; - } } ~CallData() { grpc_slice_buffer_destroy_internal(&recv_slices_); } @@ -103,7 +82,7 @@ class CallData { void MaybeResumeOnRecvTrailingMetadataReady(); static void OnRecvTrailingMetadataReady(void* arg, grpc_error* error); - CallCombiner* call_combiner_; + grpc_core::CallCombiner* call_combiner_; // Overall error for the call grpc_error* error_ = GRPC_ERROR_NONE; // Fields for handling recv_initial_metadata_ready callback @@ -112,18 +91,17 @@ class CallData { grpc_metadata_batch* recv_initial_metadata_ = nullptr; // Fields for handling recv_message_ready callback bool seen_recv_message_ready_ = false; - int max_recv_message_length_; grpc_message_compression_algorithm algorithm_ = GRPC_MESSAGE_COMPRESS_NONE; grpc_closure on_recv_message_ready_; grpc_closure* original_recv_message_ready_ = nullptr; grpc_closure on_recv_message_next_done_; - OrphanablePtr* recv_message_ = nullptr; + grpc_core::OrphanablePtr* recv_message_ = nullptr; // recv_slices_ holds the slices read from the original recv_message stream. // It is initialized during construction and reset when a new stream is // created using it. grpc_slice_buffer recv_slices_; - std::aligned_storage::type + std::aligned_storage::type recv_replacement_stream_; // Fields for handling recv_trailing_metadata_ready callback bool seen_recv_trailing_metadata_ready_ = false; @@ -161,7 +139,7 @@ void CallData::OnRecvInitialMetadataReady(void* arg, grpc_error* error) { calld->MaybeResumeOnRecvTrailingMetadataReady(); grpc_closure* closure = calld->original_recv_initial_metadata_ready_; calld->original_recv_initial_metadata_ready_ = nullptr; - Closure::Run(DEBUG_LOCATION, closure, GRPC_ERROR_REF(error)); + grpc_core::Closure::Run(DEBUG_LOCATION, closure, GRPC_ERROR_REF(error)); } void CallData::MaybeResumeOnRecvMessageReady() { @@ -192,19 +170,6 @@ void CallData::OnRecvMessageReady(void* arg, grpc_error* error) { 0) { return calld->ContinueRecvMessageReadyCallback(GRPC_ERROR_NONE); } - if (calld->max_recv_message_length_ >= 0 && - (*calld->recv_message_)->length() > - static_cast(calld->max_recv_message_length_)) { - std::string message_string = absl::StrFormat( - "Received message larger than max (%u vs. %d)", - (*calld->recv_message_)->length(), calld->max_recv_message_length_); - GPR_DEBUG_ASSERT(calld->error_ == GRPC_ERROR_NONE); - calld->error_ = grpc_error_set_int( - GRPC_ERROR_CREATE_FROM_COPIED_STRING(message_string.c_str()), - GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED); - return calld->ContinueRecvMessageReadyCallback( - GRPC_ERROR_REF(calld->error_)); - } grpc_slice_buffer_destroy_internal(&calld->recv_slices_); grpc_slice_buffer_init(&calld->recv_slices_); return calld->ContinueReadingRecvMessage(); @@ -276,9 +241,9 @@ void CallData::FinishRecvMessage() { // Initializing recv_replacement_stream_ with decompressed_slices removes // all the slices from decompressed_slices leaving it empty. new (&recv_replacement_stream_) - SliceBufferByteStream(&decompressed_slices, recv_flags); - recv_message_->reset( - reinterpret_cast(&recv_replacement_stream_)); + grpc_core::SliceBufferByteStream(&decompressed_slices, recv_flags); + recv_message_->reset(reinterpret_cast( + &recv_replacement_stream_)); recv_message_ = nullptr; } ContinueRecvMessageReadyCallback(GRPC_ERROR_REF(error_)); @@ -289,7 +254,7 @@ void CallData::ContinueRecvMessageReadyCallback(grpc_error* error) { // The surface will clean up the receiving stream if there is an error. grpc_closure* closure = original_recv_message_ready_; original_recv_message_ready_ = nullptr; - Closure::Run(DEBUG_LOCATION, closure, error); + grpc_core::Closure::Run(DEBUG_LOCATION, closure, error); } void CallData::MaybeResumeOnRecvTrailingMetadataReady() { @@ -318,7 +283,7 @@ void CallData::OnRecvTrailingMetadataReady(void* arg, grpc_error* error) { calld->error_ = GRPC_ERROR_NONE; grpc_closure* closure = calld->original_recv_trailing_metadata_ready_; calld->original_recv_trailing_metadata_ready_ = nullptr; - Closure::Run(DEBUG_LOCATION, closure, error); + grpc_core::Closure::Run(DEBUG_LOCATION, closure, error); } void CallData::DecompressStartTransportStreamOpBatch( @@ -357,44 +322,37 @@ void DecompressStartTransportStreamOpBatch( calld->DecompressStartTransportStreamOpBatch(elem, batch); } -grpc_error* DecompressInitCallElem(grpc_call_element* elem, - const grpc_call_element_args* args) { - ChannelData* chand = static_cast(elem->channel_data); - new (elem->call_data) CallData(*args, chand); +static grpc_error* DecompressInitCallElem(grpc_call_element* elem, + const grpc_call_element_args* args) { + new (elem->call_data) CallData(*args); return GRPC_ERROR_NONE; } -void DecompressDestroyCallElem(grpc_call_element* elem, - const grpc_call_final_info* /*final_info*/, - grpc_closure* /*ignored*/) { +static void DecompressDestroyCallElem( + grpc_call_element* elem, const grpc_call_final_info* /*final_info*/, + grpc_closure* /*ignored*/) { CallData* calld = static_cast(elem->call_data); calld->~CallData(); } -grpc_error* DecompressInitChannelElem(grpc_channel_element* elem, - grpc_channel_element_args* args) { - ChannelData* chand = static_cast(elem->channel_data); - new (chand) ChannelData(args); +static grpc_error* DecompressInitChannelElem( + grpc_channel_element* /*elem*/, grpc_channel_element_args* /*args*/) { return GRPC_ERROR_NONE; } -void DecompressDestroyChannelElem(grpc_channel_element* elem) { - ChannelData* chand = static_cast(elem->channel_data); - chand->~ChannelData(); -} +void DecompressDestroyChannelElem(grpc_channel_element* /*elem*/) {} } // namespace -const grpc_channel_filter MessageDecompressFilter = { +const grpc_channel_filter grpc_message_decompress_filter = { DecompressStartTransportStreamOpBatch, grpc_channel_next_op, sizeof(CallData), DecompressInitCallElem, grpc_call_stack_ignore_set_pollset_or_pollset_set, DecompressDestroyCallElem, - sizeof(ChannelData), + 0, // sizeof(ChannelData) DecompressInitChannelElem, DecompressDestroyChannelElem, grpc_channel_next_get_info, "message_decompress"}; -} // namespace grpc_core diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.h b/src/core/ext/filters/http/message_compress/message_decompress_filter.h index f19a4ca0cbd..7d567bf08a2 100644 --- a/src/core/ext/filters/http/message_compress/message_decompress_filter.h +++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.h @@ -23,9 +23,7 @@ #include "src/core/lib/channel/channel_stack.h" -namespace grpc_core { -extern const grpc_channel_filter MessageDecompressFilter; -} // namespace grpc_core +extern const grpc_channel_filter grpc_message_decompress_filter; #endif /* GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_DECOMPRESS_FILTER_H \ */ diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 89fdab6fae8..d2ef5477636 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -45,25 +45,6 @@ namespace { size_t g_message_size_parser_index; } // namespace -// -// MessageSizeParsedConfig -// - -const MessageSizeParsedConfig* MessageSizeParsedConfig::GetFromCallContext( - const grpc_call_context_element* context) { - if (context == nullptr) return nullptr; - auto* svc_cfg_call_data = static_cast( - context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value); - if (svc_cfg_call_data == nullptr) return nullptr; - return static_cast( - svc_cfg_call_data->GetMethodParsedConfig( - MessageSizeParser::ParserIndex())); -} - -// -// MessageSizeParser -// - std::unique_ptr MessageSizeParser::ParsePerMethodParams(const Json& json, grpc_error** error) { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); @@ -116,26 +97,12 @@ void MessageSizeParser::Register() { } size_t MessageSizeParser::ParserIndex() { return g_message_size_parser_index; } - -int GetMaxRecvSizeFromChannelArgs(const grpc_channel_args* args) { - if (grpc_channel_args_want_minimal_stack(args)) return -1; - return grpc_channel_args_find_integer( - args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, - {GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, -1, INT_MAX}); -} - -int GetMaxSendSizeFromChannelArgs(const grpc_channel_args* args) { - if (grpc_channel_args_want_minimal_stack(args)) return -1; - return grpc_channel_args_find_integer( - args, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH, - {GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH, -1, INT_MAX}); -} - } // namespace grpc_core namespace { struct channel_data { grpc_core::MessageSizeParsedConfig::message_size_limits limits; + grpc_core::RefCountedPtr svc_cfg; }; struct call_data { @@ -151,8 +118,24 @@ struct call_data { // Note: Per-method config is only available on the client, so we // apply the max request size to the send limit and the max response // size to the receive limit. - const grpc_core::MessageSizeParsedConfig* limits = - grpc_core::MessageSizeParsedConfig::GetFromCallContext(args.context); + const grpc_core::MessageSizeParsedConfig* limits = nullptr; + grpc_core::ServiceConfigCallData* svc_cfg_call_data = nullptr; + if (args.context != nullptr) { + svc_cfg_call_data = static_cast( + args.context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value); + } + if (svc_cfg_call_data != nullptr) { + limits = static_cast( + svc_cfg_call_data->GetMethodParsedConfig( + grpc_core::MessageSizeParser::ParserIndex())); + } else if (chand.svc_cfg != nullptr) { + const auto* objs_vector = + chand.svc_cfg->GetMethodParsedConfigVector(args.path); + if (objs_vector != nullptr) { + limits = static_cast( + (*objs_vector)[grpc_core::MessageSizeParser::ParserIndex()].get()); + } + } if (limits != nullptr) { if (limits->limits().max_send_size >= 0 && (limits->limits().max_send_size < this->limits.max_send_size || @@ -305,11 +288,35 @@ static void message_size_destroy_call_elem( calld->~call_data(); } +static int default_size(const grpc_channel_args* args, + int without_minimal_stack) { + if (grpc_channel_args_want_minimal_stack(args)) { + return -1; + } + return without_minimal_stack; +} + grpc_core::MessageSizeParsedConfig::message_size_limits get_message_size_limits( const grpc_channel_args* channel_args) { grpc_core::MessageSizeParsedConfig::message_size_limits lim; - lim.max_send_size = grpc_core::GetMaxSendSizeFromChannelArgs(channel_args); - lim.max_recv_size = grpc_core::GetMaxRecvSizeFromChannelArgs(channel_args); + lim.max_send_size = + default_size(channel_args, GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH); + lim.max_recv_size = + default_size(channel_args, GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH); + for (size_t i = 0; i < channel_args->num_args; ++i) { + if (strcmp(channel_args->args[i].key, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH) == + 0) { + const grpc_integer_options options = {lim.max_send_size, -1, INT_MAX}; + lim.max_send_size = + grpc_channel_arg_get_integer(&channel_args->args[i], options); + } + if (strcmp(channel_args->args[i].key, + GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH) == 0) { + const grpc_integer_options options = {lim.max_recv_size, -1, INT_MAX}; + lim.max_recv_size = + grpc_channel_arg_get_integer(&channel_args->args[i], options); + } + } return lim; } @@ -320,6 +327,26 @@ static grpc_error* message_size_init_channel_elem( channel_data* chand = static_cast(elem->channel_data); new (chand) channel_data(); chand->limits = get_message_size_limits(args->channel_args); + // TODO(yashykt): We only need to read GRPC_ARG_SERVICE_CONFIG in the case of + // direct channels. (Service config is otherwise stored in the call_context by + // client_channel filter.) If we ever need a second filter that also needs to + // parse GRPC_ARG_SERVICE_CONFIG, we should refactor this code and add a + // separate filter that reads GRPC_ARG_SERVICE_CONFIG and saves the parsed + // config in the call_context. + const grpc_arg* channel_arg = + grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); + const char* service_config_str = grpc_channel_arg_get_string(channel_arg); + if (service_config_str != nullptr) { + grpc_error* service_config_error = GRPC_ERROR_NONE; + auto svc_cfg = grpc_core::ServiceConfig::Create(service_config_str, + &service_config_error); + if (service_config_error == GRPC_ERROR_NONE) { + chand->svc_cfg = std::move(svc_cfg); + } else { + gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); + } + GRPC_ERROR_UNREF(service_config_error); + } return GRPC_ERROR_NONE; } @@ -360,9 +387,6 @@ static bool maybe_add_message_size_filter(grpc_channel_stack_builder* builder, void* /*arg*/) { const grpc_channel_args* channel_args = grpc_channel_stack_builder_get_channel_arguments(builder); - if (grpc_channel_args_want_minimal_stack(channel_args)) { - return true; - } bool enable = false; grpc_core::MessageSizeParsedConfig::message_size_limits lim = get_message_size_limits(channel_args); diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h index ea0dd0266d0..132d7b2af0f 100644 --- a/src/core/ext/filters/message_size/message_size_filter.h +++ b/src/core/ext/filters/message_size/message_size_filter.h @@ -40,9 +40,6 @@ class MessageSizeParsedConfig : public ServiceConfigParser::ParsedConfig { const message_size_limits& limits() const { return limits_; } - static const MessageSizeParsedConfig* GetFromCallContext( - const grpc_call_context_element* context); - private: message_size_limits limits_; }; @@ -57,9 +54,6 @@ class MessageSizeParser : public ServiceConfigParser::Parser { static size_t ParserIndex(); }; -int GetMaxRecvSizeFromChannelArgs(const grpc_channel_args* args); -int GetMaxSendSizeFromChannelArgs(const grpc_channel_args* args); - } // namespace grpc_core #endif /* GRPC_CORE_EXT_FILTERS_MESSAGE_SIZE_MESSAGE_SIZE_FILTER_H */ diff --git a/src/core/plugin_registry/grpc_plugin_registry.cc b/src/core/plugin_registry/grpc_plugin_registry.cc index ef8b10df647..f1c3cbf4036 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_plugin_registry.cc @@ -64,8 +64,6 @@ void grpc_max_age_filter_init(void); void grpc_max_age_filter_shutdown(void); void grpc_message_size_filter_init(void); void grpc_message_size_filter_shutdown(void); -void grpc_service_config_channel_arg_filter_init(void); -void grpc_service_config_channel_arg_filter_shutdown(void); void grpc_client_authority_filter_init(void); void grpc_client_authority_filter_shutdown(void); void grpc_workaround_cronet_compression_filter_init(void); @@ -116,8 +114,6 @@ void grpc_register_built_in_plugins(void) { grpc_max_age_filter_shutdown); grpc_register_plugin(grpc_message_size_filter_init, grpc_message_size_filter_shutdown); - grpc_register_plugin(grpc_service_config_channel_arg_filter_init, - grpc_service_config_channel_arg_filter_shutdown); grpc_register_plugin(grpc_client_authority_filter_init, grpc_client_authority_filter_shutdown); grpc_register_plugin(grpc_workaround_cronet_compression_filter_init, diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc index 525fa108d81..de53f173294 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc @@ -64,8 +64,6 @@ void grpc_max_age_filter_init(void); void grpc_max_age_filter_shutdown(void); void grpc_message_size_filter_init(void); void grpc_message_size_filter_shutdown(void); -void grpc_service_config_channel_arg_filter_init(void); -void grpc_service_config_channel_arg_filter_shutdown(void); void grpc_client_authority_filter_init(void); void grpc_client_authority_filter_shutdown(void); void grpc_workaround_cronet_compression_filter_init(void); @@ -116,8 +114,6 @@ void grpc_register_built_in_plugins(void) { grpc_max_age_filter_shutdown); grpc_register_plugin(grpc_message_size_filter_init, grpc_message_size_filter_shutdown); - grpc_register_plugin(grpc_service_config_channel_arg_filter_init, - grpc_service_config_channel_arg_filter_shutdown); grpc_register_plugin(grpc_client_authority_filter_init, grpc_client_authority_filter_shutdown); grpc_register_plugin(grpc_workaround_cronet_compression_filter_init, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 7689ddedeba..a25f10239f6 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -71,7 +71,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', - 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc index 256cc982940..40e752a3d63 100644 --- a/test/core/end2end/tests/max_message_length.cc +++ b/test/core/end2end/tests/max_message_length.cc @@ -29,7 +29,6 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice_internal.h" -#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/transport/metadata.h" #include "test/core/end2end/cq_verifier.h" @@ -467,328 +466,6 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, grpc_byte_buffer_destroy(response_payload); grpc_byte_buffer_destroy(recv_payload); - grpc_call_unref(c); - if (s != nullptr) grpc_call_unref(s); - cq_verifier_destroy(cqv); - end_test(&f); - config.tear_down_data(&f); -} - -static grpc_metadata gzip_compression_override() { - grpc_metadata gzip_compression_override; - gzip_compression_override.key = GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST; - gzip_compression_override.value = grpc_slice_from_static_string("gzip"); - memset(&gzip_compression_override.internal_data, 0, - sizeof(gzip_compression_override.internal_data)); - return gzip_compression_override; -} - -// Test receive message limit with compressed request larger than the limit -static void test_max_receive_message_length_on_compressed_request( - grpc_end2end_test_config config, bool minimal_stack) { - gpr_log(GPR_INFO, - "test max receive message length on compressed request with " - "minimal_stack=%d", - minimal_stack); - grpc_end2end_test_fixture f; - grpc_call* c = nullptr; - grpc_call* s = nullptr; - cq_verifier* cqv; - grpc_op ops[6]; - grpc_op* op; - grpc_slice request_payload_slice = grpc_slice_malloc(1024); - memset(GRPC_SLICE_START_PTR(request_payload_slice), 'a', 1024); - grpc_byte_buffer* request_payload = - grpc_raw_byte_buffer_create(&request_payload_slice, 1); - grpc_byte_buffer* recv_payload = nullptr; - grpc_metadata_array initial_metadata_recv; - grpc_metadata_array trailing_metadata_recv; - grpc_metadata_array request_metadata_recv; - grpc_call_details call_details; - grpc_status_code status; - grpc_call_error error; - grpc_slice details, status_details; - int was_cancelled = 2; - - // Set limit via channel args. - grpc_arg arg[2]; - arg[0] = grpc_channel_arg_integer_create( - const_cast(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH), 5); - arg[1] = grpc_channel_arg_integer_create( - const_cast(GRPC_ARG_MINIMAL_STACK), minimal_stack); - grpc_channel_args* server_args = - grpc_channel_args_copy_and_add(nullptr, arg, 2); - - f = begin_test(config, "test_max_request_message_length", nullptr, - server_args); - { - grpc_core::ExecCtx exec_ctx; - grpc_channel_args_destroy(server_args); - } - cqv = cq_verifier_create(f.cq); - c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, - grpc_slice_from_static_string("/service/method"), - nullptr, gpr_inf_future(GPR_CLOCK_REALTIME), - nullptr); - GPR_ASSERT(c); - - grpc_metadata_array_init(&initial_metadata_recv); - grpc_metadata_array_init(&trailing_metadata_recv); - grpc_metadata_array_init(&request_metadata_recv); - grpc_call_details_init(&call_details); - - grpc_metadata compression_md = gzip_compression_override(); - memset(ops, 0, sizeof(ops)); - op = ops; - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 1; - op->data.send_initial_metadata.metadata = &compression_md; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message.send_message = request_payload; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; - op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; - op->data.recv_status_on_client.status = &status; - op->data.recv_status_on_client.status_details = &details; - op->flags = 0; - op->reserved = nullptr; - op++; - error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), - nullptr); - GPR_ASSERT(GRPC_CALL_OK == error); - - error = - grpc_server_request_call(f.server, &s, &call_details, - &request_metadata_recv, f.cq, f.cq, tag(101)); - GPR_ASSERT(GRPC_CALL_OK == error); - CQ_EXPECT_COMPLETION(cqv, tag(101), 1); - cq_verify(cqv); - - memset(ops, 0, sizeof(ops)); - op = ops; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message.recv_message = &recv_payload; - op->flags = 0; - op->reserved = nullptr; - op++; - if (minimal_stack) { - /* Expect the RPC to proceed normally for a minimal stack */ - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 0; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; - op->data.send_status_from_server.trailing_metadata_count = 0; - op->data.send_status_from_server.status = GRPC_STATUS_OK; - status_details = grpc_slice_from_static_string("xyz"); - op->data.send_status_from_server.status_details = &status_details; - op->flags = 0; - op->reserved = nullptr; - op++; - } - error = grpc_call_start_batch(s, ops, static_cast(op - ops), tag(102), - nullptr); - GPR_ASSERT(GRPC_CALL_OK == error); - - CQ_EXPECT_COMPLETION(cqv, tag(102), 1); - CQ_EXPECT_COMPLETION(cqv, tag(1), 1); - cq_verify(cqv); - - GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); - if (minimal_stack) { - /* We do not perform message size checks for minimal stack. */ - GPR_ASSERT(status == GRPC_STATUS_OK); - } else { - GPR_ASSERT(was_cancelled == 1); - GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED); - GPR_ASSERT(grpc_slice_str_cmp( - details, "Received message larger than max (29 vs. 5)") == - 0); - } - grpc_slice_unref(details); - grpc_slice_unref(request_payload_slice); - grpc_metadata_array_destroy(&initial_metadata_recv); - grpc_metadata_array_destroy(&trailing_metadata_recv); - grpc_metadata_array_destroy(&request_metadata_recv); - grpc_call_details_destroy(&call_details); - grpc_byte_buffer_destroy(request_payload); - grpc_byte_buffer_destroy(recv_payload); - grpc_call_unref(c); - if (s != nullptr) grpc_call_unref(s); - cq_verifier_destroy(cqv); - - end_test(&f); - config.tear_down_data(&f); -} - -// Test receive message limit with compressed response larger than the limit. -static void test_max_receive_message_length_on_compressed_response( - grpc_end2end_test_config config, bool minimal_stack) { - gpr_log(GPR_INFO, - "testing max receive message length on compressed response with " - "minimal_stack=%d", - minimal_stack); - grpc_end2end_test_fixture f; - grpc_call* c = nullptr; - grpc_call* s = nullptr; - cq_verifier* cqv; - grpc_op ops[6]; - grpc_op* op; - grpc_slice response_payload_slice = grpc_slice_malloc(1024); - memset(GRPC_SLICE_START_PTR(response_payload_slice), 'a', 1024); - grpc_byte_buffer* response_payload = - grpc_raw_byte_buffer_create(&response_payload_slice, 1); - grpc_byte_buffer* recv_payload = nullptr; - grpc_metadata_array initial_metadata_recv; - grpc_metadata_array trailing_metadata_recv; - grpc_metadata_array request_metadata_recv; - grpc_call_details call_details; - grpc_status_code status; - grpc_call_error error; - grpc_slice details; - int was_cancelled = 2; - - // Set limit via channel args. - grpc_arg arg[2]; - arg[0] = grpc_channel_arg_integer_create( - const_cast(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH), 5); - arg[1] = grpc_channel_arg_integer_create( - const_cast(GRPC_ARG_MINIMAL_STACK), minimal_stack); - grpc_channel_args* client_args = - grpc_channel_args_copy_and_add(nullptr, arg, 2); - - f = begin_test(config, "test_max_response_message_length", client_args, - nullptr); - { - grpc_core::ExecCtx exec_ctx; - grpc_channel_args_destroy(client_args); - } - cqv = cq_verifier_create(f.cq); - - c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, - grpc_slice_from_static_string("/service/method"), - nullptr, gpr_inf_future(GPR_CLOCK_REALTIME), - nullptr); - GPR_ASSERT(c); - - grpc_metadata_array_init(&initial_metadata_recv); - grpc_metadata_array_init(&trailing_metadata_recv); - grpc_metadata_array_init(&request_metadata_recv); - grpc_call_details_init(&call_details); - - memset(ops, 0, sizeof(ops)); - op = ops; - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 0; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_RECV_INITIAL_METADATA; - op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message.recv_message = &recv_payload; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; - op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; - op->data.recv_status_on_client.status = &status; - op->data.recv_status_on_client.status_details = &details; - op->flags = 0; - op->reserved = nullptr; - op++; - error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), - nullptr); - GPR_ASSERT(GRPC_CALL_OK == error); - - error = - grpc_server_request_call(f.server, &s, &call_details, - &request_metadata_recv, f.cq, f.cq, tag(101)); - GPR_ASSERT(GRPC_CALL_OK == error); - CQ_EXPECT_COMPLETION(cqv, tag(101), 1); - cq_verify(cqv); - - grpc_metadata compression_md = gzip_compression_override(); - memset(ops, 0, sizeof(ops)); - op = ops; - op->op = GRPC_OP_SEND_INITIAL_METADATA; - op->data.send_initial_metadata.count = 1; - op->data.send_initial_metadata.metadata = &compression_md; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message.send_message = response_payload; - op->flags = 0; - op->reserved = nullptr; - op++; - op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; - op->data.send_status_from_server.trailing_metadata_count = 0; - op->data.send_status_from_server.status = GRPC_STATUS_OK; - grpc_slice status_details = grpc_slice_from_static_string("xyz"); - op->data.send_status_from_server.status_details = &status_details; - op->flags = 0; - op->reserved = nullptr; - op++; - error = grpc_call_start_batch(s, ops, static_cast(op - ops), tag(102), - nullptr); - GPR_ASSERT(GRPC_CALL_OK == error); - - CQ_EXPECT_COMPLETION(cqv, tag(102), 1); - CQ_EXPECT_COMPLETION(cqv, tag(1), 1); - cq_verify(cqv); - - GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); - if (minimal_stack) { - /* We do not perform message size checks for minimal stack. */ - GPR_ASSERT(status == GRPC_STATUS_OK); - } else { - GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED); - GPR_ASSERT(grpc_slice_str_cmp( - details, "Received message larger than max (29 vs. 5)") == - 0); - } - grpc_slice_unref(details); - grpc_slice_unref(response_payload_slice); - grpc_metadata_array_destroy(&initial_metadata_recv); - grpc_metadata_array_destroy(&trailing_metadata_recv); - grpc_metadata_array_destroy(&request_metadata_recv); - grpc_call_details_destroy(&call_details); - grpc_byte_buffer_destroy(response_payload); - grpc_byte_buffer_destroy(recv_payload); - grpc_call_unref(c); if (s != nullptr) grpc_call_unref(s); @@ -823,15 +500,6 @@ void max_message_length(grpc_end2end_test_config config) { test_max_message_length_on_response(config, false /* send_limit */, true /* use_service_config */, true /* use_string_json_value */); - /* The following tests are not useful for inproc transport and do not work - * with our simple proxy. */ - if (strcmp(config.name, "inproc") != 0 && - (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) == 0) { - test_max_receive_message_length_on_compressed_request(config, false); - test_max_receive_message_length_on_compressed_request(config, true); - test_max_receive_message_length_on_compressed_response(config, false); - test_max_receive_message_length_on_compressed_response(config, true); - } } void max_message_length_pre_init(void) {} diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index b4a70272ea6..803ad38f1c5 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -529,10 +529,9 @@ static void BM_IsolatedFilter(benchmark::State& state) { grpc_call_final_info final_info; TestOp test_op_data; const int kArenaSize = 4096; - grpc_call_context_element context[GRPC_CONTEXT_COUNT] = {}; grpc_call_element_args call_args{call_stack, nullptr, - context, + nullptr, method, start_time, deadline, diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index d0828798b00..1a81817d3a9 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1165,7 +1165,6 @@ src/core/ext/filters/client_channel/server_address.h \ src/core/ext/filters/client_channel/service_config.cc \ src/core/ext/filters/client_channel/service_config.h \ src/core/ext/filters/client_channel/service_config_call_data.h \ -src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/service_config_parser.h \ src/core/ext/filters/client_channel/subchannel.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index d33ceb61599..a4443ebd080 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -965,7 +965,6 @@ src/core/ext/filters/client_channel/server_address.h \ src/core/ext/filters/client_channel/service_config.cc \ src/core/ext/filters/client_channel/service_config.h \ src/core/ext/filters/client_channel/service_config_call_data.h \ -src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/service_config_parser.h \ src/core/ext/filters/client_channel/subchannel.cc \ From 39103342cf4fc2d3694ee7618d668581439c08b0 Mon Sep 17 00:00:00 2001 From: Srini Polavarapu Date: Mon, 22 Jun 2020 18:55:24 -0700 Subject: [PATCH 111/239] v1.30.0 interop tests --- tools/interop_matrix/client_matrix.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index e38c1c77ee9..a37cf9d189f 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -105,6 +105,7 @@ LANG_RELEASE_MATRIX = { ('v1.25.0', ReleaseInfo()), ('v1.26.0', ReleaseInfo()), ('v1.27.3', ReleaseInfo()), + ('v1.30.0', ReleaseInfo()), ]), 'go': OrderedDict([ @@ -276,6 +277,7 @@ LANG_RELEASE_MATRIX = { ('v1.25.0', ReleaseInfo(runtimes=['python'])), ('v1.26.0', ReleaseInfo(runtimes=['python'])), ('v1.27.3', ReleaseInfo(runtimes=['python'])), + ('v1.30.0', ReleaseInfo(runtimes=['python'])), ]), 'node': OrderedDict([ @@ -334,6 +336,7 @@ LANG_RELEASE_MATRIX = { # go ahead and upload the docker image for new releases. ('v1.26.0', ReleaseInfo()), ('v1.27.3', ReleaseInfo()), + ('v1.30.0', ReleaseInfo()), ]), 'php': OrderedDict([ @@ -365,6 +368,7 @@ LANG_RELEASE_MATRIX = { ('v1.25.0', ReleaseInfo()), ('v1.26.0', ReleaseInfo()), ('v1.27.3', ReleaseInfo()), + ('v1.30.0', ReleaseInfo()), ]), 'csharp': OrderedDict([ @@ -401,5 +405,6 @@ LANG_RELEASE_MATRIX = { ('v1.25.0', ReleaseInfo()), ('v1.26.0', ReleaseInfo()), ('v1.27.3', ReleaseInfo()), + ('v1.30.0', ReleaseInfo()), ]), } From 91e44c21bca4d08e531a50a8c880fe1fbc1ee1f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Kr=C3=A4mer?= Date: Tue, 23 Jun 2020 09:22:32 +0200 Subject: [PATCH 112/239] Fix whitespaces --- .../build/_protobuf/Google.Protobuf.Tools.targets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets index fa1cf8f9673..fb7dc5fa03d 100644 --- a/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets +++ b/src/csharp/Grpc.Tools/build/_protobuf/Google.Protobuf.Tools.targets @@ -135,7 +135,7 @@ %(RelativeDir) - $(Protobuf_ProtoRoot) + $(Protobuf_ProtoRoot)
@@ -170,11 +170,11 @@ - - + + - + Date: Tue, 23 Jun 2020 10:08:57 -0700 Subject: [PATCH 113/239] Release dispatch queue on CFStreamHandle destroy --- src/core/lib/iomgr/cfstream_handle.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/lib/iomgr/cfstream_handle.cc b/src/core/lib/iomgr/cfstream_handle.cc index 7a78ccd8769..46914e5175a 100644 --- a/src/core/lib/iomgr/cfstream_handle.cc +++ b/src/core/lib/iomgr/cfstream_handle.cc @@ -156,6 +156,7 @@ CFStreamHandle::~CFStreamHandle() { open_event_.DestroyEvent(); read_event_.DestroyEvent(); write_event_.DestroyEvent(); + dispatch_release(dispatch_queue_); } void CFStreamHandle::NotifyOnOpen(grpc_closure* closure) { From 9c116d5c038ed383c719a9eda702ff928b85ff27 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Tue, 23 Jun 2020 10:53:44 -0700 Subject: [PATCH 114/239] Address David's comments. --- src/core/tsi/ssl_transport_security.cc | 11 +++++++---- test/core/handshake/client_ssl.cc | 4 +--- test/core/handshake/server_ssl_common.cc | 5 ++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 687d6337774..5ae1f75c19d 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1523,10 +1523,13 @@ static tsi_result ssl_handshaker_next( if (ssl_handshaker_get_result(impl) == TSI_HANDSHAKE_IN_PROGRESS) { *handshaker_result = nullptr; } else { - // In TLS 1.3, the ClientFinished or ServerFinished record may have - // (encrypted) application data appended to the end of the record. In TLS - // 1.2, this is explicitly disallowed by the RFC; application data will - // never be appended to a handshake record. + // In TLS 1.3, the client may send application data records in the same + // flight of messages as the record containing the ClientFinished message. + // In TLS 1.2, this is not allowed; both the client and server must complete + // the handshake before any application data may be sent. + // + // These application data records are removed from the BIO after the + // server-side handshake completes, and set to |unused_bytes|. unsigned char* unused_bytes = nullptr; size_t unused_bytes_size = 0; status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size); diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc index 3e7f5120c26..daeebee269c 100644 --- a/test/core/handshake/client_ssl.cc +++ b/test/core/handshake/client_ssl.cc @@ -161,9 +161,7 @@ static void server_thread(void* arg) { // Set the cipher list to match the one expressed in // src/core/tsi/ssl_transport_security.c. const char* cipher_list = - "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_" - "SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-" - "AES256-" + "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-" "SHA384:ECDHE-RSA-AES256-GCM-SHA384"; if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) { ERR_print_errors_fp(stderr); diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc index d1bc7b1a596..1493094e3c3 100644 --- a/test/core/handshake/server_ssl_common.cc +++ b/test/core/handshake/server_ssl_common.cc @@ -203,9 +203,8 @@ bool server_ssl_test(const char* alpn_list[], unsigned int alpn_list_len, // Set the cipher list to match the one expressed in // src/core/tsi/ssl_transport_security.c. const char* cipher_list = - "TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_" - "SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-" - "AES256-SHA384:ECDHE-RSA-AES256-GCM-SHA384"; + "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-" + "SHA384:ECDHE-RSA-AES256-GCM-SHA384"; if (!SSL_CTX_set_cipher_list(ctx, cipher_list)) { ERR_print_errors_fp(stderr); gpr_log(GPR_ERROR, "Couldn't set server cipher list."); From 9b66452f7c3638de1bf2a81652eba6d842db0a51 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Tue, 23 Jun 2020 11:41:38 -0700 Subject: [PATCH 115/239] Update PHP README.md --- src/php/README.md | 139 +++++++++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 64 deletions(-) diff --git a/src/php/README.md b/src/php/README.md index e3723cd2faf..0862ceac446 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -21,7 +21,7 @@ in 2020). ## Install the _grpc_ extension There are two ways to install the `grpc` extension. -* `pecl` +* Via `pecl` * Build from source ### Install from PECL @@ -33,11 +33,11 @@ $ [sudo] pecl install grpc or specific version ```sh -$ [sudo] pecl install grpc-1.25.0 +$ [sudo] pecl install grpc-1.30.0 ``` -Note: for users on CentOS/RHEL 6, unfortunately this step won’t work. -Please follow the instructions below to compile the PECL extension from source. +Please make sure your `gcc` version satisfies the minimum requirement as +specified [here](https://grpc.io/docs/languages/#official-support). ### Install on Windows @@ -47,7 +47,7 @@ You can download the pre-compiled `grpc.dll` extension from the PECL ### Build from source -Clone this repository at the [latest stable release tag](https://github.com/grpc/grpc/releases) +Clone this repository at the [latest stable release tag](https://github.com/grpc/grpc/releases). ```sh $ git clone -b RELEASE_TAG_HERE https://github.com/grpc/grpc @@ -94,10 +94,10 @@ extension=grpc.so In addition to the `grpc` extension, you will need to install the `grpc/grpc` composer package as well. Add this to your project's `composer.json` file. -``` - "require": { - "grpc/grpc": "v1.25.0" - } +```json + "require": { + "grpc/grpc": "~v1.30.0" + } ``` To run tests with generated stub code from `.proto` files, you will also @@ -127,32 +127,18 @@ the version of grpc inside package.xml file. The compatibility between the grpc and protobuf version is listed as table below: -grpc | protobuf ---- | --- -v1.0.0 | 3.0.0(GA) -v1.0.1 | 3.0.2 -v1.1.0 | 3.1.0 -v1.2.0 | 3.2.0 -v1.2.0 | 3.2.0 -v1.3.4 | 3.3.0 -v1.3.5 | 3.2.0 -v1.4.0 | 3.3.0 -v1.6.0 | 3.4.0 -v1.8.0 | 3.5.0 -v1.12.0 | 3.5.2 -v1.13.1 | 3.5.2 -v1.14.2 | 3.5.2 -v1.15.1 | 3.6.1 -v1.16.1 | 3.6.1 -v1.17.2 | 3.6.1 -v1.18.0 | 3.6.1 -v1.19.1 | 3.6.1 -v1.20.1 | 3.7.0 -v1.21.3 | 3.7.0 -v1.22.0 | 3.8.0 -v1.23.1 | 3.8.0 -v1.24.0 | 3.8.0 -v1.25.0 | 3.8.0 +grpc | protobuf | grpc | protobuf | grpc | protobuf +--- | --- | --- | --- | --- | --- +v1.0.0 | 3.0.0(GA) | v1.12.0 | 3.5.2 | v1.22.0 | 3.8.0 +v1.0.1 | 3.0.2 | v1.13.1 | 3.5.2 | v1.23.1 | 3.8.0 +v1.1.0 | 3.1.0 | v1.14.2 | 3.5.2 | v1.24.0 | 3.8.0 +v1.2.0 | 3.2.0 | v1.15.1 | 3.6.1 | v1.25.0 | 3.8.0 +v1.2.0 | 3.2.0 | v1.16.1 | 3.6.1 | v1.26.0 | 3.8.0 +v1.3.4 | 3.3.0 | v1.17.2 | 3.6.1 | v1.27.3 | 3.11.2 +v1.3.5 | 3.2.0 | v1.18.0 | 3.6.1 | v1.28.1 | 3.11.2 +v1.4.0 | 3.3.0 | v1.19.1 | 3.6.1 | v1.29.0 | 3.11.2 +v1.6.0 | 3.4.0 | v1.20.1 | 3.7.0 | v1.30.0 | 3.12.2 +v1.8.0 | 3.5.0 | v1.21.3 | 3.7.0 If `protoc` hasn't been installed, you can download the `protoc` binary from the protocol buffers @@ -190,6 +176,18 @@ $ git submodule update --init $ make grpc_php_plugin ``` +Alternatively, you can also build the `grpc_php_plugin` with `bazel` now: + +```sh +$ bazel build @com_google_protobuf//:protoc +$ bazel build src/compiler:grpc_php_plugin +``` + +The `protoc` binary will be found in +`bazel-bin/external/com_google_protobuf/protoc`. +The `grpc_php_plugin` binary will be found in +`bazel-bin/src/compiler/grpc_php_plugin`. + Plugin may use the new feature of the new protobuf version, thus please also make sure that the protobuf version installed is compatible with the grpc version you build this plugin. @@ -210,7 +208,7 @@ $ [sudo] pecl install protobuf or specific version ``` sh -$ [sudo] pecl install protobuf-3.8.0 +$ [sudo] pecl install protobuf-3.12.2 ``` And add this to your `php.ini` file: @@ -224,10 +222,10 @@ extension=protobuf.so Or require the `google/protobuf` composer package. Add this to your `composer.json` file: -``` - "require": { - "google/protobuf": "^v3.8.0" - } +```json + "require": { + "google/protobuf": "~v3.12.2" + } ``` ### Generate PHP classes from your service definition @@ -280,8 +278,8 @@ by the `./bin/generate_proto_php.sh` script. ### Run test server -Run a local server serving the math services. Please see [Node][] for how to -run an example server. +Run a local server serving the `Math` +[service](https://github.com/grpc/grpc/blob/master/src/proto/math/math.proto#L42). ```sh $ cd grpc/src/php/tests/generated_code @@ -312,7 +310,7 @@ end-to-end example. Here's how you can specify SSL credentials when creating your PHP client: -``` +```php $client = new Helloworld\GreeterClient('localhost:50051', [ 'credentials' => Grpc\ChannelCredentials::createSsl( file_get_contents('')) @@ -337,16 +335,27 @@ all possible values of the `grpc.grpc.trace` option, please check ``` grpc.grpc_verbosity=debug -grpc.grpc_trace=all,-timer_check +grpc.grpc_trace=all,-polling,-polling_api,-pollable_refcount,-timer,-timer_check grpc.log_filename=/var/log/grpc.log ``` +> Make sure the log file above is writable, by doing the following: +> ``` +> $ sudo touch /var/log/grpc.log +> $ sudo chmod 666 /var/log/grpc.log +> ``` +> Note: The log file does grow pretty quickly depending on how much logs are +> being printed out. Make sure you have other mechanisms (perhaps another +> cronjob) to zero out the log file from time to time, +> e.g. `cp /dev/null /var/log/grpc.log`, or turn these off when logs or tracing +> are not necessary for debugging purposes. + ### User agent string You can customize the user agent string for your gRPC PHP client by specifying this `grpc.primary_user_agent` option when constructing your PHP client: -``` +```php $client = new Helloworld\GreeterClient('localhost:50051', [ 'credentials' => Grpc\ChannelCredentials::createInsecure(), 'grpc.primary_user_agent' => 'my-user-agent-identifier', @@ -358,7 +367,7 @@ $client = new Helloworld\GreeterClient('localhost:50051', [ To change the default maximum message size, specify this `grpc.max_receive_message_length` option when constructing your PHP client: -``` +```php $client = new Helloworld\GreeterClient('localhost:50051', [ 'credentials' => Grpc\ChannelCredentials::createInsecure(), 'grpc.max_receive_message_length' => 8*1024*1024, @@ -369,26 +378,28 @@ $client = new Helloworld\GreeterClient('localhost:50051', [ You can customize the compression behavior on the client side, by specifying the following options when constructing your PHP client. +```php +$client = new Helloworld\GreeterClient('localhost:50051', [ + 'credentials' => Grpc\ChannelCredentials::createInsecure(), + 'grpc.default_compression_algorithm' => 2, + 'grpc.default_compression_level' => 2, +]); ``` -Possible values for grpc.default_compression_algorithm: -0 - No compression -1 - Compress with DEFLATE algorithm -2 - Compress with GZIP algorithm -3 - Stream compression with GZIP algorithm + +Possible values for `grpc.default_compression_algorithm`: + ``` +0: No compression +1: Compress with DEFLATE algorithm +2: Compress with GZIP algorithm +3: Stream compression with GZIP algorithm ``` -Possible values for grpc.default_compression_level: -0 - None -1 - Low level -2 - Medium level -3 - High level + +Possible values for `grpc.default_compression_level`: + ``` -Here's an example on how you can put them all together: +0: None +1: Low level +2: Medium level +3: High level ``` -$client = new Helloworld\GreeterClient('localhost:50051', [ - 'credentials' => Grpc\ChannelCredentials::createInsecure(), - 'grpc.default_compression_algorithm' => 2, - 'grpc.default_compression_level' => 2, -]); - -[Node]:https://github.com/grpc/grpc/tree/master/src/node/examples From 8f2361fcdaf66e5ca5ebe0676a00c275b723e18e Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 23 Jun 2020 12:03:40 -0700 Subject: [PATCH 116/239] Remove health_check_service_interface_impl from build files. --- Makefile | 681 +---------------------------------------------- gRPC-C++.podspec | 1 - 2 files changed, 2 insertions(+), 680 deletions(-) diff --git a/Makefile b/Makefile index fc77eab5550..33c470bc015 100644 --- a/Makefile +++ b/Makefile @@ -1307,8 +1307,6 @@ xds_bootstrap_test: $(BINDIR)/$(CONFIG)/xds_bootstrap_test xds_end2end_test: $(BINDIR)/$(CONFIG)/xds_end2end_test xds_interop_client: $(BINDIR)/$(CONFIG)/xds_interop_client xds_interop_server: $(BINDIR)/$(CONFIG)/xds_interop_server -boringssl_ssl_test: $(BINDIR)/$(CONFIG)/boringssl_ssl_test -boringssl_crypto_test: $(BINDIR)/$(CONFIG)/boringssl_crypto_test alts_credentials_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry client_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry hpack_parser_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry @@ -1366,7 +1364,7 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libares.a pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc @@ -1376,7 +1374,7 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc ifeq ($(EMBED_OPENSSL),true) -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libbenchmark.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libbenchmark.a else privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libbenchmark.a endif @@ -1666,8 +1664,6 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/xds_end2end_test \ $(BINDIR)/$(CONFIG)/xds_interop_client \ $(BINDIR)/$(CONFIG)/xds_interop_server \ - $(BINDIR)/$(CONFIG)/boringssl_ssl_test \ - $(BINDIR)/$(CONFIG)/boringssl_crypto_test \ $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry \ @@ -5849,362 +5845,7 @@ $(OBJDIR)/$(CONFIG)/src/cpp/server/channelz/channelz_service.o: $(GENDIR)/src/pr $(OBJDIR)/$(CONFIG)/src/cpp/server/channelz/channelz_service_plugin.o: $(GENDIR)/src/proto/grpc/channelz/channelz.pb.cc $(GENDIR)/src/proto/grpc/channelz/channelz.grpc.pb.cc -LIBBORINGSSL_SRC = \ - third_party/boringssl-with-bazel/err_data.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/a_utf8.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c \ - third_party/boringssl-with-bazel/src/crypto/asn1/time_support.c \ - third_party/boringssl-with-bazel/src/crypto/base64/base64.c \ - third_party/boringssl-with-bazel/src/crypto/bio/bio.c \ - third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c \ - third_party/boringssl-with-bazel/src/crypto/bio/connect.c \ - third_party/boringssl-with-bazel/src/crypto/bio/fd.c \ - third_party/boringssl-with-bazel/src/crypto/bio/file.c \ - third_party/boringssl-with-bazel/src/crypto/bio/hexdump.c \ - third_party/boringssl-with-bazel/src/crypto/bio/pair.c \ - third_party/boringssl-with-bazel/src/crypto/bio/printf.c \ - third_party/boringssl-with-bazel/src/crypto/bio/socket.c \ - third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c \ - third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/bn_extra/convert.c \ - third_party/boringssl-with-bazel/src/crypto/buf/buf.c \ - third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.c \ - third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c \ - third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c \ - third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c \ - third_party/boringssl-with-bazel/src/crypto/bytestring/unicode.c \ - third_party/boringssl-with-bazel/src/crypto/chacha/chacha.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesccm.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesctrhmac.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesgcmsiv.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_null.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc2.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc4.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c \ - third_party/boringssl-with-bazel/src/crypto/cmac/cmac.c \ - third_party/boringssl-with-bazel/src/crypto/conf/conf.c \ - third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-fuchsia.c \ - third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-linux.c \ - third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.c \ - third_party/boringssl-with-bazel/src/crypto/cpu-arm.c \ - third_party/boringssl-with-bazel/src/crypto/cpu-intel.c \ - third_party/boringssl-with-bazel/src/crypto/cpu-ppc64le.c \ - third_party/boringssl-with-bazel/src/crypto/crypto.c \ - third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c \ - third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c \ - third_party/boringssl-with-bazel/src/crypto/dh/check.c \ - third_party/boringssl-with-bazel/src/crypto/dh/dh.c \ - third_party/boringssl-with-bazel/src/crypto/dh/dh_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/dh/params.c \ - third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c \ - third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c \ - third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_derive.c \ - third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c \ - third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c \ - third_party/boringssl-with-bazel/src/crypto/ecdsa_extra/ecdsa_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/engine/engine.c \ - third_party/boringssl-with-bazel/src/crypto/err/err.c \ - third_party/boringssl-with-bazel/src/crypto/evp/digestsign.c \ - third_party/boringssl-with-bazel/src/crypto/evp/evp.c \ - third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/evp/evp_ctx.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_ec.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_ec_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_rsa.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_rsa_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_x25519.c \ - third_party/boringssl-with-bazel/src/crypto/evp/p_x25519_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.c \ - third_party/boringssl-with-bazel/src/crypto/evp/print.c \ - third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c \ - third_party/boringssl-with-bazel/src/crypto/evp/sign.c \ - third_party/boringssl-with-bazel/src/crypto/ex_data.c \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.c \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/is_fips.c \ - third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf.c \ - third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c \ - third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c \ - third_party/boringssl-with-bazel/src/crypto/mem.c \ - third_party/boringssl-with-bazel/src/crypto/obj/obj.c \ - third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.c \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.c \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.c \ - third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c \ - third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c \ - third_party/boringssl-with-bazel/src/crypto/pkcs8/p5_pbev2.c \ - third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.c \ - third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c \ - third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c \ - third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c \ - third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c \ - third_party/boringssl-with-bazel/src/crypto/pool/pool.c \ - third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c \ - third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c \ - third_party/boringssl-with-bazel/src/crypto/rand_extra/fuchsia.c \ - third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c \ - third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c \ - third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c \ - third_party/boringssl-with-bazel/src/crypto/refcount_c11.c \ - third_party/boringssl-with-bazel/src/crypto/refcount_lock.c \ - third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c \ - third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_print.c \ - third_party/boringssl-with-bazel/src/crypto/siphash/siphash.c \ - third_party/boringssl-with-bazel/src/crypto/stack/stack.c \ - third_party/boringssl-with-bazel/src/crypto/thread.c \ - third_party/boringssl-with-bazel/src/crypto/thread_none.c \ - third_party/boringssl-with-bazel/src/crypto/thread_pthread.c \ - third_party/boringssl-with-bazel/src/crypto/thread_win.c \ - third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c \ - third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c \ - third_party/boringssl-with-bazel/src/crypto/x509/a_digest.c \ - third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c \ - third_party/boringssl-with-bazel/src/crypto/x509/a_strex.c \ - third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c \ - third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c \ - third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c \ - third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c \ - third_party/boringssl-with-bazel/src/crypto/x509/by_file.c \ - third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.c \ - third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c \ - third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c \ - third_party/boringssl-with-bazel/src/crypto/x509/t_req.c \ - third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c \ - third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_def.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_r2x.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509name.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x509spki.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_all.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_info.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_name.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_pkey.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_req.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_spki.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_val.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c \ - third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_lib.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_node.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akeya.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bcons.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_extku.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_int.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ocsp.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcia.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcons.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pku.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pmaps.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_sxnet.c \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c \ - third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc \ - third_party/boringssl-with-bazel/src/ssl/d1_both.cc \ - third_party/boringssl-with-bazel/src/ssl/d1_lib.cc \ - third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc \ - third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc \ - third_party/boringssl-with-bazel/src/ssl/dtls_method.cc \ - third_party/boringssl-with-bazel/src/ssl/dtls_record.cc \ - third_party/boringssl-with-bazel/src/ssl/handoff.cc \ - third_party/boringssl-with-bazel/src/ssl/handshake.cc \ - third_party/boringssl-with-bazel/src/ssl/handshake_client.cc \ - third_party/boringssl-with-bazel/src/ssl/handshake_server.cc \ - third_party/boringssl-with-bazel/src/ssl/s3_both.cc \ - third_party/boringssl-with-bazel/src/ssl/s3_lib.cc \ - third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_file.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_session.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc \ - third_party/boringssl-with-bazel/src/ssl/t1_enc.cc \ - third_party/boringssl-with-bazel/src/ssl/t1_lib.cc \ - third_party/boringssl-with-bazel/src/ssl/tls13_both.cc \ - third_party/boringssl-with-bazel/src/ssl/tls13_client.cc \ - third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc \ - third_party/boringssl-with-bazel/src/ssl/tls13_server.cc \ - third_party/boringssl-with-bazel/src/ssl/tls_method.cc \ - third_party/boringssl-with-bazel/src/ssl/tls_record.cc \ - -PUBLIC_HEADERS_C += \ - -LIBBORINGSSL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_SRC)))) - -$(LIBBORINGSSL_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_OBJS): CXXFLAGS += -fno-exceptions -$(LIBBORINGSSL_OBJS): CFLAGS += -g - -$(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBBORINGSSL_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libboringssl.a $(LIBBORINGSSL_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl.a -endif - - - - -ifneq ($(NO_DEPS),true) --include $(LIBBORINGSSL_OBJS:.o=.dep) -endif - - -LIBBORINGSSL_TEST_UTIL_SRC = \ - third_party/boringssl-with-bazel/src/crypto/test/file_test.cc \ - third_party/boringssl-with-bazel/src/crypto/test/malloc.cc \ - third_party/boringssl-with-bazel/src/crypto/test/test_util.cc \ - third_party/boringssl-with-bazel/src/crypto/test/wycheproof_util.cc \ - -PUBLIC_HEADERS_CXX += \ - -LIBBORINGSSL_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_TEST_UTIL_SRC)))) - -$(LIBBORINGSSL_TEST_UTIL_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_TEST_UTIL_OBJS): CXXFLAGS += -fno-exceptions -$(LIBBORINGSSL_TEST_UTIL_OBJS): CFLAGS += -g - -ifeq ($(NO_PROTOBUF),true) - -# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. - -$(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: protobuf_dep_error - - -else - -$(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_TEST_UTIL_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBBORINGSSL_TEST_UTIL_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a -endif - - - - -endif - -ifneq ($(NO_DEPS),true) --include $(LIBBORINGSSL_TEST_UTIL_OBJS:.o=.dep) -endif - - LIBBENCHMARK_SRC = \ - third_party/benchmark/src/benchmark.cc \ - third_party/benchmark/src/benchmark_api_internal.cc \ - third_party/benchmark/src/benchmark_main.cc \ - third_party/benchmark/src/benchmark_name.cc \ - third_party/benchmark/src/benchmark_register.cc \ - third_party/benchmark/src/benchmark_runner.cc \ - third_party/benchmark/src/colorprint.cc \ - third_party/benchmark/src/commandlineflags.cc \ - third_party/benchmark/src/complexity.cc \ - third_party/benchmark/src/console_reporter.cc \ - third_party/benchmark/src/counter.cc \ - third_party/benchmark/src/csv_reporter.cc \ - third_party/benchmark/src/json_reporter.cc \ - third_party/benchmark/src/reporter.cc \ - third_party/benchmark/src/sleep.cc \ - third_party/benchmark/src/statistics.cc \ - third_party/benchmark/src/string_util.cc \ - third_party/benchmark/src/sysinfo.cc \ - third_party/benchmark/src/timers.cc \ PUBLIC_HEADERS_CXX += \ @@ -6287,46 +5928,6 @@ ifneq ($(NO_DEPS),true) endif -LIBZ_SRC = \ - third_party/zlib/adler32.c \ - third_party/zlib/compress.c \ - third_party/zlib/crc32.c \ - third_party/zlib/deflate.c \ - third_party/zlib/gzclose.c \ - third_party/zlib/gzlib.c \ - third_party/zlib/gzread.c \ - third_party/zlib/gzwrite.c \ - third_party/zlib/infback.c \ - third_party/zlib/inffast.c \ - third_party/zlib/inflate.c \ - third_party/zlib/inftrees.c \ - third_party/zlib/trees.c \ - third_party/zlib/uncompr.c \ - third_party/zlib/zutil.c \ - -PUBLIC_HEADERS_C += \ - -LIBZ_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBZ_SRC)))) - -$(LIBZ_OBJS): CFLAGS += -fvisibility=hidden - -$(LIBDIR)/$(CONFIG)/libz.a: $(LIBZ_OBJS) - $(E) "[AR] Creating $@" - $(Q) mkdir -p `dirname $@` - $(Q) rm -f $(LIBDIR)/$(CONFIG)/libz.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libz.a $(LIBZ_OBJS) -ifeq ($(SYSTEM),Darwin) - $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libz.a -endif - - - - -ifneq ($(NO_DEPS),true) --include $(LIBZ_OBJS:.o=.dep) -endif - - LIBARES_SRC = \ third_party/cares/cares/ares__close_sockets.c \ third_party/cares/cares/ares__get_hostent.c \ @@ -19143,284 +18744,6 @@ endif $(OBJDIR)/$(CONFIG)/test/cpp/interop/xds_interop_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc -BORINGSSL_SSL_TEST_SRC = \ - third_party/boringssl-with-bazel/src/crypto/test/abi_test.cc \ - third_party/boringssl-with-bazel/src/crypto/test/gtest_main.cc \ - third_party/boringssl-with-bazel/src/ssl/span_test.cc \ - third_party/boringssl-with-bazel/src/ssl/ssl_c_test.c \ - third_party/boringssl-with-bazel/src/ssl/ssl_test.cc \ - -BORINGSSL_SSL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BORINGSSL_SSL_TEST_SRC)))) - -# boringssl needs an override to ensure that it does not include -# system openssl headers regardless of other configuration -# we do so here with a target specific variable assignment -$(BORINGSSL_SSL_TEST_OBJS): CFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) -$(BORINGSSL_SSL_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CXXFLAGS) -$(BORINGSSL_SSL_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE - - -ifeq ($(NO_PROTOBUF),true) - -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. - -$(BINDIR)/$(CONFIG)/boringssl_ssl_test: protobuf_dep_error - -else - -$(BINDIR)/$(CONFIG)/boringssl_ssl_test: $(PROTOBUF_DEP) $(BORINGSSL_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BORINGSSL_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/boringssl_ssl_test - -endif - -$(BORINGSSL_SSL_TEST_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(BORINGSSL_SSL_TEST_OBJS): CXXFLAGS += -fno-exceptions -$(BORINGSSL_SSL_TEST_OBJS): CFLAGS += -g -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/abi_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/gtest_main.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/ssl/span_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/ssl/ssl_c_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/ssl/ssl_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -deps_boringssl_ssl_test: $(BORINGSSL_SSL_TEST_OBJS:.o=.dep) - -ifneq ($(NO_DEPS),true) --include $(BORINGSSL_SSL_TEST_OBJS:.o=.dep) -endif - - -BORINGSSL_CRYPTO_TEST_SRC = \ - third_party/boringssl-with-bazel/crypto_test_data.cc \ - third_party/boringssl-with-bazel/src/crypto/abi_self_test.cc \ - third_party/boringssl-with-bazel/src/crypto/asn1/asn1_test.cc \ - third_party/boringssl-with-bazel/src/crypto/base64/base64_test.cc \ - third_party/boringssl-with-bazel/src/crypto/bio/bio_test.cc \ - third_party/boringssl-with-bazel/src/crypto/buf/buf_test.cc \ - third_party/boringssl-with-bazel/src/crypto/bytestring/bytestring_test.cc \ - third_party/boringssl-with-bazel/src/crypto/chacha/chacha_test.cc \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/aead_test.cc \ - third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_test.cc \ - third_party/boringssl-with-bazel/src/crypto/cmac/cmac_test.cc \ - third_party/boringssl-with-bazel/src/crypto/compiler_test.cc \ - third_party/boringssl-with-bazel/src/crypto/constant_time_test.cc \ - third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux_test.cc \ - third_party/boringssl-with-bazel/src/crypto/curve25519/ed25519_test.cc \ - third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519_test.cc \ - third_party/boringssl-with-bazel/src/crypto/curve25519/x25519_test.cc \ - third_party/boringssl-with-bazel/src/crypto/dh/dh_test.cc \ - third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_test.cc \ - third_party/boringssl-with-bazel/src/crypto/dsa/dsa_test.cc \ - third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_test.cc \ - third_party/boringssl-with-bazel/src/crypto/err/err_test.cc \ - third_party/boringssl-with-bazel/src/crypto/evp/evp_extra_test.cc \ - third_party/boringssl-with-bazel/src/crypto/evp/evp_test.cc \ - third_party/boringssl-with-bazel/src/crypto/evp/pbkdf_test.cc \ - third_party/boringssl-with-bazel/src/crypto/evp/scrypt_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect_test.cc \ - third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha_test.cc \ - third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf_test.cc \ - third_party/boringssl-with-bazel/src/crypto/hmac_extra/hmac_test.cc \ - third_party/boringssl-with-bazel/src/crypto/hrss/hrss_test.cc \ - third_party/boringssl-with-bazel/src/crypto/impl_dispatch_test.cc \ - third_party/boringssl-with-bazel/src/crypto/lhash/lhash_test.cc \ - third_party/boringssl-with-bazel/src/crypto/obj/obj_test.cc \ - third_party/boringssl-with-bazel/src/crypto/pem/pem_test.cc \ - third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_test.cc \ - third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs12_test.cc \ - third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_test.cc \ - third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_test.cc \ - third_party/boringssl-with-bazel/src/crypto/pool/pool_test.cc \ - third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_test.cc \ - third_party/boringssl-with-bazel/src/crypto/refcount_test.cc \ - third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_test.cc \ - third_party/boringssl-with-bazel/src/crypto/self_test.cc \ - third_party/boringssl-with-bazel/src/crypto/siphash/siphash_test.cc \ - third_party/boringssl-with-bazel/src/crypto/stack/stack_test.cc \ - third_party/boringssl-with-bazel/src/crypto/test/abi_test.cc \ - third_party/boringssl-with-bazel/src/crypto/test/file_test_gtest.cc \ - third_party/boringssl-with-bazel/src/crypto/test/gtest_main.cc \ - third_party/boringssl-with-bazel/src/crypto/thread_test.cc \ - third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token_test.cc \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_test.cc \ - third_party/boringssl-with-bazel/src/crypto/x509/x509_time_test.cc \ - third_party/boringssl-with-bazel/src/crypto/x509v3/tab_test.cc \ - third_party/boringssl-with-bazel/src/crypto/x509v3/v3name_test.cc \ - -BORINGSSL_CRYPTO_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BORINGSSL_CRYPTO_TEST_SRC)))) - -# boringssl needs an override to ensure that it does not include -# system openssl headers regardless of other configuration -# we do so here with a target specific variable assignment -$(BORINGSSL_CRYPTO_TEST_OBJS): CFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) -$(BORINGSSL_CRYPTO_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CXXFLAGS) -$(BORINGSSL_CRYPTO_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE - - -ifeq ($(NO_PROTOBUF),true) - -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. - -$(BINDIR)/$(CONFIG)/boringssl_crypto_test: protobuf_dep_error - -else - -$(BINDIR)/$(CONFIG)/boringssl_crypto_test: $(PROTOBUF_DEP) $(BORINGSSL_CRYPTO_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(BORINGSSL_CRYPTO_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/boringssl_crypto_test - -endif - -$(BORINGSSL_CRYPTO_TEST_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(BORINGSSL_CRYPTO_TEST_OBJS): CXXFLAGS += -fno-exceptions -$(BORINGSSL_CRYPTO_TEST_OBJS): CFLAGS += -g -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/crypto_test_data.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/abi_self_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/base64/base64_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/bio/bio_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/buf/buf_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/bytestring/bytestring_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/chacha/chacha_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/cipher_extra/aead_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/cmac/cmac_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/compiler_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/constant_time_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/curve25519/ed25519_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/curve25519/x25519_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/dh/dh_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/err/err_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/evp/evp_extra_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/evp/evp_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/evp/pbkdf_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/evp/scrypt_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/hmac_extra/hmac_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/hrss/hrss_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/impl_dispatch_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/lhash/lhash_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/obj/obj_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pem/pem_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs12_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pool/pool_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/refcount_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/self_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/siphash/siphash_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/stack/stack_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/abi_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/file_test_gtest.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/gtest_main.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/thread_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/x509/x509_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/x509/x509_time_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/x509v3/tab_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/x509v3/v3name_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a - -deps_boringssl_crypto_test: $(BORINGSSL_CRYPTO_TEST_OBJS:.o=.dep) - -ifneq ($(NO_DEPS),true) --include $(BORINGSSL_CRYPTO_TEST_OBJS:.o=.dep) -endif - - ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_SRC = \ test/core/security/alts_credentials_fuzzer.cc \ test/core/util/one_corpus_entry_fuzzer.cc \ diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index f34c2cb79a7..b72fbcef2aa 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -93,7 +93,6 @@ Pod::Spec.new do |s| 'include/grpcpp/generic/generic_stub_impl.h', 'include/grpcpp/grpcpp.h', 'include/grpcpp/health_check_service_interface.h', - 'include/grpcpp/health_check_service_interface_impl.h', 'include/grpcpp/impl/call.h', 'include/grpcpp/impl/channel_argument_option.h', 'include/grpcpp/impl/client_unary_call.h', From 8e5d8e64d34ab9a9b08f086d3b7eda757bd88ffb Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 23 Jun 2020 12:07:17 -0700 Subject: [PATCH 117/239] Fix formatting --- include/grpcpp/server_builder.h | 3 +-- src/cpp/server/server_builder.cc | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 4b7ffa16cc4..7600420cb49 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -261,8 +261,7 @@ class ServerBuilder { /// experimental. class experimental_type { public: - explicit experimental_type(ServerBuilder* builder) - : builder_(builder) {} + explicit experimental_type(ServerBuilder* builder) : builder_(builder) {} void SetInterceptorCreators( std::vector creds, int* selected_port) { + const grpc::string& addr_uri, std::shared_ptr creds, + int* selected_port) { const grpc::string uri_scheme = "dns:"; grpc::string addr = addr_uri; if (addr_uri.compare(0, uri_scheme.size(), uri_scheme) == 0) { From 8bcffaa5ca359b0749d48517e51e9dda58692f69 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 23 Jun 2020 12:10:18 -0700 Subject: [PATCH 118/239] Hide init_grpc_aio and guard async API outside of AsyncIO context --- doc/python/sphinx/grpc_asyncio.rst | 25 ++++------ .../_cygrpc/aio/completion_queue.pyx.pxi | 8 +++- .../_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi | 2 +- .../_cygrpc/aio/iomgr/resolver.pyx.pxi | 2 +- .../_cython/_cygrpc/aio/iomgr/socket.pyx.pxi | 2 +- .../_cython/_cygrpc/aio/iomgr/timer.pyx.pxi | 2 +- .../grpcio/grpc/experimental/aio/_channel.py | 2 +- .../grpcio/grpc/experimental/aio/_server.py | 2 +- .../grpcio_tests/tests_aio/unit/_test_base.py | 3 -- .../tests_aio/unit/outside_init_test.py | 46 +++++++++++++++++++ 10 files changed, 67 insertions(+), 27 deletions(-) create mode 100644 src/python/grpcio_tests/tests_aio/unit/outside_init_test.py diff --git a/doc/python/sphinx/grpc_asyncio.rst b/doc/python/sphinx/grpc_asyncio.rst index 16267d94433..3513f16f036 100644 --- a/doc/python/sphinx/grpc_asyncio.rst +++ b/doc/python/sphinx/grpc_asyncio.rst @@ -24,27 +24,20 @@ gRPC Async API objects may only be used on the thread on which they were created. AsyncIO doesn't provide thread safety for most of its APIs. -Module Contents ---------------- - Enable AsyncIO in gRPC -^^^^^^^^^^^^^^^^^^^^^^ +---------------------- -.. function:: init_grpc_aio +Enable AsyncIO in gRPC Python is automatic when instantiating gRPC AsyncIO +objects (e.g., channels and servers). No additional function invocation is +required. - Enable AsyncIO for gRPC Python. +Making blocking function calls in coroutines or in the thread running event +loop will block the event loop, potentially starving all RPCs in the process. +Refer to the Python language documentation on AsyncIO for more details (`running-blocking-code `_). - This function is idempotent and it should be invoked before creation of - AsyncIO stack objects. Otherwise, the application might deadlock. - This function configurates the gRPC C-Core to invoke AsyncIO methods for IO - operations (e.g., socket read, write). The configuration applies to the - entire process. - - After invoking this function, making blocking function calls in coroutines - or in the thread running event loop will block the event loop, potentially - starving all RPCs in the process. Refer to the Python language - documentation on AsyncIO for more details (`running-blocking-code `_). +Module Contents +--------------- Create Channel diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi index f42929461a0..fbc6e999608 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi @@ -41,7 +41,11 @@ cdef class BaseCompletionQueue: cdef class PollerCompletionQueue(BaseCompletionQueue): def __cinit__(self): - self._loop = asyncio.get_event_loop() + # NOTE(lidiz) Due to a defect of asyncio.get_event_loop, its returned + # event loop might not be set as the default event loop for the main + # thread. So, asyncio.get_running_loop() is needed to ensure the poller + # is bound to a working event loop. + self._loop = asyncio.get_running_loop() self._cq = grpc_completion_queue_create_for_next(NULL) self._shutdown = False self._poller_thread = threading.Thread(target=self._poll_wrapper, daemon=True) @@ -119,7 +123,7 @@ cdef class PollerCompletionQueue(BaseCompletionQueue): cdef class CallbackCompletionQueue(BaseCompletionQueue): def __cinit__(self): - self._loop = asyncio.get_event_loop() + self._loop = asyncio.get_running_loop() self._shutdown_completed = self._loop.create_future() self._wrapper = CallbackWrapper( self._shutdown_completed, diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi index 65ec0c8f202..b845e4d1e8c 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi @@ -216,7 +216,7 @@ def _auth_plugin_callback_wrapper(object cb, str service_url, str method_name, object callback): - asyncio.get_event_loop().call_soon(cb, service_url, method_name, callback) + asyncio.get_running_loop().call_soon(cb, service_url, method_name, callback) def install_asyncio_iomgr(): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/resolver.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/resolver.pyx.pxi index 3e664245aac..812b5168d9f 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/resolver.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/resolver.pyx.pxi @@ -15,7 +15,7 @@ cdef class _AsyncioResolver: def __cinit__(self): - self._loop = asyncio.get_event_loop() + self._loop = asyncio.get_running_loop() self._grpc_resolver = NULL self._task_resolve = None diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi index 7524e9da94b..ad8b3d93fc1 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi @@ -37,7 +37,7 @@ cdef class _AsyncioSocket: self._py_socket = None self._peername = None self._closed = False - self._loop = asyncio.get_event_loop() + self._loop = asyncio.get_running_loop() @staticmethod cdef _AsyncioSocket create(grpc_custom_socket * grpc_socket, diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/timer.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/timer.pyx.pxi index 286cd9a9d43..77769c91e87 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/timer.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/timer.pyx.pxi @@ -18,7 +18,7 @@ cdef class _AsyncioTimer: self._grpc_timer = NULL self._timer_future = None self._active = False - self._loop = asyncio.get_event_loop() + self._loop = asyncio.get_running_loop() cpython.Py_INCREF(self) @staticmethod diff --git a/src/python/grpcio/grpc/experimental/aio/_channel.py b/src/python/grpcio/grpc/experimental/aio/_channel.py index 1995db13bf5..5fcfcb637e2 100644 --- a/src/python/grpcio/grpc/experimental/aio/_channel.py +++ b/src/python/grpcio/grpc/experimental/aio/_channel.py @@ -269,7 +269,7 @@ class Channel(_base_channel.Channel): "{} or ".format(StreamUnaryClientInterceptor.__name__) + "{}. ".format(StreamStreamClientInterceptor.__name__)) - self._loop = asyncio.get_event_loop() + self._loop = asyncio.get_running_loop() self._channel = cygrpc.AioChannel( _common.encode(target), _augment_channel_arguments(options, compression), credentials, diff --git a/src/python/grpcio/grpc/experimental/aio/_server.py b/src/python/grpcio/grpc/experimental/aio/_server.py index 81438891268..2a2b846de20 100644 --- a/src/python/grpcio/grpc/experimental/aio/_server.py +++ b/src/python/grpcio/grpc/experimental/aio/_server.py @@ -41,7 +41,7 @@ class Server(_base_server.Server): options: ChannelArgumentType, maximum_concurrent_rpcs: Optional[int], compression: Optional[grpc.Compression]): - self._loop = asyncio.get_event_loop() + self._loop = asyncio.get_running_loop() if interceptors: invalid_interceptors = [ interceptor for interceptor in interceptors diff --git a/src/python/grpcio_tests/tests_aio/unit/_test_base.py b/src/python/grpcio_tests/tests_aio/unit/_test_base.py index 82ec7b456ad..ec5f2112da0 100644 --- a/src/python/grpcio_tests/tests_aio/unit/_test_base.py +++ b/src/python/grpcio_tests/tests_aio/unit/_test_base.py @@ -64,6 +64,3 @@ class AioTestBase(unittest.TestCase): return _async_to_sync_decorator(attr, self._TEST_LOOP) # For other attributes, let them pass. return attr - - -aio.init_grpc_aio() diff --git a/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py b/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py new file mode 100644 index 00000000000..aa028fe9adb --- /dev/null +++ b/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py @@ -0,0 +1,46 @@ +# Copyright 2020 The gRPC Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Tests behavior around the metadata mechanism.""" + +import asyncio +import logging +import unittest +from grpc.experimental import aio +import grpc + + +class TestOutsideInit(unittest.TestCase): + + def test_behavior_outside_asyncio(self): + # Ensures non-AsyncIO object can be initiated + channel_creds = grpc.ssl_channel_credentials() + + # Ensures AsyncIO API NOT working outside of AsyncIO + with self.assertRaises(RuntimeError): + aio.insecure_channel('') + + with self.assertRaises(RuntimeError): + aio.secure_channel('', channel_creds) + + with self.assertRaises(RuntimeError): + aio.server('', None) + + # Ensures init_grpc_aio fail outside of AsyncIO + with self.assertRaises(RuntimeError): + aio.init_grpc_aio() + + +if __name__ == "__main__": + logging.basicConfig(level=logging.DEBUG) + unittest.main(verbosity=2) From 019921f57ab8bc4594ad95cb7be3858b2e9d180c Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 23 Jun 2020 12:11:57 -0700 Subject: [PATCH 119/239] Add the new test to tests.json --- src/python/grpcio_tests/tests_aio/tests.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python/grpcio_tests/tests_aio/tests.json b/src/python/grpcio_tests/tests_aio/tests.json index 37aa427dacf..dbcdf304372 100644 --- a/src/python/grpcio_tests/tests_aio/tests.json +++ b/src/python/grpcio_tests/tests_aio/tests.json @@ -30,6 +30,7 @@ "unit.done_callback_test.TestDoneCallback", "unit.init_test.TestChannel", "unit.metadata_test.TestMetadata", + "unit.outside_init_test.TestOutsideInit", "unit.secure_call_test.TestStreamStreamSecureCall", "unit.secure_call_test.TestUnaryStreamSecureCall", "unit.secure_call_test.TestUnaryUnarySecureCall", From 6717ecb3cbee8ab17311e05717ffa9b422c55fbf Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 23 Jun 2020 12:12:51 -0700 Subject: [PATCH 120/239] Suppress the server dealloc warning --- src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi index 63dbfdd75c0..f69100f5a56 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi @@ -990,7 +990,7 @@ cdef class AioServer: # TODO(lidiz) if users create server, and then dealloc it immediately. # There is a potential memory leak of created Core server. if self._status != AIO_SERVER_STATUS_STOPPED: - _LOGGER.warning( + _LOGGER.debug( '__dealloc__ called on running server %s with status %d', self, self._status From 304da6da33f19c4f915dcbc3275850c008ca6be9 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 23 Jun 2020 12:15:49 -0700 Subject: [PATCH 121/239] Fix Makefile --- Makefile | 681 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 679 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8e8464314d8..70f839ef866 100644 --- a/Makefile +++ b/Makefile @@ -1307,6 +1307,8 @@ xds_bootstrap_test: $(BINDIR)/$(CONFIG)/xds_bootstrap_test xds_end2end_test: $(BINDIR)/$(CONFIG)/xds_end2end_test xds_interop_client: $(BINDIR)/$(CONFIG)/xds_interop_client xds_interop_server: $(BINDIR)/$(CONFIG)/xds_interop_server +boringssl_ssl_test: $(BINDIR)/$(CONFIG)/boringssl_ssl_test +boringssl_crypto_test: $(BINDIR)/$(CONFIG)/boringssl_crypto_test alts_credentials_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry client_fuzzer_one_entry: $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry hpack_parser_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry @@ -1364,7 +1366,7 @@ plugins: $(PROTOC_PLUGINS) privatelibs: privatelibs_c privatelibs_cxx -privatelibs_c: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libares.a +privatelibs_c: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libz.a $(LIBDIR)/$(CONFIG)/libares.a pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(LIBDIR)/$(CONFIG)/pkgconfig/gpr.pc @@ -1374,7 +1376,7 @@ pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc ifeq ($(EMBED_OPENSSL),true) -privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libbenchmark.a +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libbenchmark.a else privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libbenchmark.a endif @@ -1664,6 +1666,8 @@ buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/xds_end2end_test \ $(BINDIR)/$(CONFIG)/xds_interop_client \ $(BINDIR)/$(CONFIG)/xds_interop_server \ + $(BINDIR)/$(CONFIG)/boringssl_ssl_test \ + $(BINDIR)/$(CONFIG)/boringssl_crypto_test \ $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry \ @@ -5841,7 +5845,362 @@ $(OBJDIR)/$(CONFIG)/src/cpp/server/channelz/channelz_service.o: $(GENDIR)/src/pr $(OBJDIR)/$(CONFIG)/src/cpp/server/channelz/channelz_service_plugin.o: $(GENDIR)/src/proto/grpc/channelz/channelz.pb.cc $(GENDIR)/src/proto/grpc/channelz/channelz.grpc.pb.cc +LIBBORINGSSL_SRC = \ + third_party/boringssl-with-bazel/err_data.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_d2i_fp.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_dup.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_gentm.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_i2d_fp.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_mbstr.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_print.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_strnid.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/a_utf8.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/asn1_par.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c \ + third_party/boringssl-with-bazel/src/crypto/asn1/time_support.c \ + third_party/boringssl-with-bazel/src/crypto/base64/base64.c \ + third_party/boringssl-with-bazel/src/crypto/bio/bio.c \ + third_party/boringssl-with-bazel/src/crypto/bio/bio_mem.c \ + third_party/boringssl-with-bazel/src/crypto/bio/connect.c \ + third_party/boringssl-with-bazel/src/crypto/bio/fd.c \ + third_party/boringssl-with-bazel/src/crypto/bio/file.c \ + third_party/boringssl-with-bazel/src/crypto/bio/hexdump.c \ + third_party/boringssl-with-bazel/src/crypto/bio/pair.c \ + third_party/boringssl-with-bazel/src/crypto/bio/printf.c \ + third_party/boringssl-with-bazel/src/crypto/bio/socket.c \ + third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c \ + third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/bn_extra/convert.c \ + third_party/boringssl-with-bazel/src/crypto/buf/buf.c \ + third_party/boringssl-with-bazel/src/crypto/bytestring/asn1_compat.c \ + third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c \ + third_party/boringssl-with-bazel/src/crypto/bytestring/cbb.c \ + third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c \ + third_party/boringssl-with-bazel/src/crypto/bytestring/unicode.c \ + third_party/boringssl-with-bazel/src/crypto/chacha/chacha.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/derive_key.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesccm.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesctrhmac.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_aesgcmsiv.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_null.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc2.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_rc4.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c \ + third_party/boringssl-with-bazel/src/crypto/cmac/cmac.c \ + third_party/boringssl-with-bazel/src/crypto/conf/conf.c \ + third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-fuchsia.c \ + third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-linux.c \ + third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.c \ + third_party/boringssl-with-bazel/src/crypto/cpu-arm.c \ + third_party/boringssl-with-bazel/src/crypto/cpu-intel.c \ + third_party/boringssl-with-bazel/src/crypto/cpu-ppc64le.c \ + third_party/boringssl-with-bazel/src/crypto/crypto.c \ + third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c \ + third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c \ + third_party/boringssl-with-bazel/src/crypto/dh/check.c \ + third_party/boringssl-with-bazel/src/crypto/dh/dh.c \ + third_party/boringssl-with-bazel/src/crypto/dh/dh_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/dh/params.c \ + third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c \ + third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c \ + third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_derive.c \ + third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c \ + third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_extra.c \ + third_party/boringssl-with-bazel/src/crypto/ecdsa_extra/ecdsa_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/engine/engine.c \ + third_party/boringssl-with-bazel/src/crypto/err/err.c \ + third_party/boringssl-with-bazel/src/crypto/evp/digestsign.c \ + third_party/boringssl-with-bazel/src/crypto/evp/evp.c \ + third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/evp/evp_ctx.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_ec.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_ec_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_ed25519_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_rsa.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_rsa_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_x25519.c \ + third_party/boringssl-with-bazel/src/crypto/evp/p_x25519_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/evp/pbkdf.c \ + third_party/boringssl-with-bazel/src/crypto/evp/print.c \ + third_party/boringssl-with-bazel/src/crypto/evp/scrypt.c \ + third_party/boringssl-with-bazel/src/crypto/evp/sign.c \ + third_party/boringssl-with-bazel/src/crypto/ex_data.c \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/fips_shared_support.c \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/is_fips.c \ + third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf.c \ + third_party/boringssl-with-bazel/src/crypto/hrss/hrss.c \ + third_party/boringssl-with-bazel/src/crypto/lhash/lhash.c \ + third_party/boringssl-with-bazel/src/crypto/mem.c \ + third_party/boringssl-with-bazel/src/crypto/obj/obj.c \ + third_party/boringssl-with-bazel/src/crypto/obj/obj_xref.c \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_all.c \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_info.c \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_lib.c \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_oth.c \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_pk8.c \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_pkey.c \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_x509.c \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_xaux.c \ + third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7.c \ + third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c \ + third_party/boringssl-with-bazel/src/crypto/pkcs8/p5_pbev2.c \ + third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8.c \ + third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c \ + third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c \ + third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c \ + third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c \ + third_party/boringssl-with-bazel/src/crypto/pool/pool.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/fuchsia.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c \ + third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c \ + third_party/boringssl-with-bazel/src/crypto/refcount_c11.c \ + third_party/boringssl-with-bazel/src/crypto/refcount_lock.c \ + third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c \ + third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_print.c \ + third_party/boringssl-with-bazel/src/crypto/siphash/siphash.c \ + third_party/boringssl-with-bazel/src/crypto/stack/stack.c \ + third_party/boringssl-with-bazel/src/crypto/thread.c \ + third_party/boringssl-with-bazel/src/crypto/thread_none.c \ + third_party/boringssl-with-bazel/src/crypto/thread_pthread.c \ + third_party/boringssl-with-bazel/src/crypto/thread_win.c \ + third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c \ + third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c \ + third_party/boringssl-with-bazel/src/crypto/x509/a_digest.c \ + third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c \ + third_party/boringssl-with-bazel/src/crypto/x509/a_strex.c \ + third_party/boringssl-with-bazel/src/crypto/x509/a_verify.c \ + third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c \ + third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c \ + third_party/boringssl-with-bazel/src/crypto/x509/by_dir.c \ + third_party/boringssl-with-bazel/src/crypto/x509/by_file.c \ + third_party/boringssl-with-bazel/src/crypto/x509/i2d_pr.c \ + third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c \ + third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c \ + third_party/boringssl-with-bazel/src/crypto/x509/t_req.c \ + third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c \ + third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_d2.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_def.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_lu.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_r2x.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509name.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x509spki.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_all.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_exten.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_info.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_name.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_pkey.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_req.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_spki.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_val.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c \ + third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_cache.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_lib.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_map.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_node.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_tree.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akeya.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bcons.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_crld.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_extku.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_int.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ncons.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ocsp.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pci.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcia.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pcons.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pku.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pmaps.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_sxnet.c \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c \ + third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc \ + third_party/boringssl-with-bazel/src/ssl/d1_both.cc \ + third_party/boringssl-with-bazel/src/ssl/d1_lib.cc \ + third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc \ + third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc \ + third_party/boringssl-with-bazel/src/ssl/dtls_method.cc \ + third_party/boringssl-with-bazel/src/ssl/dtls_record.cc \ + third_party/boringssl-with-bazel/src/ssl/handoff.cc \ + third_party/boringssl-with-bazel/src/ssl/handshake.cc \ + third_party/boringssl-with-bazel/src/ssl/handshake_client.cc \ + third_party/boringssl-with-bazel/src/ssl/handshake_server.cc \ + third_party/boringssl-with-bazel/src/ssl/s3_both.cc \ + third_party/boringssl-with-bazel/src/ssl/s3_lib.cc \ + third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_file.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_session.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc \ + third_party/boringssl-with-bazel/src/ssl/t1_enc.cc \ + third_party/boringssl-with-bazel/src/ssl/t1_lib.cc \ + third_party/boringssl-with-bazel/src/ssl/tls13_both.cc \ + third_party/boringssl-with-bazel/src/ssl/tls13_client.cc \ + third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc \ + third_party/boringssl-with-bazel/src/ssl/tls13_server.cc \ + third_party/boringssl-with-bazel/src/ssl/tls_method.cc \ + third_party/boringssl-with-bazel/src/ssl/tls_record.cc \ + +PUBLIC_HEADERS_C += \ + +LIBBORINGSSL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_SRC)))) + +$(LIBBORINGSSL_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX +$(LIBBORINGSSL_OBJS): CXXFLAGS += -fno-exceptions +$(LIBBORINGSSL_OBJS): CFLAGS += -g + +$(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBBORINGSSL_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl.a + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libboringssl.a $(LIBBORINGSSL_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl.a +endif + + + + +ifneq ($(NO_DEPS),true) +-include $(LIBBORINGSSL_OBJS:.o=.dep) +endif + + +LIBBORINGSSL_TEST_UTIL_SRC = \ + third_party/boringssl-with-bazel/src/crypto/test/file_test.cc \ + third_party/boringssl-with-bazel/src/crypto/test/malloc.cc \ + third_party/boringssl-with-bazel/src/crypto/test/test_util.cc \ + third_party/boringssl-with-bazel/src/crypto/test/wycheproof_util.cc \ + +PUBLIC_HEADERS_CXX += \ + +LIBBORINGSSL_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_TEST_UTIL_SRC)))) + +$(LIBBORINGSSL_TEST_UTIL_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX +$(LIBBORINGSSL_TEST_UTIL_OBJS): CXXFLAGS += -fno-exceptions +$(LIBBORINGSSL_TEST_UTIL_OBJS): CFLAGS += -g + +ifeq ($(NO_PROTOBUF),true) + +# You can't build a C++ library if you don't have protobuf - a bit overreached, but still okay. + +$(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: protobuf_dep_error + + +else + +$(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_TEST_UTIL_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBBORINGSSL_TEST_UTIL_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a +endif + + + + +endif + +ifneq ($(NO_DEPS),true) +-include $(LIBBORINGSSL_TEST_UTIL_OBJS:.o=.dep) +endif + + LIBBENCHMARK_SRC = \ + third_party/benchmark/src/benchmark.cc \ + third_party/benchmark/src/benchmark_api_internal.cc \ + third_party/benchmark/src/benchmark_main.cc \ + third_party/benchmark/src/benchmark_name.cc \ + third_party/benchmark/src/benchmark_register.cc \ + third_party/benchmark/src/benchmark_runner.cc \ + third_party/benchmark/src/colorprint.cc \ + third_party/benchmark/src/commandlineflags.cc \ + third_party/benchmark/src/complexity.cc \ + third_party/benchmark/src/console_reporter.cc \ + third_party/benchmark/src/counter.cc \ + third_party/benchmark/src/csv_reporter.cc \ + third_party/benchmark/src/json_reporter.cc \ + third_party/benchmark/src/reporter.cc \ + third_party/benchmark/src/sleep.cc \ + third_party/benchmark/src/statistics.cc \ + third_party/benchmark/src/string_util.cc \ + third_party/benchmark/src/sysinfo.cc \ + third_party/benchmark/src/timers.cc \ PUBLIC_HEADERS_CXX += \ @@ -5924,6 +6283,46 @@ ifneq ($(NO_DEPS),true) endif +LIBZ_SRC = \ + third_party/zlib/adler32.c \ + third_party/zlib/compress.c \ + third_party/zlib/crc32.c \ + third_party/zlib/deflate.c \ + third_party/zlib/gzclose.c \ + third_party/zlib/gzlib.c \ + third_party/zlib/gzread.c \ + third_party/zlib/gzwrite.c \ + third_party/zlib/infback.c \ + third_party/zlib/inffast.c \ + third_party/zlib/inflate.c \ + third_party/zlib/inftrees.c \ + third_party/zlib/trees.c \ + third_party/zlib/uncompr.c \ + third_party/zlib/zutil.c \ + +PUBLIC_HEADERS_C += \ + +LIBZ_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBZ_SRC)))) + +$(LIBZ_OBJS): CFLAGS += -fvisibility=hidden + +$(LIBDIR)/$(CONFIG)/libz.a: $(LIBZ_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libz.a + $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libz.a $(LIBZ_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libz.a +endif + + + + +ifneq ($(NO_DEPS),true) +-include $(LIBZ_OBJS:.o=.dep) +endif + + LIBARES_SRC = \ third_party/cares/cares/ares__close_sockets.c \ third_party/cares/cares/ares__get_hostent.c \ @@ -18740,6 +19139,284 @@ endif $(OBJDIR)/$(CONFIG)/test/cpp/interop/xds_interop_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc +BORINGSSL_SSL_TEST_SRC = \ + third_party/boringssl-with-bazel/src/crypto/test/abi_test.cc \ + third_party/boringssl-with-bazel/src/crypto/test/gtest_main.cc \ + third_party/boringssl-with-bazel/src/ssl/span_test.cc \ + third_party/boringssl-with-bazel/src/ssl/ssl_c_test.c \ + third_party/boringssl-with-bazel/src/ssl/ssl_test.cc \ + +BORINGSSL_SSL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BORINGSSL_SSL_TEST_SRC)))) + +# boringssl needs an override to ensure that it does not include +# system openssl headers regardless of other configuration +# we do so here with a target specific variable assignment +$(BORINGSSL_SSL_TEST_OBJS): CFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) +$(BORINGSSL_SSL_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CXXFLAGS) +$(BORINGSSL_SSL_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. + +$(BINDIR)/$(CONFIG)/boringssl_ssl_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/boringssl_ssl_test: $(PROTOBUF_DEP) $(BORINGSSL_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(BORINGSSL_SSL_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/boringssl_ssl_test + +endif + +$(BORINGSSL_SSL_TEST_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX +$(BORINGSSL_SSL_TEST_OBJS): CXXFLAGS += -fno-exceptions +$(BORINGSSL_SSL_TEST_OBJS): CFLAGS += -g +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/abi_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/gtest_main.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/ssl/span_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/ssl/ssl_c_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/ssl/ssl_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +deps_boringssl_ssl_test: $(BORINGSSL_SSL_TEST_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(BORINGSSL_SSL_TEST_OBJS:.o=.dep) +endif + + +BORINGSSL_CRYPTO_TEST_SRC = \ + third_party/boringssl-with-bazel/crypto_test_data.cc \ + third_party/boringssl-with-bazel/src/crypto/abi_self_test.cc \ + third_party/boringssl-with-bazel/src/crypto/asn1/asn1_test.cc \ + third_party/boringssl-with-bazel/src/crypto/base64/base64_test.cc \ + third_party/boringssl-with-bazel/src/crypto/bio/bio_test.cc \ + third_party/boringssl-with-bazel/src/crypto/buf/buf_test.cc \ + third_party/boringssl-with-bazel/src/crypto/bytestring/bytestring_test.cc \ + third_party/boringssl-with-bazel/src/crypto/chacha/chacha_test.cc \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/aead_test.cc \ + third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_test.cc \ + third_party/boringssl-with-bazel/src/crypto/cmac/cmac_test.cc \ + third_party/boringssl-with-bazel/src/crypto/compiler_test.cc \ + third_party/boringssl-with-bazel/src/crypto/constant_time_test.cc \ + third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux_test.cc \ + third_party/boringssl-with-bazel/src/crypto/curve25519/ed25519_test.cc \ + third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519_test.cc \ + third_party/boringssl-with-bazel/src/crypto/curve25519/x25519_test.cc \ + third_party/boringssl-with-bazel/src/crypto/dh/dh_test.cc \ + third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_test.cc \ + third_party/boringssl-with-bazel/src/crypto/dsa/dsa_test.cc \ + third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_test.cc \ + third_party/boringssl-with-bazel/src/crypto/err/err_test.cc \ + third_party/boringssl-with-bazel/src/crypto/evp/evp_extra_test.cc \ + third_party/boringssl-with-bazel/src/crypto/evp/evp_test.cc \ + third_party/boringssl-with-bazel/src/crypto/evp/pbkdf_test.cc \ + third_party/boringssl-with-bazel/src/crypto/evp/scrypt_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect_test.cc \ + third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha_test.cc \ + third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf_test.cc \ + third_party/boringssl-with-bazel/src/crypto/hmac_extra/hmac_test.cc \ + third_party/boringssl-with-bazel/src/crypto/hrss/hrss_test.cc \ + third_party/boringssl-with-bazel/src/crypto/impl_dispatch_test.cc \ + third_party/boringssl-with-bazel/src/crypto/lhash/lhash_test.cc \ + third_party/boringssl-with-bazel/src/crypto/obj/obj_test.cc \ + third_party/boringssl-with-bazel/src/crypto/pem/pem_test.cc \ + third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_test.cc \ + third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs12_test.cc \ + third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_test.cc \ + third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_test.cc \ + third_party/boringssl-with-bazel/src/crypto/pool/pool_test.cc \ + third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_test.cc \ + third_party/boringssl-with-bazel/src/crypto/refcount_test.cc \ + third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_test.cc \ + third_party/boringssl-with-bazel/src/crypto/self_test.cc \ + third_party/boringssl-with-bazel/src/crypto/siphash/siphash_test.cc \ + third_party/boringssl-with-bazel/src/crypto/stack/stack_test.cc \ + third_party/boringssl-with-bazel/src/crypto/test/abi_test.cc \ + third_party/boringssl-with-bazel/src/crypto/test/file_test_gtest.cc \ + third_party/boringssl-with-bazel/src/crypto/test/gtest_main.cc \ + third_party/boringssl-with-bazel/src/crypto/thread_test.cc \ + third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token_test.cc \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_test.cc \ + third_party/boringssl-with-bazel/src/crypto/x509/x509_time_test.cc \ + third_party/boringssl-with-bazel/src/crypto/x509v3/tab_test.cc \ + third_party/boringssl-with-bazel/src/crypto/x509v3/v3name_test.cc \ + +BORINGSSL_CRYPTO_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BORINGSSL_CRYPTO_TEST_SRC)))) + +# boringssl needs an override to ensure that it does not include +# system openssl headers regardless of other configuration +# we do so here with a target specific variable assignment +$(BORINGSSL_CRYPTO_TEST_OBJS): CFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) +$(BORINGSSL_CRYPTO_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl-with-bazel/src/include $(CXXFLAGS) +$(BORINGSSL_CRYPTO_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. + +$(BINDIR)/$(CONFIG)/boringssl_crypto_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/boringssl_crypto_test: $(PROTOBUF_DEP) $(BORINGSSL_CRYPTO_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(BORINGSSL_CRYPTO_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/boringssl_crypto_test + +endif + +$(BORINGSSL_CRYPTO_TEST_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX +$(BORINGSSL_CRYPTO_TEST_OBJS): CXXFLAGS += -fno-exceptions +$(BORINGSSL_CRYPTO_TEST_OBJS): CFLAGS += -g +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/crypto_test_data.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/abi_self_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/base64/base64_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/bio/bio_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/buf/buf_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/bytestring/bytestring_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/chacha/chacha_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/cipher_extra/aead_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/cmac/cmac_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/compiler_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/constant_time_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/curve25519/ed25519_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/curve25519/x25519_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/dh/dh_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/ecdh_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/err/err_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/evp/evp_extra_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/evp/evp_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/evp/pbkdf_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/evp/scrypt_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/ctrdrbg_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/fork_detect_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/hkdf/hkdf_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/hmac_extra/hmac_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/hrss/hrss_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/impl_dispatch_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/lhash/lhash_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/obj/obj_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pem/pem_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs12_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/pool/pool_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/refcount_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/self_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/siphash/siphash_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/stack/stack_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/abi_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/file_test_gtest.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/test/gtest_main.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/thread_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/x509/x509_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/x509/x509_time_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/x509v3/tab_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +$(OBJDIR)/$(CONFIG)/third_party/boringssl-with-bazel/src/crypto/x509v3/v3name_test.o: $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl.a + +deps_boringssl_crypto_test: $(BORINGSSL_CRYPTO_TEST_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(BORINGSSL_CRYPTO_TEST_OBJS:.o=.dep) +endif + + ALTS_CREDENTIALS_FUZZER_ONE_ENTRY_SRC = \ test/core/security/alts_credentials_fuzzer.cc \ test/core/util/one_corpus_entry_fuzzer.cc \ From e98eaa5052a0f2b0299591dc05760805df04656c Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 23 Jun 2020 12:19:07 -0700 Subject: [PATCH 122/239] Revert "Revert "Add message-size check before message decompression"" --- BUILD | 2 + BUILD.gn | 1 + CMakeLists.txt | 2 + Makefile | 2 + build_autogenerated.yaml | 2 + config.m4 | 1 + config.w32 | 1 + gRPC-Core.podspec | 1 + grpc.gemspec | 1 + grpc.gyp | 2 + package.xml | 1 + .../service_config_channel_arg_filter.cc | 142 ++++++++ .../ext/filters/http/http_filters_plugin.cc | 3 +- .../message_decompress_filter.cc | 92 +++-- .../message_decompress_filter.h | 4 +- .../message_size/message_size_filter.cc | 106 +++--- .../message_size/message_size_filter.h | 6 + .../plugin_registry/grpc_plugin_registry.cc | 4 + .../grpc_unsecure_plugin_registry.cc | 4 + src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/end2end/tests/max_message_length.cc | 332 ++++++++++++++++++ test/cpp/microbenchmarks/bm_call_create.cc | 3 +- tools/doxygen/Doxyfile.c++.internal | 1 + tools/doxygen/Doxyfile.core.internal | 1 + 24 files changed, 622 insertions(+), 93 deletions(-) create mode 100644 src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc diff --git a/BUILD b/BUILD index 13d3d6883d8..32bb6512ec4 100644 --- a/BUILD +++ b/BUILD @@ -1045,6 +1045,7 @@ grpc_cc_library( "src/core/ext/filters/client_channel/retry_throttle.cc", "src/core/ext/filters/client_channel/server_address.cc", "src/core/ext/filters/client_channel/service_config.cc", + "src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc", "src/core/ext/filters/client_channel/service_config_parser.cc", "src/core/ext/filters/client_channel/subchannel.cc", "src/core/ext/filters/client_channel/subchannel_pool_interface.cc", @@ -1186,6 +1187,7 @@ grpc_cc_library( language = "c++", deps = [ "grpc_base", + "grpc_message_size_filter", ], ) diff --git a/BUILD.gn b/BUILD.gn index 0b72deafa94..f2e173ad9c5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -295,6 +295,7 @@ config("grpc_config") { "src/core/ext/filters/client_channel/service_config.cc", "src/core/ext/filters/client_channel/service_config.h", "src/core/ext/filters/client_channel/service_config_call_data.h", + "src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc", "src/core/ext/filters/client_channel/service_config_parser.cc", "src/core/ext/filters/client_channel/service_config_parser.h", "src/core/ext/filters/client_channel/subchannel.cc", diff --git a/CMakeLists.txt b/CMakeLists.txt index 59387045c7d..3fa1c7bb8c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1376,6 +1376,7 @@ add_library(grpc src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/server_address.cc src/core/ext/filters/client_channel/service_config.cc + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc src/core/ext/filters/client_channel/service_config_parser.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -2048,6 +2049,7 @@ add_library(grpc_unsecure src/core/ext/filters/client_channel/retry_throttle.cc src/core/ext/filters/client_channel/server_address.cc src/core/ext/filters/client_channel/service_config.cc + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc src/core/ext/filters/client_channel/service_config_parser.cc src/core/ext/filters/client_channel/subchannel.cc src/core/ext/filters/client_channel/subchannel_pool_interface.cc diff --git a/Makefile b/Makefile index 0f1e72c2eaa..675c7613d50 100644 --- a/Makefile +++ b/Makefile @@ -3679,6 +3679,7 @@ LIBGRPC_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ @@ -4325,6 +4326,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 3ac9f3c74b9..fac33c197a2 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -795,6 +795,7 @@ libs: - src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/server_address.cc - src/core/ext/filters/client_channel/service_config.cc + - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc - src/core/ext/filters/client_channel/service_config_parser.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_pool_interface.cc @@ -1656,6 +1657,7 @@ libs: - src/core/ext/filters/client_channel/retry_throttle.cc - src/core/ext/filters/client_channel/server_address.cc - src/core/ext/filters/client_channel/service_config.cc + - src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc - src/core/ext/filters/client_channel/service_config_parser.cc - src/core/ext/filters/client_channel/subchannel.cc - src/core/ext/filters/client_channel/subchannel_pool_interface.cc diff --git a/config.m4 b/config.m4 index 5ee9f1c8d58..a6bf9a21b6c 100644 --- a/config.m4 +++ b/config.m4 @@ -93,6 +93,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/filters/client_channel/retry_throttle.cc \ src/core/ext/filters/client_channel/server_address.cc \ src/core/ext/filters/client_channel/service_config.cc \ + src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/subchannel.cc \ src/core/ext/filters/client_channel/subchannel_pool_interface.cc \ diff --git a/config.w32 b/config.w32 index 1c533a33302..03cf0684684 100644 --- a/config.w32 +++ b/config.w32 @@ -62,6 +62,7 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\filters\\client_channel\\retry_throttle.cc " + "src\\core\\ext\\filters\\client_channel\\server_address.cc " + "src\\core\\ext\\filters\\client_channel\\service_config.cc " + + "src\\core\\ext\\filters\\client_channel\\service_config_channel_arg_filter.cc " + "src\\core\\ext\\filters\\client_channel\\service_config_parser.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel.cc " + "src\\core\\ext\\filters\\client_channel\\subchannel_pool_interface.cc " + diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index aaf5609a9c3..43a47a09fa7 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -279,6 +279,7 @@ Pod::Spec.new do |s| 'src/core/ext/filters/client_channel/service_config.cc', 'src/core/ext/filters/client_channel/service_config.h', 'src/core/ext/filters/client_channel/service_config_call_data.h', + 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/service_config_parser.h', 'src/core/ext/filters/client_channel/subchannel.cc', diff --git a/grpc.gemspec b/grpc.gemspec index 881f55a81c2..72ec55f0c86 100644 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -201,6 +201,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/filters/client_channel/service_config.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config.h ) s.files += %w( src/core/ext/filters/client_channel/service_config_call_data.h ) + s.files += %w( src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config_parser.cc ) s.files += %w( src/core/ext/filters/client_channel/service_config_parser.h ) s.files += %w( src/core/ext/filters/client_channel/subchannel.cc ) diff --git a/grpc.gyp b/grpc.gyp index e8bed76e891..587e6ba8d94 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -488,6 +488,7 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', + 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', @@ -996,6 +997,7 @@ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', + 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', diff --git a/package.xml b/package.xml index 262c66a6ac3..7553fe27739 100644 --- a/package.xml +++ b/package.xml @@ -181,6 +181,7 @@ + diff --git a/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc new file mode 100644 index 00000000000..6b8e6373af7 --- /dev/null +++ b/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc @@ -0,0 +1,142 @@ +// +// Copyright 2020 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// This filter reads GRPC_ARG_SERVICE_CONFIG and populates ServiceConfigCallData +// in the call context per call for direct channels. + +#include + +#include "src/core/ext/filters/client_channel/service_config_call_data.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/channel/channel_stack_builder.h" +#include "src/core/lib/surface/channel_init.h" + +namespace grpc_core { + +namespace { + +class ServiceConfigChannelArgChannelData { + public: + explicit ServiceConfigChannelArgChannelData( + const grpc_channel_element_args* args) { + const char* service_config_str = grpc_channel_args_find_string( + args->channel_args, GRPC_ARG_SERVICE_CONFIG); + if (service_config_str != nullptr) { + grpc_error* service_config_error = GRPC_ERROR_NONE; + auto service_config = + ServiceConfig::Create(service_config_str, &service_config_error); + if (service_config_error == GRPC_ERROR_NONE) { + service_config_ = std::move(service_config); + } else { + gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); + } + GRPC_ERROR_UNREF(service_config_error); + } + } + + RefCountedPtr service_config() const { + return service_config_; + } + + private: + RefCountedPtr service_config_; +}; + +class ServiceConfigChannelArgCallData { + public: + ServiceConfigChannelArgCallData(grpc_call_element* elem, + const grpc_call_element_args* args) { + ServiceConfigChannelArgChannelData* chand = + static_cast(elem->channel_data); + RefCountedPtr service_config = chand->service_config(); + if (service_config != nullptr) { + GPR_DEBUG_ASSERT(args->context != nullptr); + const auto* method_params_vector = + service_config->GetMethodParsedConfigVector(args->path); + args->arena->New( + std::move(service_config), method_params_vector, args->context); + } + } +}; + +grpc_error* ServiceConfigChannelArgInitCallElem( + grpc_call_element* elem, const grpc_call_element_args* args) { + ServiceConfigChannelArgCallData* calld = + static_cast(elem->call_data); + new (calld) ServiceConfigChannelArgCallData(elem, args); + return GRPC_ERROR_NONE; +} + +void ServiceConfigChannelArgDestroyCallElem( + grpc_call_element* elem, const grpc_call_final_info* /* final_info */, + grpc_closure* /* then_schedule_closure */) { + ServiceConfigChannelArgCallData* calld = + static_cast(elem->call_data); + calld->~ServiceConfigChannelArgCallData(); +} + +grpc_error* ServiceConfigChannelArgInitChannelElem( + grpc_channel_element* elem, grpc_channel_element_args* args) { + ServiceConfigChannelArgChannelData* chand = + static_cast(elem->channel_data); + new (chand) ServiceConfigChannelArgChannelData(args); + return GRPC_ERROR_NONE; +} + +void ServiceConfigChannelArgDestroyChannelElem(grpc_channel_element* elem) { + ServiceConfigChannelArgChannelData* chand = + static_cast(elem->channel_data); + chand->~ServiceConfigChannelArgChannelData(); +} + +const grpc_channel_filter ServiceConfigChannelArgFilter = { + grpc_call_next_op, + grpc_channel_next_op, + sizeof(ServiceConfigChannelArgCallData), + ServiceConfigChannelArgInitCallElem, + grpc_call_stack_ignore_set_pollset_or_pollset_set, + ServiceConfigChannelArgDestroyCallElem, + sizeof(ServiceConfigChannelArgChannelData), + ServiceConfigChannelArgInitChannelElem, + ServiceConfigChannelArgDestroyChannelElem, + grpc_channel_next_get_info, + "service_config_channel_arg"}; + +bool maybe_add_service_config_channel_arg_filter( + grpc_channel_stack_builder* builder, void* /* arg */) { + const grpc_channel_args* channel_args = + grpc_channel_stack_builder_get_channel_arguments(builder); + if (grpc_channel_args_want_minimal_stack(channel_args) || + grpc_channel_args_find_string(channel_args, GRPC_ARG_SERVICE_CONFIG) == + nullptr) { + return true; + } + return grpc_channel_stack_builder_prepend_filter( + builder, &ServiceConfigChannelArgFilter, nullptr, nullptr); +} + +} // namespace + +} // namespace grpc_core + +void grpc_service_config_channel_arg_filter_init(void) { + grpc_channel_init_register_stage( + GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, + grpc_core::maybe_add_service_config_channel_arg_filter, nullptr); +} + +void grpc_service_config_channel_arg_filter_shutdown(void) {} diff --git a/src/core/ext/filters/http/http_filters_plugin.cc b/src/core/ext/filters/http/http_filters_plugin.cc index 2fedc7fe3d7..637dc3030f2 100644 --- a/src/core/ext/filters/http/http_filters_plugin.cc +++ b/src/core/ext/filters/http/http_filters_plugin.cc @@ -38,7 +38,8 @@ static optional_filter compress_filter = { &grpc_message_compress_filter, GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION}; static optional_filter decompress_filter = { - &grpc_message_decompress_filter, GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION}; + &grpc_core::MessageDecompressFilter, + GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION}; static bool is_building_http_like_transport( grpc_channel_stack_builder* builder) { diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc index d12f4013bb2..c16ea66e7a3 100644 --- a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc @@ -18,6 +18,8 @@ #include +#include "src/core/ext/filters/http/message_compress/message_decompress_filter.h" + #include #include @@ -27,7 +29,8 @@ #include #include -#include "src/core/ext/filters/http/message_compress/message_decompress_filter.h" +#include "absl/strings/str_format.h" +#include "src/core/ext/filters/message_size/message_size_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/compression/algorithm_metadata.h" #include "src/core/lib/compression/compression_args.h" @@ -37,14 +40,25 @@ #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" +namespace grpc_core { namespace { -class ChannelData {}; +class ChannelData { + public: + explicit ChannelData(const grpc_channel_element_args* args) + : max_recv_size_(GetMaxRecvSizeFromChannelArgs(args->channel_args)) {} + + int max_recv_size() const { return max_recv_size_; } + + private: + int max_recv_size_; +}; class CallData { public: - explicit CallData(const grpc_call_element_args& args) - : call_combiner_(args.call_combiner) { + CallData(const grpc_call_element_args& args, const ChannelData* chand) + : call_combiner_(args.call_combiner), + max_recv_message_length_(chand->max_recv_size()) { // Initialize state for recv_initial_metadata_ready callback GRPC_CLOSURE_INIT(&on_recv_initial_metadata_ready_, OnRecvInitialMetadataReady, this, @@ -59,6 +73,13 @@ class CallData { GRPC_CLOSURE_INIT(&on_recv_trailing_metadata_ready_, OnRecvTrailingMetadataReady, this, grpc_schedule_on_exec_ctx); + const MessageSizeParsedConfig* limits = + MessageSizeParsedConfig::GetFromCallContext(args.context); + if (limits != nullptr && limits->limits().max_recv_size >= 0 && + (limits->limits().max_recv_size < max_recv_message_length_ || + max_recv_message_length_ < 0)) { + max_recv_message_length_ = limits->limits().max_recv_size; + } } ~CallData() { grpc_slice_buffer_destroy_internal(&recv_slices_); } @@ -82,7 +103,7 @@ class CallData { void MaybeResumeOnRecvTrailingMetadataReady(); static void OnRecvTrailingMetadataReady(void* arg, grpc_error* error); - grpc_core::CallCombiner* call_combiner_; + CallCombiner* call_combiner_; // Overall error for the call grpc_error* error_ = GRPC_ERROR_NONE; // Fields for handling recv_initial_metadata_ready callback @@ -91,17 +112,18 @@ class CallData { grpc_metadata_batch* recv_initial_metadata_ = nullptr; // Fields for handling recv_message_ready callback bool seen_recv_message_ready_ = false; + int max_recv_message_length_; grpc_message_compression_algorithm algorithm_ = GRPC_MESSAGE_COMPRESS_NONE; grpc_closure on_recv_message_ready_; grpc_closure* original_recv_message_ready_ = nullptr; grpc_closure on_recv_message_next_done_; - grpc_core::OrphanablePtr* recv_message_ = nullptr; + OrphanablePtr* recv_message_ = nullptr; // recv_slices_ holds the slices read from the original recv_message stream. // It is initialized during construction and reset when a new stream is // created using it. grpc_slice_buffer recv_slices_; - std::aligned_storage::type + std::aligned_storage::type recv_replacement_stream_; // Fields for handling recv_trailing_metadata_ready callback bool seen_recv_trailing_metadata_ready_ = false; @@ -139,7 +161,7 @@ void CallData::OnRecvInitialMetadataReady(void* arg, grpc_error* error) { calld->MaybeResumeOnRecvTrailingMetadataReady(); grpc_closure* closure = calld->original_recv_initial_metadata_ready_; calld->original_recv_initial_metadata_ready_ = nullptr; - grpc_core::Closure::Run(DEBUG_LOCATION, closure, GRPC_ERROR_REF(error)); + Closure::Run(DEBUG_LOCATION, closure, GRPC_ERROR_REF(error)); } void CallData::MaybeResumeOnRecvMessageReady() { @@ -170,6 +192,19 @@ void CallData::OnRecvMessageReady(void* arg, grpc_error* error) { 0) { return calld->ContinueRecvMessageReadyCallback(GRPC_ERROR_NONE); } + if (calld->max_recv_message_length_ >= 0 && + (*calld->recv_message_)->length() > + static_cast(calld->max_recv_message_length_)) { + std::string message_string = absl::StrFormat( + "Received message larger than max (%u vs. %d)", + (*calld->recv_message_)->length(), calld->max_recv_message_length_); + GPR_DEBUG_ASSERT(calld->error_ == GRPC_ERROR_NONE); + calld->error_ = grpc_error_set_int( + GRPC_ERROR_CREATE_FROM_COPIED_STRING(message_string.c_str()), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED); + return calld->ContinueRecvMessageReadyCallback( + GRPC_ERROR_REF(calld->error_)); + } grpc_slice_buffer_destroy_internal(&calld->recv_slices_); grpc_slice_buffer_init(&calld->recv_slices_); return calld->ContinueReadingRecvMessage(); @@ -241,9 +276,9 @@ void CallData::FinishRecvMessage() { // Initializing recv_replacement_stream_ with decompressed_slices removes // all the slices from decompressed_slices leaving it empty. new (&recv_replacement_stream_) - grpc_core::SliceBufferByteStream(&decompressed_slices, recv_flags); - recv_message_->reset(reinterpret_cast( - &recv_replacement_stream_)); + SliceBufferByteStream(&decompressed_slices, recv_flags); + recv_message_->reset( + reinterpret_cast(&recv_replacement_stream_)); recv_message_ = nullptr; } ContinueRecvMessageReadyCallback(GRPC_ERROR_REF(error_)); @@ -254,7 +289,7 @@ void CallData::ContinueRecvMessageReadyCallback(grpc_error* error) { // The surface will clean up the receiving stream if there is an error. grpc_closure* closure = original_recv_message_ready_; original_recv_message_ready_ = nullptr; - grpc_core::Closure::Run(DEBUG_LOCATION, closure, error); + Closure::Run(DEBUG_LOCATION, closure, error); } void CallData::MaybeResumeOnRecvTrailingMetadataReady() { @@ -283,7 +318,7 @@ void CallData::OnRecvTrailingMetadataReady(void* arg, grpc_error* error) { calld->error_ = GRPC_ERROR_NONE; grpc_closure* closure = calld->original_recv_trailing_metadata_ready_; calld->original_recv_trailing_metadata_ready_ = nullptr; - grpc_core::Closure::Run(DEBUG_LOCATION, closure, error); + Closure::Run(DEBUG_LOCATION, closure, error); } void CallData::DecompressStartTransportStreamOpBatch( @@ -322,37 +357,44 @@ void DecompressStartTransportStreamOpBatch( calld->DecompressStartTransportStreamOpBatch(elem, batch); } -static grpc_error* DecompressInitCallElem(grpc_call_element* elem, - const grpc_call_element_args* args) { - new (elem->call_data) CallData(*args); +grpc_error* DecompressInitCallElem(grpc_call_element* elem, + const grpc_call_element_args* args) { + ChannelData* chand = static_cast(elem->channel_data); + new (elem->call_data) CallData(*args, chand); return GRPC_ERROR_NONE; } -static void DecompressDestroyCallElem( - grpc_call_element* elem, const grpc_call_final_info* /*final_info*/, - grpc_closure* /*ignored*/) { +void DecompressDestroyCallElem(grpc_call_element* elem, + const grpc_call_final_info* /*final_info*/, + grpc_closure* /*ignored*/) { CallData* calld = static_cast(elem->call_data); calld->~CallData(); } -static grpc_error* DecompressInitChannelElem( - grpc_channel_element* /*elem*/, grpc_channel_element_args* /*args*/) { +grpc_error* DecompressInitChannelElem(grpc_channel_element* elem, + grpc_channel_element_args* args) { + ChannelData* chand = static_cast(elem->channel_data); + new (chand) ChannelData(args); return GRPC_ERROR_NONE; } -void DecompressDestroyChannelElem(grpc_channel_element* /*elem*/) {} +void DecompressDestroyChannelElem(grpc_channel_element* elem) { + ChannelData* chand = static_cast(elem->channel_data); + chand->~ChannelData(); +} } // namespace -const grpc_channel_filter grpc_message_decompress_filter = { +const grpc_channel_filter MessageDecompressFilter = { DecompressStartTransportStreamOpBatch, grpc_channel_next_op, sizeof(CallData), DecompressInitCallElem, grpc_call_stack_ignore_set_pollset_or_pollset_set, DecompressDestroyCallElem, - 0, // sizeof(ChannelData) + sizeof(ChannelData), DecompressInitChannelElem, DecompressDestroyChannelElem, grpc_channel_next_get_info, "message_decompress"}; +} // namespace grpc_core diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.h b/src/core/ext/filters/http/message_compress/message_decompress_filter.h index 7d567bf08a2..f19a4ca0cbd 100644 --- a/src/core/ext/filters/http/message_compress/message_decompress_filter.h +++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.h @@ -23,7 +23,9 @@ #include "src/core/lib/channel/channel_stack.h" -extern const grpc_channel_filter grpc_message_decompress_filter; +namespace grpc_core { +extern const grpc_channel_filter MessageDecompressFilter; +} // namespace grpc_core #endif /* GRPC_CORE_EXT_FILTERS_HTTP_MESSAGE_COMPRESS_MESSAGE_DECOMPRESS_FILTER_H \ */ diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index d2ef5477636..89fdab6fae8 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -45,6 +45,25 @@ namespace { size_t g_message_size_parser_index; } // namespace +// +// MessageSizeParsedConfig +// + +const MessageSizeParsedConfig* MessageSizeParsedConfig::GetFromCallContext( + const grpc_call_context_element* context) { + if (context == nullptr) return nullptr; + auto* svc_cfg_call_data = static_cast( + context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value); + if (svc_cfg_call_data == nullptr) return nullptr; + return static_cast( + svc_cfg_call_data->GetMethodParsedConfig( + MessageSizeParser::ParserIndex())); +} + +// +// MessageSizeParser +// + std::unique_ptr MessageSizeParser::ParsePerMethodParams(const Json& json, grpc_error** error) { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); @@ -97,12 +116,26 @@ void MessageSizeParser::Register() { } size_t MessageSizeParser::ParserIndex() { return g_message_size_parser_index; } + +int GetMaxRecvSizeFromChannelArgs(const grpc_channel_args* args) { + if (grpc_channel_args_want_minimal_stack(args)) return -1; + return grpc_channel_args_find_integer( + args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, + {GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, -1, INT_MAX}); +} + +int GetMaxSendSizeFromChannelArgs(const grpc_channel_args* args) { + if (grpc_channel_args_want_minimal_stack(args)) return -1; + return grpc_channel_args_find_integer( + args, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH, + {GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH, -1, INT_MAX}); +} + } // namespace grpc_core namespace { struct channel_data { grpc_core::MessageSizeParsedConfig::message_size_limits limits; - grpc_core::RefCountedPtr svc_cfg; }; struct call_data { @@ -118,24 +151,8 @@ struct call_data { // Note: Per-method config is only available on the client, so we // apply the max request size to the send limit and the max response // size to the receive limit. - const grpc_core::MessageSizeParsedConfig* limits = nullptr; - grpc_core::ServiceConfigCallData* svc_cfg_call_data = nullptr; - if (args.context != nullptr) { - svc_cfg_call_data = static_cast( - args.context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value); - } - if (svc_cfg_call_data != nullptr) { - limits = static_cast( - svc_cfg_call_data->GetMethodParsedConfig( - grpc_core::MessageSizeParser::ParserIndex())); - } else if (chand.svc_cfg != nullptr) { - const auto* objs_vector = - chand.svc_cfg->GetMethodParsedConfigVector(args.path); - if (objs_vector != nullptr) { - limits = static_cast( - (*objs_vector)[grpc_core::MessageSizeParser::ParserIndex()].get()); - } - } + const grpc_core::MessageSizeParsedConfig* limits = + grpc_core::MessageSizeParsedConfig::GetFromCallContext(args.context); if (limits != nullptr) { if (limits->limits().max_send_size >= 0 && (limits->limits().max_send_size < this->limits.max_send_size || @@ -288,35 +305,11 @@ static void message_size_destroy_call_elem( calld->~call_data(); } -static int default_size(const grpc_channel_args* args, - int without_minimal_stack) { - if (grpc_channel_args_want_minimal_stack(args)) { - return -1; - } - return without_minimal_stack; -} - grpc_core::MessageSizeParsedConfig::message_size_limits get_message_size_limits( const grpc_channel_args* channel_args) { grpc_core::MessageSizeParsedConfig::message_size_limits lim; - lim.max_send_size = - default_size(channel_args, GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH); - lim.max_recv_size = - default_size(channel_args, GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH); - for (size_t i = 0; i < channel_args->num_args; ++i) { - if (strcmp(channel_args->args[i].key, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH) == - 0) { - const grpc_integer_options options = {lim.max_send_size, -1, INT_MAX}; - lim.max_send_size = - grpc_channel_arg_get_integer(&channel_args->args[i], options); - } - if (strcmp(channel_args->args[i].key, - GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH) == 0) { - const grpc_integer_options options = {lim.max_recv_size, -1, INT_MAX}; - lim.max_recv_size = - grpc_channel_arg_get_integer(&channel_args->args[i], options); - } - } + lim.max_send_size = grpc_core::GetMaxSendSizeFromChannelArgs(channel_args); + lim.max_recv_size = grpc_core::GetMaxRecvSizeFromChannelArgs(channel_args); return lim; } @@ -327,26 +320,6 @@ static grpc_error* message_size_init_channel_elem( channel_data* chand = static_cast(elem->channel_data); new (chand) channel_data(); chand->limits = get_message_size_limits(args->channel_args); - // TODO(yashykt): We only need to read GRPC_ARG_SERVICE_CONFIG in the case of - // direct channels. (Service config is otherwise stored in the call_context by - // client_channel filter.) If we ever need a second filter that also needs to - // parse GRPC_ARG_SERVICE_CONFIG, we should refactor this code and add a - // separate filter that reads GRPC_ARG_SERVICE_CONFIG and saves the parsed - // config in the call_context. - const grpc_arg* channel_arg = - grpc_channel_args_find(args->channel_args, GRPC_ARG_SERVICE_CONFIG); - const char* service_config_str = grpc_channel_arg_get_string(channel_arg); - if (service_config_str != nullptr) { - grpc_error* service_config_error = GRPC_ERROR_NONE; - auto svc_cfg = grpc_core::ServiceConfig::Create(service_config_str, - &service_config_error); - if (service_config_error == GRPC_ERROR_NONE) { - chand->svc_cfg = std::move(svc_cfg); - } else { - gpr_log(GPR_ERROR, "%s", grpc_error_string(service_config_error)); - } - GRPC_ERROR_UNREF(service_config_error); - } return GRPC_ERROR_NONE; } @@ -387,6 +360,9 @@ static bool maybe_add_message_size_filter(grpc_channel_stack_builder* builder, void* /*arg*/) { const grpc_channel_args* channel_args = grpc_channel_stack_builder_get_channel_arguments(builder); + if (grpc_channel_args_want_minimal_stack(channel_args)) { + return true; + } bool enable = false; grpc_core::MessageSizeParsedConfig::message_size_limits lim = get_message_size_limits(channel_args); diff --git a/src/core/ext/filters/message_size/message_size_filter.h b/src/core/ext/filters/message_size/message_size_filter.h index 132d7b2af0f..ea0dd0266d0 100644 --- a/src/core/ext/filters/message_size/message_size_filter.h +++ b/src/core/ext/filters/message_size/message_size_filter.h @@ -40,6 +40,9 @@ class MessageSizeParsedConfig : public ServiceConfigParser::ParsedConfig { const message_size_limits& limits() const { return limits_; } + static const MessageSizeParsedConfig* GetFromCallContext( + const grpc_call_context_element* context); + private: message_size_limits limits_; }; @@ -54,6 +57,9 @@ class MessageSizeParser : public ServiceConfigParser::Parser { static size_t ParserIndex(); }; +int GetMaxRecvSizeFromChannelArgs(const grpc_channel_args* args); +int GetMaxSendSizeFromChannelArgs(const grpc_channel_args* args); + } // namespace grpc_core #endif /* GRPC_CORE_EXT_FILTERS_MESSAGE_SIZE_MESSAGE_SIZE_FILTER_H */ diff --git a/src/core/plugin_registry/grpc_plugin_registry.cc b/src/core/plugin_registry/grpc_plugin_registry.cc index f1c3cbf4036..ef8b10df647 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_plugin_registry.cc @@ -64,6 +64,8 @@ void grpc_max_age_filter_init(void); void grpc_max_age_filter_shutdown(void); void grpc_message_size_filter_init(void); void grpc_message_size_filter_shutdown(void); +void grpc_service_config_channel_arg_filter_init(void); +void grpc_service_config_channel_arg_filter_shutdown(void); void grpc_client_authority_filter_init(void); void grpc_client_authority_filter_shutdown(void); void grpc_workaround_cronet_compression_filter_init(void); @@ -114,6 +116,8 @@ void grpc_register_built_in_plugins(void) { grpc_max_age_filter_shutdown); grpc_register_plugin(grpc_message_size_filter_init, grpc_message_size_filter_shutdown); + grpc_register_plugin(grpc_service_config_channel_arg_filter_init, + grpc_service_config_channel_arg_filter_shutdown); grpc_register_plugin(grpc_client_authority_filter_init, grpc_client_authority_filter_shutdown); grpc_register_plugin(grpc_workaround_cronet_compression_filter_init, diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc index de53f173294..525fa108d81 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc @@ -64,6 +64,8 @@ void grpc_max_age_filter_init(void); void grpc_max_age_filter_shutdown(void); void grpc_message_size_filter_init(void); void grpc_message_size_filter_shutdown(void); +void grpc_service_config_channel_arg_filter_init(void); +void grpc_service_config_channel_arg_filter_shutdown(void); void grpc_client_authority_filter_init(void); void grpc_client_authority_filter_shutdown(void); void grpc_workaround_cronet_compression_filter_init(void); @@ -114,6 +116,8 @@ void grpc_register_built_in_plugins(void) { grpc_max_age_filter_shutdown); grpc_register_plugin(grpc_message_size_filter_init, grpc_message_size_filter_shutdown); + grpc_register_plugin(grpc_service_config_channel_arg_filter_init, + grpc_service_config_channel_arg_filter_shutdown); grpc_register_plugin(grpc_client_authority_filter_init, grpc_client_authority_filter_shutdown); grpc_register_plugin(grpc_workaround_cronet_compression_filter_init, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index a25f10239f6..7689ddedeba 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -71,6 +71,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/filters/client_channel/retry_throttle.cc', 'src/core/ext/filters/client_channel/server_address.cc', 'src/core/ext/filters/client_channel/service_config.cc', + 'src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc', 'src/core/ext/filters/client_channel/service_config_parser.cc', 'src/core/ext/filters/client_channel/subchannel.cc', 'src/core/ext/filters/client_channel/subchannel_pool_interface.cc', diff --git a/test/core/end2end/tests/max_message_length.cc b/test/core/end2end/tests/max_message_length.cc index 40e752a3d63..256cc982940 100644 --- a/test/core/end2end/tests/max_message_length.cc +++ b/test/core/end2end/tests/max_message_length.cc @@ -29,6 +29,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/slice/slice_internal.h" +#include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/transport/metadata.h" #include "test/core/end2end/cq_verifier.h" @@ -466,6 +467,328 @@ static void test_max_message_length_on_response(grpc_end2end_test_config config, grpc_byte_buffer_destroy(response_payload); grpc_byte_buffer_destroy(recv_payload); + grpc_call_unref(c); + if (s != nullptr) grpc_call_unref(s); + cq_verifier_destroy(cqv); + end_test(&f); + config.tear_down_data(&f); +} + +static grpc_metadata gzip_compression_override() { + grpc_metadata gzip_compression_override; + gzip_compression_override.key = GRPC_MDSTR_GRPC_INTERNAL_ENCODING_REQUEST; + gzip_compression_override.value = grpc_slice_from_static_string("gzip"); + memset(&gzip_compression_override.internal_data, 0, + sizeof(gzip_compression_override.internal_data)); + return gzip_compression_override; +} + +// Test receive message limit with compressed request larger than the limit +static void test_max_receive_message_length_on_compressed_request( + grpc_end2end_test_config config, bool minimal_stack) { + gpr_log(GPR_INFO, + "test max receive message length on compressed request with " + "minimal_stack=%d", + minimal_stack); + grpc_end2end_test_fixture f; + grpc_call* c = nullptr; + grpc_call* s = nullptr; + cq_verifier* cqv; + grpc_op ops[6]; + grpc_op* op; + grpc_slice request_payload_slice = grpc_slice_malloc(1024); + memset(GRPC_SLICE_START_PTR(request_payload_slice), 'a', 1024); + grpc_byte_buffer* request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + grpc_byte_buffer* recv_payload = nullptr; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + grpc_slice details, status_details; + int was_cancelled = 2; + + // Set limit via channel args. + grpc_arg arg[2]; + arg[0] = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH), 5); + arg[1] = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_MINIMAL_STACK), minimal_stack); + grpc_channel_args* server_args = + grpc_channel_args_copy_and_add(nullptr, arg, 2); + + f = begin_test(config, "test_max_request_message_length", nullptr, + server_args); + { + grpc_core::ExecCtx exec_ctx; + grpc_channel_args_destroy(server_args); + } + cqv = cq_verifier_create(f.cq); + c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + nullptr, gpr_inf_future(GPR_CLOCK_REALTIME), + nullptr); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + grpc_metadata compression_md = gzip_compression_override(); + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 1; + op->data.send_initial_metadata.metadata = &compression_md; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = request_payload; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op->flags = 0; + op->reserved = nullptr; + op++; + error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), 1); + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &recv_payload; + op->flags = 0; + op->reserved = nullptr; + op++; + if (minimal_stack) { + /* Expect the RPC to proceed normally for a minimal stack */ + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + status_details = grpc_slice_from_static_string("xyz"); + op->data.send_status_from_server.status_details = &status_details; + op->flags = 0; + op->reserved = nullptr; + op++; + } + error = grpc_call_start_batch(s, ops, static_cast(op - ops), tag(102), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), 1); + CQ_EXPECT_COMPLETION(cqv, tag(1), 1); + cq_verify(cqv); + + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + if (minimal_stack) { + /* We do not perform message size checks for minimal stack. */ + GPR_ASSERT(status == GRPC_STATUS_OK); + } else { + GPR_ASSERT(was_cancelled == 1); + GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED); + GPR_ASSERT(grpc_slice_str_cmp( + details, "Received message larger than max (29 vs. 5)") == + 0); + } + grpc_slice_unref(details); + grpc_slice_unref(request_payload_slice); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(recv_payload); + grpc_call_unref(c); + if (s != nullptr) grpc_call_unref(s); + cq_verifier_destroy(cqv); + + end_test(&f); + config.tear_down_data(&f); +} + +// Test receive message limit with compressed response larger than the limit. +static void test_max_receive_message_length_on_compressed_response( + grpc_end2end_test_config config, bool minimal_stack) { + gpr_log(GPR_INFO, + "testing max receive message length on compressed response with " + "minimal_stack=%d", + minimal_stack); + grpc_end2end_test_fixture f; + grpc_call* c = nullptr; + grpc_call* s = nullptr; + cq_verifier* cqv; + grpc_op ops[6]; + grpc_op* op; + grpc_slice response_payload_slice = grpc_slice_malloc(1024); + memset(GRPC_SLICE_START_PTR(response_payload_slice), 'a', 1024); + grpc_byte_buffer* response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + grpc_byte_buffer* recv_payload = nullptr; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + grpc_slice details; + int was_cancelled = 2; + + // Set limit via channel args. + grpc_arg arg[2]; + arg[0] = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH), 5); + arg[1] = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_MINIMAL_STACK), minimal_stack); + grpc_channel_args* client_args = + grpc_channel_args_copy_and_add(nullptr, arg, 2); + + f = begin_test(config, "test_max_response_message_length", client_args, + nullptr); + { + grpc_core::ExecCtx exec_ctx; + grpc_channel_args_destroy(client_args); + } + cqv = cq_verifier_create(f.cq); + + c = grpc_channel_create_call(f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq, + grpc_slice_from_static_string("/service/method"), + nullptr, gpr_inf_future(GPR_CLOCK_REALTIME), + nullptr); + GPR_ASSERT(c); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message.recv_message = &recv_payload; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv; + op->data.recv_status_on_client.status = &status; + op->data.recv_status_on_client.status_details = &details; + op->flags = 0; + op->reserved = nullptr; + op++; + error = grpc_call_start_batch(c, ops, static_cast(op - ops), tag(1), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + error = + grpc_server_request_call(f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + CQ_EXPECT_COMPLETION(cqv, tag(101), 1); + cq_verify(cqv); + + grpc_metadata compression_md = gzip_compression_override(); + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 1; + op->data.send_initial_metadata.metadata = &compression_md; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message.send_message = response_payload; + op->flags = 0; + op->reserved = nullptr; + op++; + op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; + op->data.send_status_from_server.trailing_metadata_count = 0; + op->data.send_status_from_server.status = GRPC_STATUS_OK; + grpc_slice status_details = grpc_slice_from_static_string("xyz"); + op->data.send_status_from_server.status_details = &status_details; + op->flags = 0; + op->reserved = nullptr; + op++; + error = grpc_call_start_batch(s, ops, static_cast(op - ops), tag(102), + nullptr); + GPR_ASSERT(GRPC_CALL_OK == error); + + CQ_EXPECT_COMPLETION(cqv, tag(102), 1); + CQ_EXPECT_COMPLETION(cqv, tag(1), 1); + cq_verify(cqv); + + GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/service/method")); + if (minimal_stack) { + /* We do not perform message size checks for minimal stack. */ + GPR_ASSERT(status == GRPC_STATUS_OK); + } else { + GPR_ASSERT(status == GRPC_STATUS_RESOURCE_EXHAUSTED); + GPR_ASSERT(grpc_slice_str_cmp( + details, "Received message larger than max (29 vs. 5)") == + 0); + } + grpc_slice_unref(details); + grpc_slice_unref(response_payload_slice); + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_byte_buffer_destroy(response_payload); + grpc_byte_buffer_destroy(recv_payload); + grpc_call_unref(c); if (s != nullptr) grpc_call_unref(s); @@ -500,6 +823,15 @@ void max_message_length(grpc_end2end_test_config config) { test_max_message_length_on_response(config, false /* send_limit */, true /* use_service_config */, true /* use_string_json_value */); + /* The following tests are not useful for inproc transport and do not work + * with our simple proxy. */ + if (strcmp(config.name, "inproc") != 0 && + (config.feature_mask & FEATURE_MASK_SUPPORTS_REQUEST_PROXYING) == 0) { + test_max_receive_message_length_on_compressed_request(config, false); + test_max_receive_message_length_on_compressed_request(config, true); + test_max_receive_message_length_on_compressed_response(config, false); + test_max_receive_message_length_on_compressed_response(config, true); + } } void max_message_length_pre_init(void) {} diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index 803ad38f1c5..b4a70272ea6 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -529,9 +529,10 @@ static void BM_IsolatedFilter(benchmark::State& state) { grpc_call_final_info final_info; TestOp test_op_data; const int kArenaSize = 4096; + grpc_call_context_element context[GRPC_CONTEXT_COUNT] = {}; grpc_call_element_args call_args{call_stack, nullptr, - nullptr, + context, method, start_time, deadline, diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 7d56259977e..036af6fcc6b 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1164,6 +1164,7 @@ src/core/ext/filters/client_channel/server_address.h \ src/core/ext/filters/client_channel/service_config.cc \ src/core/ext/filters/client_channel/service_config.h \ src/core/ext/filters/client_channel/service_config_call_data.h \ +src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/service_config_parser.h \ src/core/ext/filters/client_channel/subchannel.cc \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index a4443ebd080..d33ceb61599 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -965,6 +965,7 @@ src/core/ext/filters/client_channel/server_address.h \ src/core/ext/filters/client_channel/service_config.cc \ src/core/ext/filters/client_channel/service_config.h \ src/core/ext/filters/client_channel/service_config_call_data.h \ +src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc \ src/core/ext/filters/client_channel/service_config_parser.cc \ src/core/ext/filters/client_channel/service_config_parser.h \ src/core/ext/filters/client_channel/subchannel.cc \ From 133f38a88556122fb782ecef35a4b75fccfd5d30 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 23 Jun 2020 12:24:14 -0700 Subject: [PATCH 123/239] Make changes for ResourceQuota and friend namespaces. --- include/grpcpp/impl/codegen/completion_queue_impl.h | 4 ++-- include/grpcpp/server_builder.h | 2 +- include/grpcpp/server_impl.h | 2 +- src/cpp/server/external_connection_acceptor_impl.cc | 2 +- src/cpp/server/server_builder.cc | 12 ++++++------ 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/grpcpp/impl/codegen/completion_queue_impl.h b/include/grpcpp/impl/codegen/completion_queue_impl.h index ecb06f67f18..61538f1d512 100644 --- a/include/grpcpp/impl/codegen/completion_queue_impl.h +++ b/include/grpcpp/impl/codegen/completion_queue_impl.h @@ -255,7 +255,7 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen { private: // Friends for access to server registration lists that enable checking and // logging on shutdown - friend class ServerBuilder; + friend class ::grpc::ServerBuilder; friend class ::grpc_impl::Server; // Friend synchronous wrappers so that they can access Pluck(), which is @@ -445,7 +445,7 @@ class ServerCompletionQueue : public CompletionQueue { polling_type_(polling_type) {} grpc_cq_polling_type polling_type_; - friend class ServerBuilder; + friend class ::grpc::ServerBuilder; friend class ::grpc_impl::Server; }; diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 7600420cb49..818be391528 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -225,7 +225,7 @@ class ServerBuilder { /// Set the attached buffer pool for this server ServerBuilder& SetResourceQuota( - const grpc_impl::ResourceQuota& resource_quota); + const grpc::ResourceQuota& resource_quota); ServerBuilder& SetOption(std::unique_ptr option); diff --git a/include/grpcpp/server_impl.h b/include/grpcpp/server_impl.h index 8e8690b5ce5..887fa7b5f62 100644 --- a/include/grpcpp/server_impl.h +++ b/include/grpcpp/server_impl.h @@ -222,7 +222,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { } friend class grpc::AsyncGenericService; - friend class ServerBuilder; + friend class grpc::ServerBuilder; friend class grpc_impl::ServerInitializer; class SyncRequest; diff --git a/src/cpp/server/external_connection_acceptor_impl.cc b/src/cpp/server/external_connection_acceptor_impl.cc index e03d3c6cc2c..f719e363019 100644 --- a/src/cpp/server/external_connection_acceptor_impl.cc +++ b/src/cpp/server/external_connection_acceptor_impl.cc @@ -20,7 +20,7 @@ #include -#include +#include #include namespace grpc { diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index c7ea966e30f..95f929e9f15 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -68,14 +68,14 @@ ServerBuilder::~ServerBuilder() { } } -std::unique_ptr ServerBuilder::AddCompletionQueue( +std::unique_ptr ServerBuilder::AddCompletionQueue( bool is_frequently_polled) { - ServerCompletionQueue* cq = new ServerCompletionQueue( + grpc_impl::ServerCompletionQueue* cq = new grpc_impl::ServerCompletionQueue( GRPC_CQ_NEXT, is_frequently_polled ? GRPC_CQ_DEFAULT_POLLING : GRPC_CQ_NON_LISTENING, nullptr); cqs_.push_back(cq); - return std::unique_ptr(cq); + return std::unique_ptr(cq); } ServerBuilder& ServerBuilder::RegisterService(Service* service) { @@ -289,9 +289,9 @@ std::unique_ptr ServerBuilder::BuildAndStart() { // This is different from the completion queues added to the server via // ServerBuilder's AddCompletionQueue() method (those completion queues // are in 'cqs_' member variable of ServerBuilder object) - std::shared_ptr>> + std::shared_ptr>> sync_server_cqs(std::make_shared< - std::vector>>()); + std::vector>>()); bool has_frequently_polled_cqs = false; for (const auto& cq : cqs_) { @@ -320,7 +320,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { // Create completion queues to listen to incoming rpc requests for (int i = 0; i < sync_server_settings_.num_cqs; i++) { sync_server_cqs->emplace_back( - new ServerCompletionQueue(GRPC_CQ_NEXT, polling_type, nullptr)); + new grpc_impl::ServerCompletionQueue(GRPC_CQ_NEXT, polling_type, nullptr)); } } From 286a80dad54517e7d7d56618d819a12d22069dc1 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 23 Jun 2020 12:45:21 -0700 Subject: [PATCH 124/239] Resolve the compatibility issue that get_runnint_loop is 3.7+ --- .../grpc/_cython/_cygrpc/aio/common.pyx.pxi | 21 +++++++++++++++++++ .../_cygrpc/aio/completion_queue.pyx.pxi | 9 +++----- .../_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi | 2 +- .../_cygrpc/aio/iomgr/resolver.pyx.pxi | 2 +- .../_cython/_cygrpc/aio/iomgr/socket.pyx.pxi | 2 +- .../_cython/_cygrpc/aio/iomgr/timer.pyx.pxi | 2 +- .../grpcio/grpc/experimental/aio/_channel.py | 2 +- .../grpcio/grpc/experimental/aio/_server.py | 2 +- .../tests_aio/unit/outside_init_test.py | 2 +- 9 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi index 1798bef72f5..bf270e278fa 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from cpython.version cimport PY_MAJOR_VERSION, PY_MINOR_VERSION + cdef grpc_status_code get_status_code(object code) except *: if isinstance(code, int): @@ -165,3 +167,22 @@ async def generator_to_async_generator(object gen, object loop, object thread_po # Port the exception if there is any await future + + +if PY_MAJOR_VERSION >=3 and PY_MINOR_VERSION >=7: + def get_working_loop(): + """Returns a running event loop.""" + return asyncio.get_running_loop() +else: + def get_working_loop(): + """Returns a running event loop. + + Due to a defect of asyncio.get_event_loop, its returned event loop might + not be set as the default event loop for the main thread. So, we will + raise RuntimeError if the returned event loop is not running. + """ + loop = asyncio.get_event_loop() + if loop.is_running(): + return loop + else: + raise RuntimeError('no running event loop') diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi index fbc6e999608..233fbb1de7e 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi @@ -41,11 +41,8 @@ cdef class BaseCompletionQueue: cdef class PollerCompletionQueue(BaseCompletionQueue): def __cinit__(self): - # NOTE(lidiz) Due to a defect of asyncio.get_event_loop, its returned - # event loop might not be set as the default event loop for the main - # thread. So, asyncio.get_running_loop() is needed to ensure the poller - # is bound to a working event loop. - self._loop = asyncio.get_running_loop() + + self._loop = get_working_loop() self._cq = grpc_completion_queue_create_for_next(NULL) self._shutdown = False self._poller_thread = threading.Thread(target=self._poll_wrapper, daemon=True) @@ -123,7 +120,7 @@ cdef class PollerCompletionQueue(BaseCompletionQueue): cdef class CallbackCompletionQueue(BaseCompletionQueue): def __cinit__(self): - self._loop = asyncio.get_running_loop() + self._loop = get_working_loop() self._shutdown_completed = self._loop.create_future() self._wrapper = CallbackWrapper( self._shutdown_completed, diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi index b845e4d1e8c..917ae24e11e 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/iomgr.pyx.pxi @@ -216,7 +216,7 @@ def _auth_plugin_callback_wrapper(object cb, str service_url, str method_name, object callback): - asyncio.get_running_loop().call_soon(cb, service_url, method_name, callback) + get_working_loop().call_soon(cb, service_url, method_name, callback) def install_asyncio_iomgr(): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/resolver.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/resolver.pyx.pxi index 812b5168d9f..1a2e244ff9c 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/resolver.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/resolver.pyx.pxi @@ -15,7 +15,7 @@ cdef class _AsyncioResolver: def __cinit__(self): - self._loop = asyncio.get_running_loop() + self._loop = get_working_loop() self._grpc_resolver = NULL self._task_resolve = None diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi index ad8b3d93fc1..eecef17d98a 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/socket.pyx.pxi @@ -37,7 +37,7 @@ cdef class _AsyncioSocket: self._py_socket = None self._peername = None self._closed = False - self._loop = asyncio.get_running_loop() + self._loop = get_working_loop() @staticmethod cdef _AsyncioSocket create(grpc_custom_socket * grpc_socket, diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/timer.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/timer.pyx.pxi index 77769c91e87..c1508373a4b 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/timer.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/iomgr/timer.pyx.pxi @@ -18,7 +18,7 @@ cdef class _AsyncioTimer: self._grpc_timer = NULL self._timer_future = None self._active = False - self._loop = asyncio.get_running_loop() + self._loop = get_working_loop() cpython.Py_INCREF(self) @staticmethod diff --git a/src/python/grpcio/grpc/experimental/aio/_channel.py b/src/python/grpcio/grpc/experimental/aio/_channel.py index 5fcfcb637e2..3af34677064 100644 --- a/src/python/grpcio/grpc/experimental/aio/_channel.py +++ b/src/python/grpcio/grpc/experimental/aio/_channel.py @@ -269,7 +269,7 @@ class Channel(_base_channel.Channel): "{} or ".format(StreamUnaryClientInterceptor.__name__) + "{}. ".format(StreamStreamClientInterceptor.__name__)) - self._loop = asyncio.get_running_loop() + self._loop = cygrpc.get_working_loop() self._channel = cygrpc.AioChannel( _common.encode(target), _augment_channel_arguments(options, compression), credentials, diff --git a/src/python/grpcio/grpc/experimental/aio/_server.py b/src/python/grpcio/grpc/experimental/aio/_server.py index 2a2b846de20..3d12f514946 100644 --- a/src/python/grpcio/grpc/experimental/aio/_server.py +++ b/src/python/grpcio/grpc/experimental/aio/_server.py @@ -41,7 +41,7 @@ class Server(_base_server.Server): options: ChannelArgumentType, maximum_concurrent_rpcs: Optional[int], compression: Optional[grpc.Compression]): - self._loop = asyncio.get_running_loop() + self._loop = cygrpc.get_working_loop() if interceptors: invalid_interceptors = [ interceptor for interceptor in interceptors diff --git a/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py b/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py index aa028fe9adb..ca43f5727fd 100644 --- a/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py +++ b/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py @@ -34,7 +34,7 @@ class TestOutsideInit(unittest.TestCase): aio.secure_channel('', channel_creds) with self.assertRaises(RuntimeError): - aio.server('', None) + aio.server() # Ensures init_grpc_aio fail outside of AsyncIO with self.assertRaises(RuntimeError): From f27c30ef60fa23a399985ca12e4d8482e44d2fd1 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 23 Jun 2020 12:49:36 -0700 Subject: [PATCH 125/239] Fix formatting --- include/grpcpp/server_builder.h | 3 +-- src/cpp/server/server_builder.cc | 16 +++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 818be391528..746bda90a0a 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -224,8 +224,7 @@ class ServerBuilder { grpc_compression_algorithm algorithm); /// Set the attached buffer pool for this server - ServerBuilder& SetResourceQuota( - const grpc::ResourceQuota& resource_quota); + ServerBuilder& SetResourceQuota(const grpc::ResourceQuota& resource_quota); ServerBuilder& SetOption(std::unique_ptr option); diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 95f929e9f15..f42bace5fe9 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -68,8 +68,8 @@ ServerBuilder::~ServerBuilder() { } } -std::unique_ptr ServerBuilder::AddCompletionQueue( - bool is_frequently_polled) { +std::unique_ptr +ServerBuilder::AddCompletionQueue(bool is_frequently_polled) { grpc_impl::ServerCompletionQueue* cq = new grpc_impl::ServerCompletionQueue( GRPC_CQ_NEXT, is_frequently_polled ? GRPC_CQ_DEFAULT_POLLING : GRPC_CQ_NON_LISTENING, @@ -289,9 +289,11 @@ std::unique_ptr ServerBuilder::BuildAndStart() { // This is different from the completion queues added to the server via // ServerBuilder's AddCompletionQueue() method (those completion queues // are in 'cqs_' member variable of ServerBuilder object) - std::shared_ptr>> - sync_server_cqs(std::make_shared< - std::vector>>()); + std::shared_ptr< + std::vector>> + sync_server_cqs( + std::make_shared>>()); bool has_frequently_polled_cqs = false; for (const auto& cq : cqs_) { @@ -319,8 +321,8 @@ std::unique_ptr ServerBuilder::BuildAndStart() { // Create completion queues to listen to incoming rpc requests for (int i = 0; i < sync_server_settings_.num_cqs; i++) { - sync_server_cqs->emplace_back( - new grpc_impl::ServerCompletionQueue(GRPC_CQ_NEXT, polling_type, nullptr)); + sync_server_cqs->emplace_back(new grpc_impl::ServerCompletionQueue( + GRPC_CQ_NEXT, polling_type, nullptr)); } } From 0e646e537e3d0ec8eaadf4d64b3b375b12c0f813 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 23 Jun 2020 12:51:27 -0700 Subject: [PATCH 126/239] Use pure virtual functions at TransportFlowControlBase --- .../transport/chttp2/transport/flow_control.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/flow_control.h b/src/core/ext/transport/chttp2/transport/flow_control.h index f083ab10878..e58c2df83ea 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.h +++ b/src/core/ext/transport/chttp2/transport/flow_control.h @@ -140,8 +140,7 @@ class FlowControlTrace { }; // Fat interface with all methods a flow control implementation needs to -// support. gRPC C Core does not support pure virtual functions, so instead -// we abort in any methods which require implementation in the base class. +// support. class TransportFlowControlBase { public: TransportFlowControlBase() {} @@ -149,30 +148,30 @@ class TransportFlowControlBase { // Is flow control enabled? This is needed in other codepaths like the checks // in parsing and in writing. - virtual bool flow_control_enabled() const { abort(); } + virtual bool flow_control_enabled() const = 0; // Called to check if the transport needs to send a WINDOW_UPDATE frame - virtual uint32_t MaybeSendUpdate(bool /* writing_anyway */) { abort(); } + virtual uint32_t MaybeSendUpdate(bool /* writing_anyway */) = 0; // Using the protected members, returns and Action to be taken by the // tranport. - virtual FlowControlAction MakeAction() { abort(); } + virtual FlowControlAction MakeAction() = 0; // Using the protected members, returns and Action to be taken by the // tranport. Also checks for updates to our BDP estimate and acts // accordingly. - virtual FlowControlAction PeriodicUpdate() { abort(); } + virtual FlowControlAction PeriodicUpdate() = 0; // Called to do bookkeeping when a stream owned by this transport sends // data on the wire - virtual void StreamSentData(int64_t /* size */) { abort(); } + virtual void StreamSentData(int64_t /* size */) = 0; // Called to do bookkeeping when a stream owned by this transport receives // data from the wire. Also does error checking for frame size. - virtual grpc_error* RecvData(int64_t /* incoming_frame_size */) { abort(); } + virtual grpc_error* RecvData(int64_t /* incoming_frame_size */) = 0; // Called to do bookkeeping when we receive a WINDOW_UPDATE frame. - virtual void RecvUpdate(uint32_t /* size */) { abort(); } + virtual void RecvUpdate(uint32_t /* size */) = 0; // Returns the BdpEstimator held by this object. Caller is responsible for // checking for nullptr. TODO(ncteisen): consider fully encapsulating all From 1bb04d8420c38235e497d2402cf4704325c0f06c Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 23 Jun 2020 12:57:03 -0700 Subject: [PATCH 127/239] Use pure virtual functions at StreamFlowControlBase --- build_autogenerated.yaml | 2 -- .../ext/transport/chttp2/transport/flow_control.h | 13 ++++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 3ac9f3c74b9..36973a5b3da 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -2149,7 +2149,6 @@ libs: - include/grpcpp/impl/server_initializer_impl.h - include/grpcpp/impl/service_type.h - include/grpcpp/resource_quota.h - - include/grpcpp/resource_quota_impl.h - include/grpcpp/security/auth_context.h - include/grpcpp/security/auth_metadata_processor.h - include/grpcpp/security/auth_metadata_processor_impl.h @@ -2543,7 +2542,6 @@ libs: - include/grpcpp/impl/server_initializer_impl.h - include/grpcpp/impl/service_type.h - include/grpcpp/resource_quota.h - - include/grpcpp/resource_quota_impl.h - include/grpcpp/security/auth_context.h - include/grpcpp/security/auth_metadata_processor.h - include/grpcpp/security/auth_metadata_processor_impl.h diff --git a/src/core/ext/transport/chttp2/transport/flow_control.h b/src/core/ext/transport/chttp2/transport/flow_control.h index e58c2df83ea..391ebbedbf2 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.h +++ b/src/core/ext/transport/chttp2/transport/flow_control.h @@ -333,8 +333,7 @@ class TransportFlowControl final : public TransportFlowControlBase { }; // Fat interface with all methods a stream flow control implementation needs -// to support. gRPC C Core does not support pure virtual functions, so instead -// we abort in any methods which require implementation in the base class. +// to support. class StreamFlowControlBase { public: StreamFlowControlBase() {} @@ -347,19 +346,19 @@ class StreamFlowControlBase { // Using the protected members, returns an Action for this stream to be // taken by the tranport. - virtual FlowControlAction MakeAction() { abort(); } + virtual FlowControlAction MakeAction() = 0; // Bookkeeping for when data is sent on this stream. - virtual void SentData(int64_t /* outgoing_frame_size */) { abort(); } + virtual void SentData(int64_t /* outgoing_frame_size */) = 0; // Bookkeeping and error checking for when data is received by this stream. - virtual grpc_error* RecvData(int64_t /* incoming_frame_size */) { abort(); } + virtual grpc_error* RecvData(int64_t /* incoming_frame_size */) = 0; // Called to check if this stream needs to send a WINDOW_UPDATE frame. - virtual uint32_t MaybeSendUpdate() { abort(); } + virtual uint32_t MaybeSendUpdate() = 0; // Bookkeeping for receiving a WINDOW_UPDATE from for this stream. - virtual void RecvUpdate(uint32_t /* size */) { abort(); } + virtual void RecvUpdate(uint32_t /* size */) = 0; // Bookkeeping for when a call pulls bytes out of the transport. At this // point we consider the data 'used' and can thus let out peer know we are From 14d499a50fc24e9b144b6e663356606fa88c9ce6 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 23 Jun 2020 13:01:01 -0700 Subject: [PATCH 128/239] Make PyLint happy --- src/python/grpcio/grpc/experimental/aio/_server.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/python/grpcio/grpc/experimental/aio/_server.py b/src/python/grpcio/grpc/experimental/aio/_server.py index 3d12f514946..009d85d3767 100644 --- a/src/python/grpcio/grpc/experimental/aio/_server.py +++ b/src/python/grpcio/grpc/experimental/aio/_server.py @@ -13,7 +13,6 @@ # limitations under the License. """Server-side implementation of gRPC Asyncio Python.""" -import asyncio from concurrent.futures import Executor from typing import Any, Optional, Sequence From 3c90c762b32f001b05525b4332a2261fcc7fb525 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 23 Jun 2020 13:56:08 -0700 Subject: [PATCH 129/239] Move ServerPosix from ::grpc_impl to ::grpc Revert https://github.com/grpc/grpc/pull/18372/files --- include/grpcpp/server_posix.h | 14 +++++++--- include/grpcpp/server_posix_impl.h | 42 ------------------------------ src/cpp/server/server_posix.cc | 4 +-- 3 files changed, 12 insertions(+), 48 deletions(-) delete mode 100644 include/grpcpp/server_posix_impl.h diff --git a/include/grpcpp/server_posix.h b/include/grpcpp/server_posix.h index 3d209cbc14f..ef3ee01a5c6 100644 --- a/include/grpcpp/server_posix.h +++ b/include/grpcpp/server_posix.h @@ -19,15 +19,21 @@ #ifndef GRPCPP_SERVER_POSIX_H #define GRPCPP_SERVER_POSIX_H -#include +#include + +#include +#include namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -static inline void AddInsecureChannelFromFd(Server* server, int fd) { - ::grpc_impl::AddInsecureChannelFromFd(server, fd); -} +/// Add a new client to a \a Server communicating over the given +/// file descriptor. +/// +/// \param server The server to add the client to. +/// \param fd The file descriptor representing a socket. +void AddInsecureChannelFromFd(Server* server, int fd); #endif // GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/include/grpcpp/server_posix_impl.h b/include/grpcpp/server_posix_impl.h deleted file mode 100644 index 645dd600723..00000000000 --- a/include/grpcpp/server_posix_impl.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPCPP_SERVER_POSIX_IMPL_H -#define GRPCPP_SERVER_POSIX_IMPL_H - -#include - -#include -#include - -namespace grpc_impl { - -#ifdef GPR_SUPPORT_CHANNELS_FROM_FD - -/// Add a new client to a \a Server communicating over the given -/// file descriptor. -/// -/// \param server The server to add the client to. -/// \param fd The file descriptor representing a socket. -void AddInsecureChannelFromFd(grpc::Server* server, int fd); - -#endif // GPR_SUPPORT_CHANNELS_FROM_FD - -} // namespace grpc_impl - -#endif // GRPCPP_SERVER_POSIX_IMPL_H diff --git a/src/cpp/server/server_posix.cc b/src/cpp/server/server_posix.cc index 7b77e24bc0e..c3d40d4fa2d 100644 --- a/src/cpp/server/server_posix.cc +++ b/src/cpp/server/server_posix.cc @@ -20,7 +20,7 @@ #include -namespace grpc_impl { +namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD @@ -30,4 +30,4 @@ void AddInsecureChannelFromFd(grpc::Server* server, int fd) { #endif // GPR_SUPPORT_CHANNELS_FROM_FD -} // namespace grpc_impl +} // namespace grpc From bdc83185d37419337df51a2d65e258d0648a6bd9 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 23 Jun 2020 13:59:13 -0700 Subject: [PATCH 130/239] Incrementally remove docker images as we test --- .../run_interop_matrix_tests.py | 117 ++++++++---------- 1 file changed, 52 insertions(+), 65 deletions(-) diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py index 2e11a715029..a68b703f1fd 100755 --- a/tools/interop_matrix/run_interop_matrix_tests.py +++ b/tools/interop_matrix/run_interop_matrix_tests.py @@ -203,69 +203,37 @@ def _generate_test_case_jobspecs(lang, runtime, release, suite_name): return job_spec_list -def _pull_images_for_lang(lang, images): - """Pull all images for given lang from container registry.""" - jobset.message('START', - 'Downloading images for language "%s"' % lang, - do_newline=True) - download_specs = [] - for release, image in images: - # Pull the image and warm it up. - # First time we use an image with "docker run", it takes time to unpack - # the image and later this delay would fail our test cases. - cmdline = [ - 'time gcloud docker -- pull %s && time docker run --rm=true %s /bin/true' - % (image, image) - ] - spec = jobset.JobSpec(cmdline=cmdline, - shortname='pull_image_%s' % (image), - timeout_seconds=_PULL_IMAGE_TIMEOUT_SECONDS, - shell=True, - flake_retries=2) - download_specs.append(spec) - # too many image downloads at once tend to get stuck - max_pull_jobs = min(args.jobs, _MAX_PARALLEL_DOWNLOADS) - num_failures, resultset = jobset.run(download_specs, +# TODO: Return a spec and then parallelize. +def _pull_image_for_lang(lang, image, release): + """Pull an image for a given language form the image registry.""" + cmdline = [ + 'time gcloud docker -- pull %s && time docker run --rm=true %s /bin/true' + % (image, image) + ] + spec = jobset.JobSpec(cmdline=cmdline, + shortname='pull_image_{}'.format(image), + timeout_seconds=_PULL_IMAGE_TIMEOUT_SECONDS, + shell=True, + # TODO: Pull out to constant. + flake_retries=2) + num_failures, resultset = jobset.run([spec], newline_on_success=True, - maxjobs=max_pull_jobs) - if num_failures: - jobset.message('FAILED', - 'Failed to download some images', - do_newline=True) - return False - else: - jobset.message('SUCCESS', - 'All images downloaded successfully.', - do_newline=True) - return True - + maxjobs=1) + return not num_failures -def _run_tests_for_lang(lang, runtime, images, xml_report_tree): - """Find and run all test cases for a language. - - images is a list of (, ) tuple. - """ - skip_tests = False - if not _pull_images_for_lang(lang, images): - jobset.message( - 'FAILED', - 'Image download failed. Skipping tests for language "%s"' % lang, - do_newline=True) - skip_tests = True +def _test_release(lang, runtime, release, image, xml_report_tree, skip_tests): total_num_failures = 0 - for release, image in images: - suite_name = '%s__%s_%s' % (lang, runtime, release) - job_spec_list = _generate_test_case_jobspecs(lang, runtime, release, - suite_name) - - if not job_spec_list: - jobset.message('FAILED', - 'No test cases were found.', - do_newline=True) - total_num_failures += 1 - continue + suite_name = '%s__%s_%s' % (lang, runtime, release) + job_spec_list = _generate_test_case_jobspecs(lang, runtime, release, + suite_name) + if not job_spec_list: + jobset.message('FAILED', + 'No test cases were found.', + do_newline=True) + total_num_failures += 1 + else: num_failures, resultset = jobset.run(job_spec_list, newline_on_success=True, add_env={'docker_image': image}, @@ -275,22 +243,41 @@ def _run_tests_for_lang(lang, runtime, images, xml_report_tree): upload_test_results.upload_interop_results_to_bq( resultset, args.bq_result_table) if skip_tests: - jobset.message('FAILED', 'Tests were skipped', do_newline=True) + jobset.message('FAILED', 'Tests were skipped', + do_newline=True) total_num_failures += 1 - elif num_failures: - jobset.message('FAILED', 'Some tests failed', do_newline=True) + if num_failures: total_num_failures += num_failures - else: - jobset.message('SUCCESS', 'All tests passed', do_newline=True) report_utils.append_junit_xml_results(xml_report_tree, resultset, 'grpc_interop_matrix', suite_name, str(uuid.uuid4())) + return total_num_failures + - # cleanup all downloaded docker images - for _, image in images: +def _run_tests_for_lang(lang, runtime, images, xml_report_tree): + """Find and run all test cases for a language. + + images is a list of (, ) tuple. + """ + skip_tests = False + total_num_failures = 0 + + # TODO: Do more intelligent chunking. + for release, image in images: + if not skip_tests and not _pull_image_for_lang(lang, image, release): + jobset.message( + 'FAILED', + 'Image download failed. Skipping tests for language "%s"' % lang, + do_newline=True) + skip_tests = True + total_num_failures += _test_release(lang, runtime, release, image, xml_report_tree, skip_tests) if not args.keep: _cleanup_docker_image(image) + if not total_num_failures: + jobset.message('SUCCESS', 'All {} tests passed'.format(lang), do_newline=True) + else: + jobset.message('FAILED', 'Some {} tests failed'.format(lang), do_newline=True) return total_num_failures From a5ab31ac29d74fd37e949533427f062b24077369 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 23 Jun 2020 14:02:55 -0700 Subject: [PATCH 131/239] Add build_abseil-cpp_at_head --- .../linux/grpc_build_abseil-cpp_at_head.cfg | 31 +++++++++++++++++++ .../linux/grpc_build_submodule_at_head.sh | 5 +++ 2 files changed, 36 insertions(+) create mode 100644 tools/internal_ci/linux/grpc_build_abseil-cpp_at_head.cfg diff --git a/tools/internal_ci/linux/grpc_build_abseil-cpp_at_head.cfg b/tools/internal_ci/linux/grpc_build_abseil-cpp_at_head.cfg new file mode 100644 index 00000000000..7983cd3dd3c --- /dev/null +++ b/tools/internal_ci/linux/grpc_build_abseil-cpp_at_head.cfg @@ -0,0 +1,31 @@ +# Copyright 2020 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Config file for the internal CI (in protobuf text format) + +# Location of the continuous shell script in repository. +build_file: "grpc/tools/internal_ci/linux/grpc_build_submodule_at_head.sh" +timeout_mins: 240 +action { + define_artifacts { + regex: "**/*sponge_log.*" + regex: "github/grpc/reports/**" + } +} + +# Tiny hack: misusing an already whitelisted env var to pass submodule name +env_vars { + key: "RUN_TESTS_FLAGS" + value: "abseil-cpp" +} diff --git a/tools/internal_ci/linux/grpc_build_submodule_at_head.sh b/tools/internal_ci/linux/grpc_build_submodule_at_head.sh index f91beddb5de..ea96edca589 100755 --- a/tools/internal_ci/linux/grpc_build_submodule_at_head.sh +++ b/tools/internal_ci/linux/grpc_build_submodule_at_head.sh @@ -40,6 +40,11 @@ echo "2) some change that was just merged in the submodule head has caused the f echo "" echo "submodule '${SUBMODULE_NAME}' is at commit: $(cd third_party/${SUBMODULE_NAME}; git rev-parse --verify HEAD)" +if [ "${SUBMODULE_NAME}" == "abseil-cpp" ] +then + src/abseil-cpp/preprocessed_builds.yaml.gen.py +fi + tools/buildgen/generate_projects.sh if [ "${SUBMODULE_NAME}" == "protobuf" ] From 1010d3a6199a02c966e762488cea46b1227ef498 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 23 Jun 2020 14:30:30 -0700 Subject: [PATCH 132/239] Batch download jobs --- .../run_interop_matrix_tests.py | 36 ++++++++++++------- 1 file changed, 24 insertions(+), 12 deletions(-) mode change 100755 => 100644 tools/interop_matrix/run_interop_matrix_tests.py diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py old mode 100755 new mode 100644 index a68b703f1fd..d6a1489a3eb --- a/tools/interop_matrix/run_interop_matrix_tests.py +++ b/tools/interop_matrix/run_interop_matrix_tests.py @@ -203,23 +203,17 @@ def _generate_test_case_jobspecs(lang, runtime, release, suite_name): return job_spec_list -# TODO: Return a spec and then parallelize. def _pull_image_for_lang(lang, image, release): """Pull an image for a given language form the image registry.""" cmdline = [ 'time gcloud docker -- pull %s && time docker run --rm=true %s /bin/true' % (image, image) ] - spec = jobset.JobSpec(cmdline=cmdline, + return jobset.JobSpec(cmdline=cmdline, shortname='pull_image_{}'.format(image), timeout_seconds=_PULL_IMAGE_TIMEOUT_SECONDS, shell=True, - # TODO: Pull out to constant. flake_retries=2) - num_failures, resultset = jobset.run([spec], - newline_on_success=True, - maxjobs=1) - return not num_failures def _test_release(lang, runtime, release, image, xml_report_tree, skip_tests): @@ -263,17 +257,35 @@ def _run_tests_for_lang(lang, runtime, images, xml_report_tree): skip_tests = False total_num_failures = 0 - # TODO: Do more intelligent chunking. - for release, image in images: - if not skip_tests and not _pull_image_for_lang(lang, image, release): + max_pull_jobs = min(args.jobs, _MAX_PARALLEL_DOWNLOADS) + max_chunk_size = max_pull_jobs + chunk_count = (len(images) + max_chunk_size) // max_chunk_size + + for chunk_index in range(chunk_count): + chunk_start = chunk_index * max_chunk_size + chunk_size = min(max_chunk_size, len(images) - chunk_start) + chunk_end = chunk_start + chunk_size + pull_specs = [] + if not skip_tests: + for release, image in images[chunk_start:chunk_end]: + pull_specs.append(_pull_image_for_lang(lang, image, release)) + + # NOTE(rbellevi): We batch docker pull operations to maximize + # parallelism, without letting the disk usage grow unbounded. + pull_failures, _ = jobset.run(pull_specs, + newline_on_success=True, + maxjobs=max_pull_jobs) + if pull_failures: jobset.message( 'FAILED', 'Image download failed. Skipping tests for language "%s"' % lang, do_newline=True) skip_tests = True - total_num_failures += _test_release(lang, runtime, release, image, xml_report_tree, skip_tests) + for release, image in images[chunk_start:chunk_end]: + total_num_failures += _test_release(lang, runtime, release, image, xml_report_tree, skip_tests) if not args.keep: - _cleanup_docker_image(image) + for _, image in images[chunk_start:chunk_end]: + _cleanup_docker_image(image) if not total_num_failures: jobset.message('SUCCESS', 'All {} tests passed'.format(lang), do_newline=True) else: From 09007ebccff359ad9a0bd84b913c55df5ff023bc Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Tue, 23 Jun 2020 14:31:55 -0700 Subject: [PATCH 133/239] Yapf --- .../run_interop_matrix_tests.py | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py index d6a1489a3eb..be92458ea62 100644 --- a/tools/interop_matrix/run_interop_matrix_tests.py +++ b/tools/interop_matrix/run_interop_matrix_tests.py @@ -210,10 +210,10 @@ def _pull_image_for_lang(lang, image, release): % (image, image) ] return jobset.JobSpec(cmdline=cmdline, - shortname='pull_image_{}'.format(image), - timeout_seconds=_PULL_IMAGE_TIMEOUT_SECONDS, - shell=True, - flake_retries=2) + shortname='pull_image_{}'.format(image), + timeout_seconds=_PULL_IMAGE_TIMEOUT_SECONDS, + shell=True, + flake_retries=2) def _test_release(lang, runtime, release, image, xml_report_tree, skip_tests): @@ -223,9 +223,7 @@ def _test_release(lang, runtime, release, image, xml_report_tree, skip_tests): suite_name) if not job_spec_list: - jobset.message('FAILED', - 'No test cases were found.', - do_newline=True) + jobset.message('FAILED', 'No test cases were found.', do_newline=True) total_num_failures += 1 else: num_failures, resultset = jobset.run(job_spec_list, @@ -237,8 +235,7 @@ def _test_release(lang, runtime, release, image, xml_report_tree, skip_tests): upload_test_results.upload_interop_results_to_bq( resultset, args.bq_result_table) if skip_tests: - jobset.message('FAILED', 'Tests were skipped', - do_newline=True) + jobset.message('FAILED', 'Tests were skipped', do_newline=True) total_num_failures += 1 if num_failures: total_num_failures += num_failures @@ -278,18 +275,24 @@ def _run_tests_for_lang(lang, runtime, images, xml_report_tree): if pull_failures: jobset.message( 'FAILED', - 'Image download failed. Skipping tests for language "%s"' % lang, + 'Image download failed. Skipping tests for language "%s"' % + lang, do_newline=True) skip_tests = True for release, image in images[chunk_start:chunk_end]: - total_num_failures += _test_release(lang, runtime, release, image, xml_report_tree, skip_tests) + total_num_failures += _test_release(lang, runtime, release, image, + xml_report_tree, skip_tests) if not args.keep: for _, image in images[chunk_start:chunk_end]: _cleanup_docker_image(image) if not total_num_failures: - jobset.message('SUCCESS', 'All {} tests passed'.format(lang), do_newline=True) + jobset.message('SUCCESS', + 'All {} tests passed'.format(lang), + do_newline=True) else: - jobset.message('FAILED', 'Some {} tests failed'.format(lang), do_newline=True) + jobset.message('FAILED', + 'Some {} tests failed'.format(lang), + do_newline=True) return total_num_failures From 0fe7738330724b9139c24b068b64dc8875442615 Mon Sep 17 00:00:00 2001 From: Sanjay Pujare Date: Tue, 23 Jun 2020 14:37:21 -0700 Subject: [PATCH 134/239] Add grpc-java v1.30.2 to interop test client matrix --- tools/interop_matrix/client_matrix.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index e38c1c77ee9..b85ea3ba20c 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -221,6 +221,7 @@ LANG_RELEASE_MATRIX = { ('v1.29.0', ReleaseInfo()), ('v1.30.0', ReleaseInfo()), ('v1.30.1', ReleaseInfo()), + ('v1.30.2', ReleaseInfo()), ]), 'python': OrderedDict([ From 681d2fcb082ce08f46be40a424679b160a9b053d Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 23 Jun 2020 14:38:15 -0700 Subject: [PATCH 135/239] Rename com_github_google_googletest to com_google_googletest --- bazel/grpc_deps.bzl | 6 +++--- tools/run_tests/sanity/check_bazel_workspace.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index 05c2cc22d55..1ffa21bbde9 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -63,7 +63,7 @@ def grpc_deps(): native.bind( name = "gtest", - actual = "@com_github_google_googletest//:gtest", + actual = "@com_google_googletest//:gtest", ) native.bind( @@ -162,9 +162,9 @@ def grpc_deps(): ], ) - if "com_github_google_googletest" not in native.existing_rules(): + if "com_google_googletest" not in native.existing_rules(): http_archive( - name = "com_github_google_googletest", + name = "com_google_googletest", sha256 = "443d383db648ebb8e391382c0ab63263b7091d03197f304390baac10f178a468", strip_prefix = "googletest-c9ccac7cb7345901884aabf5d1a786cfa6e2f397", urls = [ diff --git a/tools/run_tests/sanity/check_bazel_workspace.py b/tools/run_tests/sanity/check_bazel_workspace.py index 6a01e71a9e1..9e53dff1b79 100755 --- a/tools/run_tests/sanity/check_bazel_workspace.py +++ b/tools/run_tests/sanity/check_bazel_workspace.py @@ -46,7 +46,7 @@ _GRPC_DEP_NAMES = [ 'boringssl', 'zlib', 'com_google_protobuf', - 'com_github_google_googletest', + 'com_google_googletest', 'rules_cc', 'com_github_gflags_gflags', 'com_github_google_benchmark', From 06b1a9b0d3f83bdbaafe846a69af16602883ad69 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 23 Jun 2020 15:01:07 -0700 Subject: [PATCH 136/239] Add manylinux2014 docker images --- .../Dockerfile | 28 +++++++++++++++++++ .../Dockerfile | 28 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile create mode 100644 tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile new file mode 100644 index 00000000000..5e8fed0a0f2 --- /dev/null +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile @@ -0,0 +1,28 @@ +# Copyright 2020 The gRPC Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Docker file for building gRPC manylinux Python artifacts. + +FROM quay.io/pypa/manylinux2014_x86_64 + +# Update the package manager +RUN yum update -y +RUN yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel + +################################### +# Install Python build requirements +RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython +RUN /opt/python/cp36-cp36m/bin/pip install --upgrade cython +RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython +RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile new file mode 100644 index 00000000000..6695f642f74 --- /dev/null +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile @@ -0,0 +1,28 @@ +# Copyright 2020 The gRPC Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Docker file for building gRPC manylinux Python artifacts. + +FROM quay.io/pypa/manylinux2014_i686 + +# Update the package manager +RUN yum update -y +RUN yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel + +################################### +# Install Python build requirements +RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython +RUN /opt/python/cp36-cp36m/bin/pip install --upgrade cython +RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython +RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython From 445f6814ebcb22dbecb75e16f90d7c6018dc0f03 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 23 Jun 2020 15:09:04 -0700 Subject: [PATCH 137/239] Add manylinux2014 artifacts --- tools/run_tests/artifacts/artifact_targets.py | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index dbc37e6f57c..c7e3d81fb44 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -350,8 +350,20 @@ def targets(): CSharpExtArtifact('linux', 'android', arch_abi='armeabi-v7a'), CSharpExtArtifact('linux', 'android', arch_abi='x86'), CSharpExtArtifact('macos', 'ios'), - # TODO(https://github.com/grpc/grpc/issues/20283) - # Add manylinux2010_x86 targets once this issue is resolved. + PythonArtifact('manylinux2014', 'x64', 'cp35-cp35m'), + PythonArtifact('manylinux2014', 'x64', 'cp36-cp36m'), + PythonArtifact('manylinux2014', 'x64', 'cp37-cp37m'), + PythonArtifact('manylinux2014', 'x64', 'cp38-cp38'), + PythonArtifact('manylinux2014', 'x86', 'cp35-cp35m'), + PythonArtifact('manylinux2014', 'x86', 'cp36-cp36m'), + PythonArtifact('manylinux2014', 'x86', 'cp37-cp37m'), + PythonArtifact('manylinux2014', 'x86', 'cp38-cp38'), + PythonArtifact('manylinux2010', 'x64', 'cp27-cp27m'), + PythonArtifact('manylinux2010', 'x64', 'cp27-cp27mu'), + PythonArtifact('manylinux2010', 'x64', 'cp35-cp35m'), + PythonArtifact('manylinux2010', 'x64', 'cp36-cp36m'), + PythonArtifact('manylinux2010', 'x64', 'cp37-cp37m'), + PythonArtifact('manylinux2010', 'x64', 'cp38-cp38'), PythonArtifact('manylinux2010', 'x86', 'cp27-cp27m'), PythonArtifact('manylinux2010', 'x86', 'cp27-cp27mu'), PythonArtifact('manylinux2010', 'x86', 'cp35-cp35m'), @@ -364,12 +376,6 @@ def targets(): PythonArtifact('linux_extra', 'armv6', '2.7'), PythonArtifact('linux_extra', 'armv6', '3.5'), PythonArtifact('linux_extra', 'armv6', '3.6'), - PythonArtifact('manylinux2010', 'x64', 'cp27-cp27m'), - PythonArtifact('manylinux2010', 'x64', 'cp27-cp27mu'), - PythonArtifact('manylinux2010', 'x64', 'cp35-cp35m'), - PythonArtifact('manylinux2010', 'x64', 'cp36-cp36m'), - PythonArtifact('manylinux2010', 'x64', 'cp37-cp37m'), - PythonArtifact('manylinux2010', 'x64', 'cp38-cp38'), PythonArtifact('macos', 'x64', 'python2.7'), PythonArtifact('macos', 'x64', 'python3.5'), PythonArtifact('macos', 'x64', 'python3.6'), From 1f090fdb86659a3e9bf8d702593eaba93a7ffa44 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 23 Jun 2020 15:22:21 -0700 Subject: [PATCH 138/239] Regen build_autogenerated.yaml --- build_autogenerated.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 3ac9f3c74b9..76f0de0635a 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -2074,7 +2074,6 @@ libs: - include/grpcpp/generic/generic_stub_impl.h - include/grpcpp/grpcpp.h - include/grpcpp/health_check_service_interface.h - - include/grpcpp/health_check_service_interface_impl.h - include/grpcpp/impl/call.h - include/grpcpp/impl/channel_argument_option.h - include/grpcpp/impl/client_unary_call.h @@ -2149,7 +2148,6 @@ libs: - include/grpcpp/impl/server_initializer_impl.h - include/grpcpp/impl/service_type.h - include/grpcpp/resource_quota.h - - include/grpcpp/resource_quota_impl.h - include/grpcpp/security/auth_context.h - include/grpcpp/security/auth_metadata_processor.h - include/grpcpp/security/auth_metadata_processor_impl.h @@ -2468,7 +2466,6 @@ libs: - include/grpcpp/generic/generic_stub_impl.h - include/grpcpp/grpcpp.h - include/grpcpp/health_check_service_interface.h - - include/grpcpp/health_check_service_interface_impl.h - include/grpcpp/impl/call.h - include/grpcpp/impl/channel_argument_option.h - include/grpcpp/impl/client_unary_call.h @@ -2543,7 +2540,6 @@ libs: - include/grpcpp/impl/server_initializer_impl.h - include/grpcpp/impl/service_type.h - include/grpcpp/resource_quota.h - - include/grpcpp/resource_quota_impl.h - include/grpcpp/security/auth_context.h - include/grpcpp/security/auth_metadata_processor.h - include/grpcpp/security/auth_metadata_processor_impl.h From b9088ee9dd047678ef7b63e030856bf9cbadde3f Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 23 Jun 2020 15:56:25 -0700 Subject: [PATCH 139/239] Address comments --- doc/python/sphinx/grpc_asyncio.rst | 8 ++------ src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi | 5 +++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/doc/python/sphinx/grpc_asyncio.rst b/doc/python/sphinx/grpc_asyncio.rst index 3513f16f036..fb878aef0af 100644 --- a/doc/python/sphinx/grpc_asyncio.rst +++ b/doc/python/sphinx/grpc_asyncio.rst @@ -24,12 +24,8 @@ gRPC Async API objects may only be used on the thread on which they were created. AsyncIO doesn't provide thread safety for most of its APIs. -Enable AsyncIO in gRPC ----------------------- - -Enable AsyncIO in gRPC Python is automatic when instantiating gRPC AsyncIO -objects (e.g., channels and servers). No additional function invocation is -required. +Blocking Code in AsyncIO +------------------------ Making blocking function calls in coroutines or in the thread running event loop will block the event loop, potentially starving all RPCs in the process. diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi index bf270e278fa..bea1f09a564 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi @@ -169,7 +169,7 @@ async def generator_to_async_generator(object gen, object loop, object thread_po await future -if PY_MAJOR_VERSION >=3 and PY_MINOR_VERSION >=7: +if PY_MAJOR_VERSION >= 3 and PY_MINOR_VERSION >= 7: def get_working_loop(): """Returns a running event loop.""" return asyncio.get_running_loop() @@ -185,4 +185,5 @@ else: if loop.is_running(): return loop else: - raise RuntimeError('no running event loop') + raise RuntimeError('No running event loop detected. This function ' + + 'must be called from inside of a running event loop.') From a6e49e084708ff5a96e8e57a37029bda5af8412f Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 23 Jun 2020 18:01:36 -0700 Subject: [PATCH 140/239] Use old ordering logic for message size limit source --- .../message_size/message_size_filter.cc | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 89fdab6fae8..5579fbd620c 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -117,17 +117,38 @@ void MessageSizeParser::Register() { size_t MessageSizeParser::ParserIndex() { return g_message_size_parser_index; } +namespace { +const grpc_arg* ChannelArgsFindLast(const grpc_channel_args* args, + const char* name) { + grpc_arg* arg = nullptr; + if (args != nullptr) { + for (size_t i = 0; i < args->num_args; ++i) { + if (strcmp(args->args[i].key, name) == 0) { + arg = &args->args[i]; + } + } + } + return arg; +} +} // namespace + int GetMaxRecvSizeFromChannelArgs(const grpc_channel_args* args) { if (grpc_channel_args_want_minimal_stack(args)) return -1; - return grpc_channel_args_find_integer( - args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, + // We are not using grpc_channel_args_find_integer here because of ordering + // issues. The logic below maintains existing behavior by choosing the last + // matching channel argument instead of the first. + return grpc_channel_arg_get_integer( + ChannelArgsFindLast(args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH), {GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, -1, INT_MAX}); } int GetMaxSendSizeFromChannelArgs(const grpc_channel_args* args) { if (grpc_channel_args_want_minimal_stack(args)) return -1; - return grpc_channel_args_find_integer( - args, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH, + // We are not using grpc_channel_args_find_integer here because of ordering + // issues. The logic below maintains existing behavior by choosing the last + // matching channel argument instead of the first. + return grpc_channel_arg_get_integer( + ChannelArgsFindLast(args, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH), {GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH, -1, INT_MAX}); } From 0f64d1f96bf61868a36416c76e0b45b26b4196d6 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Tue, 23 Jun 2020 18:42:35 -0700 Subject: [PATCH 141/239] Revert "Move ServerBuilder back to ::grpc from ::grpc_impl" --- BUILD | 1 + BUILD.gn | 1 + CMakeLists.txt | 2 + Makefile | 2 + gRPC-C++.podspec | 1 + .../impl/codegen/completion_queue_impl.h | 6 +- include/grpcpp/impl/server_builder_plugin.h | 5 +- include/grpcpp/server_builder.h | 388 +--------------- include/grpcpp/server_builder_impl.h | 417 ++++++++++++++++++ include/grpcpp/server_impl.h | 2 +- .../external_connection_acceptor_impl.cc | 2 +- src/cpp/server/server_builder.cc | 48 +- tools/doxygen/Doxyfile.c++ | 1 + tools/doxygen/Doxyfile.c++.internal | 1 + 14 files changed, 459 insertions(+), 418 deletions(-) create mode 100644 include/grpcpp/server_builder_impl.h diff --git a/BUILD b/BUILD index e2c8cc123a5..4a239243ee2 100644 --- a/BUILD +++ b/BUILD @@ -261,6 +261,7 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/server.h", "include/grpcpp/server_impl.h", "include/grpcpp/server_builder.h", + "include/grpcpp/server_builder_impl.h", "include/grpcpp/server_context.h", "include/grpcpp/server_posix.h", "include/grpcpp/server_posix_impl.h", diff --git a/BUILD.gn b/BUILD.gn index 2affd5b1bc3..a2283c11f4c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1186,6 +1186,7 @@ config("grpc_config") { "include/grpcpp/security/tls_credentials_options.h", "include/grpcpp/server.h", "include/grpcpp/server_builder.h", + "include/grpcpp/server_builder_impl.h", "include/grpcpp/server_context.h", "include/grpcpp/server_impl.h", "include/grpcpp/server_posix.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 85bfcc250fe..58f82733a9b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2749,6 +2749,7 @@ foreach(_hdr include/grpcpp/security/tls_credentials_options.h include/grpcpp/server.h include/grpcpp/server_builder.h + include/grpcpp/server_builder_impl.h include/grpcpp/server_context.h include/grpcpp/server_impl.h include/grpcpp/server_posix.h @@ -3441,6 +3442,7 @@ foreach(_hdr include/grpcpp/security/tls_credentials_options.h include/grpcpp/server.h include/grpcpp/server_builder.h + include/grpcpp/server_builder_impl.h include/grpcpp/server_context.h include/grpcpp/server_impl.h include/grpcpp/server_posix.h diff --git a/Makefile b/Makefile index b16a86fe2d7..70f839ef866 100644 --- a/Makefile +++ b/Makefile @@ -4946,6 +4946,7 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ + include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ @@ -5643,6 +5644,7 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ + include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index d413bde7aa6..fe82c414464 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -173,6 +173,7 @@ Pod::Spec.new do |s| 'include/grpcpp/security/tls_credentials_options.h', 'include/grpcpp/server.h', 'include/grpcpp/server_builder.h', + 'include/grpcpp/server_builder_impl.h', 'include/grpcpp/server_context.h', 'include/grpcpp/server_impl.h', 'include/grpcpp/server_posix.h', diff --git a/include/grpcpp/impl/codegen/completion_queue_impl.h b/include/grpcpp/impl/codegen/completion_queue_impl.h index 61538f1d512..c65b12197dc 100644 --- a/include/grpcpp/impl/codegen/completion_queue_impl.h +++ b/include/grpcpp/impl/codegen/completion_queue_impl.h @@ -48,6 +48,7 @@ namespace grpc_impl { class Channel; class Server; +class ServerBuilder; template class ClientReader; template @@ -78,7 +79,6 @@ class ErrorMethodHandler; namespace grpc { class ChannelInterface; -class ServerBuilder; class ServerInterface; namespace internal { @@ -255,7 +255,7 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen { private: // Friends for access to server registration lists that enable checking and // logging on shutdown - friend class ::grpc::ServerBuilder; + friend class ::grpc_impl::ServerBuilder; friend class ::grpc_impl::Server; // Friend synchronous wrappers so that they can access Pluck(), which is @@ -445,7 +445,7 @@ class ServerCompletionQueue : public CompletionQueue { polling_type_(polling_type) {} grpc_cq_polling_type polling_type_; - friend class ::grpc::ServerBuilder; + friend class ::grpc_impl::ServerBuilder; friend class ::grpc_impl::Server; }; diff --git a/include/grpcpp/impl/server_builder_plugin.h b/include/grpcpp/impl/server_builder_plugin.h index daed32142b1..203e5465bc3 100644 --- a/include/grpcpp/impl/server_builder_plugin.h +++ b/include/grpcpp/impl/server_builder_plugin.h @@ -26,12 +26,11 @@ namespace grpc_impl { +class ServerBuilder; class ServerInitializer; } // namespace grpc_impl namespace grpc { -class ServerBuilder; - /// This interface is meant for internal usage only. Implementations of this /// interface should add themselves to a \a ServerBuilder instance through the /// \a InternalAddPluginFactory method. @@ -43,7 +42,7 @@ class ServerBuilderPlugin { /// UpdateServerBuilder will be called at an early stage in /// ServerBuilder::BuildAndStart(), right after the ServerBuilderOptions have /// done their updates. - virtual void UpdateServerBuilder(ServerBuilder* /*builder*/) {} + virtual void UpdateServerBuilder(grpc_impl::ServerBuilder* /*builder*/) {} /// InitServer will be called in ServerBuilder::BuildAndStart(), after the /// Server instance is created. diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 746bda90a0a..d9ec7c42f3d 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015-2016 gRPC authors. + * Copyright 2019 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,393 +19,11 @@ #ifndef GRPCPP_SERVER_BUILDER_H #define GRPCPP_SERVER_BUILDER_H -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct grpc_resource_quota; - -namespace grpc_impl { - -class CompletionQueue; -class Server; -class ServerCompletionQueue; -class ServerCredentials; -} // namespace grpc_impl +#include namespace grpc { -class AsyncGenericService; -class Service; -namespace testing { -class ServerBuilderPluginTest; -} // namespace testing - -namespace internal { -class ExternalConnectionAcceptorImpl; -} // namespace internal - -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL -namespace experimental { -#endif -class CallbackGenericService; -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL -} // namespace experimental -#endif - -namespace experimental { -// EXPERIMENTAL API: -// Interface for a grpc server to build transports with connections created out -// of band. -// See ServerBuilder's AddExternalConnectionAcceptor API. -class ExternalConnectionAcceptor { - public: - struct NewConnectionParameters { - int listener_fd = -1; - int fd = -1; - ByteBuffer read_buffer; // data intended for the grpc server - }; - virtual ~ExternalConnectionAcceptor() {} - // If called before grpc::Server is started or after it is shut down, the new - // connection will be closed. - virtual void HandleNewConnection(NewConnectionParameters* p) = 0; -}; - -} // namespace experimental - -/// A builder class for the creation and startup of \a grpc::Server instances. -class ServerBuilder { - public: - ServerBuilder(); - virtual ~ServerBuilder(); - - ////////////////////////////////////////////////////////////////////////////// - // Primary API's - - /// Return a running server which is ready for processing calls. - /// Before calling, one typically needs to ensure that: - /// 1. a service is registered - so that the server knows what to serve - /// (via RegisterService, or RegisterAsyncGenericService) - /// 2. a listening port has been added - so the server knows where to receive - /// traffic (via AddListeningPort) - /// 3. [for async api only] completion queues have been added via - /// AddCompletionQueue - /// - /// Will return a nullptr on errors. - virtual std::unique_ptr BuildAndStart(); - - /// Register a service. This call does not take ownership of the service. - /// The service must exist for the lifetime of the \a Server instance returned - /// by \a BuildAndStart(). - /// Matches requests with any :authority - ServerBuilder& RegisterService(grpc::Service* service); - - /// Enlists an endpoint \a addr (port with an optional IP address) to - /// bind the \a grpc::Server object to be created to. - /// - /// It can be invoked multiple times. - /// - /// \param addr_uri The address to try to bind to the server in URI form. If - /// the scheme name is omitted, "dns:///" is assumed. To bind to any address, - /// please use IPv6 any, i.e., [::]:, which also accepts IPv4 - /// connections. Valid values include dns:///localhost:1234, / - /// 192.168.1.1:31416, dns:///[::1]:27182, etc.). - /// \param creds The credentials associated with the server. - /// \param selected_port[out] If not `nullptr`, gets populated with the port - /// number bound to the \a grpc::Server for the corresponding endpoint after - /// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort - /// does not modify this pointer. - ServerBuilder& AddListeningPort( - const grpc::string& addr_uri, - std::shared_ptr creds, - int* selected_port = nullptr); - - /// Add a completion queue for handling asynchronous services. - /// - /// Best performance is typically obtained by using one thread per polling - /// completion queue. - /// - /// Caller is required to shutdown the server prior to shutting down the - /// returned completion queue. Caller is also required to drain the - /// completion queue after shutting it down. A typical usage scenario: - /// - /// // While building the server: - /// ServerBuilder builder; - /// ... - /// cq_ = builder.AddCompletionQueue(); - /// server_ = builder.BuildAndStart(); - /// - /// // While shutting down the server; - /// server_->Shutdown(); - /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! - /// // Drain the cq_ that was created - /// void* ignored_tag; - /// bool ignored_ok; - /// while (cq_->Next(&ignored_tag, &ignored_ok)) { } - /// - /// \param is_frequently_polled This is an optional parameter to inform gRPC - /// library about whether this completion queue would be frequently polled - /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is - /// 'true' and is the recommended setting. Setting this to 'false' (i.e. - /// not polling the completion queue frequently) will have a significantly - /// negative performance impact and hence should not be used in production - /// use cases. - std::unique_ptr AddCompletionQueue( - bool is_frequently_polled = true); - - ////////////////////////////////////////////////////////////////////////////// - // Less commonly used RegisterService variants - - /// Register a service. This call does not take ownership of the service. - /// The service must exist for the lifetime of the \a Server instance - /// returned by \a BuildAndStart(). Only matches requests with :authority \a - /// host - ServerBuilder& RegisterService(const grpc::string& host, - grpc::Service* service); - - /// Register a generic service. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterAsyncGenericService( - grpc::AsyncGenericService* service); - - ////////////////////////////////////////////////////////////////////////////// - // Fine control knobs - - /// Set max receive message size in bytes. - /// The default is GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH. - ServerBuilder& SetMaxReceiveMessageSize(int max_receive_message_size) { - max_receive_message_size_ = max_receive_message_size; - return *this; - } - - /// Set max send message size in bytes. - /// The default is GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH. - ServerBuilder& SetMaxSendMessageSize(int max_send_message_size) { - max_send_message_size_ = max_send_message_size; - return *this; - } - - /// \deprecated For backward compatibility. - ServerBuilder& SetMaxMessageSize(int max_message_size) { - return SetMaxReceiveMessageSize(max_message_size); - } - - /// Set the support status for compression algorithms. All algorithms are - /// enabled by default. - /// - /// Incoming calls compressed with an unsupported algorithm will fail with - /// \a GRPC_STATUS_UNIMPLEMENTED. - ServerBuilder& SetCompressionAlgorithmSupportStatus( - grpc_compression_algorithm algorithm, bool enabled); - - /// The default compression level to use for all channel calls in the - /// absence of a call-specific level. - ServerBuilder& SetDefaultCompressionLevel(grpc_compression_level level); - - /// The default compression algorithm to use for all channel calls in the - /// absence of a call-specific level. Note that it overrides any compression - /// level set by \a SetDefaultCompressionLevel. - ServerBuilder& SetDefaultCompressionAlgorithm( - grpc_compression_algorithm algorithm); - - /// Set the attached buffer pool for this server - ServerBuilder& SetResourceQuota(const grpc::ResourceQuota& resource_quota); - - ServerBuilder& SetOption(std::unique_ptr option); - - /// Options for synchronous servers. - enum SyncServerOption { - NUM_CQS, ///< Number of completion queues. - MIN_POLLERS, ///< Minimum number of polling threads. - MAX_POLLERS, ///< Maximum number of polling threads. - CQ_TIMEOUT_MSEC ///< Completion queue timeout in milliseconds. - }; - - /// Only useful if this is a Synchronous server. - ServerBuilder& SetSyncServerOption(SyncServerOption option, int value); - - /// Add a channel argument (an escape hatch to tuning core library parameters - /// directly) - template - ServerBuilder& AddChannelArgument(const grpc::string& arg, const T& value) { - return SetOption(grpc::MakeChannelArgumentOption(arg, value)); - } - - /// For internal use only: Register a ServerBuilderPlugin factory function. - static void InternalAddPluginFactory( - std::unique_ptr (*CreatePlugin)()); - - /// Enable a server workaround. Do not use unless you know what the workaround - /// does. For explanation and detailed descriptions of workarounds, see - /// doc/workarounds.md. - ServerBuilder& EnableWorkaround(grpc_workaround_list id); - - /// NOTE: class experimental_type is not part of the public API of this class. - /// TODO(yashykt): Integrate into public API when this is no longer - /// experimental. - class experimental_type { - public: - explicit experimental_type(ServerBuilder* builder) : builder_(builder) {} - - void SetInterceptorCreators( - std::vector> - interceptor_creators) { - builder_->interceptor_creators_ = std::move(interceptor_creators); - } - -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL - /// Register a generic service that uses the callback API. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterCallbackGenericService( - grpc::experimental::CallbackGenericService* service); -#endif - - enum class ExternalConnectionType { - FROM_FD = 0 // in the form of a file descriptor - }; - - /// Register an acceptor to handle the externally accepted connection in - /// grpc server. The returned acceptor can be used to pass the connection - /// to grpc server, where a channel will be created with the provided - /// server credentials. - std::unique_ptr - AddExternalConnectionAcceptor(ExternalConnectionType type, - std::shared_ptr creds); - - private: - ServerBuilder* builder_; - }; - -#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL - /// Register a generic service that uses the callback API. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterCallbackGenericService( - grpc::CallbackGenericService* service); -#endif - - /// NOTE: The function experimental() is not stable public API. It is a view - /// to the experimental components of this class. It may be changed or removed - /// at any time. - experimental_type experimental() { return experimental_type(this); } - - protected: - /// Experimental, to be deprecated - struct Port { - grpc::string addr; - std::shared_ptr creds; - int* selected_port; - }; - - /// Experimental, to be deprecated - typedef std::unique_ptr HostString; - struct NamedService { - explicit NamedService(grpc::Service* s) : service(s) {} - NamedService(const grpc::string& h, grpc::Service* s) - : host(new grpc::string(h)), service(s) {} - HostString host; - grpc::Service* service; - }; - - /// Experimental, to be deprecated - std::vector ports() { return ports_; } - - /// Experimental, to be deprecated - std::vector services() { - std::vector service_refs; - for (auto& ptr : services_) { - service_refs.push_back(ptr.get()); - } - return service_refs; - } - - /// Experimental, to be deprecated - std::vector options() { - std::vector option_refs; - for (auto& ptr : options_) { - option_refs.push_back(ptr.get()); - } - return option_refs; - } - - private: - friend class ::grpc::testing::ServerBuilderPluginTest; - - struct SyncServerSettings { - SyncServerSettings() - : num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} - - /// Number of server completion queues to create to listen to incoming RPCs. - int num_cqs; - - /// Minimum number of threads per completion queue that should be listening - /// to incoming RPCs. - int min_pollers; - - /// Maximum number of threads per completion queue that can be listening to - /// incoming RPCs. - int max_pollers; - - /// The timeout for server completion queue's AsyncNext call. - int cq_timeout_msec; - }; - - int max_receive_message_size_; - int max_send_message_size_; - std::vector> options_; - std::vector> services_; - std::vector ports_; - - SyncServerSettings sync_server_settings_; - - /// List of completion queues added via \a AddCompletionQueue method. - std::vector cqs_; - - std::shared_ptr creds_; - std::vector> plugins_; - grpc_resource_quota* resource_quota_; - grpc::AsyncGenericService* generic_service_{nullptr}; -#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL - grpc::CallbackGenericService* callback_generic_service_{nullptr}; -#else - grpc::experimental::CallbackGenericService* callback_generic_service_{ - nullptr}; -#endif - - struct { - bool is_set; - grpc_compression_level level; - } maybe_default_compression_level_; - struct { - bool is_set; - grpc_compression_algorithm algorithm; - } maybe_default_compression_algorithm_; - uint32_t enabled_compression_algorithms_bitset_; - std::vector< - std::unique_ptr> - interceptor_creators_; - std::vector> - acceptors_; -}; +typedef ::grpc_impl::ServerBuilder ServerBuilder; } // namespace grpc diff --git a/include/grpcpp/server_builder_impl.h b/include/grpcpp/server_builder_impl.h new file mode 100644 index 00000000000..59aa54f4eca --- /dev/null +++ b/include/grpcpp/server_builder_impl.h @@ -0,0 +1,417 @@ +/* + * + * Copyright 2015-2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPCPP_SERVER_BUILDER_IMPL_H +#define GRPCPP_SERVER_BUILDER_IMPL_H + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct grpc_resource_quota; + +namespace grpc_impl { + +class CompletionQueue; +class Server; +class ServerCompletionQueue; +class ServerCredentials; +} // namespace grpc_impl + +namespace grpc { + +class AsyncGenericService; +class ResourceQuota; +class Service; +namespace testing { +class ServerBuilderPluginTest; +} // namespace testing + +namespace internal { +class ExternalConnectionAcceptorImpl; +} // namespace internal + +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL +namespace experimental { +#endif +class CallbackGenericService; +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL +} // namespace experimental +#endif + +namespace experimental { +// EXPERIMENTAL API: +// Interface for a grpc server to build transports with connections created out +// of band. +// See ServerBuilder's AddExternalConnectionAcceptor API. +class ExternalConnectionAcceptor { + public: + struct NewConnectionParameters { + int listener_fd = -1; + int fd = -1; + ByteBuffer read_buffer; // data intended for the grpc server + }; + virtual ~ExternalConnectionAcceptor() {} + // If called before grpc::Server is started or after it is shut down, the new + // connection will be closed. + virtual void HandleNewConnection(NewConnectionParameters* p) = 0; +}; + +} // namespace experimental +} // namespace grpc + +namespace grpc_impl { + +/// A builder class for the creation and startup of \a grpc::Server instances. +class ServerBuilder { + public: + ServerBuilder(); + virtual ~ServerBuilder(); + + ////////////////////////////////////////////////////////////////////////////// + // Primary API's + + /// Return a running server which is ready for processing calls. + /// Before calling, one typically needs to ensure that: + /// 1. a service is registered - so that the server knows what to serve + /// (via RegisterService, or RegisterAsyncGenericService) + /// 2. a listening port has been added - so the server knows where to receive + /// traffic (via AddListeningPort) + /// 3. [for async api only] completion queues have been added via + /// AddCompletionQueue + /// + /// Will return a nullptr on errors. + virtual std::unique_ptr BuildAndStart(); + + /// Register a service. This call does not take ownership of the service. + /// The service must exist for the lifetime of the \a Server instance returned + /// by \a BuildAndStart(). + /// Matches requests with any :authority + ServerBuilder& RegisterService(grpc::Service* service); + + /// Enlists an endpoint \a addr (port with an optional IP address) to + /// bind the \a grpc::Server object to be created to. + /// + /// It can be invoked multiple times. + /// + /// \param addr_uri The address to try to bind to the server in URI form. If + /// the scheme name is omitted, "dns:///" is assumed. To bind to any address, + /// please use IPv6 any, i.e., [::]:, which also accepts IPv4 + /// connections. Valid values include dns:///localhost:1234, / + /// 192.168.1.1:31416, dns:///[::1]:27182, etc.). + /// \param creds The credentials associated with the server. + /// \param selected_port[out] If not `nullptr`, gets populated with the port + /// number bound to the \a grpc::Server for the corresponding endpoint after + /// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort + /// does not modify this pointer. + ServerBuilder& AddListeningPort( + const grpc::string& addr_uri, + std::shared_ptr creds, + int* selected_port = nullptr); + + /// Add a completion queue for handling asynchronous services. + /// + /// Best performance is typically obtained by using one thread per polling + /// completion queue. + /// + /// Caller is required to shutdown the server prior to shutting down the + /// returned completion queue. Caller is also required to drain the + /// completion queue after shutting it down. A typical usage scenario: + /// + /// // While building the server: + /// ServerBuilder builder; + /// ... + /// cq_ = builder.AddCompletionQueue(); + /// server_ = builder.BuildAndStart(); + /// + /// // While shutting down the server; + /// server_->Shutdown(); + /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! + /// // Drain the cq_ that was created + /// void* ignored_tag; + /// bool ignored_ok; + /// while (cq_->Next(&ignored_tag, &ignored_ok)) { } + /// + /// \param is_frequently_polled This is an optional parameter to inform gRPC + /// library about whether this completion queue would be frequently polled + /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is + /// 'true' and is the recommended setting. Setting this to 'false' (i.e. + /// not polling the completion queue frequently) will have a significantly + /// negative performance impact and hence should not be used in production + /// use cases. + std::unique_ptr AddCompletionQueue( + bool is_frequently_polled = true); + + ////////////////////////////////////////////////////////////////////////////// + // Less commonly used RegisterService variants + + /// Register a service. This call does not take ownership of the service. + /// The service must exist for the lifetime of the \a Server instance + /// returned by \a BuildAndStart(). Only matches requests with :authority \a + /// host + ServerBuilder& RegisterService(const grpc::string& host, + grpc::Service* service); + + /// Register a generic service. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterAsyncGenericService( + grpc::AsyncGenericService* service); + + ////////////////////////////////////////////////////////////////////////////// + // Fine control knobs + + /// Set max receive message size in bytes. + /// The default is GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH. + ServerBuilder& SetMaxReceiveMessageSize(int max_receive_message_size) { + max_receive_message_size_ = max_receive_message_size; + return *this; + } + + /// Set max send message size in bytes. + /// The default is GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH. + ServerBuilder& SetMaxSendMessageSize(int max_send_message_size) { + max_send_message_size_ = max_send_message_size; + return *this; + } + + /// \deprecated For backward compatibility. + ServerBuilder& SetMaxMessageSize(int max_message_size) { + return SetMaxReceiveMessageSize(max_message_size); + } + + /// Set the support status for compression algorithms. All algorithms are + /// enabled by default. + /// + /// Incoming calls compressed with an unsupported algorithm will fail with + /// \a GRPC_STATUS_UNIMPLEMENTED. + ServerBuilder& SetCompressionAlgorithmSupportStatus( + grpc_compression_algorithm algorithm, bool enabled); + + /// The default compression level to use for all channel calls in the + /// absence of a call-specific level. + ServerBuilder& SetDefaultCompressionLevel(grpc_compression_level level); + + /// The default compression algorithm to use for all channel calls in the + /// absence of a call-specific level. Note that it overrides any compression + /// level set by \a SetDefaultCompressionLevel. + ServerBuilder& SetDefaultCompressionAlgorithm( + grpc_compression_algorithm algorithm); + + /// Set the attached buffer pool for this server + ServerBuilder& SetResourceQuota(const grpc::ResourceQuota& resource_quota); + + ServerBuilder& SetOption(std::unique_ptr option); + + /// Options for synchronous servers. + enum SyncServerOption { + NUM_CQS, ///< Number of completion queues. + MIN_POLLERS, ///< Minimum number of polling threads. + MAX_POLLERS, ///< Maximum number of polling threads. + CQ_TIMEOUT_MSEC ///< Completion queue timeout in milliseconds. + }; + + /// Only useful if this is a Synchronous server. + ServerBuilder& SetSyncServerOption(SyncServerOption option, int value); + + /// Add a channel argument (an escape hatch to tuning core library parameters + /// directly) + template + ServerBuilder& AddChannelArgument(const grpc::string& arg, const T& value) { + return SetOption(grpc::MakeChannelArgumentOption(arg, value)); + } + + /// For internal use only: Register a ServerBuilderPlugin factory function. + static void InternalAddPluginFactory( + std::unique_ptr (*CreatePlugin)()); + + /// Enable a server workaround. Do not use unless you know what the workaround + /// does. For explanation and detailed descriptions of workarounds, see + /// doc/workarounds.md. + ServerBuilder& EnableWorkaround(grpc_workaround_list id); + + /// NOTE: class experimental_type is not part of the public API of this class. + /// TODO(yashykt): Integrate into public API when this is no longer + /// experimental. + class experimental_type { + public: + explicit experimental_type(grpc_impl::ServerBuilder* builder) + : builder_(builder) {} + + void SetInterceptorCreators( + std::vector> + interceptor_creators) { + builder_->interceptor_creators_ = std::move(interceptor_creators); + } + +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL + /// Register a generic service that uses the callback API. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterCallbackGenericService( + grpc::experimental::CallbackGenericService* service); +#endif + + enum class ExternalConnectionType { + FROM_FD = 0 // in the form of a file descriptor + }; + + /// Register an acceptor to handle the externally accepted connection in + /// grpc server. The returned acceptor can be used to pass the connection + /// to grpc server, where a channel will be created with the provided + /// server credentials. + std::unique_ptr + AddExternalConnectionAcceptor(ExternalConnectionType type, + std::shared_ptr creds); + + private: + ServerBuilder* builder_; + }; + +#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + /// Register a generic service that uses the callback API. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterCallbackGenericService( + grpc::CallbackGenericService* service); +#endif + + /// NOTE: The function experimental() is not stable public API. It is a view + /// to the experimental components of this class. It may be changed or removed + /// at any time. + experimental_type experimental() { return experimental_type(this); } + + protected: + /// Experimental, to be deprecated + struct Port { + grpc::string addr; + std::shared_ptr creds; + int* selected_port; + }; + + /// Experimental, to be deprecated + typedef std::unique_ptr HostString; + struct NamedService { + explicit NamedService(grpc::Service* s) : service(s) {} + NamedService(const grpc::string& h, grpc::Service* s) + : host(new grpc::string(h)), service(s) {} + HostString host; + grpc::Service* service; + }; + + /// Experimental, to be deprecated + std::vector ports() { return ports_; } + + /// Experimental, to be deprecated + std::vector services() { + std::vector service_refs; + for (auto& ptr : services_) { + service_refs.push_back(ptr.get()); + } + return service_refs; + } + + /// Experimental, to be deprecated + std::vector options() { + std::vector option_refs; + for (auto& ptr : options_) { + option_refs.push_back(ptr.get()); + } + return option_refs; + } + + private: + friend class ::grpc::testing::ServerBuilderPluginTest; + + struct SyncServerSettings { + SyncServerSettings() + : num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} + + /// Number of server completion queues to create to listen to incoming RPCs. + int num_cqs; + + /// Minimum number of threads per completion queue that should be listening + /// to incoming RPCs. + int min_pollers; + + /// Maximum number of threads per completion queue that can be listening to + /// incoming RPCs. + int max_pollers; + + /// The timeout for server completion queue's AsyncNext call. + int cq_timeout_msec; + }; + + int max_receive_message_size_; + int max_send_message_size_; + std::vector> options_; + std::vector> services_; + std::vector ports_; + + SyncServerSettings sync_server_settings_; + + /// List of completion queues added via \a AddCompletionQueue method. + std::vector cqs_; + + std::shared_ptr creds_; + std::vector> plugins_; + grpc_resource_quota* resource_quota_; + grpc::AsyncGenericService* generic_service_{nullptr}; +#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + grpc::CallbackGenericService* callback_generic_service_{nullptr}; +#else + grpc::experimental::CallbackGenericService* callback_generic_service_{ + nullptr}; +#endif + + struct { + bool is_set; + grpc_compression_level level; + } maybe_default_compression_level_; + struct { + bool is_set; + grpc_compression_algorithm algorithm; + } maybe_default_compression_algorithm_; + uint32_t enabled_compression_algorithms_bitset_; + std::vector< + std::unique_ptr> + interceptor_creators_; + std::vector> + acceptors_; +}; + +} // namespace grpc_impl + +#endif // GRPCPP_SERVER_BUILDER_IMPL_H diff --git a/include/grpcpp/server_impl.h b/include/grpcpp/server_impl.h index 887fa7b5f62..5cbfee436de 100644 --- a/include/grpcpp/server_impl.h +++ b/include/grpcpp/server_impl.h @@ -222,7 +222,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { } friend class grpc::AsyncGenericService; - friend class grpc::ServerBuilder; + friend class grpc_impl::ServerBuilder; friend class grpc_impl::ServerInitializer; class SyncRequest; diff --git a/src/cpp/server/external_connection_acceptor_impl.cc b/src/cpp/server/external_connection_acceptor_impl.cc index f719e363019..e03d3c6cc2c 100644 --- a/src/cpp/server/external_connection_acceptor_impl.cc +++ b/src/cpp/server/external_connection_acceptor_impl.cc @@ -20,7 +20,7 @@ #include -#include +#include #include namespace grpc { diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index f42bace5fe9..0acb486149d 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -32,15 +32,15 @@ #include "src/cpp/server/external_connection_acceptor_impl.h" #include "src/cpp/server/thread_pool_interface.h" -namespace grpc { +namespace grpc_impl { -static std::vector (*)()>* +static std::vector (*)()>* g_plugin_factory_list; static gpr_once once_init_plugin_list = GPR_ONCE_INIT; static void do_plugin_list_init(void) { g_plugin_factory_list = - new std::vector (*)()>(); + new std::vector (*)()>(); } ServerBuilder::ServerBuilder() @@ -68,29 +68,29 @@ ServerBuilder::~ServerBuilder() { } } -std::unique_ptr -ServerBuilder::AddCompletionQueue(bool is_frequently_polled) { - grpc_impl::ServerCompletionQueue* cq = new grpc_impl::ServerCompletionQueue( +std::unique_ptr ServerBuilder::AddCompletionQueue( + bool is_frequently_polled) { + ServerCompletionQueue* cq = new ServerCompletionQueue( GRPC_CQ_NEXT, is_frequently_polled ? GRPC_CQ_DEFAULT_POLLING : GRPC_CQ_NON_LISTENING, nullptr); cqs_.push_back(cq); - return std::unique_ptr(cq); + return std::unique_ptr(cq); } -ServerBuilder& ServerBuilder::RegisterService(Service* service) { +ServerBuilder& ServerBuilder::RegisterService(grpc::Service* service) { services_.emplace_back(new NamedService(service)); return *this; } ServerBuilder& ServerBuilder::RegisterService(const grpc::string& addr, - Service* service) { + grpc::Service* service) { services_.emplace_back(new NamedService(addr, service)); return *this; } ServerBuilder& ServerBuilder::RegisterAsyncGenericService( - AsyncGenericService* service) { + grpc::AsyncGenericService* service) { if (generic_service_ || callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -104,7 +104,7 @@ ServerBuilder& ServerBuilder::RegisterAsyncGenericService( #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL ServerBuilder& ServerBuilder::RegisterCallbackGenericService( - CallbackGenericService* service) { + grpc::CallbackGenericService* service) { if (generic_service_ || callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -117,7 +117,7 @@ ServerBuilder& ServerBuilder::RegisterCallbackGenericService( } #else ServerBuilder& ServerBuilder::experimental_type::RegisterCallbackGenericService( - experimental::CallbackGenericService* service) { + grpc::experimental::CallbackGenericService* service) { if (builder_->generic_service_ || builder_->callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -144,7 +144,7 @@ ServerBuilder::experimental_type::AddExternalConnectionAcceptor( } ServerBuilder& ServerBuilder::SetOption( - std::unique_ptr option) { + std::unique_ptr option) { options_.push_back(std::move(option)); return *this; } @@ -203,8 +203,8 @@ ServerBuilder& ServerBuilder::SetResourceQuota( } ServerBuilder& ServerBuilder::AddListeningPort( - const grpc::string& addr_uri, std::shared_ptr creds, - int* selected_port) { + const grpc::string& addr_uri, + std::shared_ptr creds, int* selected_port) { const grpc::string uri_scheme = "dns:"; grpc::string addr = addr_uri; if (addr_uri.compare(0, uri_scheme.size(), uri_scheme) == 0) { @@ -218,7 +218,7 @@ ServerBuilder& ServerBuilder::AddListeningPort( } std::unique_ptr ServerBuilder::BuildAndStart() { - ChannelArguments args; + grpc::ChannelArguments args; for (const auto& option : options_) { option->UpdateArguments(&args); @@ -289,11 +289,9 @@ std::unique_ptr ServerBuilder::BuildAndStart() { // This is different from the completion queues added to the server via // ServerBuilder's AddCompletionQueue() method (those completion queues // are in 'cqs_' member variable of ServerBuilder object) - std::shared_ptr< - std::vector>> - sync_server_cqs( - std::make_shared>>()); + std::shared_ptr>> + sync_server_cqs(std::make_shared< + std::vector>>()); bool has_frequently_polled_cqs = false; for (const auto& cq : cqs_) { @@ -321,8 +319,8 @@ std::unique_ptr ServerBuilder::BuildAndStart() { // Create completion queues to listen to incoming rpc requests for (int i = 0; i < sync_server_settings_.num_cqs; i++) { - sync_server_cqs->emplace_back(new grpc_impl::ServerCompletionQueue( - GRPC_CQ_NEXT, polling_type, nullptr)); + sync_server_cqs->emplace_back( + new ServerCompletionQueue(GRPC_CQ_NEXT, polling_type, nullptr)); } } @@ -433,7 +431,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { } void ServerBuilder::InternalAddPluginFactory( - std::unique_ptr (*CreatePlugin)()) { + std::unique_ptr (*CreatePlugin)()) { gpr_once_init(&once_init_plugin_list, do_plugin_list_init); (*g_plugin_factory_list).push_back(CreatePlugin); } @@ -448,4 +446,4 @@ ServerBuilder& ServerBuilder::EnableWorkaround(grpc_workaround_list id) { } } -} // namespace grpc +} // namespace grpc_impl diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index f5868cc07c3..71d25f587a6 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -1033,6 +1033,7 @@ include/grpcpp/security/server_credentials_impl.h \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ +include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 546c7a8e99f..48228f994e5 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1033,6 +1033,7 @@ include/grpcpp/security/server_credentials_impl.h \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ +include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ From e8f17c5f9610451400cdbf68155aa586665ff740 Mon Sep 17 00:00:00 2001 From: jiangtaoli2016 Date: Tue, 23 Jun 2020 22:43:41 -0700 Subject: [PATCH 142/239] Fix SPIFFE ID check --- .../security/security_connector/ssl_utils.cc | 27 ++++++++------- test/core/security/security_connector_test.cc | 34 ++++++++++++++----- test/core/tsi/ssl_transport_security_test.cc | 1 + 3 files changed, 41 insertions(+), 21 deletions(-) diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index 664f3a18e61..3aa12a8f1d8 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -257,7 +257,8 @@ grpc_core::RefCountedPtr grpc_ssl_peer_to_auth_context( transport_security_type); const char* spiffe_data = nullptr; size_t spiffe_length = 0; - int spiffe_id_count = 0; + int uri_count = 0; + bool has_spiffe_id = false; for (i = 0; i < peer->property_count; i++) { const tsi_peer_property* prop = &peer->properties[i]; if (prop->name == nullptr) continue; @@ -290,11 +291,12 @@ grpc_core::RefCountedPtr grpc_ssl_peer_to_auth_context( ctx.get(), GRPC_TRANSPORT_SECURITY_LEVEL_PROPERTY_NAME, prop->value.data, prop->value.length); } else if (strcmp(prop->name, TSI_X509_URI_PEER_PROPERTY) == 0) { + uri_count++; absl::string_view spiffe_id(prop->value.data, prop->value.length); if (IsSpiffeId(spiffe_id)) { spiffe_data = prop->value.data; spiffe_length = prop->value.length; - spiffe_id_count += 1; + has_spiffe_id = true; } } } @@ -302,16 +304,17 @@ grpc_core::RefCountedPtr grpc_ssl_peer_to_auth_context( GPR_ASSERT(grpc_auth_context_set_peer_identity_property_name( ctx.get(), peer_identity_property_name) == 1); } - // SPIFFE ID should be unique. If we find more than one SPIFFE IDs, we log - // the error without returning the error. - if (spiffe_id_count > 1) { - gpr_log(GPR_INFO, "Invalid SPIFFE ID: SPIFFE ID should be unique."); - } - if (spiffe_id_count == 1) { - GPR_ASSERT(spiffe_length > 0); - GPR_ASSERT(spiffe_data != nullptr); - grpc_auth_context_add_property(ctx.get(), GRPC_PEER_SPIFFE_ID_PROPERTY_NAME, - spiffe_data, spiffe_length); + // A valid SPIFFE certificate can only have exact one URI SAN field. + if (has_spiffe_id) { + if (uri_count == 1) { + GPR_ASSERT(spiffe_length > 0); + GPR_ASSERT(spiffe_data != nullptr); + grpc_auth_context_add_property(ctx.get(), + GRPC_PEER_SPIFFE_ID_PROPERTY_NAME, + spiffe_data, spiffe_length); + } else { + gpr_log(GPR_INFO, "Invalid SPIFFE ID: multiple URI SANs."); + } } return ctx; } diff --git a/test/core/security/security_connector_test.cc b/test/core/security/security_connector_test.cc index 8f249bec97b..c6b760be18a 100644 --- a/test/core/security/security_connector_test.cc +++ b/test/core/security/security_connector_test.cc @@ -472,16 +472,13 @@ static void test_spiffe_id_peer_to_auth_context(void) { GPR_ASSERT(check_spiffe_id(invalid_ctx.get(), nullptr, false)); tsi_peer_destruct(&invalid_peer); invalid_ctx.reset(DEBUG_LOCATION, "test"); - // A valid SPIFFE ID with other URI fields should be plumbed. + // A valid SPIFFE ID should be plumbed. tsi_peer valid_peer; - std::vector valid_spiffe_id = {"spiffe://foo.bar.com/wl", - "https://xyz"}; - GPR_ASSERT(tsi_construct_peer(valid_spiffe_id.size(), &valid_peer) == TSI_OK); - for (i = 0; i < valid_spiffe_id.size(); i++) { - GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( - TSI_X509_URI_PEER_PROPERTY, valid_spiffe_id[i].c_str(), - &valid_peer.properties[i]) == TSI_OK); - } + std::string valid_spiffe_id = "spiffe://foo.bar.com/wl"; + GPR_ASSERT(tsi_construct_peer(1, &valid_peer) == TSI_OK); + GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( + TSI_X509_URI_PEER_PROPERTY, valid_spiffe_id.c_str(), + &valid_peer.properties[0]) == TSI_OK); grpc_core::RefCountedPtr valid_ctx = grpc_ssl_peer_to_auth_context(&valid_peer, GRPC_SSL_TRANSPORT_SECURITY_TYPE); @@ -507,6 +504,25 @@ static void test_spiffe_id_peer_to_auth_context(void) { GPR_ASSERT(check_spiffe_id(multiple_ctx.get(), nullptr, false)); tsi_peer_destruct(&multiple_peer); multiple_ctx.reset(DEBUG_LOCATION, "test"); + // A valid SPIFFE certificate should only has one URI SAN field. + // SPIFFE ID should not be plumbed if there are multiple URIs. + tsi_peer multiple_uri_peer; + std::vector multiple_uri = {"spiffe://foo.bar.com/wl", + "https://xyz", "ssh://foo.bar.com/"}; + GPR_ASSERT(tsi_construct_peer(multiple_uri.size(), &multiple_uri_peer) == + TSI_OK); + for (i = 0; i < multiple_spiffe_id.size(); i++) { + GPR_ASSERT(tsi_construct_string_peer_property_from_cstring( + TSI_X509_URI_PEER_PROPERTY, multiple_uri[i].c_str(), + &multiple_uri_peer.properties[i]) == TSI_OK); + } + grpc_core::RefCountedPtr multiple_uri_ctx = + grpc_ssl_peer_to_auth_context(&multiple_uri_peer, + GRPC_SSL_TRANSPORT_SECURITY_TYPE); + GPR_ASSERT(multiple_uri_ctx != nullptr); + GPR_ASSERT(check_spiffe_id(multiple_uri_ctx.get(), nullptr, false)); + tsi_peer_destruct(&multiple_uri_peer); + multiple_uri_ctx.reset(DEBUG_LOCATION, "test"); } static const char* roots_for_override_api = "roots for override api"; diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index 8c4e736fc8b..26d4d477050 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -895,6 +895,7 @@ void ssl_tsi_test_extract_x509_subject_names() { GPR_ASSERT(check_subject_alt_name(&peer, "foo.test.domain.com") == 1); GPR_ASSERT(check_subject_alt_name(&peer, "bar.test.domain.com") == 1); // Check URI + // Note that a valid SPIFFE certificate should only have one URI. GPR_ASSERT(check_subject_alt_name(&peer, "spiffe://foo.com/bar/baz") == 1); GPR_ASSERT( check_subject_alt_name(&peer, "https://foo.test.domain.com/test") == 1); From f3fff54db9336b73424eb0934e6ecfef0f1fe65c Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 24 Jun 2020 10:00:40 -0700 Subject: [PATCH 143/239] Revert "Use old ordering logic for message size limit source" This reverts commit a6e49e084708ff5a96e8e57a37029bda5af8412f. --- .../message_size/message_size_filter.cc | 29 +++---------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 5579fbd620c..89fdab6fae8 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -117,38 +117,17 @@ void MessageSizeParser::Register() { size_t MessageSizeParser::ParserIndex() { return g_message_size_parser_index; } -namespace { -const grpc_arg* ChannelArgsFindLast(const grpc_channel_args* args, - const char* name) { - grpc_arg* arg = nullptr; - if (args != nullptr) { - for (size_t i = 0; i < args->num_args; ++i) { - if (strcmp(args->args[i].key, name) == 0) { - arg = &args->args[i]; - } - } - } - return arg; -} -} // namespace - int GetMaxRecvSizeFromChannelArgs(const grpc_channel_args* args) { if (grpc_channel_args_want_minimal_stack(args)) return -1; - // We are not using grpc_channel_args_find_integer here because of ordering - // issues. The logic below maintains existing behavior by choosing the last - // matching channel argument instead of the first. - return grpc_channel_arg_get_integer( - ChannelArgsFindLast(args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH), + return grpc_channel_args_find_integer( + args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, {GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH, -1, INT_MAX}); } int GetMaxSendSizeFromChannelArgs(const grpc_channel_args* args) { if (grpc_channel_args_want_minimal_stack(args)) return -1; - // We are not using grpc_channel_args_find_integer here because of ordering - // issues. The logic below maintains existing behavior by choosing the last - // matching channel argument instead of the first. - return grpc_channel_arg_get_integer( - ChannelArgsFindLast(args, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH), + return grpc_channel_args_find_integer( + args, GRPC_ARG_MAX_SEND_MESSAGE_LENGTH, {GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH, -1, INT_MAX}); } From c1d7180daad9e2656ec37c55cef57168487f92a4 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 24 Jun 2020 10:10:03 -0700 Subject: [PATCH 144/239] Use upb textformat library to dump out raw xDS proto messages --- BUILD | 290 ++++++- BUILD.gn | 136 +++- CMakeLists.txt | 153 +++- Makefile | 153 +++- bazel/grpc_deps.bzl | 10 + build_autogenerated.yaml | 272 ++++++- config.m4 | 70 ++ config.w32 | 70 ++ gRPC-C++.podspec | 140 ++++ gRPC-Core.podspec | 215 ++++- grpc.gemspec | 140 ++++ grpc.gyp | 153 +++- package.xml | 140 ++++ .../ext/filters/client_channel/xds/xds_api.cc | 690 ++-------------- .../ext/filters/client_channel/xds/xds_api.h | 3 + .../envoy/annotations/deprecation.upbdefs.c | 38 + .../envoy/annotations/deprecation.upbdefs.h | 30 + .../envoy/annotations/resource.upbdefs.c | 41 + .../envoy/annotations/resource.upbdefs.h | 35 + .../envoy/api/v2/auth/cert.upbdefs.c | 47 ++ .../envoy/api/v2/auth/cert.upbdefs.h | 30 + .../envoy/api/v2/auth/common.upbdefs.c | 157 ++++ .../envoy/api/v2/auth/common.upbdefs.h | 55 ++ .../envoy/api/v2/auth/secret.upbdefs.c | 83 ++ .../envoy/api/v2/auth/secret.upbdefs.h | 45 ++ .../envoy/api/v2/auth/tls.upbdefs.c | 141 ++++ .../envoy/api/v2/auth/tls.upbdefs.h | 50 ++ .../upb-generated/envoy/api/v2/cds.upbdefs.c | 69 ++ .../upb-generated/envoy/api/v2/cds.upbdefs.h | 35 + .../envoy/api/v2/cluster.upbdefs.c | 448 +++++++++++ .../envoy/api/v2/cluster.upbdefs.h | 130 +++ .../api/v2/cluster/circuit_breaker.upbdefs.c | 95 +++ .../api/v2/cluster/circuit_breaker.upbdefs.h | 45 ++ .../envoy/api/v2/cluster/filter.upbdefs.c | 54 ++ .../envoy/api/v2/cluster/filter.upbdefs.h | 35 + .../v2/cluster/outlier_detection.upbdefs.c | 134 ++++ .../v2/cluster/outlier_detection.upbdefs.h | 35 + .../envoy/api/v2/core/address.upbdefs.c | 108 +++ .../envoy/api/v2/core/address.upbdefs.h | 60 ++ .../envoy/api/v2/core/backoff.upbdefs.c | 55 ++ .../envoy/api/v2/core/backoff.upbdefs.h | 35 + .../envoy/api/v2/core/base.upbdefs.c | 237 ++++++ .../envoy/api/v2/core/base.upbdefs.h | 125 +++ .../envoy/api/v2/core/config_source.upbdefs.c | 122 +++ .../envoy/api/v2/core/config_source.upbdefs.h | 55 ++ .../v2/core/event_service_config.upbdefs.c | 54 ++ .../v2/core/event_service_config.upbdefs.h | 35 + .../envoy/api/v2/core/grpc_service.upbdefs.c | 201 +++++ .../envoy/api/v2/core/grpc_service.upbdefs.h | 85 ++ .../envoy/api/v2/core/health_check.upbdefs.c | 212 +++++ .../envoy/api/v2/core/health_check.upbdefs.h | 70 ++ .../envoy/api/v2/core/http_uri.upbdefs.c | 55 ++ .../envoy/api/v2/core/http_uri.upbdefs.h | 35 + .../envoy/api/v2/core/protocol.upbdefs.c | 178 +++++ .../envoy/api/v2/core/protocol.upbdefs.h | 75 ++ .../envoy/api/v2/core/socket_option.upbdefs.c | 58 ++ .../envoy/api/v2/core/socket_option.upbdefs.h | 35 + .../envoy/api/v2/discovery.upbdefs.c | 116 +++ .../envoy/api/v2/discovery.upbdefs.h | 60 ++ .../upb-generated/envoy/api/v2/eds.upbdefs.c | 80 ++ .../upb-generated/envoy/api/v2/eds.upbdefs.h | 35 + .../envoy/api/v2/endpoint.upbdefs.c | 103 +++ .../envoy/api/v2/endpoint.upbdefs.h | 50 ++ .../envoy/api/v2/endpoint/endpoint.upbdefs.c | 37 + .../envoy/api/v2/endpoint/endpoint.upbdefs.h | 30 + .../v2/endpoint/endpoint_components.upbdefs.c | 105 +++ .../v2/endpoint/endpoint_components.upbdefs.h | 50 ++ .../api/v2/endpoint/load_report.upbdefs.c | 135 ++++ .../api/v2/endpoint/load_report.upbdefs.h | 55 ++ .../upb-generated/envoy/api/v2/lds.upbdefs.c | 79 ++ .../upb-generated/envoy/api/v2/lds.upbdefs.h | 35 + .../envoy/api/v2/listener.upbdefs.c | 159 ++++ .../envoy/api/v2/listener.upbdefs.h | 50 ++ .../envoy/api/v2/listener/listener.upbdefs.c | 39 + .../envoy/api/v2/listener/listener.upbdefs.h | 30 + .../v2/listener/listener_components.upbdefs.c | 169 ++++ .../v2/listener/listener_components.upbdefs.h | 60 ++ .../v2/listener/udp_listener_config.upbdefs.c | 63 ++ .../v2/listener/udp_listener_config.upbdefs.h | 40 + .../upb-generated/envoy/api/v2/rds.upbdefs.c | 83 ++ .../upb-generated/envoy/api/v2/rds.upbdefs.h | 35 + .../envoy/api/v2/route.upbdefs.c | 93 +++ .../envoy/api/v2/route.upbdefs.h | 40 + .../envoy/api/v2/route/route.upbdefs.c | 36 + .../envoy/api/v2/route/route.upbdefs.h | 30 + .../api/v2/route/route_components.upbdefs.c | 739 ++++++++++++++++++ .../api/v2/route/route_components.upbdefs.h | 250 ++++++ .../envoy/api/v2/scoped_route.upbdefs.c | 63 ++ .../envoy/api/v2/scoped_route.upbdefs.h | 45 ++ .../upb-generated/envoy/api/v2/srds.upbdefs.c | 71 ++ .../upb-generated/envoy/api/v2/srds.upbdefs.h | 35 + .../filter/accesslog/v2/accesslog.upbdefs.c | 210 +++++ .../filter/accesslog/v2/accesslog.upbdefs.h | 100 +++ .../v2/http_connection_manager.upbdefs.c | 385 +++++++++ .../v2/http_connection_manager.upbdefs.h | 105 +++ .../config/listener/v2/api_listener.upbdefs.c | 49 ++ .../config/listener/v2/api_listener.upbdefs.h | 35 + .../envoy/config/rbac/v2/rbac.upbdefs.c | 160 ++++ .../envoy/config/rbac/v2/rbac.upbdefs.h | 70 ++ .../config/trace/v2/http_tracer.upbdefs.c | 59 ++ .../config/trace/v2/http_tracer.upbdefs.h | 40 + .../envoy/service/discovery/v2/ads.upbdefs.c | 52 ++ .../envoy/service/discovery/v2/ads.upbdefs.h | 35 + .../envoy/service/load_stats/v2/lrs.upbdefs.c | 75 ++ .../envoy/service/load_stats/v2/lrs.upbdefs.h | 40 + .../upb-generated/envoy/type/http.upbdefs.c | 33 + .../upb-generated/envoy/type/http.upbdefs.h | 30 + .../envoy/type/matcher/path.upbdefs.c | 47 ++ .../envoy/type/matcher/path.upbdefs.h | 35 + .../envoy/type/matcher/regex.upbdefs.c | 62 ++ .../envoy/type/matcher/regex.upbdefs.h | 45 ++ .../envoy/type/matcher/string.upbdefs.c | 64 ++ .../envoy/type/matcher/string.upbdefs.h | 40 + .../envoy/type/metadata/v2/metadata.upbdefs.c | 79 ++ .../envoy/type/metadata/v2/metadata.upbdefs.h | 65 ++ .../envoy/type/percent.upbdefs.c | 52 ++ .../envoy/type/percent.upbdefs.h | 40 + .../upb-generated/envoy/type/range.upbdefs.c | 47 ++ .../upb-generated/envoy/type/range.upbdefs.h | 45 ++ .../envoy/type/semantic_version.upbdefs.c | 42 + .../envoy/type/semantic_version.upbdefs.h | 35 + .../type/tracing/v2/custom_tag.upbdefs.c | 83 ++ .../type/tracing/v2/custom_tag.upbdefs.h | 55 ++ .../upb-generated/gogoproto/gogo.upbdefs.c | 247 ++++++ .../upb-generated/gogoproto/gogo.upbdefs.h | 30 + .../google/api/annotations.upbdefs.c | 40 + .../google/api/annotations.upbdefs.h | 30 + .../google/api/expr/v1alpha1/syntax.upbdefs.c | 175 +++++ .../google/api/expr/v1alpha1/syntax.upbdefs.h | 95 +++ .../upb-generated/google/api/http.upbdefs.c | 61 ++ .../upb-generated/google/api/http.upbdefs.h | 45 ++ .../google/protobuf/any.upbdefs.c | 38 + .../google/protobuf/any.upbdefs.h | 35 + .../google/protobuf/descriptor.upbdefs.c | 386 +++++++++ .../google/protobuf/descriptor.upbdefs.h | 165 ++++ .../google/protobuf/duration.upbdefs.c | 39 + .../google/protobuf/duration.upbdefs.h | 35 + .../google/protobuf/empty.upbdefs.c | 37 + .../google/protobuf/empty.upbdefs.h | 35 + .../google/protobuf/struct.upbdefs.c | 65 ++ .../google/protobuf/struct.upbdefs.h | 50 ++ .../google/protobuf/timestamp.upbdefs.c | 39 + .../google/protobuf/timestamp.upbdefs.h | 35 + .../google/protobuf/wrappers.upbdefs.c | 66 ++ .../google/protobuf/wrappers.upbdefs.h | 75 ++ .../upb-generated/google/rpc/status.upbdefs.c | 42 + .../upb-generated/google/rpc/status.upbdefs.h | 35 + .../src/proto/grpc/gcp/altscontext.upbdefs.c | 62 ++ .../src/proto/grpc/gcp/altscontext.upbdefs.h | 40 + .../src/proto/grpc/gcp/handshaker.upbdefs.c | 176 +++++ .../src/proto/grpc/gcp/handshaker.upbdefs.h | 90 +++ .../gcp/transport_security_common.upbdefs.c | 52 ++ .../gcp/transport_security_common.upbdefs.h | 40 + .../src/proto/grpc/health/v1/health.upbdefs.c | 54 ++ .../src/proto/grpc/health/v1/health.upbdefs.h | 40 + .../proto/grpc/lb/v1/load_balancer.upbdefs.c | 120 +++ .../proto/grpc/lb/v1/load_balancer.upbdefs.h | 75 ++ .../udpa/annotations/migrate.upbdefs.c | 70 ++ .../udpa/annotations/migrate.upbdefs.h | 45 ++ .../udpa/annotations/sensitive.upbdefs.c | 33 + .../udpa/annotations/sensitive.upbdefs.h | 30 + .../udpa/annotations/status.upbdefs.c | 49 ++ .../udpa/annotations/status.upbdefs.h | 35 + .../data/orca/v1/orca_load_report.upbdefs.c | 62 ++ .../data/orca/v1/orca_load_report.upbdefs.h | 45 ++ .../upb-generated/validate/validate.upbdefs.c | 307 ++++++++ .../upb-generated/validate/validate.upbdefs.h | 145 ++++ src/objective-c/tests/Podfile | 2 +- src/python/grpcio/grpc_core_dependencies.py | 70 ++ src/upb/gen_build_yaml.py | 34 + templates/gRPC-Core.podspec.template | 5 +- tools/codegen/core/gen_upb_api.sh | 4 +- tools/distrib/check_copyright.py | 3 +- tools/distrib/check_include_guards.py | 3 +- .../clang_format_all_the_things.sh | 2 +- tools/doxygen/Doxyfile.c++.internal | 136 +++- tools/doxygen/Doxyfile.core.internal | 136 +++- .../linux/grpc_bazel_build_in_docker.sh | 2 +- .../linux/grpc_bazel_test_in_docker.sh | 2 +- .../linux/grpc_flaky_network_in_docker.sh | 2 +- .../linux/grpc_python_bazel_test_in_docker.sh | 2 +- tools/run_tests/sanity/check_port_platform.py | 4 +- 182 files changed, 14996 insertions(+), 652 deletions(-) create mode 100644 src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/http.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/http.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/path.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/path.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/percent.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/percent.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/range.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/range.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h create mode 100644 src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c create mode 100644 src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h create mode 100644 src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c create mode 100644 src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/api/annotations.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/api/annotations.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/api/http.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/api/http.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/protobuf/any.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/protobuf/any.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h create mode 100644 src/core/ext/upb-generated/google/rpc/status.upbdefs.c create mode 100644 src/core/ext/upb-generated/google/rpc/status.upbdefs.h create mode 100644 src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upbdefs.c create mode 100644 src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upbdefs.h create mode 100644 src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upbdefs.c create mode 100644 src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upbdefs.h create mode 100644 src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upbdefs.c create mode 100644 src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upbdefs.h create mode 100644 src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upbdefs.c create mode 100644 src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upbdefs.h create mode 100644 src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upbdefs.c create mode 100644 src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upbdefs.h create mode 100644 src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c create mode 100644 src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h create mode 100644 src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c create mode 100644 src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h create mode 100644 src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c create mode 100644 src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h create mode 100644 src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upbdefs.c create mode 100644 src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upbdefs.h create mode 100644 src/core/ext/upb-generated/validate/validate.upbdefs.c create mode 100644 src/core/ext/upb-generated/validate/validate.upbdefs.h diff --git a/BUILD b/BUILD index 4a239243ee2..0d616078bd2 100644 --- a/BUILD +++ b/BUILD @@ -1308,9 +1308,14 @@ grpc_cc_library( "src/core/ext/filters/client_channel/xds/xds_client.h", "src/core/ext/filters/client_channel/xds/xds_client_stats.h", ], + external_deps = [ + "upb_lib", + "upb_textformat_lib", + ], language = "c++", deps = [ "envoy_ads_upb", + "envoy_ads_upbdefs", "grpc_base", "grpc_client_channel", ], @@ -1333,9 +1338,14 @@ grpc_cc_library( "src/core/ext/filters/client_channel/xds/xds_client.h", "src/core/ext/filters/client_channel/xds/xds_client_stats.h", ], + external_deps = [ + "upb_lib", + "upb_textformat_lib", + ], language = "c++", deps = [ "envoy_ads_upb", + "envoy_ads_upbdefs", "grpc_base", "grpc_client_channel", "grpc_secure", @@ -2554,6 +2564,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", deps = [ @@ -2566,6 +2577,97 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "envoy_ads_upbdefs", + srcs = [ + "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c", + "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c", + "src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c", + "src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c", + "src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c", + "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c", + "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c", + ], + hdrs = [ + "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h", + "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h", + "src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h", + "src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h", + "src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h", + "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h", + "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h", + "src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h", + "src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h", + ], + external_deps = [ + "upb_lib", + "upb_lib_descriptor", + "upb_textformat_lib", + ], + language = "c++", + deps = [ + ":envoy_ads_upb", + ":envoy_annotations_upbdefs", + ":envoy_core_upbdefs", + ":envoy_type_upbdefs", + ":google_api_upbdefs", + ":proto_gen_validate_upbdefs", + ":udpa_annotations_upbdefs", + ], +) + grpc_cc_library( name = "envoy_annotations_upb", srcs = [ @@ -2578,6 +2680,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", deps = [ @@ -2585,6 +2688,28 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "envoy_annotations_upbdefs", + srcs = [ + "src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c", + "src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c", + ], + hdrs = [ + "src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h", + "src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h", + ], + external_deps = [ + "upb_lib", + "upb_lib_descriptor", + "upb_textformat_lib", + ], + language = "c++", + deps = [ + ":envoy_annotations_upb", + ":google_api_upbdefs", + ], +) + grpc_cc_library( name = "envoy_core_upb", srcs = [ @@ -2613,6 +2738,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", deps = [ @@ -2624,6 +2750,46 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "envoy_core_upbdefs", + srcs = [ + "src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c", + ], + hdrs = [ + "src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h", + "src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h", + ], + external_deps = [ + "upb_lib", + "upb_lib_descriptor", + "upb_textformat_lib", + ], + language = "c++", + deps = [ + ":envoy_core_upb", + ":envoy_type_upbdefs", + ":google_api_upbdefs", + ":proto_gen_validate_upbdefs", + ], +) + grpc_cc_library( name = "envoy_type_upb", srcs = [ @@ -2648,6 +2814,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", deps = [ @@ -2658,6 +2825,37 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "envoy_type_upbdefs", + srcs = [ + "src/core/ext/upb-generated/envoy/type/http.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/percent.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/range.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c", + ], + hdrs = [ + "src/core/ext/upb-generated/envoy/type/http.upbdefs.h", + "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h", + "src/core/ext/upb-generated/envoy/type/percent.upbdefs.h", + "src/core/ext/upb-generated/envoy/type/range.upbdefs.h", + "src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h", + "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h", + ], + external_deps = [ + "upb_lib", + "upb_lib_descriptor", + "upb_textformat_lib", + ], + language = "c++", + deps = [ + ":envoy_type_upb", + ":google_api_upbdefs", + ":proto_gen_validate_upbdefs", + ], +) + grpc_cc_library( name = "proto_gen_validate_upb", srcs = [ @@ -2670,6 +2868,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", deps = [ @@ -2677,6 +2876,28 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "proto_gen_validate_upbdefs", + srcs = [ + "src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c", + "src/core/ext/upb-generated/validate/validate.upbdefs.c", + ], + hdrs = [ + "src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h", + "src/core/ext/upb-generated/validate/validate.upbdefs.h", + ], + external_deps = [ + "upb_lib", + "upb_lib_descriptor", + "upb_textformat_lib", + ], + language = "c++", + deps = [ + ":google_api_upbdefs", + ":proto_gen_validate_upb", + ], +) + # Once upb code-gen issue is resolved, replace udpa_orca_upb with this. # grpc_upb_proto_library( # name = "udpa_orca_upb", @@ -2693,6 +2914,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", deps = [ @@ -2714,6 +2936,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", deps = [ @@ -2721,6 +2944,30 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "udpa_annotations_upbdefs", + srcs = [ + "src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c", + "src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c", + "src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c", + ], + hdrs = [ + "src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h", + "src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h", + "src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h", + ], + external_deps = [ + "upb_lib", + "upb_lib_descriptor", + "upb_textformat_lib", + ], + language = "c++", + deps = [ + ":google_api_upbdefs", + ":udpa_annotations_upb", + ], +) + # Once upb code-gen issue is resolved, replace grpc_health_upb with this. # grpc_upb_proto_library( # name = "grpc_health_upb", @@ -2737,6 +2984,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", ) @@ -2748,7 +2996,6 @@ grpc_cc_library( "src/core/ext/upb-generated/google/api/annotations.upb.c", "src/core/ext/upb-generated/google/api/http.upb.c", "src/core/ext/upb-generated/google/protobuf/any.upb.c", - "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c", "src/core/ext/upb-generated/google/protobuf/duration.upb.c", "src/core/ext/upb-generated/google/protobuf/empty.upb.c", "src/core/ext/upb-generated/google/protobuf/struct.upb.c", @@ -2760,7 +3007,6 @@ grpc_cc_library( "src/core/ext/upb-generated/google/api/annotations.upb.h", "src/core/ext/upb-generated/google/api/http.upb.h", "src/core/ext/upb-generated/google/protobuf/any.upb.h", - "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h", "src/core/ext/upb-generated/google/protobuf/duration.upb.h", "src/core/ext/upb-generated/google/protobuf/empty.upb.h", "src/core/ext/upb-generated/google/protobuf/struct.upb.h", @@ -2770,10 +3016,48 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", ) +grpc_cc_library( + name = "google_api_upbdefs", + srcs = [ + "src/core/ext/upb-generated/google/api/annotations.upbdefs.c", + "src/core/ext/upb-generated/google/api/http.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/any.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c", + "src/core/ext/upb-generated/google/rpc/status.upbdefs.c", + ], + hdrs = [ + "src/core/ext/upb-generated/google/api/annotations.upbdefs.h", + "src/core/ext/upb-generated/google/api/http.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/any.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h", + "src/core/ext/upb-generated/google/rpc/status.upbdefs.h", + ], + external_deps = [ + "upb_lib", + "upb_lib_descriptor", + "upb_textformat_lib", + ], + language = "c++", + deps = [ + ":google_api_upb", + ], +) + # Once upb code-gen issue is resolved, replace grpc_lb_upb with this. # grpc_upb_proto_library( # name = "grpc_lb_upb", @@ -2790,6 +3074,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", deps = [ @@ -2817,6 +3102,7 @@ grpc_cc_library( ], external_deps = [ "upb_lib", + "upb_lib_descriptor", ], language = "c++", ) diff --git a/BUILD.gn b/BUILD.gn index a2283c11f4c..cb133df9924 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -398,130 +398,254 @@ config("grpc_config") { "src/core/ext/transport/inproc/inproc_transport.h", "src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c", "src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h", + "src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c", + "src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h", "src/core/ext/upb-generated/envoy/annotations/resource.upb.c", "src/core/ext/upb-generated/envoy/annotations/resource.upb.h", + "src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c", + "src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c", "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c", "src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c", "src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c", "src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/cds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c", "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c", "src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c", "src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/eds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/eds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c", "src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c", "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c", "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c", "src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/lds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/lds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/listener.upb.c", "src/core/ext/upb-generated/envoy/api/v2/listener.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c", "src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c", "src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c", "src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/rds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/rds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/route.upb.c", "src/core/ext/upb-generated/envoy/api/v2/route.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c", "src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c", "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c", "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h", "src/core/ext/upb-generated/envoy/api/v2/srds.upb.c", "src/core/ext/upb-generated/envoy/api/v2/srds.upb.h", + "src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c", + "src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h", "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c", "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h", + "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c", + "src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h", "src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c", "src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h", + "src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c", + "src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h", "src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c", "src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h", + "src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c", + "src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h", "src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c", "src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h", + "src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c", + "src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h", "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c", "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h", + "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c", + "src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h", "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c", "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h", + "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c", + "src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h", "src/core/ext/upb-generated/envoy/type/http.upb.c", "src/core/ext/upb-generated/envoy/type/http.upb.h", + "src/core/ext/upb-generated/envoy/type/http.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/http.upbdefs.h", "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c", "src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h", + "src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h", "src/core/ext/upb-generated/envoy/type/matcher/string.upb.c", "src/core/ext/upb-generated/envoy/type/matcher/string.upb.h", + "src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h", "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c", "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h", + "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h", "src/core/ext/upb-generated/envoy/type/percent.upb.c", "src/core/ext/upb-generated/envoy/type/percent.upb.h", + "src/core/ext/upb-generated/envoy/type/percent.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/percent.upbdefs.h", "src/core/ext/upb-generated/envoy/type/range.upb.c", "src/core/ext/upb-generated/envoy/type/range.upb.h", + "src/core/ext/upb-generated/envoy/type/range.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/range.upbdefs.h", "src/core/ext/upb-generated/envoy/type/semantic_version.upb.c", "src/core/ext/upb-generated/envoy/type/semantic_version.upb.h", + "src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h", "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c", "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h", + "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c", + "src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h", "src/core/ext/upb-generated/gogoproto/gogo.upb.c", "src/core/ext/upb-generated/gogoproto/gogo.upb.h", + "src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c", + "src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h", "src/core/ext/upb-generated/google/api/annotations.upb.c", "src/core/ext/upb-generated/google/api/annotations.upb.h", + "src/core/ext/upb-generated/google/api/annotations.upbdefs.c", + "src/core/ext/upb-generated/google/api/annotations.upbdefs.h", "src/core/ext/upb-generated/google/api/http.upb.c", "src/core/ext/upb-generated/google/api/http.upb.h", + "src/core/ext/upb-generated/google/api/http.upbdefs.c", + "src/core/ext/upb-generated/google/api/http.upbdefs.h", "src/core/ext/upb-generated/google/protobuf/any.upb.c", "src/core/ext/upb-generated/google/protobuf/any.upb.h", - "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c", - "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h", + "src/core/ext/upb-generated/google/protobuf/any.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/any.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h", "src/core/ext/upb-generated/google/protobuf/duration.upb.c", "src/core/ext/upb-generated/google/protobuf/duration.upb.h", + "src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h", "src/core/ext/upb-generated/google/protobuf/empty.upb.c", "src/core/ext/upb-generated/google/protobuf/empty.upb.h", + "src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h", "src/core/ext/upb-generated/google/protobuf/struct.upb.c", "src/core/ext/upb-generated/google/protobuf/struct.upb.h", + "src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h", "src/core/ext/upb-generated/google/protobuf/timestamp.upb.c", "src/core/ext/upb-generated/google/protobuf/timestamp.upb.h", + "src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h", "src/core/ext/upb-generated/google/protobuf/wrappers.upb.c", "src/core/ext/upb-generated/google/protobuf/wrappers.upb.h", + "src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h", "src/core/ext/upb-generated/google/rpc/status.upb.c", "src/core/ext/upb-generated/google/rpc/status.upb.h", + "src/core/ext/upb-generated/google/rpc/status.upbdefs.c", + "src/core/ext/upb-generated/google/rpc/status.upbdefs.h", "src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c", "src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h", "src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c", @@ -534,14 +658,22 @@ config("grpc_config") { "src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h", "src/core/ext/upb-generated/udpa/annotations/migrate.upb.c", "src/core/ext/upb-generated/udpa/annotations/migrate.upb.h", + "src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c", + "src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h", "src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c", "src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h", + "src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c", + "src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h", "src/core/ext/upb-generated/udpa/annotations/status.upb.c", "src/core/ext/upb-generated/udpa/annotations/status.upb.h", + "src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c", + "src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h", "src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c", "src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h", "src/core/ext/upb-generated/validate/validate.upb.c", "src/core/ext/upb-generated/validate/validate.upb.h", + "src/core/ext/upb-generated/validate/validate.upbdefs.c", + "src/core/ext/upb-generated/validate/validate.upbdefs.h", "src/core/lib/avl/avl.cc", "src/core/lib/avl/avl.h", "src/core/lib/backoff/backoff.cc", diff --git a/CMakeLists.txt b/CMakeLists.txt index 58f82733a9b..3f19de24db9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1432,78 +1432,144 @@ add_library(grpc src/core/ext/transport/inproc/inproc_plugin.cc src/core/ext/transport/inproc/inproc_transport.cc src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c + src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c src/core/ext/upb-generated/envoy/annotations/resource.upb.c + src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c + src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c + src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c + src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c + src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c + src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/lds.upb.c + src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/listener.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/rds.upb.c + src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/route.upb.c + src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c + src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/srds.upb.c + src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c + src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c + src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c + src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c + src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c + src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c + src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c src/core/ext/upb-generated/envoy/type/http.upb.c + src/core/ext/upb-generated/envoy/type/http.upbdefs.c src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c + src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c src/core/ext/upb-generated/envoy/type/matcher/string.upb.c + src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c src/core/ext/upb-generated/envoy/type/percent.upb.c + src/core/ext/upb-generated/envoy/type/percent.upbdefs.c src/core/ext/upb-generated/envoy/type/range.upb.c + src/core/ext/upb-generated/envoy/type/range.upbdefs.c src/core/ext/upb-generated/envoy/type/semantic_version.upb.c + src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c src/core/ext/upb-generated/gogoproto/gogo.upb.c + src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c src/core/ext/upb-generated/google/api/annotations.upb.c + src/core/ext/upb-generated/google/api/annotations.upbdefs.c src/core/ext/upb-generated/google/api/http.upb.c + src/core/ext/upb-generated/google/api/http.upbdefs.c src/core/ext/upb-generated/google/protobuf/any.upb.c - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + src/core/ext/upb-generated/google/protobuf/any.upbdefs.c + src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c src/core/ext/upb-generated/google/protobuf/duration.upb.c + src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c src/core/ext/upb-generated/google/protobuf/empty.upb.c + src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c src/core/ext/upb-generated/google/protobuf/struct.upb.c + src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c src/core/ext/upb-generated/google/rpc/status.upb.c + src/core/ext/upb-generated/google/rpc/status.upbdefs.c src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c src/core/ext/upb-generated/udpa/annotations/migrate.upb.c + src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c + src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c src/core/ext/upb-generated/udpa/annotations/status.upb.c + src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c src/core/ext/upb-generated/validate/validate.upb.c + src/core/ext/upb-generated/validate/validate.upbdefs.c src/core/lib/avl/avl.cc src/core/lib/backoff/backoff.cc src/core/lib/channel/channel_args.cc @@ -2102,75 +2168,141 @@ add_library(grpc_unsecure src/core/ext/transport/inproc/inproc_plugin.cc src/core/ext/transport/inproc/inproc_transport.cc src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c + src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c src/core/ext/upb-generated/envoy/annotations/resource.upb.c + src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c + src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c + src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c + src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c + src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c + src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c + src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c + src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c + src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/lds.upb.c + src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/listener.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c + src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/rds.upb.c + src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/route.upb.c + src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c + src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c src/core/ext/upb-generated/envoy/api/v2/srds.upb.c + src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c + src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c + src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c + src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c + src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c + src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c + src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c src/core/ext/upb-generated/envoy/type/http.upb.c + src/core/ext/upb-generated/envoy/type/http.upbdefs.c src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c + src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c src/core/ext/upb-generated/envoy/type/matcher/string.upb.c + src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c src/core/ext/upb-generated/envoy/type/percent.upb.c + src/core/ext/upb-generated/envoy/type/percent.upbdefs.c src/core/ext/upb-generated/envoy/type/range.upb.c + src/core/ext/upb-generated/envoy/type/range.upbdefs.c src/core/ext/upb-generated/envoy/type/semantic_version.upb.c + src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c src/core/ext/upb-generated/gogoproto/gogo.upb.c + src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c src/core/ext/upb-generated/google/api/annotations.upb.c + src/core/ext/upb-generated/google/api/annotations.upbdefs.c src/core/ext/upb-generated/google/api/http.upb.c + src/core/ext/upb-generated/google/api/http.upbdefs.c src/core/ext/upb-generated/google/protobuf/any.upb.c - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + src/core/ext/upb-generated/google/protobuf/any.upbdefs.c + src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c src/core/ext/upb-generated/google/protobuf/duration.upb.c + src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c src/core/ext/upb-generated/google/protobuf/empty.upb.c + src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c src/core/ext/upb-generated/google/protobuf/struct.upb.c + src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c src/core/ext/upb-generated/google/rpc/status.upb.c + src/core/ext/upb-generated/google/rpc/status.upbdefs.c src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c src/core/ext/upb-generated/udpa/annotations/migrate.upb.c + src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c + src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c src/core/ext/upb-generated/udpa/annotations/status.upb.c + src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c src/core/ext/upb-generated/validate/validate.upb.c + src/core/ext/upb-generated/validate/validate.upbdefs.c src/core/lib/avl/avl.cc src/core/lib/backoff/backoff.cc src/core/lib/channel/channel_args.cc @@ -3639,6 +3771,23 @@ add_library(upb third_party/upb/upb/port.c third_party/upb/upb/table.c third_party/upb/upb/upb.c + third_party/upb/upb/def.c + third_party/upb/upb/reflection.c + third_party/upb/upb/text_encode.c + src/core/ext/upb-generated/google/protobuf/any.upb.c + src/core/ext/upb-generated/google/protobuf/any.upbdefs.c + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c + src/core/ext/upb-generated/google/protobuf/duration.upb.c + src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c + src/core/ext/upb-generated/google/protobuf/empty.upb.c + src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c + src/core/ext/upb-generated/google/protobuf/struct.upb.c + src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c ) set_target_properties(upb PROPERTIES diff --git a/Makefile b/Makefile index 70f839ef866..cf294e9b9ba 100644 --- a/Makefile +++ b/Makefile @@ -3735,78 +3735,144 @@ LIBGRPC_SRC = \ src/core/ext/transport/inproc/inproc_plugin.cc \ src/core/ext/transport/inproc/inproc_transport.cc \ src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c \ + src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c \ src/core/ext/upb-generated/envoy/annotations/resource.upb.c \ + src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/lds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c \ src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \ + src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c \ src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \ + src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c \ src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c \ + src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c \ src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c \ + src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c \ src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c \ + src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c \ src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c \ + src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c \ src/core/ext/upb-generated/envoy/type/http.upb.c \ + src/core/ext/upb-generated/envoy/type/http.upbdefs.c \ src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \ + src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c \ src/core/ext/upb-generated/envoy/type/matcher/string.upb.c \ + src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c \ src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c \ + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ + src/core/ext/upb-generated/envoy/type/percent.upbdefs.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ + src/core/ext/upb-generated/envoy/type/range.upbdefs.c \ src/core/ext/upb-generated/envoy/type/semantic_version.upb.c \ + src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c \ src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c \ + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c \ src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c \ src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upbdefs.c \ src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/api/http.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/any.upb.c \ - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upbdefs.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c \ src/core/ext/upb-generated/google/rpc/status.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upbdefs.c \ src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c \ src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c \ src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c \ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ + src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c \ src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c \ + src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c \ src/core/ext/upb-generated/udpa/annotations/status.upb.c \ + src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c \ src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/validate/validate.upbdefs.c \ src/core/lib/avl/avl.cc \ src/core/lib/backoff/backoff.cc \ src/core/lib/channel/channel_args.cc \ @@ -4379,75 +4445,141 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/transport/inproc/inproc_plugin.cc \ src/core/ext/transport/inproc/inproc_transport.cc \ src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c \ + src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c \ src/core/ext/upb-generated/envoy/annotations/resource.upb.c \ + src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/lds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c \ src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \ + src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c \ src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \ + src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c \ src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c \ + src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c \ src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c \ + src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c \ src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c \ + src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c \ src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c \ + src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c \ src/core/ext/upb-generated/envoy/type/http.upb.c \ + src/core/ext/upb-generated/envoy/type/http.upbdefs.c \ src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \ + src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c \ src/core/ext/upb-generated/envoy/type/matcher/string.upb.c \ + src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c \ src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c \ + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ + src/core/ext/upb-generated/envoy/type/percent.upbdefs.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ + src/core/ext/upb-generated/envoy/type/range.upbdefs.c \ src/core/ext/upb-generated/envoy/type/semantic_version.upb.c \ + src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c \ src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c \ + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c \ src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c \ src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upbdefs.c \ src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/api/http.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/any.upb.c \ - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upbdefs.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c \ src/core/ext/upb-generated/google/rpc/status.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upbdefs.c \ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ + src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c \ src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c \ + src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c \ src/core/ext/upb-generated/udpa/annotations/status.upb.c \ + src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c \ src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/validate/validate.upbdefs.c \ src/core/lib/avl/avl.cc \ src/core/lib/backoff/backoff.cc \ src/core/lib/channel/channel_args.cc \ @@ -6243,6 +6375,23 @@ LIBUPB_SRC = \ third_party/upb/upb/port.c \ third_party/upb/upb/table.c \ third_party/upb/upb/upb.c \ + third_party/upb/upb/def.c \ + third_party/upb/upb/reflection.c \ + third_party/upb/upb/text_encode.c \ + src/core/ext/upb-generated/google/protobuf/any.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upbdefs.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c \ + src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c \ + src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c \ + src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c \ PUBLIC_HEADERS_C += \ diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index f8826f069f4..c868438e93b 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -11,6 +11,16 @@ def grpc_deps(): actual = "@upb//:upb", ) + native.bind( + name = "upb_lib_descriptor", + actual = "@upb//:descriptor_upb_proto", + ) + + native.bind( + name = "upb_textformat_lib", + actual = "@upb//:textformat", + ) + native.bind( name = "absl", actual = "@com_google_absl//absl", diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 76f0de0635a..8f6fc380b4e 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -460,78 +460,144 @@ libs: - src/core/ext/transport/chttp2/transport/varint.h - src/core/ext/transport/inproc/inproc_transport.h - src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h + - src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h - src/core/ext/upb-generated/envoy/annotations/resource.upb.h + - src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h + - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h + - src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h + - src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h + - src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h + - src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/eds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/lds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/listener.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/rds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/route.upb.h + - src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h + - src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h + - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h + - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/srds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h + - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h + - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h - src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h + - src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h - src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h + - src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h - src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h + - src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h - src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h + - src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h - src/core/ext/upb-generated/envoy/type/http.upb.h + - src/core/ext/upb-generated/envoy/type/http.upbdefs.h - src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h + - src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h - src/core/ext/upb-generated/envoy/type/matcher/string.upb.h + - src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h + - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h - src/core/ext/upb-generated/envoy/type/percent.upb.h + - src/core/ext/upb-generated/envoy/type/percent.upbdefs.h - src/core/ext/upb-generated/envoy/type/range.upb.h + - src/core/ext/upb-generated/envoy/type/range.upbdefs.h - src/core/ext/upb-generated/envoy/type/semantic_version.upb.h + - src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h + - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h - src/core/ext/upb-generated/gogoproto/gogo.upb.h + - src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h - src/core/ext/upb-generated/google/api/annotations.upb.h + - src/core/ext/upb-generated/google/api/annotations.upbdefs.h - src/core/ext/upb-generated/google/api/http.upb.h + - src/core/ext/upb-generated/google/api/http.upbdefs.h - src/core/ext/upb-generated/google/protobuf/any.upb.h - - src/core/ext/upb-generated/google/protobuf/descriptor.upb.h + - src/core/ext/upb-generated/google/protobuf/any.upbdefs.h + - src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h - src/core/ext/upb-generated/google/protobuf/duration.upb.h + - src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h - src/core/ext/upb-generated/google/protobuf/empty.upb.h + - src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h - src/core/ext/upb-generated/google/protobuf/struct.upb.h + - src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h - src/core/ext/upb-generated/google/protobuf/timestamp.upb.h + - src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h - src/core/ext/upb-generated/google/protobuf/wrappers.upb.h + - src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h - src/core/ext/upb-generated/google/rpc/status.upb.h + - src/core/ext/upb-generated/google/rpc/status.upbdefs.h - src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h - src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h - src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h - src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h - src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h - src/core/ext/upb-generated/udpa/annotations/migrate.upb.h + - src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h - src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h + - src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h - src/core/ext/upb-generated/udpa/annotations/status.upb.h + - src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h - src/core/ext/upb-generated/validate/validate.upb.h + - src/core/ext/upb-generated/validate/validate.upbdefs.h - src/core/lib/avl/avl.h - src/core/lib/backoff/backoff.h - src/core/lib/channel/channel_args.h @@ -851,78 +917,144 @@ libs: - src/core/ext/transport/inproc/inproc_plugin.cc - src/core/ext/transport/inproc/inproc_transport.cc - src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c + - src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c - src/core/ext/upb-generated/envoy/annotations/resource.upb.c + - src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c + - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c + - src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c + - src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c + - src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c + - src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/lds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/listener.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/rds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/route.upb.c + - src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c + - src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c + - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c + - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/srds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c + - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c + - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c - src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c + - src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c - src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c + - src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c - src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c + - src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c - src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c + - src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c - src/core/ext/upb-generated/envoy/type/http.upb.c + - src/core/ext/upb-generated/envoy/type/http.upbdefs.c - src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c + - src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c - src/core/ext/upb-generated/envoy/type/matcher/string.upb.c + - src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c + - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c - src/core/ext/upb-generated/envoy/type/percent.upb.c + - src/core/ext/upb-generated/envoy/type/percent.upbdefs.c - src/core/ext/upb-generated/envoy/type/range.upb.c + - src/core/ext/upb-generated/envoy/type/range.upbdefs.c - src/core/ext/upb-generated/envoy/type/semantic_version.upb.c + - src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c + - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c - src/core/ext/upb-generated/gogoproto/gogo.upb.c + - src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c - src/core/ext/upb-generated/google/api/annotations.upb.c + - src/core/ext/upb-generated/google/api/annotations.upbdefs.c - src/core/ext/upb-generated/google/api/http.upb.c + - src/core/ext/upb-generated/google/api/http.upbdefs.c - src/core/ext/upb-generated/google/protobuf/any.upb.c - - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + - src/core/ext/upb-generated/google/protobuf/any.upbdefs.c + - src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c - src/core/ext/upb-generated/google/protobuf/duration.upb.c + - src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c - src/core/ext/upb-generated/google/protobuf/empty.upb.c + - src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c - src/core/ext/upb-generated/google/protobuf/struct.upb.c + - src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c - src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + - src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c - src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + - src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c - src/core/ext/upb-generated/google/rpc/status.upb.c + - src/core/ext/upb-generated/google/rpc/status.upbdefs.c - src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c - src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c - src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c - src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c - src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c - src/core/ext/upb-generated/udpa/annotations/migrate.upb.c + - src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c - src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c + - src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c - src/core/ext/upb-generated/udpa/annotations/status.upb.c + - src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c - src/core/ext/upb-generated/validate/validate.upb.c + - src/core/ext/upb-generated/validate/validate.upbdefs.c - src/core/lib/avl/avl.cc - src/core/lib/backoff/backoff.cc - src/core/lib/channel/channel_args.cc @@ -1385,75 +1517,141 @@ libs: - src/core/ext/transport/chttp2/transport/varint.h - src/core/ext/transport/inproc/inproc_transport.h - src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h + - src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h - src/core/ext/upb-generated/envoy/annotations/resource.upb.h + - src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h + - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h + - src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h + - src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h + - src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h + - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h + - src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h + - src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/eds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h + - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/lds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/listener.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h + - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/rds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/route.upb.h + - src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h + - src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h + - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h + - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h - src/core/ext/upb-generated/envoy/api/v2/srds.upb.h + - src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h + - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h + - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h - src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h + - src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h - src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h + - src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h - src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h + - src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h - src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h + - src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h - src/core/ext/upb-generated/envoy/type/http.upb.h + - src/core/ext/upb-generated/envoy/type/http.upbdefs.h - src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h + - src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h - src/core/ext/upb-generated/envoy/type/matcher/string.upb.h + - src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h + - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h - src/core/ext/upb-generated/envoy/type/percent.upb.h + - src/core/ext/upb-generated/envoy/type/percent.upbdefs.h - src/core/ext/upb-generated/envoy/type/range.upb.h + - src/core/ext/upb-generated/envoy/type/range.upbdefs.h - src/core/ext/upb-generated/envoy/type/semantic_version.upb.h + - src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h + - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h - src/core/ext/upb-generated/gogoproto/gogo.upb.h + - src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h - src/core/ext/upb-generated/google/api/annotations.upb.h + - src/core/ext/upb-generated/google/api/annotations.upbdefs.h - src/core/ext/upb-generated/google/api/http.upb.h + - src/core/ext/upb-generated/google/api/http.upbdefs.h - src/core/ext/upb-generated/google/protobuf/any.upb.h - - src/core/ext/upb-generated/google/protobuf/descriptor.upb.h + - src/core/ext/upb-generated/google/protobuf/any.upbdefs.h + - src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h - src/core/ext/upb-generated/google/protobuf/duration.upb.h + - src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h - src/core/ext/upb-generated/google/protobuf/empty.upb.h + - src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h - src/core/ext/upb-generated/google/protobuf/struct.upb.h + - src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h - src/core/ext/upb-generated/google/protobuf/timestamp.upb.h + - src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h - src/core/ext/upb-generated/google/protobuf/wrappers.upb.h + - src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h - src/core/ext/upb-generated/google/rpc/status.upb.h + - src/core/ext/upb-generated/google/rpc/status.upbdefs.h - src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h - src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h - src/core/ext/upb-generated/udpa/annotations/migrate.upb.h + - src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h - src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h + - src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h - src/core/ext/upb-generated/udpa/annotations/status.upb.h + - src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h - src/core/ext/upb-generated/validate/validate.upb.h + - src/core/ext/upb-generated/validate/validate.upbdefs.h - src/core/lib/avl/avl.h - src/core/lib/backoff/backoff.h - src/core/lib/channel/channel_args.h @@ -1710,75 +1908,141 @@ libs: - src/core/ext/transport/inproc/inproc_plugin.cc - src/core/ext/transport/inproc/inproc_transport.cc - src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c + - src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c - src/core/ext/upb-generated/envoy/annotations/resource.upb.c + - src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c + - src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c + - src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c + - src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c + - src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c + - src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c + - src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c + - src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/eds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c + - src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/lds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/listener.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c + - src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/rds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/route.upb.c + - src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c + - src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c + - src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c + - src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c - src/core/ext/upb-generated/envoy/api/v2/srds.upb.c + - src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c + - src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c + - src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c - src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c + - src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c - src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c + - src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c - src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c + - src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c - src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c + - src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c - src/core/ext/upb-generated/envoy/type/http.upb.c + - src/core/ext/upb-generated/envoy/type/http.upbdefs.c - src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c + - src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c - src/core/ext/upb-generated/envoy/type/matcher/string.upb.c + - src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c + - src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c - src/core/ext/upb-generated/envoy/type/percent.upb.c + - src/core/ext/upb-generated/envoy/type/percent.upbdefs.c - src/core/ext/upb-generated/envoy/type/range.upb.c + - src/core/ext/upb-generated/envoy/type/range.upbdefs.c - src/core/ext/upb-generated/envoy/type/semantic_version.upb.c + - src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c + - src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c - src/core/ext/upb-generated/gogoproto/gogo.upb.c + - src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c - src/core/ext/upb-generated/google/api/annotations.upb.c + - src/core/ext/upb-generated/google/api/annotations.upbdefs.c - src/core/ext/upb-generated/google/api/http.upb.c + - src/core/ext/upb-generated/google/api/http.upbdefs.c - src/core/ext/upb-generated/google/protobuf/any.upb.c - - src/core/ext/upb-generated/google/protobuf/descriptor.upb.c + - src/core/ext/upb-generated/google/protobuf/any.upbdefs.c + - src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c - src/core/ext/upb-generated/google/protobuf/duration.upb.c + - src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c - src/core/ext/upb-generated/google/protobuf/empty.upb.c + - src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c - src/core/ext/upb-generated/google/protobuf/struct.upb.c + - src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c - src/core/ext/upb-generated/google/protobuf/timestamp.upb.c + - src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c - src/core/ext/upb-generated/google/protobuf/wrappers.upb.c + - src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c - src/core/ext/upb-generated/google/rpc/status.upb.c + - src/core/ext/upb-generated/google/rpc/status.upbdefs.c - src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c - src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c - src/core/ext/upb-generated/udpa/annotations/migrate.upb.c + - src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c - src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c + - src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c - src/core/ext/upb-generated/udpa/annotations/status.upb.c + - src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c - src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c - src/core/ext/upb-generated/validate/validate.upb.c + - src/core/ext/upb-generated/validate/validate.upbdefs.c - src/core/lib/avl/avl.cc - src/core/lib/backoff/backoff.cc - src/core/lib/channel/channel_args.cc diff --git a/config.m4 b/config.m4 index 5ee9f1c8d58..e410a53cb5b 100644 --- a/config.m4 +++ b/config.m4 @@ -149,78 +149,145 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/transport/inproc/inproc_plugin.cc \ src/core/ext/transport/inproc/inproc_transport.cc \ src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c \ + src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c \ src/core/ext/upb-generated/envoy/annotations/resource.upb.c \ + src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/eds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/lds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/rds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c \ src/core/ext/upb-generated/envoy/api/v2/srds.upb.c \ + src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c \ src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c \ + src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c \ src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c \ + src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c \ src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c \ + src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c \ src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c \ + src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c \ src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c \ + src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c \ src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c \ + src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c \ src/core/ext/upb-generated/envoy/type/http.upb.c \ + src/core/ext/upb-generated/envoy/type/http.upbdefs.c \ src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c \ + src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c \ src/core/ext/upb-generated/envoy/type/matcher/string.upb.c \ + src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c \ src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c \ + src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c \ src/core/ext/upb-generated/envoy/type/percent.upb.c \ + src/core/ext/upb-generated/envoy/type/percent.upbdefs.c \ src/core/ext/upb-generated/envoy/type/range.upb.c \ + src/core/ext/upb-generated/envoy/type/range.upbdefs.c \ src/core/ext/upb-generated/envoy/type/semantic_version.upb.c \ + src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c \ src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c \ + src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c \ src/core/ext/upb-generated/gogoproto/gogo.upb.c \ + src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c \ src/core/ext/upb-generated/google/api/annotations.upb.c \ + src/core/ext/upb-generated/google/api/annotations.upbdefs.c \ src/core/ext/upb-generated/google/api/http.upb.c \ + src/core/ext/upb-generated/google/api/http.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/any.upb.c \ + src/core/ext/upb-generated/google/protobuf/any.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/descriptor.upb.c \ + src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/duration.upb.c \ + src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/empty.upb.c \ + src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/struct.upb.c \ + src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/timestamp.upb.c \ + src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c \ src/core/ext/upb-generated/google/protobuf/wrappers.upb.c \ + src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c \ src/core/ext/upb-generated/google/rpc/status.upb.c \ + src/core/ext/upb-generated/google/rpc/status.upbdefs.c \ src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c \ src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c \ src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c \ src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c \ src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c \ src/core/ext/upb-generated/udpa/annotations/migrate.upb.c \ + src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c \ src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c \ + src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c \ src/core/ext/upb-generated/udpa/annotations/status.upb.c \ + src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c \ src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c \ src/core/ext/upb-generated/validate/validate.upb.c \ + src/core/ext/upb-generated/validate/validate.upbdefs.c \ src/core/lib/avl/avl.cc \ src/core/lib/backoff/backoff.cc \ src/core/lib/channel/channel_args.cc \ @@ -825,10 +892,13 @@ if test "$PHP_GRPC" != "no"; then third_party/boringssl-with-bazel/src/ssl/tls_method.cc \ third_party/boringssl-with-bazel/src/ssl/tls_record.cc \ third_party/upb/upb/decode.c \ + third_party/upb/upb/def.c \ third_party/upb/upb/encode.c \ third_party/upb/upb/msg.c \ third_party/upb/upb/port.c \ + third_party/upb/upb/reflection.c \ third_party/upb/upb/table.c \ + third_party/upb/upb/text_encode.c \ third_party/upb/upb/upb.c \ , $ext_shared, , -fvisibility=hidden \ -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN \ diff --git a/config.w32 b/config.w32 index 1c533a33302..1dee370692d 100644 --- a/config.w32 +++ b/config.w32 @@ -118,78 +118,145 @@ if (PHP_GRPC != "no") { "src\\core\\ext\\transport\\inproc\\inproc_plugin.cc " + "src\\core\\ext\\transport\\inproc\\inproc_transport.cc " + "src\\core\\ext\\upb-generated\\envoy\\annotations\\deprecation.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\annotations\\deprecation.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\annotations\\resource.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\annotations\\resource.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\cert.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\cert.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\common.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\common.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\secret.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\secret.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\tls.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\auth\\tls.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cds.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\circuit_breaker.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\circuit_breaker.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\filter.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\filter.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\outlier_detection.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\cluster\\outlier_detection.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\address.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\address.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\backoff.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\backoff.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\base.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\base.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\config_source.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\config_source.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\event_service_config.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\event_service_config.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\grpc_service.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\grpc_service.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\health_check.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\health_check.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\http_uri.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\http_uri.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\protocol.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\protocol.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\socket_option.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\core\\socket_option.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\discovery.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\discovery.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\eds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\eds.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\endpoint.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\endpoint.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\endpoint_components.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\endpoint_components.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\load_report.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\endpoint\\load_report.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\lds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\lds.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\listener.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\listener.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\listener_components.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\listener_components.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\udp_listener_config.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\listener\\udp_listener_config.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\rds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\rds.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route\\route.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route\\route.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route\\route_components.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\route\\route_components.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\scoped_route.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\scoped_route.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\srds.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\api\\v2\\srds.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\config\\filter\\accesslog\\v2\\accesslog.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\config\\filter\\accesslog\\v2\\accesslog.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network\\http_connection_manager\\v2\\http_connection_manager.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\config\\filter\\network\\http_connection_manager\\v2\\http_connection_manager.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\config\\listener\\v2\\api_listener.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\config\\listener\\v2\\api_listener.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\config\\trace\\v2\\http_tracer.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\config\\trace\\v2\\http_tracer.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\service\\discovery\\v2\\ads.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\service\\discovery\\v2\\ads.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\service\\load_stats\\v2\\lrs.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\service\\load_stats\\v2\\lrs.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\http.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\http.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\matcher\\regex.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\matcher\\regex.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\matcher\\string.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\matcher\\string.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\metadata\\v2\\metadata.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\metadata\\v2\\metadata.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\percent.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\percent.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\range.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\range.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\semantic_version.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\semantic_version.upbdefs.c " + "src\\core\\ext\\upb-generated\\envoy\\type\\tracing\\v2\\custom_tag.upb.c " + + "src\\core\\ext\\upb-generated\\envoy\\type\\tracing\\v2\\custom_tag.upbdefs.c " + "src\\core\\ext\\upb-generated\\gogoproto\\gogo.upb.c " + + "src\\core\\ext\\upb-generated\\gogoproto\\gogo.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\api\\annotations.upb.c " + + "src\\core\\ext\\upb-generated\\google\\api\\annotations.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\api\\http.upb.c " + + "src\\core\\ext\\upb-generated\\google\\api\\http.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\protobuf\\any.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\any.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\protobuf\\descriptor.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\descriptor.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\protobuf\\duration.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\duration.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\protobuf\\empty.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\empty.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\protobuf\\struct.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\struct.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\protobuf\\timestamp.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\timestamp.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\protobuf\\wrappers.upb.c " + + "src\\core\\ext\\upb-generated\\google\\protobuf\\wrappers.upbdefs.c " + "src\\core\\ext\\upb-generated\\google\\rpc\\status.upb.c " + + "src\\core\\ext\\upb-generated\\google\\rpc\\status.upbdefs.c " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\gcp\\altscontext.upb.c " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\gcp\\handshaker.upb.c " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\gcp\\transport_security_common.upb.c " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\health\\v1\\health.upb.c " + "src\\core\\ext\\upb-generated\\src\\proto\\grpc\\lb\\v1\\load_balancer.upb.c " + "src\\core\\ext\\upb-generated\\udpa\\annotations\\migrate.upb.c " + + "src\\core\\ext\\upb-generated\\udpa\\annotations\\migrate.upbdefs.c " + "src\\core\\ext\\upb-generated\\udpa\\annotations\\sensitive.upb.c " + + "src\\core\\ext\\upb-generated\\udpa\\annotations\\sensitive.upbdefs.c " + "src\\core\\ext\\upb-generated\\udpa\\annotations\\status.upb.c " + + "src\\core\\ext\\upb-generated\\udpa\\annotations\\status.upbdefs.c " + "src\\core\\ext\\upb-generated\\udpa\\data\\orca\\v1\\orca_load_report.upb.c " + "src\\core\\ext\\upb-generated\\validate\\validate.upb.c " + + "src\\core\\ext\\upb-generated\\validate\\validate.upbdefs.c " + "src\\core\\lib\\avl\\avl.cc " + "src\\core\\lib\\backoff\\backoff.cc " + "src\\core\\lib\\channel\\channel_args.cc " + @@ -794,10 +861,13 @@ if (PHP_GRPC != "no") { "third_party\\boringssl-with-bazel\\src\\ssl\\tls_method.cc " + "third_party\\boringssl-with-bazel\\src\\ssl\\tls_record.cc " + "third_party\\upb\\upb\\decode.c " + + "third_party\\upb\\upb\\def.c " + "third_party\\upb\\upb\\encode.c " + "third_party\\upb\\upb\\msg.c " + "third_party\\upb\\upb\\port.c " + + "third_party\\upb\\upb\\reflection.c " + "third_party\\upb\\upb\\table.c " + + "third_party\\upb\\upb\\text_encode.c " + "third_party\\upb\\upb\\upb.c " + "third_party\\zlib\\adler32.c " + "third_party\\zlib\\compress.c " + diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 24048b0c690..f7316b70fcf 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -308,78 +308,145 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h', + 'src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h', 'src/core/ext/upb-generated/envoy/annotations/resource.upb.h', + 'src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h', + 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h', + 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h', + 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h', + 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h', 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h', + 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h', 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h', + 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/http.upb.h', + 'src/core/ext/upb-generated/envoy/type/http.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', + 'src/core/ext/upb-generated/envoy/type/percent.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', + 'src/core/ext/upb-generated/envoy/type/range.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.h', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', + 'src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h', 'src/core/ext/upb-generated/google/api/annotations.upb.h', + 'src/core/ext/upb-generated/google/api/annotations.upbdefs.h', 'src/core/ext/upb-generated/google/api/http.upb.h', + 'src/core/ext/upb-generated/google/api/http.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/any.upb.h', + 'src/core/ext/upb-generated/google/protobuf/any.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', + 'src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/empty.upb.h', + 'src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', + 'src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h', 'src/core/ext/upb-generated/google/rpc/status.upb.h', + 'src/core/ext/upb-generated/google/rpc/status.upbdefs.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h', 'src/core/ext/upb-generated/udpa/annotations/status.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h', 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h', 'src/core/ext/upb-generated/validate/validate.upb.h', + 'src/core/ext/upb-generated/validate/validate.upbdefs.h', 'src/core/lib/avl/avl.h', 'src/core/lib/backoff/backoff.h', 'src/core/lib/channel/channel_args.h', @@ -673,11 +740,14 @@ Pod::Spec.new do |s| 'src/cpp/util/string_ref.cc', 'src/cpp/util/time_cc.cc', 'third_party/upb/upb/decode.h', + 'third_party/upb/upb/def.h', 'third_party/upb/upb/encode.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', + 'third_party/upb/upb/reflection.h', 'third_party/upb/upb/table.int.h', + 'third_party/upb/upb/text_encode.h', 'third_party/upb/upb/upb.h', 'third_party/upb/upb/upb.hpp' @@ -769,78 +839,145 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h', + 'src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h', 'src/core/ext/upb-generated/envoy/annotations/resource.upb.h', + 'src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h', + 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h', + 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h', + 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h', + 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h', 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h', + 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h', 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h', + 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/http.upb.h', + 'src/core/ext/upb-generated/envoy/type/http.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', + 'src/core/ext/upb-generated/envoy/type/percent.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', + 'src/core/ext/upb-generated/envoy/type/range.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.h', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', + 'src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h', 'src/core/ext/upb-generated/google/api/annotations.upb.h', + 'src/core/ext/upb-generated/google/api/annotations.upbdefs.h', 'src/core/ext/upb-generated/google/api/http.upb.h', + 'src/core/ext/upb-generated/google/api/http.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/any.upb.h', + 'src/core/ext/upb-generated/google/protobuf/any.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', + 'src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/empty.upb.h', + 'src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', + 'src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h', 'src/core/ext/upb-generated/google/rpc/status.upb.h', + 'src/core/ext/upb-generated/google/rpc/status.upbdefs.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h', 'src/core/ext/upb-generated/udpa/annotations/status.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h', 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h', 'src/core/ext/upb-generated/validate/validate.upb.h', + 'src/core/ext/upb-generated/validate/validate.upbdefs.h', 'src/core/lib/avl/avl.h', 'src/core/lib/backoff/backoff.h', 'src/core/lib/channel/channel_args.h', @@ -1087,11 +1224,14 @@ Pod::Spec.new do |s| 'src/cpp/server/thread_pool_interface.h', 'src/cpp/thread_manager/thread_manager.h', 'third_party/upb/upb/decode.h', + 'third_party/upb/upb/def.h', 'third_party/upb/upb/encode.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', + 'third_party/upb/upb/reflection.h', 'third_party/upb/upb/table.int.h', + 'third_party/upb/upb/text_encode.h', 'third_party/upb/upb/upb.h', 'third_party/upb/upb/upb.hpp' end diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index d908aab2f76..881e6163581 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -382,130 +382,256 @@ Pod::Spec.new do |s| 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c', 'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h', + 'src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c', + 'src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h', 'src/core/ext/upb-generated/envoy/annotations/resource.upb.c', 'src/core/ext/upb-generated/envoy/annotations/resource.upb.h', + 'src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c', + 'src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c', + 'src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h', + 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c', + 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h', + 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c', + 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c', 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h', + 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c', + 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c', 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h', + 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c', + 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h', 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c', 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h', + 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c', + 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h', 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c', 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h', + 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c', + 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/http.upb.c', 'src/core/ext/upb-generated/envoy/type/http.upb.h', + 'src/core/ext/upb-generated/envoy/type/http.upbdefs.c', + 'src/core/ext/upb-generated/envoy/type/http.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c', + 'src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.c', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c', + 'src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c', 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', + 'src/core/ext/upb-generated/envoy/type/percent.upbdefs.c', + 'src/core/ext/upb-generated/envoy/type/percent.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/range.upb.c', 'src/core/ext/upb-generated/envoy/type/range.upb.h', + 'src/core/ext/upb-generated/envoy/type/range.upbdefs.c', + 'src/core/ext/upb-generated/envoy/type/range.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.c', 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.h', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c', 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', + 'src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c', + 'src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h', 'src/core/ext/upb-generated/google/api/annotations.upb.c', 'src/core/ext/upb-generated/google/api/annotations.upb.h', + 'src/core/ext/upb-generated/google/api/annotations.upbdefs.c', + 'src/core/ext/upb-generated/google/api/annotations.upbdefs.h', 'src/core/ext/upb-generated/google/api/http.upb.c', 'src/core/ext/upb-generated/google/api/http.upb.h', + 'src/core/ext/upb-generated/google/api/http.upbdefs.c', + 'src/core/ext/upb-generated/google/api/http.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/any.upb.c', 'src/core/ext/upb-generated/google/protobuf/any.upb.h', + 'src/core/ext/upb-generated/google/protobuf/any.upbdefs.c', + 'src/core/ext/upb-generated/google/protobuf/any.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', + 'src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c', + 'src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', 'src/core/ext/upb-generated/google/protobuf/empty.upb.h', + 'src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c', + 'src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', + 'src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c', + 'src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h', 'src/core/ext/upb-generated/google/rpc/status.upb.c', 'src/core/ext/upb-generated/google/rpc/status.upb.h', + 'src/core/ext/upb-generated/google/rpc/status.upbdefs.c', + 'src/core/ext/upb-generated/google/rpc/status.upbdefs.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c', @@ -518,14 +644,22 @@ Pod::Spec.new do |s| 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.c', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c', + 'src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h', 'src/core/ext/upb-generated/udpa/annotations/status.upb.c', 'src/core/ext/upb-generated/udpa/annotations/status.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c', + 'src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h', 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c', 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h', 'src/core/ext/upb-generated/validate/validate.upb.c', 'src/core/ext/upb-generated/validate/validate.upb.h', + 'src/core/ext/upb-generated/validate/validate.upbdefs.c', + 'src/core/ext/upb-generated/validate/validate.upbdefs.h', 'src/core/lib/avl/avl.cc', 'src/core/lib/avl/avl.h', 'src/core/lib/backoff/backoff.cc', @@ -1036,6 +1170,8 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_interface.h', 'third_party/upb/upb/decode.c', 'third_party/upb/upb/decode.h', + 'third_party/upb/upb/def.c', + 'third_party/upb/upb/def.h', 'third_party/upb/upb/encode.c', 'third_party/upb/upb/encode.h', 'third_party/upb/upb/msg.c', @@ -1043,8 +1179,12 @@ Pod::Spec.new do |s| 'third_party/upb/upb/port.c', 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', + 'third_party/upb/upb/reflection.c', + 'third_party/upb/upb/reflection.h', 'third_party/upb/upb/table.c', 'third_party/upb/upb/table.int.h', + 'third_party/upb/upb/text_encode.c', + 'third_party/upb/upb/text_encode.h', 'third_party/upb/upb/upb.c', 'third_party/upb/upb/upb.h', 'third_party/upb/upb/upb.hpp' @@ -1136,78 +1276,145 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/inproc/inproc_transport.h', 'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h', + 'src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h', 'src/core/ext/upb-generated/envoy/annotations/resource.upb.h', + 'src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.h', + 'src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h', + 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h', + 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h', + 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h', 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h', + 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h', 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h', + 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h', 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h', + 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/http.upb.h', + 'src/core/ext/upb-generated/envoy/type/http.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.h', + 'src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/percent.upb.h', + 'src/core/ext/upb-generated/envoy/type/percent.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/range.upb.h', + 'src/core/ext/upb-generated/envoy/type/range.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.h', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h', 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h', 'src/core/ext/upb-generated/gogoproto/gogo.upb.h', + 'src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h', 'src/core/ext/upb-generated/google/api/annotations.upb.h', + 'src/core/ext/upb-generated/google/api/annotations.upbdefs.h', 'src/core/ext/upb-generated/google/api/http.upb.h', + 'src/core/ext/upb-generated/google/api/http.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/any.upb.h', + 'src/core/ext/upb-generated/google/protobuf/any.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.h', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/duration.upb.h', + 'src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/empty.upb.h', + 'src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/struct.upb.h', + 'src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.h', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h', 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.h', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h', 'src/core/ext/upb-generated/google/rpc/status.upb.h', + 'src/core/ext/upb-generated/google/rpc/status.upbdefs.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h', 'src/core/ext/upb-generated/udpa/annotations/status.upb.h', + 'src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h', 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h', 'src/core/ext/upb-generated/validate/validate.upb.h', + 'src/core/ext/upb-generated/validate/validate.upbdefs.h', 'src/core/lib/avl/avl.h', 'src/core/lib/backoff/backoff.h', 'src/core/lib/channel/channel_args.h', @@ -1443,11 +1650,14 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', 'third_party/upb/upb/decode.h', + 'third_party/upb/upb/def.h', 'third_party/upb/upb/encode.h', 'third_party/upb/upb/msg.h', 'third_party/upb/upb/port_def.inc', 'third_party/upb/upb/port_undef.inc', + 'third_party/upb/upb/reflection.h', 'third_party/upb/upb/table.int.h', + 'third_party/upb/upb/text_encode.h', 'third_party/upb/upb/upb.h', 'third_party/upb/upb/upb.hpp' end @@ -1622,7 +1832,8 @@ Pod::Spec.new do |s| sed -E -i '' 's;#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -420,14 +546,22 @@ + + + + + + + + @@ -1581,6 +1715,8 @@ + + @@ -1588,8 +1724,12 @@ + + + + diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc index e387bd7a3f9..ae28e65f705 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -40,26 +40,35 @@ #include "src/core/lib/iomgr/sockaddr_utils.h" #include "envoy/api/v2/cds.upb.h" +#include "envoy/api/v2/cds.upbdefs.h" +#include "envoy/api/v2/cluster.upbdefs.h" #include "envoy/api/v2/core/address.upb.h" #include "envoy/api/v2/core/base.upb.h" #include "envoy/api/v2/core/config_source.upb.h" #include "envoy/api/v2/core/health_check.upb.h" #include "envoy/api/v2/discovery.upb.h" +#include "envoy/api/v2/discovery.upbdefs.h" #include "envoy/api/v2/eds.upb.h" +#include "envoy/api/v2/eds.upbdefs.h" +#include "envoy/api/v2/endpoint.upbdefs.h" #include "envoy/api/v2/endpoint/endpoint.upb.h" #include "envoy/api/v2/endpoint/load_report.upb.h" #include "envoy/api/v2/lds.upb.h" #include "envoy/api/v2/rds.upb.h" +#include "envoy/api/v2/rds.upbdefs.h" +#include "envoy/api/v2/route.upbdefs.h" #include "envoy/api/v2/route/route.upb.h" #include "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h" #include "envoy/config/listener/v2/api_listener.upb.h" #include "envoy/service/load_stats/v2/lrs.upb.h" +#include "envoy/service/load_stats/v2/lrs.upbdefs.h" #include "envoy/type/percent.upb.h" #include "google/protobuf/any.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/struct.upb.h" #include "google/protobuf/wrappers.upb.h" #include "google/rpc/status.upb.h" +#include "upb/text_encode.h" #include "upb/upb.h" namespace grpc_core { @@ -270,172 +279,21 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap::Node* node, arena); } -inline absl::string_view UpbStringToAbsl(const upb_strview& str) { - return absl::string_view(str.data, str.size); -} - inline std::string UpbStringToStdString(const upb_strview& str) { return std::string(str.data, str.size); } -inline void AddStringField(const char* name, const upb_strview& value, - std::vector* fields, - bool add_if_empty = false) { - if (value.size > 0 || add_if_empty) { - fields->emplace_back( - absl::StrCat(name, ": \"", UpbStringToAbsl(value), "\"")); - } -} - -inline void AddUInt32ValueField(const char* name, - const google_protobuf_UInt32Value* value, - std::vector* fields) { - if (value != nullptr) { - fields->emplace_back(absl::StrCat( - name, " { value: ", google_protobuf_UInt32Value_value(value), " }")); - } -} - -inline void AddLocalityField(int indent_level, - const envoy_api_v2_core_Locality* locality, - std::vector* fields) { - std::string indent = - absl::StrJoin(std::vector(indent_level, " "), ""); - // region - std::string field = absl::StrCat(indent, "region"); - AddStringField(field.c_str(), envoy_api_v2_core_Locality_region(locality), - fields); - // zone - field = absl::StrCat(indent, "zone"); - AddStringField(field.c_str(), envoy_api_v2_core_Locality_zone(locality), - fields); - // sub_zone - field = absl::StrCat(indent, "sub_zone"); - AddStringField(field.c_str(), envoy_api_v2_core_Locality_sub_zone(locality), - fields); -} - -void AddNodeLogFields(const envoy_api_v2_core_Node* node, - std::vector* fields) { - fields->emplace_back("node {"); - // id - AddStringField(" id", envoy_api_v2_core_Node_id(node), fields); - // metadata - const google_protobuf_Struct* metadata = - envoy_api_v2_core_Node_metadata(node); - if (metadata != nullptr) { - fields->emplace_back(" metadata {"); - size_t entry_idx = UPB_MAP_BEGIN; - while (true) { - const google_protobuf_Struct_FieldsEntry* entry = - google_protobuf_Struct_fields_next(metadata, &entry_idx); - if (entry == nullptr) break; - fields->emplace_back(" field {"); - // key - AddStringField(" key", google_protobuf_Struct_FieldsEntry_key(entry), - fields); - // value - const google_protobuf_Value* value = - google_protobuf_Struct_FieldsEntry_value(entry); - if (value != nullptr) { - std::string value_str; - if (google_protobuf_Value_has_string_value(value)) { - value_str = absl::StrCat( - "string_value: \"", - UpbStringToAbsl(google_protobuf_Value_string_value(value)), "\""); - } else if (google_protobuf_Value_has_null_value(value)) { - value_str = "null_value: NULL_VALUE"; - } else if (google_protobuf_Value_has_number_value(value)) { - value_str = absl::StrCat("double_value: ", - google_protobuf_Value_number_value(value)); - } else if (google_protobuf_Value_has_bool_value(value)) { - value_str = absl::StrCat("bool_value: ", - google_protobuf_Value_bool_value(value)); - } else if (google_protobuf_Value_has_struct_value(value)) { - value_str = "struct_value: "; - } else if (google_protobuf_Value_has_list_value(value)) { - value_str = "list_value: "; - } else { - value_str = ""; - } - fields->emplace_back(absl::StrCat(" value { ", value_str, " }")); - } - fields->emplace_back(" }"); - } - fields->emplace_back(" }"); - } - // locality - const envoy_api_v2_core_Locality* locality = - envoy_api_v2_core_Node_locality(node); - if (locality != nullptr) { - fields->emplace_back(" locality {"); - AddLocalityField(2, locality, fields); - fields->emplace_back(" }"); - } - // build_version - AddStringField(" build_version", envoy_api_v2_core_Node_build_version(node), - fields); - // user_agent_name - AddStringField(" user_agent_name", - envoy_api_v2_core_Node_user_agent_name(node), fields); - // user_agent_version - AddStringField(" user_agent_version", - envoy_api_v2_core_Node_user_agent_version(node), fields); - // client_features - size_t num_client_features; - const upb_strview* client_features = - envoy_api_v2_core_Node_client_features(node, &num_client_features); - for (size_t i = 0; i < num_client_features; ++i) { - AddStringField(" client_features", client_features[i], fields); - } - fields->emplace_back("}"); -} - void MaybeLogDiscoveryRequest(XdsClient* client, TraceFlag* tracer, + upb_symtab* symtab, const envoy_api_v2_DiscoveryRequest* request) { if (GRPC_TRACE_FLAG_ENABLED(*tracer) && gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) { - // TODO(roth): When we can upgrade upb, use upb textformat code to dump - // the raw proto instead of doing this manually. - std::vector fields; - // version_info - AddStringField("version_info", - envoy_api_v2_DiscoveryRequest_version_info(request), - &fields); - // node - const envoy_api_v2_core_Node* node = - envoy_api_v2_DiscoveryRequest_node(request); - if (node != nullptr) AddNodeLogFields(node, &fields); - // resource_names - size_t num_resource_names; - const upb_strview* resource_names = - envoy_api_v2_DiscoveryRequest_resource_names(request, - &num_resource_names); - for (size_t i = 0; i < num_resource_names; ++i) { - AddStringField("resource_names", resource_names[i], &fields); - } - // type_url - AddStringField("type_url", envoy_api_v2_DiscoveryRequest_type_url(request), - &fields); - // response_nonce - AddStringField("response_nonce", - envoy_api_v2_DiscoveryRequest_response_nonce(request), - &fields); - // error_detail - const struct google_rpc_Status* error_detail = - envoy_api_v2_DiscoveryRequest_error_detail(request); - if (error_detail != nullptr) { - fields.emplace_back("error_detail {"); - // code - int32_t code = google_rpc_Status_code(error_detail); - if (code != 0) fields.emplace_back(absl::StrCat(" code: ", code)); - // message - AddStringField(" message", google_rpc_Status_message(error_detail), - &fields); - fields.emplace_back("}"); - } + const upb_msgdef* msg_type = + envoy_api_v2_DiscoveryRequest_getmsgdef(symtab); + char buf[10240]; + upb_text_encode(request, msg_type, nullptr, 0, buf, sizeof(buf)); gpr_log(GPR_DEBUG, "[xds_client %p] constructed ADS request: %s", client, - absl::StrJoin(fields, "\n").c_str()); + buf); } } @@ -499,368 +357,60 @@ grpc_slice XdsApi::CreateAdsRequest( request, upb_strview_make(resource_name.data(), resource_name.size()), arena.ptr()); } - MaybeLogDiscoveryRequest(client_, tracer_, request); + MaybeLogDiscoveryRequest(client_, tracer_, symtab_.ptr(), request); return SerializeDiscoveryRequest(arena.ptr(), request); } namespace { void MaybeLogDiscoveryResponse(XdsClient* client, TraceFlag* tracer, + upb_symtab* symtab, const envoy_api_v2_DiscoveryResponse* response) { if (GRPC_TRACE_FLAG_ENABLED(*tracer) && gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) { - // TODO(roth): When we can upgrade upb, use upb textformat code to dump - // the raw proto instead of doing this manually. - std::vector fields; - // version_info - AddStringField("version_info", - envoy_api_v2_DiscoveryResponse_version_info(response), - &fields); - // resources - size_t num_resources; - envoy_api_v2_DiscoveryResponse_resources(response, &num_resources); - fields.emplace_back( - absl::StrCat("resources: <", num_resources, " element(s)>")); - // type_url - AddStringField("type_url", - envoy_api_v2_DiscoveryResponse_type_url(response), &fields); - // nonce - AddStringField("nonce", envoy_api_v2_DiscoveryResponse_nonce(response), - &fields); - gpr_log(GPR_DEBUG, "[xds_client %p] received response: %s", client, - absl::StrJoin(fields, "\n").c_str()); + const upb_msgdef* msg_type = + envoy_api_v2_DiscoveryResponse_getmsgdef(symtab); + char buf[10240]; + upb_text_encode(response, msg_type, nullptr, 0, buf, sizeof(buf)); + gpr_log(GPR_DEBUG, "[xds_client %p] received response: %s", client, buf); } } void MaybeLogRouteConfiguration( - XdsClient* client, TraceFlag* tracer, + XdsClient* client, TraceFlag* tracer, upb_symtab* symtab, const envoy_api_v2_RouteConfiguration* route_config) { if (GRPC_TRACE_FLAG_ENABLED(*tracer) && gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) { - // TODO(roth): When we can upgrade upb, use upb textformat code to dump - // the raw proto instead of doing this manually. - std::vector fields; - // name - AddStringField("name", envoy_api_v2_RouteConfiguration_name(route_config), - &fields); - // virtual_hosts - size_t num_virtual_hosts; - const envoy_api_v2_route_VirtualHost* const* virtual_hosts = - envoy_api_v2_RouteConfiguration_virtual_hosts(route_config, - &num_virtual_hosts); - for (size_t i = 0; i < num_virtual_hosts; ++i) { - const auto* virtual_host = virtual_hosts[i]; - fields.push_back("virtual_hosts {"); - // name - AddStringField( - " name", envoy_api_v2_route_VirtualHost_name(virtual_host), &fields); - // domains - size_t num_domains; - const upb_strview* const domains = - envoy_api_v2_route_VirtualHost_domains(virtual_host, &num_domains); - for (size_t j = 0; j < num_domains; ++j) { - AddStringField(" domains", domains[j], &fields); - } - // routes - size_t num_routes; - const envoy_api_v2_route_Route* const* routes = - envoy_api_v2_route_VirtualHost_routes(virtual_host, &num_routes); - for (size_t j = 0; j < num_routes; ++j) { - const auto* route = routes[j]; - fields.push_back(" route {"); - // name - AddStringField(" name", envoy_api_v2_route_Route_name(route), - &fields); - // match - const envoy_api_v2_route_RouteMatch* match = - envoy_api_v2_route_Route_match(route); - if (match != nullptr) { - fields.emplace_back(" match {"); - // path matching - if (envoy_api_v2_route_RouteMatch_has_prefix(match)) { - AddStringField(" prefix", - envoy_api_v2_route_RouteMatch_prefix(match), &fields, - /*add_if_empty=*/true); - } else if (envoy_api_v2_route_RouteMatch_has_path(match)) { - AddStringField(" path", - envoy_api_v2_route_RouteMatch_path(match), &fields, - /*add_if_empty=*/true); - } else if (envoy_api_v2_route_RouteMatch_has_regex(match)) { - AddStringField(" regex", - envoy_api_v2_route_RouteMatch_regex(match), &fields, - /*add_if_empty=*/true); - } else if (envoy_api_v2_route_RouteMatch_has_safe_regex(match)) { - fields.emplace_back(" safe_regex: "); - } else { - fields.emplace_back(" "); - } - // header matching - size_t num_headers; - envoy_api_v2_route_RouteMatch_headers(match, &num_headers); - if (num_headers > 0) { - fields.emplace_back( - absl::StrCat(" headers: <", num_headers, " element(s)>")); - } - fields.emplace_back(" }"); - } - // action - if (envoy_api_v2_route_Route_has_route(route)) { - const envoy_api_v2_route_RouteAction* action = - envoy_api_v2_route_Route_route(route); - fields.emplace_back(" route {"); - if (envoy_api_v2_route_RouteAction_has_cluster(action)) { - AddStringField(" cluster", - envoy_api_v2_route_RouteAction_cluster(action), - &fields); - } else if (envoy_api_v2_route_RouteAction_has_cluster_header( - action)) { - AddStringField( - " cluster_header", - envoy_api_v2_route_RouteAction_cluster_header(action), &fields); - } else if (envoy_api_v2_route_RouteAction_has_weighted_clusters( - action)) { - const envoy_api_v2_route_WeightedCluster* weighted_clusters = - envoy_api_v2_route_RouteAction_weighted_clusters(action); - fields.emplace_back(" weighted_clusters {"); - size_t num_cluster_weights; - const envoy_api_v2_route_WeightedCluster_ClusterWeight* const* - cluster_weights = envoy_api_v2_route_WeightedCluster_clusters( - weighted_clusters, &num_cluster_weights); - for (size_t i = 0; i < num_cluster_weights; ++i) { - const envoy_api_v2_route_WeightedCluster_ClusterWeight* - cluster_weight = cluster_weights[i]; - fields.emplace_back(" clusters {"); - AddStringField( - " name", - envoy_api_v2_route_WeightedCluster_ClusterWeight_name( - cluster_weight), - &fields); - AddUInt32ValueField( - " weight", - envoy_api_v2_route_WeightedCluster_ClusterWeight_weight( - cluster_weight), - &fields); - fields.emplace_back(" }"); - } - AddUInt32ValueField(" total_weight", - envoy_api_v2_route_WeightedCluster_total_weight( - weighted_clusters), - &fields); - fields.emplace_back(" }"); - } - fields.emplace_back(" }"); - } else if (envoy_api_v2_route_Route_has_redirect(route)) { - fields.emplace_back(" redirect: "); - } else if (envoy_api_v2_route_Route_has_direct_response(route)) { - fields.emplace_back(" direct_response: "); - } else if (envoy_api_v2_route_Route_has_filter_action(route)) { - fields.emplace_back(" filter_action: "); - } - fields.push_back(" }"); - } - fields.push_back("}"); - } - gpr_log(GPR_DEBUG, "[xds_client %p] RouteConfiguration: %s", client, - absl::StrJoin(fields, "\n").c_str()); + const upb_msgdef* msg_type = + envoy_api_v2_RouteConfiguration_getmsgdef(symtab); + char buf[10240]; + upb_text_encode(route_config, msg_type, nullptr, 0, buf, sizeof(buf)); + gpr_log(GPR_DEBUG, "[xds_client %p] RouteConfiguration: %s", client, buf); } } -void MaybeLogCluster(XdsClient* client, TraceFlag* tracer, +void MaybeLogCluster(XdsClient* client, TraceFlag* tracer, upb_symtab* symtab, const envoy_api_v2_Cluster* cluster) { if (GRPC_TRACE_FLAG_ENABLED(*tracer) && gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) { - // TODO(roth): When we can upgrade upb, use upb textformat code to dump - // the raw proto instead of doing this manually. - std::vector fields; - // name - AddStringField("name", envoy_api_v2_Cluster_name(cluster), &fields); - // type - if (envoy_api_v2_Cluster_has_type(cluster)) { - fields.emplace_back( - absl::StrCat("type: ", envoy_api_v2_Cluster_type(cluster))); - } else if (envoy_api_v2_Cluster_has_cluster_type(cluster)) { - fields.emplace_back("cluster_type: "); - } else { - fields.emplace_back(""); - } - // eds_cluster_config - const envoy_api_v2_Cluster_EdsClusterConfig* eds_cluster_config = - envoy_api_v2_Cluster_eds_cluster_config(cluster); - if (eds_cluster_config != nullptr) { - fields.emplace_back("eds_cluster_config {"); - // eds_config - const struct envoy_api_v2_core_ConfigSource* eds_config = - envoy_api_v2_Cluster_EdsClusterConfig_eds_config(eds_cluster_config); - if (eds_config != nullptr) { - if (envoy_api_v2_core_ConfigSource_has_ads(eds_config)) { - fields.emplace_back(" eds_config { ads {} }"); - } else { - fields.emplace_back(" eds_config: "); - } - } - // service_name - AddStringField(" service_name", - envoy_api_v2_Cluster_EdsClusterConfig_service_name( - eds_cluster_config), - &fields); - fields.emplace_back("}"); - } - // lb_policy - fields.emplace_back( - absl::StrCat("lb_policy: ", envoy_api_v2_Cluster_lb_policy(cluster))); - // lrs_server - const envoy_api_v2_core_ConfigSource* lrs_server = - envoy_api_v2_Cluster_lrs_server(cluster); - if (lrs_server != nullptr) { - if (envoy_api_v2_core_ConfigSource_has_self(lrs_server)) { - fields.emplace_back("lrs_server { self {} }"); - } else { - fields.emplace_back("lrs_server: "); - } - } - gpr_log(GPR_DEBUG, "[xds_client %p] Cluster: %s", client, - absl::StrJoin(fields, "\n").c_str()); + const upb_msgdef* msg_type = envoy_api_v2_Cluster_getmsgdef(symtab); + char buf[10240]; + upb_text_encode(cluster, msg_type, nullptr, 0, buf, sizeof(buf)); + gpr_log(GPR_DEBUG, "[xds_client %p] Cluster: %s", client, buf); } } void MaybeLogClusterLoadAssignment( - XdsClient* client, TraceFlag* tracer, + XdsClient* client, TraceFlag* tracer, upb_symtab* symtab, const envoy_api_v2_ClusterLoadAssignment* cla) { if (GRPC_TRACE_FLAG_ENABLED(*tracer) && gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) { - // TODO(roth): When we can upgrade upb, use upb textformat code to dump - // the raw proto instead of doing this manually. - std::vector fields; - // cluster_name - AddStringField("cluster_name", - envoy_api_v2_ClusterLoadAssignment_cluster_name(cla), - &fields); - // endpoints - size_t num_localities; - const struct envoy_api_v2_endpoint_LocalityLbEndpoints* const* - locality_endpoints = - envoy_api_v2_ClusterLoadAssignment_endpoints(cla, &num_localities); - for (size_t i = 0; i < num_localities; ++i) { - const auto* locality_endpoint = locality_endpoints[i]; - fields.emplace_back("endpoints {"); - // locality - const auto* locality = - envoy_api_v2_endpoint_LocalityLbEndpoints_locality(locality_endpoint); - if (locality != nullptr) { - fields.emplace_back(" locality {"); - AddLocalityField(2, locality, &fields); - fields.emplace_back(" }"); - } - // lb_endpoints - size_t num_lb_endpoints; - const envoy_api_v2_endpoint_LbEndpoint* const* lb_endpoints = - envoy_api_v2_endpoint_LocalityLbEndpoints_lb_endpoints( - locality_endpoint, &num_lb_endpoints); - for (size_t j = 0; j < num_lb_endpoints; ++j) { - const auto* lb_endpoint = lb_endpoints[j]; - fields.emplace_back(" lb_endpoints {"); - // health_status - uint32_t health_status = - envoy_api_v2_endpoint_LbEndpoint_health_status(lb_endpoint); - if (health_status > 0) { - fields.emplace_back( - absl::StrCat(" health_status: ", health_status)); - } - // endpoint - const envoy_api_v2_endpoint_Endpoint* endpoint = - envoy_api_v2_endpoint_LbEndpoint_endpoint(lb_endpoint); - if (endpoint != nullptr) { - fields.emplace_back(" endpoint {"); - // address - const auto* address = - envoy_api_v2_endpoint_Endpoint_address(endpoint); - if (address != nullptr) { - fields.emplace_back(" address {"); - // socket_address - const auto* socket_address = - envoy_api_v2_core_Address_socket_address(address); - if (socket_address != nullptr) { - fields.emplace_back(" socket_address {"); - // address - AddStringField( - " address", - envoy_api_v2_core_SocketAddress_address(socket_address), - &fields); - // port_value - if (envoy_api_v2_core_SocketAddress_has_port_value( - socket_address)) { - fields.emplace_back( - absl::StrCat(" port_value: ", - envoy_api_v2_core_SocketAddress_port_value( - socket_address))); - } else { - fields.emplace_back(" "); - } - fields.emplace_back(" }"); - } else { - fields.emplace_back(" "); - } - fields.emplace_back(" }"); - } - fields.emplace_back(" }"); - } - fields.emplace_back(" }"); - } - // load_balancing_weight - AddUInt32ValueField( - " load_balancing_weight", - envoy_api_v2_endpoint_LocalityLbEndpoints_load_balancing_weight( - locality_endpoint), - &fields); - // priority - uint32_t priority = - envoy_api_v2_endpoint_LocalityLbEndpoints_priority(locality_endpoint); - if (priority > 0) { - fields.emplace_back(absl::StrCat(" priority: ", priority)); - } - fields.emplace_back("}"); - } - // policy - const envoy_api_v2_ClusterLoadAssignment_Policy* policy = - envoy_api_v2_ClusterLoadAssignment_policy(cla); - if (policy != nullptr) { - fields.emplace_back("policy {"); - // drop_overloads - size_t num_drop_overloads; - const envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload* const* - drop_overloads = - envoy_api_v2_ClusterLoadAssignment_Policy_drop_overloads( - policy, &num_drop_overloads); - for (size_t i = 0; i < num_drop_overloads; ++i) { - auto* drop_overload = drop_overloads[i]; - fields.emplace_back(" drop_overloads {"); - // category - AddStringField( - " category", - envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_category( - drop_overload), - &fields); - // drop_percentage - const auto* drop_percentage = - envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_drop_percentage( - drop_overload); - if (drop_percentage != nullptr) { - fields.emplace_back(" drop_percentage {"); - fields.emplace_back(absl::StrCat( - " numerator: ", - envoy_type_FractionalPercent_numerator(drop_percentage))); - fields.emplace_back(absl::StrCat( - " denominator: ", - envoy_type_FractionalPercent_denominator(drop_percentage))); - fields.emplace_back(" }"); - } - fields.emplace_back(" }"); - } - // overprovisioning_factor - fields.emplace_back("}"); - } + const upb_msgdef* msg_type = + envoy_api_v2_ClusterLoadAssignment_getmsgdef(symtab); + char buf[10240]; + upb_text_encode(cla, msg_type, nullptr, 0, buf, sizeof(buf)); gpr_log(GPR_DEBUG, "[xds_client %p] ClusterLoadAssignment: %s", client, - absl::StrJoin(fields, "\n").c_str()); + buf); } } @@ -986,11 +536,11 @@ grpc_error* RouteActionParse(const envoy_api_v2_route_Route* route, } grpc_error* RouteConfigParse( - XdsClient* client, TraceFlag* tracer, + XdsClient* client, TraceFlag* tracer, upb_symtab* symtab, const envoy_api_v2_RouteConfiguration* route_config, const std::string& expected_server_name, const bool xds_routing_enabled, XdsApi::RdsUpdate* rds_update) { - MaybeLogRouteConfiguration(client, tracer, route_config); + MaybeLogRouteConfiguration(client, tracer, symtab, route_config); // Get the virtual hosts. size_t size; const envoy_api_v2_route_VirtualHost* const* virtual_hosts = @@ -1152,6 +702,7 @@ grpc_error* RouteConfigParse( } grpc_error* LdsResponseParse(XdsClient* client, TraceFlag* tracer, + upb_symtab* symtab, const envoy_api_v2_DiscoveryResponse* response, const std::string& expected_server_name, const bool xds_routing_enabled, @@ -1200,9 +751,9 @@ grpc_error* LdsResponseParse(XdsClient* client, TraceFlag* tracer, envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_route_config( http_connection_manager); XdsApi::RdsUpdate rds_update; - grpc_error* error = - RouteConfigParse(client, tracer, route_config, expected_server_name, - xds_routing_enabled, &rds_update); + grpc_error* error = RouteConfigParse(client, tracer, symtab, route_config, + expected_server_name, + xds_routing_enabled, &rds_update); if (error != GRPC_ERROR_NONE) return error; lds_update->emplace(); (*lds_update)->rds_update.emplace(std::move(rds_update)); @@ -1240,7 +791,7 @@ grpc_error* LdsResponseParse(XdsClient* client, TraceFlag* tracer, } grpc_error* RdsResponseParse( - XdsClient* client, TraceFlag* tracer, + XdsClient* client, TraceFlag* tracer, upb_symtab* symtab, const envoy_api_v2_DiscoveryResponse* response, const std::string& expected_server_name, const std::set& expected_route_configuration_names, @@ -1276,9 +827,9 @@ grpc_error* RdsResponseParse( } // Parse the route_config. XdsApi::RdsUpdate local_rds_update; - grpc_error* error = - RouteConfigParse(client, tracer, route_config, expected_server_name, - xds_routing_enabled, &local_rds_update); + grpc_error* error = RouteConfigParse( + client, tracer, symtab, route_config, expected_server_name, + xds_routing_enabled, &local_rds_update); if (error != GRPC_ERROR_NONE) return error; rds_update->emplace(std::move(local_rds_update)); return GRPC_ERROR_NONE; @@ -1287,7 +838,7 @@ grpc_error* RdsResponseParse( } grpc_error* CdsResponseParse( - XdsClient* client, TraceFlag* tracer, + XdsClient* client, TraceFlag* tracer, upb_symtab* symtab, const envoy_api_v2_DiscoveryResponse* response, const std::set& expected_cluster_names, XdsApi::CdsUpdateMap* cds_update_map, upb_arena* arena) { @@ -1310,7 +861,7 @@ grpc_error* CdsResponseParse( if (cluster == nullptr) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode cluster."); } - MaybeLogCluster(client, tracer, cluster); + MaybeLogCluster(client, tracer, symtab, cluster); // Ignore unexpected cluster names. upb_strview cluster_name = envoy_api_v2_Cluster_name(cluster); absl::string_view cluster_name_strview(cluster_name.data, @@ -1474,7 +1025,7 @@ grpc_error* DropParseAndAppend( } grpc_error* EdsResponseParse( - XdsClient* client, TraceFlag* tracer, + XdsClient* client, TraceFlag* tracer, upb_symtab* symtab, const envoy_api_v2_DiscoveryResponse* response, const std::set& expected_eds_service_names, XdsApi::EdsUpdateMap* eds_update_map, upb_arena* arena) { @@ -1500,7 +1051,8 @@ grpc_error* EdsResponseParse( return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Can't parse cluster_load_assignment."); } - MaybeLogClusterLoadAssignment(client, tracer, cluster_load_assignment); + MaybeLogClusterLoadAssignment(client, tracer, symtab, + cluster_load_assignment); // Check the cluster name (which actually means eds_service_name). Ignore // unexpected names. upb_strview cluster_name = envoy_api_v2_ClusterLoadAssignment_cluster_name( @@ -1577,7 +1129,7 @@ grpc_error* XdsApi::ParseAdsResponse( return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Can't decode the whole response."); } - MaybeLogDiscoveryResponse(client_, tracer_, response); + MaybeLogDiscoveryResponse(client_, tracer_, symtab_.ptr(), response); // Record the type_url, the version_info, and the nonce of the response. upb_strview type_url_strview = envoy_api_v2_DiscoveryResponse_type_url(response); @@ -1589,17 +1141,20 @@ grpc_error* XdsApi::ParseAdsResponse( *nonce = UpbStringToStdString(nonce_strview); // Parse the response according to the resource type. if (*type_url == kLdsTypeUrl) { - return LdsResponseParse(client_, tracer_, response, expected_server_name, - xds_routing_enabled_, lds_update, arena.ptr()); + return LdsResponseParse(client_, tracer_, symtab_.ptr(), response, + expected_server_name, xds_routing_enabled_, + lds_update, arena.ptr()); } else if (*type_url == kRdsTypeUrl) { - return RdsResponseParse(client_, tracer_, response, expected_server_name, + return RdsResponseParse(client_, tracer_, symtab_.ptr(), response, + expected_server_name, expected_route_configuration_names, xds_routing_enabled_, rds_update, arena.ptr()); } else if (*type_url == kCdsTypeUrl) { - return CdsResponseParse(client_, tracer_, response, expected_cluster_names, - cds_update_map, arena.ptr()); + return CdsResponseParse(client_, tracer_, symtab_.ptr(), response, + expected_cluster_names, cds_update_map, + arena.ptr()); } else if (*type_url == kEdsTypeUrl) { - return EdsResponseParse(client_, tracer_, response, + return EdsResponseParse(client_, tracer_, symtab_.ptr(), response, expected_eds_service_names, eds_update_map, arena.ptr()); } else { @@ -1611,117 +1166,16 @@ grpc_error* XdsApi::ParseAdsResponse( namespace { void MaybeLogLrsRequest( - XdsClient* client, TraceFlag* tracer, + XdsClient* client, TraceFlag* tracer, upb_symtab* symtab, const envoy_service_load_stats_v2_LoadStatsRequest* request) { if (GRPC_TRACE_FLAG_ENABLED(*tracer) && gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) { - // TODO(roth): When we can upgrade upb, use upb textformat code to dump - // the raw proto instead of doing this manually. - std::vector fields; - // node - const auto* node = - envoy_service_load_stats_v2_LoadStatsRequest_node(request); - if (node != nullptr) { - AddNodeLogFields(node, &fields); - } - // cluster_stats - size_t num_cluster_stats; - const struct envoy_api_v2_endpoint_ClusterStats* const* cluster_stats = - envoy_service_load_stats_v2_LoadStatsRequest_cluster_stats( - request, &num_cluster_stats); - for (size_t i = 0; i < num_cluster_stats; ++i) { - const auto* cluster_stat = cluster_stats[i]; - fields.emplace_back("cluster_stats {"); - // cluster_name - AddStringField( - " cluster_name", - envoy_api_v2_endpoint_ClusterStats_cluster_name(cluster_stat), - &fields); - // cluster_service_name - AddStringField( - " cluster_service_name", - envoy_api_v2_endpoint_ClusterStats_cluster_service_name(cluster_stat), - &fields); - // upstream_locality_stats - size_t num_stats; - const envoy_api_v2_endpoint_UpstreamLocalityStats* const* stats = - envoy_api_v2_endpoint_ClusterStats_upstream_locality_stats( - cluster_stat, &num_stats); - for (size_t j = 0; j < num_stats; ++j) { - const auto* stat = stats[j]; - fields.emplace_back(" upstream_locality_stats {"); - // locality - const auto* locality = - envoy_api_v2_endpoint_UpstreamLocalityStats_locality(stat); - if (locality != nullptr) { - fields.emplace_back(" locality {"); - AddLocalityField(3, locality, &fields); - fields.emplace_back(" }"); - } - // total_successful_requests - fields.emplace_back(absl::StrCat( - " total_successful_requests: ", - envoy_api_v2_endpoint_UpstreamLocalityStats_total_successful_requests( - stat))); - // total_requests_in_progress - fields.emplace_back(absl::StrCat( - " total_requests_in_progress: ", - envoy_api_v2_endpoint_UpstreamLocalityStats_total_requests_in_progress( - stat))); - // total_error_requests - fields.emplace_back(absl::StrCat( - " total_error_requests: ", - envoy_api_v2_endpoint_UpstreamLocalityStats_total_error_requests( - stat))); - // total_issued_requests - fields.emplace_back(absl::StrCat( - " total_issued_requests: ", - envoy_api_v2_endpoint_UpstreamLocalityStats_total_issued_requests( - stat))); - fields.emplace_back(" }"); - } - // total_dropped_requests - fields.emplace_back(absl::StrCat( - " total_dropped_requests: ", - envoy_api_v2_endpoint_ClusterStats_total_dropped_requests( - cluster_stat))); - // dropped_requests - size_t num_drops; - const envoy_api_v2_endpoint_ClusterStats_DroppedRequests* const* drops = - envoy_api_v2_endpoint_ClusterStats_dropped_requests(cluster_stat, - &num_drops); - for (size_t j = 0; j < num_drops; ++j) { - const auto* drop = drops[j]; - fields.emplace_back(" dropped_requests {"); - // category - AddStringField( - " category", - envoy_api_v2_endpoint_ClusterStats_DroppedRequests_category(drop), - &fields); - // dropped_count - fields.emplace_back(absl::StrCat( - " dropped_count: ", - envoy_api_v2_endpoint_ClusterStats_DroppedRequests_dropped_count( - drop))); - fields.emplace_back(" }"); - } - // load_report_interval - const auto* load_report_interval = - envoy_api_v2_endpoint_ClusterStats_load_report_interval(cluster_stat); - if (load_report_interval != nullptr) { - fields.emplace_back(" load_report_interval {"); - fields.emplace_back(absl::StrCat( - " seconds: ", - google_protobuf_Duration_seconds(load_report_interval))); - fields.emplace_back( - absl::StrCat(" nanos: ", - google_protobuf_Duration_nanos(load_report_interval))); - fields.emplace_back(" }"); - } - fields.emplace_back("}"); - } + const upb_msgdef* msg_type = + envoy_service_load_stats_v2_LoadStatsRequest_getmsgdef(symtab); + char buf[10240]; + upb_text_encode(request, msg_type, nullptr, 0, buf, sizeof(buf)); gpr_log(GPR_DEBUG, "[xds_client %p] constructed LRS request: %s", client, - absl::StrJoin(fields, "\n").c_str()); + buf); } } @@ -1750,7 +1204,7 @@ grpc_slice XdsApi::CreateLrsInitialRequest(const std::string& server_name) { envoy_api_v2_core_Node_add_client_features( node_msg, upb_strview_makez("envoy.lrs.supports_send_all_clusters"), arena.ptr()); - MaybeLogLrsRequest(client_, tracer_, request); + MaybeLogLrsRequest(client_, tracer_, symtab_.ptr(), request); return SerializeLrsRequest(request, arena.ptr()); } @@ -1863,7 +1317,7 @@ grpc_slice XdsApi::CreateLrsRequest( google_protobuf_Duration_set_seconds(load_report_interval, timespec.tv_sec); google_protobuf_Duration_set_nanos(load_report_interval, timespec.tv_nsec); } - MaybeLogLrsRequest(client_, tracer_, request); + MaybeLogLrsRequest(client_, tracer_, symtab_.ptr(), request); return SerializeLrsRequest(request, arena.ptr()); } diff --git a/src/core/ext/filters/client_channel/xds/xds_api.h b/src/core/ext/filters/client_channel/xds/xds_api.h index 8971faf79ab..aa4105a94c8 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.h +++ b/src/core/ext/filters/client_channel/xds/xds_api.h @@ -28,6 +28,8 @@ #include "absl/container/inlined_vector.h" #include "absl/types/optional.h" +#include "upb/def.hpp" + #include #include "src/core/ext/filters/client_channel/server_address.h" @@ -271,6 +273,7 @@ class XdsApi { TraceFlag* tracer_; const bool xds_routing_enabled_; const XdsBootstrap::Node* node_; + upb::SymbolTable symtab_; const std::string build_version_; const std::string user_agent_name_; }; diff --git a/src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c b/src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c new file mode 100644 index 00000000000..ffb007703cf --- /dev/null +++ b/src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c @@ -0,0 +1,38 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/annotations/deprecation.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/annotations/deprecation.upbdefs.h" + +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; + +static const char descriptor[283] = {'\n', '#', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'd', 'e', 'p', 'r', 'e', +'c', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', 's', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', +'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', ':', 'T', '\n', '\025', 'd', 'i', 's', 'a', 'l', 'l', +'o', 'w', 'e', 'd', '_', 'b', 'y', '_', 'd', 'e', 'f', 'a', 'u', 'l', 't', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\347', '\255', '\256', +'Z', ' ', '\001', '(', '\010', 'R', '\023', 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd', 'B', 'y', 'D', 'e', 'f', 'a', 'u', 'l', +'t', ':', 'a', '\n', '\032', 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd', '_', 'b', 'y', '_', 'd', 'e', 'f', 'a', 'u', 'l', +'t', '_', 'e', 'n', 'u', 'm', '\022', '!', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\365', '\316', '\266', '!', ' ', '\001', '(', '\010', +'R', '\027', 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd', 'B', 'y', 'D', 'e', 'f', 'a', 'u', 'l', 't', 'E', 'n', 'u', 'm', +'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &google_protobuf_descriptor_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_annotations_deprecation_proto_upbdefinit = { + deps, + NULL, + "envoy/annotations/deprecation.proto", + UPB_STRVIEW_INIT(descriptor, 283) +}; diff --git a/src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h b/src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h new file mode 100644 index 00000000000..012d961e923 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/annotations/deprecation.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPBDEFS_H_ +#define ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c b/src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c new file mode 100644 index 00000000000..5a3b9652a7f --- /dev/null +++ b/src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c @@ -0,0 +1,41 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/annotations/resource.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/annotations/resource.upbdefs.h" + +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; +extern const upb_msglayout envoy_annotations_ResourceAnnotation_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_annotations_ResourceAnnotation_msginit, +}; + +static const char descriptor[240] = {'\n', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u', +'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', +'o', 'n', 's', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', +'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', '(', '\n', '\022', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'A', +'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\022', '\022', '\n', '\004', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', +'t', 'y', 'p', 'e', ':', 'e', '\n', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\301', '\344', '\262', '~', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', +'o', 'n', 's', '.', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\010', 'r', +'e', 's', 'o', 'u', 'r', 'c', 'e', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &google_protobuf_descriptor_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_annotations_resource_proto_upbdefinit = { + deps, + layouts, + "envoy/annotations/resource.proto", + UPB_STRVIEW_INIT(descriptor, 240) +}; diff --git a/src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h b/src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h new file mode 100644 index 00000000000..bb778390a8d --- /dev/null +++ b/src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/annotations/resource.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_ANNOTATIONS_RESOURCE_PROTO_UPBDEFS_H_ +#define ENVOY_ANNOTATIONS_RESOURCE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_annotations_resource_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_annotations_ResourceAnnotation_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_annotations_resource_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.annotations.ResourceAnnotation"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_ANNOTATIONS_RESOURCE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c new file mode 100644 index 00000000000..f0a8433de33 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c @@ -0,0 +1,47 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/auth/cert.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/auth/cert.upbdefs.h" + +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init envoy_api_v2_auth_common_proto_upbdefinit; +extern upb_def_init envoy_api_v2_auth_secret_proto_upbdefinit; +extern upb_def_init envoy_api_v2_auth_tls_proto_upbdefinit; + +static const char descriptor[316] = {'\n', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 'c', 'e', 'r', 't', '.', +'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '\032', +'\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', +'.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', +'s', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', +'2', '/', 'a', 'u', 't', 'h', '/', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'e', 'n', 'v', 'o', +'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 's', 'e', 'c', 'r', 'e', 't', '.', 'p', 'r', 'o', 't', +'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 't', 'l', 's', '.', +'p', 'r', 'o', 't', 'o', 'B', '_', '\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', 'B', '\t', 'C', 'e', 'r', 't', 'P', 'r', 'o', 't', +'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '+', '\022', ')', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', +'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', +'v', '3', 'P', '\002', 'P', '\003', 'P', '\004', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[6] = { + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &envoy_api_v2_auth_common_proto_upbdefinit, + &envoy_api_v2_auth_secret_proto_upbdefinit, + &envoy_api_v2_auth_tls_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_auth_cert_proto_upbdefinit = { + deps, + NULL, + "envoy/api/v2/auth/cert.proto", + UPB_STRVIEW_INIT(descriptor, 316) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h new file mode 100644 index 00000000000..67ea53667de --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/auth/cert.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_AUTH_CERT_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_AUTH_CERT_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_auth_cert_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_AUTH_CERT_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c new file mode 100644 index 00000000000..4ca8764db0d --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c @@ -0,0 +1,157 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/auth/common.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/auth/common.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_type_matcher_string_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_sensitive_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_auth_TlsParameters_msginit; +extern const upb_msglayout envoy_api_v2_auth_PrivateKeyProvider_msginit; +extern const upb_msglayout envoy_api_v2_auth_TlsCertificate_msginit; +extern const upb_msglayout envoy_api_v2_auth_TlsSessionTicketKeys_msginit; +extern const upb_msglayout envoy_api_v2_auth_CertificateValidationContext_msginit; + +static const upb_msglayout *layouts[5] = { + &envoy_api_v2_auth_TlsParameters_msginit, + &envoy_api_v2_auth_PrivateKeyProvider_msginit, + &envoy_api_v2_auth_TlsCertificate_msginit, + &envoy_api_v2_auth_TlsSessionTicketKeys_msginit, + &envoy_api_v2_auth_CertificateValidationContext_msginit, +}; + +static const char descriptor[2533] = {'\n', '\036', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 'c', 'o', 'm', 'm', 'o', +'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', +'h', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', +'.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', +'r', '/', 's', 't', 'r', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', +'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', +'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', +'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', +'o', 'n', 's', '/', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', +'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', +'\"', '\230', '\003', '\n', '\r', 'T', 'l', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\022', 'w', '\n', '\034', 't', 'l', 's', +'_', 'm', 'i', 'n', 'i', 'm', 'u', 'm', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', +'\030', '\001', ' ', '\001', '(', '\016', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', +'h', '.', 'T', 'l', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '.', 'T', 'l', 's', 'P', 'r', 'o', 't', 'o', 'c', +'o', 'l', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\031', 't', 'l', 's', 'M', 'i', 'n', 'i', 'm', 'u', 'm', 'P', +'r', 'o', 't', 'o', 'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', 'w', '\n', '\034', 't', 'l', 's', '_', 'm', 'a', 'x', +'i', 'm', 'u', 'm', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\002', ' ', '\001', +'(', '\016', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'T', 'l', +'s', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '.', 'T', 'l', 's', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'B', '\010', +'\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\031', 't', 'l', 's', 'M', 'a', 'x', 'i', 'm', 'u', 'm', 'P', 'r', 'o', 't', 'o', +'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '#', '\n', '\r', 'c', 'i', 'p', 'h', 'e', 'r', '_', 's', 'u', 'i', 't', +'e', 's', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\014', 'c', 'i', 'p', 'h', 'e', 'r', 'S', 'u', 'i', 't', 'e', 's', '\022', '\037', '\n', +'\013', 'e', 'c', 'd', 'h', '_', 'c', 'u', 'r', 'v', 'e', 's', '\030', '\004', ' ', '\003', '(', '\t', 'R', '\n', 'e', 'c', 'd', 'h', 'C', +'u', 'r', 'v', 'e', 's', '\"', 'O', '\n', '\013', 'T', 'l', 's', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '\014', '\n', '\010', 'T', +'L', 'S', '_', 'A', 'U', 'T', 'O', '\020', '\000', '\022', '\013', '\n', '\007', 'T', 'L', 'S', 'v', '1', '_', '0', '\020', '\001', '\022', '\013', '\n', +'\007', 'T', 'L', 'S', 'v', '1', '_', '1', '\020', '\002', '\022', '\013', '\n', '\007', 'T', 'L', 'S', 'v', '1', '_', '2', '\020', '\003', '\022', '\013', +'\n', '\007', 'T', 'L', 'S', 'v', '1', '_', '3', '\020', '\004', '\"', '\321', '\001', '\n', '\022', 'P', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e', +'y', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\022', ',', '\n', '\r', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '_', 'n', 'a', 'm', +'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\014', 'p', 'r', 'o', 'v', 'i', 'd', 'e', +'r', 'N', 'a', 'm', 'e', '\022', ';', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\010', '\030', '\001', +'\270', '\267', '\213', '\244', '\002', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', 'A', '\n', '\014', 't', 'y', 'p', 'e', 'd', +'_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'B', '\006', '\270', '\267', '\213', '\244', '\002', '\001', 'H', '\000', 'R', '\013', 't', 'y', 'p', +'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', '\"', '\341', +'\003', '\n', '\016', 'T', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\022', 'J', '\n', '\021', 'c', 'e', 'r', 't', +'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'c', 'h', 'a', 'i', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', +'R', '\020', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'C', 'h', 'a', 'i', 'n', '\022', 'F', '\n', '\013', 'p', 'r', 'i', +'v', 'a', 't', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\006', '\270', '\267', '\213', +'\244', '\002', '\001', 'R', '\n', 'p', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e', 'y', '\022', 'W', '\n', '\024', 'p', 'r', 'i', 'v', 'a', 't', +'e', '_', 'k', 'e', 'y', '_', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\030', '\006', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'P', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e', +'y', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'R', '\022', 'p', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e', 'y', 'P', 'r', 'o', 'v', +'i', 'd', 'e', 'r', '\022', 'A', '\n', '\010', 'p', 'a', 's', 's', 'w', 'o', 'r', 'd', '\030', '\003', ' ', '\001', '(', '\013', '2', '\035', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', +'r', 'c', 'e', 'B', '\006', '\270', '\267', '\213', '\244', '\002', '\001', 'R', '\010', 'p', 'a', 's', 's', 'w', 'o', 'r', 'd', '\022', '>', '\n', '\013', +'o', 'c', 's', 'p', '_', 's', 't', 'a', 'p', 'l', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\n', +'o', 'c', 's', 'p', 'S', 't', 'a', 'p', 'l', 'e', '\022', '_', '\n', '\034', 's', 'i', 'g', 'n', 'e', 'd', '_', 'c', 'e', 'r', 't', +'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\030', '\005', ' ', '\003', '(', '\013', '2', '\035', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', +'u', 'r', 'c', 'e', 'R', '\032', 's', 'i', 'g', 'n', 'e', 'd', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'T', 'i', +'m', 'e', 's', 't', 'a', 'm', 'p', '\"', 'Y', '\n', '\024', 'T', 'l', 's', 'S', 'e', 's', 's', 'i', 'o', 'n', 'T', 'i', 'c', 'k', +'e', 't', 'K', 'e', 'y', 's', '\022', 'A', '\n', '\004', 'k', 'e', 'y', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\035', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', +'e', 'B', '\016', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', '\270', '\267', '\213', '\244', '\002', '\001', 'R', '\004', 'k', 'e', 'y', 's', '\"', '\374', +'\006', '\n', '\034', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', +'o', 'n', 't', 'e', 'x', 't', '\022', '<', '\n', '\n', 't', 'r', 'u', 's', 't', 'e', 'd', '_', 'c', 'a', '\030', '\001', ' ', '\001', '(', +'\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', +'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 't', 'r', 'u', 's', 't', 'e', 'd', 'C', 'a', '\022', 'F', '\n', '\027', 'v', 'e', 'r', +'i', 'f', 'y', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 's', 'p', 'k', 'i', '\030', '\003', ' ', '\003', '(', +'\t', 'B', '\016', '\372', 'B', '\013', '\222', '\001', '\010', '\"', '\006', 'r', '\004', ' ', ',', '(', ',', 'R', '\025', 'v', 'e', 'r', 'i', 'f', 'y', +'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'S', 'p', 'k', 'i', '\022', 'F', '\n', '\027', 'v', 'e', 'r', 'i', 'f', 'y', +'_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'h', 'a', 's', 'h', '\030', '\002', ' ', '\003', '(', '\t', 'B', '\016', +'\372', 'B', '\013', '\222', '\001', '\010', '\"', '\006', 'r', '\004', ' ', '@', '(', '_', 'R', '\025', 'v', 'e', 'r', 'i', 'f', 'y', 'C', 'e', 'r', +'t', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'H', 'a', 's', 'h', '\022', '9', '\n', '\027', 'v', 'e', 'r', 'i', 'f', 'y', '_', 's', 'u', +'b', 'j', 'e', 'c', 't', '_', 'a', 'l', 't', '_', 'n', 'a', 'm', 'e', '\030', '\004', ' ', '\003', '(', '\t', 'B', '\002', '\030', '\001', 'R', +'\024', 'v', 'e', 'r', 'i', 'f', 'y', 'S', 'u', 'b', 'j', 'e', 'c', 't', 'A', 'l', 't', 'N', 'a', 'm', 'e', '\022', 'X', '\n', '\027', +'m', 'a', 't', 'c', 'h', '_', 's', 'u', 'b', 'j', 'e', 'c', 't', '_', 'a', 'l', 't', '_', 'n', 'a', 'm', 'e', 's', '\030', '\t', +' ', '\003', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', +'.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\024', 'm', 'a', 't', 'c', 'h', 'S', 'u', 'b', 'j', +'e', 'c', 't', 'A', 'l', 't', 'N', 'a', 'm', 'e', 's', '\022', 'J', '\n', '\023', 'r', 'e', 'q', 'u', 'i', 'r', 'e', '_', 'o', 'c', +'s', 'p', '_', 's', 't', 'a', 'p', 'l', 'e', '\030', '\005', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\021', 'r', 'e', 'q', 'u', 'i', +'r', 'e', 'O', 'c', 's', 'p', 'S', 't', 'a', 'p', 'l', 'e', '\022', 'k', '\n', '$', 'r', 'e', 'q', 'u', 'i', 'r', 'e', '_', 's', +'i', 'g', 'n', 'e', 'd', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 't', 'i', 'm', 'e', 's', 't', 'a', +'m', 'p', '\030', '\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '!', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'S', 'i', 'g', 'n', 'e', +'d', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '/', '\n', '\003', +'c', 'r', 'l', '\030', '\007', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\003', 'c', 'r', 'l', '\022', ':', '\n', '\031', 'a', +'l', 'l', 'o', 'w', '_', 'e', 'x', 'p', 'i', 'r', 'e', 'd', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\030', +'\010', ' ', '\001', '(', '\010', 'R', '\027', 'a', 'l', 'l', 'o', 'w', 'E', 'x', 'p', 'i', 'r', 'e', 'd', 'C', 'e', 'r', 't', 'i', 'f', +'i', 'c', 'a', 't', 'e', '\022', '\212', '\001', '\n', '\030', 't', 'r', 'u', 's', 't', '_', 'c', 'h', 'a', 'i', 'n', '_', 'v', 'e', 'r', +'i', 'f', 'i', 'c', 'a', 't', 'i', 'o', 'n', '\030', '\n', ' ', '\001', '(', '\016', '2', 'F', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', +'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'T', 'r', 'u', 's', 't', 'C', 'h', 'a', 'i', 'n', +'V', 'e', 'r', 'i', 'f', 'i', 'c', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\026', 't', +'r', 'u', 's', 't', 'C', 'h', 'a', 'i', 'n', 'V', 'e', 'r', 'i', 'f', 'i', 'c', 'a', 't', 'i', 'o', 'n', '\"', 'F', '\n', '\026', +'T', 'r', 'u', 's', 't', 'C', 'h', 'a', 'i', 'n', 'V', 'e', 'r', 'i', 'f', 'i', 'c', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', +'\022', 'V', 'E', 'R', 'I', 'F', 'Y', '_', 'T', 'R', 'U', 'S', 'T', '_', 'C', 'H', 'A', 'I', 'N', '\020', '\000', '\022', '\024', '\n', '\020', +'A', 'C', 'C', 'E', 'P', 'T', '_', 'U', 'N', 'T', 'R', 'U', 'S', 'T', 'E', 'D', '\020', '\001', 'B', 'i', '\n', '\037', 'i', 'o', '.', +'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', +'u', 't', 'h', 'B', '\013', 'C', 'o', 'm', 'm', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '+', '\022', +')', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', +'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', +'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[10] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_type_matcher_string_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_sensitive_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_auth_common_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/auth/common.proto", + UPB_STRVIEW_INIT(descriptor, 2533) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h new file mode 100644 index 00000000000..03a6a02ccd8 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.h @@ -0,0 +1,55 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/auth/common.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_AUTH_COMMON_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_AUTH_COMMON_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_auth_common_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_TlsParameters_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_common_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.TlsParameters"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_PrivateKeyProvider_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_common_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.PrivateKeyProvider"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_TlsCertificate_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_common_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.TlsCertificate"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_TlsSessionTicketKeys_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_common_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.TlsSessionTicketKeys"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_CertificateValidationContext_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_common_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.CertificateValidationContext"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_AUTH_COMMON_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c new file mode 100644 index 00000000000..4b6d9dbd945 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c @@ -0,0 +1,83 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/auth/secret.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/auth/secret.upbdefs.h" + +extern upb_def_init envoy_api_v2_auth_common_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_config_source_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_sensitive_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_auth_GenericSecret_msginit; +extern const upb_msglayout envoy_api_v2_auth_SdsSecretConfig_msginit; +extern const upb_msglayout envoy_api_v2_auth_Secret_msginit; + +static const upb_msglayout *layouts[3] = { + &envoy_api_v2_auth_GenericSecret_msginit, + &envoy_api_v2_auth_SdsSecretConfig_msginit, + &envoy_api_v2_auth_Secret_msginit, +}; + +static const char descriptor[928] = {'\n', '\036', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 's', 'e', 'c', 'r', 'e', +'t', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', +'h', '\032', '\036', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 'c', 'o', 'm', 'm', +'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', +'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '%', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', +'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', +'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '/', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', +'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\"', +'N', '\n', '\r', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', '\022', '=', '\n', '\006', 's', 'e', 'c', 'r', 'e', +'t', '\030', '\001', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\006', '\270', '\267', '\213', '\244', '\002', '\001', 'R', '\006', 's', 'e', +'c', 'r', 'e', 't', '\"', 'e', '\n', '\017', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\022', +'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '>', '\n', '\n', 's', 'd', 's', +'_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 's', 'd', +'s', 'C', 'o', 'n', 'f', 'i', 'g', '\"', '\372', '\002', '\n', '\006', 'S', 'e', 'c', 'r', 'e', 't', '\022', '\022', '\n', '\004', 'n', 'a', 'm', +'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'L', '\n', '\017', 't', 'l', 's', '_', 'c', 'e', 'r', 't', +'i', 'f', 'i', 'c', 'a', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'T', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'H', '\000', +'R', '\016', 't', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\022', 'Y', '\n', '\023', 's', 'e', 's', 's', 'i', +'o', 'n', '_', 't', 'i', 'c', 'k', 'e', 't', '_', 'k', 'e', 'y', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'T', 'l', 's', 'S', 'e', 's', 's', 'i', 'o', +'n', 'T', 'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', 'H', '\000', 'R', '\021', 's', 'e', 's', 's', 'i', 'o', 'n', 'T', 'i', 'c', +'k', 'e', 't', 'K', 'e', 'y', 's', '\022', '`', '\n', '\022', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', +'t', 'e', 'x', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'a', 'u', 't', 'h', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', +'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'H', '\000', 'R', '\021', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', +'n', 't', 'e', 'x', 't', '\022', 'I', '\n', '\016', 'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 's', 'e', 'c', 'r', 'e', 't', '\030', '\005', +' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', +'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', 'H', '\000', 'R', '\r', 'g', 'e', 'n', 'e', 'r', 'i', 'c', 'S', +'e', 'c', 'r', 'e', 't', 'B', '\006', '\n', '\004', 't', 'y', 'p', 'e', 'B', 'i', '\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', +'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', 'B', '\013', +'S', 'e', 'c', 'r', 'e', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '+', '\022', ')', 'e', 'n', 'v', 'o', +'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', +'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', +'t', 'o', '3', +}; + +static upb_def_init *deps[7] = { + &envoy_api_v2_auth_common_proto_upbdefinit, + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_api_v2_core_config_source_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_sensitive_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_auth_secret_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/auth/secret.proto", + UPB_STRVIEW_INIT(descriptor, 928) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h new file mode 100644 index 00000000000..cc3b0d7f4f1 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.h @@ -0,0 +1,45 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/auth/secret.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_AUTH_SECRET_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_AUTH_SECRET_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_auth_secret_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_GenericSecret_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_secret_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.GenericSecret"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_SdsSecretConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_secret_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.SdsSecretConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_Secret_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_secret_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.Secret"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_AUTH_SECRET_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c new file mode 100644 index 00000000000..d0a53c056cd --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c @@ -0,0 +1,141 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/auth/tls.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/auth/tls.upbdefs.h" + +extern upb_def_init envoy_api_v2_auth_common_proto_upbdefinit; +extern upb_def_init envoy_api_v2_auth_secret_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_auth_UpstreamTlsContext_msginit; +extern const upb_msglayout envoy_api_v2_auth_DownstreamTlsContext_msginit; +extern const upb_msglayout envoy_api_v2_auth_CommonTlsContext_msginit; +extern const upb_msglayout envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_msginit; + +static const upb_msglayout *layouts[4] = { + &envoy_api_v2_auth_UpstreamTlsContext_msginit, + &envoy_api_v2_auth_DownstreamTlsContext_msginit, + &envoy_api_v2_auth_CommonTlsContext_msginit, + &envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_msginit, +}; + +static const char descriptor[2300] = {'\n', '\033', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 't', 'l', 's', '.', 'p', +'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '\032', '\036', +'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 'c', 'o', 'm', 'm', 'o', 'n', '.', +'p', 'r', 'o', 't', 'o', '\032', '\036', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', +'s', 'e', 'c', 'r', 'e', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', +'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', +'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', +'t', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', +'s', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', +'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\374', '\001', '\n', '\022', 'U', 'p', 's', 't', 'r', 'e', +'a', 'm', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 'Q', '\n', '\022', 'c', 'o', 'm', 'm', 'o', 'n', '_', 't', 'l', +'s', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', +'x', 't', 'R', '\020', 'c', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '\032', '\n', '\003', 's', +'n', 'i', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\010', '\372', 'B', '\005', 'r', '\003', '(', '\377', '\001', 'R', '\003', 's', 'n', 'i', '\022', '/', +'\n', '\023', 'a', 'l', 'l', 'o', 'w', '_', 'r', 'e', 'n', 'e', 'g', 'o', 't', 'i', 'a', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\001', +'(', '\010', 'R', '\022', 'a', 'l', 'l', 'o', 'w', 'R', 'e', 'n', 'e', 'g', 'o', 't', 'i', 'a', 't', 'i', 'o', 'n', '\022', 'F', '\n', +'\020', 'm', 'a', 'x', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '_', 'k', 'e', 'y', 's', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', +'l', 'u', 'e', 'R', '\016', 'm', 'a', 'x', 'S', 'e', 's', 's', 'i', 'o', 'n', 'K', 'e', 'y', 's', '\"', '\227', '\005', '\n', '\024', 'D', +'o', 'w', 'n', 's', 't', 'r', 'e', 'a', 'm', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 'Q', '\n', '\022', 'c', 'o', +'m', 'm', 'o', 'n', '_', 't', 'l', 's', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '#', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', +'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'R', '\020', 'c', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', +'x', 't', '\022', 'X', '\n', '\032', 'r', 'e', 'q', 'u', 'i', 'r', 'e', '_', 'c', 'l', 'i', 'e', 'n', 't', '_', 'c', 'e', 'r', 't', +'i', 'f', 'i', 'c', 'a', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\030', 'r', 'e', 'q', 'u', 'i', 'r', 'e', +'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\022', ';', '\n', '\013', 'r', 'e', 'q', 'u', +'i', 'r', 'e', '_', 's', 'n', 'i', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\n', 'r', 'e', 'q', 'u', 'i', 'r', 'e', +'S', 'n', 'i', '\022', 'Y', '\n', '\023', 's', 'e', 's', 's', 'i', 'o', 'n', '_', 't', 'i', 'c', 'k', 'e', 't', '_', 'k', 'e', 'y', +'s', '\030', '\004', ' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', +'t', 'h', '.', 'T', 'l', 's', 'S', 'e', 's', 's', 'i', 'o', 'n', 'T', 'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', 'H', '\000', +'R', '\021', 's', 'e', 's', 's', 'i', 'o', 'n', 'T', 'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', '\022', 'u', '\n', '%', 's', 'e', +'s', 's', 'i', 'o', 'n', '_', 't', 'i', 'c', 'k', 'e', 't', '_', 'k', 'e', 'y', 's', '_', 's', 'd', 's', '_', 's', 'e', 'c', +'r', 'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\005', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', +'i', 'g', 'H', '\000', 'R', ' ', 's', 'e', 's', 's', 'i', 'o', 'n', 'T', 'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', 'S', 'd', +'s', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'Q', '\n', '$', 'd', 'i', 's', 'a', 'b', 'l', 'e', '_', +'s', 't', 'a', 't', 'e', 'l', 'e', 's', 's', '_', 's', 'e', 's', 's', 'i', 'o', 'n', '_', 'r', 'e', 's', 'u', 'm', 'p', 't', +'i', 'o', 'n', '\030', '\007', ' ', '\001', '(', '\010', 'H', '\000', 'R', '!', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'S', 't', 'a', 't', 'e', +'l', 'e', 's', 's', 'S', 'e', 's', 's', 'i', 'o', 'n', 'R', 'e', 's', 'u', 'm', 'p', 't', 'i', 'o', 'n', '\022', 'T', '\n', '\017', +'s', 'e', 's', 's', 'i', 'o', 'n', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\006', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\020', +'\372', 'B', '\r', '\252', '\001', '\n', '\032', '\006', '\010', '\200', '\200', '\200', '\200', '\020', '2', '\000', 'R', '\016', 's', 'e', 's', 's', 'i', 'o', 'n', +'T', 'i', 'm', 'e', 'o', 'u', 't', 'B', '\032', '\n', '\030', 's', 'e', 's', 's', 'i', 'o', 'n', '_', 't', 'i', 'c', 'k', 'e', 't', +'_', 'k', 'e', 'y', 's', '_', 't', 'y', 'p', 'e', '\"', '\350', '\007', '\n', '\020', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', +'o', 'n', 't', 'e', 'x', 't', '\022', '?', '\n', '\n', 't', 'l', 's', '_', 'p', 'a', 'r', 'a', 'm', 's', '\030', '\001', ' ', '\001', '(', +'\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'T', 'l', 's', +'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', 'R', '\t', 't', 'l', 's', 'P', 'a', 'r', 'a', 'm', 's', '\022', 'L', '\n', '\020', +'t', 'l', 's', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '!', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'T', 'l', 's', 'C', 'e', 'r', 't', +'i', 'f', 'i', 'c', 'a', 't', 'e', 'R', '\017', 't', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 's', '\022', +'x', '\n', '\"', 't', 'l', 's', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 's', 'd', 's', '_', 's', 'e', +'c', 'r', 'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\006', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', +'n', 'f', 'i', 'g', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\020', '\001', 'R', '\036', 't', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', +'i', 'c', 'a', 't', 'e', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', '`', '\n', '\022', +'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', +'/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'e', 'r', 't', 'i', +'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'H', '\000', +'R', '\021', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 't', '\n', '$', 'v', 'a', +'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '_', 's', 'd', 's', '_', 's', 'e', 'c', 'r', +'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\007', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', +'g', 'H', '\000', 'R', ' ', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'S', 'd', 's', +'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\212', '\001', '\n', '\033', 'c', 'o', 'm', 'b', 'i', 'n', 'e', 'd', +'_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\010', ' ', '\001', '(', '\013', +'2', 'H', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'o', 'm', 'm', +'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'd', 'C', 'e', 'r', 't', +'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'H', +'\000', 'R', '\031', 'c', 'o', 'm', 'b', 'i', 'n', 'e', 'd', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', +'e', 'x', 't', '\022', '%', '\n', '\016', 'a', 'l', 'p', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\030', '\004', ' ', '\003', +'(', '\t', 'R', '\r', 'a', 'l', 'p', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\032', '\235', '\002', '\n', '$', 'C', 'o', 'm', +'b', 'i', 'n', 'e', 'd', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', +'n', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 'w', '\n', '\032', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'i', 'd', +'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '/', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', +'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'B', '\010', '\372', 'B', '\005', '\212', '\001', +'\002', '\020', '\001', 'R', '\030', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', +'t', 'e', 'x', 't', '\022', '|', '\n', '$', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', +'t', '_', 's', 'd', 's', '_', 's', 'e', 'c', 'r', 'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', +'2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'S', 'd', 's', 'S', +'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', ' ', 'v', 'a', +'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', +'o', 'n', 'f', 'i', 'g', 'B', '\031', '\n', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', +'x', 't', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\005', '\020', '\006', 'B', 'f', '\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', +'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', 'B', '\010', +'T', 'l', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '+', '\022', ')', 'e', 'n', 'v', 'o', 'y', '.', 'e', +'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', +'t', 's', '.', 't', 'l', 's', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[8] = { + &envoy_api_v2_auth_common_proto_upbdefinit, + &envoy_api_v2_auth_secret_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_auth_tls_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/auth/tls.proto", + UPB_STRVIEW_INIT(descriptor, 2300) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h new file mode 100644 index 00000000000..47457d1a6d1 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.h @@ -0,0 +1,50 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/auth/tls.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_AUTH_TLS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_AUTH_TLS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_auth_tls_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_UpstreamTlsContext_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_tls_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.UpstreamTlsContext"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_DownstreamTlsContext_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_tls_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.DownstreamTlsContext"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_CommonTlsContext_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_tls_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.CommonTlsContext"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_auth_CommonTlsContext_CombinedCertificateValidationContext_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_auth_tls_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.auth.CommonTlsContext.CombinedCertificateValidationContext"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_AUTH_TLS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c new file mode 100644 index 00000000000..9f417ca4a3d --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c @@ -0,0 +1,69 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/cds.upbdefs.h" + +extern upb_def_init envoy_api_v2_discovery_proto_upbdefinit; +extern upb_def_init google_api_annotations_proto_upbdefinit; +extern upb_def_init envoy_annotations_resource_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init envoy_api_v2_cluster_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_CdsDummy_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_CdsDummy_msginit, +}; + +static const char descriptor[698] = {'\n', '\026', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', +'\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', +'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', +'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', +'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', +'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', +'/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', +'t', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\032', 'e', 'n', 'v', +'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', '\n', +'\n', '\010', 'C', 'd', 's', 'D', 'u', 'm', 'm', 'y', '2', '\355', '\002', '\n', '\027', 'C', 'l', 'u', 's', 't', 'e', 'r', 'D', 'i', 's', +'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'W', '\n', '\016', 'S', 't', 'r', 'e', 'a', 'm', 'C', 'l', +'u', 's', 't', 'e', 'r', 's', '\022', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', +'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', +'0', '\001', '\022', '`', '\n', '\r', 'D', 'e', 'l', 't', 'a', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', '#', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', +'e', 'q', 'u', 'e', 's', 't', '\032', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', +'t', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', +'\022', 'y', '\n', '\r', 'F', 'e', 't', 'c', 'h', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', '\036', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', +'\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', +'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\'', '\202', '\323', '\344', '\223', '\002', '\030', '\"', '\026', '/', 'v', '2', '/', 'd', 'i', 's', 'c', +'o', 'v', 'e', 'r', 'y', ':', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\202', '\323', '\344', '\223', '\002', '\003', ':', '\001', '*', '\032', '\034', +'\212', '\244', '\226', '\363', '\007', '\026', '\n', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', +'t', 'e', 'r', 'B', 'S', '\n', '\032', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', 'B', '\010', 'C', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\362', '\230', +'\376', '\217', '\005', '\032', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'c', 'l', 'u', 's', 't', +'e', 'r', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'P', '\005', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[7] = { + &envoy_api_v2_discovery_proto_upbdefinit, + &google_api_annotations_proto_upbdefinit, + &envoy_annotations_resource_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &envoy_api_v2_cluster_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_cds_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/cds.proto", + UPB_STRVIEW_INIT(descriptor, 698) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h new file mode 100644 index 00000000000..14628dc6f19 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CDS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CDS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_cds_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_CdsDummy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cds_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.CdsDummy"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CDS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c new file mode 100644 index 00000000000..55b03f60830 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c @@ -0,0 +1,448 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/cluster.upbdefs.h" + +extern upb_def_init envoy_api_v2_auth_tls_proto_upbdefinit; +extern upb_def_init envoy_api_v2_cluster_circuit_breaker_proto_upbdefinit; +extern upb_def_init envoy_api_v2_cluster_filter_proto_upbdefinit; +extern upb_def_init envoy_api_v2_cluster_outlier_detection_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_address_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_config_source_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_health_check_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_protocol_proto_upbdefinit; +extern upb_def_init envoy_api_v2_endpoint_proto_upbdefinit; +extern upb_def_init envoy_type_percent_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_Cluster_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_TransportSocketMatch_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_CustomClusterType_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_EdsClusterConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_LeastRequestLbConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_RingHashLbConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_OriginalDstLbConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_RefreshRate_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit; +extern const upb_msglayout envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit; +extern const upb_msglayout envoy_api_v2_LoadBalancingPolicy_msginit; +extern const upb_msglayout envoy_api_v2_LoadBalancingPolicy_Policy_msginit; +extern const upb_msglayout envoy_api_v2_UpstreamBindConfig_msginit; +extern const upb_msglayout envoy_api_v2_UpstreamConnectionOptions_msginit; + +static const upb_msglayout *layouts[20] = { + &envoy_api_v2_Cluster_msginit, + &envoy_api_v2_Cluster_TransportSocketMatch_msginit, + &envoy_api_v2_Cluster_CustomClusterType_msginit, + &envoy_api_v2_Cluster_EdsClusterConfig_msginit, + &envoy_api_v2_Cluster_LbSubsetConfig_msginit, + &envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, + &envoy_api_v2_Cluster_LeastRequestLbConfig_msginit, + &envoy_api_v2_Cluster_RingHashLbConfig_msginit, + &envoy_api_v2_Cluster_OriginalDstLbConfig_msginit, + &envoy_api_v2_Cluster_CommonLbConfig_msginit, + &envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, + &envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, + &envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit, + &envoy_api_v2_Cluster_RefreshRate_msginit, + &envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_msginit, + &envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_msginit, + &envoy_api_v2_LoadBalancingPolicy_msginit, + &envoy_api_v2_LoadBalancingPolicy_Policy_msginit, + &envoy_api_v2_UpstreamBindConfig_msginit, + &envoy_api_v2_UpstreamConnectionOptions_msginit, +}; + +static const char descriptor[8574] = {'\n', '\032', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'p', 'r', +'o', 't', 'o', '\022', '\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', +'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 't', 'l', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '*', 'e', 'n', +'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'c', 'i', 'r', 'c', 'u', 'i', +'t', '_', 'b', 'r', 'e', 'a', 'k', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', +'i', '/', 'v', '2', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'f', 'i', 'l', 't', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', +'\032', ',', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'o', 'u', +'t', 'l', 'i', 'e', 'r', '_', 'd', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', +'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', +'r', 'o', 't', 'o', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', +'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '%', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', +'o', 'r', 'e', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', +'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'h', 'e', 'a', 'l', 't', 'h', '_', +'c', 'h', 'e', 'c', 'k', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', +'/', 'c', 'o', 'r', 'e', '/', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', +'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', +'\030', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', +'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', +'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'i', +'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', +'s', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', +'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', +'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\330', '9', '\n', +'\007', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', 'd', '\n', '\030', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', +'k', 'e', 't', '_', 'm', 'a', 't', 'c', 'h', 'e', 's', '\030', '+', ' ', '\003', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', +'S', 'o', 'c', 'k', 'e', 't', 'M', 'a', 't', 'c', 'h', 'R', '\026', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', +'k', 'e', 't', 'M', 'a', 't', 'c', 'h', 'e', 's', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', +'\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\"', '\n', '\r', 'a', 'l', 't', '_', 's', 't', 'a', +'t', '_', 'n', 'a', 'm', 'e', '\030', '\034', ' ', '\001', '(', '\t', 'R', '\013', 'a', 'l', 't', 'S', 't', 'a', 't', 'N', 'a', 'm', 'e', +'\022', 'C', '\n', '\004', 't', 'y', 'p', 'e', '\030', '\002', ' ', '\001', '(', '\016', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'T', 'y', 'p', +'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\004', 't', 'y', 'p', 'e', '\022', 'L', '\n', '\014', 'c', 'l', +'u', 's', 't', 'e', 'r', '_', 't', 'y', 'p', 'e', '\030', '&', ' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'u', 's', 't', 'o', 'm', 'C', 'l', 'u', 's', +'t', 'e', 'r', 'T', 'y', 'p', 'e', 'H', '\000', 'R', '\013', 'c', 'l', 'u', 's', 't', 'e', 'r', 'T', 'y', 'p', 'e', '\022', 'T', '\n', +'\022', 'e', 'd', 's', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', +'2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'E', +'d', 's', 'C', 'l', 'u', 's', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\020', 'e', 'd', 's', 'C', 'l', 'u', 's', 't', +'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'L', '\n', '\017', 'c', 'o', 'n', 'n', 'e', 'c', 't', '_', 't', 'i', 'm', 'e', 'o', +'u', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\016', 'c', 'o', 'n', +'n', 'e', 'c', 't', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'f', '\n', '!', 'p', 'e', 'r', '_', 'c', 'o', 'n', 'n', 'e', 'c', +'t', 'i', 'o', 'n', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'l', 'i', 'm', 'i', 't', '_', 'b', 'y', 't', 'e', 's', '\030', '\005', +' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', +'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\035', 'p', 'e', 'r', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', +'u', 'f', 'f', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'B', 'y', 't', 'e', 's', '\022', 'E', '\n', '\t', 'l', 'b', '_', 'p', 'o', 'l', +'i', 'c', 'y', '\030', '\006', ' ', '\001', '(', '\016', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'L', 'b', 'P', 'o', 'l', 'i', 'c', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', +'\001', 'R', '\010', 'l', 'b', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '4', '\n', '\005', 'h', 'o', 's', 't', 's', '\030', '\007', ' ', '\003', '(', +'\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'd', 'd', +'r', 'e', 's', 's', 'B', '\002', '\030', '\001', 'R', '\005', 'h', 'o', 's', 't', 's', '\022', 'L', '\n', '\017', 'l', 'o', 'a', 'd', '_', 'a', +'s', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', '\030', '!', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', +'n', 't', 'R', '\016', 'l', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', '\022', 'C', '\n', '\r', 'h', 'e', 'a', +'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', 's', '\030', '\010', ' ', '\003', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'R', '\014', +'h', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 's', '\022', '[', '\n', '\033', 'm', 'a', 'x', '_', 'r', 'e', 'q', 'u', 'e', +'s', 't', 's', '_', 'p', 'e', 'r', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '\030', '\t', ' ', '\001', '(', '\013', '2', +'\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', +'a', 'l', 'u', 'e', 'R', '\030', 'm', 'a', 'x', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', 'P', 'e', 'r', 'C', 'o', 'n', 'n', 'e', +'c', 't', 'i', 'o', 'n', '\022', 'P', '\n', '\020', 'c', 'i', 'r', 'c', 'u', 'i', 't', '_', 'b', 'r', 'e', 'a', 'k', 'e', 'r', 's', +'\030', '\n', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', +'s', 't', 'e', 'r', '.', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', 'R', '\017', 'c', 'i', 'r', +'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', '\022', 'P', '\n', '\013', 't', 'l', 's', '_', 'c', 'o', 'n', 't', 'e', +'x', 't', '\030', '\013', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', +'u', 't', 'h', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'B', '\010', '\030', +'\001', '\270', '\356', '\362', '\322', '\005', '\001', 'R', '\n', 't', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 's', '\n', '\036', 'u', 'p', +'s', 't', 'r', 'e', 'a', 'm', '_', 'h', 't', 't', 'p', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', +'o', 'n', 's', '\030', '.', ' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'o', 'r', 'e', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', +'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\033', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', +'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'g', '\n', '\034', 'c', 'o', 'm', 'm', 'o', 'n', '_', 'h', 't', 't', +'p', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\035', ' ', '\001', '(', '\013', '2', +'&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', 'P', +'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\031', 'c', 'o', 'm', 'm', 'o', 'n', 'H', 't', 't', +'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '[', '\n', '\025', 'h', 't', 't', 'p', '_', +'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\r', ' ', '\001', '(', '\013', '2', '\'', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', '1', 'P', 'r', +'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\023', 'h', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', +'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', ']', '\n', '\026', 'h', 't', 't', 'p', '2', '_', 'p', 'r', 'o', 't', 'o', 'c', +'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\016', ' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', +'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\024', 'h', 't', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', +'i', 'o', 'n', 's', '\022', '{', '\n', '\032', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', +'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '#', ' ', '\003', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', +'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'E', 'n', 't', 'r', 'y', 'B', '\010', '\030', '\001', '\270', '\356', '\362', +'\322', '\005', '\001', 'R', '\030', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', +'i', 'o', 'n', 's', '\022', '\201', '\001', '\n', ' ', 't', 'y', 'p', 'e', 'd', '_', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '_', +'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '$', ' ', '\003', '(', '\013', '2', '8', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'T', 'y', 'p', 'e', +'d', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', +'E', 'n', 't', 'r', 'y', 'R', '\035', 't', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', +'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'Q', '\n', '\020', 'd', 'n', 's', '_', 'r', 'e', 'f', 'r', 'e', 's', +'h', '_', 'r', 'a', 't', 'e', '\030', '\020', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\014', '\372', 'B', '\t', '\252', '\001', '\006', '*', '\004', '\020', +'\300', '\204', '=', 'R', '\016', 'd', 'n', 's', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't', 'e', '\022', 'Z', '\n', '\030', 'd', 'n', +'s', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'r', 'e', 'f', 'r', 'e', 's', 'h', '_', 'r', 'a', 't', 'e', '\030', ',', ' ', +'\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', +'r', '.', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't', 'e', 'R', '\025', 'd', 'n', 's', 'F', 'a', 'i', 'l', 'u', 'r', 'e', +'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't', 'e', '\022', '&', '\n', '\017', 'r', 'e', 's', 'p', 'e', 'c', 't', '_', 'd', 'n', +'s', '_', 't', 't', 'l', '\030', '\'', ' ', '\001', '(', '\010', 'R', '\r', 'r', 'e', 's', 'p', 'e', 'c', 't', 'D', 'n', 's', 'T', 't', +'l', '\022', '[', '\n', '\021', 'd', 'n', 's', '_', 'l', 'o', 'o', 'k', 'u', 'p', '_', 'f', 'a', 'm', 'i', 'l', 'y', '\030', '\021', ' ', +'\001', '(', '\016', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', +'r', '.', 'D', 'n', 's', 'L', 'o', 'o', 'k', 'u', 'p', 'F', 'a', 'm', 'i', 'l', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', +'\020', '\001', 'R', '\017', 'd', 'n', 's', 'L', 'o', 'o', 'k', 'u', 'p', 'F', 'a', 'm', 'i', 'l', 'y', '\022', '?', '\n', '\r', 'd', 'n', +'s', '_', 'r', 'e', 's', 'o', 'l', 'v', 'e', 'r', 's', '\030', '\022', ' ', '\003', '(', '\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'R', '\014', 'd', 'n', 's', +'R', 'e', 's', 'o', 'l', 'v', 'e', 'r', 's', '\022', '4', '\n', '\027', 'u', 's', 'e', '_', 't', 'c', 'p', '_', 'f', 'o', 'r', '_', +'d', 'n', 's', '_', 'l', 'o', 'o', 'k', 'u', 'p', 's', '\030', '-', ' ', '\001', '(', '\010', 'R', '\023', 'u', 's', 'e', 'T', 'c', 'p', +'F', 'o', 'r', 'D', 'n', 's', 'L', 'o', 'o', 'k', 'u', 'p', 's', '\022', 'S', '\n', '\021', 'o', 'u', 't', 'l', 'i', 'e', 'r', '_', +'d', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '\030', '\023', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'O', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', +'c', 't', 'i', 'o', 'n', 'R', '\020', 'o', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '\022', 'N', +'\n', '\020', 'c', 'l', 'e', 'a', 'n', 'u', 'p', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\024', ' ', '\001', '(', '\013', '2', +'\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', +'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\017', 'c', 'l', 'e', 'a', 'n', 'u', 'p', 'I', 'n', 't', 'e', 'r', +'v', 'a', 'l', '\022', 'O', '\n', '\024', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'b', 'i', 'n', 'd', '_', 'c', 'o', 'n', 'f', +'i', 'g', '\030', '\025', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '.', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\022', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'B', +'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'N', '\n', '\020', 'l', 'b', '_', 's', 'u', 'b', 's', 'e', 't', '_', 'c', 'o', +'n', 'f', 'i', 'g', '\030', '\026', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016', +'l', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'W', '\n', '\023', 'r', 'i', 'n', 'g', '_', 'h', 'a', +'s', 'h', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\027', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'R', 'i', 'n', 'g', 'H', 'a', 's', 'h', +'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\001', 'R', '\020', 'r', 'i', 'n', 'g', 'H', 'a', 's', 'h', 'L', 'b', 'C', 'o', 'n', +'f', 'i', 'g', '\022', '`', '\n', '\026', 'o', 'r', 'i', 'g', 'i', 'n', 'a', 'l', '_', 'd', 's', 't', '_', 'l', 'b', '_', 'c', 'o', +'n', 'f', 'i', 'g', '\030', '\"', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'O', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'D', 's', 't', 'L', 'b', 'C', 'o', 'n', +'f', 'i', 'g', 'H', '\001', 'R', '\023', 'o', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'D', 's', 't', 'L', 'b', 'C', 'o', 'n', 'f', 'i', +'g', '\022', 'c', '\n', '\027', 'l', 'e', 'a', 's', 't', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'l', 'b', '_', 'c', 'o', 'n', +'f', 'i', 'g', '\030', '%', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'L', 'e', 'a', 's', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 'L', 'b', 'C', 'o', 'n', +'f', 'i', 'g', 'H', '\001', 'R', '\024', 'l', 'e', 'a', 's', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 'L', 'b', 'C', 'o', 'n', 'f', +'i', 'g', '\022', 'N', '\n', '\020', 'c', 'o', 'm', 'm', 'o', 'n', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\033', ' ', +'\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', +'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016', 'c', 'o', 'm', 'm', 'o', 'n', 'L', +'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'M', '\n', '\020', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', +'e', 't', '\030', '\030', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', 'R', '\017', 't', 'r', 'a', 'n', +'s', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', '\022', '7', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\031', +' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', ']', '\n', '\022', 'p', 'r', 'o', +'t', 'o', 'c', 'o', 'l', '_', 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '\030', '\032', ' ', '\001', '(', '\016', '2', '.', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'l', 'u', 's', 't', +'e', 'r', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'R', '\021', 'p', 'r', 'o', 't', +'o', 'c', 'o', 'l', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '\022', 'g', '\n', '\033', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', +'_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\036', ' ', '\001', '(', '\013', +'2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'C', +'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\031', 'u', 'p', 's', 't', 'r', 'e', 'a', +'m', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'U', '\n', '(', 'c', 'l', 'o', +'s', 'e', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 's', '_', 'o', 'n', '_', 'h', 'o', 's', 't', '_', 'h', 'e', +'a', 'l', 't', 'h', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '\030', '\037', ' ', '\001', '(', '\010', 'R', '#', 'c', 'l', 'o', 's', 'e', +'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 's', 'O', 'n', 'H', 'o', 's', 't', 'H', 'e', 'a', 'l', 't', 'h', 'F', 'a', +'i', 'l', 'u', 'r', 'e', '\022', 'o', '\n', '!', 'd', 'r', 'a', 'i', 'n', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', +'s', '_', 'o', 'n', '_', 'h', 'o', 's', 't', '_', 'r', 'e', 'm', 'o', 'v', 'a', 'l', '\030', ' ', ' ', '\001', '(', '\010', 'B', '%', +'\362', '\230', '\376', '\217', '\005', '\037', '\n', '\035', 'i', 'g', 'n', 'o', 'r', 'e', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'o', 'n', '_', +'h', 'o', 's', 't', '_', 'r', 'e', 'm', 'o', 'v', 'a', 'l', 'R', '\035', 'd', 'r', 'a', 'i', 'n', 'C', 'o', 'n', 'n', 'e', 'c', +'t', 'i', 'o', 'n', 's', 'O', 'n', 'H', 'o', 's', 't', 'R', 'e', 'm', 'o', 'v', 'a', 'l', '\022', '6', '\n', '\007', 'f', 'i', 'l', +'t', 'e', 'r', 's', '\030', '(', ' ', '\003', '(', '\013', '2', '\034', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'F', 'i', 'l', 't', 'e', 'r', 'R', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\022', +'U', '\n', '\025', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', +')', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'o', 'a', 'd', +'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\023', 'l', 'o', 'a', 'd', 'B', 'a', 'l', 'a', +'n', 'c', 'i', 'n', 'g', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '>', '\n', '\n', 'l', 'r', 's', '_', 's', 'e', 'r', 'v', 'e', 'r', +'\030', '*', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', +'e', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'l', 'r', 's', 'S', 'e', 'r', 'v', 'e', 'r', +'\022', '2', '\n', '\025', 't', 'r', 'a', 'c', 'k', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '_', 'b', 'u', 'd', 'g', 'e', 't', 's', +'\030', '/', ' ', '\001', '(', '\010', 'R', '\023', 't', 'r', 'a', 'c', 'k', 'T', 'i', 'm', 'e', 'o', 'u', 't', 'B', 'u', 'd', 'g', 'e', +'t', 's', '\032', '\261', '\001', '\n', '\024', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', 'M', 'a', 't', +'c', 'h', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', +'R', '\004', 'n', 'a', 'm', 'e', '\022', '-', '\n', '\005', 'm', 'a', 't', 'c', 'h', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\005', 'm', 'a', +'t', 'c', 'h', '\022', 'M', '\n', '\020', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', '\030', '\003', +' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', 'R', '\017', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', +'t', 'S', 'o', 'c', 'k', 'e', 't', '\032', 'i', '\n', '\021', 'C', 'u', 's', 't', 'o', 'm', 'C', 'l', 'u', 's', 't', 'e', 'r', 'T', +'y', 'p', 'e', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', +'\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '7', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', +' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', +'y', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\032', 'u', '\n', '\020', 'E', 'd', 's', 'C', 'l', 'u', 's', +'t', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '>', '\n', '\n', 'e', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', +' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'e', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '!', +'\n', '\014', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\013', 's', 'e', 'r', +'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', '\032', '\201', '\007', '\n', '\016', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', +'i', 'g', '\022', 'n', '\n', '\017', 'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\001', ' ', '\001', +'(', '\016', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', +'.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'F', +'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\016', +'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '>', '\n', '\016', 'd', 'e', 'f', 'a', 'u', 'l', 't', +'_', 's', 'u', 'b', 's', 'e', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'S', 'u', 'b', +'s', 'e', 't', '\022', '`', '\n', '\020', 's', 'u', 'b', 's', 'e', 't', '_', 's', 'e', 'l', 'e', 'c', 't', 'o', 'r', 's', '\030', '\003', +' ', '\003', '(', '\013', '2', '5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', +'e', 'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', +'t', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', 'R', '\017', 's', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', +'s', '\022', '2', '\n', '\025', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '_', 'w', 'e', 'i', 'g', 'h', 't', '_', 'a', 'w', 'a', 'r', +'e', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\023', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'W', 'e', 'i', 'g', 'h', 't', 'A', 'w', +'a', 'r', 'e', '\022', '2', '\n', '\025', 's', 'c', 'a', 'l', 'e', '_', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '_', 'w', 'e', 'i', +'g', 'h', 't', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\023', 's', 'c', 'a', 'l', 'e', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'W', +'e', 'i', 'g', 'h', 't', '\022', '$', '\n', '\016', 'p', 'a', 'n', 'i', 'c', '_', 'm', 'o', 'd', 'e', '_', 'a', 'n', 'y', '\030', '\006', +' ', '\001', '(', '\010', 'R', '\014', 'p', 'a', 'n', 'i', 'c', 'M', 'o', 'd', 'e', 'A', 'n', 'y', '\022', '\036', '\n', '\013', 'l', 'i', 's', +'t', '_', 'a', 's', '_', 'a', 'n', 'y', '\030', '\007', ' ', '\001', '(', '\010', 'R', '\t', 'l', 'i', 's', 't', 'A', 's', 'A', 'n', 'y', +'\032', '\335', '\002', '\n', '\020', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\022', '\022', '\n', '\004', +'k', 'e', 'y', 's', '\030', '\001', ' ', '\003', '(', '\t', 'R', '\004', 'k', 'e', 'y', 's', '\022', '\207', '\001', '\n', '\017', 'f', 'a', 'l', 'l', +'b', 'a', 'c', 'k', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\002', ' ', '\001', '(', '\016', '2', 'T', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', +'o', 'n', 'f', 'i', 'g', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '.', 'L', 'b', +'S', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', 'F', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', +'i', 'c', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\016', 'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', +'l', 'i', 'c', 'y', '\022', '0', '\n', '\024', 'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', '_', 'k', 'e', 'y', 's', '_', 's', 'u', 'b', +'s', 'e', 't', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\022', 'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'K', 'e', 'y', 's', 'S', 'u', +'b', 's', 'e', 't', '\"', 'y', '\n', '\036', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', 'F', +'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '\017', '\n', '\013', 'N', 'O', 'T', '_', 'D', 'E', 'F', 'I', +'N', 'E', 'D', '\020', '\000', '\022', '\017', '\n', '\013', 'N', 'O', '_', 'F', 'A', 'L', 'L', 'B', 'A', 'C', 'K', '\020', '\001', '\022', '\020', '\n', +'\014', 'A', 'N', 'Y', '_', 'E', 'N', 'D', 'P', 'O', 'I', 'N', 'T', '\020', '\002', '\022', '\022', '\n', '\016', 'D', 'E', 'F', 'A', 'U', 'L', +'T', '_', 'S', 'U', 'B', 'S', 'E', 'T', '\020', '\003', '\022', '\017', '\n', '\013', 'K', 'E', 'Y', 'S', '_', 'S', 'U', 'B', 'S', 'E', 'T', +'\020', '\004', '\"', 'O', '\n', '\026', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'F', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', +'i', 'c', 'y', '\022', '\017', '\n', '\013', 'N', 'O', '_', 'F', 'A', 'L', 'L', 'B', 'A', 'C', 'K', '\020', '\000', '\022', '\020', '\n', '\014', 'A', +'N', 'Y', '_', 'E', 'N', 'D', 'P', 'O', 'I', 'N', 'T', '\020', '\001', '\022', '\022', '\n', '\016', 'D', 'E', 'F', 'A', 'U', 'L', 'T', '_', +'S', 'U', 'B', 'S', 'E', 'T', '\020', '\002', '\032', '`', '\n', '\024', 'L', 'e', 'a', 's', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 'L', +'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'H', '\n', '\014', 'c', 'h', 'o', 'i', 'c', 'e', '_', 'c', 'o', 'u', 'n', 't', '\030', '\001', +' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', +'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\002', 'R', '\013', 'c', 'h', 'o', 'i', 'c', +'e', 'C', 'o', 'u', 'n', 't', '\032', '\330', '\002', '\n', '\020', 'R', 'i', 'n', 'g', 'H', 'a', 's', 'h', 'L', 'b', 'C', 'o', 'n', 'f', +'i', 'g', '\022', 'T', '\n', '\021', 'm', 'i', 'n', 'i', 'm', 'u', 'm', '_', 'r', 'i', 'n', 'g', '_', 's', 'i', 'z', 'e', '\030', '\001', +' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', +'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', 'B', '\n', '\372', 'B', '\007', '2', '\005', '\030', '\200', '\200', '\200', '\004', 'R', '\017', 'm', 'i', +'n', 'i', 'm', 'u', 'm', 'R', 'i', 'n', 'g', 'S', 'i', 'z', 'e', '\022', 'b', '\n', '\r', 'h', 'a', 's', 'h', '_', 'f', 'u', 'n', +'c', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\001', '(', '\016', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'R', 'i', 'n', 'g', 'H', 'a', 's', 'h', 'L', 'b', 'C', 'o', 'n', 'f', 'i', +'g', '.', 'H', 'a', 's', 'h', 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', +'\014', 'h', 'a', 's', 'h', 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', '\022', 'T', '\n', '\021', 'm', 'a', 'x', 'i', 'm', 'u', 'm', '_', +'r', 'i', 'n', 'g', '_', 's', 'i', 'z', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', 'B', '\n', '\372', 'B', '\007', +'2', '\005', '\030', '\200', '\200', '\200', '\004', 'R', '\017', 'm', 'a', 'x', 'i', 'm', 'u', 'm', 'R', 'i', 'n', 'g', 'S', 'i', 'z', 'e', '\"', +'.', '\n', '\014', 'H', 'a', 's', 'h', 'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', '\022', '\013', '\n', '\007', 'X', 'X', '_', 'H', 'A', 'S', +'H', '\020', '\000', '\022', '\021', '\n', '\r', 'M', 'U', 'R', 'M', 'U', 'R', '_', 'H', 'A', 'S', 'H', '_', '2', '\020', '\001', 'J', '\004', '\010', +'\002', '\020', '\003', '\032', '=', '\n', '\023', 'O', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'D', 's', 't', 'L', 'b', 'C', 'o', 'n', 'f', 'i', +'g', '\022', '&', '\n', '\017', 'u', 's', 'e', '_', 'h', 't', 't', 'p', '_', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\001', ' ', '\001', '(', +'\010', 'R', '\r', 'u', 's', 'e', 'H', 't', 't', 'p', 'H', 'e', 'a', 'd', 'e', 'r', '\032', '\206', '\010', '\n', '\016', 'C', 'o', 'm', 'm', +'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'K', '\n', '\027', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 'p', 'a', 'n', +'i', 'c', '_', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', '\023', '.', 'e', 'n', 'v', 'o', +'y', '.', 't', 'y', 'p', 'e', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\025', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'P', 'a', +'n', 'i', 'c', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', 'i', '\n', '\024', 'z', 'o', 'n', 'e', '_', 'a', 'w', 'a', 'r', +'e', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', +'o', 'n', 'f', 'i', 'g', '.', 'Z', 'o', 'n', 'e', 'A', 'w', 'a', 'r', 'e', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\000', +'R', '\021', 'z', 'o', 'n', 'e', 'A', 'w', 'a', 'r', 'e', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '~', '\n', '\033', 'l', 'o', +'c', 'a', 'l', 'i', 't', 'y', '_', 'w', 'e', 'i', 'g', 'h', 't', 'e', 'd', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i', 'g', +'\030', '\003', ' ', '\001', '(', '\013', '2', '=', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', +'s', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'L', 'o', 'c', 'a', 'l', +'i', 't', 'y', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\000', 'R', '\030', 'l', 'o', +'c', 'a', 'l', 'i', 't', 'y', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'I', '\n', +'\023', 'u', 'p', 'd', 'a', 't', 'e', '_', 'm', 'e', 'r', 'g', 'e', '_', 'w', 'i', 'n', 'd', 'o', 'w', '\030', '\004', ' ', '\001', '(', +'\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', +'i', 'o', 'n', 'R', '\021', 'u', 'p', 'd', 'a', 't', 'e', 'M', 'e', 'r', 'g', 'e', 'W', 'i', 'n', 'd', 'o', 'w', '\022', 'C', '\n', +'\037', 'i', 'g', 'n', 'o', 'r', 'e', '_', 'n', 'e', 'w', '_', 'h', 'o', 's', 't', 's', '_', 'u', 'n', 't', 'i', 'l', '_', 'f', +'i', 'r', 's', 't', '_', 'h', 'c', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\032', 'i', 'g', 'n', 'o', 'r', 'e', 'N', 'e', 'w', 'H', +'o', 's', 't', 's', 'U', 'n', 't', 'i', 'l', 'F', 'i', 'r', 's', 't', 'H', 'c', '\022', 'M', '\n', '$', 'c', 'l', 'o', 's', 'e', +'_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 's', '_', 'o', 'n', '_', 'h', 'o', 's', 't', '_', 's', 'e', 't', '_', +'c', 'h', 'a', 'n', 'g', 'e', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\037', 'c', 'l', 'o', 's', 'e', 'C', 'o', 'n', 'n', 'e', 'c', +'t', 'i', 'o', 'n', 's', 'O', 'n', 'H', 'o', 's', 't', 'S', 'e', 't', 'C', 'h', 'a', 'n', 'g', 'e', '\022', '\177', '\n', '\034', 'c', +'o', 'n', 's', 'i', 's', 't', 'e', 'n', 't', '_', 'h', 'a', 's', 'h', 'i', 'n', 'g', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', +'i', 'g', '\030', '\007', ' ', '\001', '(', '\013', '2', '>', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', +'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'C', 'o', 'n', +'s', 'i', 's', 't', 'e', 'n', 't', 'H', 'a', 's', 'h', 'i', 'n', 'g', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\031', 'c', +'o', 'n', 's', 'i', 's', 't', 'e', 'n', 't', 'H', 'a', 's', 'h', 'i', 'n', 'g', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\032', +'\314', '\001', '\n', '\021', 'Z', 'o', 'n', 'e', 'A', 'w', 'a', 'r', 'e', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '<', '\n', '\017', +'r', 'o', 'u', 't', 'i', 'n', 'g', '_', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', '\023', '.', 'e', +'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'r', 'o', 'u', 't', 'i', 'n', +'g', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\022', 'F', '\n', '\020', 'm', 'i', 'n', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 's', +'i', 'z', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'U', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 'm', 'i', 'n', 'C', 'l', 'u', 's', 't', 'e', +'r', 'S', 'i', 'z', 'e', '\022', '1', '\n', '\025', 'f', 'a', 'i', 'l', '_', 't', 'r', 'a', 'f', 'f', 'i', 'c', '_', 'o', 'n', '_', +'p', 'a', 'n', 'i', 'c', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\022', 'f', 'a', 'i', 'l', 'T', 'r', 'a', 'f', 'f', 'i', 'c', 'O', +'n', 'P', 'a', 'n', 'i', 'c', '\032', '\032', '\n', '\030', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'W', 'e', 'i', 'g', 'h', 't', 'e', +'d', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\032', 'T', '\n', '\031', 'C', 'o', 'n', 's', 'i', 's', 't', 'e', 'n', 't', 'H', 'a', +'s', 'h', 'i', 'n', 'g', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '7', '\n', '\030', 'u', 's', 'e', '_', 'h', 'o', 's', 't', +'n', 'a', 'm', 'e', '_', 'f', 'o', 'r', '_', 'h', 'a', 's', 'h', 'i', 'n', 'g', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\025', 'u', +'s', 'e', 'H', 'o', 's', 't', 'n', 'a', 'm', 'e', 'F', 'o', 'r', 'H', 'a', 's', 'h', 'i', 'n', 'g', 'B', '\033', '\n', '\031', 'l', +'o', 'c', 'a', 'l', 'i', 't', 'y', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\032', +'\251', '\001', '\n', '\013', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't', 'e', '\022', 'N', '\n', '\r', 'b', 'a', 's', 'e', '_', 'i', +'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\001', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\016', '\372', 'B', '\013', '\252', '\001', '\010', '\010', '\001', +'*', '\004', '\020', '\300', '\204', '=', 'R', '\014', 'b', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'J', '\n', '\014', 'm', +'a', 'x', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\014', '\372', 'B', '\t', '\252', +'\001', '\006', '*', '\004', '\020', '\300', '\204', '=', 'R', '\013', 'm', 'a', 'x', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\032', 'd', '\n', '\035', +'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'E', +'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '-', '\n', +'\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\032', 'f', +'\n', '\"', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', +'p', 't', 'i', 'o', 'n', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', +'\003', 'k', 'e', 'y', '\022', '*', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', +'8', '\001', '\"', 'W', '\n', '\r', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'T', 'y', 'p', 'e', '\022', '\n', '\n', '\006', 'S', 'T', +'A', 'T', 'I', 'C', '\020', '\000', '\022', '\016', '\n', '\n', 'S', 'T', 'R', 'I', 'C', 'T', '_', 'D', 'N', 'S', '\020', '\001', '\022', '\017', '\n', +'\013', 'L', 'O', 'G', 'I', 'C', 'A', 'L', '_', 'D', 'N', 'S', '\020', '\002', '\022', '\007', '\n', '\003', 'E', 'D', 'S', '\020', '\003', '\022', '\020', +'\n', '\014', 'O', 'R', 'I', 'G', 'I', 'N', 'A', 'L', '_', 'D', 'S', 'T', '\020', '\004', '\"', '\254', '\001', '\n', '\010', 'L', 'b', 'P', 'o', +'l', 'i', 'c', 'y', '\022', '\017', '\n', '\013', 'R', 'O', 'U', 'N', 'D', '_', 'R', 'O', 'B', 'I', 'N', '\020', '\000', '\022', '\021', '\n', '\r', +'L', 'E', 'A', 'S', 'T', '_', 'R', 'E', 'Q', 'U', 'E', 'S', 'T', '\020', '\001', '\022', '\r', '\n', '\t', 'R', 'I', 'N', 'G', '_', 'H', +'A', 'S', 'H', '\020', '\002', '\022', '\n', '\n', '\006', 'R', 'A', 'N', 'D', 'O', 'M', '\020', '\003', '\022', '\035', '\n', '\017', 'O', 'R', 'I', 'G', +'I', 'N', 'A', 'L', '_', 'D', 'S', 'T', '_', 'L', 'B', '\020', '\004', '\032', '\010', '\010', '\001', '\250', '\367', '\264', '\213', '\002', '\001', '\022', '\n', +'\n', '\006', 'M', 'A', 'G', 'L', 'E', 'V', '\020', '\005', '\022', '\024', '\n', '\020', 'C', 'L', 'U', 'S', 'T', 'E', 'R', '_', 'P', 'R', 'O', +'V', 'I', 'D', 'E', 'D', '\020', '\006', '\022', ' ', '\n', '\034', 'L', 'O', 'A', 'D', '_', 'B', 'A', 'L', 'A', 'N', 'C', 'I', 'N', 'G', +'_', 'P', 'O', 'L', 'I', 'C', 'Y', '_', 'C', 'O', 'N', 'F', 'I', 'G', '\020', '\007', '\"', '5', '\n', '\017', 'D', 'n', 's', 'L', 'o', +'o', 'k', 'u', 'p', 'F', 'a', 'm', 'i', 'l', 'y', '\022', '\010', '\n', '\004', 'A', 'U', 'T', 'O', '\020', '\000', '\022', '\013', '\n', '\007', 'V', +'4', '_', 'O', 'N', 'L', 'Y', '\020', '\001', '\022', '\013', '\n', '\007', 'V', '6', '_', 'O', 'N', 'L', 'Y', '\020', '\002', '\"', 'T', '\n', '\030', +'C', 'l', 'u', 's', 't', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '\022', +'\033', '\n', '\027', 'U', 'S', 'E', '_', 'C', 'O', 'N', 'F', 'I', 'G', 'U', 'R', 'E', 'D', '_', 'P', 'R', 'O', 'T', 'O', 'C', 'O', +'L', '\020', '\000', '\022', '\033', '\n', '\027', 'U', 'S', 'E', '_', 'D', 'O', 'W', 'N', 'S', 'T', 'R', 'E', 'A', 'M', '_', 'P', 'R', 'O', +'T', 'O', 'C', 'O', 'L', '\020', '\001', 'B', '\030', '\n', '\026', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'd', 'i', 's', 'c', 'o', 'v', +'e', 'r', 'y', '_', 't', 'y', 'p', 'e', 'B', '\013', '\n', '\t', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i', 'g', 'J', '\004', '\010', '\014', +'\020', '\r', 'J', '\004', '\010', '\017', '\020', '\020', '\"', '\350', '\001', '\n', '\023', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', +'g', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'D', '\n', '\010', 'p', 'o', 'l', 'i', 'c', 'i', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', +'2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', +'c', 'i', 'n', 'g', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\010', 'p', 'o', 'l', 'i', 'c', 'i', +'e', 's', '\032', '\212', '\001', '\n', '\006', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', +'(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '3', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', +'\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', +'\002', '\030', '\001', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '7', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', +'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'A', 'n', 'y', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\"', 'W', '\n', '\022', 'U', 'p', 's', +'t', 'r', 'e', 'a', 'm', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'A', '\n', '\016', 's', 'o', 'u', 'r', 'c', 'e', +'_', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'R', '\r', 's', 'o', 'u', 'r', 'c', 'e', +'A', 'd', 'd', 'r', 'e', 's', 's', '\"', 'a', '\n', '\031', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'C', 'o', 'n', 'n', 'e', 'c', +'t', 'i', 'o', 'n', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'D', '\n', '\r', 't', 'c', 'p', '_', 'k', 'e', 'e', 'p', 'a', 'l', +'i', 'v', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'o', 'r', 'e', '.', 'T', 'c', 'p', 'K', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'R', '\014', 't', 'c', 'p', 'K', 'e', 'e', +'p', 'a', 'l', 'i', 'v', 'e', 'B', 'S', '\n', '\032', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', 'B', '\014', 'C', 'l', 'u', 's', 't', 'e', 'r', 'P', 'r', 'o', 't', 'o', +'P', '\001', '\362', '\230', '\376', '\217', '\005', '\031', '\022', '\027', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', +'u', 's', 't', 'e', 'r', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[20] = { + &envoy_api_v2_auth_tls_proto_upbdefinit, + &envoy_api_v2_cluster_circuit_breaker_proto_upbdefinit, + &envoy_api_v2_cluster_filter_proto_upbdefinit, + &envoy_api_v2_cluster_outlier_detection_proto_upbdefinit, + &envoy_api_v2_core_address_proto_upbdefinit, + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_api_v2_core_config_source_proto_upbdefinit, + &envoy_api_v2_core_health_check_proto_upbdefinit, + &envoy_api_v2_core_protocol_proto_upbdefinit, + &envoy_api_v2_endpoint_proto_upbdefinit, + &envoy_type_percent_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &envoy_annotations_deprecation_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_cluster_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/cluster.proto", + UPB_STRVIEW_INIT(descriptor, 8574) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h new file mode 100644 index 00000000000..aabcc3fcf47 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.h @@ -0,0 +1,130 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CLUSTER_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CLUSTER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_cluster_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_TransportSocketMatch_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.TransportSocketMatch"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_CustomClusterType_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.CustomClusterType"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_EdsClusterConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.EdsClusterConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_LbSubsetConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.LbSubsetConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_LbSubsetConfig_LbSubsetSelector_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.LbSubsetConfig.LbSubsetSelector"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_LeastRequestLbConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.LeastRequestLbConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_RingHashLbConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.RingHashLbConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_OriginalDstLbConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.OriginalDstLbConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_CommonLbConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.CommonLbConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_CommonLbConfig_ZoneAwareLbConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.CommonLbConfig.ZoneAwareLbConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_CommonLbConfig_LocalityWeightedLbConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.CommonLbConfig.LocalityWeightedLbConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_CommonLbConfig_ConsistentHashingLbConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.CommonLbConfig.ConsistentHashingLbConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_RefreshRate_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.RefreshRate"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_ExtensionProtocolOptionsEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.ExtensionProtocolOptionsEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Cluster_TypedExtensionProtocolOptionsEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Cluster.TypedExtensionProtocolOptionsEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_LoadBalancingPolicy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.LoadBalancingPolicy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_LoadBalancingPolicy_Policy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.LoadBalancingPolicy.Policy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_UpstreamBindConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.UpstreamBindConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_UpstreamConnectionOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.UpstreamConnectionOptions"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CLUSTER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c new file mode 100644 index 00000000000..e695f402389 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c @@ -0,0 +1,95 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster/circuit_breaker.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/cluster/circuit_breaker.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_type_percent_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_msginit; +extern const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit; +extern const upb_msglayout envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_msginit; + +static const upb_msglayout *layouts[3] = { + &envoy_api_v2_cluster_CircuitBreakers_msginit, + &envoy_api_v2_cluster_CircuitBreakers_Thresholds_msginit, + &envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_msginit, +}; + +static const char descriptor[1247] = {'\n', '*', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'c', 'i', +'r', 'c', 'u', 'i', 't', '_', 'b', 'r', 'e', 'a', 'k', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', +'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\030', 'e', 'n', +'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', +'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', +'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', +'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', +'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', +'t', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\313', '\006', '\n', '\017', 'C', 'i', 'r', +'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', '\022', 'P', '\n', '\n', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', +'s', '\030', '\001', ' ', '\003', '(', '\013', '2', '0', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', +'u', 's', 't', 'e', 'r', '.', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', '.', 'T', 'h', 'r', +'e', 's', 'h', 'o', 'l', 'd', 's', 'R', '\n', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 's', '\032', '\345', '\005', '\n', '\n', 'T', +'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 's', '\022', 'H', '\n', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\001', ' ', '\001', +'(', '\016', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'o', +'u', 't', 'i', 'n', 'g', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\010', +'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', 'E', '\n', '\017', 'm', 'a', 'x', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', +'n', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 'm', 'a', 'x', 'C', 'o', 'n', 'n', 'e', 'c', 't', +'i', 'o', 'n', 's', '\022', 'N', '\n', '\024', 'm', 'a', 'x', '_', 'p', 'e', 'n', 'd', 'i', 'n', 'g', '_', 'r', 'e', 'q', 'u', 'e', +'s', 't', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\022', 'm', 'a', 'x', 'P', 'e', 'n', 'd', 'i', 'n', +'g', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', '?', '\n', '\014', 'm', 'a', 'x', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', +'\030', '\004', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\013', 'm', 'a', 'x', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', +'=', '\n', '\013', 'm', 'a', 'x', '_', 'r', 'e', 't', 'r', 'i', 'e', 's', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', +'R', '\n', 'm', 'a', 'x', 'R', 'e', 't', 'r', 'i', 'e', 's', '\022', '_', '\n', '\014', 'r', 'e', 't', 'r', 'y', '_', 'b', 'u', 'd', +'g', 'e', 't', '\030', '\010', ' ', '\001', '(', '\013', '2', '<', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', '.', 'T', +'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 's', '.', 'R', 'e', 't', 'r', 'y', 'B', 'u', 'd', 'g', 'e', 't', 'R', '\013', 'r', 'e', +'t', 'r', 'y', 'B', 'u', 'd', 'g', 'e', 't', '\022', '\'', '\n', '\017', 't', 'r', 'a', 'c', 'k', '_', 'r', 'e', 'm', 'a', 'i', 'n', +'i', 'n', 'g', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\016', 't', 'r', 'a', 'c', 'k', 'R', 'e', 'm', 'a', 'i', 'n', 'i', 'n', 'g', +'\022', 'N', '\n', '\024', 'm', 'a', 'x', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'p', 'o', 'o', 'l', 's', '\030', +'\007', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', +'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\022', 'm', 'a', 'x', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', +'P', 'o', 'o', 'l', 's', '\032', '\233', '\001', '\n', '\013', 'R', 'e', 't', 'r', 'y', 'B', 'u', 'd', 'g', 'e', 't', '\022', ':', '\n', '\016', +'b', 'u', 'd', 'g', 'e', 't', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\023', '.', 'e', 'n', +'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\r', 'b', 'u', 'd', 'g', 'e', 't', 'P', +'e', 'r', 'c', 'e', 'n', 't', '\022', 'P', '\n', '\025', 'm', 'i', 'n', '_', 'r', 'e', 't', 'r', 'y', '_', 'c', 'o', 'n', 'c', 'u', +'r', 'r', 'e', 'n', 'c', 'y', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\023', 'm', 'i', 'n', 'R', 'e', 't', +'r', 'y', 'C', 'o', 'n', 'c', 'u', 'r', 'r', 'e', 'n', 'c', 'y', 'B', '\224', '\001', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', +'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', +'e', 'r', 'B', '\023', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', +'\252', '\002', '\026', 'E', 'n', 'v', 'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N', 'S', +'\352', '\002', '\026', 'E', 'n', 'v', 'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N', 'S', +'\362', '\230', '\376', '\217', '\005', '\031', '\022', '\027', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', +'t', 'e', 'r', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[7] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_type_percent_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_cluster_circuit_breaker_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/cluster/circuit_breaker.proto", + UPB_STRVIEW_INIT(descriptor, 1247) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h new file mode 100644 index 00000000000..2eb1a59c19e --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.h @@ -0,0 +1,45 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster/circuit_breaker.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CLUSTER_CIRCUIT_BREAKER_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CLUSTER_CIRCUIT_BREAKER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_cluster_circuit_breaker_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_cluster_CircuitBreakers_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_circuit_breaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.cluster.CircuitBreakers"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_cluster_CircuitBreakers_Thresholds_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_circuit_breaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.cluster.CircuitBreakers.Thresholds"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_cluster_CircuitBreakers_Thresholds_RetryBudget_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_circuit_breaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.cluster.CircuitBreakers.Thresholds.RetryBudget"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CLUSTER_CIRCUIT_BREAKER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c new file mode 100644 index 00000000000..c74b43b7971 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c @@ -0,0 +1,54 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster/filter.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/cluster/filter.upbdefs.h" + +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_cluster_Filter_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_cluster_Filter_msginit, +}; + +static const char descriptor[419] = {'\n', '!', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'f', 'i', +'l', 't', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'l', 'u', 's', 't', 'e', 'r', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', +'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', +'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', +'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '^', '\n', +'\006', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', +'\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '7', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', +'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'A', 'n', 'y', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\214', '\001', '\n', '\"', 'i', 'o', +'.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'l', 'u', 's', 't', 'e', 'r', 'B', '\013', 'F', 'i', 'l', 't', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\252', '\002', '\026', +'E', 'n', 'v', 'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N', 'S', '\352', '\002', '\026', +'E', 'n', 'v', 'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N', 'S', '\362', '\230', '\376', +'\217', '\005', '\031', '\022', '\027', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', +'.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[5] = { + &google_protobuf_any_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_cluster_filter_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/cluster/filter.proto", + UPB_STRVIEW_INIT(descriptor, 419) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h new file mode 100644 index 00000000000..f5aa5c65623 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster/filter.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_cluster_filter_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_cluster_Filter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_filter_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.cluster.Filter"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CLUSTER_FILTER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c new file mode 100644 index 00000000000..7622a8ef7d0 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c @@ -0,0 +1,134 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster/outlier_detection.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/cluster/outlier_detection.upbdefs.h" + +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_cluster_OutlierDetection_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_cluster_OutlierDetection_msginit, +}; + +static const char descriptor[2366] = {'\n', ',', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'o', 'u', +'t', 'l', 'i', 'e', 'r', '_', 'd', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '\032', '\036', 'g', 'o', 'o', 'g', 'l', +'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', +'s', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', +'/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', +'t', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', +'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\276', '\017', '\n', '\020', +'O', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '\022', 'E', '\n', '\017', 'c', 'o', 'n', 's', 'e', +'c', 'u', 't', 'i', 'v', 'e', '_', '5', 'x', 'x', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 'c', 'o', +'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '5', 'x', 'x', '\022', '?', '\n', '\010', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', +'\002', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', +'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\010', 'i', 'n', 't', 'e', 'r', 'v', +'a', 'l', '\022', 'Q', '\n', '\022', 'b', 'a', 's', 'e', '_', 'e', 'j', 'e', 'c', 't', 'i', 'o', 'n', '_', 't', 'i', 'm', 'e', '\030', +'\003', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', +'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\020', 'b', 'a', 's', 'e', 'E', 'j', +'e', 'c', 't', 'i', 'o', 'n', 'T', 'i', 'm', 'e', '\022', 'W', '\n', '\024', 'm', 'a', 'x', '_', 'e', 'j', 'e', 'c', 't', 'i', 'o', +'n', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', +'*', '\002', '\030', 'd', 'R', '\022', 'm', 'a', 'x', 'E', 'j', 'e', 'c', 't', 'i', 'o', 'n', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', +'a', '\n', '\031', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', +'5', 'x', 'x', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\027', +'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'C', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '5', 'x', 'x', '\022', '[', +'\n', '\026', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 's', 'u', 'c', 'c', 'e', 's', 's', '_', 'r', 'a', 't', 'e', '\030', +'\006', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', +'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\024', 'e', 'n', 'f', 'o', +'r', 'c', 'i', 'n', 'g', 'S', 'u', 'c', 'c', 'e', 's', 's', 'R', 'a', 't', 'e', '\022', 'Y', '\n', '\032', 's', 'u', 'c', 'c', 'e', +'s', 's', '_', 'r', 'a', 't', 'e', '_', 'm', 'i', 'n', 'i', 'm', 'u', 'm', '_', 'h', 'o', 's', 't', 's', '\030', '\007', ' ', '\001', +'(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', +'3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\027', 's', 'u', 'c', 'c', 'e', 's', 's', 'R', 'a', 't', 'e', 'M', 'i', 'n', 'i', 'm', +'u', 'm', 'H', 'o', 's', 't', 's', '\022', '[', '\n', '\033', 's', 'u', 'c', 'c', 'e', 's', 's', '_', 'r', 'a', 't', 'e', '_', 'r', +'e', 'q', 'u', 'e', 's', 't', '_', 'v', 'o', 'l', 'u', 'm', 'e', '\030', '\010', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', +'\030', 's', 'u', 'c', 'c', 'e', 's', 's', 'R', 'a', 't', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', 'V', 'o', 'l', 'u', 'm', 'e', +'\022', 'W', '\n', '\031', 's', 'u', 'c', 'c', 'e', 's', 's', '_', 'r', 'a', 't', 'e', '_', 's', 't', 'd', 'e', 'v', '_', 'f', 'a', +'c', 't', 'o', 'r', '\030', '\t', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\026', 's', 'u', 'c', 'c', 'e', 's', 's', 'R', +'a', 't', 'e', 'S', 't', 'd', 'e', 'v', 'F', 'a', 'c', 't', 'o', 'r', '\022', '\\', '\n', '\033', 'c', 'o', 'n', 's', 'e', 'c', 'u', +'t', 'i', 'v', 'e', '_', 'g', 'a', 't', 'e', 'w', 'a', 'y', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '\030', '\n', ' ', '\001', '(', +'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', +'2', 'V', 'a', 'l', 'u', 'e', 'R', '\031', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', 'G', 'a', 't', 'e', 'w', 'a', +'y', 'F', 'a', 'i', 'l', 'u', 'r', 'e', '\022', 'x', '\n', '%', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 'c', 'o', 'n', +'s', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', 'g', 'a', 't', 'e', 'w', 'a', 'y', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '\030', +'\013', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', +'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\"', 'e', 'n', 'f', 'o', +'r', 'c', 'i', 'n', 'g', 'C', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', 'G', 'a', 't', 'e', 'w', 'a', 'y', 'F', 'a', +'i', 'l', 'u', 'r', 'e', '\022', 'J', '\n', '\"', 's', 'p', 'l', 'i', 't', '_', 'e', 'x', 't', 'e', 'r', 'n', 'a', 'l', '_', 'l', +'o', 'c', 'a', 'l', '_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 'e', 'r', 'r', 'o', 'r', 's', '\030', '\014', ' ', '\001', '(', '\010', 'R', +'\036', 's', 'p', 'l', 'i', 't', 'E', 'x', 't', 'e', 'r', 'n', 'a', 'l', 'L', 'o', 'c', 'a', 'l', 'O', 'r', 'i', 'g', 'i', 'n', +'E', 'r', 'r', 'o', 'r', 's', '\022', 'e', '\n', ' ', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', 'l', 'o', 'c', +'a', 'l', '_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '\030', '\r', ' ', '\001', '(', '\013', '2', '\034', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', +'l', 'u', 'e', 'R', '\035', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', 'L', 'o', 'c', 'a', 'l', 'O', 'r', 'i', 'g', +'i', 'n', 'F', 'a', 'i', 'l', 'u', 'r', 'e', '\022', '\201', '\001', '\n', '*', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 'c', +'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', 'l', 'o', 'c', 'a', 'l', '_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 'f', +'a', 'i', 'l', 'u', 'r', 'e', '\030', '\016', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', +'d', 'R', '&', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'C', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', 'L', 'o', +'c', 'a', 'l', 'O', 'r', 'i', 'g', 'i', 'n', 'F', 'a', 'i', 'l', 'u', 'r', 'e', '\022', 's', '\n', '#', 'e', 'n', 'f', 'o', 'r', +'c', 'i', 'n', 'g', '_', 'l', 'o', 'c', 'a', 'l', '_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 's', 'u', 'c', 'c', 'e', 's', 's', +'_', 'r', 'a', 't', 'e', '\030', '\017', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', +'R', '\037', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'L', 'o', 'c', 'a', 'l', 'O', 'r', 'i', 'g', 'i', 'n', 'S', 'u', 'c', +'c', 'e', 's', 's', 'R', 'a', 't', 'e', '\022', 'g', '\n', '\034', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p', 'e', 'r', 'c', 'e', +'n', 't', 'a', 'g', 'e', '_', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\020', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', +'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\032', 'f', 'a', 'i', 'l', 'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', +'t', 'a', 'g', 'e', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', 'g', '\n', '\034', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', +'g', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '\030', '\021', ' ', '\001', '(', +'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', +'2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\032', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', +'g', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '\022', '\177', '\n', ')', 'e', 'n', 'f', +'o', 'r', 'c', 'i', 'n', 'g', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', +'_', 'l', 'o', 'c', 'a', 'l', '_', 'o', 'r', 'i', 'g', 'i', 'n', '\030', '\022', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', +'\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '%', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'F', 'a', 'i', 'l', 'u', 'r', +'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', 'L', 'o', 'c', 'a', 'l', 'O', 'r', 'i', 'g', 'i', 'n', '\022', 'e', '\n', +' ', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '_', 'm', 'i', 'n', 'i', 'm', +'u', 'm', '_', 'h', 'o', 's', 't', 's', '\030', '\023', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\035', 'f', 'a', 'i', 'l', +'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', 'M', 'i', 'n', 'i', 'm', 'u', 'm', 'H', 'o', 's', 't', 's', +'\022', 'g', '\n', '!', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '_', 'r', 'e', +'q', 'u', 'e', 's', 't', '_', 'v', 'o', 'l', 'u', 'm', 'e', '\030', '\024', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\036', +'f', 'a', 'i', 'l', 'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', 'V', +'o', 'l', 'u', 'm', 'e', 'B', '\226', '\001', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', 'B', '\025', 'O', 'u', 't', 'l', +'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\252', '\002', '\026', 'E', 'n', 'v', +'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N', 'S', '\352', '\002', '\026', 'E', 'n', 'v', +'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N', 'S', '\362', '\230', '\376', '\217', '\005', '\031', +'\022', '\027', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', +'\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[6] = { + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_cluster_outlier_detection_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/cluster/outlier_detection.proto", + UPB_STRVIEW_INIT(descriptor, 2366) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h new file mode 100644 index 00000000000..6a4da22fe49 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/cluster/outlier_detection.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CLUSTER_OUTLIER_DETECTION_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CLUSTER_OUTLIER_DETECTION_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_cluster_outlier_detection_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_cluster_OutlierDetection_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_cluster_outlier_detection_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.cluster.OutlierDetection"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CLUSTER_OUTLIER_DETECTION_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c new file mode 100644 index 00000000000..303901975ad --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c @@ -0,0 +1,108 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/address.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/address.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_socket_option_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_Pipe_msginit; +extern const upb_msglayout envoy_api_v2_core_SocketAddress_msginit; +extern const upb_msglayout envoy_api_v2_core_TcpKeepalive_msginit; +extern const upb_msglayout envoy_api_v2_core_BindConfig_msginit; +extern const upb_msglayout envoy_api_v2_core_Address_msginit; +extern const upb_msglayout envoy_api_v2_core_CidrRange_msginit; + +static const upb_msglayout *layouts[6] = { + &envoy_api_v2_core_Pipe_msginit, + &envoy_api_v2_core_SocketAddress_msginit, + &envoy_api_v2_core_TcpKeepalive_msginit, + &envoy_api_v2_core_BindConfig_msginit, + &envoy_api_v2_core_Address_msginit, + &envoy_api_v2_core_CidrRange_msginit, +}; + +static const char descriptor[1452] = {'\n', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'a', 'd', 'd', 'r', 'e', +'s', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '\032', '%', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 's', 'o', 'c', +'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', +'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', +'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', +'t', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', +'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 'A', '\n', '\004', 'P', 'i', 'p', 'e', '\022', '\033', '\n', '\004', 'p', 'a', +'t', 'h', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', '\034', +'\n', '\004', 'm', 'o', 'd', 'e', '\030', '\002', ' ', '\001', '(', '\r', 'B', '\010', '\372', 'B', '\005', '*', '\003', '\030', '\377', '\003', 'R', '\004', 'm', +'o', 'd', 'e', '\"', '\313', '\002', '\n', '\r', 'S', 'o', 'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', 'O', '\n', '\010', +'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\001', ' ', '\001', '(', '\016', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', 'o', 'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's', 's', '.', 'P', +'r', 'o', 't', 'o', 'c', 'o', 'l', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\010', 'p', 'r', 'o', 't', 'o', 'c', +'o', 'l', '\022', '!', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', +'\002', ' ', '\001', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '*', '\n', '\n', 'p', 'o', 'r', 't', '_', 'v', 'a', 'l', 'u', +'e', '\030', '\003', ' ', '\001', '(', '\r', 'B', '\t', '\372', 'B', '\006', '*', '\004', '\030', '\377', '\377', '\003', 'H', '\000', 'R', '\t', 'p', 'o', 'r', +'t', 'V', 'a', 'l', 'u', 'e', '\022', '\037', '\n', '\n', 'n', 'a', 'm', 'e', 'd', '_', 'p', 'o', 'r', 't', '\030', '\004', ' ', '\001', '(', +'\t', 'H', '\000', 'R', '\t', 'n', 'a', 'm', 'e', 'd', 'P', 'o', 'r', 't', '\022', '#', '\n', '\r', 'r', 'e', 's', 'o', 'l', 'v', 'e', +'r', '_', 'n', 'a', 'm', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\014', 'r', 'e', 's', 'o', 'l', 'v', 'e', 'r', 'N', 'a', 'm', +'e', '\022', '\037', '\n', '\013', 'i', 'p', 'v', '4', '_', 'c', 'o', 'm', 'p', 'a', 't', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\n', 'i', +'p', 'v', '4', 'C', 'o', 'm', 'p', 'a', 't', '\"', '\034', '\n', '\010', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '\007', '\n', '\003', +'T', 'C', 'P', '\020', '\000', '\022', '\007', '\n', '\003', 'U', 'D', 'P', '\020', '\001', 'B', '\025', '\n', '\016', 'p', 'o', 'r', 't', '_', 's', 'p', +'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\"', '\351', '\001', '\n', '\014', 'T', 'c', 'p', 'K', 'e', 'e', 'p', 'a', +'l', 'i', 'v', 'e', '\022', 'G', '\n', '\020', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '_', 'p', 'r', 'o', 'b', 'e', 's', '\030', +'\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', +'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\017', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'P', 'r', 'o', 'b', +'e', 's', '\022', 'C', '\n', '\016', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '_', 't', 'i', 'm', 'e', '\030', '\002', ' ', '\001', '(', +'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', +'2', 'V', 'a', 'l', 'u', 'e', 'R', '\r', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'T', 'i', 'm', 'e', '\022', 'K', '\n', '\022', +'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\003', ' ', '\001', '(', '\013', '2', +'\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', +'a', 'l', 'u', 'e', 'R', '\021', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\"', '\337', +'\001', '\n', '\n', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'Q', '\n', '\016', 's', 'o', 'u', 'r', 'c', 'e', '_', 'a', +'d', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', 'o', 'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's', 's', 'B', '\010', '\372', 'B', +'\005', '\212', '\001', '\002', '\020', '\001', 'R', '\r', 's', 'o', 'u', 'r', 'c', 'e', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', '6', '\n', '\010', +'f', 'r', 'e', 'e', 'b', 'i', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\010', 'f', 'r', 'e', 'e', 'b', 'i', +'n', 'd', '\022', 'F', '\n', '\016', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\003', '(', +'\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', 'o', 'c', +'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\r', 's', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 's', '\"', +'\223', '\001', '\n', '\007', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', 'I', '\n', '\016', 's', 'o', 'c', 'k', 'e', 't', '_', 'a', 'd', 'd', +'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'c', 'o', 'r', 'e', '.', 'S', 'o', 'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's', 's', 'H', '\000', 'R', '\r', 's', 'o', +'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', '-', '\n', '\004', 'p', 'i', 'p', 'e', '\030', '\002', ' ', '\001', '(', '\013', +'2', '\027', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'P', 'i', 'p', 'e', +'H', '\000', 'R', '\004', 'p', 'i', 'p', 'e', 'B', '\016', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '\003', '\370', 'B', '\001', '\"', +'\202', '\001', '\n', '\t', 'C', 'i', 'd', 'r', 'R', 'a', 'n', 'g', 'e', '\022', '.', '\n', '\016', 'a', 'd', 'd', 'r', 'e', 's', 's', '_', +'p', 'r', 'e', 'f', 'i', 'x', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\r', 'a', 'd', +'d', 'r', 'e', 's', 's', 'P', 'r', 'e', 'f', 'i', 'x', '\022', 'E', '\n', '\n', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'l', 'e', 'n', +'\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '*', '\003', '\030', '\200', '\001', 'R', '\t', 'p', 'r', +'e', 'f', 'i', 'x', 'L', 'e', 'n', 'B', 'U', '\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', 'B', '\014', 'A', 'd', 'd', 'r', 'e', 's', +'s', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\026', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', +'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', +'o', '3', +}; + +static upb_def_init *deps[6] = { + &envoy_api_v2_core_socket_option_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_address_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/address.proto", + UPB_STRVIEW_INIT(descriptor, 1452) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h new file mode 100644 index 00000000000..b19c26456a8 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.h @@ -0,0 +1,60 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/address.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_ADDRESS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_ADDRESS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_address_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Pipe_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_address_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Pipe"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_SocketAddress_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_address_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.SocketAddress"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_TcpKeepalive_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_address_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.TcpKeepalive"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_BindConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_address_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.BindConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Address_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_address_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Address"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_CidrRange_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_address_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.CidrRange"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_ADDRESS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c new file mode 100644 index 00000000000..cd8921cb335 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c @@ -0,0 +1,55 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/backoff.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/backoff.upbdefs.h" + +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_BackoffStrategy_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_core_BackoffStrategy_msginit, +}; + +static const char descriptor[439] = {'\n', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 'c', 'k', 'o', +'f', 'f', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', +'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', +'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', +'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\251', '\001', +'\n', '\017', 'B', 'a', 'c', 'k', 'o', 'f', 'f', 'S', 't', 'r', 'a', 't', 'e', 'g', 'y', '\022', 'N', '\n', '\r', 'b', 'a', 's', 'e', +'_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\001', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\016', '\372', 'B', '\013', '\252', '\001', '\010', +'\010', '\001', '2', '\004', '\020', '\300', '\204', '=', 'R', '\014', 'b', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'F', '\n', +'\014', 'm', 'a', 'x', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', +'\005', '\252', '\001', '\002', '*', '\000', 'R', '\013', 'm', 'a', 'x', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', 'B', 'U', '\n', '\037', 'i', 'o', +'.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'o', 'r', 'e', 'B', '\014', 'B', 'a', 'c', 'k', 'o', 'f', 'f', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', +'\026', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\272', '\200', +'\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[5] = { + &google_protobuf_duration_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_backoff_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/backoff.proto", + UPB_STRVIEW_INIT(descriptor, 439) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h new file mode 100644 index 00000000000..785961d2b14 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/backoff.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_BACKOFF_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_BACKOFF_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_backoff_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_BackoffStrategy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_backoff_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.BackoffStrategy"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_BACKOFF_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c new file mode 100644 index 00000000000..50a5121690b --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c @@ -0,0 +1,237 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/base.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/base.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_address_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_backoff_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_http_uri_proto_upbdefinit; +extern upb_def_init envoy_type_percent_proto_upbdefinit; +extern upb_def_init envoy_type_semantic_version_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_socket_option_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_Locality_msginit; +extern const upb_msglayout envoy_api_v2_core_BuildVersion_msginit; +extern const upb_msglayout envoy_api_v2_core_Extension_msginit; +extern const upb_msglayout envoy_api_v2_core_Node_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_msginit; +extern const upb_msglayout envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit; +extern const upb_msglayout envoy_api_v2_core_RuntimeUInt32_msginit; +extern const upb_msglayout envoy_api_v2_core_RuntimeDouble_msginit; +extern const upb_msglayout envoy_api_v2_core_RuntimeFeatureFlag_msginit; +extern const upb_msglayout envoy_api_v2_core_HeaderValue_msginit; +extern const upb_msglayout envoy_api_v2_core_HeaderValueOption_msginit; +extern const upb_msglayout envoy_api_v2_core_HeaderMap_msginit; +extern const upb_msglayout envoy_api_v2_core_DataSource_msginit; +extern const upb_msglayout envoy_api_v2_core_RetryPolicy_msginit; +extern const upb_msglayout envoy_api_v2_core_RemoteDataSource_msginit; +extern const upb_msglayout envoy_api_v2_core_AsyncDataSource_msginit; +extern const upb_msglayout envoy_api_v2_core_TransportSocket_msginit; +extern const upb_msglayout envoy_api_v2_core_RuntimeFractionalPercent_msginit; +extern const upb_msglayout envoy_api_v2_core_ControlPlane_msginit; + +static const upb_msglayout *layouts[19] = { + &envoy_api_v2_core_Locality_msginit, + &envoy_api_v2_core_BuildVersion_msginit, + &envoy_api_v2_core_Extension_msginit, + &envoy_api_v2_core_Node_msginit, + &envoy_api_v2_core_Metadata_msginit, + &envoy_api_v2_core_Metadata_FilterMetadataEntry_msginit, + &envoy_api_v2_core_RuntimeUInt32_msginit, + &envoy_api_v2_core_RuntimeDouble_msginit, + &envoy_api_v2_core_RuntimeFeatureFlag_msginit, + &envoy_api_v2_core_HeaderValue_msginit, + &envoy_api_v2_core_HeaderValueOption_msginit, + &envoy_api_v2_core_HeaderMap_msginit, + &envoy_api_v2_core_DataSource_msginit, + &envoy_api_v2_core_RetryPolicy_msginit, + &envoy_api_v2_core_RemoteDataSource_msginit, + &envoy_api_v2_core_AsyncDataSource_msginit, + &envoy_api_v2_core_TransportSocket_msginit, + &envoy_api_v2_core_RuntimeFractionalPercent_msginit, + &envoy_api_v2_core_ControlPlane_msginit, +}; + +static const char descriptor[3640] = {'\n', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', +'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '\032', +'\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'a', 'd', 'd', 'r', 'e', 's', +'s', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', +'e', '/', 'b', 'a', 'c', 'k', 'o', 'f', 'f', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', +'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'h', 't', 't', 'p', '_', 'u', 'r', 'i', '.', 'p', 'r', 'o', 't', 'o', '\032', +'\030', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', +'\032', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 's', 'e', 'm', 'a', 'n', 't', 'i', 'c', '_', 'v', 'e', 'r', +'s', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', +'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', +'\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', +'.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', +'m', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', +'d', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '%', 'e', 'n', 'v', 'o', +'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', +'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\"', 'Q', '\n', '\010', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\022', '\026', '\n', '\006', 'r', +'e', 'g', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\006', 'r', 'e', 'g', 'i', 'o', 'n', '\022', '\022', '\n', '\004', 'z', 'o', +'n', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\004', 'z', 'o', 'n', 'e', '\022', '\031', '\n', '\010', 's', 'u', 'b', '_', 'z', 'o', 'n', +'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\007', 's', 'u', 'b', 'Z', 'o', 'n', 'e', '\"', 'z', '\n', '\014', 'B', 'u', 'i', 'l', 'd', +'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '5', '\n', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', +'\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', 'V', 'e', 'r', 's', +'i', 'o', 'n', 'R', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\022', '3', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', +'\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', +'t', 'r', 'u', 'c', 't', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\"', '\273', '\001', '\n', '\t', 'E', 'x', 't', 'e', 'n', +'s', 'i', 'o', 'n', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', +'\032', '\n', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\010', 'c', 'a', 't', 'e', 'g', 'o', +'r', 'y', '\022', '\'', '\n', '\017', 't', 'y', 'p', 'e', '_', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '\030', '\003', ' ', '\001', +'(', '\t', 'R', '\016', 't', 'y', 'p', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '\022', '9', '\n', '\007', 'v', 'e', 'r', +'s', 'i', 'o', 'n', '\030', '\004', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'c', 'o', 'r', 'e', '.', 'B', 'u', 'i', 'l', 'd', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'R', '\007', 'v', 'e', 'r', 's', 'i', +'o', 'n', '\022', '\032', '\n', '\010', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'd', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\010', 'd', 'i', 's', +'a', 'b', 'l', 'e', 'd', '\"', '\312', '\004', '\n', '\004', 'N', 'o', 'd', 'e', '\022', '\016', '\n', '\002', 'i', 'd', '\030', '\001', ' ', '\001', '(', +'\t', 'R', '\002', 'i', 'd', '\022', '\030', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 'c', +'l', 'u', 's', 't', 'e', 'r', '\022', '3', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\003', ' ', '\001', '(', '\013', '2', +'\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', +'\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', '7', '\n', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\030', '\004', ' ', '\001', +'(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'L', 'o', +'c', 'a', 'l', 'i', 't', 'y', 'R', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\022', '\'', '\n', '\r', 'b', 'u', 'i', 'l', 'd', +'_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\005', ' ', '\001', '(', '\t', 'B', '\002', '\030', '\001', 'R', '\014', 'b', 'u', 'i', 'l', 'd', +'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '&', '\n', '\017', 'u', 's', 'e', 'r', '_', 'a', 'g', 'e', 'n', 't', '_', 'n', 'a', 'm', +'e', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\r', 'u', 's', 'e', 'r', 'A', 'g', 'e', 'n', 't', 'N', 'a', 'm', 'e', '\022', '.', '\n', +'\022', 'u', 's', 'e', 'r', '_', 'a', 'g', 'e', 'n', 't', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\007', ' ', '\001', '(', '\t', +'H', '\000', 'R', '\020', 'u', 's', 'e', 'r', 'A', 'g', 'e', 'n', 't', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', 'Z', '\n', '\030', 'u', +'s', 'e', 'r', '_', 'a', 'g', 'e', 'n', 't', '_', 'b', 'u', 'i', 'l', 'd', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\010', +' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'B', 'u', 'i', 'l', 'd', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'H', '\000', 'R', '\025', 'u', 's', 'e', 'r', 'A', 'g', 'e', 'n', 't', +'B', 'u', 'i', 'l', 'd', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '<', '\n', '\n', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', +'s', '\030', '\t', ' ', '\003', '(', '\013', '2', '\034', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '.', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', '\n', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\022', +'\'', '\n', '\017', 'c', 'l', 'i', 'e', 'n', 't', '_', 'f', 'e', 'a', 't', 'u', 'r', 'e', 's', '\030', '\n', ' ', '\003', '(', '\t', 'R', +'\016', 'c', 'l', 'i', 'e', 'n', 't', 'F', 'e', 'a', 't', 'u', 'r', 'e', 's', '\022', 'K', '\n', '\023', 'l', 'i', 's', 't', 'e', 'n', +'i', 'n', 'g', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', 'e', 's', '\030', '\013', ' ', '\003', '(', '\013', '2', '\032', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'R', '\022', 'l', +'i', 's', 't', 'e', 'n', 'i', 'n', 'g', 'A', 'd', 'd', 'r', 'e', 's', 's', 'e', 's', 'B', '\031', '\n', '\027', 'u', 's', 'e', 'r', +'_', 'a', 'g', 'e', 'n', 't', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 't', 'y', 'p', 'e', '\"', '\300', '\001', '\n', '\010', 'M', +'e', 't', 'a', 'd', 'a', 't', 'a', '\022', 'X', '\n', '\017', 'f', 'i', 'l', 't', 'e', 'r', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', +'a', '\030', '\001', ' ', '\003', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'F', 'i', 'l', 't', 'e', 'r', 'M', 'e', 't', 'a', 'd', 'a', 't', +'a', 'E', 'n', 't', 'r', 'y', 'R', '\016', 'f', 'i', 'l', 't', 'e', 'r', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '\032', 'Z', '\n', +'\023', 'F', 'i', 'l', 't', 'e', 'r', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', +'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '-', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', +'\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', +'u', 'c', 't', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', '^', '\n', '\r', 'R', 'u', 'n', 't', 'i', 'm', 'e', +'U', 'I', 'n', 't', '3', '2', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\002', +' ', '\001', '(', '\r', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '(', '\n', '\013', 'r', 'u', 'n', +'t', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\003', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\n', +'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', '\"', '^', '\n', '\r', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'D', 'o', 'u', 'b', +'l', 'e', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\001', +'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '(', '\n', '\013', 'r', 'u', 'n', 't', 'i', 'm', 'e', +'_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\n', 'r', 'u', 'n', 't', +'i', 'm', 'e', 'K', 'e', 'y', '\"', '\211', '\001', '\n', '\022', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'e', 'a', 't', 'u', 'r', 'e', +'F', 'l', 'a', 'g', '\022', 'I', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', +'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', +'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', +'a', 'l', 'u', 'e', '\022', '(', '\n', '\013', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', +'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', '\"', 'Y', '\n', '\013', +'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\022', '#', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', +'\021', '\372', 'B', '\016', 'r', '\014', ' ', '\001', '(', '\200', '\200', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\003', 'k', 'e', 'y', '\022', '%', +'\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\017', '\372', 'B', '\014', 'r', '\n', '(', '\200', '\200', '\001', '\300', +'\001', '\002', '\310', '\001', '\000', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\211', '\001', '\n', '\021', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', +'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', '\022', '@', '\n', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', +'2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', +'e', 'r', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\006', 'h', 'e', 'a', 'd', 'e', 'r', +'\022', '2', '\n', '\006', 'a', 'p', 'p', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\006', 'a', 'p', 'p', 'e', +'n', 'd', '\"', 'E', '\n', '\t', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 'p', '\022', '8', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', +'s', '\030', '\001', ' ', '\003', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\"', '\243', +'\001', '\n', '\n', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '%', '\n', '\010', 'f', 'i', 'l', 'e', 'n', 'a', 'm', 'e', +'\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'H', '\000', 'R', '\010', 'f', 'i', 'l', 'e', 'n', 'a', +'m', 'e', '\022', ',', '\n', '\014', 'i', 'n', 'l', 'i', 'n', 'e', '_', 'b', 'y', 't', 'e', 's', '\030', '\002', ' ', '\001', '(', '\014', 'B', +'\007', '\372', 'B', '\004', 'z', '\002', '\020', '\001', 'H', '\000', 'R', '\013', 'i', 'n', 'l', 'i', 'n', 'e', 'B', 'y', 't', 'e', 's', '\022', '.', +'\n', '\r', 'i', 'n', 'l', 'i', 'n', 'e', '_', 's', 't', 'r', 'i', 'n', 'g', '\030', '\003', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', +'\004', 'r', '\002', ' ', '\001', 'H', '\000', 'R', '\014', 'i', 'n', 'l', 'i', 'n', 'e', 'S', 't', 'r', 'i', 'n', 'g', 'B', '\020', '\n', '\t', +'s', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\"', '\226', '\001', '\n', '\013', 'R', 'e', 't', 'r', 'y', 'P', +'o', 'l', 'i', 'c', 'y', '\022', 'H', '\n', '\016', 'r', 'e', 't', 'r', 'y', '_', 'b', 'a', 'c', 'k', '_', 'o', 'f', 'f', '\030', '\001', +' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'B', 'a', 'c', 'k', 'o', 'f', 'f', 'S', 't', 'r', 'a', 't', 'e', 'g', 'y', 'R', '\014', 'r', 'e', 't', 'r', 'y', 'B', 'a', 'c', +'k', 'O', 'f', 'f', '\022', '=', '\n', '\013', 'n', 'u', 'm', '_', 'r', 'e', 't', 'r', 'i', 'e', 's', '\030', '\002', ' ', '\001', '(', '\013', +'2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', +'V', 'a', 'l', 'u', 'e', 'R', '\n', 'n', 'u', 'm', 'R', 'e', 't', 'r', 'i', 'e', 's', '\"', '\267', '\001', '\n', '\020', 'R', 'e', 'm', +'o', 't', 'e', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '?', '\n', '\010', 'h', 't', 't', 'p', '_', 'u', 'r', 'i', +'\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', +'e', '.', 'H', 't', 't', 'p', 'U', 'r', 'i', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\007', 'h', 't', 't', 'p', +'U', 'r', 'i', '\022', '\037', '\n', '\006', 's', 'h', 'a', '2', '5', '6', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', +'\002', ' ', '\001', 'R', '\006', 's', 'h', 'a', '2', '5', '6', '\022', 'A', '\n', '\014', 'r', 'e', 't', 'r', 'y', '_', 'p', 'o', 'l', 'i', +'c', 'y', '\030', '\003', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\013', 'r', 'e', 't', 'r', 'y', 'P', 'o', 'l', +'i', 'c', 'y', '\"', '\231', '\001', '\n', '\017', 'A', 's', 'y', 'n', 'c', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '5', +'\n', '\005', 'l', 'o', 'c', 'a', 'l', '\030', '\001', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\005', 'l', 'o', +'c', 'a', 'l', '\022', '=', '\n', '\006', 'r', 'e', 'm', 'o', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'e', 'm', 'o', 't', 'e', 'D', 'a', 't', 'a', +'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\006', 'r', 'e', 'm', 'o', 't', 'e', 'B', '\020', '\n', '\t', 's', 'p', 'e', 'c', 'i', +'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\"', '\257', '\001', '\n', '\017', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', +'c', 'k', 'e', 't', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', +' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', +'\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', +'\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', +'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', +'\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', '\"', '\211', '\001', '\n', '\030', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', +'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', 'L', '\n', '\r', 'd', 'e', 'f', 'a', 'u', +'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', +'p', 'e', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'B', '\010', '\372', 'B', '\005', +'\212', '\001', '\002', '\020', '\001', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '\037', '\n', '\013', 'r', 'u', +'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', +'e', 'y', '\"', '.', '\n', '\014', 'C', 'o', 'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', 'n', 'e', '\022', '\036', '\n', '\n', 'i', 'd', 'e', +'n', 't', 'i', 'f', 'i', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\n', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', +'*', '(', '\n', '\017', 'R', 'o', 'u', 't', 'i', 'n', 'g', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', '\013', '\n', '\007', 'D', 'E', +'F', 'A', 'U', 'L', 'T', '\020', '\000', '\022', '\010', '\n', '\004', 'H', 'I', 'G', 'H', '\020', '\001', '*', '\211', '\001', '\n', '\r', 'R', 'e', 'q', +'u', 'e', 's', 't', 'M', 'e', 't', 'h', 'o', 'd', '\022', '\026', '\n', '\022', 'M', 'E', 'T', 'H', 'O', 'D', '_', 'U', 'N', 'S', 'P', +'E', 'C', 'I', 'F', 'I', 'E', 'D', '\020', '\000', '\022', '\007', '\n', '\003', 'G', 'E', 'T', '\020', '\001', '\022', '\010', '\n', '\004', 'H', 'E', 'A', +'D', '\020', '\002', '\022', '\010', '\n', '\004', 'P', 'O', 'S', 'T', '\020', '\003', '\022', '\007', '\n', '\003', 'P', 'U', 'T', '\020', '\004', '\022', '\n', '\n', +'\006', 'D', 'E', 'L', 'E', 'T', 'E', '\020', '\005', '\022', '\013', '\n', '\007', 'C', 'O', 'N', 'N', 'E', 'C', 'T', '\020', '\006', '\022', '\013', '\n', +'\007', 'O', 'P', 'T', 'I', 'O', 'N', 'S', '\020', '\007', '\022', '\t', '\n', '\005', 'T', 'R', 'A', 'C', 'E', '\020', '\010', '\022', '\t', '\n', '\005', +'P', 'A', 'T', 'C', 'H', '\020', '\t', '*', '>', '\n', '\020', 'T', 'r', 'a', 'f', 'f', 'i', 'c', 'D', 'i', 'r', 'e', 'c', 't', 'i', +'o', 'n', '\022', '\017', '\n', '\013', 'U', 'N', 'S', 'P', 'E', 'C', 'I', 'F', 'I', 'E', 'D', '\020', '\000', '\022', '\013', '\n', '\007', 'I', 'N', +'B', 'O', 'U', 'N', 'D', '\020', '\001', '\022', '\014', '\n', '\010', 'O', 'U', 'T', 'B', 'O', 'U', 'N', 'D', '\020', '\002', 'B', 'R', '\n', '\037', +'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'c', 'o', 'r', 'e', 'B', '\t', 'B', 'a', 's', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\026', +'\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\272', '\200', '\310', +'\321', '\006', '\002', '\020', '\001', 'P', '\014', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[14] = { + &envoy_api_v2_core_address_proto_upbdefinit, + &envoy_api_v2_core_backoff_proto_upbdefinit, + &envoy_api_v2_core_http_uri_proto_upbdefinit, + &envoy_type_percent_proto_upbdefinit, + &envoy_type_semantic_version_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + &envoy_api_v2_core_socket_option_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_base_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/base.proto", + UPB_STRVIEW_INIT(descriptor, 3640) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h new file mode 100644 index 00000000000..68bd5475d35 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.h @@ -0,0 +1,125 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/base.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_BASE_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_BASE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Locality_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Locality"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_BuildVersion_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.BuildVersion"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Extension_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Extension"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Node_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Node"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Metadata_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Metadata"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Metadata_FilterMetadataEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Metadata.FilterMetadataEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_RuntimeUInt32_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.RuntimeUInt32"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_RuntimeDouble_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.RuntimeDouble"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_RuntimeFeatureFlag_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.RuntimeFeatureFlag"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HeaderValue_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HeaderValue"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HeaderValueOption_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HeaderValueOption"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HeaderMap_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HeaderMap"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_DataSource_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.DataSource"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_RetryPolicy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.RetryPolicy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_RemoteDataSource_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.RemoteDataSource"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_AsyncDataSource_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.AsyncDataSource"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_TransportSocket_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.TransportSocket"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_RuntimeFractionalPercent_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.RuntimeFractionalPercent"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_ControlPlane_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_base_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.ControlPlane"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_BASE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c new file mode 100644 index 00000000000..7f6471abf89 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c @@ -0,0 +1,122 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/config_source.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/config_source.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_grpc_service_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_ApiConfigSource_msginit; +extern const upb_msglayout envoy_api_v2_core_AggregatedConfigSource_msginit; +extern const upb_msglayout envoy_api_v2_core_SelfConfigSource_msginit; +extern const upb_msglayout envoy_api_v2_core_RateLimitSettings_msginit; +extern const upb_msglayout envoy_api_v2_core_ConfigSource_msginit; + +static const upb_msglayout *layouts[5] = { + &envoy_api_v2_core_ApiConfigSource_msginit, + &envoy_api_v2_core_AggregatedConfigSource_msginit, + &envoy_api_v2_core_SelfConfigSource_msginit, + &envoy_api_v2_core_RateLimitSettings_msginit, + &envoy_api_v2_core_ConfigSource_msginit, +}; + +static const char descriptor[1755] = {'\n', '%', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'c', 'o', 'n', 'f', 'i', +'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', +'r', 'e', '/', 'g', 'r', 'p', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', +'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', +'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', +'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', +'i', 'o', 'n', 's', '/', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', +'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', +'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', +'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', +'d', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\246', '\005', '\n', '\017', 'A', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', +'o', 'u', 'r', 'c', 'e', '\022', 'O', '\n', '\010', 'a', 'p', 'i', '_', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\016', '2', '*', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'p', 'i', 'C', 'o', 'n', +'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '.', 'A', 'p', 'i', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', +'\020', '\001', 'R', '\007', 'a', 'p', 'i', 'T', 'y', 'p', 'e', '\022', '[', '\n', '\025', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', +'a', 'p', 'i', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\010', ' ', '\001', '(', '\016', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'p', 'i', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'B', '\010', +'\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\023', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'A', 'p', 'i', 'V', 'e', 'r', +'s', 'i', 'o', 'n', '\022', '#', '\n', '\r', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'n', 'a', 'm', 'e', 's', '\030', '\002', ' ', '\003', +'(', '\t', 'R', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r', 'N', 'a', 'm', 'e', 's', '\022', 'C', '\n', '\r', 'g', 'r', 'p', 'c', '_', +'s', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'R', '\014', 'g', 'r', +'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '>', '\n', '\r', 'r', 'e', 'f', 'r', 'e', 's', 'h', '_', 'd', 'e', 'l', +'a', 'y', '\030', '\003', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\014', 'r', 'e', 'f', 'r', 'e', 's', 'h', 'D', 'e', 'l', 'a', 'y', '\022', +'L', '\n', '\017', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\005', ' ', '\001', '(', '\013', '2', +'\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', +'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\016', 'r', 'e', 'q', 'u', 'e', 's', 't', 'T', 'i', 'm', 'e', 'o', +'u', 't', '\022', 'T', '\n', '\023', 'r', 'a', 't', 'e', '_', 'l', 'i', 'm', 'i', 't', '_', 's', 'e', 't', 't', 'i', 'n', 'g', 's', +'\030', '\006', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', +'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'R', '\021', 'r', 'a', 't', 'e', +'L', 'i', 'm', 'i', 't', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\022', 'A', '\n', '\036', 's', 'e', 't', '_', 'n', 'o', 'd', 'e', +'_', 'o', 'n', '_', 'f', 'i', 'r', 's', 't', '_', 'm', 'e', 's', 's', 'a', 'g', 'e', '_', 'o', 'n', 'l', 'y', '\030', '\007', ' ', +'\001', '(', '\010', 'R', '\031', 's', 'e', 't', 'N', 'o', 'd', 'e', 'O', 'n', 'F', 'i', 'r', 's', 't', 'M', 'e', 's', 's', 'a', 'g', +'e', 'O', 'n', 'l', 'y', '\"', 'T', '\n', '\007', 'A', 'p', 'i', 'T', 'y', 'p', 'e', '\022', '%', '\n', '\027', 'U', 'N', 'S', 'U', 'P', +'P', 'O', 'R', 'T', 'E', 'D', '_', 'R', 'E', 'S', 'T', '_', 'L', 'E', 'G', 'A', 'C', 'Y', '\020', '\000', '\032', '\010', '\010', '\001', '\250', +'\367', '\264', '\213', '\002', '\001', '\022', '\010', '\n', '\004', 'R', 'E', 'S', 'T', '\020', '\001', '\022', '\010', '\n', '\004', 'G', 'R', 'P', 'C', '\020', '\002', +'\022', '\016', '\n', '\n', 'D', 'E', 'L', 'T', 'A', '_', 'G', 'R', 'P', 'C', '\020', '\003', '\"', '\030', '\n', '\026', 'A', 'g', 'g', 'r', 'e', +'g', 'a', 't', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\"', '\022', '\n', '\020', 'S', 'e', 'l', 'f', +'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\"', '\233', '\001', '\n', '\021', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', +'t', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\022', ';', '\n', '\n', 'm', 'a', 'x', '_', 't', 'o', 'k', 'e', 'n', 's', '\030', '\001', +' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', +'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 'm', 'a', 'x', 'T', 'o', 'k', 'e', 'n', 's', '\022', 'I', '\n', '\t', 'f', +'i', 'l', 'l', '_', 'r', 'a', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'o', 'u', 'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', 'B', '\016', '\372', 'B', '\013', '\022', +'\t', '!', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', 'R', '\010', 'f', 'i', 'l', 'l', 'R', 'a', 't', 'e', '\"', '\272', '\003', '\n', '\014', +'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '\024', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\001', '(', +'\t', 'H', '\000', 'R', '\004', 'p', 'a', 't', 'h', '\022', 'P', '\n', '\021', 'a', 'p', 'i', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', +'o', 'u', 'r', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', +'\017', 'a', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '=', '\n', '\003', 'a', 'd', 's', '\030', '\003', +' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'A', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', +'\003', 'a', 'd', 's', '\022', '9', '\n', '\004', 's', 'e', 'l', 'f', '\030', '\005', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', 'e', 'l', 'f', 'C', 'o', 'n', 'f', 'i', 'g', 'S', +'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\004', 's', 'e', 'l', 'f', '\022', 'M', '\n', '\025', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_', +'f', 'e', 't', 'c', 'h', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\023', 'i', 'n', +'i', 't', 'i', 'a', 'l', 'F', 'e', 't', 'c', 'h', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'Y', '\n', '\024', 'r', 'e', 's', 'o', +'u', 'r', 'c', 'e', '_', 'a', 'p', 'i', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\006', ' ', '\001', '(', '\016', '2', '\035', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'p', 'i', 'V', 'e', 'r', 's', +'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\022', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'A', 'p', +'i', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'B', '\036', '\n', '\027', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', +'_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '*', '&', '\n', '\n', 'A', 'p', 'i', 'V', 'e', 'r', +'s', 'i', 'o', 'n', '\022', '\010', '\n', '\004', 'A', 'U', 'T', 'O', '\020', '\000', '\022', '\006', '\n', '\002', 'V', '2', '\020', '\001', '\022', '\006', '\n', +'\002', 'V', '3', '\020', '\002', 'B', 'Z', '\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', 'B', '\021', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', +'u', 'r', 'c', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\026', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', +'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', +'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[8] = { + &envoy_api_v2_core_grpc_service_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &envoy_annotations_deprecation_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_config_source_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/config_source.proto", + UPB_STRVIEW_INIT(descriptor, 1755) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h new file mode 100644 index 00000000000..c369ec4236a --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.h @@ -0,0 +1,55 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/config_source.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_CONFIG_SOURCE_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_CONFIG_SOURCE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_config_source_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_ApiConfigSource_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_config_source_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.ApiConfigSource"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_AggregatedConfigSource_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_config_source_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.AggregatedConfigSource"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_SelfConfigSource_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_config_source_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.SelfConfigSource"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_RateLimitSettings_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_config_source_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.RateLimitSettings"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_ConfigSource_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_config_source_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.ConfigSource"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_CONFIG_SOURCE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c new file mode 100644 index 00000000000..65b1cd8abdc --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c @@ -0,0 +1,54 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/event_service_config.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/event_service_config.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_grpc_service_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_EventServiceConfig_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_core_EventServiceConfig_msginit, +}; + +static const char descriptor[420] = {'\n', ',', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'e', 'v', 'e', 'n', 't', +'_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', +'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'g', 'r', 'p', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'p', 'r', +'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', +'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', +'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', +'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 'y', '\n', '\022', 'E', 'v', 'e', 'n', 't', +'S', 'e', 'r', 'v', 'i', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'C', '\n', '\014', 'g', 'r', 'p', 'c', '_', 's', 'e', 'r', +'v', 'i', 'c', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'H', '\000', 'R', '\013', 'g', 'r', 'p', 'c', +'S', 'e', 'r', 'v', 'i', 'c', 'e', 'B', '\036', '\n', '\027', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '_', +'s', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'B', '`', '\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', +'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', 'B', +'\027', 'E', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'P', 'r', 'o', 't', 'o', 'P', +'\001', '\362', '\230', '\376', '\217', '\005', '\026', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', +'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[5] = { + &envoy_api_v2_core_grpc_service_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_event_service_config_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/event_service_config.proto", + UPB_STRVIEW_INIT(descriptor, 420) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h new file mode 100644 index 00000000000..e5dcf2450b4 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/event_service_config.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_EVENT_SERVICE_CONFIG_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_EVENT_SERVICE_CONFIG_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_event_service_config_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_EventServiceConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_event_service_config_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.EventServiceConfig"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_EVENT_SERVICE_CONFIG_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c new file mode 100644 index 00000000000..4cbc9835a44 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c @@ -0,0 +1,201 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/grpc_service.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/grpc_service.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_empty_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_sensitive_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_EnvoyGrpc_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit; + +static const upb_msglayout *layouts[11] = { + &envoy_api_v2_core_GrpcService_msginit, + &envoy_api_v2_core_GrpcService_EnvoyGrpc_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit, + &envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, +}; + +static const char descriptor[3336] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'g', 'r', 'p', 'c', '_', +'s', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'c', 'o', 'r', 'e', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', +'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'g', 'o', +'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'e', 'm', 'p', 't', 'y', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', +'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', +'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', +'t', 'i', 'o', 'n', 's', '/', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', +'t', 'o', '\"', '\333', '\026', '\n', '\013', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'I', '\n', '\n', 'e', 'n', 'v', +'o', 'y', '_', 'g', 'r', 'p', 'c', '\030', '\001', ' ', '\001', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'E', 'n', 'v', 'o', +'y', 'G', 'r', 'p', 'c', 'H', '\000', 'R', '\t', 'e', 'n', 'v', 'o', 'y', 'G', 'r', 'p', 'c', '\022', 'L', '\n', '\013', 'g', 'o', 'o', +'g', 'l', 'e', '_', 'g', 'r', 'p', 'c', '\030', '\002', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', +'g', 'l', 'e', 'G', 'r', 'p', 'c', 'H', '\000', 'R', '\n', 'g', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '\022', '3', '\n', '\007', +'t', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\022', +'I', '\n', '\020', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\005', ' ', '\003', '(', '\013', +'2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', +'e', 'r', 'V', 'a', 'l', 'u', 'e', 'R', '\017', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '\032', +'7', '\n', '\t', 'E', 'n', 'v', 'o', 'y', 'G', 'r', 'p', 'c', '\022', '*', '\n', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'n', +'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\013', 'c', 'l', 'u', 's', 't', +'e', 'r', 'N', 'a', 'm', 'e', '\032', '\332', '\023', '\n', '\n', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '\022', '&', '\n', '\n', +'t', 'a', 'r', 'g', 'e', 't', '_', 'u', 'r', 'i', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', +'R', '\t', 't', 'a', 'r', 'g', 'e', 't', 'U', 'r', 'i', '\022', 'm', '\n', '\023', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '_', 'c', 'r', +'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '<', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', +'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'h', 'a', 'n', 'n', 'e', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', +'l', 's', 'R', '\022', 'c', 'h', 'a', 'n', 'n', 'e', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', 'd', '\n', +'\020', 'c', 'a', 'l', 'l', '_', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '9', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', +'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', +'e', 'n', 't', 'i', 'a', 'l', 's', 'R', '\017', 'c', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', +'(', '\n', '\013', 's', 't', 'a', 't', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\004', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', +'r', '\002', ' ', '\001', 'R', '\n', 's', 't', 'a', 't', 'P', 'r', 'e', 'f', 'i', 'x', '\022', '8', '\n', '\030', 'c', 'r', 'e', 'd', 'e', +'n', 't', 'i', 'a', 'l', 's', '_', 'f', 'a', 'c', 't', 'o', 'r', 'y', '_', 'n', 'a', 'm', 'e', '\030', '\005', ' ', '\001', '(', '\t', +'R', '\026', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'F', 'a', 'c', 't', 'o', 'r', 'y', 'N', 'a', 'm', 'e', '\022', +'/', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\006', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\032', '\324', +'\001', '\n', '\016', 'S', 's', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', '<', '\n', '\n', 'r', 'o', 'o', 't', +'_', 'c', 'e', 'r', 't', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'r', 'o', 'o', 't', 'C', +'e', 'r', 't', 's', '\022', 'F', '\n', '\013', 'p', 'r', 'i', 'v', 'a', 't', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\013', +'2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', +'S', 'o', 'u', 'r', 'c', 'e', 'B', '\006', '\270', '\267', '\213', '\244', '\002', '\001', 'R', '\n', 'p', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e', +'y', '\022', '<', '\n', '\n', 'c', 'e', 'r', 't', '_', 'c', 'h', 'a', 'i', 'n', '\030', '\003', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', +'c', 'e', 'R', '\t', 'c', 'e', 'r', 't', 'C', 'h', 'a', 'i', 'n', '\032', '\030', '\n', '\026', 'G', 'o', 'o', 'g', 'l', 'e', 'L', 'o', +'c', 'a', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\032', '\310', '\002', '\n', '\022', 'C', 'h', 'a', 'n', 'n', 'e', +'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', 'c', '\n', '\017', 's', 's', 'l', '_', 'c', 'r', 'e', 'd', 'e', +'n', 't', 'i', 'a', 'l', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', +'e', 'G', 'r', 'p', 'c', '.', 'S', 's', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'H', '\000', 'R', '\016', 's', +'s', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', '?', '\n', '\016', 'g', 'o', 'o', 'g', 'l', 'e', '_', 'd', +'e', 'f', 'a', 'u', 'l', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\026', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'E', 'm', 'p', 't', 'y', 'H', '\000', 'R', '\r', 'g', 'o', 'o', 'g', 'l', 'e', 'D', 'e', 'f', 'a', +'u', 'l', 't', '\022', 'o', '\n', '\021', 'l', 'o', 'c', 'a', 'l', '_', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030', +'\003', ' ', '\001', '(', '\013', '2', '@', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', +'.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'G', +'o', 'o', 'g', 'l', 'e', 'L', 'o', 'c', 'a', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'H', '\000', 'R', '\020', +'l', 'o', 'c', 'a', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'B', '\033', '\n', '\024', 'c', 'r', 'e', 'd', 'e', +'n', 't', 'i', 'a', 'l', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\032', '\375', '\013', '\n', '\017', +'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', '#', '\n', '\014', 'a', 'c', 'c', 'e', 's', 's', +'_', 't', 'o', 'k', 'e', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\013', 'a', 'c', 'c', 'e', 's', 's', 'T', 'o', 'k', +'e', 'n', '\022', 'L', '\n', '\025', 'g', 'o', 'o', 'g', 'l', 'e', '_', 'c', 'o', 'm', 'p', 'u', 't', 'e', '_', 'e', 'n', 'g', 'i', +'n', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\026', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'E', 'm', 'p', 't', 'y', 'H', '\000', 'R', '\023', 'g', 'o', 'o', 'g', 'l', 'e', 'C', 'o', 'm', 'p', 'u', 't', 'e', 'E', +'n', 'g', 'i', 'n', 'e', '\022', '2', '\n', '\024', 'g', 'o', 'o', 'g', 'l', 'e', '_', 'r', 'e', 'f', 'r', 'e', 's', 'h', '_', 't', +'o', 'k', 'e', 'n', '\030', '\003', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\022', 'g', 'o', 'o', 'g', 'l', 'e', 'R', 'e', 'f', 'r', 'e', +'s', 'h', 'T', 'o', 'k', 'e', 'n', '\022', '\233', '\001', '\n', '\032', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'a', 'c', 'c', 'o', 'u', +'n', 't', '_', 'j', 'w', 't', '_', 'a', 'c', 'c', 'e', 's', 's', '\030', '\004', ' ', '\001', '(', '\013', '2', '\\', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', +'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', +'a', 'l', 's', '.', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'A', 'c', 'c', 'o', 'u', 'n', 't', 'J', 'W', 'T', 'A', 'c', 'c', 'e', +'s', 's', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'H', '\000', 'R', '\027', 's', 'e', 'r', 'v', 'i', 'c', 'e', 'A', +'c', 'c', 'o', 'u', 'n', 't', 'J', 'w', 't', 'A', 'c', 'c', 'e', 's', 's', '\022', 'o', '\n', '\n', 'g', 'o', 'o', 'g', 'l', 'e', +'_', 'i', 'a', 'm', '\030', '\005', ' ', '\001', '(', '\013', '2', 'N', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', +'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'G', 'o', 'o', 'g', 'l', +'e', 'I', 'A', 'M', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'H', '\000', 'R', '\t', 'g', 'o', 'o', 'g', 'l', 'e', +'I', 'a', 'm', '\022', 'z', '\n', '\013', 'f', 'r', 'o', 'm', '_', 'p', 'l', 'u', 'g', 'i', 'n', '\030', '\006', ' ', '\001', '(', '\013', '2', +'W', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', +'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r', 'e', +'d', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', +'a', 'l', 's', 'F', 'r', 'o', 'm', 'P', 'l', 'u', 'g', 'i', 'n', 'H', '\000', 'R', '\n', 'f', 'r', 'o', 'm', 'P', 'l', 'u', 'g', +'i', 'n', '\022', 'g', '\n', '\013', 's', 't', 's', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\007', ' ', '\001', '(', '\013', '2', 'D', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', +'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', +'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'S', 't', 's', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'H', '\000', 'R', '\n', 's', 't', 's', +'S', 'e', 'r', 'v', 'i', 'c', 'e', '\032', 'u', '\n', '\"', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'A', 'c', 'c', 'o', 'u', 'n', 't', +'J', 'W', 'T', 'A', 'c', 'c', 'e', 's', 's', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', '\031', '\n', '\010', 'j', +'s', 'o', 'n', '_', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 'j', 's', 'o', 'n', 'K', 'e', 'y', '\022', '4', '\n', +'\026', 't', 'o', 'k', 'e', 'n', '_', 'l', 'i', 'f', 'e', 't', 'i', 'm', 'e', '_', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030', '\002', +' ', '\001', '(', '\004', 'R', '\024', 't', 'o', 'k', 'e', 'n', 'L', 'i', 'f', 'e', 't', 'i', 'm', 'e', 'S', 'e', 'c', 'o', 'n', 'd', +'s', '\032', 'v', '\n', '\024', 'G', 'o', 'o', 'g', 'l', 'e', 'I', 'A', 'M', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', +'\022', '/', '\n', '\023', 'a', 'u', 't', 'h', 'o', 'r', 'i', 'z', 'a', 't', 'i', 'o', 'n', '_', 't', 'o', 'k', 'e', 'n', '\030', '\001', +' ', '\001', '(', '\t', 'R', '\022', 'a', 'u', 't', 'h', 'o', 'r', 'i', 'z', 'a', 't', 'i', 'o', 'n', 'T', 'o', 'k', 'e', 'n', '\022', +'-', '\n', '\022', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '_', 's', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\030', '\002', ' ', '\001', +'(', '\t', 'R', '\021', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\032', '\264', '\001', '\n', +'\035', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'F', 'r', 'o', 'm', 'P', +'l', 'u', 'g', 'i', 'n', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', +'\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', +'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', +'(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', +'\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', +'t', 'y', 'p', 'e', '\032', '\213', '\003', '\n', '\n', 'S', 't', 's', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', ';', '\n', '\032', 't', 'o', +'k', 'e', 'n', '_', 'e', 'x', 'c', 'h', 'a', 'n', 'g', 'e', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'u', 'r', 'i', '\030', +'\001', ' ', '\001', '(', '\t', 'R', '\027', 't', 'o', 'k', 'e', 'n', 'E', 'x', 'c', 'h', 'a', 'n', 'g', 'e', 'S', 'e', 'r', 'v', 'i', +'c', 'e', 'U', 'r', 'i', '\022', '\032', '\n', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\010', +'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\022', '\032', '\n', '\010', 'a', 'u', 'd', 'i', 'e', 'n', 'c', 'e', '\030', '\003', ' ', '\001', '(', +'\t', 'R', '\010', 'a', 'u', 'd', 'i', 'e', 'n', 'c', 'e', '\022', '\024', '\n', '\005', 's', 'c', 'o', 'p', 'e', '\030', '\004', ' ', '\001', '(', +'\t', 'R', '\005', 's', 'c', 'o', 'p', 'e', '\022', '0', '\n', '\024', 'r', 'e', 'q', 'u', 'e', 's', 't', 'e', 'd', '_', 't', 'o', 'k', +'e', 'n', '_', 't', 'y', 'p', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\022', 'r', 'e', 'q', 'u', 'e', 's', 't', 'e', 'd', 'T', +'o', 'k', 'e', 'n', 'T', 'y', 'p', 'e', '\022', '5', '\n', '\022', 's', 'u', 'b', 'j', 'e', 'c', 't', '_', 't', 'o', 'k', 'e', 'n', +'_', 'p', 'a', 't', 'h', '\030', '\006', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\020', 's', 'u', 'b', +'j', 'e', 'c', 't', 'T', 'o', 'k', 'e', 'n', 'P', 'a', 't', 'h', '\022', '5', '\n', '\022', 's', 'u', 'b', 'j', 'e', 'c', 't', '_', +'t', 'o', 'k', 'e', 'n', '_', 't', 'y', 'p', 'e', '\030', '\007', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', +'R', '\020', 's', 'u', 'b', 'j', 'e', 'c', 't', 'T', 'o', 'k', 'e', 'n', 'T', 'y', 'p', 'e', '\022', '(', '\n', '\020', 'a', 'c', 't', +'o', 'r', '_', 't', 'o', 'k', 'e', 'n', '_', 'p', 'a', 't', 'h', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\016', 'a', 'c', 't', 'o', +'r', 'T', 'o', 'k', 'e', 'n', 'P', 'a', 't', 'h', '\022', '(', '\n', '\020', 'a', 'c', 't', 'o', 'r', '_', 't', 'o', 'k', 'e', 'n', +'_', 't', 'y', 'p', 'e', '\030', '\t', ' ', '\001', '(', '\t', 'R', '\016', 'a', 'c', 't', 'o', 'r', 'T', 'o', 'k', 'e', 'n', 'T', 'y', +'p', 'e', 'B', '\033', '\n', '\024', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', +'r', '\022', '\003', '\370', 'B', '\001', 'B', '\027', '\n', '\020', 't', 'a', 'r', 'g', 'e', 't', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', +'r', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\004', '\020', '\005', 'B', 'Y', '\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', +'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', 'B', '\020', 'G', +'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\026', '\022', '\024', +'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', +'\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[10] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_empty_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_sensitive_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_grpc_service_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/grpc_service.proto", + UPB_STRVIEW_INIT(descriptor, 3336) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h new file mode 100644 index 00000000000..ee27732455b --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.h @@ -0,0 +1,85 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/grpc_service.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_GRPC_SERVICE_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_GRPC_SERVICE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_grpc_service_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_EnvoyGrpc_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.EnvoyGrpc"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_SslCredentials_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc.SslCredentials"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_GoogleLocalCredentials_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc.GoogleLocalCredentials"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_ChannelCredentials_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc.ChannelCredentials"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcService_GoogleGrpc_CallCredentials_StsService_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_grpc_service_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcService.GoogleGrpc.CallCredentials.StsService"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_GRPC_SERVICE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c new file mode 100644 index 00000000000..3387c115109 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c @@ -0,0 +1,212 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/health_check.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/health_check.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_event_service_config_proto_upbdefinit; +extern upb_def_init envoy_type_http_proto_upbdefinit; +extern upb_def_init envoy_type_matcher_string_proto_upbdefinit; +extern upb_def_init envoy_type_range_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_Payload_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit; +extern const upb_msglayout envoy_api_v2_core_HealthCheck_TlsOptions_msginit; + +static const upb_msglayout *layouts[8] = { + &envoy_api_v2_core_HealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_Payload_msginit, + &envoy_api_v2_core_HealthCheck_HttpHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_TcpHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_RedisHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_GrpcHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_CustomHealthCheck_msginit, + &envoy_api_v2_core_HealthCheck_TlsOptions_msginit, +}; + +static const char descriptor[3572] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'h', 'e', 'a', 'l', 't', +'h', '_', 'c', 'h', 'e', 'c', 'k', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'c', 'o', 'r', 'e', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', +'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', ',', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', +'2', '/', 'c', 'o', 'r', 'e', '/', 'e', 'v', 'e', 'n', 't', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'c', 'o', 'n', 'f', +'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\025', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'h', 't', 't', 'p', +'.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', +'r', '/', 's', 't', 'r', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\026', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', +'e', '/', 'r', 'a', 'n', 'g', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', +'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', +'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', +'o', 'n', 's', '/', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', +'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', +'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', +'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\341', '\026', '\n', '\013', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', +'\022', '?', '\n', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\n', '\372', 'B', '\007', '\252', +'\001', '\004', '\010', '\001', '*', '\000', 'R', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'A', '\n', '\010', 'i', 'n', 't', 'e', 'r', 'v', +'a', 'l', '\030', '\002', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\n', '\372', 'B', '\007', '\252', '\001', '\004', '\010', '\001', '*', '\000', 'R', '\010', 'i', +'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', '@', '\n', '\016', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 'j', 'i', 't', 't', 'e', 'r', +'\030', '\024', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\r', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'J', 'i', 't', 't', 'e', 'r', '\022', 'B', +'\n', '\017', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '_', 'j', 'i', 't', 't', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', '\031', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', +'R', '\016', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', 'J', 'i', 't', 't', 'e', 'r', '\022', '6', '\n', '\027', 'i', 'n', 't', 'e', 'r', +'v', 'a', 'l', '_', 'j', 'i', 't', 't', 'e', 'r', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', '\030', '\022', ' ', '\001', '(', '\r', 'R', +'\025', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', 'J', 'i', 't', 't', 'e', 'r', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', 'W', '\n', +'\023', 'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\004', ' ', '\001', '(', +'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', +'2', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\022', 'u', 'n', 'h', 'e', 'a', 'l', 't', +'h', 'y', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', 'S', '\n', '\021', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 't', 'h', +'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', +'\002', '\020', '\001', 'R', '\020', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', '7', '\n', '\010', +'a', 'l', 't', '_', 'p', 'o', 'r', 't', '\030', '\006', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\007', 'a', 'l', 't', 'P', +'o', 'r', 't', '\022', 'E', '\n', '\020', 'r', 'e', 'u', 's', 'e', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '\030', '\007', +' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', +'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\017', 'r', 'e', 'u', 's', 'e', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '\022', +'\\', '\n', '\021', 'h', 't', 't', 'p', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '\030', '\010', ' ', '\001', '(', +'\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', +'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'H', 't', 't', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'H', +'\000', 'R', '\017', 'h', 't', 't', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', 'Y', '\n', '\020', 't', 'c', 'p', +'_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '\030', '\t', ' ', '\001', '(', '\013', '2', '-', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', +'k', '.', 'T', 'c', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'H', '\000', 'R', '\016', 't', 'c', 'p', 'H', 'e', +'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '\\', '\n', '\021', 'g', 'r', 'p', 'c', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', +'c', 'h', 'e', 'c', 'k', '\030', '\013', ' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'G', 'r', 'p', 'c', 'H', 'e', +'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'H', '\000', 'R', '\017', 'g', 'r', 'p', 'c', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', +'e', 'c', 'k', '\022', 'b', '\n', '\023', 'c', 'u', 's', 't', 'o', 'm', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', +'k', '\030', '\r', ' ', '\001', '(', '\013', '2', '0', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'C', 'u', 's', 't', 'o', 'm', 'H', 'e', 'a', 'l', +'t', 'h', 'C', 'h', 'e', 'c', 'k', 'H', '\000', 'R', '\021', 'c', 'u', 's', 't', 'o', 'm', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', +'e', 'c', 'k', '\022', 'S', '\n', '\023', 'n', 'o', '_', 't', 'r', 'a', 'f', 'f', 'i', 'c', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', +'l', '\030', '\014', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\021', 'n', 'o', 'T', 'r', +'a', 'f', 'f', 'i', 'c', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'R', '\n', '\022', 'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', +'y', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\016', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', +'\002', '*', '\000', 'R', '\021', 'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', '[', '\n', +'\027', 'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 'e', 'd', 'g', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', +'\017', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', +'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\025', 'u', 'n', 'h', 'e', 'a', 'l', +'t', 'h', 'y', 'E', 'd', 'g', 'e', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'W', '\n', '\025', 'h', 'e', 'a', 'l', 't', 'h', +'y', '_', 'e', 'd', 'g', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\020', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', +'\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\023', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'E', 'd', 'g', 'e', 'I', 'n', 't', 'e', +'r', 'v', 'a', 'l', '\022', '$', '\n', '\016', 'e', 'v', 'e', 'n', 't', '_', 'l', 'o', 'g', '_', 'p', 'a', 't', 'h', '\030', '\021', ' ', +'\001', '(', '\t', 'R', '\014', 'e', 'v', 'e', 'n', 't', 'L', 'o', 'g', 'P', 'a', 't', 'h', '\022', 'J', '\n', '\r', 'e', 'v', 'e', 'n', +'t', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\026', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'E', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'C', 'o', +'n', 'f', 'i', 'g', 'R', '\014', 'e', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'F', '\n', ' ', 'a', 'l', 'w', +'a', 'y', 's', '_', 'l', 'o', 'g', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '_', 'f', 'a', 'i', 'l', +'u', 'r', 'e', 's', '\030', '\023', ' ', '\001', '(', '\010', 'R', '\034', 'a', 'l', 'w', 'a', 'y', 's', 'L', 'o', 'g', 'H', 'e', 'a', 'l', +'t', 'h', 'C', 'h', 'e', 'c', 'k', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 's', '\022', 'J', '\n', '\013', 't', 'l', 's', '_', 'o', 'p', +'t', 'i', 'o', 'n', 's', '\030', '\025', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'T', 'l', 's', 'O', 'p', 't', +'i', 'o', 'n', 's', 'R', '\n', 't', 'l', 's', 'O', 'p', 't', 'i', 'o', 'n', 's', '\032', 'R', '\n', '\007', 'P', 'a', 'y', 'l', 'o', +'a', 'd', '\022', '\035', '\n', '\004', 't', 'e', 'x', 't', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', +'H', '\000', 'R', '\004', 't', 'e', 'x', 't', '\022', '\030', '\n', '\006', 'b', 'i', 'n', 'a', 'r', 'y', '\030', '\002', ' ', '\001', '(', '\014', 'H', +'\000', 'R', '\006', 'b', 'i', 'n', 'a', 'r', 'y', 'B', '\016', '\n', '\007', 'p', 'a', 'y', 'l', 'o', 'a', 'd', '\022', '\003', '\370', 'B', '\001', +'\032', '\234', '\005', '\n', '\017', 'H', 't', 't', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '\022', '\n', '\004', 'h', +'o', 's', 't', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'h', 'o', 's', 't', '\022', '\033', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\002', +' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', ':', '\n', '\004', 's', 'e', +'n', 'd', '\030', '\003', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'P', 'a', 'y', 'l', 'o', 'a', 'd', 'R', '\004', +'s', 'e', 'n', 'd', '\022', '@', '\n', '\007', 'r', 'e', 'c', 'e', 'i', 'v', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '&', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', +'e', 'c', 'k', '.', 'P', 'a', 'y', 'l', 'o', 'a', 'd', 'R', '\007', 'r', 'e', 'c', 'e', 'i', 'v', 'e', '\022', '%', '\n', '\014', 's', +'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'B', '\002', '\030', '\001', 'R', '\013', 's', 'e', +'r', 'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', '\022', 'd', '\n', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', +'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\006', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', +'t', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', +'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', '9', '\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', +'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\010', ' ', '\003', '(', '\t', 'R', '\026', 'r', 'e', +'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', '%', '\n', '\t', 'u', +'s', 'e', '_', 'h', 't', 't', 'p', '2', '\030', '\007', ' ', '\001', '(', '\010', 'B', '\010', '\030', '\001', '\270', '\356', '\362', '\322', '\005', '\001', 'R', +'\010', 'u', 's', 'e', 'H', 't', 't', 'p', '2', '\022', 'C', '\n', '\021', 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd', '_', 's', 't', 'a', +'t', 'u', 's', 'e', 's', '\030', '\t', ' ', '\003', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', +'I', 'n', 't', '6', '4', 'R', 'a', 'n', 'g', 'e', 'R', '\020', 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd', 'S', 't', 'a', 't', 'u', +'s', 'e', 's', '\022', 'Q', '\n', '\021', 'c', 'o', 'd', 'e', 'c', '_', 'c', 'l', 'i', 'e', 'n', 't', '_', 't', 'y', 'p', 'e', '\030', +'\n', ' ', '\001', '(', '\016', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'C', 'o', 'd', 'e', 'c', 'C', +'l', 'i', 'e', 'n', 't', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\017', 'c', 'o', 'd', 'e', +'c', 'C', 'l', 'i', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\022', 'S', '\n', '\024', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', +'m', 'e', '_', 'm', 'a', 't', 'c', 'h', 'e', 'r', '\030', '\013', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', +'t', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', +'r', 'R', '\022', 's', 'e', 'r', 'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\032', '\216', '\001', '\n', +'\016', 'T', 'c', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', ':', '\n', '\004', 's', 'e', 'n', 'd', '\030', '\001', +' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'P', 'a', 'y', 'l', 'o', 'a', 'd', 'R', '\004', 's', 'e', 'n', 'd', +'\022', '@', '\n', '\007', 'r', 'e', 'c', 'e', 'i', 'v', 'e', '\030', '\002', ' ', '\003', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', +'P', 'a', 'y', 'l', 'o', 'a', 'd', 'R', '\007', 'r', 'e', 'c', 'e', 'i', 'v', 'e', '\032', '$', '\n', '\020', 'R', 'e', 'd', 'i', 's', +'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', +'\003', 'k', 'e', 'y', '\032', 'R', '\n', '\017', 'G', 'r', 'p', 'c', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '!', +'\n', '\014', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 's', 'e', 'r', +'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', '\022', '\034', '\n', '\t', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '\030', '\002', ' ', '\001', +'(', '\t', 'R', '\t', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '\032', '\261', '\001', '\n', '\021', 'C', 'u', 's', 't', 'o', 'm', 'H', +'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', +'\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', +'\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', +'t', 'r', 'u', 'c', 't', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', +'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', +'f', 'i', 'g', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', '\032', '3', '\n', '\n', 'T', 'l', 's', +'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\016', 'a', 'l', 'p', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', +'\030', '\001', ' ', '\003', '(', '\t', 'R', '\r', 'a', 'l', 'p', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', 'B', '\025', '\n', '\016', +'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\n', '\020', '\013', +'*', '`', '\n', '\014', 'H', 'e', 'a', 'l', 't', 'h', 'S', 't', 'a', 't', 'u', 's', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', +'W', 'N', '\020', '\000', '\022', '\013', '\n', '\007', 'H', 'E', 'A', 'L', 'T', 'H', 'Y', '\020', '\001', '\022', '\r', '\n', '\t', 'U', 'N', 'H', 'E', +'A', 'L', 'T', 'H', 'Y', '\020', '\002', '\022', '\014', '\n', '\010', 'D', 'R', 'A', 'I', 'N', 'I', 'N', 'G', '\020', '\003', '\022', '\013', '\n', '\007', +'T', 'I', 'M', 'E', 'O', 'U', 'T', '\020', '\004', '\022', '\014', '\n', '\010', 'D', 'E', 'G', 'R', 'A', 'D', 'E', 'D', '\020', '\005', 'B', 'Y', +'\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'c', 'o', 'r', 'e', 'B', '\020', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'P', 'r', 'o', 't', +'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\026', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', +'o', 'r', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[14] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_api_v2_core_event_service_config_proto_upbdefinit, + &envoy_type_http_proto_upbdefinit, + &envoy_type_matcher_string_proto_upbdefinit, + &envoy_type_range_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &envoy_annotations_deprecation_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_health_check_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/health_check.proto", + UPB_STRVIEW_INIT(descriptor, 3572) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h new file mode 100644 index 00000000000..592ddda87c3 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.h @@ -0,0 +1,70 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/health_check.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_HEALTH_CHECK_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_HEALTH_CHECK_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_health_check_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HealthCheck_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_health_check_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HealthCheck"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HealthCheck_Payload_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_health_check_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HealthCheck.Payload"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HealthCheck_HttpHealthCheck_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_health_check_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HealthCheck.HttpHealthCheck"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HealthCheck_TcpHealthCheck_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_health_check_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HealthCheck.TcpHealthCheck"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HealthCheck_RedisHealthCheck_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_health_check_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HealthCheck.RedisHealthCheck"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HealthCheck_GrpcHealthCheck_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_health_check_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HealthCheck.GrpcHealthCheck"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HealthCheck_CustomHealthCheck_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_health_check_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HealthCheck.CustomHealthCheck"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HealthCheck_TlsOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_health_check_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HealthCheck.TlsOptions"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_HEALTH_CHECK_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c new file mode 100644 index 00000000000..505fc69e5b4 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c @@ -0,0 +1,55 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/http_uri.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/http_uri.upbdefs.h" + +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_HttpUri_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_core_HttpUri_msginit, +}; + +static const char descriptor[436] = {'\n', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'h', 't', 't', 'p', '_', +'u', 'r', 'i', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', +'t', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', +'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', +'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', +'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\245', +'\001', '\n', '\007', 'H', 't', 't', 'p', 'U', 'r', 'i', '\022', '\031', '\n', '\003', 'u', 'r', 'i', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', +'\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\003', 'u', 'r', 'i', '\022', '#', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\002', +' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'H', '\000', 'R', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\022', +'?', '\n', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\n', '\372', 'B', '\007', '\252', '\001', +'\004', '\010', '\001', '2', '\000', 'R', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', 'B', '\031', '\n', '\022', 'h', 't', 't', 'p', '_', 'u', 'p', +'s', 't', 'r', 'e', 'a', 'm', '_', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', 'B', 'U', '\n', '\037', 'i', 'o', '.', 'e', 'n', +'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', +'e', 'B', '\014', 'H', 't', 't', 'p', 'U', 'r', 'i', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\026', '\022', '\024', +'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', +'\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[5] = { + &google_protobuf_duration_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_http_uri_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/http_uri.proto", + UPB_STRVIEW_INIT(descriptor, 436) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h new file mode 100644 index 00000000000..c0cafdfd613 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/http_uri.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_http_uri_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HttpUri_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_http_uri_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HttpUri"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_HTTP_URI_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c new file mode 100644 index 00000000000..46f0a9e43d5 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c @@ -0,0 +1,178 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/protocol.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/protocol.upbdefs.h" + +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_TcpProtocolOptions_msginit; +extern const upb_msglayout envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit; +extern const upb_msglayout envoy_api_v2_core_HttpProtocolOptions_msginit; +extern const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_msginit; +extern const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit; +extern const upb_msglayout envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit; +extern const upb_msglayout envoy_api_v2_core_Http2ProtocolOptions_msginit; +extern const upb_msglayout envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_msginit; +extern const upb_msglayout envoy_api_v2_core_GrpcProtocolOptions_msginit; + +static const upb_msglayout *layouts[9] = { + &envoy_api_v2_core_TcpProtocolOptions_msginit, + &envoy_api_v2_core_UpstreamHttpProtocolOptions_msginit, + &envoy_api_v2_core_HttpProtocolOptions_msginit, + &envoy_api_v2_core_Http1ProtocolOptions_msginit, + &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_msginit, + &envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, + &envoy_api_v2_core_Http2ProtocolOptions_msginit, + &envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_msginit, + &envoy_api_v2_core_GrpcProtocolOptions_msginit, +}; + +static const char descriptor[3062] = {'\n', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'p', 'r', 'o', 't', 'o', +'c', 'o', 'l', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', +'t', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', +'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', +'\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', +'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', +'p', 'r', 'o', 't', 'o', '\"', '\024', '\n', '\022', 'T', 'c', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', +'n', 's', '\"', 'h', '\n', '\033', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', +'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '\031', '\n', '\010', 'a', 'u', 't', 'o', '_', 's', 'n', 'i', '\030', '\001', ' ', '\001', '(', +'\010', 'R', '\007', 'a', 'u', 't', 'o', 'S', 'n', 'i', '\022', '.', '\n', '\023', 'a', 'u', 't', 'o', '_', 's', 'a', 'n', '_', 'v', 'a', +'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\021', 'a', 'u', 't', 'o', 'S', 'a', 'n', 'V', 'a', +'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '\"', '\241', '\004', '\n', '\023', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', +'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '<', '\n', '\014', 'i', 'd', 'l', 'e', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\001', +' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', +'r', 'a', 't', 'i', 'o', 'n', 'R', '\013', 'i', 'd', 'l', 'e', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'Q', '\n', '\027', 'm', 'a', +'x', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\001', +'(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', +'t', 'i', 'o', 'n', 'R', '\025', 'm', 'a', 'x', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'D', 'u', 'r', 'a', 't', 'i', +'o', 'n', '\022', 'Q', '\n', '\021', 'm', 'a', 'x', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 'c', 'o', 'u', 'n', 't', '\030', '\002', +' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', +'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\017', 'm', 'a', 'x', 'H', 'e', +'a', 'd', 'e', 'r', 's', 'C', 'o', 'u', 'n', 't', '\022', 'I', '\n', '\023', 'm', 'a', 'x', '_', 's', 't', 'r', 'e', 'a', 'm', '_', +'d', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030', '\004', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\021', 'm', 'a', 'x', 'S', 't', 'r', 'e', +'a', 'm', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '\212', '\001', '\n', '\037', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 'w', 'i', +'t', 'h', '_', 'u', 'n', 'd', 'e', 'r', 's', 'c', 'o', 'r', 'e', 's', '_', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\005', ' ', '\001', +'(', '\016', '2', 'C', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', +'t', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'H', 'e', 'a', 'd', 'e', 'r', 's', +'W', 'i', 't', 'h', 'U', 'n', 'd', 'e', 'r', 's', 'c', 'o', 'r', 'e', 's', 'A', 'c', 't', 'i', 'o', 'n', 'R', '\034', 'h', 'e', +'a', 'd', 'e', 'r', 's', 'W', 'i', 't', 'h', 'U', 'n', 'd', 'e', 'r', 's', 'c', 'o', 'r', 'e', 's', 'A', 'c', 't', 'i', 'o', +'n', '\"', 'N', '\n', '\034', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'W', 'i', 't', 'h', 'U', 'n', 'd', 'e', 'r', 's', 'c', 'o', 'r', +'e', 's', 'A', 'c', 't', 'i', 'o', 'n', '\022', '\t', '\n', '\005', 'A', 'L', 'L', 'O', 'W', '\020', '\000', '\022', '\022', '\n', '\016', 'R', 'E', +'J', 'E', 'C', 'T', '_', 'R', 'E', 'Q', 'U', 'E', 'S', 'T', '\020', '\001', '\022', '\017', '\n', '\013', 'D', 'R', 'O', 'P', '_', 'H', 'E', +'A', 'D', 'E', 'R', '\020', '\002', '\"', '\200', '\004', '\n', '\024', 'H', 't', 't', 'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', +'p', 't', 'i', 'o', 'n', 's', '\022', 'H', '\n', '\022', 'a', 'l', 'l', 'o', 'w', '_', 'a', 'b', 's', 'o', 'l', 'u', 't', 'e', '_', +'u', 'r', 'l', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\020', 'a', 'l', 'l', 'o', 'w', 'A', 'b', 's', 'o', 'l', 'u', +'t', 'e', 'U', 'r', 'l', '\022', '$', '\n', '\016', 'a', 'c', 'c', 'e', 'p', 't', '_', 'h', 't', 't', 'p', '_', '1', '0', '\030', '\002', +' ', '\001', '(', '\010', 'R', '\014', 'a', 'c', 'c', 'e', 'p', 't', 'H', 't', 't', 'p', '1', '0', '\022', '6', '\n', '\030', 'd', 'e', 'f', +'a', 'u', 'l', 't', '_', 'h', 'o', 's', 't', '_', 'f', 'o', 'r', '_', 'h', 't', 't', 'p', '_', '1', '0', '\030', '\003', ' ', '\001', +'(', '\t', 'R', '\024', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'H', 'o', 's', 't', 'F', 'o', 'r', 'H', 't', 't', 'p', '1', '0', '\022', +'c', '\n', '\021', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'k', 'e', 'y', '_', 'f', 'o', 'r', 'm', 'a', 't', '\030', '\004', ' ', '\001', '(', +'\013', '2', '7', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', +'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'K', +'e', 'y', 'F', 'o', 'r', 'm', 'a', 't', 'R', '\017', 'h', 'e', 'a', 'd', 'e', 'r', 'K', 'e', 'y', 'F', 'o', 'r', 'm', 'a', 't', +'\022', '\'', '\n', '\017', 'e', 'n', 'a', 'b', 'l', 'e', '_', 't', 'r', 'a', 'i', 'l', 'e', 'r', 's', '\030', '\005', ' ', '\001', '(', '\010', +'R', '\016', 'e', 'n', 'a', 'b', 'l', 'e', 'T', 'r', 'a', 'i', 'l', 'e', 'r', 's', '\032', '\261', '\001', '\n', '\017', 'H', 'e', 'a', 'd', +'e', 'r', 'K', 'e', 'y', 'F', 'o', 'r', 'm', 'a', 't', '\022', 'u', '\n', '\021', 'p', 'r', 'o', 'p', 'e', 'r', '_', 'c', 'a', 's', +'e', '_', 'w', 'o', 'r', 'd', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', 'G', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', +'i', 'o', 'n', 's', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'K', 'e', 'y', 'F', 'o', 'r', 'm', 'a', 't', '.', 'P', 'r', 'o', 'p', +'e', 'r', 'C', 'a', 's', 'e', 'W', 'o', 'r', 'd', 's', 'H', '\000', 'R', '\017', 'p', 'r', 'o', 'p', 'e', 'r', 'C', 'a', 's', 'e', +'W', 'o', 'r', 'd', 's', '\032', '\021', '\n', '\017', 'P', 'r', 'o', 'p', 'e', 'r', 'C', 'a', 's', 'e', 'W', 'o', 'r', 'd', 's', 'B', +'\024', '\n', '\r', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'f', 'o', 'r', 'm', 'a', 't', '\022', '\003', '\370', 'B', '\001', '\"', '\251', '\013', '\n', +'\024', 'H', 't', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'F', '\n', '\020', +'h', 'p', 'a', 'c', 'k', '_', 't', 'a', 'b', 'l', 'e', '_', 's', 'i', 'z', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', +'u', 'e', 'R', '\016', 'h', 'p', 'a', 'c', 'k', 'T', 'a', 'b', 'l', 'e', 'S', 'i', 'z', 'e', '\022', 'a', '\n', '\026', 'm', 'a', 'x', +'_', 'c', 'o', 'n', 'c', 'u', 'r', 'r', 'e', 'n', 't', '_', 's', 't', 'r', 'e', 'a', 'm', 's', '\030', '\002', ' ', '\001', '(', '\013', +'2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', +'V', 'a', 'l', 'u', 'e', 'B', '\r', '\372', 'B', '\n', '*', '\010', '\030', '\377', '\377', '\377', '\377', '\007', '(', '\001', 'R', '\024', 'm', 'a', 'x', +'C', 'o', 'n', 'c', 'u', 'r', 'r', 'e', 'n', 't', 'S', 't', 'r', 'e', 'a', 'm', 's', '\022', 'j', '\n', '\032', 'i', 'n', 'i', 't', +'i', 'a', 'l', '_', 's', 't', 'r', 'e', 'a', 'm', '_', 'w', 'i', 'n', 'd', 'o', 'w', '_', 's', 'i', 'z', 'e', '\030', '\003', ' ', +'\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', +'t', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\017', '\372', 'B', '\014', '*', '\n', '\030', '\377', '\377', '\377', '\377', '\007', '(', '\377', '\377', '\003', +'R', '\027', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'S', 't', 'r', 'e', 'a', 'm', 'W', 'i', 'n', 'd', 'o', 'w', 'S', 'i', 'z', 'e', +'\022', 'r', '\n', '\036', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'w', 'i', +'n', 'd', 'o', 'w', '_', 's', 'i', 'z', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\017', '\372', 'B', '\014', +'*', '\n', '\030', '\377', '\377', '\377', '\377', '\007', '(', '\377', '\377', '\003', 'R', '\033', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'C', 'o', 'n', 'n', +'e', 'c', 't', 'i', 'o', 'n', 'W', 'i', 'n', 'd', 'o', 'w', 'S', 'i', 'z', 'e', '\022', '#', '\n', '\r', 'a', 'l', 'l', 'o', 'w', +'_', 'c', 'o', 'n', 'n', 'e', 'c', 't', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\014', 'a', 'l', 'l', 'o', 'w', 'C', 'o', 'n', 'n', +'e', 'c', 't', '\022', '%', '\n', '\016', 'a', 'l', 'l', 'o', 'w', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\006', ' ', '\001', +'(', '\010', 'R', '\r', 'a', 'l', 'l', 'o', 'w', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', 'U', '\n', '\023', 'm', 'a', 'x', '_', +'o', 'u', 't', 'b', 'o', 'u', 'n', 'd', '_', 'f', 'r', 'a', 'm', 'e', 's', '\030', '\007', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', +'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\021', 'm', 'a', 'x', 'O', 'u', 't', 'b', 'o', 'u', 'n', 'd', 'F', 'r', +'a', 'm', 'e', 's', '\022', 'd', '\n', '\033', 'm', 'a', 'x', '_', 'o', 'u', 't', 'b', 'o', 'u', 'n', 'd', '_', 'c', 'o', 'n', 't', +'r', 'o', 'l', '_', 'f', 'r', 'a', 'm', 'e', 's', '\030', '\010', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', +'\004', '*', '\002', '(', '\001', 'R', '\030', 'm', 'a', 'x', 'O', 'u', 't', 'b', 'o', 'u', 'n', 'd', 'C', 'o', 'n', 't', 'r', 'o', 'l', +'F', 'r', 'a', 'm', 'e', 's', '\022', '\204', '\001', '\n', '1', 'm', 'a', 'x', '_', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', +'e', '_', 'i', 'n', 'b', 'o', 'u', 'n', 'd', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'w', 'i', 't', 'h', '_', 'e', 'm', 'p', +'t', 'y', '_', 'p', 'a', 'y', 'l', 'o', 'a', 'd', '\030', '\t', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '+', 'm', 'a', +'x', 'C', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', 'I', 'n', 'b', 'o', 'u', 'n', 'd', 'F', 'r', 'a', 'm', 'e', 's', +'W', 'i', 't', 'h', 'E', 'm', 'p', 't', 'y', 'P', 'a', 'y', 'l', 'o', 'a', 'd', '\022', 'o', '\n', '&', 'm', 'a', 'x', '_', 'i', +'n', 'b', 'o', 'u', 'n', 'd', '_', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'p', 'e', +'r', '_', 's', 't', 'r', 'e', 'a', 'm', '\030', '\n', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '!', 'm', 'a', 'x', 'I', +'n', 'b', 'o', 'u', 'n', 'd', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', 'F', 'r', 'a', 'm', 'e', 's', 'P', 'e', 'r', 'S', 't', +'r', 'e', 'a', 'm', '\022', '\221', '\001', '\n', '4', 'm', 'a', 'x', '_', 'i', 'n', 'b', 'o', 'u', 'n', 'd', '_', 'w', 'i', 'n', 'd', +'o', 'w', '_', 'u', 'p', 'd', 'a', 't', 'e', '_', 'f', 'r', 'a', 'm', 'e', 's', '_', 'p', 'e', 'r', '_', 'd', 'a', 't', 'a', +'_', 'f', 'r', 'a', 'm', 'e', '_', 's', 'e', 'n', 't', '\030', '\013', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', +'B', '\004', '*', '\002', '(', '\001', 'R', ',', 'm', 'a', 'x', 'I', 'n', 'b', 'o', 'u', 'n', 'd', 'W', 'i', 'n', 'd', 'o', 'w', 'U', +'p', 'd', 'a', 't', 'e', 'F', 'r', 'a', 'm', 'e', 's', 'P', 'e', 'r', 'D', 'a', 't', 'a', 'F', 'r', 'a', 'm', 'e', 'S', 'e', +'n', 't', '\022', 'Q', '\n', '&', 's', 't', 'r', 'e', 'a', 'm', '_', 'e', 'r', 'r', 'o', 'r', '_', 'o', 'n', '_', 'i', 'n', 'v', +'a', 'l', 'i', 'd', '_', 'h', 't', 't', 'p', '_', 'm', 'e', 's', 's', 'a', 'g', 'i', 'n', 'g', '\030', '\014', ' ', '\001', '(', '\010', +'R', '!', 's', 't', 'r', 'e', 'a', 'm', 'E', 'r', 'r', 'o', 'r', 'O', 'n', 'I', 'n', 'v', 'a', 'l', 'i', 'd', 'H', 't', 't', +'p', 'M', 'e', 's', 's', 'a', 'g', 'i', 'n', 'g', '\022', 'w', '\n', '\032', 'c', 'u', 's', 't', 'o', 'm', '_', 's', 'e', 't', 't', +'i', 'n', 'g', 's', '_', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\030', '\r', ' ', '\003', '(', '\013', '2', '9', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', '2', 'P', 'r', 'o', +'t', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'P', 'a', 'r', 'a', +'m', 'e', 't', 'e', 'r', 'R', '\030', 'c', 'u', 's', 't', 'o', 'm', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'P', 'a', 'r', 'a', +'m', 'e', 't', 'e', 'r', 's', '\032', '\244', '\001', '\n', '\021', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'P', 'a', 'r', 'a', 'm', 'e', +'t', 'e', 'r', '\022', 'Q', '\n', '\n', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', +'l', 'u', 'e', 'B', '\023', '\372', 'B', '\010', '*', '\006', '\030', '\200', '\200', '\004', '(', '\001', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', +'\n', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '\022', '<', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', +'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', +'2', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', 't', +'\n', '\023', 'G', 'r', 'p', 'c', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', ']', '\n', '\026', +'h', 't', 't', 'p', '2', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\001', ' ', +'\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', +'t', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\024', 'h', 't', 't', 'p', +'2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'B', 'V', '\n', '\037', 'i', 'o', '.', 'e', 'n', +'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', +'e', 'B', '\r', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\026', '\022', +'\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', +'\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[6] = { + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_protocol_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/protocol.proto", + UPB_STRVIEW_INIT(descriptor, 3062) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h new file mode 100644 index 00000000000..d5481da6a39 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.h @@ -0,0 +1,75 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/protocol.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_PROTOCOL_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_PROTOCOL_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_protocol_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_TcpProtocolOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.TcpProtocolOptions"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_UpstreamHttpProtocolOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.UpstreamHttpProtocolOptions"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_HttpProtocolOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.HttpProtocolOptions"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Http1ProtocolOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Http1ProtocolOptions"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Http2ProtocolOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Http2ProtocolOptions"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_Http2ProtocolOptions_SettingsParameter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.Http2ProtocolOptions.SettingsParameter"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_GrpcProtocolOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_protocol_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.GrpcProtocolOptions"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_PROTOCOL_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c new file mode 100644 index 00000000000..11f6ee249f7 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c @@ -0,0 +1,58 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/socket_option.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/core/socket_option.upbdefs.h" + +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_core_SocketOption_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_core_SocketOption_msginit, +}; + +static const char descriptor[564] = {'\n', '%', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 's', 'o', 'c', 'k', 'e', +'t', '_', 'o', 'p', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', +'s', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', +'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', +'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\273', '\002', '\n', +'\014', 'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', '\022', ' ', '\n', '\013', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', +'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', '\022', '\024', '\n', +'\005', 'l', 'e', 'v', 'e', 'l', '\030', '\002', ' ', '\001', '(', '\003', 'R', '\005', 'l', 'e', 'v', 'e', 'l', '\022', '\022', '\n', '\004', 'n', 'a', +'m', 'e', '\030', '\003', ' ', '\001', '(', '\003', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\035', '\n', '\t', 'i', 'n', 't', '_', 'v', 'a', 'l', +'u', 'e', '\030', '\004', ' ', '\001', '(', '\003', 'H', '\000', 'R', '\010', 'i', 'n', 't', 'V', 'a', 'l', 'u', 'e', '\022', '\035', '\n', '\t', 'b', +'u', 'f', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\005', ' ', '\001', '(', '\014', 'H', '\000', 'R', '\010', 'b', 'u', 'f', 'V', 'a', 'l', 'u', +'e', '\022', 'K', '\n', '\005', 's', 't', 'a', 't', 'e', '\030', '\006', ' ', '\001', '(', '\016', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', '.', +'S', 'o', 'c', 'k', 'e', 't', 'S', 't', 'a', 't', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\005', 's', 't', +'a', 't', 'e', '\"', 'F', '\n', '\013', 'S', 'o', 'c', 'k', 'e', 't', 'S', 't', 'a', 't', 'e', '\022', '\021', '\n', '\r', 'S', 'T', 'A', +'T', 'E', '_', 'P', 'R', 'E', 'B', 'I', 'N', 'D', '\020', '\000', '\022', '\017', '\n', '\013', 'S', 'T', 'A', 'T', 'E', '_', 'B', 'O', 'U', +'N', 'D', '\020', '\001', '\022', '\023', '\n', '\017', 'S', 'T', 'A', 'T', 'E', '_', 'L', 'I', 'S', 'T', 'E', 'N', 'I', 'N', 'G', '\020', '\002', +'B', '\014', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\022', '\003', '\370', 'B', '\001', 'B', 'Z', '\n', '\037', 'i', 'o', '.', 'e', 'n', 'v', 'o', +'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', 'B', +'\021', 'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', +'\026', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\272', '\200', +'\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[4] = { + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_core_socket_option_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/core/socket_option.proto", + UPB_STRVIEW_INIT(descriptor, 564) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h new file mode 100644 index 00000000000..85d3cbeb01c --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/core/socket_option.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_CORE_SOCKET_OPTION_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_CORE_SOCKET_OPTION_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_core_socket_option_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_core_SocketOption_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_core_socket_option_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.core.SocketOption"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_CORE_SOCKET_OPTION_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c new file mode 100644 index 00000000000..6127a575282 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c @@ -0,0 +1,116 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/discovery.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/discovery.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_rpc_status_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_DiscoveryRequest_msginit; +extern const upb_msglayout envoy_api_v2_DiscoveryResponse_msginit; +extern const upb_msglayout envoy_api_v2_DeltaDiscoveryRequest_msginit; +extern const upb_msglayout envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit; +extern const upb_msglayout envoy_api_v2_DeltaDiscoveryResponse_msginit; +extern const upb_msglayout envoy_api_v2_Resource_msginit; + +static const upb_msglayout *layouts[6] = { + &envoy_api_v2_DiscoveryRequest_msginit, + &envoy_api_v2_DiscoveryResponse_msginit, + &envoy_api_v2_DeltaDiscoveryRequest_msginit, + &envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit, + &envoy_api_v2_DeltaDiscoveryResponse_msginit, + &envoy_api_v2_Resource_msginit, +}; + +static const char descriptor[1672] = {'\n', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', +'p', 'r', 'o', 't', 'o', '\022', '\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', +'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', +'\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', +'o', '\032', '\027', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'r', 'p', 'c', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', +'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', +'t', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', +'s', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\"', '\202', '\002', '\n', '\020', 'D', 'i', 's', 'c', 'o', 'v', +'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', +'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '+', '\n', '\004', 'n', +'o', 'd', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'o', 'r', 'e', '.', 'N', 'o', 'd', 'e', 'R', '\004', 'n', 'o', 'd', 'e', '\022', '%', '\n', '\016', 'r', 'e', 's', 'o', 'u', 'r', +'c', 'e', '_', 'n', 'a', 'm', 'e', 's', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\r', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'N', +'a', 'm', 'e', 's', '\022', '\031', '\n', '\010', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\007', 't', +'y', 'p', 'e', 'U', 'r', 'l', '\022', '%', '\n', '\016', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'n', 'o', 'n', 'c', 'e', '\030', +'\005', ' ', '\001', '(', '\t', 'R', '\r', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'N', 'o', 'n', 'c', 'e', '\022', '5', '\n', '\014', 'e', +'r', 'r', 'o', 'r', '_', 'd', 'e', 't', 'a', 'i', 'l', '\030', '\006', ' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'r', 'p', 'c', '.', 'S', 't', 'a', 't', 'u', 's', 'R', '\013', 'e', 'r', 'r', 'o', 'r', 'D', 'e', 't', 'a', 'i', 'l', +'\"', '\371', '\001', '\n', '\021', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', '!', '\n', +'\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'v', 'e', 'r', 's', +'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '2', '\n', '\t', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\030', '\002', ' ', '\003', '(', +'\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\t', +'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '\026', '\n', '\006', 'c', 'a', 'n', 'a', 'r', 'y', '\030', '\003', ' ', '\001', '(', '\010', +'R', '\006', 'c', 'a', 'n', 'a', 'r', 'y', '\022', '\031', '\n', '\010', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\004', ' ', '\001', '(', +'\t', 'R', '\007', 't', 'y', 'p', 'e', 'U', 'r', 'l', '\022', '\024', '\n', '\005', 'n', 'o', 'n', 'c', 'e', '\030', '\005', ' ', '\001', '(', '\t', +'R', '\005', 'n', 'o', 'n', 'c', 'e', '\022', 'D', '\n', '\r', 'c', 'o', 'n', 't', 'r', 'o', 'l', '_', 'p', 'l', 'a', 'n', 'e', '\030', +'\006', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', +'.', 'C', 'o', 'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', 'n', 'e', 'R', '\014', 'c', 'o', 'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', +'n', 'e', '\"', '\377', '\003', '\n', '\025', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', +'e', 's', 't', '\022', '+', '\n', '\004', 'n', 'o', 'd', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\027', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'N', 'o', 'd', 'e', 'R', '\004', 'n', 'o', 'd', 'e', '\022', '\031', +'\n', '\010', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e', 'U', 'r', 'l', +'\022', '8', '\n', '\030', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'n', 'a', 'm', 'e', 's', '_', 's', 'u', 'b', 's', 'c', 'r', +'i', 'b', 'e', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\026', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'N', 'a', 'm', 'e', 's', 'S', +'u', 'b', 's', 'c', 'r', 'i', 'b', 'e', '\022', '<', '\n', '\032', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'n', 'a', 'm', 'e', +'s', '_', 'u', 'n', 's', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e', '\030', '\004', ' ', '\003', '(', '\t', 'R', '\030', 'r', 'e', 's', 'o', +'u', 'r', 'c', 'e', 'N', 'a', 'm', 'e', 's', 'U', 'n', 's', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e', '\022', '|', '\n', '\031', 'i', +'n', 'i', 't', 'i', 'a', 'l', '_', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', 's', '\030', +'\005', ' ', '\003', '(', '\013', '2', '@', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', +'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '.', 'I', 'n', 'i', 't', 'i', 'a', 'l', +'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', 'E', 'n', 't', 'r', 'y', 'R', '\027', 'i', 'n', +'i', 't', 'i', 'a', 'l', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '\022', '%', '\n', '\016', +'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'n', 'o', 'n', 'c', 'e', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\r', 'r', 'e', 's', +'p', 'o', 'n', 's', 'e', 'N', 'o', 'n', 'c', 'e', '\022', '5', '\n', '\014', 'e', 'r', 'r', 'o', 'r', '_', 'd', 'e', 't', 'a', 'i', +'l', '\030', '\007', ' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'r', 'p', 'c', '.', 'S', 't', 'a', 't', +'u', 's', 'R', '\013', 'e', 'r', 'r', 'o', 'r', 'D', 'e', 't', 'a', 'i', 'l', '\032', 'J', '\n', '\034', 'I', 'n', 'i', 't', 'i', 'a', +'l', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', +'\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', +'\002', ' ', '\001', '(', '\t', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', '\334', '\001', '\n', '\026', 'D', 'e', 'l', 't', +'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', '.', '\n', '\023', 's', 'y', 's', +'t', 'e', 'm', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\021', 's', +'y', 's', 't', 'e', 'm', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '4', '\n', '\t', 'r', 'e', 's', 'o', 'u', +'r', 'c', 'e', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '\031', '\n', '\010', 't', +'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e', 'U', 'r', 'l', '\022', '+', '\n', +'\021', 'r', 'e', 'm', 'o', 'v', 'e', 'd', '_', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\030', '\006', ' ', '\003', '(', '\t', 'R', +'\020', 'r', 'e', 'm', 'o', 'v', 'e', 'd', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '\024', '\n', '\005', 'n', 'o', 'n', 'c', +'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\005', 'n', 'o', 'n', 'c', 'e', '\"', '\204', '\001', '\n', '\010', 'R', 'e', 's', 'o', 'u', 'r', +'c', 'e', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\030', '\n', +'\007', 'a', 'l', 'i', 'a', 's', 'e', 's', '\030', '\004', ' ', '\003', '(', '\t', 'R', '\007', 'a', 'l', 'i', 'a', 's', 'e', 's', '\022', '\030', +'\n', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\022', +'0', '\n', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'B', +'X', '\n', '\032', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', 'B', '\016', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', +'\217', '\005', '\034', '\022', '\032', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', +'e', 'r', 'y', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[6] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_rpc_status_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_discovery_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/discovery.proto", + UPB_STRVIEW_INIT(descriptor, 1672) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h new file mode 100644 index 00000000000..7938948b4f4 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.h @@ -0,0 +1,60 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/discovery.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_DISCOVERY_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_DISCOVERY_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_discovery_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_DiscoveryRequest_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_discovery_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.DiscoveryRequest"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_DiscoveryResponse_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_discovery_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.DiscoveryResponse"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_DeltaDiscoveryRequest_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_discovery_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.DeltaDiscoveryRequest"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_DeltaDiscoveryRequest_InitialResourceVersionsEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_discovery_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.DeltaDiscoveryRequest.InitialResourceVersionsEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_DeltaDiscoveryResponse_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_discovery_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.DeltaDiscoveryResponse"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Resource_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_discovery_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Resource"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_DISCOVERY_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c new file mode 100644 index 00000000000..b082f61f268 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c @@ -0,0 +1,80 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/eds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/eds.upbdefs.h" + +extern upb_def_init envoy_api_v2_discovery_proto_upbdefinit; +extern upb_def_init google_api_annotations_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init envoy_annotations_resource_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern upb_def_init envoy_api_v2_endpoint_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_EdsDummy_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_EdsDummy_msginit, +}; + +static const char descriptor[808] = {'\n', '\026', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', +'\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', +'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', +'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', +'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', +'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', +'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', +'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', +'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', +'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', +'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\"', '\n', '\n', '\010', 'E', 'd', 's', 'D', 'u', 'm', 'm', 'y', +'2', '\200', '\003', '\n', '\030', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', +'v', 'i', 'c', 'e', '\022', 'X', '\n', '\017', 'S', 't', 'r', 'e', 'a', 'm', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', '\036', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', +'q', 'u', 'e', 's', 't', '\032', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', +'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', 'a', '\n', '\016', 'D', 'e', +'l', 't', 'a', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', +'$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', +'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', '{', '\n', '\016', 'F', 'e', 't', +'c', 'h', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '\037', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', +'e', '\"', '(', '\202', '\323', '\344', '\223', '\002', '\031', '\"', '\027', '/', 'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', ':', +'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\202', '\323', '\344', '\223', '\002', '\003', ':', '\001', '*', '\032', '*', '\212', '\244', '\226', '\363', '\007', +'$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', +'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', 'B', 'T', '\n', '\032', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', +'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', 'B', '\010', 'E', 'd', 's', 'P', 'r', 'o', +'t', 'o', 'P', '\001', '\210', '\001', '\001', '\362', '\230', '\376', '\217', '\005', '\033', '\022', '\031', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', +'i', 'c', 'e', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'P', '\010', +'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[10] = { + &envoy_api_v2_discovery_proto_upbdefinit, + &google_api_annotations_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &envoy_annotations_resource_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + &envoy_api_v2_endpoint_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_eds_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/eds.proto", + UPB_STRVIEW_INIT(descriptor, 808) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h new file mode 100644 index 00000000000..706f4f19922 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/eds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_EDS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_EDS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_eds_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_EdsDummy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_eds_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.EdsDummy"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_EDS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c new file mode 100644 index 00000000000..0496d7fe8c3 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c @@ -0,0 +1,103 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/endpoint.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/endpoint.upbdefs.h" + +extern upb_def_init envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit; +extern upb_def_init envoy_type_percent_proto_upbdefinit; +extern upb_def_init google_api_annotations_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_ClusterLoadAssignment_msginit; +extern const upb_msglayout envoy_api_v2_ClusterLoadAssignment_Policy_msginit; +extern const upb_msglayout envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit; +extern const upb_msglayout envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit; + +static const upb_msglayout *layouts[4] = { + &envoy_api_v2_ClusterLoadAssignment_msginit, + &envoy_api_v2_ClusterLoadAssignment_Policy_msginit, + &envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_msginit, + &envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_msginit, +}; + +static const char descriptor[1289] = {'\n', '\033', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'p', +'r', 'o', 't', 'o', '\022', '\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '/', 'e', 'n', 'v', 'o', 'y', +'/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', +'_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\030', 'e', 'n', 'v', 'o', 'y', '/', +'t', 'y', 'p', 'e', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', +'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', +'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', +'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', +'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', +'t', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', +'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', +'\"', '\373', '\006', '\n', '\025', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', +'t', '\022', '*', '\n', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', +'\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\013', 'c', 'l', 'u', 's', 't', 'e', 'r', 'N', 'a', 'm', 'e', '\022', 'H', '\n', '\t', 'e', +'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'L', 'b', 'E', +'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'R', '\t', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', '`', '\n', '\017', 'n', 'a', +'m', 'e', 'd', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', '7', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', +'g', 'n', 'm', 'e', 'n', 't', '.', 'N', 'a', 'm', 'e', 'd', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'E', 'n', 't', 'r', +'y', 'R', '\016', 'n', 'a', 'm', 'e', 'd', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', 'B', '\n', '\006', 'p', 'o', 'l', 'i', +'c', 'y', '\030', '\004', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', +'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', '.', 'P', 'o', 'l', 'i', +'c', 'y', 'R', '\006', 'p', 'o', 'l', 'i', 'c', 'y', '\032', '\341', '\003', '\n', '\006', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '^', '\n', '\016', +'d', 'r', 'o', 'p', '_', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '7', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', +'i', 'g', 'n', 'm', 'e', 'n', 't', '.', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'D', 'r', 'o', 'p', 'O', 'v', 'e', 'r', 'l', 'o', +'a', 'd', 'R', '\r', 'd', 'r', 'o', 'p', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 's', '\022', '^', '\n', '\027', 'o', 'v', 'e', 'r', +'p', 'r', 'o', 'v', 'i', 's', 'i', 'o', 'n', 'i', 'n', 'g', '_', 'f', 'a', 'c', 't', 'o', 'r', '\030', '\003', ' ', '\001', '(', '\013', +'2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', +'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', ' ', '\000', 'R', '\026', 'o', 'v', 'e', 'r', 'p', 'r', 'o', 'v', 'i', +'s', 'i', 'o', 'n', 'i', 'n', 'g', 'F', 'a', 'c', 't', 'o', 'r', '\022', 'U', '\n', '\024', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', +'_', 's', 't', 'a', 'l', 'e', '_', 'a', 'f', 't', 'e', 'r', '\030', '\004', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', +'\252', '\001', '\002', '*', '\000', 'R', '\022', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'S', 't', 'a', 'l', 'e', 'A', 'f', 't', 'e', 'r', +'\022', '=', '\n', '\030', 'd', 'i', 's', 'a', 'b', 'l', 'e', '_', 'o', 'v', 'e', 'r', 'p', 'r', 'o', 'v', 'i', 's', 'i', 'o', 'n', +'i', 'n', 'g', '\030', '\005', ' ', '\001', '(', '\010', 'B', '\002', '\030', '\001', 'R', '\027', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'O', 'v', 'e', +'r', 'p', 'r', 'o', 'v', 'i', 's', 'i', 'o', 'n', 'i', 'n', 'g', '\032', '{', '\n', '\014', 'D', 'r', 'o', 'p', 'O', 'v', 'e', 'r', +'l', 'o', 'a', 'd', '\022', '#', '\n', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', +'B', '\004', 'r', '\002', ' ', '\001', 'R', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\022', 'F', '\n', '\017', 'd', 'r', 'o', 'p', '_', +'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', +'t', 'y', 'p', 'e', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'd', +'r', 'o', 'p', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', 'J', '\004', '\010', '\001', '\020', '\002', '\032', 'b', '\n', '\023', 'N', 'a', +'m', 'e', 'd', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', +'\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '5', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', +'2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', +'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', 'B', 'U', '\n', '\032', 'i', 'o', +'.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', 'B', +'\r', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\032', '\022', '\030', 'e', +'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '\272', '\200', +'\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[9] = { + &envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit, + &envoy_type_percent_proto_upbdefinit, + &google_api_annotations_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_endpoint_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/endpoint.proto", + UPB_STRVIEW_INIT(descriptor, 1289) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h new file mode 100644 index 00000000000..d5b8716d854 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.h @@ -0,0 +1,50 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/endpoint.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_ENDPOINT_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_ENDPOINT_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_endpoint_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_ClusterLoadAssignment_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.ClusterLoadAssignment"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_ClusterLoadAssignment_Policy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.ClusterLoadAssignment.Policy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_ClusterLoadAssignment_Policy_DropOverload_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.ClusterLoadAssignment.Policy.DropOverload"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_ClusterLoadAssignment_NamedEndpointsEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.ClusterLoadAssignment.NamedEndpointsEntry"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ENDPOINT_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c new file mode 100644 index 00000000000..3adc860a552 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c @@ -0,0 +1,37 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/endpoint/endpoint.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/endpoint/endpoint.upbdefs.h" + +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit; + +static const char descriptor[207] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'e', +'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', +'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '/', 'e', 'n', 'v', 'o', 'y', '/', +'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', +'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', 'B', '6', '\n', '#', 'i', 'o', '.', 'e', 'n', +'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', +'p', 'o', 'i', 'n', 't', 'B', '\r', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'P', '\001', 'b', +'\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[3] = { + &udpa_annotations_status_proto_upbdefinit, + &envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_endpoint_endpoint_proto_upbdefinit = { + deps, + NULL, + "envoy/api/v2/endpoint/endpoint.proto", + UPB_STRVIEW_INIT(descriptor, 207) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h new file mode 100644 index 00000000000..7d9a00738da --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/endpoint/endpoint.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_ENDPOINT_ENDPOINT_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_ENDPOINT_ENDPOINT_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_endpoint_endpoint_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ENDPOINT_ENDPOINT_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c new file mode 100644 index 00000000000..9cf12774cce --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c @@ -0,0 +1,105 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/endpoint/endpoint_components.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/endpoint/endpoint_components.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_address_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_health_check_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_endpoint_Endpoint_msginit; +extern const upb_msglayout envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit; +extern const upb_msglayout envoy_api_v2_endpoint_LbEndpoint_msginit; +extern const upb_msglayout envoy_api_v2_endpoint_LocalityLbEndpoints_msginit; + +static const upb_msglayout *layouts[4] = { + &envoy_api_v2_endpoint_Endpoint_msginit, + &envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_msginit, + &envoy_api_v2_endpoint_LbEndpoint_msginit, + &envoy_api_v2_endpoint_LocalityLbEndpoints_msginit, +}; + +static const char descriptor[1386] = {'\n', '/', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'e', +'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', +'\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\032', '\037', 'e', +'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', +'p', 'r', 'o', 't', 'o', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', +'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', +'c', 'o', 'r', 'e', '/', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', +'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', +'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', +'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', +'t', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', +'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\232', '\002', '\n', '\010', 'E', 'n', +'d', 'p', 'o', 'i', 'n', 't', '\022', '4', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'd', 'd', 'r', 'e', 's', +'s', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', 'a', '\n', '\023', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', +'k', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'H', 'e', +'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\021', 'h', 'e', 'a', 'l', 't', 'h', 'C', 'h', +'e', 'c', 'k', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\032', '\n', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\030', '\003', ' ', '\001', +'(', '\t', 'R', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\032', 'Y', '\n', '\021', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', +'c', 'k', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '(', '\n', '\n', 'p', 'o', 'r', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', +'\001', '(', '\r', 'B', '\t', '\372', 'B', '\006', '*', '\004', '\030', '\377', '\377', '\003', 'R', '\t', 'p', 'o', 'r', 't', 'V', 'a', 'l', 'u', 'e', +'\022', '\032', '\n', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\010', 'h', 'o', 's', 't', 'n', +'a', 'm', 'e', '\"', '\337', '\002', '\n', '\n', 'L', 'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\022', '=', '\n', '\010', 'e', 'n', 'd', +'p', 'o', 'i', 'n', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'H', '\000', 'R', '\010', 'e', 'n', +'d', 'p', 'o', 'i', 'n', 't', '\022', '%', '\n', '\r', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'n', 'a', 'm', 'e', '\030', '\005', +' ', '\001', '(', '\t', 'H', '\000', 'R', '\014', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'N', 'a', 'm', 'e', '\022', 'D', '\n', '\r', 'h', +'e', 'a', 'l', 't', 'h', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\002', ' ', '\001', '(', '\016', '2', '\037', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'S', 't', 'a', 't', 'u', +'s', 'R', '\014', 'h', 'e', 'a', 'l', 't', 'h', 'S', 't', 'a', 't', 'u', 's', '\022', '7', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', +'t', 'a', '\030', '\003', ' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', 'Y', '\n', +'\025', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', '_', 'w', 'e', 'i', 'g', 'h', 't', '\030', '\004', ' ', +'\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', +'t', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\023', 'l', 'o', 'a', 'd', 'B', 'a', +'l', 'a', 'n', 'c', 'i', 'n', 'g', 'W', 'e', 'i', 'g', 'h', 't', 'B', '\021', '\n', '\017', 'h', 'o', 's', 't', '_', 'i', 'd', 'e', +'n', 't', 'i', 'f', 'i', 'e', 'r', '\"', '\321', '\002', '\n', '\023', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'L', 'b', 'E', 'n', 'd', +'p', 'o', 'i', 'n', 't', 's', '\022', '7', '\n', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\030', '\001', ' ', '\001', '(', '\013', '2', +'\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'L', 'o', 'c', 'a', 'l', +'i', 't', 'y', 'R', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\022', 'D', '\n', '\014', 'l', 'b', '_', 'e', 'n', 'd', 'p', 'o', +'i', 'n', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'L', 'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'R', '\013', 'l', 'b', 'E', +'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', 'Y', '\n', '\025', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'i', 'n', +'g', '_', 'w', 'e', 'i', 'g', 'h', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', +'\002', '(', '\001', 'R', '\023', 'l', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'W', 'e', 'i', 'g', 'h', 't', '\022', +'$', '\n', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\005', ' ', '\001', '(', '\r', 'B', '\010', '\372', 'B', '\005', '*', '\003', '\030', +'\200', '\001', 'R', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', ':', '\n', '\t', 'p', 'r', 'o', 'x', 'i', 'm', 'i', 't', 'y', +'\030', '\006', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 'p', 'r', 'o', 'x', 'i', 'm', 'i', 't', 'y', 'B', 'h', '\n', +'#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'B', '\027', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'C', 'o', 'm', 'p', +'o', 'n', 'e', 'n', 't', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\032', '\022', '\030', 'e', 'n', 'v', 'o', +'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', +'\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[8] = { + &envoy_api_v2_core_address_proto_upbdefinit, + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_api_v2_core_health_check_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/endpoint/endpoint_components.proto", + UPB_STRVIEW_INIT(descriptor, 1386) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h new file mode 100644 index 00000000000..3a2b2f8a8aa --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.h @@ -0,0 +1,50 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/endpoint/endpoint_components.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_ENDPOINT_ENDPOINT_COMPONENTS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_ENDPOINT_ENDPOINT_COMPONENTS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_Endpoint_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.Endpoint"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_Endpoint_HealthCheckConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.Endpoint.HealthCheckConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_LbEndpoint_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.LbEndpoint"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_LocalityLbEndpoints_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_endpoint_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.LocalityLbEndpoints"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ENDPOINT_ENDPOINT_COMPONENTS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c new file mode 100644 index 00000000000..71661ab0d51 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c @@ -0,0 +1,135 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/endpoint/load_report.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/endpoint/load_report.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_address_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_endpoint_UpstreamLocalityStats_msginit; +extern const upb_msglayout envoy_api_v2_endpoint_UpstreamEndpointStats_msginit; +extern const upb_msglayout envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit; +extern const upb_msglayout envoy_api_v2_endpoint_ClusterStats_msginit; +extern const upb_msglayout envoy_api_v2_endpoint_ClusterStats_DroppedRequests_msginit; + +static const upb_msglayout *layouts[5] = { + &envoy_api_v2_endpoint_UpstreamLocalityStats_msginit, + &envoy_api_v2_endpoint_UpstreamEndpointStats_msginit, + &envoy_api_v2_endpoint_EndpointLoadMetricStats_msginit, + &envoy_api_v2_endpoint_ClusterStats_msginit, + &envoy_api_v2_endpoint_ClusterStats_DroppedRequests_msginit, +}; + +static const char descriptor[2083] = {'\n', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'l', +'o', 'a', 'd', '_', 'r', 'e', 'p', 'o', 'r', 't', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', +'/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'e', +'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', +'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', +'t', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', +'t', 'o', '\"', '\215', '\004', '\n', '\025', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'S', 't', +'a', 't', 's', '\022', '7', '\n', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\030', '\001', ' ', '\001', '(', '\013', '2', '\033', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', +'R', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\022', ':', '\n', '\031', 't', 'o', 't', 'a', 'l', '_', 's', 'u', 'c', 'c', 'e', +'s', 's', 'f', 'u', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\027', 't', 'o', 't', +'a', 'l', 'S', 'u', 'c', 'c', 'e', 's', 's', 'f', 'u', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', ';', '\n', '\032', 't', +'o', 't', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '_', 'i', 'n', '_', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', +'\030', '\003', ' ', '\001', '(', '\004', 'R', '\027', 't', 'o', 't', 'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', 'I', 'n', 'P', 'r', +'o', 'g', 'r', 'e', 's', 's', '\022', '0', '\n', '\024', 't', 'o', 't', 'a', 'l', '_', 'e', 'r', 'r', 'o', 'r', '_', 'r', 'e', 'q', +'u', 'e', 's', 't', 's', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\022', 't', 'o', 't', 'a', 'l', 'E', 'r', 'r', 'o', 'r', 'R', 'e', +'q', 'u', 'e', 's', 't', 's', '\022', '2', '\n', '\025', 't', 'o', 't', 'a', 'l', '_', 'i', 's', 's', 'u', 'e', 'd', '_', 'r', 'e', +'q', 'u', 'e', 's', 't', 's', '\030', '\010', ' ', '\001', '(', '\004', 'R', '\023', 't', 'o', 't', 'a', 'l', 'I', 's', 's', 'u', 'e', 'd', +'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', 'Z', '\n', '\021', 'l', 'o', 'a', 'd', '_', 'm', 'e', 't', 'r', 'i', 'c', '_', 's', +'t', 'a', 't', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'L', 'o', 'a', 'd', 'M', 'e', 't', +'r', 'i', 'c', 'S', 't', 'a', 't', 's', 'R', '\017', 'l', 'o', 'a', 'd', 'M', 'e', 't', 'r', 'i', 'c', 'S', 't', 'a', 't', 's', +'\022', 'd', '\n', '\027', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 's', 't', 'a', +'t', 's', '\030', '\007', ' ', '\003', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', +'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'S', +'t', 'a', 't', 's', 'R', '\025', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'S', 't', 'a', +'t', 's', '\022', '\032', '\n', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\006', ' ', '\001', '(', '\r', 'R', '\010', 'p', 'r', 'i', +'o', 'r', 'i', 't', 'y', '\"', '\275', '\003', '\n', '\025', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'E', 'n', 'd', 'p', 'o', 'i', 'n', +'t', 'S', 't', 'a', 't', 's', '\022', '4', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'd', 'd', 'r', 'e', 's', +'s', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '3', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\006', ' ', +'\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', +'u', 'c', 't', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', ':', '\n', '\031', 't', 'o', 't', 'a', 'l', '_', 's', 'u', +'c', 'c', 'e', 's', 's', 'f', 'u', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\027', +'t', 'o', 't', 'a', 'l', 'S', 'u', 'c', 'c', 'e', 's', 's', 'f', 'u', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', ';', +'\n', '\032', 't', 'o', 't', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '_', 'i', 'n', '_', 'p', 'r', 'o', 'g', 'r', +'e', 's', 's', '\030', '\003', ' ', '\001', '(', '\004', 'R', '\027', 't', 'o', 't', 'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', 'I', +'n', 'P', 'r', 'o', 'g', 'r', 'e', 's', 's', '\022', '0', '\n', '\024', 't', 'o', 't', 'a', 'l', '_', 'e', 'r', 'r', 'o', 'r', '_', +'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\022', 't', 'o', 't', 'a', 'l', 'E', 'r', 'r', 'o', +'r', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', '2', '\n', '\025', 't', 'o', 't', 'a', 'l', '_', 'i', 's', 's', 'u', 'e', 'd', +'_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\007', ' ', '\001', '(', '\004', 'R', '\023', 't', 'o', 't', 'a', 'l', 'I', 's', 's', +'u', 'e', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', 'Z', '\n', '\021', 'l', 'o', 'a', 'd', '_', 'm', 'e', 't', 'r', 'i', +'c', '_', 's', 't', 'a', 't', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'L', 'o', 'a', 'd', +'M', 'e', 't', 'r', 'i', 'c', 'S', 't', 'a', 't', 's', 'R', '\017', 'l', 'o', 'a', 'd', 'M', 'e', 't', 'r', 'i', 'c', 'S', 't', +'a', 't', 's', '\"', '\262', '\001', '\n', '\027', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'L', 'o', 'a', 'd', 'M', 'e', 't', 'r', 'i', +'c', 'S', 't', 'a', 't', 's', '\022', '\037', '\n', '\013', 'm', 'e', 't', 'r', 'i', 'c', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', +'(', '\t', 'R', '\n', 'm', 'e', 't', 'r', 'i', 'c', 'N', 'a', 'm', 'e', '\022', 'H', '\n', '!', 'n', 'u', 'm', '_', 'r', 'e', 'q', +'u', 'e', 's', 't', 's', '_', 'f', 'i', 'n', 'i', 's', 'h', 'e', 'd', '_', 'w', 'i', 't', 'h', '_', 'm', 'e', 't', 'r', 'i', +'c', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\035', 'n', 'u', 'm', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', 'F', 'i', 'n', 'i', 's', +'h', 'e', 'd', 'W', 'i', 't', 'h', 'M', 'e', 't', 'r', 'i', 'c', '\022', ',', '\n', '\022', 't', 'o', 't', 'a', 'l', '_', 'm', 'e', +'t', 'r', 'i', 'c', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\001', 'R', '\020', 't', 'o', 't', 'a', 'l', 'M', 'e', +'t', 'r', 'i', 'c', 'V', 'a', 'l', 'u', 'e', '\"', '\234', '\004', '\n', '\014', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', +'s', '\022', '*', '\n', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', +'\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\013', 'c', 'l', 'u', 's', 't', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '0', '\n', '\024', 'c', +'l', 'u', 's', 't', 'e', 'r', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\006', ' ', '\001', '(', '\t', +'R', '\022', 'c', 'l', 'u', 's', 't', 'e', 'r', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', '\022', 'n', '\n', '\027', 'u', +'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '_', 's', 't', 'a', 't', 's', '\030', '\002', ' ', +'\003', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', +'n', 't', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'S', 't', 'a', 't', 's', 'B', +'\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\025', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'i', +'t', 'y', 'S', 't', 'a', 't', 's', '\022', '4', '\n', '\026', 't', 'o', 't', 'a', 'l', '_', 'd', 'r', 'o', 'p', 'p', 'e', 'd', '_', +'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\003', ' ', '\001', '(', '\004', 'R', '\024', 't', 'o', 't', 'a', 'l', 'D', 'r', 'o', 'p', +'p', 'e', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', '^', '\n', '\020', 'd', 'r', 'o', 'p', 'p', 'e', 'd', '_', 'r', 'e', +'q', 'u', 'e', 's', 't', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', '.', +'D', 'r', 'o', 'p', 'p', 'e', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', 'R', '\017', 'd', 'r', 'o', 'p', 'p', 'e', 'd', 'R', +'e', 'q', 'u', 'e', 's', 't', 's', '\022', 'K', '\n', '\024', 'l', 'o', 'a', 'd', '_', 'r', 'e', 'p', 'o', 'r', 't', '_', 'i', 'n', +'t', 'e', 'r', 'v', 'a', 'l', '\030', '\004', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\022', 'l', 'o', 'a', 'd', 'R', 'e', 'p', 'o', 'r', +'t', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\032', '[', '\n', '\017', 'D', 'r', 'o', 'p', 'p', 'e', 'd', 'R', 'e', 'q', 'u', 'e', +'s', 't', 's', '\022', '#', '\n', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', +'\004', 'r', '\002', ' ', '\001', 'R', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\022', '#', '\n', '\r', 'd', 'r', 'o', 'p', 'p', 'e', +'d', '_', 'c', 'o', 'u', 'n', 't', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\014', 'd', 'r', 'o', 'p', 'p', 'e', 'd', 'C', 'o', 'u', +'n', 't', 'B', '`', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'B', '\017', 'L', 'o', 'a', 'd', 'R', 'e', 'p', +'o', 'r', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\032', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c', +'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', +'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[8] = { + &envoy_api_v2_core_address_proto_upbdefinit, + &envoy_api_v2_core_base_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_endpoint_load_report_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/endpoint/load_report.proto", + UPB_STRVIEW_INIT(descriptor, 2083) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h new file mode 100644 index 00000000000..412f57f60e1 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.h @@ -0,0 +1,55 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/endpoint/load_report.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_ENDPOINT_LOAD_REPORT_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_ENDPOINT_LOAD_REPORT_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_endpoint_load_report_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_UpstreamLocalityStats_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_load_report_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.UpstreamLocalityStats"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_UpstreamEndpointStats_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_load_report_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.UpstreamEndpointStats"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_EndpointLoadMetricStats_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_load_report_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.EndpointLoadMetricStats"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_ClusterStats_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_load_report_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.ClusterStats"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_endpoint_ClusterStats_DroppedRequests_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_endpoint_load_report_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.endpoint.ClusterStats.DroppedRequests"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ENDPOINT_LOAD_REPORT_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c new file mode 100644 index 00000000000..1066dce1651 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c @@ -0,0 +1,79 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/lds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/lds.upbdefs.h" + +extern upb_def_init envoy_api_v2_discovery_proto_upbdefinit; +extern upb_def_init google_api_annotations_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init envoy_annotations_resource_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern upb_def_init envoy_api_v2_listener_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_LdsDummy_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_LdsDummy_msginit, +}; + +static const char descriptor[795] = {'\n', '\026', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'l', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', +'\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', +'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', +'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', +'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', +'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', +'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', +'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', +'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', +'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'l', +'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', '\n', '\n', '\010', 'L', 'd', 's', 'D', 'u', 'm', 'm', 'y', +'2', '\363', '\002', '\n', '\030', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', +'v', 'i', 'c', 'e', '\022', 'a', '\n', '\016', 'D', 'e', 'l', 't', 'a', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', '\022', '#', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', +'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', +'\001', '0', '\001', '\022', 'X', '\n', '\017', 'S', 't', 'r', 'e', 'a', 'm', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', '\022', '\036', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', +'u', 'e', 's', 't', '\032', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', +'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', '{', '\n', '\016', 'F', 'e', 't', +'c', 'h', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', '\022', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '\037', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', +'e', '\"', '(', '\202', '\323', '\344', '\223', '\002', '\031', '\"', '\027', '/', 'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', ':', +'l', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', '\202', '\323', '\344', '\223', '\002', '\003', ':', '\001', '*', '\032', '\035', '\212', '\244', '\226', '\363', '\007', +'\027', '\n', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'B', +'T', '\n', '\032', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', 'B', '\010', 'L', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\362', '\230', '\376', '\217', '\005', '\033', +'\022', '\031', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', +'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'P', '\010', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[10] = { + &envoy_api_v2_discovery_proto_upbdefinit, + &google_api_annotations_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &envoy_annotations_resource_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + &envoy_api_v2_listener_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_lds_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/lds.proto", + UPB_STRVIEW_INIT(descriptor, 795) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h new file mode 100644 index 00000000000..970d918bd28 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/lds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_LDS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_LDS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_lds_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_LdsDummy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_lds_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.LdsDummy"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LDS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c new file mode 100644 index 00000000000..0bc77bae2aa --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c @@ -0,0 +1,159 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/listener.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_address_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_socket_option_proto_upbdefinit; +extern upb_def_init envoy_api_v2_listener_listener_components_proto_upbdefinit; +extern upb_def_init envoy_api_v2_listener_udp_listener_config_proto_upbdefinit; +extern upb_def_init envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit; +extern upb_def_init envoy_config_listener_v2_api_listener_proto_upbdefinit; +extern upb_def_init google_api_annotations_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_Listener_msginit; +extern const upb_msglayout envoy_api_v2_Listener_DeprecatedV1_msginit; +extern const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_msginit; +extern const upb_msglayout envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit; + +static const upb_msglayout *layouts[4] = { + &envoy_api_v2_Listener_msginit, + &envoy_api_v2_Listener_DeprecatedV1_msginit, + &envoy_api_v2_Listener_ConnectionBalanceConfig_msginit, + &envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_msginit, +}; + +static const char descriptor[2439] = {'\n', '\033', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p', +'r', 'o', 't', 'o', '\022', '\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\037', 'e', 'n', 'v', 'o', 'y', +'/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', +'o', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', +'.', 'p', 'r', 'o', 't', 'o', '\032', '%', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', +'/', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '/', 'e', 'n', 'v', +'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'l', 'i', 's', 't', 'e', 'n', +'e', 'r', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '/', 'e', 'n', 'v', 'o', +'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'u', 'd', 'p', '_', 'l', 'i', 's', +'t', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '0', 'e', 'n', 'v', 'o', 'y', +'/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'f', 'i', 'l', 't', 'e', 'r', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '/', +'v', '2', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '+', 'e', 'n', 'v', 'o', 'y', +'/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'v', '2', '/', 'a', 'p', 'i', '_', 'l', +'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', +'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', +'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', +'s', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', +'/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', +'t', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', +'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\235', '\016', '\n', '\010', +'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', +'a', 'm', 'e', '\022', '>', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'B', '\010', +'\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', 'G', '\n', '\r', 'f', 'i', 'l', 't', +'e', 'r', '_', 'c', 'h', 'a', 'i', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', +'n', 'R', '\014', 'f', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 's', '\022', 'H', '\n', '\020', 'u', 's', 'e', '_', 'o', 'r', +'i', 'g', 'i', 'n', 'a', 'l', '_', 'd', 's', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'B', '\002', '\030', '\001', 'R', '\016', +'u', 's', 'e', 'O', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'D', 's', 't', '\022', 'f', '\n', '!', 'p', 'e', 'r', '_', 'c', 'o', 'n', +'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'l', 'i', 'm', 'i', 't', '_', 'b', 'y', 't', 'e', +'s', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\035', 'p', 'e', 'r', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', +'o', 'n', 'B', 'u', 'f', 'f', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'B', 'y', 't', 'e', 's', '\022', '7', '\n', '\010', 'm', 'e', 't', +'a', 'd', 'a', 't', 'a', '\030', '\006', ' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'c', 'o', 'r', 'e', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', +'\022', 'H', '\n', '\r', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '_', 'v', '1', '\030', '\007', ' ', '\001', '(', '\013', '2', '#', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'D', 'e', +'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', 'V', '1', 'R', '\014', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', 'V', '1', '\022', +'?', '\n', '\n', 'd', 'r', 'a', 'i', 'n', '_', 't', 'y', 'p', 'e', '\030', '\010', ' ', '\001', '(', '\016', '2', ' ', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'D', 'r', 'a', 'i', 'n', 'T', +'y', 'p', 'e', 'R', '\t', 'd', 'r', 'a', 'i', 'n', 'T', 'y', 'p', 'e', '\022', 'P', '\n', '\020', 'l', 'i', 's', 't', 'e', 'n', 'e', +'r', '_', 'f', 'i', 'l', 't', 'e', 'r', 's', '\030', '\t', ' ', '\003', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', +'l', 't', 'e', 'r', 'R', '\017', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 's', '\022', 'S', '\n', '\030', +'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', 's', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', +'\017', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', +'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\026', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 's', 'T', +'i', 'm', 'e', 'o', 'u', 't', '\022', 'N', '\n', '$', 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', '_', 'o', 'n', '_', 'l', 'i', 's', +'t', 'e', 'n', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', 's', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\021', ' ', '\001', +'(', '\010', 'R', ' ', 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', 'O', 'n', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', +'t', 'e', 'r', 's', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '<', '\n', '\013', 't', 'r', 'a', 'n', 's', 'p', 'a', 'r', 'e', 'n', +'t', '\030', '\n', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\013', 't', 'r', 'a', 'n', 's', 'p', 'a', 'r', 'e', 'n', 't', '\022', '6', +'\n', '\010', 'f', 'r', 'e', 'e', 'b', 'i', 'n', 'd', '\030', '\013', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\010', 'f', 'r', 'e', 'e', +'b', 'i', 'n', 'd', '\022', 'F', '\n', '\016', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\r', ' ', +'\003', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', +'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\r', 's', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', +'s', '\022', 'X', '\n', '\032', 't', 'c', 'p', '_', 'f', 'a', 's', 't', '_', 'o', 'p', 'e', 'n', '_', 'q', 'u', 'e', 'u', 'e', '_', +'l', 'e', 'n', 'g', 't', 'h', '\030', '\014', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\026', 't', 'c', 'p', 'F', 'a', 's', +'t', 'O', 'p', 'e', 'n', 'Q', 'u', 'e', 'u', 'e', 'L', 'e', 'n', 'g', 't', 'h', '\022', 'P', '\n', '\021', 't', 'r', 'a', 'f', 'f', +'i', 'c', '_', 'd', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\030', '\020', ' ', '\001', '(', '\016', '2', '#', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'T', 'r', 'a', 'f', 'f', 'i', 'c', 'D', 'i', 'r', 'e', +'c', 't', 'i', 'o', 'n', 'R', '\020', 't', 'r', 'a', 'f', 'f', 'i', 'c', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\022', 'X', +'\n', '\023', 'u', 'd', 'p', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\022', ' ', '\001', +'(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', +'r', '.', 'U', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\021', 'u', 'd', 'p', 'L', +'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'H', '\n', '\014', 'a', 'p', 'i', '_', 'l', 'i', 's', 't', +'e', 'n', 'e', 'r', '\030', '\023', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', +'.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '2', '.', 'A', 'p', 'i', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'R', +'\013', 'a', 'p', 'i', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\022', 'j', '\n', '\031', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', +'n', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\024', ' ', '\001', '(', '\013', '2', '.', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'C', 'o', 'n', +'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\027', 'c', 'o', 'n', +'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\035', '\n', '\n', 'r', +'e', 'u', 's', 'e', '_', 'p', 'o', 'r', 't', '\030', '\025', ' ', '\001', '(', '\010', 'R', '\t', 'r', 'e', 'u', 's', 'e', 'P', 'o', 'r', +'t', '\022', 'J', '\n', '\n', 'a', 'c', 'c', 'e', 's', 's', '_', 'l', 'o', 'g', '\030', '\026', ' ', '\003', '(', '\013', '2', '+', '.', 'e', +'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', +'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'R', '\t', 'a', 'c', 'c', 'e', 's', 's', 'L', +'o', 'g', '\032', 'L', '\n', '\014', 'D', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', 'V', '1', '\022', '<', '\n', '\014', 'b', 'i', 'n', +'d', '_', 't', 'o', '_', 'p', 'o', 'r', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\n', 'b', 'i', 'n', 'd', 'T', +'o', 'P', 'o', 'r', 't', '\032', '\242', '\001', '\n', '\027', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'a', 'l', 'a', 'n', +'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'b', '\n', '\r', 'e', 'x', 'a', 'c', 't', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'e', +'\030', '\001', ' ', '\001', '(', '\013', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'i', 's', +'t', 'e', 'n', 'e', 'r', '.', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'C', 'o', +'n', 'f', 'i', 'g', '.', 'E', 'x', 'a', 'c', 't', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'H', '\000', 'R', '\014', 'e', 'x', 'a', 'c', +'t', 'B', 'a', 'l', 'a', 'n', 'c', 'e', '\032', '\016', '\n', '\014', 'E', 'x', 'a', 'c', 't', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'B', +'\023', '\n', '\014', 'b', 'a', 'l', 'a', 'n', 'c', 'e', '_', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', '\"', ')', '\n', '\t', 'D', +'r', 'a', 'i', 'n', 'T', 'y', 'p', 'e', '\022', '\013', '\n', '\007', 'D', 'E', 'F', 'A', 'U', 'L', 'T', '\020', '\000', '\022', '\017', '\n', '\013', +'M', 'O', 'D', 'I', 'F', 'Y', '_', 'O', 'N', 'L', 'Y', '\020', '\001', 'J', '\004', '\010', '\016', '\020', '\017', 'B', 'U', '\n', '\032', 'i', 'o', +'.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', 'B', +'\r', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\032', '\022', '\030', 'e', +'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '\272', '\200', +'\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[14] = { + &envoy_api_v2_core_address_proto_upbdefinit, + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_api_v2_core_socket_option_proto_upbdefinit, + &envoy_api_v2_listener_listener_components_proto_upbdefinit, + &envoy_api_v2_listener_udp_listener_config_proto_upbdefinit, + &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit, + &envoy_config_listener_v2_api_listener_proto_upbdefinit, + &google_api_annotations_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_listener_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/listener.proto", + UPB_STRVIEW_INIT(descriptor, 2439) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h new file mode 100644 index 00000000000..7a8338f5fd9 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.h @@ -0,0 +1,50 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_LISTENER_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_LISTENER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_listener_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_Listener_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Listener"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Listener_DeprecatedV1_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Listener.DeprecatedV1"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Listener_ConnectionBalanceConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Listener.ConnectionBalanceConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Listener_ConnectionBalanceConfig_ExactBalance_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Listener.ConnectionBalanceConfig.ExactBalance"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LISTENER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c new file mode 100644 index 00000000000..8d4c0f09292 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c @@ -0,0 +1,39 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/listener/listener.upbdefs.h" + +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init envoy_api_v2_listener_listener_components_proto_upbdefinit; + +static const char descriptor[259] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'l', +'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', +'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '/', 'e', 'n', 'v', 'o', 'y', '/', +'a', 'p', 'i', '/', 'v', '2', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', +'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', 'B', 'j', '\n', '#', 'i', 'o', '.', 'e', 'n', +'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', +'t', 'e', 'n', 'e', 'r', 'B', '\r', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\252', '\002', '\027', +'E', 'n', 'v', 'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'N', 'S', '\352', '\002', +'\027', 'E', 'n', 'v', 'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'N', 'S', 'P', +'\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[3] = { + &udpa_annotations_status_proto_upbdefinit, + &envoy_api_v2_listener_listener_components_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_listener_listener_proto_upbdefinit = { + deps, + NULL, + "envoy/api/v2/listener/listener.proto", + UPB_STRVIEW_INIT(descriptor, 259) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h new file mode 100644 index 00000000000..2c4bd64b8d8 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_listener_listener_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LISTENER_LISTENER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c new file mode 100644 index 00000000000..5704b2ddc40 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c @@ -0,0 +1,169 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/listener_components.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/listener/listener_components.upbdefs.h" + +extern upb_def_init envoy_api_v2_auth_tls_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_address_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_type_range_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_listener_Filter_msginit; +extern const upb_msglayout envoy_api_v2_listener_FilterChainMatch_msginit; +extern const upb_msglayout envoy_api_v2_listener_FilterChain_msginit; +extern const upb_msglayout envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit; +extern const upb_msglayout envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit; +extern const upb_msglayout envoy_api_v2_listener_ListenerFilter_msginit; + +static const upb_msglayout *layouts[6] = { + &envoy_api_v2_listener_Filter_msginit, + &envoy_api_v2_listener_FilterChainMatch_msginit, + &envoy_api_v2_listener_FilterChain_msginit, + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_msginit, + &envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_msginit, + &envoy_api_v2_listener_ListenerFilter_msginit, +}; + +static const char descriptor[2741] = {'\n', '/', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'l', +'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', +'\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\032', '\033', 'e', +'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'a', 'u', 't', 'h', '/', 't', 'l', 's', '.', 'p', 'r', 'o', 't', +'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'a', 'd', 'd', 'r', +'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', +'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\026', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', +'e', '/', 'r', 'a', 'n', 'g', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', +'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', +'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', +'/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\254', '\001', '\n', '\006', 'F', 'i', 'l', 't', 'e', +'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', +'\004', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\002', '\030', '\001', +'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', +'g', '\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\013', 'c', 'o', +'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\003', '\020', '\004', '\"', '\341', '\005', '\n', '\020', 'F', 'i', 'l', 't', 'e', +'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', '\022', 'T', '\n', '\020', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', +'n', '_', 'p', 'o', 'r', 't', '\030', '\010', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\013', '\372', 'B', '\010', '*', '\006', '\030', +'\377', '\377', '\003', '(', '\001', 'R', '\017', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'P', 'o', 'r', 't', '\022', 'A', '\n', +'\r', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'r', 'a', 'n', 'g', 'e', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\034', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'i', 'd', 'r', 'R', 'a', 'n', 'g', 'e', +'R', '\014', 'p', 'r', 'e', 'f', 'i', 'x', 'R', 'a', 'n', 'g', 'e', 's', '\022', '%', '\n', '\016', 'a', 'd', 'd', 'r', 'e', 's', 's', +'_', 's', 'u', 'f', 'f', 'i', 'x', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\r', 'a', 'd', 'd', 'r', 'e', 's', 's', 'S', 'u', 'f', +'f', 'i', 'x', '\022', ';', '\n', '\n', 's', 'u', 'f', 'f', 'i', 'x', '_', 'l', 'e', 'n', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', +'l', 'u', 'e', 'R', '\t', 's', 'u', 'f', 'f', 'i', 'x', 'L', 'e', 'n', '\022', 'g', '\n', '\013', 's', 'o', 'u', 'r', 'c', 'e', '_', +'t', 'y', 'p', 'e', '\030', '\014', ' ', '\001', '(', '\016', '2', '<', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', +'h', '.', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'S', 'o', 'u', 'r', 'c', 'e', 'T', 'y', 'p', 'e', 'B', '\010', '\372', +'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\n', 's', 'o', 'u', 'r', 'c', 'e', 'T', 'y', 'p', 'e', '\022', 'N', '\n', '\024', 's', 'o', +'u', 'r', 'c', 'e', '_', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'r', 'a', 'n', 'g', 'e', 's', '\030', '\006', ' ', '\003', '(', '\013', '2', +'\034', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'i', 'd', 'r', 'R', +'a', 'n', 'g', 'e', 'R', '\022', 's', 'o', 'u', 'r', 'c', 'e', 'P', 'r', 'e', 'f', 'i', 'x', 'R', 'a', 'n', 'g', 'e', 's', '\022', +'3', '\n', '\014', 's', 'o', 'u', 'r', 'c', 'e', '_', 'p', 'o', 'r', 't', 's', '\030', '\007', ' ', '\003', '(', '\r', 'B', '\020', '\372', 'B', +'\r', '\222', '\001', '\n', '\"', '\010', '*', '\006', '\030', '\377', '\377', '\003', '(', '\001', 'R', '\013', 's', 'o', 'u', 'r', 'c', 'e', 'P', 'o', 'r', +'t', 's', '\022', '!', '\n', '\014', 's', 'e', 'r', 'v', 'e', 'r', '_', 'n', 'a', 'm', 'e', 's', '\030', '\013', ' ', '\003', '(', '\t', 'R', +'\013', 's', 'e', 'r', 'v', 'e', 'r', 'N', 'a', 'm', 'e', 's', '\022', '-', '\n', '\022', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', +'_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\t', ' ', '\001', '(', '\t', 'R', '\021', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', +'t', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '3', '\n', '\025', 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', '_', +'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\030', '\n', ' ', '\003', '(', '\t', 'R', '\024', 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', +'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\"', 'U', '\n', '\024', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', +'n', 'S', 'o', 'u', 'r', 'c', 'e', 'T', 'y', 'p', 'e', '\022', '\007', '\n', '\003', 'A', 'N', 'Y', '\020', '\000', '\022', '&', '\n', '\005', 'L', +'O', 'C', 'A', 'L', '\020', '\001', '\032', '\033', '\362', '\230', '\376', '\217', '\005', '\025', '\n', '\023', 'S', 'A', 'M', 'E', '_', 'I', 'P', '_', 'O', +'R', '_', 'L', 'O', 'O', 'P', 'B', 'A', 'C', 'K', '\022', '\014', '\n', '\010', 'E', 'X', 'T', 'E', 'R', 'N', 'A', 'L', '\020', '\002', 'J', +'\004', '\010', '\001', '\020', '\002', '\"', '\313', '\003', '\n', '\013', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', '\022', 'U', '\n', '\022', +'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'h', 'a', 'i', 'n', '_', 'm', 'a', 't', 'c', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', +'\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'F', +'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'R', '\020', 'f', 'i', 'l', 't', 'e', 'r', 'C', 'h', +'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', '\022', 'L', '\n', '\013', 't', 'l', 's', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\002', +' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', +'D', 'o', 'w', 'n', 's', 't', 'r', 'e', 'a', 'm', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'B', '\002', '\030', '\001', 'R', +'\n', 't', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '7', '\n', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\030', '\003', ' ', +'\003', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', +'e', 'r', '.', 'F', 'i', 'l', 't', 'e', 'r', 'R', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\022', 'B', '\n', '\017', 'u', 's', 'e', +'_', 'p', 'r', 'o', 'x', 'y', '_', 'p', 'r', 'o', 't', 'o', '\030', '\004', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\r', 'u', 's', +'e', 'P', 'r', 'o', 'x', 'y', 'P', 'r', 'o', 't', 'o', '\022', '7', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\005', +' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', 'M', '\n', '\020', 't', 'r', 'a', +'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', '\030', '\006', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', +'o', 'c', 'k', 'e', 't', 'R', '\017', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', '\022', '\022', '\n', +'\004', 'n', 'a', 'm', 'e', '\030', '\007', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\"', '\251', '\004', '\n', '!', 'L', 'i', 's', +'t', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', +'i', 'c', 'a', 't', 'e', '\022', '^', '\n', '\010', 'o', 'r', '_', 'm', 'a', 't', 'c', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', 'A', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'L', 'i', +'s', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', +'d', 'i', 'c', 'a', 't', 'e', '.', 'M', 'a', 't', 'c', 'h', 'S', 'e', 't', 'H', '\000', 'R', '\007', 'o', 'r', 'M', 'a', 't', 'c', +'h', '\022', '`', '\n', '\t', 'a', 'n', 'd', '_', 'm', 'a', 't', 'c', 'h', '\030', '\002', ' ', '\001', '(', '\013', '2', 'A', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'L', 'i', 's', 't', 'e', +'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', +'a', 't', 'e', '.', 'M', 'a', 't', 'c', 'h', 'S', 'e', 't', 'H', '\000', 'R', '\010', 'a', 'n', 'd', 'M', 'a', 't', 'c', 'h', '\022', +'W', '\n', '\t', 'n', 'o', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', '\003', ' ', '\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', +'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', +'e', 'H', '\000', 'R', '\010', 'n', 'o', 't', 'M', 'a', 't', 'c', 'h', '\022', '&', '\n', '\t', 'a', 'n', 'y', '_', 'm', 'a', 't', 'c', +'h', '\030', '\004', ' ', '\001', '(', '\010', 'B', '\007', '\372', 'B', '\004', 'j', '\002', '\010', '\001', 'H', '\000', 'R', '\010', 'a', 'n', 'y', 'M', 'a', +'t', 'c', 'h', '\022', 'N', '\n', '\026', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', '_', 'p', 'o', 'r', 't', '_', 'r', +'a', 'n', 'g', 'e', '\030', '\005', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'I', +'n', 't', '3', '2', 'R', 'a', 'n', 'g', 'e', 'H', '\000', 'R', '\024', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'P', +'o', 'r', 't', 'R', 'a', 'n', 'g', 'e', '\032', 'd', '\n', '\010', 'M', 'a', 't', 'c', 'h', 'S', 'e', 't', '\022', 'X', '\n', '\005', 'r', +'u', 'l', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', +'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', 'B', '\010', '\372', 'B', '\005', '\222', '\001', +'\002', '\010', '\002', 'R', '\005', 'r', 'u', 'l', 'e', 's', 'B', '\013', '\n', '\004', 'r', 'u', 'l', 'e', '\022', '\003', '\370', 'B', '\001', '\"', '\221', +'\002', '\n', '\016', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', +'\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\006', +'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', +'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', +'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'a', '\n', '\017', 'f', 'i', 'l', 't', 'e', 'r', '_', 'd', 'i', 's', 'a', +'b', 'l', 'e', 'd', '\030', '\004', ' ', '\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', +'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', 'R', '\016', 'f', 'i', 'l', 't', 'e', +'r', 'D', 'i', 's', 'a', 'b', 'l', 'e', 'd', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'B', +'\234', '\001', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', 'B', '\027', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', +'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\252', '\002', '\027', 'E', 'n', 'v', 'o', 'y', '.', +'A', 'p', 'i', '.', 'V', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'N', 'S', '\352', '\002', '\027', 'E', 'n', 'v', 'o', 'y', +'.', 'A', 'p', 'i', '.', 'V', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'N', 'S', '\362', '\230', '\376', '\217', '\005', '\032', '\022', +'\030', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', +'\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[11] = { + &envoy_api_v2_auth_tls_proto_upbdefinit, + &envoy_api_v2_core_address_proto_upbdefinit, + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_type_range_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_listener_listener_components_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/listener/listener_components.proto", + UPB_STRVIEW_INIT(descriptor, 2741) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h new file mode 100644 index 00000000000..66353098066 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.h @@ -0,0 +1,60 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/listener_components.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_LISTENER_LISTENER_COMPONENTS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_LISTENER_LISTENER_COMPONENTS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_listener_listener_components_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_listener_Filter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_listener_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.listener.Filter"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_listener_FilterChainMatch_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_listener_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.listener.FilterChainMatch"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_listener_FilterChain_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_listener_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.listener.FilterChain"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_listener_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.listener.ListenerFilterChainMatchPredicate"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_listener_ListenerFilterChainMatchPredicate_MatchSet_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_listener_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.listener.ListenerFilterChainMatchPredicate.MatchSet"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_listener_ListenerFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_listener_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.listener.ListenerFilter"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LISTENER_LISTENER_COMPONENTS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c new file mode 100644 index 00000000000..da703ec59c6 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c @@ -0,0 +1,63 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/udp_listener_config.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/listener/udp_listener_config.upbdefs.h" + +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_listener_UdpListenerConfig_msginit; +extern const upb_msglayout envoy_api_v2_listener_ActiveRawUdpListenerConfig_msginit; + +static const upb_msglayout *layouts[2] = { + &envoy_api_v2_listener_UdpListenerConfig_msginit, + &envoy_api_v2_listener_ActiveRawUdpListenerConfig_msginit, +}; + +static const char descriptor[583] = {'\n', '/', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'u', +'d', 'p', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', +'\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\032', '\031', 'g', +'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', +'\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', +'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', +'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', +'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\"', '\300', '\001', '\n', '\021', 'U', 'd', 'p', +'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '*', '\n', '\021', 'u', 'd', 'p', '_', 'l', 'i', 's', +'t', 'e', 'n', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\017', 'u', 'd', 'p', 'L', 'i', 's', 't', +'e', 'n', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', +'\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', +'\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', +'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', +'\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', '\"', '\034', '\n', '\032', 'A', 'c', 't', 'i', 'v', 'e', 'R', 'a', 'w', +'U', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\233', '\001', '\n', '#', 'i', 'o', '.', +'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', +'i', 's', 't', 'e', 'n', 'e', 'r', 'B', '\026', 'U', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', +'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\252', '\002', '\027', 'E', 'n', 'v', 'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', 'L', +'i', 's', 't', 'e', 'n', 'e', 'r', 'N', 'S', '\352', '\002', '\027', 'E', 'n', 'v', 'o', 'y', '.', 'A', 'p', 'i', '.', 'V', '2', '.', +'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'N', 'S', '\362', '\230', '\376', '\217', '\005', '\032', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c', +'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', +'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[5] = { + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_listener_udp_listener_config_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/listener/udp_listener_config.proto", + UPB_STRVIEW_INIT(descriptor, 583) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h new file mode 100644 index 00000000000..22e21668844 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/listener/udp_listener_config.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_listener_udp_listener_config_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_listener_UdpListenerConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_udp_listener_config_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.listener.UdpListenerConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_listener_ActiveRawUdpListenerConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_listener_udp_listener_config_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.listener.ActiveRawUdpListenerConfig"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_LISTENER_UDP_LISTENER_CONFIG_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c new file mode 100644 index 00000000000..fb18533795c --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c @@ -0,0 +1,83 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/rds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/rds.upbdefs.h" + +extern upb_def_init envoy_api_v2_discovery_proto_upbdefinit; +extern upb_def_init google_api_annotations_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init envoy_annotations_resource_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern upb_def_init envoy_api_v2_route_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_RdsDummy_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_RdsDummy_msginit, +}; + +static const char descriptor[926] = {'\n', '\026', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'r', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', +'\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', +'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', +'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', +'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', +'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', +'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', +'t', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\030', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'r', 'o', 'u', 't', 'e', '.', 'p', 'r', +'o', 't', 'o', '\"', '\n', '\n', '\010', 'R', 'd', 's', 'D', 'u', 'm', 'm', 'y', '2', '\356', '\002', '\n', '\025', 'R', 'o', 'u', 't', 'e', +'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'U', '\n', '\014', 'S', 't', 'r', 'e', 'a', +'m', 'R', 'o', 'u', 't', 'e', 's', '\022', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', +'s', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', +'\001', '0', '\001', '\022', '^', '\n', '\013', 'D', 'e', 'l', 't', 'a', 'R', 'o', 'u', 't', 'e', 's', '\022', '#', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', +'q', 'u', 'e', 's', 't', '\032', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', +'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', +'u', '\n', '\013', 'F', 'e', 't', 'c', 'h', 'R', 'o', 'u', 't', 'e', 's', '\022', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '\037', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', +'o', 'n', 's', 'e', '\"', '%', '\202', '\323', '\344', '\223', '\002', '\026', '\"', '\024', '/', 'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', +'r', 'y', ':', 'r', 'o', 'u', 't', 'e', 's', '\202', '\323', '\344', '\223', '\002', '\003', ':', '\001', '*', '\032', '\'', '\212', '\244', '\226', '\363', '\007', +'!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', +'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '2', '\253', '\001', '\n', '\033', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', +'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'd', '\n', '\021', 'D', 'e', 'l', 't', 'a', +'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', 's', '\022', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', +'$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', +'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\032', '&', '\212', '\244', '\226', '\363', '\007', +' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'V', 'i', 'r', +'t', 'u', 'a', 'l', 'H', 'o', 's', 't', 'B', 'Q', '\n', '\032', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', 'B', '\010', 'R', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', +'\210', '\001', '\001', '\362', '\230', '\376', '\217', '\005', '\030', '\022', '\026', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', +'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'P', '\007', 'b', '\006', 'p', 'r', 'o', 't', 'o', +'3', +}; + +static upb_def_init *deps[9] = { + &envoy_api_v2_discovery_proto_upbdefinit, + &google_api_annotations_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &envoy_annotations_resource_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + &envoy_api_v2_route_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_rds_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/rds.proto", + UPB_STRVIEW_INIT(descriptor, 926) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h new file mode 100644 index 00000000000..4ac1ea297a1 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/rds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_RDS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_RDS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_rds_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_RdsDummy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_rds_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.RdsDummy"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_RDS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c new file mode 100644 index 00000000000..aded69de34e --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c @@ -0,0 +1,93 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/route.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/route.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_config_source_proto_upbdefinit; +extern upb_def_init envoy_api_v2_route_route_components_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_RouteConfiguration_msginit; +extern const upb_msglayout envoy_api_v2_Vhds_msginit; + +static const upb_msglayout *layouts[2] = { + &envoy_api_v2_RouteConfiguration_msginit, + &envoy_api_v2_Vhds_msginit, +}; + +static const char descriptor[1185] = {'\n', '\030', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'r', 'o', 'u', 't', 'e', '.', 'p', 'r', 'o', 't', +'o', '\022', '\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', +'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '%', 'e', 'n', 'v', +'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', +'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', ')', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'r', +'o', 'u', 't', 'e', '/', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', +'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', +'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', +'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\335', '\005', +'\n', '\022', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '\022', '\n', '\004', 'n', +'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'D', '\n', '\r', 'v', 'i', 'r', 't', 'u', 'a', +'l', '_', 'h', 'o', 's', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', 'R', '\014', 'v', 'i', +'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', 's', '\022', '&', '\n', '\004', 'v', 'h', 'd', 's', '\030', '\t', ' ', '\001', '(', '\013', '2', +'\022', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'V', 'h', 'd', 's', 'R', '\004', 'v', 'h', 'd', 's', +'\022', 'D', '\n', '\025', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', '_', 'o', 'n', 'l', 'y', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', +'\030', '\003', ' ', '\003', '(', '\t', 'B', '\020', '\372', 'B', '\r', '\222', '\001', '\n', '\"', '\010', 'r', '\006', '\300', '\001', '\001', '\310', '\001', '\000', 'R', +'\023', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'O', 'n', 'l', 'y', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', 'f', '\n', '\027', 'r', +'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\004', ' ', +'\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', +'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', +'\350', '\007', 'R', '\024', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', +'M', '\n', '\032', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', +'m', 'o', 'v', 'e', '\030', '\005', ' ', '\003', '(', '\t', 'B', '\020', '\372', 'B', '\r', '\222', '\001', '\n', '\"', '\010', 'r', '\006', '\300', '\001', '\001', +'\310', '\001', '\000', 'R', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', +'o', 'v', 'e', '\022', 'd', '\n', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', +'_', 'a', 'd', 'd', '\030', '\006', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', +'\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', +'T', 'o', 'A', 'd', 'd', '\022', 'K', '\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', +'t', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\010', ' ', '\003', '(', '\t', 'B', '\020', '\372', 'B', '\r', '\222', '\001', '\n', '\"', '\010', +'r', '\006', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', +'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', 'L', '\n', '#', 'm', 'o', 's', 't', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'c', '_', +'h', 'e', 'a', 'd', 'e', 'r', '_', 'm', 'u', 't', 'a', 't', 'i', 'o', 'n', 's', '_', 'w', 'i', 'n', 's', '\030', '\n', ' ', '\001', +'(', '\010', 'R', '\037', 'm', 'o', 's', 't', 'S', 'p', 'e', 'c', 'i', 'f', 'i', 'c', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'u', 't', +'a', 't', 'i', 'o', 'n', 's', 'W', 'i', 'n', 's', '\022', 'G', '\n', '\021', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '_', 'c', 'l', +'u', 's', 't', 'e', 'r', 's', '\030', '\007', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\020', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', +'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\"', 'V', '\n', '\004', 'V', 'h', 'd', 's', '\022', 'N', '\n', '\r', 'c', 'o', 'n', 'f', 'i', +'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', +'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\014', 'c', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', 'O', '\n', '\032', +'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', 'B', '\n', 'R', 'o', 'u', 't', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\027', '\022', '\025', 'e', 'n', +'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', +'\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[8] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_api_v2_core_config_source_proto_upbdefinit, + &envoy_api_v2_route_route_components_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_route_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/route.proto", + UPB_STRVIEW_INIT(descriptor, 1185) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h new file mode 100644 index 00000000000..7f536c20fa5 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/route.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_ROUTE_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_ROUTE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_route_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_RouteConfiguration_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.RouteConfiguration"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_Vhds_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.Vhds"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ROUTE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c new file mode 100644 index 00000000000..77d50fedb56 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c @@ -0,0 +1,36 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/route/route.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/route/route.upbdefs.h" + +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init envoy_api_v2_route_route_components_proto_upbdefinit; + +static const char descriptor[186] = {'\n', '\036', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'r', 'o', 'u', 't', 'e', '/', 'r', 'o', 'u', 't', +'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\022', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', +'t', 'e', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', +'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ')', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'r', 'o', +'u', 't', 'e', '/', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', +'o', 'B', '0', '\n', ' ', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', 'B', '\n', 'R', 'o', 'u', 't', 'e', 'P', 'r', 'o', 't', 'o', 'P', +'\001', 'P', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[3] = { + &udpa_annotations_status_proto_upbdefinit, + &envoy_api_v2_route_route_components_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_route_route_proto_upbdefinit = { + deps, + NULL, + "envoy/api/v2/route/route.proto", + UPB_STRVIEW_INIT(descriptor, 186) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h new file mode 100644 index 00000000000..1dcdf176f57 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/route/route.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_ROUTE_ROUTE_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_ROUTE_ROUTE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_route_route_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ROUTE_ROUTE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c new file mode 100644 index 00000000000..614aa5d9e96 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c @@ -0,0 +1,739 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/route/route_components.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/route/route_components.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_type_matcher_regex_proto_upbdefinit; +extern upb_def_init envoy_type_matcher_string_proto_upbdefinit; +extern upb_def_init envoy_type_percent_proto_upbdefinit; +extern upb_def_init envoy_type_range_proto_upbdefinit; +extern upb_def_init envoy_type_tracing_v2_custom_tag_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_route_VirtualHost_msginit; +extern const upb_msglayout envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit; +extern const upb_msglayout envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit; +extern const upb_msglayout envoy_api_v2_route_FilterAction_msginit; +extern const upb_msglayout envoy_api_v2_route_Route_msginit; +extern const upb_msglayout envoy_api_v2_route_Route_PerFilterConfigEntry_msginit; +extern const upb_msglayout envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit; +extern const upb_msglayout envoy_api_v2_route_WeightedCluster_msginit; +extern const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit; +extern const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit; +extern const upb_msglayout envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteMatch_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_msginit; +extern const upb_msglayout envoy_api_v2_route_CorsPolicy_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_HashPolicy_FilterState_msginit; +extern const upb_msglayout envoy_api_v2_route_RouteAction_UpgradeConfig_msginit; +extern const upb_msglayout envoy_api_v2_route_RetryPolicy_msginit; +extern const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryPriority_msginit; +extern const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit; +extern const upb_msglayout envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit; +extern const upb_msglayout envoy_api_v2_route_HedgePolicy_msginit; +extern const upb_msglayout envoy_api_v2_route_RedirectAction_msginit; +extern const upb_msglayout envoy_api_v2_route_DirectResponseAction_msginit; +extern const upb_msglayout envoy_api_v2_route_Decorator_msginit; +extern const upb_msglayout envoy_api_v2_route_Tracing_msginit; +extern const upb_msglayout envoy_api_v2_route_VirtualCluster_msginit; +extern const upb_msglayout envoy_api_v2_route_RateLimit_msginit; +extern const upb_msglayout envoy_api_v2_route_RateLimit_Action_msginit; +extern const upb_msglayout envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit; +extern const upb_msglayout envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit; +extern const upb_msglayout envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit; +extern const upb_msglayout envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit; +extern const upb_msglayout envoy_api_v2_route_RateLimit_Action_GenericKey_msginit; +extern const upb_msglayout envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit; +extern const upb_msglayout envoy_api_v2_route_HeaderMatcher_msginit; +extern const upb_msglayout envoy_api_v2_route_QueryParameterMatcher_msginit; + +static const upb_msglayout *layouts[44] = { + &envoy_api_v2_route_VirtualHost_msginit, + &envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_msginit, + &envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_msginit, + &envoy_api_v2_route_FilterAction_msginit, + &envoy_api_v2_route_Route_msginit, + &envoy_api_v2_route_Route_PerFilterConfigEntry_msginit, + &envoy_api_v2_route_Route_TypedPerFilterConfigEntry_msginit, + &envoy_api_v2_route_WeightedCluster_msginit, + &envoy_api_v2_route_WeightedCluster_ClusterWeight_msginit, + &envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_msginit, + &envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit, + &envoy_api_v2_route_RouteMatch_msginit, + &envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_msginit, + &envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_msginit, + &envoy_api_v2_route_CorsPolicy_msginit, + &envoy_api_v2_route_RouteAction_msginit, + &envoy_api_v2_route_RouteAction_RequestMirrorPolicy_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_Header_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_Cookie_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_msginit, + &envoy_api_v2_route_RouteAction_HashPolicy_FilterState_msginit, + &envoy_api_v2_route_RouteAction_UpgradeConfig_msginit, + &envoy_api_v2_route_RetryPolicy_msginit, + &envoy_api_v2_route_RetryPolicy_RetryPriority_msginit, + &envoy_api_v2_route_RetryPolicy_RetryHostPredicate_msginit, + &envoy_api_v2_route_RetryPolicy_RetryBackOff_msginit, + &envoy_api_v2_route_HedgePolicy_msginit, + &envoy_api_v2_route_RedirectAction_msginit, + &envoy_api_v2_route_DirectResponseAction_msginit, + &envoy_api_v2_route_Decorator_msginit, + &envoy_api_v2_route_Tracing_msginit, + &envoy_api_v2_route_VirtualCluster_msginit, + &envoy_api_v2_route_RateLimit_msginit, + &envoy_api_v2_route_RateLimit_Action_msginit, + &envoy_api_v2_route_RateLimit_Action_SourceCluster_msginit, + &envoy_api_v2_route_RateLimit_Action_DestinationCluster_msginit, + &envoy_api_v2_route_RateLimit_Action_RequestHeaders_msginit, + &envoy_api_v2_route_RateLimit_Action_RemoteAddress_msginit, + &envoy_api_v2_route_RateLimit_Action_GenericKey_msginit, + &envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_msginit, + &envoy_api_v2_route_HeaderMatcher_msginit, + &envoy_api_v2_route_QueryParameterMatcher_msginit, +}; + +static const char descriptor[14899] = {'\n', ')', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'r', 'o', 'u', 't', 'e', '/', 'r', 'o', 'u', 't', +'e', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\022', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', +'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'e', 'n', 'v', 'o', 'y', +'/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'r', 'e', 'g', 'e', 'x', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 's', 't', 'r', 'i', +'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\030', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'p', 'e', 'r', 'c', +'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\026', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'r', 'a', 'n', +'g', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '&', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 't', 'r', 'a', 'c', +'i', 'n', 'g', '/', 'v', '2', '/', 'c', 'u', 's', 't', 'o', 'm', '_', 't', 'a', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', +'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', +'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', +'s', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', 'v', 'o', +'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'i', 'o', 'n', +'.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', +'m', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', +'d', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\221', '\r', '\n', '\013', 'V', +'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', +'\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', ',', '\n', '\007', 'd', 'o', 'm', 'a', 'i', 'n', 's', +'\030', '\002', ' ', '\003', '(', '\t', 'B', '\022', '\372', 'B', '\017', '\222', '\001', '\014', '\010', '\001', '\"', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', +'\000', 'R', '\007', 'd', 'o', 'm', 'a', 'i', 'n', 's', '\022', '1', '\n', '\006', 'r', 'o', 'u', 't', 'e', 's', '\030', '\003', ' ', '\003', '(', +'\013', '2', '\031', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', +'u', 't', 'e', 'R', '\006', 'r', 'o', 'u', 't', 'e', 's', '\022', ']', '\n', '\013', 'r', 'e', 'q', 'u', 'i', 'r', 'e', '_', 't', 'l', +'s', '\030', '\004', ' ', '\001', '(', '\016', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', +'u', 't', 'e', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', '.', 'T', 'l', 's', 'R', 'e', 'q', 'u', 'i', 'r', +'e', 'm', 'e', 'n', 't', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\n', 'r', 'e', 'q', 'u', +'i', 'r', 'e', 'T', 'l', 's', '\022', 'M', '\n', '\020', 'v', 'i', 'r', 't', 'u', 'a', 'l', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', +'s', '\030', '\005', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', +'u', 't', 'e', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'C', 'l', 'u', 's', 't', 'e', 'r', 'R', '\017', 'v', 'i', 'r', 't', 'u', +'a', 'l', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', '>', '\n', '\013', 'r', 'a', 't', 'e', '_', 'l', 'i', 'm', 'i', 't', 's', +'\030', '\006', ' ', '\003', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', +'t', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'R', '\n', 'r', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 's', '\022', +'d', '\n', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', +'\030', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', +'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', +'\001', '\003', '\020', '\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', +'d', '\022', '9', '\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', +'e', 'm', 'o', 'v', 'e', '\030', '\r', ' ', '\003', '(', '\t', 'R', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', +'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', 'f', '\n', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', +'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\n', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', +'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\024', 'r', 'e', 's', 'p', 'o', 'n', +'s', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', ';', '\n', '\032', 'r', 'e', 's', 'p', 'o', 'n', 's', +'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\013', ' ', '\003', '(', '\t', +'R', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', +'\022', '2', '\n', '\004', 'c', 'o', 'r', 's', '\030', '\010', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'C', 'o', 'r', 's', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\004', 'c', 'o', +'r', 's', '\022', 'd', '\n', '\021', 'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\014', +' ', '\003', '(', '\013', '2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', +'.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', '.', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', +'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', 'B', '\002', '\030', '\001', 'R', '\017', 'p', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', +'n', 'f', 'i', 'g', '\022', 'p', '\n', '\027', 't', 'y', 'p', 'e', 'd', '_', 'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_', +'c', 'o', 'n', 'f', 'i', 'g', '\030', '\017', ' ', '\003', '(', '\013', '2', '9', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', '.', 'T', 'y', 'p', 'e', +'d', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', 'R', '\024', 't', 'y', +'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'A', '\n', '\035', 'i', 'n', 'c', +'l', 'u', 'd', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'a', 't', 't', 'e', 'm', 'p', 't', '_', 'c', 'o', 'u', 'n', +'t', '\030', '\016', ' ', '\001', '(', '\010', 'R', '\032', 'i', 'n', 'c', 'l', 'u', 'd', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', 'A', 't', +'t', 'e', 'm', 'p', 't', 'C', 'o', 'u', 'n', 't', '\022', 'H', '\n', '!', 'i', 'n', 'c', 'l', 'u', 'd', 'e', '_', 'a', 't', 't', +'e', 'm', 'p', 't', '_', 'c', 'o', 'u', 'n', 't', '_', 'i', 'n', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '\030', '\023', ' ', +'\001', '(', '\010', 'R', '\035', 'i', 'n', 'c', 'l', 'u', 'd', 'e', 'A', 't', 't', 'e', 'm', 'p', 't', 'C', 'o', 'u', 'n', 't', 'I', +'n', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', 'B', '\n', '\014', 'r', 'e', 't', 'r', 'y', '_', 'p', 'o', 'l', 'i', 'c', 'y', +'\030', '\020', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', +'t', 'e', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\013', 'r', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', +'c', 'y', '\022', 'O', '\n', '\031', 'r', 'e', 't', 'r', 'y', '_', 'p', 'o', 'l', 'i', 'c', 'y', '_', 't', 'y', 'p', 'e', 'd', '_', +'c', 'o', 'n', 'f', 'i', 'g', '\030', '\024', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\026', 'r', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', 'T', 'y', 'p', +'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'B', '\n', '\014', 'h', 'e', 'd', 'g', 'e', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', +'\021', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', +'e', '.', 'H', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\013', 'h', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', 'c', +'y', '\022', '`', '\n', '\036', 'p', 'e', 'r', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'l', +'i', 'm', 'i', 't', '_', 'b', 'y', 't', 'e', 's', '\030', '\022', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\032', 'p', 'e', +'r', 'R', 'e', 'q', 'u', 'e', 's', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'B', 'y', 't', 'e', 's', '\032', +'[', '\n', '\024', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', '\022', '\020', +'\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '-', '\n', '\005', 'v', 'a', 'l', 'u', 'e', +'\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'S', 't', 'r', 'u', 'c', 't', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\032', ']', '\n', '\031', 'T', 'y', 'p', 'e', +'d', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', +'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '*', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', +' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', +'y', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', ':', '\n', '\022', 'T', 'l', 's', 'R', 'e', 'q', 'u', 'i', 'r', +'e', 'm', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\022', '\010', '\n', '\004', 'N', 'O', 'N', 'E', '\020', '\000', '\022', '\021', '\n', '\r', 'E', 'X', +'T', 'E', 'R', 'N', 'A', 'L', '_', 'O', 'N', 'L', 'Y', '\020', '\001', '\022', '\007', '\n', '\003', 'A', 'L', 'L', '\020', '\002', 'J', '\004', '\010', +'\t', '\020', '\n', '\"', '<', '\n', '\014', 'F', 'i', 'l', 't', 'e', 'r', 'A', 'c', 't', 'i', 'o', 'n', '\022', ',', '\n', '\006', 'a', 'c', +'t', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\006', 'a', 'c', 't', 'i', 'o', 'n', '\"', '\346', '\n', '\n', '\005', 'R', 'o', 'u', 't', 'e', +'\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\016', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '>', '\n', '\005', 'm', +'a', 't', 'c', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', +'\020', '\001', 'R', '\005', 'm', 'a', 't', 'c', 'h', '\022', '7', '\n', '\005', 'r', 'o', 'u', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', +'\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', +'e', 'A', 'c', 't', 'i', 'o', 'n', 'H', '\000', 'R', '\005', 'r', 'o', 'u', 't', 'e', '\022', '@', '\n', '\010', 'r', 'e', 'd', 'i', 'r', +'e', 'c', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', 'n', 'H', '\000', 'R', '\010', 'r', +'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', 'S', '\n', '\017', 'd', 'i', 'r', 'e', 'c', 't', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', +'e', '\030', '\007', ' ', '\001', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', +'u', 't', 'e', '.', 'D', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'A', 'c', 't', 'i', 'o', 'n', 'H', +'\000', 'R', '\016', 'd', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', 'G', '\n', '\r', 'f', 'i', 'l', 't', +'e', 'r', '_', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\021', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'F', 'i', 'l', 't', 'e', 'r', 'A', 'c', 't', 'i', 'o', 'n', 'H', +'\000', 'R', '\014', 'f', 'i', 'l', 't', 'e', 'r', 'A', 'c', 't', 'i', 'o', 'n', '\022', '7', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', +'t', 'a', '\030', '\004', ' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', ';', '\n', +'\t', 'd', 'e', 'c', 'o', 'r', 'a', 't', 'o', 'r', '\030', '\005', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'o', 'r', 'R', '\t', 'd', +'e', 'c', 'o', 'r', 'a', 't', 'o', 'r', '\022', '^', '\n', '\021', 'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'o', +'n', 'f', 'i', 'g', '\030', '\010', ' ', '\003', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', '.', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', +'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', 'B', '\002', '\030', '\001', 'R', '\017', 'p', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', +'n', 'f', 'i', 'g', '\022', 'j', '\n', '\027', 't', 'y', 'p', 'e', 'd', '_', 'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_', +'c', 'o', 'n', 'f', 'i', 'g', '\030', '\r', ' ', '\003', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', '.', 'T', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', +'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', 'R', '\024', 't', 'y', 'p', 'e', 'd', 'P', 'e', 'r', +'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'd', '\n', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', +'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\t', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', +'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', +'s', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', '9', '\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', +'_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\014', ' ', '\003', '(', '\t', 'R', +'\026', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', 'f', +'\n', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', +'\030', '\n', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', +'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', +'\001', '\003', '\020', '\350', '\007', 'R', '\024', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', +'d', 'd', '\022', ';', '\n', '\032', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', +'_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\013', ' ', '\003', '(', '\t', 'R', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', +'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', '5', '\n', '\007', 't', 'r', 'a', 'c', 'i', 'n', 'g', '\030', +'\017', ' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', +'e', '.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', 'R', '\007', 't', 'r', 'a', 'c', 'i', 'n', 'g', '\022', '`', '\n', '\036', 'p', 'e', 'r', +'_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'l', 'i', 'm', 'i', 't', '_', 'b', 'y', 't', +'e', 's', '\030', '\020', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\032', 'p', 'e', 'r', 'R', 'e', 'q', 'u', 'e', 's', 't', +'B', 'u', 'f', 'f', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'B', 'y', 't', 'e', 's', '\032', '[', '\n', '\024', 'P', 'e', 'r', 'F', 'i', +'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', +'\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '-', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\005', +'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\032', ']', '\n', '\031', 'T', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', +'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', +'\t', 'R', '\003', 'k', 'e', 'y', '\022', '*', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\005', 'v', 'a', 'l', 'u', 'e', +':', '\002', '8', '\001', 'B', '\r', '\n', '\006', 'a', 'c', 't', 'i', 'o', 'n', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\006', '\020', '\007', +'\"', '\220', '\t', '\n', '\017', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', 'W', '\n', '\010', 'c', +'l', 'u', 's', 't', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', +'.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'W', 'e', 'i', 'g', 'h', 't', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', +'\010', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', 'H', '\n', '\014', 't', 'o', 't', 'a', 'l', '_', 'w', 'e', 'i', 'g', 'h', 't', +'\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\013', 't', 'o', 't', +'a', 'l', 'W', 'e', 'i', 'g', 'h', 't', '\022', ',', '\n', '\022', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '_', 'p', +'r', 'e', 'f', 'i', 'x', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\020', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', 'P', 'r', +'e', 'f', 'i', 'x', '\032', '\253', '\007', '\n', '\r', 'C', 'l', 'u', 's', 't', 'e', 'r', 'W', 'e', 'i', 'g', 'h', 't', '\022', '\033', '\n', +'\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', +'e', '\022', '4', '\n', '\006', 'w', 'e', 'i', 'g', 'h', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\006', 'w', +'e', 'i', 'g', 'h', 't', '\022', 'B', '\n', '\016', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'm', 'a', 't', 'c', 'h', '\030', '\003', +' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', +'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\r', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M', 'a', 't', 'c', 'h', '\022', 'd', +'\n', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', +'\004', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', +'.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', +'\003', '\020', '\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', +'\022', '9', '\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', +'m', 'o', 'v', 'e', '\030', '\t', ' ', '\003', '(', '\t', 'R', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', +'s', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', 'f', '\n', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', +'d', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\005', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', +'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\024', 'r', 'e', 's', 'p', 'o', 'n', 's', +'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', ';', '\n', '\032', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', +'_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\006', ' ', '\003', '(', '\t', 'R', +'\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', +'v', '\n', '\021', 'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\010', ' ', '\003', '(', +'\013', '2', 'F', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'W', 'e', +'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'W', 'e', 'i', 'g', +'h', 't', '.', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', 'B', '\002', +'\030', '\001', 'R', '\017', 'p', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\202', '\001', '\n', '\027', 't', +'y', 'p', 'e', 'd', '_', 'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\n', ' ', +'\003', '(', '\013', '2', 'K', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', +'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'W', 'e', +'i', 'g', 'h', 't', '.', 'T', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', +'E', 'n', 't', 'r', 'y', 'R', '\024', 't', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', +'i', 'g', '\032', '[', '\n', '\024', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', +'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '-', '\n', '\005', 'v', 'a', +'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\032', ']', '\n', '\031', 'T', +'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', '\022', +'\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '*', '\n', '\005', 'v', 'a', 'l', 'u', +'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'A', 'n', 'y', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', 'J', '\004', '\010', '\007', '\020', '\010', '\"', '\310', '\006', '\n', +'\n', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', '\022', '\030', '\n', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\001', ' ', '\001', +'(', '\t', 'H', '\000', 'R', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\022', '\024', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\002', ' ', '\001', '(', +'\t', 'H', '\000', 'R', '\004', 'p', 'a', 't', 'h', '\022', '(', '\n', '\005', 'r', 'e', 'g', 'e', 'x', '\030', '\003', ' ', '\001', '(', '\t', 'B', +'\020', '\030', '\001', '\372', 'B', '\005', 'r', '\003', '(', '\200', '\010', '\270', '\356', '\362', '\322', '\005', '\001', 'H', '\000', 'R', '\005', 'r', 'e', 'g', 'e', +'x', '\022', 'K', '\n', '\n', 's', 'a', 'f', 'e', '_', 'r', 'e', 'g', 'e', 'x', '\030', '\n', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', +'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', +'t', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\t', 's', 'a', 'f', 'e', 'R', 'e', +'g', 'e', 'x', '\022', 'A', '\n', '\016', 'c', 'a', 's', 'e', '_', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '\030', '\004', ' ', '\001', +'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', +'V', 'a', 'l', 'u', 'e', 'R', '\r', 'c', 'a', 's', 'e', 'S', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '\022', 'V', '\n', '\020', 'r', +'u', 'n', 't', 'i', 'm', 'e', '_', 'f', 'r', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\t', ' ', '\001', '(', '\013', '2', '+', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', +'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\017', 'r', 'u', 'n', 't', 'i', 'm', 'e', +'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', '\022', ';', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\006', ' ', '\003', '(', '\013', +'2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', 'e', 'a', +'d', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\022', 'T', '\n', '\020', 'q', 'u', +'e', 'r', 'y', '_', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\030', '\007', ' ', '\003', '(', '\013', '2', ')', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', +'a', 'm', 'e', 't', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\017', 'q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', +'e', 't', 'e', 'r', 's', '\022', 'H', '\n', '\004', 'g', 'r', 'p', 'c', '\030', '\010', ' ', '\001', '(', '\013', '2', '4', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', +'h', '.', 'G', 'r', 'p', 'c', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\004', +'g', 'r', 'p', 'c', '\022', 'V', '\n', '\013', 't', 'l', 's', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\013', ' ', '\001', '(', '\013', +'2', '5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', +'t', 'e', 'M', 'a', 't', 'c', 'h', '.', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'M', 'a', 't', 'c', 'h', 'O', 'p', +'t', 'i', 'o', 'n', 's', 'R', '\n', 't', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\032', '\027', '\n', '\025', 'G', 'r', 'p', 'c', +'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', 'O', 'p', 't', 'i', 'o', 'n', 's', '\032', '\214', '\001', '\n', '\026', 'T', 'l', 's', +'C', 'o', 'n', 't', 'e', 'x', 't', 'M', 'a', 't', 'c', 'h', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '8', '\n', '\t', 'p', 'r', +'e', 's', 'e', 'n', 't', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 'p', 'r', 'e', 's', 'e', 'n', 't', +'e', 'd', '\022', '8', '\n', '\t', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', +'\t', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'd', 'B', '\025', '\n', '\016', 'p', 'a', 't', 'h', '_', 's', 'p', 'e', 'c', 'i', 'f', +'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\005', '\020', '\006', '\"', '\252', '\005', '\n', '\n', 'C', 'o', 'r', 's', 'P', 'o', +'l', 'i', 'c', 'y', '\022', '+', '\n', '\014', 'a', 'l', 'l', 'o', 'w', '_', 'o', 'r', 'i', 'g', 'i', 'n', '\030', '\001', ' ', '\003', '(', +'\t', 'B', '\010', '\030', '\001', '\270', '\356', '\362', '\322', '\005', '\001', 'R', '\013', 'a', 'l', 'l', 'o', 'w', 'O', 'r', 'i', 'g', 'i', 'n', '\022', +'=', '\n', '\022', 'a', 'l', 'l', 'o', 'w', '_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 'r', 'e', 'g', 'e', 'x', '\030', '\010', ' ', '\003', +'(', '\t', 'B', '\017', '\030', '\001', '\372', 'B', '\n', '\222', '\001', '\007', '\"', '\005', 'r', '\003', '(', '\200', '\010', 'R', '\020', 'a', 'l', 'l', 'o', +'w', 'O', 'r', 'i', 'g', 'i', 'n', 'R', 'e', 'g', 'e', 'x', '\022', '\\', '\n', '\031', 'a', 'l', 'l', 'o', 'w', '_', 'o', 'r', 'i', +'g', 'i', 'n', '_', 's', 't', 'r', 'i', 'n', 'g', '_', 'm', 'a', 't', 'c', 'h', '\030', '\013', ' ', '\003', '(', '\013', '2', '!', '.', +'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'S', 't', 'r', 'i', 'n', 'g', +'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\026', 'a', 'l', 'l', 'o', 'w', 'O', 'r', 'i', 'g', 'i', 'n', 'S', 't', 'r', 'i', 'n', +'g', 'M', 'a', 't', 'c', 'h', '\022', '#', '\n', '\r', 'a', 'l', 'l', 'o', 'w', '_', 'm', 'e', 't', 'h', 'o', 'd', 's', '\030', '\002', +' ', '\001', '(', '\t', 'R', '\014', 'a', 'l', 'l', 'o', 'w', 'M', 'e', 't', 'h', 'o', 'd', 's', '\022', '#', '\n', '\r', 'a', 'l', 'l', +'o', 'w', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\014', 'a', 'l', 'l', 'o', 'w', 'H', 'e', +'a', 'd', 'e', 'r', 's', '\022', '%', '\n', '\016', 'e', 'x', 'p', 'o', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\004', +' ', '\001', '(', '\t', 'R', '\r', 'e', 'x', 'p', 'o', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', '\027', '\n', '\007', 'm', 'a', +'x', '_', 'a', 'g', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\006', 'm', 'a', 'x', 'A', 'g', 'e', '\022', 'G', '\n', '\021', 'a', 'l', +'l', 'o', 'w', '_', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030', '\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', +'\020', 'a', 'l', 'l', 'o', 'w', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', '@', '\n', '\007', 'e', 'n', 'a', 'b', +'l', 'e', 'd', '\030', '\007', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\030', '\001', '\270', '\356', '\362', '\322', '\005', '\001', 'H', '\000', 'R', +'\007', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\022', 'T', '\n', '\016', 'f', 'i', 'l', 't', 'e', 'r', '_', 'e', 'n', 'a', 'b', 'l', 'e', +'d', '\030', '\t', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', +'n', 't', 'H', '\000', 'R', '\r', 'f', 'i', 'l', 't', 'e', 'r', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\022', 'R', '\n', '\016', 's', 'h', +'a', 'd', 'o', 'w', '_', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\030', '\n', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', +'t', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\r', 's', 'h', 'a', 'd', 'o', 'w', 'E', 'n', 'a', 'b', +'l', 'e', 'd', 'B', '\023', '\n', '\021', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\"', +'\373', '\033', '\n', '\013', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '\022', '#', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', +'r', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'H', '\000', 'R', '\007', 'c', 'l', 'u', 's', 't', +'e', 'r', '\022', '6', '\n', '\016', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\002', ' ', '\001', '(', +'\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', ' ', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'H', '\000', 'R', '\r', 'c', 'l', 'u', 's', 't', +'e', 'r', 'H', 'e', 'a', 'd', 'e', 'r', '\022', 'R', '\n', '\021', 'w', 'e', 'i', 'g', 'h', 't', 'e', 'd', '_', 'c', 'l', 'u', 's', +'t', 'e', 'r', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'r', 'o', 'u', 't', 'e', '.', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', 'H', '\000', 'R', +'\020', 'w', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', '\213', '\001', '\n', '\037', 'c', 'l', 'u', +'s', 't', 'e', 'r', '_', 'n', 'o', 't', '_', 'f', 'o', 'u', 'n', 'd', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'c', +'o', 'd', 'e', '\030', '\024', ' ', '\001', '(', '\016', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', +'N', 'o', 't', 'F', 'o', 'u', 'n', 'd', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', 'B', '\010', '\372', 'B', '\005', +'\202', '\001', '\002', '\020', '\001', 'R', '\033', 'c', 'l', 'u', 's', 't', 'e', 'r', 'N', 'o', 't', 'F', 'o', 'u', 'n', 'd', 'R', 'e', 's', +'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', '\022', 'B', '\n', '\016', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'm', 'a', 't', +'c', 'h', '\030', '\004', ' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\r', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M', 'a', 't', +'c', 'h', '\022', '2', '\n', '\016', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '\030', '\005', ' ', '\001', '(', +'\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\r', 'p', 'r', 'e', 'f', 'i', 'x', 'R', 'e', 'w', +'r', 'i', 't', 'e', '\022', 'P', '\n', '\r', 'r', 'e', 'g', 'e', 'x', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '\030', ' ', ' ', '\001', +'(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'R', +'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'A', 'n', 'd', 'S', 'u', 'b', 's', 't', 'i', 't', 'u', 't', 'e', 'R', '\014', 'r', +'e', 'g', 'e', 'x', 'R', 'e', 'w', 'r', 'i', 't', 'e', '\022', 'L', '\n', '\014', 'h', 'o', 's', 't', '_', 'r', 'e', 'w', 'r', 'i', +'t', 'e', '\030', '\006', ' ', '\001', '(', '\t', 'B', '\'', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', '\362', '\230', '\376', '\217', +'\005', '\026', '\n', '\024', 'h', 'o', 's', 't', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 'l', 'i', 't', 'e', 'r', 'a', 'l', 'H', +'\001', 'R', '\013', 'h', 'o', 's', 't', 'R', 'e', 'w', 'r', 'i', 't', 'e', '\022', 'H', '\n', '\021', 'a', 'u', 't', 'o', '_', 'h', 'o', +'s', 't', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '\030', '\007', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'H', '\001', 'R', '\017', 'a', 'u', +'t', 'o', 'H', 'o', 's', 't', 'R', 'e', 'w', 'r', 'i', 't', 'e', '\022', 'a', '\n', '\030', 'a', 'u', 't', 'o', '_', 'h', 'o', 's', +'t', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\035', ' ', '\001', '(', '\t', 'B', '&', '\372', +'B', '\010', 'r', '\006', '\300', '\001', '\001', '\310', '\001', '\000', '\362', '\230', '\376', '\217', '\005', '\025', '\n', '\023', 'h', 'o', 's', 't', '_', 'r', 'e', +'w', 'r', 'i', 't', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 'H', '\001', 'R', '\025', 'a', 'u', 't', 'o', 'H', 'o', 's', 't', 'R', +'e', 'w', 'r', 'i', 't', 'e', 'H', 'e', 'a', 'd', 'e', 'r', '\022', '3', '\n', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\010', +' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', +'r', 'a', 't', 'i', 'o', 'n', 'R', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\022', '<', '\n', '\014', 'i', 'd', 'l', 'e', '_', 't', +'i', 'm', 'e', 'o', 'u', 't', '\030', '\030', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\013', 'i', 'd', 'l', 'e', 'T', 'i', 'm', 'e', 'o', +'u', 't', '\022', 'B', '\n', '\014', 'r', 'e', 't', 'r', 'y', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\t', ' ', '\001', '(', '\013', '2', +'\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 't', 'r', +'y', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\013', 'r', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'O', '\n', '\031', 'r', +'e', 't', 'r', 'y', '_', 'p', 'o', 'l', 'i', 'c', 'y', '_', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', +'!', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', +'n', 'y', 'R', '\026', 'r', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', 'T', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', +'g', '\022', 'k', '\n', '\025', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'm', 'i', 'r', 'r', 'o', 'r', '_', 'p', 'o', 'l', 'i', 'c', +'y', '\030', '\n', ' ', '\001', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', +'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'M', 'i', +'r', 'r', 'o', 'r', 'P', 'o', 'l', 'i', 'c', 'y', 'B', '\002', '\030', '\001', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'M', 'i', +'r', 'r', 'o', 'r', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'k', '\n', '\027', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'm', 'i', 'r', +'r', 'o', 'r', '_', 'p', 'o', 'l', 'i', 'c', 'i', 'e', 's', '\030', '\036', ' ', '\003', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', +'n', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'M', 'i', 'r', 'r', 'o', 'r', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\025', 'r', 'e', +'q', 'u', 'e', 's', 't', 'M', 'i', 'r', 'r', 'o', 'r', 'P', 'o', 'l', 'i', 'c', 'i', 'e', 's', '\022', 'H', '\n', '\010', 'p', 'r', +'i', 'o', 'r', 'i', 't', 'y', '\030', '\013', ' ', '\001', '(', '\016', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'o', 'u', 't', 'i', 'n', 'g', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', 'B', '\010', +'\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', '>', '\n', '\013', 'r', 'a', 't', +'e', '_', 'l', 'i', 'm', 'i', 't', 's', '\030', '\r', ' ', '\003', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'R', '\n', 'r', 'a', 't', +'e', 'L', 'i', 'm', 'i', 't', 's', '\022', 'O', '\n', '\026', 'i', 'n', 'c', 'l', 'u', 'd', 'e', '_', 'v', 'h', '_', 'r', 'a', 't', +'e', '_', 'l', 'i', 'm', 'i', 't', 's', '\030', '\016', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\023', 'i', 'n', 'c', 'l', 'u', 'd', +'e', 'V', 'h', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 's', '\022', 'K', '\n', '\013', 'h', 'a', 's', 'h', '_', 'p', 'o', 'l', +'i', 'c', 'y', '\030', '\017', ' ', '\003', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', +'i', 'c', 'y', 'R', '\n', 'h', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '2', '\n', '\004', 'c', 'o', 'r', 's', '\030', '\021', +' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', +'.', 'C', 'o', 'r', 's', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\004', 'c', 'o', 'r', 's', '\022', 'C', '\n', '\020', 'm', 'a', 'x', '_', +'g', 'r', 'p', 'c', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\027', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\016', 'm', 'a', 'x', +'G', 'r', 'p', 'c', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'I', '\n', '\023', 'g', 'r', 'p', 'c', '_', 't', 'i', 'm', 'e', 'o', +'u', 't', '_', 'o', 'f', 'f', 's', 'e', 't', '\030', '\034', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\021', 'g', 'r', 'p', 'c', 'T', 'i', +'m', 'e', 'o', 'u', 't', 'O', 'f', 'f', 's', 'e', 't', '\022', 'V', '\n', '\017', 'u', 'p', 'g', 'r', 'a', 'd', 'e', '_', 'c', 'o', +'n', 'f', 'i', 'g', 's', '\030', '\031', ' ', '\003', '(', '\013', '2', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', +'2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'U', 'p', 'g', 'r', 'a', +'d', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', +'p', '\n', '\030', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '_', 'a', 'c', 't', 'i', +'o', 'n', '\030', '\032', ' ', '\001', '(', '\016', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', +'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', +'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', 'n', 'R', '\026', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'R', +'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', 'n', '\022', 'R', '\n', '\026', 'm', 'a', 'x', '_', 'i', 'n', 't', 'e', +'r', 'n', 'a', 'l', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', 's', '\030', '\037', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', +'R', '\024', 'm', 'a', 'x', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 's', '\022', 'B', '\n', +'\014', 'h', 'e', 'd', 'g', 'e', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\033', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', +'c', 'y', 'R', '\013', 'h', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', 'c', 'y', '\032', '\374', '\001', '\n', '\023', 'R', 'e', 'q', 'u', 'e', +'s', 't', 'M', 'i', 'r', 'r', 'o', 'r', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '!', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', +'\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\022', +')', '\n', '\013', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\010', '\030', '\001', '\270', +'\356', '\362', '\322', '\005', '\001', 'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', '\022', 'V', '\n', '\020', 'r', 'u', 'n', 't', +'i', 'm', 'e', '_', 'f', 'r', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', +'t', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\017', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', +'c', 't', 'i', 'o', 'n', '\022', '?', '\n', '\r', 't', 'r', 'a', 'c', 'e', '_', 's', 'a', 'm', 'p', 'l', 'e', 'd', '\030', '\004', ' ', +'\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', +'l', 'V', 'a', 'l', 'u', 'e', 'R', '\014', 't', 'r', 'a', 'c', 'e', 'S', 'a', 'm', 'p', 'l', 'e', 'd', '\032', '\306', '\006', '\n', '\n', +'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'K', '\n', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\001', ' ', '\001', '(', +'\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', +'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'H', 'e', 'a', 'd', +'e', 'r', 'H', '\000', 'R', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\022', 'K', '\n', '\006', 'c', 'o', 'o', 'k', 'i', 'e', '\030', '\002', ' ', +'\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', +'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'C', 'o', +'o', 'k', 'i', 'e', 'H', '\000', 'R', '\006', 'c', 'o', 'o', 'k', 'i', 'e', '\022', 'v', '\n', '\025', 'c', 'o', 'n', 'n', 'e', 'c', 't', +'i', 'o', 'n', '_', 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '?', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', +'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', +'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', 'H', '\000', 'R', '\024', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'P', +'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '\022', 'd', '\n', '\017', 'q', 'u', 'e', 'r', 'y', '_', 'p', 'a', 'r', 'a', 'm', 'e', +'t', 'e', 'r', '\030', '\005', ' ', '\001', '(', '\013', '2', '9', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', +'i', 'c', 'y', '.', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'H', '\000', 'R', '\016', 'q', 'u', 'e', +'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\022', '[', '\n', '\014', 'f', 'i', 'l', 't', 'e', 'r', '_', 's', 't', 'a', +'t', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', +'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', +'c', 'y', '.', 'F', 'i', 'l', 't', 'e', 'r', 'S', 't', 'a', 't', 'e', 'H', '\000', 'R', '\013', 'f', 'i', 'l', 't', 'e', 'r', 'S', +'t', 'a', 't', 'e', '\022', '\032', '\n', '\010', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\010', 't', +'e', 'r', 'm', 'i', 'n', 'a', 'l', '\032', '8', '\n', '\006', 'H', 'e', 'a', 'd', 'e', 'r', '\022', '.', '\n', '\013', 'h', 'e', 'a', 'd', +'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', ' ', '\001', '\300', '\001', '\001', +'\310', '\001', '\000', 'R', '\n', 'h', 'e', 'a', 'd', 'e', 'r', 'N', 'a', 'm', 'e', '\032', 'f', '\n', '\006', 'C', 'o', 'o', 'k', 'i', 'e', +'\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', +'n', 'a', 'm', 'e', '\022', '+', '\n', '\003', 't', 't', 'l', '\030', '\002', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\003', 't', 't', 'l', '\022', +'\022', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\004', 'p', 'a', 't', 'h', '\032', '3', '\n', '\024', 'C', 'o', +'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '\022', '\033', '\n', '\t', 's', 'o', 'u', +'r', 'c', 'e', '_', 'i', 'p', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\010', 's', 'o', 'u', 'r', 'c', 'e', 'I', 'p', '\032', '-', '\n', +'\016', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', +' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\032', '(', '\n', '\013', 'F', 'i', +'l', 't', 'e', 'r', 'S', 't', 'a', 't', 'e', '\022', '\031', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', +'B', '\004', 'r', '\002', ' ', '\001', 'R', '\003', 'k', 'e', 'y', 'B', '\027', '\n', '\020', 'p', 'o', 'l', 'i', 'c', 'y', '_', 's', 'p', 'e', +'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\032', 'u', '\n', '\r', 'U', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', +'f', 'i', 'g', '\022', '.', '\n', '\014', 'u', 'p', 'g', 'r', 'a', 'd', 'e', '_', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\t', +'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\013', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'T', 'y', 'p', +'e', '\022', '4', '\n', '\007', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\007', 'e', 'n', +'a', 'b', 'l', 'e', 'd', '\"', 'E', '\n', '\033', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N', 'o', 't', 'F', 'o', 'u', 'n', 'd', 'R', +'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', '\022', '\027', '\n', '\023', 'S', 'E', 'R', 'V', 'I', 'C', 'E', '_', 'U', 'N', +'A', 'V', 'A', 'I', 'L', 'A', 'B', 'L', 'E', '\020', '\000', '\022', '\r', '\n', '\t', 'N', 'O', 'T', '_', 'F', 'O', 'U', 'N', 'D', '\020', +'\001', '\"', 'Z', '\n', '\026', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', +'o', 'n', '\022', '\"', '\n', '\036', 'P', 'A', 'S', 'S', '_', 'T', 'H', 'R', 'O', 'U', 'G', 'H', '_', 'I', 'N', 'T', 'E', 'R', 'N', +'A', 'L', '_', 'R', 'E', 'D', 'I', 'R', 'E', 'C', 'T', '\020', '\000', '\022', '\034', '\n', '\030', 'H', 'A', 'N', 'D', 'L', 'E', '_', 'I', +'N', 'T', 'E', 'R', 'N', 'A', 'L', '_', 'R', 'E', 'D', 'I', 'R', 'E', 'C', 'T', '\020', '\001', 'B', '\030', '\n', '\021', 'c', 'l', 'u', +'s', 't', 'e', 'r', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'B', '\030', '\n', '\026', 'h', 'o', +'s', 't', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', 'J', '\004', '\010', '\014', '\020', +'\r', 'J', '\004', '\010', '\022', '\020', '\023', 'J', '\004', '\010', '\023', '\020', '\024', 'J', '\004', '\010', '\020', '\020', '\021', 'J', '\004', '\010', '\026', '\020', '\027', +'J', '\004', '\010', '\025', '\020', '\026', '\"', '\363', '\t', '\n', '\013', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '\031', '\n', +'\010', 'r', 'e', 't', 'r', 'y', '_', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 'r', 'e', 't', 'r', 'y', 'O', 'n', '\022', +'=', '\n', '\013', 'n', 'u', 'm', '_', 'r', 'e', 't', 'r', 'i', 'e', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', +'R', '\n', 'n', 'u', 'm', 'R', 'e', 't', 'r', 'i', 'e', 's', '\022', 'A', '\n', '\017', 'p', 'e', 'r', '_', 't', 'r', 'y', '_', 't', +'i', 'm', 'e', 'o', 'u', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\r', 'p', 'e', 'r', 'T', 'r', 'y', 'T', 'i', 'm', +'e', 'o', 'u', 't', '\022', 'T', '\n', '\016', 'r', 'e', 't', 'r', 'y', '_', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\004', ' ', +'\001', '(', '\013', '2', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', +'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', +'R', '\r', 'r', 'e', 't', 'r', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', 'd', '\n', '\024', 'r', 'e', 't', 'r', 'y', '_', +'h', 'o', 's', 't', '_', 'p', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', '\030', '\005', ' ', '\003', '(', '\013', '2', '2', '.', 'e', 'n', +'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', +'i', 'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'H', 'o', 's', 't', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', 'R', '\022', 'r', +'e', 't', 'r', 'y', 'H', 'o', 's', 't', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', '\022', 'H', '\n', '!', 'h', 'o', 's', 't', +'_', 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '_', 'r', 'e', 't', 'r', 'y', '_', 'm', 'a', 'x', '_', 'a', 't', 't', 'e', +'m', 'p', 't', 's', '\030', '\006', ' ', '\001', '(', '\003', 'R', '\035', 'h', 'o', 's', 't', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', +'R', 'e', 't', 'r', 'y', 'M', 'a', 'x', 'A', 't', 't', 'e', 'm', 'p', 't', 's', '\022', '4', '\n', '\026', 'r', 'e', 't', 'r', 'i', +'a', 'b', 'l', 'e', '_', 's', 't', 'a', 't', 'u', 's', '_', 'c', 'o', 'd', 'e', 's', '\030', '\007', ' ', '\003', '(', '\r', 'R', '\024', +'r', 'e', 't', 'r', 'i', 'a', 'b', 'l', 'e', 'S', 't', 'a', 't', 'u', 's', 'C', 'o', 'd', 'e', 's', '\022', 'R', '\n', '\016', 'r', +'e', 't', 'r', 'y', '_', 'b', 'a', 'c', 'k', '_', 'o', 'f', 'f', '\030', '\010', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', +'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f', 'R', '\014', 'r', 'e', 't', 'r', 'y', 'B', 'a', 'c', +'k', 'O', 'f', 'f', '\022', 'N', '\n', '\021', 'r', 'e', 't', 'r', 'i', 'a', 'b', 'l', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', +'\030', '\t', ' ', '\003', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', +'t', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\020', 'r', 'e', 't', 'r', 'i', 'a', 'b', +'l', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', ']', '\n', '\031', 'r', 'e', 't', 'r', 'i', 'a', 'b', 'l', 'e', '_', 'r', 'e', +'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\n', ' ', '\003', '(', '\013', '2', '!', '.', 'e', 'n', 'v', +'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', +'c', 'h', 'e', 'r', 'R', '\027', 'r', 'e', 't', 'r', 'i', 'a', 'b', 'l', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', +'d', 'e', 'r', 's', '\032', '\255', '\001', '\n', '\r', 'R', 'e', 't', 'r', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', '\033', '\n', +'\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', +'e', '\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\006', +'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', +'\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', +'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', +'_', 't', 'y', 'p', 'e', '\032', '\262', '\001', '\n', '\022', 'R', 'e', 't', 'r', 'y', 'H', 'o', 's', 't', 'P', 'r', 'e', 'd', 'i', 'c', +'a', 't', 'e', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', +'\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\002', +'\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', +'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\013', +'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', '\032', '\242', '\001', '\n', '\014', 'R', 'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', +'O', 'f', 'f', '\022', 'J', '\n', '\r', 'b', 'a', 's', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\001', ' ', '\001', '(', +'\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', +'i', 'o', 'n', 'B', '\n', '\372', 'B', '\007', '\252', '\001', '\004', '\010', '\001', '*', '\000', 'R', '\014', 'b', 'a', 's', 'e', 'I', 'n', 't', 'e', +'r', 'v', 'a', 'l', '\022', 'F', '\n', '\014', 'm', 'a', 'x', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\001', '(', +'\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', +'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\013', 'm', 'a', 'x', 'I', 'n', 't', 'e', 'r', 'v', 'a', +'l', '\"', '\362', '\001', '\n', '\013', 'H', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'P', '\n', '\020', 'i', 'n', 'i', 't', +'i', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', +'\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\017', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', +'Y', '\n', '\031', 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'c', 'h', 'a', +'n', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'F', 'r', +'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\027', 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', +'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 'C', 'h', 'a', 'n', 'c', 'e', '\022', '6', '\n', '\030', 'h', 'e', 'd', 'g', 'e', '_', +'o', 'n', '_', 'p', 'e', 'r', '_', 't', 'r', 'y', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\003', ' ', '\001', '(', '\010', 'R', +'\024', 'h', 'e', 'd', 'g', 'e', 'O', 'n', 'P', 'e', 'r', 'T', 'r', 'y', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\"', '\335', '\004', '\n', +'\016', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', 'n', '\022', '\'', '\n', '\016', 'h', 't', 't', 'p', 's', '_', +'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\030', '\004', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\r', 'h', 't', 't', 'p', 's', 'R', 'e', +'d', 'i', 'r', 'e', 'c', 't', '\022', ')', '\n', '\017', 's', 'c', 'h', 'e', 'm', 'e', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', +'\030', '\007', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\016', 's', 'c', 'h', 'e', 'm', 'e', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', +'0', '\n', '\r', 'h', 'o', 's', 't', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\013', '\372', +'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\014', 'h', 'o', 's', 't', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', +'#', '\n', '\r', 'p', 'o', 'r', 't', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\030', '\010', ' ', '\001', '(', '\r', 'R', '\014', 'p', +'o', 'r', 't', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', '2', '\n', '\r', 'p', 'a', 't', 'h', '_', 'r', 'e', 'd', 'i', 'r', +'e', 'c', 't', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'H', '\001', 'R', +'\014', 'p', 'a', 't', 'h', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', '4', '\n', '\016', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'r', +'e', 'w', 'r', 'i', 't', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', +'H', '\001', 'R', '\r', 'p', 'r', 'e', 'f', 'i', 'x', 'R', 'e', 'w', 'r', 'i', 't', 'e', '\022', 'f', '\n', '\r', 'r', 'e', 's', 'p', +'o', 'n', 's', 'e', '_', 'c', 'o', 'd', 'e', '\030', '\003', ' ', '\001', '(', '\016', '2', '7', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', +'n', '.', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', 'B', '\010', '\372', +'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\014', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', '\022', '\037', '\n', '\013', +'s', 't', 'r', 'i', 'p', '_', 'q', 'u', 'e', 'r', 'y', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\n', 's', 't', 'r', 'i', 'p', 'Q', +'u', 'e', 'r', 'y', '\"', 'w', '\n', '\024', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', +'o', 'd', 'e', '\022', '\025', '\n', '\021', 'M', 'O', 'V', 'E', 'D', '_', 'P', 'E', 'R', 'M', 'A', 'N', 'E', 'N', 'T', 'L', 'Y', '\020', +'\000', '\022', '\t', '\n', '\005', 'F', 'O', 'U', 'N', 'D', '\020', '\001', '\022', '\r', '\n', '\t', 'S', 'E', 'E', '_', 'O', 'T', 'H', 'E', 'R', +'\020', '\002', '\022', '\026', '\n', '\022', 'T', 'E', 'M', 'P', 'O', 'R', 'A', 'R', 'Y', '_', 'R', 'E', 'D', 'I', 'R', 'E', 'C', 'T', '\020', +'\003', '\022', '\026', '\n', '\022', 'P', 'E', 'R', 'M', 'A', 'N', 'E', 'N', 'T', '_', 'R', 'E', 'D', 'I', 'R', 'E', 'C', 'T', '\020', '\004', +'B', '\032', '\n', '\030', 's', 'c', 'h', 'e', 'm', 'e', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', +'i', 'e', 'r', 'B', '\030', '\n', '\026', 'p', 'a', 't', 'h', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 's', 'p', 'e', 'c', 'i', +'f', 'i', 'e', 'r', '\"', 'm', '\n', '\024', 'D', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'A', 'c', 't', +'i', 'o', 'n', '\022', '\"', '\n', '\006', 's', 't', 'a', 't', 'u', 's', '\030', '\001', ' ', '\001', '(', '\r', 'B', '\n', '\372', 'B', '\007', '*', +'\005', '\020', '\330', '\004', '(', 'd', 'R', '\006', 's', 't', 'a', 't', 'u', 's', '\022', '1', '\n', '\004', 'b', 'o', 'd', 'y', '\030', '\002', ' ', +'\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', +'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\004', 'b', 'o', 'd', 'y', '\"', 'l', '\n', '\t', 'D', 'e', 'c', 'o', 'r', 'a', +'t', 'o', 'r', '\022', '%', '\n', '\t', 'o', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', +'B', '\004', 'r', '\002', ' ', '\001', 'R', '\t', 'o', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', '\022', '8', '\n', '\t', 'p', 'r', 'o', 'p', +'a', 'g', 'a', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 'p', 'r', 'o', 'p', 'a', 'g', 'a', 't', 'e', +'\"', '\246', '\002', '\n', '\007', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '\022', 'F', '\n', '\017', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 'a', +'m', 'p', 'l', 'i', 'n', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', +'.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'c', 'l', 'i', 'e', 'n', +'t', 'S', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\022', 'F', '\n', '\017', 'r', 'a', 'n', 'd', 'o', 'm', '_', 's', 'a', 'm', 'p', 'l', +'i', 'n', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'F', 'r', +'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'r', 'a', 'n', 'd', 'o', 'm', 'S', 'a', +'m', 'p', 'l', 'i', 'n', 'g', '\022', 'H', '\n', '\020', 'o', 'v', 'e', 'r', 'a', 'l', 'l', '_', 's', 'a', 'm', 'p', 'l', 'i', 'n', +'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'F', 'r', 'a', 'c', +'t', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\017', 'o', 'v', 'e', 'r', 'a', 'l', 'l', 'S', 'a', 'm', +'p', 'l', 'i', 'n', 'g', '\022', 'A', '\n', '\013', 'c', 'u', 's', 't', 'o', 'm', '_', 't', 'a', 'g', 's', '\030', '\004', ' ', '\003', '(', +'\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', +'.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', 'R', '\n', 'c', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', 's', '\"', '\332', '\001', +'\n', '\016', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', '*', '\n', '\007', 'p', 'a', 't', 't', 'e', +'r', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\020', '\030', '\001', '\372', 'B', '\005', 'r', '\003', '(', '\200', '\010', '\270', '\356', '\362', '\322', '\005', +'\001', 'R', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\022', ';', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\004', ' ', '\003', +'(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', +'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\022', '\033', '\n', '\004', +'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', +'\022', 'B', '\n', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\030', '\003', ' ', '\001', '(', '\016', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'M', 'e', 't', 'h', 'o', 'd', +'B', '\010', '\030', '\001', '\270', '\356', '\362', '\322', '\005', '\001', 'R', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\"', '\323', '\t', '\n', '\t', 'R', 'a', +'t', 'e', 'L', 'i', 'm', 'i', 't', '\022', ';', '\n', '\005', 's', 't', 'a', 'g', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', +'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', '\n', 'R', '\005', 's', 't', 'a', 'g', 'e', '\022', '\037', '\n', '\013', 'd', 'i', 's', +'a', 'b', 'l', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\n', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'K', 'e', +'y', '\022', 'H', '\n', '\007', 'a', 'c', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', +'A', 'c', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\007', 'a', 'c', 't', 'i', 'o', 'n', 's', +'\032', '\235', '\010', '\n', '\006', 'A', 'c', 't', 'i', 'o', 'n', '\022', '[', '\n', '\016', 's', 'o', 'u', 'r', 'c', 'e', '_', 'c', 'l', 'u', +'s', 't', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'S', +'o', 'u', 'r', 'c', 'e', 'C', 'l', 'u', 's', 't', 'e', 'r', 'H', '\000', 'R', '\r', 's', 'o', 'u', 'r', 'c', 'e', 'C', 'l', 'u', +'s', 't', 'e', 'r', '\022', 'j', '\n', '\023', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', '_', 'c', 'l', 'u', 's', 't', +'e', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', '7', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', +'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'D', 'e', 's', +'t', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'C', 'l', 'u', 's', 't', 'e', 'r', 'H', '\000', 'R', '\022', 'd', 'e', 's', 't', 'i', 'n', +'a', 't', 'i', 'o', 'n', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', '^', '\n', '\017', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', +'e', 'a', 'd', 'e', 'r', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', +'.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'H', '\000', 'R', '\016', 'r', 'e', 'q', 'u', 'e', 's', +'t', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', '[', '\n', '\016', 'r', 'e', 'm', 'o', 't', 'e', '_', 'a', 'd', 'd', 'r', 'e', 's', +'s', '\030', '\004', ' ', '\001', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', +'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'R', 'e', 'm', 'o', +'t', 'e', 'A', 'd', 'd', 'r', 'e', 's', 's', 'H', '\000', 'R', '\r', 'r', 'e', 'm', 'o', 't', 'e', 'A', 'd', 'd', 'r', 'e', 's', +'s', '\022', 'R', '\n', '\013', 'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 'k', 'e', 'y', '\030', '\005', ' ', '\001', '(', '\013', '2', '/', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', +'m', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'K', 'e', 'y', 'H', '\000', 'R', '\n', +'g', 'e', 'n', 'e', 'r', 'i', 'c', 'K', 'e', 'y', '\022', 'e', '\n', '\022', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'v', 'a', 'l', 'u', +'e', '_', 'm', 'a', 't', 'c', 'h', '\030', '\006', ' ', '\001', '(', '\013', '2', '5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', +'n', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', 'H', '\000', 'R', '\020', 'h', 'e', 'a', +'d', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', '\032', '\017', '\n', '\r', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'l', +'u', 's', 't', 'e', 'r', '\032', '\024', '\n', '\022', 'D', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'C', 'l', 'u', 's', 't', +'e', 'r', '\032', 'p', '\n', '\016', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', '.', '\n', '\013', 'h', +'e', 'a', 'd', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', ' ', '\001', +'\300', '\001', '\001', '\310', '\001', '\000', 'R', '\n', 'h', 'e', 'a', 'd', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '.', '\n', '\016', 'd', 'e', 's', +'c', 'r', 'i', 'p', 't', 'o', 'r', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', +'\001', 'R', '\r', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'K', 'e', 'y', '\032', '\017', '\n', '\r', 'R', 'e', 'm', 'o', 't', +'e', 'A', 'd', 'd', 'r', 'e', 's', 's', '\032', '@', '\n', '\n', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'K', 'e', 'y', '\022', '2', '\n', +'\020', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', +'\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\017', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'V', 'a', 'l', 'u', 'e', '\032', +'\314', '\001', '\n', '\020', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', '\022', '2', '\n', '\020', 'd', +'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', +'\004', 'r', '\002', ' ', '\001', 'R', '\017', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'V', 'a', 'l', 'u', 'e', '\022', '=', '\n', +'\014', 'e', 'x', 'p', 'e', 'c', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\013', 'e', +'x', 'p', 'e', 'c', 't', 'M', 'a', 't', 'c', 'h', '\022', 'E', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\003', ' ', '\003', +'(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', +'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\007', 'h', +'e', 'a', 'd', 'e', 'r', 's', 'B', '\027', '\n', '\020', 'a', 'c', 't', 'i', 'o', 'n', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', +'r', '\022', '\003', '\370', 'B', '\001', '\"', '\337', '\003', '\n', '\r', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', +'!', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', ' ', '\001', '\300', '\001', '\001', +'\310', '\001', '\000', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '!', '\n', '\013', 'e', 'x', 'a', 'c', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', +'\004', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\n', 'e', 'x', 'a', 'c', 't', 'M', 'a', 't', 'c', 'h', '\022', '3', '\n', '\013', 'r', 'e', +'g', 'e', 'x', '_', 'm', 'a', 't', 'c', 'h', '\030', '\005', ' ', '\001', '(', '\t', 'B', '\020', '\030', '\001', '\372', 'B', '\005', 'r', '\003', '(', +'\200', '\010', '\270', '\356', '\362', '\322', '\005', '\001', 'H', '\000', 'R', '\n', 'r', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', '\022', 'L', '\n', +'\020', 's', 'a', 'f', 'e', '_', 'r', 'e', 'g', 'e', 'x', '_', 'm', 'a', 't', 'c', 'h', '\030', '\013', ' ', '\001', '(', '\013', '2', ' ', +'.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'R', 'e', 'g', 'e', 'x', +'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\016', 's', 'a', 'f', 'e', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', +'\022', '9', '\n', '\013', 'r', 'a', 'n', 'g', 'e', '_', 'm', 'a', 't', 'c', 'h', '\030', '\006', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', +'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'I', 'n', 't', '6', '4', 'R', 'a', 'n', 'g', 'e', 'H', '\000', 'R', '\n', 'r', +'a', 'n', 'g', 'e', 'M', 'a', 't', 'c', 'h', '\022', '%', '\n', '\r', 'p', 'r', 'e', 's', 'e', 'n', 't', '_', 'm', 'a', 't', 'c', +'h', '\030', '\007', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\014', 'p', 'r', 'e', 's', 'e', 'n', 't', 'M', 'a', 't', 'c', 'h', '\022', ',', +'\n', '\014', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'm', 'a', 't', 'c', 'h', '\030', '\t', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', +'r', '\002', ' ', '\001', 'H', '\000', 'R', '\013', 'p', 'r', 'e', 'f', 'i', 'x', 'M', 'a', 't', 'c', 'h', '\022', ',', '\n', '\014', 's', 'u', +'f', 'f', 'i', 'x', '_', 'm', 'a', 't', 'c', 'h', '\030', '\n', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', +'H', '\000', 'R', '\013', 's', 'u', 'f', 'f', 'i', 'x', 'M', 'a', 't', 'c', 'h', '\022', '!', '\n', '\014', 'i', 'n', 'v', 'e', 'r', 't', +'_', 'm', 'a', 't', 'c', 'h', '\030', '\010', ' ', '\001', '(', '\010', 'R', '\013', 'i', 'n', 'v', 'e', 'r', 't', 'M', 'a', 't', 'c', 'h', +'B', '\030', '\n', '\026', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'm', 'a', 't', 'c', 'h', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', +'r', 'J', '\004', '\010', '\002', '\020', '\003', 'J', '\004', '\010', '\003', '\020', '\004', '\"', '\257', '\002', '\n', '\025', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', +'r', 'a', 'm', 'e', 't', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', '\036', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', +'\001', '(', '\t', 'B', '\n', '\372', 'B', '\007', 'r', '\005', ' ', '\001', '(', '\200', '\010', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\036', '\n', '\005', +'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'B', '\010', '\030', '\001', '\270', '\356', '\362', '\322', '\005', '\001', 'R', '\005', 'v', 'a', +'l', 'u', 'e', '\022', ':', '\n', '\005', 'r', 'e', 'g', 'e', 'x', '\030', '\004', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\030', '\001', +'\270', '\356', '\362', '\322', '\005', '\001', 'R', '\005', 'r', 'e', 'g', 'e', 'x', '\022', 'P', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_', 'm', +'a', 't', 'c', 'h', '\030', '\005', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', +'a', 't', 'c', 'h', 'e', 'r', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', +'\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', '\022', '%', '\n', '\r', 'p', +'r', 'e', 's', 'e', 'n', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', '\006', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\014', 'p', 'r', 'e', +'s', 'e', 'n', 't', 'M', 'a', 't', 'c', 'h', 'B', '!', '\n', '\037', 'q', 'u', 'e', 'r', 'y', '_', 'p', 'a', 'r', 'a', 'm', 'e', +'t', 'e', 'r', '_', 'm', 'a', 't', 'c', 'h', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', 'B', '_', '\n', ' ', 'i', 'o', +'.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'r', 'o', 'u', 't', 'e', 'B', '\024', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', 'P', 'r', 'o', +'t', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\027', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', +'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[15] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_type_matcher_regex_proto_upbdefinit, + &envoy_type_matcher_string_proto_upbdefinit, + &envoy_type_percent_proto_upbdefinit, + &envoy_type_range_proto_upbdefinit, + &envoy_type_tracing_v2_custom_tag_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &envoy_annotations_deprecation_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_route_route_components_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/route/route_components.proto", + UPB_STRVIEW_INIT(descriptor, 14899) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h new file mode 100644 index 00000000000..a9f215458d5 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.h @@ -0,0 +1,250 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/route/route_components.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_ROUTE_ROUTE_COMPONENTS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_ROUTE_ROUTE_COMPONENTS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_route_route_components_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_VirtualHost_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.VirtualHost"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_VirtualHost_PerFilterConfigEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.VirtualHost.PerFilterConfigEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_VirtualHost_TypedPerFilterConfigEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.VirtualHost.TypedPerFilterConfigEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_FilterAction_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.FilterAction"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_Route_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.Route"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_Route_PerFilterConfigEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.Route.PerFilterConfigEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_Route_TypedPerFilterConfigEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.Route.TypedPerFilterConfigEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_WeightedCluster_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.WeightedCluster"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_WeightedCluster_ClusterWeight_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.WeightedCluster.ClusterWeight"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_WeightedCluster_ClusterWeight_PerFilterConfigEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.WeightedCluster.ClusterWeight.PerFilterConfigEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteMatch_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteMatch"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteMatch_GrpcRouteMatchOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteMatch.GrpcRouteMatchOptions"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteMatch_TlsContextMatchOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteMatch.TlsContextMatchOptions"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_CorsPolicy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.CorsPolicy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_RequestMirrorPolicy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction.RequestMirrorPolicy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_HashPolicy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction.HashPolicy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_HashPolicy_Header_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction.HashPolicy.Header"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_HashPolicy_Cookie_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction.HashPolicy.Cookie"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_HashPolicy_ConnectionProperties_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction.HashPolicy.ConnectionProperties"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_HashPolicy_QueryParameter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction.HashPolicy.QueryParameter"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_HashPolicy_FilterState_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction.HashPolicy.FilterState"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RouteAction_UpgradeConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RouteAction.UpgradeConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RetryPolicy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RetryPolicy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RetryPolicy_RetryPriority_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RetryPolicy.RetryPriority"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RetryPolicy_RetryHostPredicate_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RetryPolicy.RetryHostPredicate"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RetryPolicy_RetryBackOff_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RetryPolicy.RetryBackOff"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_HedgePolicy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.HedgePolicy"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RedirectAction_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RedirectAction"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_DirectResponseAction_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.DirectResponseAction"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_Decorator_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.Decorator"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_Tracing_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.Tracing"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_VirtualCluster_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.VirtualCluster"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RateLimit_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RateLimit"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RateLimit_Action_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RateLimit.Action"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RateLimit_Action_SourceCluster_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RateLimit.Action.SourceCluster"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RateLimit_Action_DestinationCluster_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RateLimit.Action.DestinationCluster"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RateLimit_Action_RequestHeaders_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RateLimit.Action.RequestHeaders"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RateLimit_Action_RemoteAddress_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RateLimit.Action.RemoteAddress"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RateLimit_Action_GenericKey_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RateLimit.Action.GenericKey"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_RateLimit_Action_HeaderValueMatch_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.RateLimit.Action.HeaderValueMatch"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_HeaderMatcher_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.HeaderMatcher"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_route_QueryParameterMatcher_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_route_route_components_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.route.QueryParameterMatcher"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_ROUTE_ROUTE_COMPONENTS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c new file mode 100644 index 00000000000..37c03e6766f --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c @@ -0,0 +1,63 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/scoped_route.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/scoped_route.upbdefs.h" + +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_msginit; +extern const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_msginit; +extern const upb_msglayout envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit; + +static const upb_msglayout *layouts[3] = { + &envoy_api_v2_ScopedRouteConfiguration_msginit, + &envoy_api_v2_ScopedRouteConfiguration_Key_msginit, + &envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_msginit, +}; + +static const char descriptor[586] = {'\n', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', +'t', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\036', 'u', +'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', +'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', +'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', +'d', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\341', '\002', '\n', '\030', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', +'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', +'\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'A', '\n', '\030', 'r', 'o', 'u', +'t', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '_', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', +'(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\026', 'r', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', +'r', 'a', 't', 'i', 'o', 'n', 'N', 'a', 'm', 'e', '\022', 'F', '\n', '\003', 'k', 'e', 'y', '\030', '\003', ' ', '\001', '(', '\013', '2', '*', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', +'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'K', 'e', 'y', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', +'\020', '\001', 'R', '\003', 'k', 'e', 'y', '\032', '\234', '\001', '\n', '\003', 'K', 'e', 'y', '\022', '[', '\n', '\t', 'f', 'r', 'a', 'g', 'm', 'e', +'n', 't', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', +'K', 'e', 'y', '.', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\t', 'f', +'r', 'a', 'g', 'm', 'e', 'n', 't', 's', '\032', '8', '\n', '\010', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', '\022', '\037', '\n', '\n', 's', +'t', 'r', 'i', 'n', 'g', '_', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\t', 's', 't', 'r', 'i', 'n', 'g', +'K', 'e', 'y', 'B', '\013', '\n', '\004', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', 'B', 'U', '\n', '\032', 'i', 'o', '.', 'e', 'n', +'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', 'B', '\020', 'S', 'c', +'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\027', '\022', '\025', 'e', +'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', +'\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[4] = { + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_scoped_route_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/scoped_route.proto", + UPB_STRVIEW_INIT(descriptor, 586) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h new file mode 100644 index 00000000000..8d5ba225641 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.h @@ -0,0 +1,45 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/scoped_route.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_SCOPED_ROUTE_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_SCOPED_ROUTE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_scoped_route_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_ScopedRouteConfiguration_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_scoped_route_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.ScopedRouteConfiguration"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_ScopedRouteConfiguration_Key_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_scoped_route_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.ScopedRouteConfiguration.Key"); +} + +UPB_INLINE const upb_msgdef *envoy_api_v2_ScopedRouteConfiguration_Key_Fragment_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_scoped_route_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.ScopedRouteConfiguration.Key.Fragment"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_SCOPED_ROUTE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c b/src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c new file mode 100644 index 00000000000..ab87f285aa0 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c @@ -0,0 +1,71 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/srds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/api/v2/srds.upbdefs.h" + +extern upb_def_init envoy_api_v2_discovery_proto_upbdefinit; +extern upb_def_init google_api_annotations_proto_upbdefinit; +extern upb_def_init envoy_annotations_resource_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init envoy_api_v2_scoped_route_proto_upbdefinit; +extern const upb_msglayout envoy_api_v2_SrdsDummy_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_api_v2_SrdsDummy_msginit, +}; + +static const char descriptor[744] = {'\n', '\027', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 's', 'r', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', +'\022', '\014', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', +'/', 'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', +'l', 'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', +' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u', 'r', +'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', +'s', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', +'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', +'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '.', 'p', +'r', 'o', 't', 'o', '\"', '\013', '\n', '\t', 'S', 'r', 'd', 's', 'D', 'u', 'm', 'm', 'y', '2', '\225', '\003', '\n', '\034', 'S', 'c', 'o', +'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', +'\022', '[', '\n', '\022', 'S', 't', 'r', 'e', 'a', 'm', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '\022', '\036', '.', +'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', +'u', 'e', 's', 't', '\032', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', +'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', 'd', '\n', '\021', 'D', 'e', 'l', +'t', 'a', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '\022', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', +'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', +'t', '\032', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', +'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', '\202', '\001', '\n', '\021', +'F', 'e', 't', 'c', 'h', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '\022', '\036', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', +'\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', +'e', 's', 'p', 'o', 'n', 's', 'e', '\"', ',', '\202', '\323', '\344', '\223', '\002', '\035', '\"', '\033', '/', 'v', '2', '/', 'd', 'i', 's', 'c', +'o', 'v', 'e', 'r', 'y', ':', 's', 'c', 'o', 'p', 'e', 'd', '-', 'r', 'o', 'u', 't', 'e', 's', '\202', '\323', '\344', '\223', '\002', '\003', +':', '\001', '*', '\032', '-', '\212', '\244', '\226', '\363', '\007', '\'', '\n', '%', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', +'B', 'R', '\n', '\032', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', 'B', '\t', 'S', 'r', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\362', '\230', '\376', '\217', +'\005', '\030', '\022', '\026', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', +'3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'P', '\005', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[7] = { + &envoy_api_v2_discovery_proto_upbdefinit, + &google_api_annotations_proto_upbdefinit, + &envoy_annotations_resource_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &envoy_api_v2_scoped_route_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_api_v2_srds_proto_upbdefinit = { + deps, + layouts, + "envoy/api/v2/srds.proto", + UPB_STRVIEW_INIT(descriptor, 744) +}; diff --git a/src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h b/src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h new file mode 100644 index 00000000000..77f5d85d9ac --- /dev/null +++ b/src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/api/v2/srds.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_API_V2_SRDS_PROTO_UPBDEFS_H_ +#define ENVOY_API_V2_SRDS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_api_v2_srds_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_api_v2_SrdsDummy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_api_v2_srds_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.api.v2.SrdsDummy"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_API_V2_SRDS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c new file mode 100644 index 00000000000..2b89775c429 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c @@ -0,0 +1,210 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/filter/accesslog/v2/accesslog.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/config/filter/accesslog/v2/accesslog.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_api_v2_route_route_components_proto_upbdefinit; +extern upb_def_init envoy_type_percent_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_AccessLog_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_AccessLogFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_ComparisonFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_DurationFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_TraceableFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_RuntimeFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_AndFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_OrFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_HeaderFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit; +extern const upb_msglayout envoy_config_filter_accesslog_v2_ExtensionFilter_msginit; + +static const upb_msglayout *layouts[14] = { + &envoy_config_filter_accesslog_v2_AccessLog_msginit, + &envoy_config_filter_accesslog_v2_AccessLogFilter_msginit, + &envoy_config_filter_accesslog_v2_ComparisonFilter_msginit, + &envoy_config_filter_accesslog_v2_StatusCodeFilter_msginit, + &envoy_config_filter_accesslog_v2_DurationFilter_msginit, + &envoy_config_filter_accesslog_v2_NotHealthCheckFilter_msginit, + &envoy_config_filter_accesslog_v2_TraceableFilter_msginit, + &envoy_config_filter_accesslog_v2_RuntimeFilter_msginit, + &envoy_config_filter_accesslog_v2_AndFilter_msginit, + &envoy_config_filter_accesslog_v2_OrFilter_msginit, + &envoy_config_filter_accesslog_v2_HeaderFilter_msginit, + &envoy_config_filter_accesslog_v2_ResponseFlagFilter_msginit, + &envoy_config_filter_accesslog_v2_GrpcStatusFilter_msginit, + &envoy_config_filter_accesslog_v2_ExtensionFilter_msginit, +}; + +static const char descriptor[3469] = {'\n', '0', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'f', 'i', 'l', 't', 'e', 'r', '/', 'a', 'c', 'c', +'e', 's', 's', 'l', 'o', 'g', '/', 'v', '2', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'p', 'r', 'o', 't', 'o', +'\022', ' ', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', +'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', +'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', ')', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', +'/', 'v', '2', '/', 'r', 'o', 'u', 't', 'e', '/', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', +'s', '.', 'p', 'r', 'o', 't', 'o', '\032', '\030', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'p', 'e', 'r', 'c', 'e', +'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', +'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', +'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', +'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', +'o', 't', 'o', '\"', '\353', '\001', '\n', '\t', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', +'\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'I', '\n', '\006', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\002', ' ', +'\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', +'.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'F', 'i', +'l', 't', 'e', 'r', 'R', '\006', 'f', 'i', 'l', 't', 'e', 'r', '\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', +'\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', +'u', 'c', 't', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', +'d', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', +'g', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', '\"', '\264', '\010', '\n', '\017', 'A', 'c', 'c', 'e', +'s', 's', 'L', 'o', 'g', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'b', '\n', '\022', 's', 't', 'a', 't', 'u', 's', '_', 'c', 'o', 'd', +'e', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', +'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', +'S', 't', 'a', 't', 'u', 's', 'C', 'o', 'd', 'e', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\020', 's', 't', 'a', 't', 'u', +'s', 'C', 'o', 'd', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\022', '[', '\n', '\017', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '_', 'f', +'i', 'l', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', '0', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', +'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'D', 'u', 'r', +'a', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\016', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'F', 'i', +'l', 't', 'e', 'r', '\022', 'o', '\n', '\027', 'n', 'o', 't', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '_', +'f', 'i', 'l', 't', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', +'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'N', 'o', +'t', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\024', 'n', 'o', 't', +'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'F', 'i', 'l', 't', 'e', 'r', '\022', '^', '\n', '\020', 't', 'r', 'a', 'c', +'e', 'a', 'b', 'l', 'e', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\004', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', +'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', +'.', 'v', '2', '.', 'T', 'r', 'a', 'c', 'e', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\017', 't', 'r', +'a', 'c', 'e', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'X', '\n', '\016', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', +'f', 'i', 'l', 't', 'e', 'r', '\030', '\005', ' ', '\001', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', +'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'R', 'u', +'n', 't', 'i', 'm', 'e', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\r', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'i', 'l', +'t', 'e', 'r', '\022', 'L', '\n', '\n', 'a', 'n', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\006', ' ', '\001', '(', '\013', '2', '+', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', +'s', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'n', 'd', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\t', 'a', 'n', 'd', +'F', 'i', 'l', 't', 'e', 'r', '\022', 'I', '\n', '\t', 'o', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\007', ' ', '\001', '(', '\013', +'2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', +'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'O', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\010', 'o', 'r', +'F', 'i', 'l', 't', 'e', 'r', '\022', 'U', '\n', '\r', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\010', +' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', +'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'F', 'i', 'l', 't', +'e', 'r', 'H', '\000', 'R', '\014', 'h', 'e', 'a', 'd', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'h', '\n', '\024', 'r', 'e', 's', +'p', 'o', 'n', 's', 'e', '_', 'f', 'l', 'a', 'g', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\t', ' ', '\001', '(', '\013', '2', '4', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', +'s', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'F', 'l', 'a', 'g', 'F', 'i', 'l', 't', +'e', 'r', 'H', '\000', 'R', '\022', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'F', 'l', 'a', 'g', 'F', 'i', 'l', 't', 'e', 'r', '\022', +'b', '\n', '\022', 'g', 'r', 'p', 'c', '_', 's', 't', 'a', 't', 'u', 's', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\n', ' ', '\001', +'(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', +'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'G', 'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', 'F', 'i', +'l', 't', 'e', 'r', 'H', '\000', 'R', '\020', 'g', 'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', 'F', 'i', 'l', 't', 'e', 'r', '\022', +'^', '\n', '\020', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\013', ' ', '\001', '(', '\013', +'2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', +'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', +'r', 'H', '\000', 'R', '\017', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\027', '\n', '\020', 'f', +'i', 'l', 't', 'e', 'r', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\"', '\271', '\001', '\n', '\020', +'C', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'O', '\n', '\002', 'o', 'p', '\030', '\001', ' ', +'\001', '(', '\016', '2', '5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', +'.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'C', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', 'F', +'i', 'l', 't', 'e', 'r', '.', 'O', 'p', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\002', 'o', 'p', '\022', '6', '\n', +'\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'U', 'I', 'n', 't', '3', '2', 'R', '\005', 'v', 'a', +'l', 'u', 'e', '\"', '\034', '\n', '\002', 'O', 'p', '\022', '\006', '\n', '\002', 'E', 'Q', '\020', '\000', '\022', '\006', '\n', '\002', 'G', 'E', '\020', '\001', +'\022', '\006', '\n', '\002', 'L', 'E', '\020', '\002', '\"', 'p', '\n', '\020', 'S', 't', 'a', 't', 'u', 's', 'C', 'o', 'd', 'e', 'F', 'i', 'l', +'t', 'e', 'r', '\022', '\\', '\n', '\n', 'c', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '2', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', +'s', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'C', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', +'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\n', 'c', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', '\"', 'n', '\n', +'\016', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\\', '\n', '\n', 'c', 'o', 'm', 'p', 'a', 'r', +'i', 's', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', +'.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'C', 'o', 'm', 'p', +'a', 'r', 'i', 's', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\n', 'c', +'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', '\"', '\026', '\n', '\024', 'N', 'o', 't', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', +'c', 'k', 'F', 'i', 'l', 't', 'e', 'r', '\"', '\021', '\n', '\017', 'T', 'r', 'a', 'c', 'e', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't', +'e', 'r', '\"', '\277', '\001', '\n', '\r', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\022', '(', '\n', '\013', 'r', +'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', +'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', '\022', 'F', '\n', '\017', 'p', 'e', 'r', 'c', 'e', 'n', 't', '_', 's', +'a', 'm', 'p', 'l', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', +'.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'p', 'e', 'r', 'c', 'e', +'n', 't', 'S', 'a', 'm', 'p', 'l', 'e', 'd', '\022', '<', '\n', '\032', 'u', 's', 'e', '_', 'i', 'n', 'd', 'e', 'p', 'e', 'n', 'd', +'e', 'n', 't', '_', 'r', 'a', 'n', 'd', 'o', 'm', 'n', 'e', 's', 's', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\030', 'u', 's', 'e', +'I', 'n', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 't', 'R', 'a', 'n', 'd', 'o', 'm', 'n', 'e', 's', 's', '\"', 'b', '\n', '\t', +'A', 'n', 'd', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'U', '\n', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', +'\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', +'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'F', 'i', 'l', 't', +'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\002', 'R', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\"', 'a', '\n', '\010', +'O', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'U', '\n', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\030', '\002', ' ', '\003', '(', '\013', +'2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', +'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'F', 'i', 'l', 't', 'e', +'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\002', 'R', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\"', 'S', '\n', '\014', 'H', +'e', 'a', 'd', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'C', '\n', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\001', ' ', '\001', +'(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', +'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\006', 'h', +'e', 'a', 'd', 'e', 'r', '\"', '\210', '\001', '\n', '\022', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'F', 'l', 'a', 'g', 'F', 'i', 'l', +'t', 'e', 'r', '\022', 'r', '\n', '\005', 'f', 'l', 'a', 'g', 's', '\030', '\001', ' ', '\003', '(', '\t', 'B', '\\', '\372', 'B', 'Y', '\222', '\001', +'V', '\"', 'T', 'r', 'R', 'R', '\002', 'L', 'H', 'R', '\002', 'U', 'H', 'R', '\002', 'U', 'T', 'R', '\002', 'L', 'R', 'R', '\002', 'U', 'R', +'R', '\002', 'U', 'F', 'R', '\002', 'U', 'C', 'R', '\002', 'U', 'O', 'R', '\002', 'N', 'R', 'R', '\002', 'D', 'I', 'R', '\002', 'F', 'I', 'R', +'\002', 'R', 'L', 'R', '\004', 'U', 'A', 'E', 'X', 'R', '\004', 'R', 'L', 'S', 'E', 'R', '\002', 'D', 'C', 'R', '\003', 'U', 'R', 'X', 'R', +'\002', 'S', 'I', 'R', '\002', 'I', 'H', 'R', '\003', 'D', 'P', 'E', 'R', '\005', 'f', 'l', 'a', 'g', 's', '\"', '\315', '\003', '\n', '\020', 'G', +'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'd', '\n', '\010', 's', 't', 'a', 't', 'u', 's', +'e', 's', '\030', '\001', ' ', '\003', '(', '\016', '2', '9', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', +'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'G', 'r', 'p', 'c', 'S', 't', +'a', 't', 'u', 's', 'F', 'i', 'l', 't', 'e', 'r', '.', 'S', 't', 'a', 't', 'u', 's', 'B', '\r', '\372', 'B', '\n', '\222', '\001', '\007', +'\"', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\010', 's', 't', 'a', 't', 'u', 's', 'e', 's', '\022', '\030', '\n', '\007', 'e', 'x', 'c', 'l', +'u', 'd', 'e', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\007', 'e', 'x', 'c', 'l', 'u', 'd', 'e', '\"', '\270', '\002', '\n', '\006', 'S', 't', +'a', 't', 'u', 's', '\022', '\006', '\n', '\002', 'O', 'K', '\020', '\000', '\022', '\014', '\n', '\010', 'C', 'A', 'N', 'C', 'E', 'L', 'E', 'D', '\020', +'\001', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\002', '\022', '\024', '\n', '\020', 'I', 'N', 'V', 'A', 'L', 'I', 'D', +'_', 'A', 'R', 'G', 'U', 'M', 'E', 'N', 'T', '\020', '\003', '\022', '\025', '\n', '\021', 'D', 'E', 'A', 'D', 'L', 'I', 'N', 'E', '_', 'E', +'X', 'C', 'E', 'E', 'D', 'E', 'D', '\020', '\004', '\022', '\r', '\n', '\t', 'N', 'O', 'T', '_', 'F', 'O', 'U', 'N', 'D', '\020', '\005', '\022', +'\022', '\n', '\016', 'A', 'L', 'R', 'E', 'A', 'D', 'Y', '_', 'E', 'X', 'I', 'S', 'T', 'S', '\020', '\006', '\022', '\025', '\n', '\021', 'P', 'E', +'R', 'M', 'I', 'S', 'S', 'I', 'O', 'N', '_', 'D', 'E', 'N', 'I', 'E', 'D', '\020', '\007', '\022', '\026', '\n', '\022', 'R', 'E', 'S', 'O', +'U', 'R', 'C', 'E', '_', 'E', 'X', 'H', 'A', 'U', 'S', 'T', 'E', 'D', '\020', '\010', '\022', '\027', '\n', '\023', 'F', 'A', 'I', 'L', 'E', +'D', '_', 'P', 'R', 'E', 'C', 'O', 'N', 'D', 'I', 'T', 'I', 'O', 'N', '\020', '\t', '\022', '\013', '\n', '\007', 'A', 'B', 'O', 'R', 'T', +'E', 'D', '\020', '\n', '\022', '\020', '\n', '\014', 'O', 'U', 'T', '_', 'O', 'F', '_', 'R', 'A', 'N', 'G', 'E', '\020', '\013', '\022', '\021', '\n', +'\r', 'U', 'N', 'I', 'M', 'P', 'L', 'E', 'M', 'E', 'N', 'T', 'E', 'D', '\020', '\014', '\022', '\014', '\n', '\010', 'I', 'N', 'T', 'E', 'R', +'N', 'A', 'L', '\020', '\r', '\022', '\017', '\n', '\013', 'U', 'N', 'A', 'V', 'A', 'I', 'L', 'A', 'B', 'L', 'E', '\020', '\016', '\022', '\r', '\n', +'\t', 'D', 'A', 'T', 'A', '_', 'L', 'O', 'S', 'S', '\020', '\017', '\022', '\023', '\n', '\017', 'U', 'N', 'A', 'U', 'T', 'H', 'E', 'N', 'T', +'I', 'C', 'A', 'T', 'E', 'D', '\020', '\020', '\"', '\246', '\001', '\n', '\017', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'F', 'i', 'l', +'t', 'e', 'r', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '5', +'\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', +'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', +'2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', +'\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', +'p', 'e', 'B', 'k', '\n', '.', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', +'v', '2', 'B', '\016', 'A', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', +'\033', '\022', '\031', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', +'.', 'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[9] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_api_v2_route_route_components_proto_upbdefinit, + &envoy_type_percent_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit = { + deps, + layouts, + "envoy/config/filter/accesslog/v2/accesslog.proto", + UPB_STRVIEW_INIT(descriptor, 3469) +}; diff --git a/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h new file mode 100644 index 00000000000..4f7b5450548 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.h @@ -0,0 +1,100 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/filter/accesslog/v2/accesslog.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPBDEFS_H_ +#define ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_AccessLog_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.AccessLog"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_AccessLogFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.AccessLogFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_ComparisonFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.ComparisonFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_StatusCodeFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.StatusCodeFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_DurationFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.DurationFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_NotHealthCheckFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.NotHealthCheckFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_TraceableFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.TraceableFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_RuntimeFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.RuntimeFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_AndFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.AndFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_OrFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.OrFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_HeaderFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.HeaderFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_ResponseFlagFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.ResponseFlagFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_GrpcStatusFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.GrpcStatusFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_accesslog_v2_ExtensionFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.accesslog.v2.ExtensionFilter"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_CONFIG_FILTER_ACCESSLOG_V2_ACCESSLOG_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c new file mode 100644 index 00000000000..07f2c2e3bd4 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c @@ -0,0 +1,385 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_config_source_proto_upbdefinit; +extern upb_def_init envoy_api_v2_core_protocol_proto_upbdefinit; +extern upb_def_init envoy_api_v2_route_proto_upbdefinit; +extern upb_def_init envoy_api_v2_scoped_route_proto_upbdefinit; +extern upb_def_init envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit; +extern upb_def_init envoy_config_trace_v2_http_tracer_proto_upbdefinit; +extern upb_def_init envoy_type_percent_proto_upbdefinit; +extern upb_def_init envoy_type_tracing_v2_custom_tag_proto_upbdefinit; +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_Rds_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit; +extern const upb_msglayout envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_msginit; + +static const upb_msglayout *layouts[15] = { + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_msginit, + &envoy_config_filter_network_http_connection_manager_v2_Rds_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, + &envoy_config_filter_network_http_connection_manager_v2_ScopedRds_msginit, + &envoy_config_filter_network_http_connection_manager_v2_HttpFilter_msginit, + &envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_msginit, +}; + +static const char descriptor[7393] = {'\n', 'T', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'f', 'i', 'l', 't', 'e', 'r', '/', 'n', 'e', 't', +'w', 'o', 'r', 'k', '/', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', +'g', 'e', 'r', '/', 'v', '2', '/', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', +'n', 'a', 'g', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '6', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', +'.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', +'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '\032', '%', 'e', 'n', 'v', 'o', 'y', '/', +'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', +'.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', +'/', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '.', 'p', 'r', 'o', 't', 'o', '\032', '\030', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', +'i', '/', 'v', '2', '/', 'r', 'o', 'u', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', +'p', 'i', '/', 'v', '2', '/', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', +'0', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'f', 'i', 'l', 't', 'e', 'r', '/', 'a', 'c', 'c', 'e', +'s', 's', 'l', 'o', 'g', '/', 'v', '2', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', +'\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 't', 'r', 'a', 'c', 'e', '/', 'v', '2', '/', 'h', 't', +'t', 'p', '_', 't', 'r', 'a', 'c', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '\030', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', +'p', 'e', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '&', 'e', 'n', 'v', 'o', 'y', '/', 't', +'y', 'p', 'e', '/', 't', 'r', 'a', 'c', 'i', 'n', 'g', '/', 'v', '2', '/', 'c', 'u', 's', 't', 'o', 'm', '_', 't', 'a', 'g', +'.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', +'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', +'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'd', 'e', 'p', +'r', 'e', 'c', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', +'t', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', +'t', 'o', '\"', '\304', '#', '\n', '\025', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', +'g', 'e', 'r', '\022', '\200', '\001', '\n', '\n', 'c', 'o', 'd', 'e', 'c', '_', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\016', '2', +'W', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', +'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', +'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', +'g', 'e', 'r', '.', 'C', 'o', 'd', 'e', 'c', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\t', +'c', 'o', 'd', 'e', 'c', 'T', 'y', 'p', 'e', '\022', '(', '\n', '\013', 's', 't', 'a', 't', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', +'\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\n', 's', 't', 'a', 't', 'P', 'r', 'e', 'f', 'i', +'x', '\022', 'O', '\n', '\003', 'r', 'd', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', +'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', +'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'R', 'd', 's', +'H', '\000', 'R', '\003', 'r', 'd', 's', '\022', 'E', '\n', '\014', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\004', +' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'R', 'o', 'u', 't', 'e', +'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'H', '\000', 'R', '\013', 'r', 'o', 'u', 't', 'e', 'C', 'o', 'n', +'f', 'i', 'g', '\022', 'k', '\n', '\r', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', 's', '\030', '\037', ' ', '\001', '(', +'\013', '2', 'D', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', +'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', +'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', 'H', '\000', 'R', '\014', +'s', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '\022', 'e', '\n', '\014', 'h', 't', 't', 'p', '_', 'f', 'i', 'l', 't', +'e', 'r', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', 'B', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', +'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', +'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'F', 'i', 'l', 't', +'e', 'r', 'R', '\013', 'h', 't', 't', 'p', 'F', 'i', 'l', 't', 'e', 'r', 's', '\022', '@', '\n', '\016', 'a', 'd', 'd', '_', 'u', 's', +'e', 'r', '_', 'a', 'g', 'e', 'n', 't', '\030', '\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\014', 'a', 'd', 'd', 'U', 's', 'e', +'r', 'A', 'g', 'e', 'n', 't', '\022', 'o', '\n', '\007', 't', 'r', 'a', 'c', 'i', 'n', 'g', '\030', '\007', ' ', '\001', '(', '\013', '2', 'U', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', +'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', +'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', +'e', 'r', '.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', 'R', '\007', 't', 'r', 'a', 'c', 'i', 'n', 'g', '\022', 'g', '\n', '\034', 'c', 'o', +'m', 'm', 'o', 'n', '_', 'h', 't', 't', 'p', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', +'s', '\030', '#', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', +'r', 'e', '.', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\031', 'c', +'o', 'm', 'm', 'o', 'n', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', +'[', '\n', '\025', 'h', 't', 't', 'p', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\010', ' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', +'.', 'H', 't', 't', 'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\023', 'h', 't', +'t', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', ']', '\n', '\026', 'h', 't', 't', 'p', +'2', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\t', ' ', '\001', '(', '\013', '2', +'\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', '2', +'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\024', 'h', 't', 't', 'p', '2', 'P', 'r', 'o', +'t', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '\037', '\n', '\013', 's', 'e', 'r', 'v', 'e', 'r', '_', 'n', 'a', +'m', 'e', '\030', '\n', ' ', '\001', '(', '\t', 'R', '\n', 's', 'e', 'r', 'v', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '\264', '\001', '\n', '\034', +'s', 'e', 'r', 'v', 'e', 'r', '_', 'h', 'e', 'a', 'd', 'e', 'r', '_', 't', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'a', 't', +'i', 'o', 'n', '\030', '\"', ' ', '\001', '(', '\016', '2', 'h', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', +'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', +'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', +'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'S', 'e', 'r', 'v', 'e', 'r', 'H', 'e', 'a', 'd', 'e', +'r', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', +'R', '\032', 's', 'e', 'r', 'v', 'e', 'r', 'H', 'e', 'a', 'd', 'e', 'r', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'a', 't', +'i', 'o', 'n', '\022', '\\', '\n', '\026', 'm', 'a', 'x', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', +'s', '_', 'k', 'b', '\030', '\035', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\t', '\372', 'B', '\006', '*', '\004', '\030', '`', ' ', +'\000', 'R', '\023', 'm', 'a', 'x', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'K', 'b', '\022', 'F', '\n', +'\014', 'i', 'd', 'l', 'e', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\013', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\010', '\030', '\001', +'\270', '\356', '\362', '\322', '\005', '\001', 'R', '\013', 'i', 'd', 'l', 'e', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'I', '\n', '\023', 's', 't', +'r', 'e', 'a', 'm', '_', 'i', 'd', 'l', 'e', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\030', ' ', '\001', '(', '\013', '2', '\031', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', +'R', '\021', 's', 't', 'r', 'e', 'a', 'm', 'I', 'd', 'l', 'e', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'B', '\n', '\017', 'r', 'e', +'q', 'u', 'e', 's', 't', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\034', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\016', 'r', 'e', +'q', 'u', 'e', 's', 't', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '>', '\n', '\r', 'd', 'r', 'a', 'i', 'n', '_', 't', 'i', 'm', +'e', 'o', 'u', 't', '\030', '\014', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\014', 'd', 'r', 'a', 'i', 'n', 'T', 'i', 'm', 'e', 'o', 'u', +'t', '\022', 'M', '\n', '\025', 'd', 'e', 'l', 'a', 'y', 'e', 'd', '_', 'c', 'l', 'o', 's', 'e', '_', 't', 'i', 'm', 'e', 'o', 'u', +'t', '\030', '\032', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\023', 'd', 'e', 'l', 'a', 'y', 'e', 'd', 'C', 'l', 'o', 's', 'e', 'T', 'i', +'m', 'e', 'o', 'u', 't', '\022', 'J', '\n', '\n', 'a', 'c', 'c', 'e', 's', 's', '_', 'l', 'o', 'g', '\030', '\r', ' ', '\003', '(', '\013', +'2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', +'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'R', '\t', 'a', 'c', 'c', +'e', 's', 's', 'L', 'o', 'g', '\022', 'H', '\n', '\022', 'u', 's', 'e', '_', 'r', 'e', 'm', 'o', 't', 'e', '_', 'a', 'd', 'd', 'r', +'e', 's', 's', '\030', '\016', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\020', 'u', 's', 'e', 'R', 'e', 'm', 'o', 't', 'e', 'A', 'd', +'d', 'r', 'e', 's', 's', '\022', '/', '\n', '\024', 'x', 'f', 'f', '_', 'n', 'u', 'm', '_', 't', 'r', 'u', 's', 't', 'e', 'd', '_', +'h', 'o', 'p', 's', '\030', '\023', ' ', '\001', '(', '\r', 'R', '\021', 'x', 'f', 'f', 'N', 'u', 'm', 'T', 'r', 'u', 's', 't', 'e', 'd', +'H', 'o', 'p', 's', '\022', '\233', '\001', '\n', '\027', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', +'_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\031', ' ', '\001', '(', '\013', '2', 'c', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', +'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', +'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', +'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'I', 'n', 't', 'e', 'r', 'n', 'a', +'l', 'A', 'd', 'd', 'r', 'e', 's', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\025', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', +'d', 'd', 'r', 'e', 's', 's', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '&', '\n', '\017', 's', 'k', 'i', 'p', '_', 'x', 'f', 'f', '_', +'a', 'p', 'p', 'e', 'n', 'd', '\030', '\025', ' ', '\001', '(', '\010', 'R', '\r', 's', 'k', 'i', 'p', 'X', 'f', 'f', 'A', 'p', 'p', 'e', +'n', 'd', '\022', '\020', '\n', '\003', 'v', 'i', 'a', '\030', '\026', ' ', '\001', '(', '\t', 'R', '\003', 'v', 'i', 'a', '\022', 'J', '\n', '\023', 'g', +'e', 'n', 'e', 'r', 'a', 't', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'i', 'd', '\030', '\017', ' ', '\001', '(', '\013', '2', +'\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', +'u', 'e', 'R', '\021', 'g', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'd', '\022', '?', '\n', '\034', +'p', 'r', 'e', 's', 'e', 'r', 'v', 'e', '_', 'e', 'x', 't', 'e', 'r', 'n', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', +'_', 'i', 'd', '\030', ' ', ' ', '\001', '(', '\010', 'R', '\031', 'p', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'E', 'x', 't', 'e', 'r', 'n', +'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'd', '\022', '\257', '\001', '\n', '\033', 'f', 'o', 'r', 'w', 'a', 'r', 'd', '_', 'c', +'l', 'i', 'e', 'n', 't', '_', 'c', 'e', 'r', 't', '_', 'd', 'e', 't', 'a', 'i', 'l', 's', '\030', '\020', ' ', '\001', '(', '\016', '2', +'f', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', +'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', +'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', +'g', 'e', 'r', '.', 'F', 'o', 'r', 'w', 'a', 'r', 'd', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'D', 'e', 't', 'a', +'i', 'l', 's', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\030', 'f', 'o', 'r', 'w', 'a', 'r', 'd', 'C', 'l', 'i', +'e', 'n', 't', 'C', 'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', '\022', '\257', '\001', '\n', '\037', 's', 'e', 't', '_', 'c', 'u', +'r', 'r', 'e', 'n', 't', '_', 'c', 'l', 'i', 'e', 'n', 't', '_', 'c', 'e', 'r', 't', '_', 'd', 'e', 't', 'a', 'i', 'l', 's', +'\030', '\021', ' ', '\001', '(', '\013', '2', 'i', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', +'t', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', +'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', +'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'S', 'e', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'C', 'l', 'i', 'e', +'n', 't', 'C', 'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', 'R', '\033', 's', 'e', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', +'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', '\022', ',', '\n', '\022', 'p', 'r', 'o', 'x', +'y', '_', '1', '0', '0', '_', 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', '\030', '\022', ' ', '\001', '(', '\010', 'R', '\020', 'p', 'r', 'o', +'x', 'y', '1', '0', '0', 'C', 'o', 'n', 't', 'i', 'n', 'u', 'e', '\022', 'e', '\n', '1', 'r', 'e', 'p', 'r', 'e', 's', 'e', 'n', +'t', '_', 'i', 'p', 'v', '4', '_', 'r', 'e', 'm', 'o', 't', 'e', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', '_', 'a', 's', '_', +'i', 'p', 'v', '4', '_', 'm', 'a', 'p', 'p', 'e', 'd', '_', 'i', 'p', 'v', '6', '\030', '\024', ' ', '\001', '(', '\010', 'R', '*', 'r', +'e', 'p', 'r', 'e', 's', 'e', 'n', 't', 'I', 'p', 'v', '4', 'R', 'e', 'm', 'o', 't', 'e', 'A', 'd', 'd', 'r', 'e', 's', 's', +'A', 's', 'I', 'p', 'v', '4', 'M', 'a', 'p', 'p', 'e', 'd', 'I', 'p', 'v', '6', '\022', '\204', '\001', '\n', '\017', 'u', 'p', 'g', 'r', +'a', 'd', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\027', ' ', '\003', '(', '\013', '2', '[', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', +'t', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', +'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'U', 'p', 'g', +'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', +'s', '\022', 'A', '\n', '\016', 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '_', 'p', 'a', 't', 'h', '\030', '\036', ' ', '\001', '(', '\013', +'2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', +'l', 'u', 'e', 'R', '\r', 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', 'P', 'a', 't', 'h', '\022', '#', '\n', '\r', 'm', 'e', 'r', +'g', 'e', '_', 's', 'l', 'a', 's', 'h', 'e', 's', '\030', '!', ' ', '\001', '(', '\010', 'R', '\014', 'm', 'e', 'r', 'g', 'e', 'S', 'l', +'a', 's', 'h', 'e', 's', '\022', '|', '\n', '\024', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'i', 'd', '_', 'e', 'x', 't', 'e', 'n', +'s', 'i', 'o', 'n', '\030', '$', ' ', '\001', '(', '\013', '2', 'J', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', +'.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', +'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', +'I', 'D', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', '\022', 'r', 'e', 'q', 'u', 'e', 's', 't', 'I', 'd', 'E', 'x', 't', +'e', 'n', 's', 'i', 'o', 'n', '\032', '\266', '\005', '\n', '\007', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '\022', '\234', '\001', '\n', '\016', 'o', 'p', +'e', 'r', 'a', 't', 'i', 'o', 'n', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\016', '2', 'c', '.', 'e', 'n', 'v', 'o', +'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', +'t', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', +'.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'T', 'r', +'a', 'c', 'i', 'n', 'g', '.', 'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', 'N', 'a', 'm', 'e', 'B', '\020', '\030', '\001', '\372', 'B', +'\005', '\202', '\001', '\002', '\020', '\001', '\270', '\356', '\362', '\322', '\005', '\001', 'R', '\r', 'o', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', 'N', 'a', +'m', 'e', '\022', ';', '\n', '\030', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 'f', 'o', 'r', +'_', 't', 'a', 'g', 's', '\030', '\002', ' ', '\003', '(', '\t', 'B', '\002', '\030', '\001', 'R', '\025', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', +'e', 'a', 'd', 'e', 'r', 's', 'F', 'o', 'r', 'T', 'a', 'g', 's', '\022', '<', '\n', '\017', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', +'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\023', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', +'e', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'c', 'l', 'i', 'e', 'n', 't', 'S', 'a', 'm', 'p', 'l', 'i', 'n', 'g', +'\022', '<', '\n', '\017', 'r', 'a', 'n', 'd', 'o', 'm', '_', 's', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\004', ' ', '\001', '(', '\013', +'2', '\023', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'r', 'a', +'n', 'd', 'o', 'm', 'S', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\022', '>', '\n', '\020', 'o', 'v', 'e', 'r', 'a', 'l', 'l', '_', 's', +'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\005', ' ', '\001', '(', '\013', '2', '\023', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', +'e', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\017', 'o', 'v', 'e', 'r', 'a', 'l', 'l', 'S', 'a', 'm', 'p', 'l', 'i', 'n', +'g', '\022', '\030', '\n', '\007', 'v', 'e', 'r', 'b', 'o', 's', 'e', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\007', 'v', 'e', 'r', 'b', 'o', +'s', 'e', '\022', 'K', '\n', '\023', 'm', 'a', 'x', '_', 'p', 'a', 't', 'h', '_', 't', 'a', 'g', '_', 'l', 'e', 'n', 'g', 't', 'h', +'\030', '\007', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\020', 'm', 'a', 'x', 'P', 'a', 't', 'h', 'T', 'a', 'g', 'L', 'e', +'n', 'g', 't', 'h', '\022', 'A', '\n', '\013', 'c', 'u', 's', 't', 'o', 'm', '_', 't', 'a', 'g', 's', '\030', '\010', ' ', '\003', '(', '\013', +'2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', '.', +'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', 'R', '\n', 'c', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', 's', '\022', '?', '\n', '\010', +'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\030', '\t', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', +'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e', '.', 'v', '2', '.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'H', 't', 't', +'p', 'R', '\010', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\"', '(', '\n', '\r', 'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', 'N', +'a', 'm', 'e', '\022', '\013', '\n', '\007', 'I', 'N', 'G', 'R', 'E', 'S', 'S', '\020', '\000', '\022', '\n', '\n', '\006', 'E', 'G', 'R', 'E', 'S', +'S', '\020', '\001', '\032', ':', '\n', '\025', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', 'd', 'd', 'r', 'e', 's', 's', 'C', 'o', 'n', +'f', 'i', 'g', '\022', '!', '\n', '\014', 'u', 'n', 'i', 'x', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '\030', '\001', ' ', '\001', '(', '\010', +'R', '\013', 'u', 'n', 'i', 'x', 'S', 'o', 'c', 'k', 'e', 't', 's', '\032', '\247', '\001', '\n', '\033', 'S', 'e', 't', 'C', 'u', 'r', 'r', +'e', 'n', 't', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', '\022', '4', '\n', '\007', 's', +'u', 'b', 'j', 'e', 'c', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\007', 's', 'u', 'b', 'j', 'e', 'c', 't', '\022', +'\022', '\n', '\004', 'c', 'e', 'r', 't', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\004', 'c', 'e', 'r', 't', '\022', '\024', '\n', '\005', 'c', 'h', +'a', 'i', 'n', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\005', 'c', 'h', 'a', 'i', 'n', '\022', '\020', '\n', '\003', 'd', 'n', 's', '\030', '\004', +' ', '\001', '(', '\010', 'R', '\003', 'd', 'n', 's', '\022', '\020', '\n', '\003', 'u', 'r', 'i', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\003', 'u', +'r', 'i', 'J', '\004', '\010', '\002', '\020', '\003', '\032', '\306', '\001', '\n', '\r', 'U', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', +'g', '\022', '!', '\n', '\014', 'u', 'p', 'g', 'r', 'a', 'd', 'e', '_', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', +'u', 'p', 'g', 'r', 'a', 'd', 'e', 'T', 'y', 'p', 'e', '\022', '\\', '\n', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\030', '\002', ' ', +'\003', '(', '\013', '2', 'B', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', +'.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', +'m', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'F', 'i', 'l', 't', 'e', 'r', 'R', '\007', 'f', 'i', +'l', 't', 'e', 'r', 's', '\022', '4', '\n', '\007', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', +'R', '\007', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\"', '6', '\n', '\t', 'C', 'o', 'd', 'e', 'c', 'T', 'y', 'p', 'e', '\022', '\010', '\n', +'\004', 'A', 'U', 'T', 'O', '\020', '\000', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '1', '\020', '\001', '\022', '\t', '\n', '\005', 'H', 'T', 'T', +'P', '2', '\020', '\002', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '3', '\020', '\003', '\"', 'S', '\n', '\032', 'S', 'e', 'r', 'v', 'e', 'r', +'H', 'e', 'a', 'd', 'e', 'r', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', '\022', '\r', '\n', '\t', 'O', +'V', 'E', 'R', 'W', 'R', 'I', 'T', 'E', '\020', '\000', '\022', '\024', '\n', '\020', 'A', 'P', 'P', 'E', 'N', 'D', '_', 'I', 'F', '_', 'A', +'B', 'S', 'E', 'N', 'T', '\020', '\001', '\022', '\020', '\n', '\014', 'P', 'A', 'S', 'S', '_', 'T', 'H', 'R', 'O', 'U', 'G', 'H', '\020', '\002', +'\"', 'y', '\n', '\030', 'F', 'o', 'r', 'w', 'a', 'r', 'd', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'D', 'e', 't', 'a', +'i', 'l', 's', '\022', '\014', '\n', '\010', 'S', 'A', 'N', 'I', 'T', 'I', 'Z', 'E', '\020', '\000', '\022', '\020', '\n', '\014', 'F', 'O', 'R', 'W', +'A', 'R', 'D', '_', 'O', 'N', 'L', 'Y', '\020', '\001', '\022', '\022', '\n', '\016', 'A', 'P', 'P', 'E', 'N', 'D', '_', 'F', 'O', 'R', 'W', +'A', 'R', 'D', '\020', '\002', '\022', '\020', '\n', '\014', 'S', 'A', 'N', 'I', 'T', 'I', 'Z', 'E', '_', 'S', 'E', 'T', '\020', '\003', '\022', '\027', +'\n', '\023', 'A', 'L', 'W', 'A', 'Y', 'S', '_', 'F', 'O', 'R', 'W', 'A', 'R', 'D', '_', 'O', 'N', 'L', 'Y', '\020', '\004', 'B', '\026', +'\n', '\017', 'r', 'o', 'u', 't', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', +'\033', '\020', '\034', '\"', '\212', '\001', '\n', '\003', 'R', 'd', 's', '\022', 'N', '\n', '\r', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', +'r', 'c', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', +'c', 'o', 'r', 'e', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', +'\020', '\001', 'R', '\014', 'c', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '3', '\n', '\021', 'r', 'o', 'u', 't', 'e', +'_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', +' ', '\001', 'R', '\017', 'r', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'N', 'a', 'm', 'e', '\"', '\221', '\001', '\n', '\035', 'S', +'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', 'L', +'i', 's', 't', '\022', 'p', '\n', '\033', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', +'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', +'p', 'i', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', +'a', 't', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\031', 's', 'c', 'o', 'p', 'e', 'd', 'R', 'o', +'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', '\"', '\244', '\n', '\n', '\014', 'S', 'c', 'o', +'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', +'\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\212', '\001', '\n', '\021', 's', 'c', 'o', 'p', 'e', '_', 'k', +'e', 'y', '_', 'b', 'u', 'i', 'l', 'd', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', 'T', '.', 'e', 'n', 'v', 'o', 'y', '.', +'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', +'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'S', +'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', +'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\017', 's', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', +'l', 'd', 'e', 'r', '\022', 'U', '\n', '\021', 'r', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', +'\030', '\003', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', +'e', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', +'\017', 'r', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '\240', '\001', '\n', ' ', 's', 'c', 'o', 'p', +'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', '_', 'l', +'i', 's', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', 'U', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', +'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', +'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', +'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', 'L', 'i', 's', 't', 'H', '\000', 'R', '\035', +'s', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', +'L', 'i', 's', 't', '\022', 'b', '\n', '\n', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'd', 's', '\030', '\005', ' ', '\001', '(', '\013', '2', +'A', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', +'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', +'g', 'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'd', 's', 'H', '\000', 'R', '\t', 's', 'c', 'o', 'p', 'e', +'d', 'R', 'd', 's', '\032', '\362', '\005', '\n', '\017', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '\022', +'\214', '\001', '\n', '\t', 'f', 'r', 'a', 'g', 'm', 'e', 'n', 't', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', 'd', '.', 'e', 'n', 'v', +'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', +'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', +'2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', +'i', 'l', 'd', 'e', 'r', '.', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'e', 'r', 'B', '\010', '\372', 'B', +'\005', '\222', '\001', '\002', '\010', '\001', 'R', '\t', 'f', 'r', 'a', 'g', 'm', 'e', 'n', 't', 's', '\032', '\317', '\004', '\n', '\017', 'F', 'r', 'a', +'g', 'm', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '\022', '\261', '\001', '\n', '\026', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'v', +'a', 'l', 'u', 'e', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'o', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', 'y', '.', 'e', 'n', +'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', +'.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', +'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', +'u', 'i', 'l', 'd', 'e', 'r', '.', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'H', 'e', +'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'E', 'x', 't', 'r', 'a', 'c', 't', 'o', 'r', 'H', '\000', 'R', '\024', 'h', 'e', 'a', +'d', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'E', 'x', 't', 'r', 'a', 'c', 't', 'o', 'r', '\032', '\372', '\002', '\n', '\024', 'H', 'e', 'a', +'d', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'E', 'x', 't', 'r', 'a', 'c', 't', 'o', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', +'\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '+', '\n', '\021', +'e', 'l', 'e', 'm', 'e', 'n', 't', '_', 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\020', +'e', 'l', 'e', 'm', 'e', 'n', 't', 'S', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r', '\022', '\026', '\n', '\005', 'i', 'n', 'd', 'e', 'x', +'\030', '\003', ' ', '\001', '(', '\r', 'H', '\000', 'R', '\005', 'i', 'n', 'd', 'e', 'x', '\022', '\240', '\001', '\n', '\007', 'e', 'l', 'e', 'm', 'e', +'n', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\203', '\001', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', +'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', +'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', +'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'F', 'r', 'a', 'g', +'m', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'E', 'x', +'t', 'r', 'a', 'c', 't', 'o', 'r', '.', 'K', 'v', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'H', '\000', 'R', '\007', 'e', 'l', 'e', 'm', +'e', 'n', 't', '\032', 'M', '\n', '\t', 'K', 'v', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\022', '%', '\n', '\t', 's', 'e', 'p', 'a', 'r', +'a', 't', 'o', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\t', 's', 'e', 'p', 'a', +'r', 'a', 't', 'o', 'r', '\022', '\031', '\n', '\003', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', +' ', '\001', 'R', '\003', 'k', 'e', 'y', 'B', '\016', '\n', '\014', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 't', 'y', 'p', 'e', 'B', '\013', +'\n', '\004', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', 'B', '\027', '\n', '\020', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'p', 'e', +'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\"', 'o', '\n', '\t', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'd', 's', '\022', +'b', '\n', '\030', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', +'c', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', +'o', 'r', 'e', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', +'\001', 'R', '\025', 's', 'c', 'o', 'p', 'e', 'd', 'R', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\"', +'\260', '\001', '\n', '\n', 'H', 't', 't', 'p', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', +'\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\006', 'c', 'o', 'n', +'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', +'\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', +'d', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', +'\003', '\020', '\004', '\"', 'M', '\n', '\022', 'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'D', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', +'\022', '7', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\013', 't', 'y', 'p', 'e', +'d', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\257', '\001', '\n', 'D', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', +'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', +'e', 'r', '.', 'v', '2', 'B', '\032', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', +'g', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '=', '\022', ';', 'e', 'n', 'v', 'o', 'y', '.', 'e', +'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', +'.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', +'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[17] = { + &envoy_api_v2_core_config_source_proto_upbdefinit, + &envoy_api_v2_core_protocol_proto_upbdefinit, + &envoy_api_v2_route_proto_upbdefinit, + &envoy_api_v2_scoped_route_proto_upbdefinit, + &envoy_config_filter_accesslog_v2_accesslog_proto_upbdefinit, + &envoy_config_trace_v2_http_tracer_proto_upbdefinit, + &envoy_type_percent_proto_upbdefinit, + &envoy_type_tracing_v2_custom_tag_proto_upbdefinit, + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &google_protobuf_wrappers_proto_upbdefinit, + &envoy_annotations_deprecation_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit = { + deps, + layouts, + "envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto", + UPB_STRVIEW_INIT(descriptor, 7393) +}; diff --git a/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h new file mode 100644 index 00000000000..9e8a2d944a6 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.h @@ -0,0 +1,105 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_CONFIG_FILTER_NETWORK_HTTP_CONNECTION_MANAGER_V2_HTTP_CONNECTION_MANAGER_PROTO_UPBDEFS_H_ +#define ENVOY_CONFIG_FILTER_NETWORK_HTTP_CONNECTION_MANAGER_V2_HTTP_CONNECTION_MANAGER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_Tracing_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.Tracing"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_InternalAddressConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.InternalAddressConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_SetCurrentClientCertDetails_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.SetCurrentClientCertDetails"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_HttpConnectionManager_UpgradeConfig_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager.UpgradeConfig"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_Rds_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.Rds"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_ScopedRouteConfigurationsList_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.ScopedRouteConfigurationsList"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_ScopedRds_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.ScopedRds"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_HttpFilter_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.HttpFilter"); +} + +UPB_INLINE const upb_msgdef *envoy_config_filter_network_http_connection_manager_v2_RequestIDExtension_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_filter_network_http_connection_manager_v2_http_connection_manager_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.filter.network.http_connection_manager.v2.RequestIDExtension"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_CONFIG_FILTER_NETWORK_HTTP_CONNECTION_MANAGER_V2_HTTP_CONNECTION_MANAGER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c new file mode 100644 index 00000000000..c923416e1f0 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c @@ -0,0 +1,49 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/listener/v2/api_listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/config/listener/v2/api_listener.upbdefs.h" + +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern const upb_msglayout envoy_config_listener_v2_ApiListener_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_config_listener_v2_ApiListener_msginit, +}; + +static const char descriptor[343] = {'\n', '+', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'v', +'2', '/', 'a', 'p', 'i', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\030', 'e', 'n', 'v', +'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '2', '\032', '\031', 'g', 'o', +'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', +'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', +'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', +'t', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\"', 'F', '\n', '\013', 'A', 'p', 'i', 'L', 'i', 's', 't', 'e', 'n', 'e', +'r', '\022', '7', '\n', '\014', 'a', 'p', 'i', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\013', 'a', 'p', 'i', +'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'B', 'd', '\n', '&', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '2', +'B', '\020', 'A', 'p', 'i', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', +'\032', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', +'v', '3', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[4] = { + &google_protobuf_any_proto_upbdefinit, + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_config_listener_v2_api_listener_proto_upbdefinit = { + deps, + layouts, + "envoy/config/listener/v2/api_listener.proto", + UPB_STRVIEW_INIT(descriptor, 343) +}; diff --git a/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h new file mode 100644 index 00000000000..c4b2f5e638f --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/listener/v2/api_listener.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPBDEFS_H_ +#define ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_config_listener_v2_api_listener_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_config_listener_v2_ApiListener_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_listener_v2_api_listener_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.listener.v2.ApiListener"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_CONFIG_LISTENER_V2_API_LISTENER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upbdefs.c b/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upbdefs.c new file mode 100644 index 00000000000..6dbdf7d2ce1 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upbdefs.c @@ -0,0 +1,160 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/rbac/v2/rbac.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/config/rbac/v2/rbac.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_address_proto_upbdefinit; +extern upb_def_init envoy_api_v2_route_route_components_proto_upbdefinit; +extern upb_def_init envoy_type_matcher_metadata_proto_upbdefinit; +extern upb_def_init envoy_type_matcher_path_proto_upbdefinit; +extern upb_def_init envoy_type_matcher_string_proto_upbdefinit; +extern upb_def_init google_api_expr_v1alpha1_syntax_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_config_rbac_v2_RBAC_msginit; +extern const upb_msglayout envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit; +extern const upb_msglayout envoy_config_rbac_v2_Policy_msginit; +extern const upb_msglayout envoy_config_rbac_v2_Permission_msginit; +extern const upb_msglayout envoy_config_rbac_v2_Permission_Set_msginit; +extern const upb_msglayout envoy_config_rbac_v2_Principal_msginit; +extern const upb_msglayout envoy_config_rbac_v2_Principal_Set_msginit; +extern const upb_msglayout envoy_config_rbac_v2_Principal_Authenticated_msginit; + +static const upb_msglayout *layouts[8] = { + &envoy_config_rbac_v2_RBAC_msginit, + &envoy_config_rbac_v2_RBAC_PoliciesEntry_msginit, + &envoy_config_rbac_v2_Policy_msginit, + &envoy_config_rbac_v2_Permission_msginit, + &envoy_config_rbac_v2_Permission_Set_msginit, + &envoy_config_rbac_v2_Principal_msginit, + &envoy_config_rbac_v2_Principal_Set_msginit, + &envoy_config_rbac_v2_Principal_Authenticated_msginit, +}; + +static const char descriptor[2501] = {'\n', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'r', 'b', 'a', 'c', '/', 'v', '2', '/', 'r', 'b', +'a', 'c', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', +'a', 'c', '.', 'v', '2', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', +'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ')', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', +'v', '2', '/', 'r', 'o', 'u', 't', 'e', '/', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', +'.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', +'r', '/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'e', 'n', 'v', 'o', 'y', '/', 't', +'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'p', 'a', 't', 'h', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', +'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 's', 't', 'r', 'i', 'n', 'g', '.', +'p', 'r', 'o', 't', 'o', '\032', '%', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'e', 'x', 'p', 'r', '/', 'v', '1', +'a', 'l', 'p', 'h', 'a', '1', '/', 's', 'y', 'n', 't', 'a', 'x', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', +'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', +'\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', +'\"', '\201', '\002', '\n', '\004', 'R', 'B', 'A', 'C', '\022', '9', '\n', '\006', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\016', +'2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'R', +'B', 'A', 'C', '.', 'A', 'c', 't', 'i', 'o', 'n', 'R', '\006', 'a', 'c', 't', 'i', 'o', 'n', '\022', 'D', '\n', '\010', 'p', 'o', 'l', +'i', 'c', 'i', 'e', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', +'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'R', 'B', 'A', 'C', '.', 'P', 'o', 'l', 'i', 'c', 'i', 'e', 's', 'E', 'n', +'t', 'r', 'y', 'R', '\010', 'p', 'o', 'l', 'i', 'c', 'i', 'e', 's', '\032', 'Y', '\n', '\r', 'P', 'o', 'l', 'i', 'c', 'i', 'e', 's', +'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '2', +'\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', +'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\005', 'v', 'a', 'l', 'u', 'e', +':', '\002', '8', '\001', '\"', '\035', '\n', '\006', 'A', 'c', 't', 'i', 'o', 'n', '\022', '\t', '\n', '\005', 'A', 'L', 'L', 'O', 'W', '\020', '\000', +'\022', '\010', '\n', '\004', 'D', 'E', 'N', 'Y', '\020', '\001', '\"', '\337', '\001', '\n', '\006', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'L', '\n', '\013', +'p', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', +'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', +'n', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\013', 'p', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 's', '\022', +'I', '\n', '\n', 'p', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', +'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'r', 'i', 'n', 'c', 'i', 'p', +'a', 'l', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\n', 'p', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', 's', '\022', +'<', '\n', '\t', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', +'R', '\t', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', '\"', '\334', '\005', '\n', '\n', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', +'n', '\022', 'C', '\n', '\t', 'a', 'n', 'd', '_', 'r', 'u', 'l', 'e', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', +'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'e', 'r', 'm', 'i', 's', +'s', 'i', 'o', 'n', '.', 'S', 'e', 't', 'H', '\000', 'R', '\010', 'a', 'n', 'd', 'R', 'u', 'l', 'e', 's', '\022', 'A', '\n', '\010', 'o', +'r', '_', 'r', 'u', 'l', 'e', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', +'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', '.', 'S', 'e', +'t', 'H', '\000', 'R', '\007', 'o', 'r', 'R', 'u', 'l', 'e', 's', '\022', '\033', '\n', '\003', 'a', 'n', 'y', '\030', '\003', ' ', '\001', '(', '\010', +'B', '\007', '\372', 'B', '\004', 'j', '\002', '\010', '\001', 'H', '\000', 'R', '\003', 'a', 'n', 'y', '\022', ';', '\n', '\006', 'h', 'e', 'a', 'd', 'e', +'r', '\030', '\004', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', +'u', 't', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\006', 'h', 'e', 'a', 'd', +'e', 'r', '\022', '<', '\n', '\010', 'u', 'r', 'l', '_', 'p', 'a', 't', 'h', '\030', '\n', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', +'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'P', 'a', 't', 'h', 'M', 'a', 't', 'c', +'h', 'e', 'r', 'H', '\000', 'R', '\007', 'u', 'r', 'l', 'P', 'a', 't', 'h', '\022', 'E', '\n', '\016', 'd', 'e', 's', 't', 'i', 'n', 'a', +'t', 'i', 'o', 'n', '_', 'i', 'p', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', +'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'i', 'd', 'r', 'R', 'a', 'n', 'g', 'e', 'H', '\000', 'R', '\r', 'd', 'e', 's', +'t', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'I', 'p', '\022', '6', '\n', '\020', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', +'_', 'p', 'o', 'r', 't', '\030', '\006', ' ', '\001', '(', '\r', 'B', '\t', '\372', 'B', '\006', '*', '\004', '\030', '\377', '\377', '\003', 'H', '\000', 'R', +'\017', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'P', 'o', 'r', 't', '\022', 'A', '\n', '\010', 'm', 'e', 't', 'a', 'd', +'a', 't', 'a', '\030', '\007', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', +'t', 'c', 'h', 'e', 'r', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\010', +'m', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', '=', '\n', '\010', 'n', 'o', 't', '_', 'r', 'u', 'l', 'e', '\030', '\010', ' ', '\001', '(', +'\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', +'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'H', '\000', 'R', '\007', 'n', 'o', 't', 'R', 'u', 'l', 'e', '\022', 'W', '\n', '\025', +'r', 'e', 'q', 'u', 'e', 's', 't', 'e', 'd', '_', 's', 'e', 'r', 'v', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\t', ' ', '\001', +'(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'S', +'t', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'e', 'd', +'S', 'e', 'r', 'v', 'e', 'r', 'N', 'a', 'm', 'e', '\032', 'G', '\n', '\003', 'S', 'e', 't', '\022', '@', '\n', '\005', 'r', 'u', 'l', 'e', +'s', '\030', '\001', ' ', '\003', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', +'a', 'c', '.', 'v', '2', '.', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', +'\001', 'R', '\005', 'r', 'u', 'l', 'e', 's', 'B', '\013', '\n', '\004', 'r', 'u', 'l', 'e', '\022', '\003', '\370', 'B', '\001', '\"', '\365', '\006', '\n', +'\t', 'P', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', '\022', '>', '\n', '\007', 'a', 'n', 'd', '_', 'i', 'd', 's', '\030', '\001', ' ', '\001', +'(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', +'.', 'P', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', '.', 'S', 'e', 't', 'H', '\000', 'R', '\006', 'a', 'n', 'd', 'I', 'd', 's', '\022', +'<', '\n', '\006', 'o', 'r', '_', 'i', 'd', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', +'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', '.', 'S', +'e', 't', 'H', '\000', 'R', '\005', 'o', 'r', 'I', 'd', 's', '\022', '\033', '\n', '\003', 'a', 'n', 'y', '\030', '\003', ' ', '\001', '(', '\010', 'B', +'\007', '\372', 'B', '\004', 'j', '\002', '\010', '\001', 'H', '\000', 'R', '\003', 'a', 'n', 'y', '\022', 'U', '\n', '\r', 'a', 'u', 't', 'h', 'e', 'n', +'t', 'i', 'c', 'a', 't', 'e', 'd', '\030', '\004', ' ', '\001', '(', '\013', '2', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', +'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', '.', 'A', 'u', 't', +'h', 'e', 'n', 't', 'i', 'c', 'a', 't', 'e', 'd', 'H', '\000', 'R', '\r', 'a', 'u', 't', 'h', 'e', 'n', 't', 'i', 'c', 'a', 't', +'e', 'd', '\022', '?', '\n', '\t', 's', 'o', 'u', 'r', 'c', 'e', '_', 'i', 'p', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'e', +'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'i', 'd', 'r', 'R', 'a', 'n', 'g', +'e', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\010', 's', 'o', 'u', 'r', 'c', 'e', 'I', 'p', '\022', 'H', '\n', '\020', 'd', 'i', 'r', 'e', +'c', 't', '_', 'r', 'e', 'm', 'o', 't', 'e', '_', 'i', 'p', '\030', '\n', ' ', '\001', '(', '\013', '2', '\034', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'i', 'd', 'r', 'R', 'a', 'n', 'g', 'e', 'H', '\000', +'R', '\016', 'd', 'i', 'r', 'e', 'c', 't', 'R', 'e', 'm', 'o', 't', 'e', 'I', 'p', '\022', ';', '\n', '\t', 'r', 'e', 'm', 'o', 't', +'e', '_', 'i', 'p', '\030', '\013', ' ', '\001', '(', '\013', '2', '\034', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'c', 'o', 'r', 'e', '.', 'C', 'i', 'd', 'r', 'R', 'a', 'n', 'g', 'e', 'H', '\000', 'R', '\010', 'r', 'e', 'm', 'o', 't', 'e', +'I', 'p', '\022', ';', '\n', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\006', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', +'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', +'h', 'e', 'r', 'H', '\000', 'R', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\022', '<', '\n', '\010', 'u', 'r', 'l', '_', 'p', 'a', 't', 'h', +'\030', '\t', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', +'e', 'r', '.', 'P', 'a', 't', 'h', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\007', 'u', 'r', 'l', 'P', 'a', 't', 'h', +'\022', 'A', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\007', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', +'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M', 'a', +'t', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', '8', '\n', '\006', 'n', 'o', 't', '_', +'i', 'd', '\030', '\010', ' ', '\001', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', +'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', 'H', '\000', 'R', '\005', 'n', 'o', 't', 'I', 'd', +'\032', 'B', '\n', '\003', 'S', 'e', 't', '\022', ';', '\n', '\003', 'i', 'd', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\037', '.', 'e', 'n', +'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', '.', 'P', 'r', 'i', 'n', 'c', 'i', +'p', 'a', 'l', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\003', 'i', 'd', 's', '\032', '_', '\n', '\r', 'A', 'u', 't', +'h', 'e', 'n', 't', 'i', 'c', 'a', 't', 'e', 'd', '\022', 'H', '\n', '\016', 'p', 'r', 'i', 'n', 'c', 'i', 'p', 'a', 'l', '_', 'n', +'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', +'t', 'c', 'h', 'e', 'r', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\r', 'p', 'r', 'i', 'n', +'c', 'i', 'p', 'a', 'l', 'N', 'a', 'm', 'e', 'J', '\004', '\010', '\001', '\020', '\002', 'B', '\021', '\n', '\n', 'i', 'd', 'e', 'n', 't', 'i', +'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'B', '9', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', +'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'b', 'a', 'c', '.', 'v', '2', 'B', '\t', 'R', +'b', 'a', 'c', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', +'3', +}; + +static upb_def_init *deps[9] = { + &envoy_api_v2_core_address_proto_upbdefinit, + &envoy_api_v2_route_route_components_proto_upbdefinit, + &envoy_type_matcher_metadata_proto_upbdefinit, + &envoy_type_matcher_path_proto_upbdefinit, + &envoy_type_matcher_string_proto_upbdefinit, + &google_api_expr_v1alpha1_syntax_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_config_rbac_v2_rbac_proto_upbdefinit = { + deps, + layouts, + "envoy/config/rbac/v2/rbac.proto", + UPB_STRVIEW_INIT(descriptor, 2501) +}; diff --git a/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upbdefs.h b/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upbdefs.h new file mode 100644 index 00000000000..5a113a685dd --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/rbac/v2/rbac.upbdefs.h @@ -0,0 +1,70 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/rbac/v2/rbac.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_CONFIG_RBAC_V2_RBAC_PROTO_UPBDEFS_H_ +#define ENVOY_CONFIG_RBAC_V2_RBAC_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_config_rbac_v2_rbac_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_config_rbac_v2_RBAC_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_rbac_v2_rbac_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.rbac.v2.RBAC"); +} + +UPB_INLINE const upb_msgdef *envoy_config_rbac_v2_RBAC_PoliciesEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_rbac_v2_rbac_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.rbac.v2.RBAC.PoliciesEntry"); +} + +UPB_INLINE const upb_msgdef *envoy_config_rbac_v2_Policy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_rbac_v2_rbac_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.rbac.v2.Policy"); +} + +UPB_INLINE const upb_msgdef *envoy_config_rbac_v2_Permission_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_rbac_v2_rbac_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.rbac.v2.Permission"); +} + +UPB_INLINE const upb_msgdef *envoy_config_rbac_v2_Permission_Set_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_rbac_v2_rbac_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.rbac.v2.Permission.Set"); +} + +UPB_INLINE const upb_msgdef *envoy_config_rbac_v2_Principal_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_rbac_v2_rbac_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.rbac.v2.Principal"); +} + +UPB_INLINE const upb_msgdef *envoy_config_rbac_v2_Principal_Set_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_rbac_v2_rbac_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.rbac.v2.Principal.Set"); +} + +UPB_INLINE const upb_msgdef *envoy_config_rbac_v2_Principal_Authenticated_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_rbac_v2_rbac_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.rbac.v2.Principal.Authenticated"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_CONFIG_RBAC_V2_RBAC_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c new file mode 100644 index 00000000000..23f519df0f3 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c @@ -0,0 +1,59 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/trace/v2/http_tracer.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/config/trace/v2/http_tracer.upbdefs.h" + +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_config_trace_v2_Tracing_msginit; +extern const upb_msglayout envoy_config_trace_v2_Tracing_Http_msginit; + +static const upb_msglayout *layouts[2] = { + &envoy_config_trace_v2_Tracing_msginit, + &envoy_config_trace_v2_Tracing_Http_msginit, +}; + +static const char descriptor[487] = {'\n', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 't', 'r', 'a', 'c', 'e', '/', 'v', '2', '/', 'h', +'t', 't', 'p', '_', 't', 'r', 'a', 'c', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'c', +'o', 'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e', '.', 'v', '2', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', +'t', 'o', '\"', '\351', '\001', '\n', '\007', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '\022', '7', '\n', '\004', 'h', 't', 't', 'p', '\030', '\001', ' ', +'\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e', '.', +'v', '2', '.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'H', 't', 't', 'p', 'R', '\004', 'h', 't', 't', 'p', '\032', '\244', '\001', '\n', +'\004', 'H', 't', 't', 'p', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', +'\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', +'2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', +'B', '\002', '\030', '\001', 'H', '\000', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', +'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', +'\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'B', '@', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', +'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e', '.', +'v', '2', 'B', '\017', 'H', 't', 't', 'p', 'T', 'r', 'a', 'c', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', +'\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[5] = { + &google_protobuf_any_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_config_trace_v2_http_tracer_proto_upbdefinit = { + deps, + layouts, + "envoy/config/trace/v2/http_tracer.proto", + UPB_STRVIEW_INIT(descriptor, 487) +}; diff --git a/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h new file mode 100644 index 00000000000..dac680470df --- /dev/null +++ b/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/config/trace/v2/http_tracer.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_CONFIG_TRACE_V2_HTTP_TRACER_PROTO_UPBDEFS_H_ +#define ENVOY_CONFIG_TRACE_V2_HTTP_TRACER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_config_trace_v2_http_tracer_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_config_trace_v2_Tracing_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_trace_v2_http_tracer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.trace.v2.Tracing"); +} + +UPB_INLINE const upb_msgdef *envoy_config_trace_v2_Tracing_Http_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_config_trace_v2_http_tracer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.config.trace.v2.Tracing.Http"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_CONFIG_TRACE_V2_HTTP_TRACER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c b/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c new file mode 100644 index 00000000000..3d1c5966d20 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c @@ -0,0 +1,52 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/service/discovery/v2/ads.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/service/discovery/v2/ads.upbdefs.h" + +extern upb_def_init envoy_api_v2_discovery_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern const upb_msglayout envoy_service_discovery_v2_AdsDummy_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_service_discovery_v2_AdsDummy_msginit, +}; + +static const char descriptor[454] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', +'/', 'v', '2', '/', 'a', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\032', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', +'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', '/', 'a', +'p', 'i', '/', 'v', '2', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', +'t', 'o', '\"', '\n', '\n', '\010', 'A', 'd', 's', 'D', 'u', 'm', 'm', 'y', '2', '\355', '\001', '\n', '\032', 'A', 'g', 'g', 'r', 'e', 'g', +'a', 't', 'e', 'd', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'b', '\n', '\031', 'S', +'t', 'r', 'e', 'a', 'm', 'A', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', +'\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', +'e', 'q', 'u', 'e', 's', 't', '\032', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', +'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', 'k', '\n', '\030', 'D', +'e', 'l', 't', 'a', 'A', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '#', +'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', +'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', +'.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', +'(', '\001', '0', '\001', 'B', 'A', '\n', '(', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', +'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '2', 'B', '\010', +'A', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', +'o', 't', 'o', '3', +}; + +static upb_def_init *deps[3] = { + &envoy_api_v2_discovery_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_service_discovery_v2_ads_proto_upbdefinit = { + deps, + layouts, + "envoy/service/discovery/v2/ads.proto", + UPB_STRVIEW_INIT(descriptor, 454) +}; diff --git a/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h b/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h new file mode 100644 index 00000000000..a54c40fac4c --- /dev/null +++ b/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/service/discovery/v2/ads.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_SERVICE_DISCOVERY_V2_ADS_PROTO_UPBDEFS_H_ +#define ENVOY_SERVICE_DISCOVERY_V2_ADS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_service_discovery_v2_ads_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_service_discovery_v2_AdsDummy_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_service_discovery_v2_ads_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.service.discovery.v2.AdsDummy"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_SERVICE_DISCOVERY_V2_ADS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c b/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c new file mode 100644 index 00000000000..de51a4247c9 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c @@ -0,0 +1,75 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/service/load_stats/v2/lrs.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/service/load_stats/v2/lrs.upbdefs.h" + +extern upb_def_init envoy_api_v2_core_base_proto_upbdefinit; +extern upb_def_init envoy_api_v2_endpoint_load_report_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_service_load_stats_v2_LoadStatsRequest_msginit; +extern const upb_msglayout envoy_service_load_stats_v2_LoadStatsResponse_msginit; + +static const upb_msglayout *layouts[2] = { + &envoy_service_load_stats_v2_LoadStatsRequest_msginit, + &envoy_service_load_stats_v2_LoadStatsResponse_msginit, +}; + +static const char descriptor[829] = {'\n', '%', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', +'s', '/', 'v', '2', '/', 'l', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\033', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', +'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', 's', '.', 'v', '2', '\032', '\034', 'e', 'n', 'v', 'o', 'y', +'/', 'a', 'p', 'i', '/', 'v', '2', '/', 'c', 'o', 'r', 'e', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\'', +'e', 'n', 'v', 'o', 'y', '/', 'a', 'p', 'i', '/', 'v', '2', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'l', 'o', 'a', +'d', '_', 'r', 'e', 'p', 'o', 'r', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', +'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', +'t', 'o', '\"', '\211', '\001', '\n', '\020', 'L', 'o', 'a', 'd', 'S', 't', 'a', 't', 's', 'R', 'e', 'q', 'u', 'e', 's', 't', '\022', '+', +'\n', '\004', 'n', 'o', 'd', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\027', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', +'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'N', 'o', 'd', 'e', 'R', '\004', 'n', 'o', 'd', 'e', '\022', 'H', '\n', '\r', 'c', 'l', 'u', +'s', 't', 'e', 'r', '_', 's', 't', 'a', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', +'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', +'a', 't', 's', 'R', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', '\"', '\356', '\001', '\n', '\021', 'L', 'o', 'a', +'d', 'S', 't', 'a', 't', 's', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', '\032', '\n', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r', +'s', '\030', '\001', ' ', '\003', '(', '\t', 'R', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', '*', '\n', '\021', 's', 'e', 'n', 'd', +'_', 'a', 'l', 'l', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\017', 's', 'e', 'n', 'd', +'A', 'l', 'l', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', 'Q', '\n', '\027', 'l', 'o', 'a', 'd', '_', 'r', 'e', 'p', 'o', 'r', +'t', 'i', 'n', 'g', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\025', 'l', 'o', +'a', 'd', 'R', 'e', 'p', 'o', 'r', 't', 'i', 'n', 'g', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', '>', '\n', '\033', 'r', 'e', +'p', 'o', 'r', 't', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'g', 'r', 'a', 'n', 'u', 'l', 'a', 'r', 'i', 't', 'y', +'\030', '\003', ' ', '\001', '(', '\010', 'R', '\031', 'r', 'e', 'p', 'o', 'r', 't', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'G', 'r', 'a', +'n', 'u', 'l', 'a', 'r', 'i', 't', 'y', '2', '\216', '\001', '\n', '\024', 'L', 'o', 'a', 'd', 'R', 'e', 'p', 'o', 'r', 't', 'i', 'n', +'g', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'v', '\n', '\017', 'S', 't', 'r', 'e', 'a', 'm', 'L', 'o', 'a', 'd', 'S', 't', 'a', +'t', 's', '\022', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_', 's', +'t', 'a', 't', 's', '.', 'v', '2', '.', 'L', 'o', 'a', 'd', 'S', 't', 'a', 't', 's', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', +'.', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', +'s', '.', 'v', '2', '.', 'L', 'o', 'a', 'd', 'S', 't', 'a', 't', 's', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', +'\001', '0', '\001', 'B', 'B', '\n', ')', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', +'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', 's', '.', 'v', '2', 'B', '\010', +'L', 'r', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', +'o', 't', 'o', '3', +}; + +static upb_def_init *deps[6] = { + &envoy_api_v2_core_base_proto_upbdefinit, + &envoy_api_v2_endpoint_load_report_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_service_load_stats_v2_lrs_proto_upbdefinit = { + deps, + layouts, + "envoy/service/load_stats/v2/lrs.proto", + UPB_STRVIEW_INIT(descriptor, 829) +}; diff --git a/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h b/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h new file mode 100644 index 00000000000..604fb3fe65c --- /dev/null +++ b/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/service/load_stats/v2/lrs.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_SERVICE_LOAD_STATS_V2_LRS_PROTO_UPBDEFS_H_ +#define ENVOY_SERVICE_LOAD_STATS_V2_LRS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_service_load_stats_v2_lrs_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_service_load_stats_v2_LoadStatsRequest_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_service_load_stats_v2_lrs_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.service.load_stats.v2.LoadStatsRequest"); +} + +UPB_INLINE const upb_msgdef *envoy_service_load_stats_v2_LoadStatsResponse_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_service_load_stats_v2_lrs_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.service.load_stats.v2.LoadStatsResponse"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_SERVICE_LOAD_STATS_V2_LRS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/http.upbdefs.c b/src/core/ext/upb-generated/envoy/type/http.upbdefs.c new file mode 100644 index 00000000000..11e976ab064 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/http.upbdefs.c @@ -0,0 +1,33 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/http.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/http.upbdefs.h" + +extern upb_def_init udpa_annotations_status_proto_upbdefinit; + +static const char descriptor[175] = {'\n', '\025', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'h', 't', 't', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\n', +'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', +'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '*', '2', '\n', '\017', 'C', 'o', 'd', 'e', 'c', +'C', 'l', 'i', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '1', '\020', '\000', '\022', '\t', '\n', '\005', +'H', 'T', 'T', 'P', '2', '\020', '\001', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '3', '\020', '\002', 'B', '/', '\n', '\030', 'i', 'o', '.', +'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', 'B', '\t', 'H', 't', +'t', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &udpa_annotations_status_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_http_proto_upbdefinit = { + deps, + NULL, + "envoy/type/http.proto", + UPB_STRVIEW_INIT(descriptor, 175) +}; diff --git a/src/core/ext/upb-generated/envoy/type/http.upbdefs.h b/src/core/ext/upb-generated/envoy/type/http.upbdefs.h new file mode 100644 index 00000000000..5a08ea97b79 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/http.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/http.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_HTTP_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_HTTP_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_http_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_HTTP_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/matcher/path.upbdefs.c b/src/core/ext/upb-generated/envoy/type/matcher/path.upbdefs.c new file mode 100644 index 00000000000..f26bf603320 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/path.upbdefs.c @@ -0,0 +1,47 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/path.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/matcher/path.upbdefs.h" + +extern upb_def_init envoy_type_matcher_string_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_type_matcher_PathMatcher_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_type_matcher_PathMatcher_msginit, +}; + +static const char descriptor[300] = {'\n', '\035', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'p', 'a', 't', 'h', +'.', 'p', 'r', 'o', 't', 'o', '\022', '\022', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', +'r', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 's', 't', 'r', +'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', +'/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', ']', '\n', '\013', 'P', 'a', 't', 'h', 'M', 'a', +'t', 'c', 'h', 'e', 'r', '\022', 'A', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', +'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', +'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\004', 'p', 'a', 't', 'h', 'B', '\013', '\n', +'\004', 'r', 'u', 'l', 'e', '\022', '\003', '\370', 'B', '\001', 'B', '7', '\n', ' ', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', +'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\t', 'P', 'a', +'t', 'h', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[4] = { + &envoy_type_matcher_string_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_matcher_path_proto_upbdefinit = { + deps, + layouts, + "envoy/type/matcher/path.proto", + UPB_STRVIEW_INIT(descriptor, 300) +}; diff --git a/src/core/ext/upb-generated/envoy/type/matcher/path.upbdefs.h b/src/core/ext/upb-generated/envoy/type/matcher/path.upbdefs.h new file mode 100644 index 00000000000..25f3c038784 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/path.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/path.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_MATCHER_PATH_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_MATCHER_PATH_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_matcher_path_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_type_matcher_PathMatcher_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_matcher_path_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.matcher.PathMatcher"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_MATCHER_PATH_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c b/src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c new file mode 100644 index 00000000000..2bbe4e31a0a --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c @@ -0,0 +1,62 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/regex.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/matcher/regex.upbdefs.h" + +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_type_matcher_RegexMatcher_msginit; +extern const upb_msglayout envoy_type_matcher_RegexMatcher_GoogleRE2_msginit; +extern const upb_msglayout envoy_type_matcher_RegexMatchAndSubstitute_msginit; + +static const upb_msglayout *layouts[3] = { + &envoy_type_matcher_RegexMatcher_msginit, + &envoy_type_matcher_RegexMatcher_GoogleRE2_msginit, + &envoy_type_matcher_RegexMatchAndSubstitute_msginit, +}; + +static const char descriptor[573] = {'\n', '\036', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'r', 'e', 'g', 'e', +'x', '.', 'p', 'r', 'o', 't', 'o', '\022', '\022', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', +'e', 'r', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', +'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', +'/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\361', '\001', '\n', '\014', 'R', 'e', 'g', 'e', 'x', +'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', 'U', '\n', '\n', 'g', 'o', 'o', 'g', 'l', 'e', '_', 'r', 'e', '2', '\030', '\001', ' ', '\001', +'(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'R', +'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e', 'r', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'R', 'E', '2', 'B', '\010', '\372', 'B', +'\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\t', 'g', 'o', 'o', 'g', 'l', 'e', 'R', 'e', '2', '\022', '\035', '\n', '\005', 'r', 'e', +'g', 'e', 'x', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\005', 'r', 'e', 'g', 'e', 'x', +'\032', 'W', '\n', '\t', 'G', 'o', 'o', 'g', 'l', 'e', 'R', 'E', '2', '\022', 'J', '\n', '\020', 'm', 'a', 'x', '_', 'p', 'r', 'o', 'g', +'r', 'a', 'm', '_', 's', 'i', 'z', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\002', '\030', '\001', 'R', '\016', +'m', 'a', 'x', 'P', 'r', 'o', 'g', 'r', 'a', 'm', 'S', 'i', 'z', 'e', 'B', '\022', '\n', '\013', 'e', 'n', 'g', 'i', 'n', 'e', '_', +'t', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', '\"', 'y', '\n', '\027', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'A', 'n', +'d', 'S', 'u', 'b', 's', 't', 'i', 't', 'u', 't', 'e', '\022', ':', '\n', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\030', '\001', ' ', +'\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', +'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\022', '\"', '\n', '\014', +'s', 'u', 'b', 's', 't', 'i', 't', 'u', 't', 'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\014', 's', 'u', 'b', 's', 't', +'i', 't', 'u', 't', 'i', 'o', 'n', 'B', '8', '\n', ' ', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', +'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\n', 'R', 'e', 'g', 'e', 'x', +'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[4] = { + &google_protobuf_wrappers_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_matcher_regex_proto_upbdefinit = { + deps, + layouts, + "envoy/type/matcher/regex.proto", + UPB_STRVIEW_INIT(descriptor, 573) +}; diff --git a/src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h b/src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h new file mode 100644 index 00000000000..bc0381acc06 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.h @@ -0,0 +1,45 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/regex.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_MATCHER_REGEX_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_MATCHER_REGEX_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_matcher_regex_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_type_matcher_RegexMatcher_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_matcher_regex_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.matcher.RegexMatcher"); +} + +UPB_INLINE const upb_msgdef *envoy_type_matcher_RegexMatcher_GoogleRE2_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_matcher_regex_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.matcher.RegexMatcher.GoogleRE2"); +} + +UPB_INLINE const upb_msgdef *envoy_type_matcher_RegexMatchAndSubstitute_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_matcher_regex_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.matcher.RegexMatchAndSubstitute"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_MATCHER_REGEX_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c b/src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c new file mode 100644 index 00000000000..0ee09e0f2e4 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c @@ -0,0 +1,64 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/string.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/matcher/string.upbdefs.h" + +extern upb_def_init envoy_type_matcher_regex_proto_upbdefinit; +extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_type_matcher_StringMatcher_msginit; +extern const upb_msglayout envoy_type_matcher_ListStringMatcher_msginit; + +static const upb_msglayout *layouts[2] = { + &envoy_type_matcher_StringMatcher_msginit, + &envoy_type_matcher_ListStringMatcher_msginit, +}; + +static const char descriptor[625] = {'\n', '\037', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 's', 't', 'r', 'i', +'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\022', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', +'h', 'e', 'r', '\032', '\036', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'r', +'e', 'g', 'e', 'x', '.', 'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', +'i', 'o', 'n', 's', '/', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', +'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', +'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', +'o', 't', 'o', '\"', '\233', '\002', '\n', '\r', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', '\026', '\n', '\005', +'e', 'x', 'a', 'c', 't', '\030', '\001', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\005', 'e', 'x', 'a', 'c', 't', '\022', '!', '\n', '\006', 'p', +'r', 'e', 'f', 'i', 'x', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'H', '\000', 'R', '\006', 'p', +'r', 'e', 'f', 'i', 'x', '\022', '!', '\n', '\006', 's', 'u', 'f', 'f', 'i', 'x', '\030', '\003', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', +'\004', 'r', '\002', ' ', '\001', 'H', '\000', 'R', '\006', 's', 'u', 'f', 'f', 'i', 'x', '\022', '(', '\n', '\005', 'r', 'e', 'g', 'e', 'x', '\030', +'\004', ' ', '\001', '(', '\t', 'B', '\020', '\030', '\001', '\372', 'B', '\005', 'r', '\003', '(', '\200', '\010', '\270', '\356', '\362', '\322', '\005', '\001', 'H', '\000', +'R', '\005', 'r', 'e', 'g', 'e', 'x', '\022', 'K', '\n', '\n', 's', 'a', 'f', 'e', '_', 'r', 'e', 'g', 'e', 'x', '\030', '\005', ' ', '\001', +'(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'R', +'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\t', +'s', 'a', 'f', 'e', 'R', 'e', 'g', 'e', 'x', '\022', '\037', '\n', '\013', 'i', 'g', 'n', 'o', 'r', 'e', '_', 'c', 'a', 's', 'e', '\030', +'\006', ' ', '\001', '(', '\010', 'R', '\n', 'i', 'g', 'n', 'o', 'r', 'e', 'C', 'a', 's', 'e', 'B', '\024', '\n', '\r', 'm', 'a', 't', 'c', +'h', '_', 'p', 'a', 't', 't', 'e', 'r', 'n', '\022', '\003', '\370', 'B', '\001', '\"', '\\', '\n', '\021', 'L', 'i', 's', 't', 'S', 't', 'r', +'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', 'G', '\n', '\010', 'p', 'a', 't', 't', 'e', 'r', 'n', 's', '\030', '\001', ' ', +'\003', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', +'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\010', +'p', 'a', 't', 't', 'e', 'r', 'n', 's', 'B', '9', '\n', ' ', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', +'.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\013', 'S', 't', 'r', 'i', +'n', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[5] = { + &envoy_type_matcher_regex_proto_upbdefinit, + &envoy_annotations_deprecation_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_matcher_string_proto_upbdefinit = { + deps, + layouts, + "envoy/type/matcher/string.proto", + UPB_STRVIEW_INIT(descriptor, 625) +}; diff --git a/src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h b/src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h new file mode 100644 index 00000000000..e0b351fb679 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/matcher/string.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_MATCHER_STRING_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_MATCHER_STRING_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_matcher_string_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_type_matcher_StringMatcher_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_matcher_string_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.matcher.StringMatcher"); +} + +UPB_INLINE const upb_msgdef *envoy_type_matcher_ListStringMatcher_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_matcher_string_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.matcher.ListStringMatcher"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_MATCHER_STRING_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c new file mode 100644 index 00000000000..6b115d8a159 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c @@ -0,0 +1,79 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/metadata/v2/metadata.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/metadata/v2/metadata.upbdefs.h" + +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKey_msginit; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKey_PathSegment_msginit; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKind_msginit; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKind_Request_msginit; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKind_Route_msginit; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKind_Cluster_msginit; +extern const upb_msglayout envoy_type_metadata_v2_MetadataKind_Host_msginit; + +static const upb_msglayout *layouts[7] = { + &envoy_type_metadata_v2_MetadataKey_msginit, + &envoy_type_metadata_v2_MetadataKey_PathSegment_msginit, + &envoy_type_metadata_v2_MetadataKind_msginit, + &envoy_type_metadata_v2_MetadataKind_Request_msginit, + &envoy_type_metadata_v2_MetadataKind_Route_msginit, + &envoy_type_metadata_v2_MetadataKind_Cluster_msginit, + &envoy_type_metadata_v2_MetadataKind_Host_msginit, +}; + +static const char descriptor[786] = {'\n', '%', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '/', 'v', '2', '/', +'m', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'p', 'r', 'o', 't', 'o', '\022', '\026', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', +'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', +'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', +'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', +'o', '\"', '\263', '\001', '\n', '\013', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '\022', '\031', '\n', '\003', 'k', 'e', 'y', '\030', +'\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\003', 'k', 'e', 'y', '\022', 'M', '\n', '\004', 'p', 'a', +'t', 'h', '\030', '\002', ' ', '\003', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', +'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '.', 'P', 'a', 't', 'h', +'S', 'e', 'g', 'm', 'e', 'n', 't', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\032', ':', +'\n', '\013', 'P', 'a', 't', 'h', 'S', 'e', 'g', 'm', 'e', 'n', 't', '\022', '\033', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', +'\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'H', '\000', 'R', '\003', 'k', 'e', 'y', 'B', '\016', '\n', '\007', 's', 'e', 'g', 'm', +'e', 'n', 't', '\022', '\003', '\370', 'B', '\001', '\"', '\333', '\002', '\n', '\014', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', +'\022', 'H', '\n', '\007', 'r', 'e', 'q', 'u', 'e', 's', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', +'.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', +'a', 'K', 'i', 'n', 'd', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H', '\000', 'R', '\007', 'r', 'e', 'q', 'u', 'e', 's', 't', '\022', +'B', '\n', '\005', 'r', 'o', 'u', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', +'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', +'n', 'd', '.', 'R', 'o', 'u', 't', 'e', 'H', '\000', 'R', '\005', 'r', 'o', 'u', 't', 'e', '\022', 'H', '\n', '\007', 'c', 'l', 'u', 's', +'t', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', +'t', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', '.', 'C', 'l', +'u', 's', 't', 'e', 'r', 'H', '\000', 'R', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\022', '?', '\n', '\004', 'h', 'o', 's', 't', '\030', +'\004', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', +'t', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', '.', 'H', 'o', 's', 't', 'H', '\000', +'R', '\004', 'h', 'o', 's', 't', '\032', '\t', '\n', '\007', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '\007', '\n', '\005', 'R', 'o', 'u', 't', +'e', '\032', '\t', '\n', '\007', 'C', 'l', 'u', 's', 't', 'e', 'r', '\032', '\006', '\n', '\004', 'H', 'o', 's', 't', 'B', '\013', '\n', '\004', 'k', +'i', 'n', 'd', '\022', '\003', '\370', 'B', '\001', 'B', ']', '\n', '$', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', +'.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', 'B', '\r', +'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\362', '\230', '\376', '\217', '\005', '\030', '\022', '\026', 'e', 'n', +'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '\272', '\200', '\310', '\321', '\006', +'\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[4] = { + &udpa_annotations_migrate_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_metadata_v2_metadata_proto_upbdefinit = { + deps, + layouts, + "envoy/type/metadata/v2/metadata.proto", + UPB_STRVIEW_INIT(descriptor, 786) +}; diff --git a/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h new file mode 100644 index 00000000000..da3e7b08ded --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.h @@ -0,0 +1,65 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/metadata/v2/metadata.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_METADATA_V2_METADATA_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_METADATA_V2_METADATA_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_metadata_v2_metadata_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_type_metadata_v2_MetadataKey_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_metadata_v2_metadata_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.metadata.v2.MetadataKey"); +} + +UPB_INLINE const upb_msgdef *envoy_type_metadata_v2_MetadataKey_PathSegment_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_metadata_v2_metadata_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.metadata.v2.MetadataKey.PathSegment"); +} + +UPB_INLINE const upb_msgdef *envoy_type_metadata_v2_MetadataKind_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_metadata_v2_metadata_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.metadata.v2.MetadataKind"); +} + +UPB_INLINE const upb_msgdef *envoy_type_metadata_v2_MetadataKind_Request_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_metadata_v2_metadata_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.metadata.v2.MetadataKind.Request"); +} + +UPB_INLINE const upb_msgdef *envoy_type_metadata_v2_MetadataKind_Route_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_metadata_v2_metadata_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.metadata.v2.MetadataKind.Route"); +} + +UPB_INLINE const upb_msgdef *envoy_type_metadata_v2_MetadataKind_Cluster_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_metadata_v2_metadata_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.metadata.v2.MetadataKind.Cluster"); +} + +UPB_INLINE const upb_msgdef *envoy_type_metadata_v2_MetadataKind_Host_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_metadata_v2_metadata_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.metadata.v2.MetadataKind.Host"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_METADATA_V2_METADATA_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/percent.upbdefs.c b/src/core/ext/upb-generated/envoy/type/percent.upbdefs.c new file mode 100644 index 00000000000..1f79980bc7b --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/percent.upbdefs.c @@ -0,0 +1,52 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/percent.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/percent.upbdefs.h" + +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_type_Percent_msginit; +extern const upb_msglayout envoy_type_FractionalPercent_msginit; + +static const upb_msglayout *layouts[2] = { + &envoy_type_Percent_msginit, + &envoy_type_FractionalPercent_msginit, +}; + +static const char descriptor[418] = {'\n', '\030', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', +'o', '\022', '\n', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', +'d', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '8', '\n', '\007', 'P', 'e', +'r', 'c', 'e', 'n', 't', '\022', '-', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\001', 'B', '\027', '\372', 'B', '\024', +'\022', '\022', '\031', '\000', '\000', '\000', '\000', '\000', '\000', 'Y', '@', ')', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', 'R', '\005', 'v', 'a', 'l', +'u', 'e', '\"', '\313', '\001', '\n', '\021', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', +'\034', '\n', '\t', 'n', 'u', 'm', 'e', 'r', 'a', 't', 'o', 'r', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\t', 'n', 'u', 'm', 'e', 'r', +'a', 't', 'o', 'r', '\022', 'Y', '\n', '\013', 'd', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', '\030', '\002', ' ', '\001', '(', '\016', +'2', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', +'e', 'r', 'c', 'e', 'n', 't', '.', 'D', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', 'T', 'y', 'p', 'e', 'B', '\010', '\372', +'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\013', 'd', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', '\"', '=', '\n', '\017', 'D', +'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', 'T', 'y', 'p', 'e', '\022', '\013', '\n', '\007', 'H', 'U', 'N', 'D', 'R', 'E', 'D', +'\020', '\000', '\022', '\020', '\n', '\014', 'T', 'E', 'N', '_', 'T', 'H', 'O', 'U', 'S', 'A', 'N', 'D', '\020', '\001', '\022', '\013', '\n', '\007', 'M', +'I', 'L', 'L', 'I', 'O', 'N', '\020', '\002', 'B', '2', '\n', '\030', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', +'.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', 'B', '\014', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'P', 'r', 'o', 't', 'o', +'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[3] = { + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_percent_proto_upbdefinit = { + deps, + layouts, + "envoy/type/percent.proto", + UPB_STRVIEW_INIT(descriptor, 418) +}; diff --git a/src/core/ext/upb-generated/envoy/type/percent.upbdefs.h b/src/core/ext/upb-generated/envoy/type/percent.upbdefs.h new file mode 100644 index 00000000000..2e8623580ed --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/percent.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/percent.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_PERCENT_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_PERCENT_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_percent_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_type_Percent_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_percent_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.Percent"); +} + +UPB_INLINE const upb_msgdef *envoy_type_FractionalPercent_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_percent_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.FractionalPercent"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_PERCENT_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/range.upbdefs.c b/src/core/ext/upb-generated/envoy/type/range.upbdefs.c new file mode 100644 index 00000000000..795dbbad306 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/range.upbdefs.c @@ -0,0 +1,47 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/range.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/range.upbdefs.h" + +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern const upb_msglayout envoy_type_Int64Range_msginit; +extern const upb_msglayout envoy_type_Int32Range_msginit; +extern const upb_msglayout envoy_type_DoubleRange_msginit; + +static const upb_msglayout *layouts[3] = { + &envoy_type_Int64Range_msginit, + &envoy_type_Int32Range_msginit, + &envoy_type_DoubleRange_msginit, +}; + +static const char descriptor[288] = {'\n', '\026', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'r', 'a', 'n', 'g', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', +'\n', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', +'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\"', '4', '\n', '\n', 'I', 'n', 't', '6', +'4', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\003', 'R', '\005', 's', 't', +'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\003', 'R', '\003', 'e', 'n', 'd', '\"', '4', '\n', '\n', +'I', 'n', 't', '3', '2', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\005', +'R', '\005', 's', 't', 'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', +'\"', '5', '\n', '\013', 'D', 'o', 'u', 'b', 'l', 'e', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', +'\001', ' ', '\001', '(', '\001', 'R', '\005', 's', 't', 'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\001', +'R', '\003', 'e', 'n', 'd', 'B', '0', '\n', '\030', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', +'v', 'o', 'y', '.', 't', 'y', 'p', 'e', 'B', '\n', 'R', 'a', 'n', 'g', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', +'\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &udpa_annotations_status_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_range_proto_upbdefinit = { + deps, + layouts, + "envoy/type/range.proto", + UPB_STRVIEW_INIT(descriptor, 288) +}; diff --git a/src/core/ext/upb-generated/envoy/type/range.upbdefs.h b/src/core/ext/upb-generated/envoy/type/range.upbdefs.h new file mode 100644 index 00000000000..ba617d5f0e4 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/range.upbdefs.h @@ -0,0 +1,45 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/range.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_RANGE_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_RANGE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_range_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_type_Int64Range_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_range_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.Int64Range"); +} + +UPB_INLINE const upb_msgdef *envoy_type_Int32Range_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_range_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.Int32Range"); +} + +UPB_INLINE const upb_msgdef *envoy_type_DoubleRange_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_range_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.DoubleRange"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_RANGE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c b/src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c new file mode 100644 index 00000000000..d077f37e555 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c @@ -0,0 +1,42 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/semantic_version.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/semantic_version.upbdefs.h" + +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern const upb_msglayout envoy_type_SemanticVersion_msginit; + +static const upb_msglayout *layouts[1] = { + &envoy_type_SemanticVersion_msginit, +}; + +static const char descriptor[257] = {'\n', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 's', 'e', 'm', 'a', 'n', 't', 'i', 'c', '_', 'v', 'e', 'r', +'s', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\n', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '\032', '\035', 'u', +'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', +'o', 't', 'o', '\"', 'm', '\n', '\017', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '!', '\n', +'\014', 'm', 'a', 'j', 'o', 'r', '_', 'n', 'u', 'm', 'b', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\013', 'm', 'a', 'j', 'o', +'r', 'N', 'u', 'm', 'b', 'e', 'r', '\022', '!', '\n', '\014', 'm', 'i', 'n', 'o', 'r', '_', 'n', 'u', 'm', 'b', 'e', 'r', '\030', '\002', +' ', '\001', '(', '\r', 'R', '\013', 'm', 'i', 'n', 'o', 'r', 'N', 'u', 'm', 'b', 'e', 'r', '\022', '\024', '\n', '\005', 'p', 'a', 't', 'c', +'h', '\030', '\003', ' ', '\001', '(', '\r', 'R', '\005', 'p', 'a', 't', 'c', 'h', 'B', ':', '\n', '\030', 'i', 'o', '.', 'e', 'n', 'v', 'o', +'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', 'B', '\024', 'S', 'e', 'm', 'a', 'n', 't', +'i', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', +'\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &udpa_annotations_status_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_semantic_version_proto_upbdefinit = { + deps, + layouts, + "envoy/type/semantic_version.proto", + UPB_STRVIEW_INIT(descriptor, 257) +}; diff --git a/src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h b/src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h new file mode 100644 index 00000000000..e452bcaa4e2 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/semantic_version.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_SEMANTIC_VERSION_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_SEMANTIC_VERSION_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_semantic_version_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_type_SemanticVersion_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_semantic_version_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.SemanticVersion"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_SEMANTIC_VERSION_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c new file mode 100644 index 00000000000..939f1142916 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c @@ -0,0 +1,83 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/tracing/v2/custom_tag.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "envoy/type/tracing/v2/custom_tag.upbdefs.h" + +extern upb_def_init envoy_type_metadata_v2_metadata_proto_upbdefinit; +extern upb_def_init udpa_annotations_status_proto_upbdefinit; +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout envoy_type_tracing_v2_CustomTag_msginit; +extern const upb_msglayout envoy_type_tracing_v2_CustomTag_Literal_msginit; +extern const upb_msglayout envoy_type_tracing_v2_CustomTag_Environment_msginit; +extern const upb_msglayout envoy_type_tracing_v2_CustomTag_Header_msginit; +extern const upb_msglayout envoy_type_tracing_v2_CustomTag_Metadata_msginit; + +static const upb_msglayout *layouts[5] = { + &envoy_type_tracing_v2_CustomTag_msginit, + &envoy_type_tracing_v2_CustomTag_Literal_msginit, + &envoy_type_tracing_v2_CustomTag_Environment_msginit, + &envoy_type_tracing_v2_CustomTag_Header_msginit, + &envoy_type_tracing_v2_CustomTag_Metadata_msginit, +}; + +static const char descriptor[977] = {'\n', '&', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 't', 'r', 'a', 'c', 'i', 'n', 'g', '/', 'v', '2', '/', 'c', +'u', 's', 't', 'o', 'm', '_', 't', 'a', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', +'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', '\032', '%', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', +'/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '/', 'v', '2', '/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', +'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', +'t', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\347', '\005', '\n', '\t', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '\022', '\031', '\n', +'\003', 't', 'a', 'g', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\003', 't', 'a', 'g', '\022', +'D', '\n', '\007', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\030', '\002', ' ', '\001', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', +'t', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', +'.', 'L', 'i', 't', 'e', 'r', 'a', 'l', 'H', '\000', 'R', '\007', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\022', 'P', '\n', '\013', 'e', 'n', +'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', +'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', +'E', 'n', 'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', 't', 'H', '\000', 'R', '\013', 'e', 'n', 'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', +'t', '\022', 'P', '\n', '\016', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\004', ' ', '\001', '(', '\013', +'2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', '.', +'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'H', '\000', 'R', '\r', 'r', 'e', 'q', 'u', 'e', +'s', 't', 'H', 'e', 'a', 'd', 'e', 'r', '\022', 'G', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\005', ' ', '\001', '(', +'\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', +'.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'H', '\000', 'R', '\010', 'm', 'e', +'t', 'a', 'd', 'a', 't', 'a', '\032', '(', '\n', '\007', 'L', 'i', 't', 'e', 'r', 'a', 'l', '\022', '\035', '\n', '\005', 'v', 'a', 'l', 'u', +'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\032', 'O', +'\n', '\013', 'E', 'n', 'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', 't', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', +'(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', ' ', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', +'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', +'a', 'l', 'u', 'e', '\032', 'P', '\n', '\006', 'H', 'e', 'a', 'd', 'e', 'r', '\022', '!', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', +'\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', ' ', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\004', 'n', 'a', 'm', 'e', '\022', +'#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\014', 'd', +'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\032', '\261', '\001', '\n', '\010', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', +'8', '\n', '\004', 'k', 'i', 'n', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', +'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', +'d', 'R', '\004', 'k', 'i', 'n', 'd', '\022', 'F', '\n', '\014', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'k', 'e', 'y', '\030', '\002', +' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', +'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', 'R', '\013', 'm', 'e', 't', 'a', 'd', 'a', 't', +'a', 'K', 'e', 'y', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', +'(', '\t', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', 'B', '\013', '\n', '\004', 't', 'y', 'p', 'e', '\022', +'\003', '\370', 'B', '\001', 'B', '?', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', +'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', 'B', '\016', 'C', 'u', 's', 't', 'o', +'m', 'T', 'a', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\001', 'b', '\006', 'p', 'r', 'o', 't', +'o', '3', +}; + +static upb_def_init *deps[4] = { + &envoy_type_metadata_v2_metadata_proto_upbdefinit, + &udpa_annotations_status_proto_upbdefinit, + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init envoy_type_tracing_v2_custom_tag_proto_upbdefinit = { + deps, + layouts, + "envoy/type/tracing/v2/custom_tag.proto", + UPB_STRVIEW_INIT(descriptor, 977) +}; diff --git a/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h new file mode 100644 index 00000000000..ec5a4bcec47 --- /dev/null +++ b/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.h @@ -0,0 +1,55 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * envoy/type/tracing/v2/custom_tag.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef ENVOY_TYPE_TRACING_V2_CUSTOM_TAG_PROTO_UPBDEFS_H_ +#define ENVOY_TYPE_TRACING_V2_CUSTOM_TAG_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init envoy_type_tracing_v2_custom_tag_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *envoy_type_tracing_v2_CustomTag_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_tracing_v2_custom_tag_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.tracing.v2.CustomTag"); +} + +UPB_INLINE const upb_msgdef *envoy_type_tracing_v2_CustomTag_Literal_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_tracing_v2_custom_tag_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.tracing.v2.CustomTag.Literal"); +} + +UPB_INLINE const upb_msgdef *envoy_type_tracing_v2_CustomTag_Environment_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_tracing_v2_custom_tag_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.tracing.v2.CustomTag.Environment"); +} + +UPB_INLINE const upb_msgdef *envoy_type_tracing_v2_CustomTag_Header_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_tracing_v2_custom_tag_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.tracing.v2.CustomTag.Header"); +} + +UPB_INLINE const upb_msgdef *envoy_type_tracing_v2_CustomTag_Metadata_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &envoy_type_tracing_v2_custom_tag_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "envoy.type.tracing.v2.CustomTag.Metadata"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* ENVOY_TYPE_TRACING_V2_CUSTOM_TAG_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c b/src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c new file mode 100644 index 00000000000..26e6cab2629 --- /dev/null +++ b/src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c @@ -0,0 +1,247 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * gogoproto/gogo.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "gogoproto/gogo.upbdefs.h" + +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; + +static const char descriptor[5517] = {'\n', '\024', 'g', 'o', 'g', 'o', 'p', 'r', 'o', 't', 'o', '/', 'g', 'o', 'g', 'o', '.', 'p', 'r', 'o', 't', 'o', '\022', '\t', 'g', +'o', 'g', 'o', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', ':', 'N', '\n', '\023', 'g', 'o', 'p', 'r', +'o', 't', 'o', '_', 'e', 'n', 'u', 'm', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\261', '\344', '\003', ' ', +'\001', '(', '\010', 'R', '\021', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'E', 'n', 'u', 'm', 'P', 'r', 'e', 'f', 'i', 'x', ':', 'R', '\n', +'\025', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'e', 'n', 'u', 'm', '_', 's', 't', 'r', 'i', 'n', 'g', 'e', 'r', '\022', '\034', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', +'n', 's', '\030', '\305', '\344', '\003', ' ', '\001', '(', '\010', 'R', '\023', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'E', 'n', 'u', 'm', 'S', 't', +'r', 'i', 'n', 'g', 'e', 'r', ':', 'C', '\n', '\r', 'e', 'n', 'u', 'm', '_', 's', 't', 'r', 'i', 'n', 'g', 'e', 'r', '\022', '\034', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', +'o', 'n', 's', '\030', '\306', '\344', '\003', ' ', '\001', '(', '\010', 'R', '\014', 'e', 'n', 'u', 'm', 'S', 't', 'r', 'i', 'n', 'g', 'e', 'r', +':', 'G', '\n', '\017', 'e', 'n', 'u', 'm', '_', 'c', 'u', 's', 't', 'o', 'm', 'n', 'a', 'm', 'e', '\022', '\034', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\307', '\344', '\003', ' ', '\001', '(', '\t', 'R', '\016', 'e', 'n', 'u', 'm', 'C', 'u', 's', 't', 'o', 'm', 'n', 'a', 'm', 'e', ':', ':', +'\n', '\010', 'e', 'n', 'u', 'm', 'd', 'e', 'c', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\310', '\344', '\003', ' ', '\001', '(', '\010', 'R', '\010', +'e', 'n', 'u', 'm', 'd', 'e', 'c', 'l', ':', 'V', '\n', '\024', 'e', 'n', 'u', 'm', 'v', 'a', 'l', 'u', 'e', '_', 'c', 'u', 's', +'t', 'o', 'm', 'n', 'a', 'm', 'e', '\022', '!', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\321', '\203', '\004', ' ', '\001', '(', '\t', +'R', '\023', 'e', 'n', 'u', 'm', 'v', 'a', 'l', 'u', 'e', 'C', 'u', 's', 't', 'o', 'm', 'n', 'a', 'm', 'e', ':', 'N', '\n', '\023', +'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'g', 'e', 't', 't', 'e', 'r', 's', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\231', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\021', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'G', 'e', 't', 't', 'e', 'r', 's', 'A', 'l', +'l', ':', 'U', '\n', '\027', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'e', 'n', 'u', 'm', '_', 'p', 'r', 'e', 'f', 'i', 'x', '_', +'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', +'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\232', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\024', 'g', 'o', 'p', 'r', 'o', 't', 'o', +'E', 'n', 'u', 'm', 'P', 'r', 'e', 'f', 'i', 'x', 'A', 'l', 'l', ':', 'P', '\n', '\024', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', +'s', 't', 'r', 'i', 'n', 'g', 'e', 'r', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\233', '\354', '\003', ' ', '\001', '(', '\010', +'R', '\022', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'S', 't', 'r', 'i', 'n', 'g', 'e', 'r', 'A', 'l', 'l', ':', 'J', '\n', '\021', 'v', +'e', 'r', 'b', 'o', 's', 'e', '_', 'e', 'q', 'u', 'a', 'l', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\234', '\354', '\003', +' ', '\001', '(', '\010', 'R', '\017', 'v', 'e', 'r', 'b', 'o', 's', 'e', 'E', 'q', 'u', 'a', 'l', 'A', 'l', 'l', ':', '9', '\n', '\010', +'f', 'a', 'c', 'e', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\235', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\007', 'f', 'a', +'c', 'e', 'A', 'l', 'l', ':', 'A', '\n', '\014', 'g', 'o', 's', 't', 'r', 'i', 'n', 'g', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', +'s', '\030', '\236', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\013', 'g', 'o', 's', 't', 'r', 'i', 'n', 'g', 'A', 'l', 'l', ':', 'A', '\n', +'\014', 'p', 'o', 'p', 'u', 'l', 'a', 't', 'e', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\237', '\354', '\003', ' ', '\001', '(', +'\010', 'R', '\013', 'p', 'o', 'p', 'u', 'l', 'a', 't', 'e', 'A', 'l', 'l', ':', 'A', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', 'e', +'r', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', +'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\240', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\013', 's', 't', 'r', 'i', 'n', +'g', 'e', 'r', 'A', 'l', 'l', ':', '?', '\n', '\013', 'o', 'n', 'l', 'y', 'o', 'n', 'e', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', +'s', '\030', '\241', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\n', 'o', 'n', 'l', 'y', 'o', 'n', 'e', 'A', 'l', 'l', ':', ';', '\n', '\t', +'e', 'q', 'u', 'a', 'l', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\245', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\010', 'e', +'q', 'u', 'a', 'l', 'A', 'l', 'l', ':', 'G', '\n', '\017', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', '_', 'a', 'l', +'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', +'p', 't', 'i', 'o', 'n', 's', '\030', '\246', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\016', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', +'o', 'n', 'A', 'l', 'l', ':', '?', '\n', '\013', 't', 'e', 's', 't', 'g', 'e', 'n', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', +'\030', '\247', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\n', 't', 'e', 's', 't', 'g', 'e', 'n', 'A', 'l', 'l', ':', 'A', '\n', '\014', 'b', +'e', 'n', 'c', 'h', 'g', 'e', 'n', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\250', '\354', '\003', ' ', '\001', '(', '\010', 'R', +'\013', 'b', 'e', 'n', 'c', 'h', 'g', 'e', 'n', 'A', 'l', 'l', ':', 'C', '\n', '\r', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', +'_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', +'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\251', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\014', 'm', 'a', 'r', 's', 'h', 'a', +'l', 'e', 'r', 'A', 'l', 'l', ':', 'G', '\n', '\017', 'u', 'n', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', '_', 'a', 'l', 'l', +'\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', +'t', 'i', 'o', 'n', 's', '\030', '\252', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\016', 'u', 'n', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', +'r', 'A', 'l', 'l', ':', 'P', '\n', '\024', 's', 't', 'a', 'b', 'l', 'e', '_', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', '_', +'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', +'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\253', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\022', 's', 't', 'a', 'b', 'l', 'e', 'M', +'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', 'A', 'l', 'l', ':', ';', '\n', '\t', 's', 'i', 'z', 'e', 'r', '_', 'a', 'l', 'l', '\022', +'\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', +'i', 'o', 'n', 's', '\030', '\254', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\010', 's', 'i', 'z', 'e', 'r', 'A', 'l', 'l', ':', 'Y', '\n', +'\031', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'e', 'n', 'u', 'm', '_', 's', 't', 'r', 'i', 'n', 'g', 'e', 'r', '_', 'a', 'l', +'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', +'p', 't', 'i', 'o', 'n', 's', '\030', '\255', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\026', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'E', 'n', +'u', 'm', 'S', 't', 'r', 'i', 'n', 'g', 'e', 'r', 'A', 'l', 'l', ':', 'J', '\n', '\021', 'e', 'n', 'u', 'm', '_', 's', 't', 'r', +'i', 'n', 'g', 'e', 'r', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\256', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\017', 'e', +'n', 'u', 'm', 'S', 't', 'r', 'i', 'n', 'g', 'e', 'r', 'A', 'l', 'l', ':', 'P', '\n', '\024', 'u', 'n', 's', 'a', 'f', 'e', '_', +'m', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\257', '\354', '\003', ' ', '\001', '(', +'\010', 'R', '\022', 'u', 'n', 's', 'a', 'f', 'e', 'M', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', 'A', 'l', 'l', ':', 'T', '\n', '\026', +'u', 'n', 's', 'a', 'f', 'e', '_', 'u', 'n', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', '_', 'a', 'l', 'l', '\022', '\034', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', +'n', 's', '\030', '\260', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\024', 'u', 'n', 's', 'a', 'f', 'e', 'U', 'n', 'm', 'a', 'r', 's', 'h', +'a', 'l', 'e', 'r', 'A', 'l', 'l', ':', '[', '\n', '\032', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'e', 'x', 't', 'e', 'n', 's', +'i', 'o', 'n', 's', '_', 'm', 'a', 'p', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\261', '\354', '\003', ' ', '\001', '(', '\010', +'R', '\027', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', 'M', 'a', 'p', 'A', 'l', 'l', +':', 'X', '\n', '\030', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'u', 'n', 'r', 'e', 'c', 'o', 'g', 'n', 'i', 'z', 'e', 'd', '_', +'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', +'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\262', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\026', 'g', 'o', 'p', 'r', 'o', 't', 'o', +'U', 'n', 'r', 'e', 'c', 'o', 'g', 'n', 'i', 'z', 'e', 'd', 'A', 'l', 'l', ':', 'I', '\n', '\020', 'g', 'o', 'g', 'o', 'p', 'r', +'o', 't', 'o', '_', 'i', 'm', 'p', 'o', 'r', 't', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\263', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\017', +'g', 'o', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'I', 'm', 'p', 'o', 'r', 't', ':', 'E', '\n', '\016', 'p', 'r', 'o', 't', 'o', 's', +'i', 'z', 'e', 'r', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\264', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\r', 'p', 'r', +'o', 't', 'o', 's', 'i', 'z', 'e', 'r', 'A', 'l', 'l', ':', '?', '\n', '\013', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '_', 'a', 'l', +'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', +'p', 't', 'i', 'o', 'n', 's', '\030', '\265', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\n', 'c', 'o', 'm', 'p', 'a', 'r', 'e', 'A', 'l', +'l', ':', 'A', '\n', '\014', 't', 'y', 'p', 'e', 'd', 'e', 'c', 'l', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\266', '\354', +'\003', ' ', '\001', '(', '\010', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'e', 'c', 'l', 'A', 'l', 'l', ':', 'A', '\n', '\014', 'e', 'n', 'u', +'m', 'd', 'e', 'c', 'l', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\267', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\013', 'e', +'n', 'u', 'm', 'd', 'e', 'c', 'l', 'A', 'l', 'l', ':', 'Q', '\n', '\024', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'r', 'e', 'g', +'i', 's', 't', 'r', 'a', 't', 'i', 'o', 'n', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\270', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\023', 'g', +'o', 'p', 'r', 'o', 't', 'o', 'R', 'e', 'g', 'i', 's', 't', 'r', 'a', 't', 'i', 'o', 'n', ':', 'G', '\n', '\017', 'm', 'e', 's', +'s', 'a', 'g', 'e', 'n', 'a', 'm', 'e', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\271', '\354', '\003', ' ', '\001', '(', '\010', +'R', '\016', 'm', 'e', 's', 's', 'a', 'g', 'e', 'n', 'a', 'm', 'e', 'A', 'l', 'l', ':', 'R', '\n', '\025', 'g', 'o', 'p', 'r', 'o', +'t', 'o', '_', 's', 'i', 'z', 'e', 'c', 'a', 'c', 'h', 'e', '_', 'a', 'l', 'l', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\272', '\354', '\003', +' ', '\001', '(', '\010', 'R', '\023', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'S', 'i', 'z', 'e', 'c', 'a', 'c', 'h', 'e', 'A', 'l', 'l', +':', 'N', '\n', '\023', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'u', 'n', 'k', 'e', 'y', 'e', 'd', '_', 'a', 'l', 'l', '\022', '\034', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', +'o', 'n', 's', '\030', '\273', '\354', '\003', ' ', '\001', '(', '\010', 'R', '\021', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'U', 'n', 'k', 'e', 'y', +'e', 'd', 'A', 'l', 'l', ':', 'J', '\n', '\017', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'g', 'e', 't', 't', 'e', 'r', 's', '\022', +'\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', +'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\201', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\016', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'G', +'e', 't', 't', 'e', 'r', 's', ':', 'L', '\n', '\020', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 's', 't', 'r', 'i', 'n', 'g', 'e', +'r', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', +'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\203', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\017', 'g', 'o', 'p', 'r', 'o', 't', +'o', 'S', 't', 'r', 'i', 'n', 'g', 'e', 'r', ':', 'F', '\n', '\r', 'v', 'e', 'r', 'b', 'o', 's', 'e', '_', 'e', 'q', 'u', 'a', +'l', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', +'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\204', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\014', 'v', 'e', 'r', 'b', 'o', 's', +'e', 'E', 'q', 'u', 'a', 'l', ':', '5', '\n', '\004', 'f', 'a', 'c', 'e', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\205', '\364', +'\003', ' ', '\001', '(', '\010', 'R', '\004', 'f', 'a', 'c', 'e', ':', '=', '\n', '\010', 'g', 'o', 's', 't', 'r', 'i', 'n', 'g', '\022', '\037', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', +'p', 't', 'i', 'o', 'n', 's', '\030', '\206', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\010', 'g', 'o', 's', 't', 'r', 'i', 'n', 'g', ':', +'=', '\n', '\010', 'p', 'o', 'p', 'u', 'l', 'a', 't', 'e', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\207', '\364', '\003', ' ', '\001', +'(', '\010', 'R', '\010', 'p', 'o', 'p', 'u', 'l', 'a', 't', 'e', ':', '=', '\n', '\010', 's', 't', 'r', 'i', 'n', 'g', 'e', 'r', '\022', +'\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', +'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\300', '\213', '\004', ' ', '\001', '(', '\010', 'R', '\010', 's', 't', 'r', 'i', 'n', 'g', 'e', 'r', +':', ';', '\n', '\007', 'o', 'n', 'l', 'y', 'o', 'n', 'e', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\211', '\364', '\003', ' ', '\001', +'(', '\010', 'R', '\007', 'o', 'n', 'l', 'y', 'o', 'n', 'e', ':', '7', '\n', '\005', 'e', 'q', 'u', 'a', 'l', '\022', '\037', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', +'o', 'n', 's', '\030', '\215', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\005', 'e', 'q', 'u', 'a', 'l', ':', 'C', '\n', '\013', 'd', 'e', 's', +'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\364', '\003', ' ', '\001', '(', '\010', 'R', +'\013', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', ':', ';', '\n', '\007', 't', 'e', 's', 't', 'g', 'e', 'n', '\022', '\037', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', +'p', 't', 'i', 'o', 'n', 's', '\030', '\217', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\007', 't', 'e', 's', 't', 'g', 'e', 'n', ':', '=', +'\n', '\010', 'b', 'e', 'n', 'c', 'h', 'g', 'e', 'n', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\220', '\364', '\003', ' ', '\001', '(', +'\010', 'R', '\010', 'b', 'e', 'n', 'c', 'h', 'g', 'e', 'n', ':', '?', '\n', '\t', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', '\022', +'\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', +'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\221', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\t', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', +'r', ':', 'C', '\n', '\013', 'u', 'n', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\222', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\013', 'u', 'n', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', ':', 'L', '\n', '\020', 's', +'t', 'a', 'b', 'l', 'e', '_', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\223', +'\364', '\003', ' ', '\001', '(', '\010', 'R', '\017', 's', 't', 'a', 'b', 'l', 'e', 'M', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', ':', '7', +'\n', '\005', 's', 'i', 'z', 'e', 'r', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\224', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\005', +'s', 'i', 'z', 'e', 'r', ':', 'L', '\n', '\020', 'u', 'n', 's', 'a', 'f', 'e', '_', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', +'\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', +'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\227', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\017', 'u', 'n', 's', 'a', 'f', 'e', 'M', +'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', ':', 'P', '\n', '\022', 'u', 'n', 's', 'a', 'f', 'e', '_', 'u', 'n', 'm', 'a', 'r', 's', +'h', 'a', 'l', 'e', 'r', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', +'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\230', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\021', 'u', 'n', +'s', 'a', 'f', 'e', 'U', 'n', 'm', 'a', 'r', 's', 'h', 'a', 'l', 'e', 'r', ':', 'W', '\n', '\026', 'g', 'o', 'p', 'r', 'o', 't', +'o', '_', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '_', 'm', 'a', 'p', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\231', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\024', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', +'s', 'M', 'a', 'p', ':', 'T', '\n', '\024', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'u', 'n', 'r', 'e', 'c', 'o', 'g', 'n', 'i', +'z', 'e', 'd', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', +'s', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\232', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\023', 'g', 'o', 'p', 'r', +'o', 't', 'o', 'U', 'n', 'r', 'e', 'c', 'o', 'g', 'n', 'i', 'z', 'e', 'd', ':', 'A', '\n', '\n', 'p', 'r', 'o', 't', 'o', 's', +'i', 'z', 'e', 'r', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', +'s', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\234', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\n', 'p', 'r', 'o', +'t', 'o', 's', 'i', 'z', 'e', 'r', ':', ';', '\n', '\007', 'c', 'o', 'm', 'p', 'a', 'r', 'e', '\022', '\037', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', +'s', '\030', '\235', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\007', 'c', 'o', 'm', 'p', 'a', 'r', 'e', ':', '=', '\n', '\010', 't', 'y', 'p', +'e', 'd', 'e', 'c', 'l', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', +'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\236', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\010', 't', 'y', +'p', 'e', 'd', 'e', 'c', 'l', ':', 'C', '\n', '\013', 'm', 'e', 's', 's', 'a', 'g', 'e', 'n', 'a', 'm', 'e', '\022', '\037', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', +'i', 'o', 'n', 's', '\030', '\241', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\013', 'm', 'e', 's', 's', 'a', 'g', 'e', 'n', 'a', 'm', 'e', +':', 'N', '\n', '\021', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 's', 'i', 'z', 'e', 'c', 'a', 'c', 'h', 'e', '\022', '\037', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', +'i', 'o', 'n', 's', '\030', '\242', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\020', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'S', 'i', 'z', 'e', +'c', 'a', 'c', 'h', 'e', ':', 'J', '\n', '\017', 'g', 'o', 'p', 'r', 'o', 't', 'o', '_', 'u', 'n', 'k', 'e', 'y', 'e', 'd', '\022', +'\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', +'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\243', '\364', '\003', ' ', '\001', '(', '\010', 'R', '\016', 'g', 'o', 'p', 'r', 'o', 't', 'o', 'U', +'n', 'k', 'e', 'y', 'e', 'd', ':', ';', '\n', '\010', 'n', 'u', 'l', 'l', 'a', 'b', 'l', 'e', '\022', '\035', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\351', '\373', '\003', ' ', '\001', '(', '\010', 'R', '\010', 'n', 'u', 'l', 'l', 'a', 'b', 'l', 'e', ':', '5', '\n', '\005', 'e', 'm', 'b', 'e', +'d', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', +'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\352', '\373', '\003', ' ', '\001', '(', '\010', 'R', '\005', 'e', 'm', 'b', 'e', 'd', ':', '?', '\n', +'\n', 'c', 'u', 's', 't', 'o', 'm', 't', 'y', 'p', 'e', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\353', '\373', '\003', ' ', '\001', '(', '\t', +'R', '\n', 'c', 'u', 's', 't', 'o', 'm', 't', 'y', 'p', 'e', ':', '?', '\n', '\n', 'c', 'u', 's', 't', 'o', 'm', 'n', 'a', 'm', +'e', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', +'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\354', '\373', '\003', ' ', '\001', '(', '\t', 'R', '\n', 'c', 'u', 's', 't', 'o', 'm', 'n', 'a', +'m', 'e', ':', '9', '\n', '\007', 'j', 's', 'o', 'n', 't', 'a', 'g', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\355', '\373', '\003', ' ', '\001', +'(', '\t', 'R', '\007', 'j', 's', 'o', 'n', 't', 'a', 'g', ':', ';', '\n', '\010', 'm', 'o', 'r', 'e', 't', 'a', 'g', 's', '\022', '\035', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', +'i', 'o', 'n', 's', '\030', '\356', '\373', '\003', ' ', '\001', '(', '\t', 'R', '\010', 'm', 'o', 'r', 'e', 't', 'a', 'g', 's', ':', ';', '\n', +'\010', 'c', 'a', 's', 't', 't', 'y', 'p', 'e', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\357', '\373', '\003', ' ', '\001', '(', '\t', 'R', '\010', +'c', 'a', 's', 't', 't', 'y', 'p', 'e', ':', '9', '\n', '\007', 'c', 'a', 's', 't', 'k', 'e', 'y', '\022', '\035', '.', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', +'\030', '\360', '\373', '\003', ' ', '\001', '(', '\t', 'R', '\007', 'c', 'a', 's', 't', 'k', 'e', 'y', ':', '=', '\n', '\t', 'c', 'a', 's', 't', +'v', 'a', 'l', 'u', 'e', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', +'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\361', '\373', '\003', ' ', '\001', '(', '\t', 'R', '\t', 'c', 'a', 's', 't', +'v', 'a', 'l', 'u', 'e', ':', '9', '\n', '\007', 's', 't', 'd', 't', 'i', 'm', 'e', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\362', '\373', +'\003', ' ', '\001', '(', '\010', 'R', '\007', 's', 't', 'd', 't', 'i', 'm', 'e', ':', 'A', '\n', '\013', 's', 't', 'd', 'd', 'u', 'r', 'a', +'t', 'i', 'o', 'n', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', +'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\363', '\373', '\003', ' ', '\001', '(', '\010', 'R', '\013', 's', 't', 'd', 'd', 'u', +'r', 'a', 't', 'i', 'o', 'n', ':', '?', '\n', '\n', 'w', 'k', 't', 'p', 'o', 'i', 'n', 't', 'e', 'r', '\022', '\035', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', +'s', '\030', '\364', '\373', '\003', ' ', '\001', '(', '\010', 'R', '\n', 'w', 'k', 't', 'p', 'o', 'i', 'n', 't', 'e', 'r', 'B', 'E', '\n', '\023', +'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\n', 'G', 'o', 'G', 'o', +'P', 'r', 'o', 't', 'o', 's', 'Z', '\"', 'g', 'i', 't', 'h', 'u', 'b', '.', 'c', 'o', 'm', '/', 'g', 'o', 'g', 'o', '/', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'g', 'o', 'g', 'o', 'p', 'r', 'o', 't', 'o', +}; + +static upb_def_init *deps[2] = { + &google_protobuf_descriptor_proto_upbdefinit, + NULL +}; + +upb_def_init gogoproto_gogo_proto_upbdefinit = { + deps, + NULL, + "gogoproto/gogo.proto", + UPB_STRVIEW_INIT(descriptor, 5517) +}; diff --git a/src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h b/src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h new file mode 100644 index 00000000000..a4110e2af10 --- /dev/null +++ b/src/core/ext/upb-generated/gogoproto/gogo.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * gogoproto/gogo.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOGOPROTO_GOGO_PROTO_UPBDEFS_H_ +#define GOGOPROTO_GOGO_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init gogoproto_gogo_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOGOPROTO_GOGO_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/api/annotations.upbdefs.c b/src/core/ext/upb-generated/google/api/annotations.upbdefs.c new file mode 100644 index 00000000000..f1b69216546 --- /dev/null +++ b/src/core/ext/upb-generated/google/api/annotations.upbdefs.c @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/annotations.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/api/annotations.upbdefs.h" + +extern upb_def_init google_api_http_proto_upbdefinit; +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; + +static const char descriptor[296] = {'\n', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', +'p', 'r', 'o', 't', 'o', '\022', '\n', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '\032', '\025', 'g', 'o', 'o', 'g', 'l', 'e', +'/', 'a', 'p', 'i', '/', 'h', 't', 't', 'p', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', ':', +'K', '\n', '\004', 'h', 't', 't', 'p', '\022', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'M', 'e', 't', 'h', 'o', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\260', '\312', '\274', '\"', ' ', '\001', '(', '\013', '2', '\024', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'H', 't', 't', 'p', 'R', 'u', 'l', 'e', 'R', '\004', 'h', 't', 't', +'p', 'B', 'n', '\n', '\016', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', 'B', '\020', 'A', 'n', 'n', 'o', +'t', 'a', 't', 'i', 'o', 'n', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', 'A', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', +'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'e', 'n', 'p', 'r', 'o', 't', 'o', '/', 'g', 'o', 'o', 'g', 'l', 'e', 'a', +'p', 'i', 's', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', ';', 'a', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', 's', '\242', '\002', '\004', 'G', 'A', 'P', 'I', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[3] = { + &google_api_http_proto_upbdefinit, + &google_protobuf_descriptor_proto_upbdefinit, + NULL +}; + +upb_def_init google_api_annotations_proto_upbdefinit = { + deps, + NULL, + "google/api/annotations.proto", + UPB_STRVIEW_INIT(descriptor, 296) +}; diff --git a/src/core/ext/upb-generated/google/api/annotations.upbdefs.h b/src/core/ext/upb-generated/google/api/annotations.upbdefs.h new file mode 100644 index 00000000000..8b5f25a4fd9 --- /dev/null +++ b/src/core/ext/upb-generated/google/api/annotations.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/annotations.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_API_ANNOTATIONS_PROTO_UPBDEFS_H_ +#define GOOGLE_API_ANNOTATIONS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_api_annotations_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_API_ANNOTATIONS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upbdefs.c b/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upbdefs.c new file mode 100644 index 00000000000..d44ccca9b73 --- /dev/null +++ b/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upbdefs.c @@ -0,0 +1,175 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/expr/v1alpha1/syntax.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/api/expr/v1alpha1/syntax.upbdefs.h" + +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_struct_proto_upbdefinit; +extern upb_def_init google_protobuf_timestamp_proto_upbdefinit; +extern const upb_msglayout google_api_expr_v1alpha1_ParsedExpr_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Expr_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Expr_Ident_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Expr_Select_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Expr_Call_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Expr_CreateList_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Expr_CreateStruct_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Expr_Comprehension_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_Constant_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_SourceInfo_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit; +extern const upb_msglayout google_api_expr_v1alpha1_SourcePosition_msginit; + +static const upb_msglayout *layouts[13] = { + &google_api_expr_v1alpha1_ParsedExpr_msginit, + &google_api_expr_v1alpha1_Expr_msginit, + &google_api_expr_v1alpha1_Expr_Ident_msginit, + &google_api_expr_v1alpha1_Expr_Select_msginit, + &google_api_expr_v1alpha1_Expr_Call_msginit, + &google_api_expr_v1alpha1_Expr_CreateList_msginit, + &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, + &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, + &google_api_expr_v1alpha1_Expr_Comprehension_msginit, + &google_api_expr_v1alpha1_Constant_msginit, + &google_api_expr_v1alpha1_SourceInfo_msginit, + &google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit, + &google_api_expr_v1alpha1_SourcePosition_msginit, +}; + +static const char descriptor[2877] = {'\n', '%', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'e', 'x', 'p', 'r', '/', 'v', '1', 'a', 'l', 'p', 'h', 'a', +'1', '/', 's', 'y', 'n', 't', 'a', 'x', '.', 'p', 'r', 'o', 't', 'o', '\022', '\030', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', +'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', +'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', +'t', 'o', '\032', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', +'t', 'a', 'm', 'p', '.', 'p', 'r', 'o', 't', 'o', '\"', '\207', '\001', '\n', '\n', 'P', 'a', 'r', 's', 'e', 'd', 'E', 'x', 'p', 'r', +'\022', '2', '\n', '\004', 'e', 'x', 'p', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', +'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\004', 'e', 'x', +'p', 'r', '\022', 'E', '\n', '\013', 's', 'o', 'u', 'r', 'c', 'e', '_', 'i', 'n', 'f', 'o', '\030', '\003', ' ', '\001', '(', '\013', '2', '$', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', +'.', 'S', 'o', 'u', 'r', 'c', 'e', 'I', 'n', 'f', 'o', 'R', '\n', 's', 'o', 'u', 'r', 'c', 'e', 'I', 'n', 'f', 'o', '\"', '\334', +'\014', '\n', '\004', 'E', 'x', 'p', 'r', '\022', '\016', '\n', '\002', 'i', 'd', '\030', '\002', ' ', '\001', '(', '\003', 'R', '\002', 'i', 'd', '\022', 'C', +'\n', '\n', 'c', 'o', 'n', 's', 't', '_', 'e', 'x', 'p', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', '\"', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'C', 'o', 'n', 's', +'t', 'a', 'n', 't', 'H', '\000', 'R', '\t', 'c', 'o', 'n', 's', 't', 'E', 'x', 'p', 'r', '\022', 'E', '\n', '\n', 'i', 'd', 'e', 'n', +'t', '_', 'e', 'x', 'p', 'r', '\030', '\004', ' ', '\001', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', +'.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', '.', 'I', 'd', 'e', 'n', 't', +'H', '\000', 'R', '\t', 'i', 'd', 'e', 'n', 't', 'E', 'x', 'p', 'r', '\022', 'H', '\n', '\013', 's', 'e', 'l', 'e', 'c', 't', '_', 'e', +'x', 'p', 'r', '\030', '\005', ' ', '\001', '(', '\013', '2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', +'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', '.', 'S', 'e', 'l', 'e', 'c', 't', 'H', '\000', +'R', '\n', 's', 'e', 'l', 'e', 'c', 't', 'E', 'x', 'p', 'r', '\022', 'B', '\n', '\t', 'c', 'a', 'l', 'l', '_', 'e', 'x', 'p', 'r', +'\030', '\006', ' ', '\001', '(', '\013', '2', '#', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', +'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', '.', 'C', 'a', 'l', 'l', 'H', '\000', 'R', '\010', 'c', 'a', 'l', +'l', 'E', 'x', 'p', 'r', '\022', 'H', '\n', '\t', 'l', 'i', 's', 't', '_', 'e', 'x', 'p', 'r', '\030', '\007', ' ', '\001', '(', '\013', '2', +')', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', +'1', '.', 'E', 'x', 'p', 'r', '.', 'C', 'r', 'e', 'a', 't', 'e', 'L', 'i', 's', 't', 'H', '\000', 'R', '\010', 'l', 'i', 's', 't', +'E', 'x', 'p', 'r', '\022', 'N', '\n', '\013', 's', 't', 'r', 'u', 'c', 't', '_', 'e', 'x', 'p', 'r', '\030', '\010', ' ', '\001', '(', '\013', +'2', '+', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', +'a', '1', '.', 'E', 'x', 'p', 'r', '.', 'C', 'r', 'e', 'a', 't', 'e', 'S', 't', 'r', 'u', 'c', 't', 'H', '\000', 'R', '\n', 's', +'t', 'r', 'u', 'c', 't', 'E', 'x', 'p', 'r', '\022', ']', '\n', '\022', 'c', 'o', 'm', 'p', 'r', 'e', 'h', 'e', 'n', 's', 'i', 'o', +'n', '_', 'e', 'x', 'p', 'r', '\030', '\t', ' ', '\001', '(', '\013', '2', ',', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', +'.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', '.', 'C', 'o', 'm', 'p', 'r', +'e', 'h', 'e', 'n', 's', 'i', 'o', 'n', 'H', '\000', 'R', '\021', 'c', 'o', 'm', 'p', 'r', 'e', 'h', 'e', 'n', 's', 'i', 'o', 'n', +'E', 'x', 'p', 'r', '\032', '\033', '\n', '\005', 'I', 'd', 'e', 'n', 't', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', +'(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\032', 'u', '\n', '\006', 'S', 'e', 'l', 'e', 'c', 't', '\022', '8', '\n', '\007', 'o', 'p', 'e', +'r', 'a', 'n', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', +'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\007', 'o', 'p', 'e', 'r', 'a', 'n', +'d', '\022', '\024', '\n', '\005', 'f', 'i', 'e', 'l', 'd', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\005', 'f', 'i', 'e', 'l', 'd', '\022', '\033', +'\n', '\t', 't', 'e', 's', 't', '_', 'o', 'n', 'l', 'y', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\010', 't', 'e', 's', 't', 'O', 'n', +'l', 'y', '\032', '\216', '\001', '\n', '\004', 'C', 'a', 'l', 'l', '\022', '6', '\n', '\006', 't', 'a', 'r', 'g', 'e', 't', '\030', '\001', ' ', '\001', +'(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', +'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\006', 't', 'a', 'r', 'g', 'e', 't', '\022', '\032', '\n', '\010', 'f', 'u', 'n', 'c', +'t', 'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\010', 'f', 'u', 'n', 'c', 't', 'i', 'o', 'n', '\022', '2', '\n', '\004', 'a', +'r', 'g', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', +'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\004', 'a', 'r', 'g', 's', '\032', 'H', '\n', +'\n', 'C', 'r', 'e', 'a', 't', 'e', 'L', 'i', 's', 't', '\022', ':', '\n', '\010', 'e', 'l', 'e', 'm', 'e', 'n', 't', 's', '\030', '\001', +' ', '\003', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', +'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\010', 'e', 'l', 'e', 'm', 'e', 'n', 't', 's', '\032', '\264', '\002', '\n', +'\014', 'C', 'r', 'e', 'a', 't', 'e', 'S', 't', 'r', 'u', 'c', 't', '\022', '!', '\n', '\014', 'm', 'e', 's', 's', 'a', 'g', 'e', '_', +'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'm', 'e', 's', 's', 'a', 'g', 'e', 'N', 'a', 'm', 'e', '\022', 'K', +'\n', '\007', 'e', 'n', 't', 'r', 'i', 'e', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '1', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', '.', 'C', 'r', +'e', 'a', 't', 'e', 'S', 't', 'r', 'u', 'c', 't', '.', 'E', 'n', 't', 'r', 'y', 'R', '\007', 'e', 'n', 't', 'r', 'i', 'e', 's', +'\032', '\263', '\001', '\n', '\005', 'E', 'n', 't', 'r', 'y', '\022', '\016', '\n', '\002', 'i', 'd', '\030', '\001', ' ', '\001', '(', '\003', 'R', '\002', 'i', +'d', '\022', '\035', '\n', '\t', 'f', 'i', 'e', 'l', 'd', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\010', 'f', +'i', 'e', 'l', 'd', 'K', 'e', 'y', '\022', '9', '\n', '\007', 'm', 'a', 'p', '_', 'k', 'e', 'y', '\030', '\003', ' ', '\001', '(', '\013', '2', +'\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', +'1', '.', 'E', 'x', 'p', 'r', 'H', '\000', 'R', '\006', 'm', 'a', 'p', 'K', 'e', 'y', '\022', '4', '\n', '\005', 'v', 'a', 'l', 'u', 'e', +'\030', '\004', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', +'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\005', 'v', 'a', 'l', 'u', 'e', 'B', '\n', '\n', '\010', 'k', +'e', 'y', '_', 'k', 'i', 'n', 'd', '\032', '\375', '\002', '\n', '\r', 'C', 'o', 'm', 'p', 'r', 'e', 'h', 'e', 'n', 's', 'i', 'o', 'n', +'\022', '\031', '\n', '\010', 'i', 't', 'e', 'r', '_', 'v', 'a', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 'i', 't', 'e', 'r', 'V', +'a', 'r', '\022', '=', '\n', '\n', 'i', 't', 'e', 'r', '_', 'r', 'a', 'n', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\036', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', +'E', 'x', 'p', 'r', 'R', '\t', 'i', 't', 'e', 'r', 'R', 'a', 'n', 'g', 'e', '\022', '\031', '\n', '\010', 'a', 'c', 'c', 'u', '_', 'v', +'a', 'r', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\007', 'a', 'c', 'c', 'u', 'V', 'a', 'r', '\022', ';', '\n', '\t', 'a', 'c', 'c', 'u', +'_', 'i', 'n', 'i', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', +'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\010', 'a', 'c', 'c', 'u', 'I', +'n', 'i', 't', '\022', 'E', '\n', '\016', 'l', 'o', 'o', 'p', '_', 'c', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', '\030', '\005', ' ', '\001', +'(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', +'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\r', 'l', 'o', 'o', 'p', 'C', 'o', 'n', 'd', 'i', 't', 'i', 'o', 'n', '\022', +';', '\n', '\t', 'l', 'o', 'o', 'p', '_', 's', 't', 'e', 'p', '\030', '\006', ' ', '\001', '(', '\013', '2', '\036', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'E', 'x', 'p', 'r', +'R', '\010', 'l', 'o', 'o', 'p', 'S', 't', 'e', 'p', '\022', '6', '\n', '\006', 'r', 'e', 's', 'u', 'l', 't', '\030', '\007', ' ', '\001', '(', +'\013', '2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', +'h', 'a', '1', '.', 'E', 'x', 'p', 'r', 'R', '\006', 'r', 'e', 's', 'u', 'l', 't', 'B', '\013', '\n', '\t', 'e', 'x', 'p', 'r', '_', +'k', 'i', 'n', 'd', '\"', '\301', '\003', '\n', '\010', 'C', 'o', 'n', 's', 't', 'a', 'n', 't', '\022', ';', '\n', '\n', 'n', 'u', 'l', 'l', +'_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\016', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'N', 'u', 'l', 'l', 'V', 'a', 'l', 'u', 'e', 'H', '\000', 'R', '\t', 'n', 'u', 'l', 'l', 'V', 'a', +'l', 'u', 'e', '\022', '\037', '\n', '\n', 'b', 'o', 'o', 'l', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\010', 'H', '\000', +'R', '\t', 'b', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', '\022', '!', '\n', '\013', 'i', 'n', 't', '6', '4', '_', 'v', 'a', 'l', 'u', +'e', '\030', '\003', ' ', '\001', '(', '\003', 'H', '\000', 'R', '\n', 'i', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', '\022', '#', '\n', '\014', +'u', 'i', 'n', 't', '6', '4', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\004', ' ', '\001', '(', '\004', 'H', '\000', 'R', '\013', 'u', 'i', 'n', +'t', '6', '4', 'V', 'a', 'l', 'u', 'e', '\022', '#', '\n', '\014', 'd', 'o', 'u', 'b', 'l', 'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', +'\005', ' ', '\001', '(', '\001', 'H', '\000', 'R', '\013', 'd', 'o', 'u', 'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', '\022', '#', '\n', '\014', 's', +'t', 'r', 'i', 'n', 'g', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\006', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\013', 's', 't', 'r', 'i', +'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '!', '\n', '\013', 'b', 'y', 't', 'e', 's', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\007', ' ', +'\001', '(', '\014', 'H', '\000', 'R', '\n', 'b', 'y', 't', 'e', 's', 'V', 'a', 'l', 'u', 'e', '\022', 'F', '\n', '\016', 'd', 'u', 'r', 'a', +'t', 'i', 'o', 'n', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\010', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', '\002', '\030', '\001', 'H', '\000', 'R', +'\r', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'V', 'a', 'l', 'u', 'e', '\022', 'I', '\n', '\017', 't', 'i', 'm', 'e', 's', 't', 'a', +'m', 'p', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\t', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\016', +'t', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'V', 'a', 'l', 'u', 'e', 'B', '\017', '\n', '\r', 'c', 'o', 'n', 's', 't', 'a', 'n', +'t', '_', 'k', 'i', 'n', 'd', '\"', '\203', '\002', '\n', '\n', 'S', 'o', 'u', 'r', 'c', 'e', 'I', 'n', 'f', 'o', '\022', '%', '\n', '\016', +'s', 'y', 'n', 't', 'a', 'x', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\r', 's', 'y', 'n', +'t', 'a', 'x', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '\032', '\n', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\030', '\002', ' ', +'\001', '(', '\t', 'R', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\022', '!', '\n', '\014', 'l', 'i', 'n', 'e', '_', 'o', 'f', 'f', +'s', 'e', 't', 's', '\030', '\003', ' ', '\003', '(', '\005', 'R', '\013', 'l', 'i', 'n', 'e', 'O', 'f', 'f', 's', 'e', 't', 's', '\022', 'Q', +'\n', '\t', 'p', 'o', 's', 'i', 't', 'i', 'o', 'n', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '3', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'a', 'p', 'i', '.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', '.', 'S', 'o', 'u', 'r', 'c', +'e', 'I', 'n', 'f', 'o', '.', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', 's', 'E', 'n', 't', 'r', 'y', 'R', '\t', 'p', 'o', 's', +'i', 't', 'i', 'o', 'n', 's', '\032', '<', '\n', '\016', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', 's', 'E', 'n', 't', 'r', 'y', '\022', +'\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\003', 'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', +'e', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', 'p', '\n', '\016', 'S', 'o', 'u', +'r', 'c', 'e', 'P', 'o', 's', 'i', 't', 'i', 'o', 'n', '\022', '\032', '\n', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\030', '\001', +' ', '\001', '(', '\t', 'R', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\006', 'o', 'f', 'f', 's', 'e', 't', '\030', +'\002', ' ', '\001', '(', '\005', 'R', '\006', 'o', 'f', 'f', 's', 'e', 't', '\022', '\022', '\n', '\004', 'l', 'i', 'n', 'e', '\030', '\003', ' ', '\001', +'(', '\005', 'R', '\004', 'l', 'i', 'n', 'e', '\022', '\026', '\n', '\006', 'c', 'o', 'l', 'u', 'm', 'n', '\030', '\004', ' ', '\001', '(', '\005', 'R', +'\006', 'c', 'o', 'l', 'u', 'm', 'n', 'B', 'n', '\n', '\034', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', +'.', 'e', 'x', 'p', 'r', '.', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', 'B', '\013', 'S', 'y', 'n', 't', 'a', 'x', 'P', 'r', 'o', +'t', 'o', 'P', '\001', 'Z', '<', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', +'e', 'n', 'p', 'r', 'o', 't', 'o', '/', 'g', 'o', 'o', 'g', 'l', 'e', 'a', 'p', 'i', 's', '/', 'a', 'p', 'i', '/', 'e', 'x', +'p', 'r', '/', 'v', '1', 'a', 'l', 'p', 'h', 'a', '1', ';', 'e', 'x', 'p', 'r', '\370', '\001', '\001', 'b', '\006', 'p', 'r', 'o', 't', +'o', '3', +}; + +static upb_def_init *deps[4] = { + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_struct_proto_upbdefinit, + &google_protobuf_timestamp_proto_upbdefinit, + NULL +}; + +upb_def_init google_api_expr_v1alpha1_syntax_proto_upbdefinit = { + deps, + layouts, + "google/api/expr/v1alpha1/syntax.proto", + UPB_STRVIEW_INIT(descriptor, 2877) +}; diff --git a/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upbdefs.h b/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upbdefs.h new file mode 100644 index 00000000000..f1dedba0cf9 --- /dev/null +++ b/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upbdefs.h @@ -0,0 +1,95 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/expr/v1alpha1/syntax.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPBDEFS_H_ +#define GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_api_expr_v1alpha1_syntax_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_ParsedExpr_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.ParsedExpr"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Expr_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Expr"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Expr_Ident_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Expr.Ident"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Expr_Select_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Expr.Select"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Expr_Call_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Expr.Call"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Expr_CreateList_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Expr.CreateList"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Expr_CreateStruct_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Expr.CreateStruct"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Expr_CreateStruct_Entry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Expr.CreateStruct.Entry"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Expr_Comprehension_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Expr.Comprehension"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_Constant_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.Constant"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_SourceInfo_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.SourceInfo"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_SourceInfo_PositionsEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.SourceInfo.PositionsEntry"); +} + +UPB_INLINE const upb_msgdef *google_api_expr_v1alpha1_SourcePosition_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_expr_v1alpha1_syntax_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.expr.v1alpha1.SourcePosition"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_API_EXPR_V1ALPHA1_SYNTAX_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/api/http.upbdefs.c b/src/core/ext/upb-generated/google/api/http.upbdefs.c new file mode 100644 index 00000000000..232fd18de88 --- /dev/null +++ b/src/core/ext/upb-generated/google/api/http.upbdefs.c @@ -0,0 +1,61 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/http.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/api/http.upbdefs.h" + +extern const upb_msglayout google_api_Http_msginit; +extern const upb_msglayout google_api_HttpRule_msginit; +extern const upb_msglayout google_api_CustomHttpPattern_msginit; + +static const upb_msglayout *layouts[3] = { + &google_api_Http_msginit, + &google_api_HttpRule_msginit, + &google_api_CustomHttpPattern_msginit, +}; + +static const char descriptor[684] = {'\n', '\025', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'h', 't', 't', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\n', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '\"', 'y', '\n', '\004', 'H', 't', 't', 'p', '\022', '*', '\n', '\005', 'r', 'u', 'l', +'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'H', 't', 't', +'p', 'R', 'u', 'l', 'e', 'R', '\005', 'r', 'u', 'l', 'e', 's', '\022', 'E', '\n', '\037', 'f', 'u', 'l', 'l', 'y', '_', 'd', 'e', 'c', +'o', 'd', 'e', '_', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', '_', 'e', 'x', 'p', 'a', 'n', 's', 'i', 'o', 'n', '\030', '\002', ' ', +'\001', '(', '\010', 'R', '\034', 'f', 'u', 'l', 'l', 'y', 'D', 'e', 'c', 'o', 'd', 'e', 'R', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'E', +'x', 'p', 'a', 'n', 's', 'i', 'o', 'n', '\"', '\332', '\002', '\n', '\010', 'H', 't', 't', 'p', 'R', 'u', 'l', 'e', '\022', '\032', '\n', '\010', +'s', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\010', 's', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\022', +'\022', '\n', '\003', 'g', 'e', 't', '\030', '\002', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\003', 'g', 'e', 't', '\022', '\022', '\n', '\003', 'p', 'u', +'t', '\030', '\003', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\003', 'p', 'u', 't', '\022', '\024', '\n', '\004', 'p', 'o', 's', 't', '\030', '\004', ' ', +'\001', '(', '\t', 'H', '\000', 'R', '\004', 'p', 'o', 's', 't', '\022', '\030', '\n', '\006', 'd', 'e', 'l', 'e', 't', 'e', '\030', '\005', ' ', '\001', +'(', '\t', 'H', '\000', 'R', '\006', 'd', 'e', 'l', 'e', 't', 'e', '\022', '\026', '\n', '\005', 'p', 'a', 't', 'c', 'h', '\030', '\006', ' ', '\001', +'(', '\t', 'H', '\000', 'R', '\005', 'p', 'a', 't', 'c', 'h', '\022', '7', '\n', '\006', 'c', 'u', 's', 't', 'o', 'm', '\030', '\010', ' ', '\001', +'(', '\013', '2', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'C', 'u', 's', 't', 'o', 'm', 'H', 't', 't', +'p', 'P', 'a', 't', 't', 'e', 'r', 'n', 'H', '\000', 'R', '\006', 'c', 'u', 's', 't', 'o', 'm', '\022', '\022', '\n', '\004', 'b', 'o', 'd', +'y', '\030', '\007', ' ', '\001', '(', '\t', 'R', '\004', 'b', 'o', 'd', 'y', '\022', '#', '\n', '\r', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', +'_', 'b', 'o', 'd', 'y', '\030', '\014', ' ', '\001', '(', '\t', 'R', '\014', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'B', 'o', 'd', 'y', +'\022', 'E', '\n', '\023', 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', '_', 'b', 'i', 'n', 'd', 'i', 'n', 'g', 's', '\030', '\013', +' ', '\003', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'H', 't', 't', 'p', 'R', 'u', 'l', +'e', 'R', '\022', 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'B', 'i', 'n', 'd', 'i', 'n', 'g', 's', 'B', '\t', '\n', '\007', +'p', 'a', 't', 't', 'e', 'r', 'n', '\"', ';', '\n', '\021', 'C', 'u', 's', 't', 'o', 'm', 'H', 't', 't', 'p', 'P', 'a', 't', 't', +'e', 'r', 'n', '\022', '\022', '\n', '\004', 'k', 'i', 'n', 'd', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'k', 'i', 'n', 'd', '\022', '\022', +'\n', '\004', 'p', 'a', 't', 'h', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\004', 'p', 'a', 't', 'h', 'B', 'j', '\n', '\016', 'c', 'o', 'm', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', 'B', '\t', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', +'A', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'e', 'n', 'p', 'r', 'o', +'t', 'o', '/', 'g', 'o', 'o', 'g', 'l', 'e', 'a', 'p', 'i', 's', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', +'i', 'o', 'n', 's', ';', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '\370', '\001', '\001', '\242', '\002', '\004', 'G', 'A', 'P', +'I', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init google_api_http_proto_upbdefinit = { + deps, + layouts, + "google/api/http.proto", + UPB_STRVIEW_INIT(descriptor, 684) +}; diff --git a/src/core/ext/upb-generated/google/api/http.upbdefs.h b/src/core/ext/upb-generated/google/api/http.upbdefs.h new file mode 100644 index 00000000000..872706b42bb --- /dev/null +++ b/src/core/ext/upb-generated/google/api/http.upbdefs.h @@ -0,0 +1,45 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/api/http.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_API_HTTP_PROTO_UPBDEFS_H_ +#define GOOGLE_API_HTTP_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_api_http_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_api_Http_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_http_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.Http"); +} + +UPB_INLINE const upb_msgdef *google_api_HttpRule_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_http_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.HttpRule"); +} + +UPB_INLINE const upb_msgdef *google_api_CustomHttpPattern_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_api_http_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.api.CustomHttpPattern"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_API_HTTP_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/any.upbdefs.c b/src/core/ext/upb-generated/google/protobuf/any.upbdefs.c new file mode 100644 index 00000000000..60b1db34b3f --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/any.upbdefs.c @@ -0,0 +1,38 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/any.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/protobuf/any.upbdefs.h" + +extern const upb_msglayout google_protobuf_Any_msginit; + +static const upb_msglayout *layouts[1] = { + &google_protobuf_Any_msginit, +}; + +static const char descriptor[221] = {'\n', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', +'t', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', '6', '\n', '\003', 'A', 'n', +'y', '\022', '\031', '\n', '\010', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e', +'U', 'r', 'l', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\014', 'R', '\005', 'v', 'a', 'l', 'u', 'e', +'B', 'o', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\010', +'A', 'n', 'y', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '%', 'g', 'i', 't', 'h', 'u', 'b', '.', 'c', 'o', 'm', '/', 'g', 'o', +'l', 'a', 'n', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'p', 't', 'y', 'p', 'e', 's', '/', 'a', 'n', 'y', '\242', +'\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', +'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init google_protobuf_any_proto_upbdefinit = { + deps, + layouts, + "google/protobuf/any.proto", + UPB_STRVIEW_INIT(descriptor, 221) +}; diff --git a/src/core/ext/upb-generated/google/protobuf/any.upbdefs.h b/src/core/ext/upb-generated/google/protobuf/any.upbdefs.h new file mode 100644 index 00000000000..35fb19152ff --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/any.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/any.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_PROTOBUF_ANY_PROTO_UPBDEFS_H_ +#define GOOGLE_PROTOBUF_ANY_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_protobuf_any_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_protobuf_Any_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_any_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Any"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_PROTOBUF_ANY_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c b/src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c new file mode 100644 index 00000000000..719f087a73d --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c @@ -0,0 +1,386 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/descriptor.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/protobuf/descriptor.upbdefs.h" + +extern const upb_msglayout google_protobuf_FileDescriptorSet_msginit; +extern const upb_msglayout google_protobuf_FileDescriptorProto_msginit; +extern const upb_msglayout google_protobuf_DescriptorProto_msginit; +extern const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit; +extern const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit; +extern const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit; +extern const upb_msglayout google_protobuf_FieldDescriptorProto_msginit; +extern const upb_msglayout google_protobuf_OneofDescriptorProto_msginit; +extern const upb_msglayout google_protobuf_EnumDescriptorProto_msginit; +extern const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit; +extern const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit; +extern const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit; +extern const upb_msglayout google_protobuf_MethodDescriptorProto_msginit; +extern const upb_msglayout google_protobuf_FileOptions_msginit; +extern const upb_msglayout google_protobuf_MessageOptions_msginit; +extern const upb_msglayout google_protobuf_FieldOptions_msginit; +extern const upb_msglayout google_protobuf_OneofOptions_msginit; +extern const upb_msglayout google_protobuf_EnumOptions_msginit; +extern const upb_msglayout google_protobuf_EnumValueOptions_msginit; +extern const upb_msglayout google_protobuf_ServiceOptions_msginit; +extern const upb_msglayout google_protobuf_MethodOptions_msginit; +extern const upb_msglayout google_protobuf_UninterpretedOption_msginit; +extern const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit; +extern const upb_msglayout google_protobuf_SourceCodeInfo_msginit; +extern const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit; +extern const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit; +extern const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit; + +static const upb_msglayout *layouts[27] = { + &google_protobuf_FileDescriptorSet_msginit, + &google_protobuf_FileDescriptorProto_msginit, + &google_protobuf_DescriptorProto_msginit, + &google_protobuf_DescriptorProto_ExtensionRange_msginit, + &google_protobuf_DescriptorProto_ReservedRange_msginit, + &google_protobuf_ExtensionRangeOptions_msginit, + &google_protobuf_FieldDescriptorProto_msginit, + &google_protobuf_OneofDescriptorProto_msginit, + &google_protobuf_EnumDescriptorProto_msginit, + &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, + &google_protobuf_EnumValueDescriptorProto_msginit, + &google_protobuf_ServiceDescriptorProto_msginit, + &google_protobuf_MethodDescriptorProto_msginit, + &google_protobuf_FileOptions_msginit, + &google_protobuf_MessageOptions_msginit, + &google_protobuf_FieldOptions_msginit, + &google_protobuf_OneofOptions_msginit, + &google_protobuf_EnumOptions_msginit, + &google_protobuf_EnumValueOptions_msginit, + &google_protobuf_ServiceOptions_msginit, + &google_protobuf_MethodOptions_msginit, + &google_protobuf_UninterpretedOption_msginit, + &google_protobuf_UninterpretedOption_NamePart_msginit, + &google_protobuf_SourceCodeInfo_msginit, + &google_protobuf_SourceCodeInfo_Location_msginit, + &google_protobuf_GeneratedCodeInfo_msginit, + &google_protobuf_GeneratedCodeInfo_Annotation_msginit, +}; + +static const char descriptor[7619] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', +'t', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '\"', 'M', '\n', '\021', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'S', 'e', 't', '\022', '8', '\n', +'\004', 'f', 'i', 'l', 'e', '\030', '\001', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', +'\004', 'f', 'i', 'l', 'e', '\"', '\344', '\004', '\n', '\023', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', +'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', +'\030', '\n', '\007', 'p', 'a', 'c', 'k', 'a', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 'p', 'a', 'c', 'k', 'a', 'g', 'e', +'\022', '\036', '\n', '\n', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'y', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\n', 'd', 'e', 'p', +'e', 'n', 'd', 'e', 'n', 'c', 'y', '\022', '+', '\n', '\021', 'p', 'u', 'b', 'l', 'i', 'c', '_', 'd', 'e', 'p', 'e', 'n', 'd', 'e', +'n', 'c', 'y', '\030', '\n', ' ', '\003', '(', '\005', 'R', '\020', 'p', 'u', 'b', 'l', 'i', 'c', 'D', 'e', 'p', 'e', 'n', 'd', 'e', 'n', +'c', 'y', '\022', '\'', '\n', '\017', 'w', 'e', 'a', 'k', '_', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'y', '\030', '\013', ' ', '\003', +'(', '\005', 'R', '\016', 'w', 'e', 'a', 'k', 'D', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'y', '\022', 'C', '\n', '\014', 'm', 'e', 's', +'s', 'a', 'g', 'e', '_', 't', 'y', 'p', 'e', '\030', '\004', ' ', '\003', '(', '\013', '2', ' ', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', +'\013', 'm', 'e', 's', 's', 'a', 'g', 'e', 'T', 'y', 'p', 'e', '\022', 'A', '\n', '\t', 'e', 'n', 'u', 'm', '_', 't', 'y', 'p', 'e', +'\030', '\005', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'E', 'n', 'u', 'm', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\010', 'e', 'n', 'u', 'm', +'T', 'y', 'p', 'e', '\022', 'A', '\n', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\006', ' ', '\003', '(', '\013', '2', '\'', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'D', 'e', 's', +'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'C', '\n', '\t', +'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\007', ' ', '\003', '(', '\013', '2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', +'r', 'o', 't', 'o', 'R', '\t', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\022', '6', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', +'s', '\030', '\010', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\022', 'I', '\n', '\020', +'s', 'o', 'u', 'r', 'c', 'e', '_', 'c', 'o', 'd', 'e', '_', 'i', 'n', 'f', 'o', '\030', '\t', ' ', '\001', '(', '\013', '2', '\037', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'd', +'e', 'I', 'n', 'f', 'o', 'R', '\016', 's', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '\022', '\026', '\n', '\006', +'s', 'y', 'n', 't', 'a', 'x', '\030', '\014', ' ', '\001', '(', '\t', 'R', '\006', 's', 'y', 'n', 't', 'a', 'x', '\"', '\271', '\006', '\n', '\017', +'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', +' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', ';', '\n', '\005', 'f', 'i', 'e', 'l', 'd', '\030', '\002', ' ', '\003', '(', '\013', +'2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', +'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\005', 'f', 'i', 'e', 'l', 'd', '\022', 'C', '\n', '\t', +'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\006', ' ', '\003', '(', '\013', '2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', +'r', 'o', 't', 'o', 'R', '\t', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\022', 'A', '\n', '\013', 'n', 'e', 's', 't', 'e', 'd', +'_', 't', 'y', 'p', 'e', '\030', '\003', ' ', '\003', '(', '\013', '2', ' ', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '.', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\n', 'n', 'e', 's', +'t', 'e', 'd', 'T', 'y', 'p', 'e', '\022', 'A', '\n', '\t', 'e', 'n', 'u', 'm', '_', 't', 'y', 'p', 'e', '\030', '\004', ' ', '\003', '(', +'\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'D', +'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\010', 'e', 'n', 'u', 'm', 'T', 'y', 'p', 'e', '\022', +'X', '\n', '\017', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '_', 'r', 'a', 'n', 'g', 'e', '\030', '\005', ' ', '\003', '(', '\013', '2', +'/', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'e', 's', 'c', 'r', 'i', 'p', +'t', 'o', 'r', 'P', 'r', 'o', 't', 'o', '.', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', 'R', '\016', +'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', '\022', 'D', '\n', '\n', 'o', 'n', 'e', 'o', 'f', '_', 'd', +'e', 'c', 'l', '\030', '\010', ' ', '\003', '(', '\013', '2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'O', 'n', 'e', 'o', 'f', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\t', +'o', 'n', 'e', 'o', 'f', 'D', 'e', 'c', 'l', '\022', '9', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\007', ' ', '\001', '(', +'\013', '2', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', +'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\022', 'U', '\n', '\016', 'r', 'e', 's', +'e', 'r', 'v', 'e', 'd', '_', 'r', 'a', 'n', 'g', 'e', '\030', '\t', ' ', '\003', '(', '\013', '2', '.', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', +'o', '.', 'R', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'R', 'a', 'n', 'g', 'e', 'R', '\r', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', +'R', 'a', 'n', 'g', 'e', '\022', '#', '\n', '\r', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', '_', 'n', 'a', 'm', 'e', '\030', '\n', ' ', +'\003', '(', '\t', 'R', '\014', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'N', 'a', 'm', 'e', '\032', 'z', '\n', '\016', 'E', 'x', 't', 'e', +'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\005', +'R', '\005', 's', 't', 'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', +'\022', '@', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '&', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', +'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\032', '7', '\n', '\r', 'R', 'e', 's', 'e', 'r', +'v', 'e', 'd', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\005', 'R', '\005', +'s', 't', 'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', '\"', '|', +'\n', '\025', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'X', +'\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', +' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', +'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', +'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', +'\301', '\006', '\n', '\024', 'F', 'i', 'e', 'l', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', +'\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\026', '\n', '\006', 'n', 'u', +'m', 'b', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\005', 'R', '\006', 'n', 'u', 'm', 'b', 'e', 'r', '\022', 'A', '\n', '\005', 'l', 'a', 'b', +'e', 'l', '\030', '\004', ' ', '\001', '(', '\016', '2', '+', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '.', 'L', 'a', +'b', 'e', 'l', 'R', '\005', 'l', 'a', 'b', 'e', 'l', '\022', '>', '\n', '\004', 't', 'y', 'p', 'e', '\030', '\005', ' ', '\001', '(', '\016', '2', +'*', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', 'e', +'s', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '.', 'T', 'y', 'p', 'e', 'R', '\004', 't', 'y', 'p', 'e', '\022', +'\033', '\n', '\t', 't', 'y', 'p', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\010', 't', 'y', 'p', 'e', 'N', +'a', 'm', 'e', '\022', '\032', '\n', '\010', 'e', 'x', 't', 'e', 'n', 'd', 'e', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\010', 'e', 'x', +'t', 'e', 'n', 'd', 'e', 'e', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\007', +' ', '\001', '(', '\t', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '\037', '\n', '\013', 'o', 'n', 'e', +'o', 'f', '_', 'i', 'n', 'd', 'e', 'x', '\030', '\t', ' ', '\001', '(', '\005', 'R', '\n', 'o', 'n', 'e', 'o', 'f', 'I', 'n', 'd', 'e', +'x', '\022', '\033', '\n', '\t', 'j', 's', 'o', 'n', '_', 'n', 'a', 'm', 'e', '\030', '\n', ' ', '\001', '(', '\t', 'R', '\010', 'j', 's', 'o', +'n', 'N', 'a', 'm', 'e', '\022', '7', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\010', ' ', '\001', '(', '\013', '2', '\035', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', +'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\022', '\'', '\n', '\017', 'p', 'r', 'o', 't', 'o', '3', '_', 'o', 'p', +'t', 'i', 'o', 'n', 'a', 'l', '\030', '\021', ' ', '\001', '(', '\010', 'R', '\016', 'p', 'r', 'o', 't', 'o', '3', 'O', 'p', 't', 'i', 'o', +'n', 'a', 'l', '\"', '\266', '\002', '\n', '\004', 'T', 'y', 'p', 'e', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'D', 'O', 'U', 'B', +'L', 'E', '\020', '\001', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'F', 'L', 'O', 'A', 'T', '\020', '\002', '\022', '\016', '\n', '\n', 'T', +'Y', 'P', 'E', '_', 'I', 'N', 'T', '6', '4', '\020', '\003', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'U', 'I', 'N', 'T', '6', +'4', '\020', '\004', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'I', 'N', 'T', '3', '2', '\020', '\005', '\022', '\020', '\n', '\014', 'T', 'Y', +'P', 'E', '_', 'F', 'I', 'X', 'E', 'D', '6', '4', '\020', '\006', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'F', 'I', 'X', 'E', +'D', '3', '2', '\020', '\007', '\022', '\r', '\n', '\t', 'T', 'Y', 'P', 'E', '_', 'B', 'O', 'O', 'L', '\020', '\010', '\022', '\017', '\n', '\013', 'T', +'Y', 'P', 'E', '_', 'S', 'T', 'R', 'I', 'N', 'G', '\020', '\t', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'G', 'R', 'O', 'U', +'P', '\020', '\n', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'M', 'E', 'S', 'S', 'A', 'G', 'E', '\020', '\013', '\022', '\016', '\n', '\n', +'T', 'Y', 'P', 'E', '_', 'B', 'Y', 'T', 'E', 'S', '\020', '\014', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'U', 'I', 'N', 'T', +'3', '2', '\020', '\r', '\022', '\r', '\n', '\t', 'T', 'Y', 'P', 'E', '_', 'E', 'N', 'U', 'M', '\020', '\016', '\022', '\021', '\n', '\r', 'T', 'Y', +'P', 'E', '_', 'S', 'F', 'I', 'X', 'E', 'D', '3', '2', '\020', '\017', '\022', '\021', '\n', '\r', 'T', 'Y', 'P', 'E', '_', 'S', 'F', 'I', +'X', 'E', 'D', '6', '4', '\020', '\020', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'S', 'I', 'N', 'T', '3', '2', '\020', '\021', '\022', +'\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'S', 'I', 'N', 'T', '6', '4', '\020', '\022', '\"', 'C', '\n', '\005', 'L', 'a', 'b', 'e', 'l', +'\022', '\022', '\n', '\016', 'L', 'A', 'B', 'E', 'L', '_', 'O', 'P', 'T', 'I', 'O', 'N', 'A', 'L', '\020', '\001', '\022', '\022', '\n', '\016', 'L', +'A', 'B', 'E', 'L', '_', 'R', 'E', 'Q', 'U', 'I', 'R', 'E', 'D', '\020', '\002', '\022', '\022', '\n', '\016', 'L', 'A', 'B', 'E', 'L', '_', +'R', 'E', 'P', 'E', 'A', 'T', 'E', 'D', '\020', '\003', '\"', 'c', '\n', '\024', 'O', 'n', 'e', 'o', 'f', 'D', 'e', 's', 'c', 'r', 'i', +'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', +'n', 'a', 'm', 'e', '\022', '7', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\035', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'O', 'n', 'e', 'o', 'f', 'O', 'p', 't', 'i', 'o', +'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\"', '\343', '\002', '\n', '\023', 'E', 'n', 'u', 'm', 'D', 'e', 's', 'c', 'r', +'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', +'\004', 'n', 'a', 'm', 'e', '\022', '?', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\003', '(', '\013', '2', ')', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'D', 'e', +'s', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\022', '6', '\n', '\007', 'o', +'p', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', +'s', '\022', ']', '\n', '\016', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', '_', 'r', 'a', 'n', 'g', 'e', '\030', '\004', ' ', '\003', '(', '\013', +'2', '6', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'D', 'e', +'s', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '.', 'E', 'n', 'u', 'm', 'R', 'e', 's', 'e', 'r', 'v', 'e', +'d', 'R', 'a', 'n', 'g', 'e', 'R', '\r', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'R', 'a', 'n', 'g', 'e', '\022', '#', '\n', '\r', +'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', '_', 'n', 'a', 'm', 'e', '\030', '\005', ' ', '\003', '(', '\t', 'R', '\014', 'r', 'e', 's', 'e', +'r', 'v', 'e', 'd', 'N', 'a', 'm', 'e', '\032', ';', '\n', '\021', 'E', 'n', 'u', 'm', 'R', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'R', +'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\005', 'R', '\005', 's', 't', 'a', 'r', +'t', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', '\"', '\203', '\001', '\n', '\030', 'E', +'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', '\022', +'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\026', '\n', '\006', 'n', 'u', 'm', +'b', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\006', 'n', 'u', 'm', 'b', 'e', 'r', '\022', ';', '\n', '\007', 'o', 'p', 't', 'i', +'o', 'n', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '!', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', +'o', 'n', 's', '\"', '\247', '\001', '\n', '\026', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', +'P', 'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', +'\022', '>', '\n', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\030', '\002', ' ', '\003', '(', '\013', '2', '&', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 't', 'h', 'o', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', +'r', 'P', 'r', 'o', 't', 'o', 'R', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\022', '9', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', +'\030', '\003', ' ', '\001', '(', '\013', '2', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'S', 'e', 'r', 'v', 'i', 'c', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\"', '\211', +'\002', '\n', '\025', 'M', 'e', 't', 'h', 'o', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', +'\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\035', '\n', '\n', 'i', 'n', +'p', 'u', 't', '_', 't', 'y', 'p', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\t', 'i', 'n', 'p', 'u', 't', 'T', 'y', 'p', 'e', +'\022', '\037', '\n', '\013', 'o', 'u', 't', 'p', 'u', 't', '_', 't', 'y', 'p', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\n', 'o', 'u', +'t', 'p', 'u', 't', 'T', 'y', 'p', 'e', '\022', '8', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\004', ' ', '\001', '(', '\013', +'2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 't', 'h', 'o', 'd', +'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\022', '0', '\n', '\020', 'c', 'l', 'i', 'e', 'n', +'t', '_', 's', 't', 'r', 'e', 'a', 'm', 'i', 'n', 'g', '\030', '\005', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', +'\017', 'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'r', 'e', 'a', 'm', 'i', 'n', 'g', '\022', '0', '\n', '\020', 's', 'e', 'r', 'v', 'e', +'r', '_', 's', 't', 'r', 'e', 'a', 'm', 'i', 'n', 'g', '\030', '\006', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', +'\017', 's', 'e', 'r', 'v', 'e', 'r', 'S', 't', 'r', 'e', 'a', 'm', 'i', 'n', 'g', '\"', '\221', '\t', '\n', '\013', 'F', 'i', 'l', 'e', +'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '!', '\n', '\014', 'j', 'a', 'v', 'a', '_', 'p', 'a', 'c', 'k', 'a', 'g', 'e', '\030', '\001', +' ', '\001', '(', '\t', 'R', '\013', 'j', 'a', 'v', 'a', 'P', 'a', 'c', 'k', 'a', 'g', 'e', '\022', '0', '\n', '\024', 'j', 'a', 'v', 'a', +'_', 'o', 'u', 't', 'e', 'r', '_', 'c', 'l', 'a', 's', 's', 'n', 'a', 'm', 'e', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\022', 'j', +'a', 'v', 'a', 'O', 'u', 't', 'e', 'r', 'C', 'l', 'a', 's', 's', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\023', 'j', 'a', 'v', 'a', +'_', 'm', 'u', 'l', 't', 'i', 'p', 'l', 'e', '_', 'f', 'i', 'l', 'e', 's', '\030', '\n', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', +'l', 's', 'e', 'R', '\021', 'j', 'a', 'v', 'a', 'M', 'u', 'l', 't', 'i', 'p', 'l', 'e', 'F', 'i', 'l', 'e', 's', '\022', 'D', '\n', +'\035', 'j', 'a', 'v', 'a', '_', 'g', 'e', 'n', 'e', 'r', 'a', 't', 'e', '_', 'e', 'q', 'u', 'a', 'l', 's', '_', 'a', 'n', 'd', +'_', 'h', 'a', 's', 'h', '\030', '\024', ' ', '\001', '(', '\010', 'B', '\002', '\030', '\001', 'R', '\031', 'j', 'a', 'v', 'a', 'G', 'e', 'n', 'e', +'r', 'a', 't', 'e', 'E', 'q', 'u', 'a', 'l', 's', 'A', 'n', 'd', 'H', 'a', 's', 'h', '\022', ':', '\n', '\026', 'j', 'a', 'v', 'a', +'_', 's', 't', 'r', 'i', 'n', 'g', '_', 'c', 'h', 'e', 'c', 'k', '_', 'u', 't', 'f', '8', '\030', '\033', ' ', '\001', '(', '\010', ':', +'\005', 'f', 'a', 'l', 's', 'e', 'R', '\023', 'j', 'a', 'v', 'a', 'S', 't', 'r', 'i', 'n', 'g', 'C', 'h', 'e', 'c', 'k', 'U', 't', +'f', '8', '\022', 'S', '\n', '\014', 'o', 'p', 't', 'i', 'm', 'i', 'z', 'e', '_', 'f', 'o', 'r', '\030', '\t', ' ', '\001', '(', '\016', '2', +')', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't', +'i', 'o', 'n', 's', '.', 'O', 'p', 't', 'i', 'm', 'i', 'z', 'e', 'M', 'o', 'd', 'e', ':', '\005', 'S', 'P', 'E', 'E', 'D', 'R', +'\013', 'o', 'p', 't', 'i', 'm', 'i', 'z', 'e', 'F', 'o', 'r', '\022', '\035', '\n', '\n', 'g', 'o', '_', 'p', 'a', 'c', 'k', 'a', 'g', +'e', '\030', '\013', ' ', '\001', '(', '\t', 'R', '\t', 'g', 'o', 'P', 'a', 'c', 'k', 'a', 'g', 'e', '\022', '5', '\n', '\023', 'c', 'c', '_', +'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\030', '\020', ' ', '\001', '(', '\010', ':', '\005', 'f', +'a', 'l', 's', 'e', 'R', '\021', 'c', 'c', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '9', +'\n', '\025', 'j', 'a', 'v', 'a', '_', 'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\030', '\021', +' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\023', 'j', 'a', 'v', 'a', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', +'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '5', '\n', '\023', 'p', 'y', '_', 'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 's', 'e', 'r', +'v', 'i', 'c', 'e', 's', '\030', '\022', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\021', 'p', 'y', 'G', 'e', 'n', +'e', 'r', 'i', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '7', '\n', '\024', 'p', 'h', 'p', '_', 'g', 'e', 'n', 'e', 'r', +'i', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\030', '*', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', +'\022', 'p', 'h', 'p', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '%', '\n', '\n', 'd', 'e', +'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\027', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', +'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', '.', '\n', '\020', 'c', 'c', '_', 'e', 'n', 'a', 'b', 'l', 'e', '_', 'a', 'r', 'e', +'n', 'a', 's', '\030', '\037', ' ', '\001', '(', '\010', ':', '\004', 't', 'r', 'u', 'e', 'R', '\016', 'c', 'c', 'E', 'n', 'a', 'b', 'l', 'e', +'A', 'r', 'e', 'n', 'a', 's', '\022', '*', '\n', '\021', 'o', 'b', 'j', 'c', '_', 'c', 'l', 'a', 's', 's', '_', 'p', 'r', 'e', 'f', +'i', 'x', '\030', '$', ' ', '\001', '(', '\t', 'R', '\017', 'o', 'b', 'j', 'c', 'C', 'l', 'a', 's', 's', 'P', 'r', 'e', 'f', 'i', 'x', +'\022', ')', '\n', '\020', 'c', 's', 'h', 'a', 'r', 'p', '_', 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\030', '%', ' ', '\001', '(', +'\t', 'R', '\017', 'c', 's', 'h', 'a', 'r', 'p', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\022', '!', '\n', '\014', 's', 'w', 'i', +'f', 't', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\'', ' ', '\001', '(', '\t', 'R', '\013', 's', 'w', 'i', 'f', 't', 'P', 'r', 'e', +'f', 'i', 'x', '\022', '(', '\n', '\020', 'p', 'h', 'p', '_', 'c', 'l', 'a', 's', 's', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '(', +' ', '\001', '(', '\t', 'R', '\016', 'p', 'h', 'p', 'C', 'l', 'a', 's', 's', 'P', 'r', 'e', 'f', 'i', 'x', '\022', '#', '\n', '\r', 'p', +'h', 'p', '_', 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\030', ')', ' ', '\001', '(', '\t', 'R', '\014', 'p', 'h', 'p', 'N', 'a', +'m', 'e', 's', 'p', 'a', 'c', 'e', '\022', '4', '\n', '\026', 'p', 'h', 'p', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'n', +'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\030', ',', ' ', '\001', '(', '\t', 'R', '\024', 'p', 'h', 'p', 'M', 'e', 't', 'a', 'd', 'a', +'t', 'a', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\022', '!', '\n', '\014', 'r', 'u', 'b', 'y', '_', 'p', 'a', 'c', 'k', 'a', +'g', 'e', '\030', '-', ' ', '\001', '(', '\t', 'R', '\013', 'r', 'u', 'b', 'y', 'P', 'a', 'c', 'k', 'a', 'g', 'e', '\022', 'X', '\n', '\024', +'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', +'(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', +'t', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', +'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\"', ':', '\n', '\014', 'O', 'p', 't', 'i', 'm', 'i', 'z', 'e', 'M', 'o', +'d', 'e', '\022', '\t', '\n', '\005', 'S', 'P', 'E', 'E', 'D', '\020', '\001', '\022', '\r', '\n', '\t', 'C', 'O', 'D', 'E', '_', 'S', 'I', 'Z', +'E', '\020', '\002', '\022', '\020', '\n', '\014', 'L', 'I', 'T', 'E', '_', 'R', 'U', 'N', 'T', 'I', 'M', 'E', '\020', '\003', '*', '\t', '\010', '\350', +'\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '&', '\020', '\'', '\"', '\321', '\002', '\n', '\016', 'M', 'e', 's', 's', 'a', 'g', 'e', +'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '<', '\n', '\027', 'm', 'e', 's', 's', 'a', 'g', 'e', '_', 's', 'e', 't', '_', 'w', 'i', +'r', 'e', '_', 'f', 'o', 'r', 'm', 'a', 't', '\030', '\001', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\024', 'm', +'e', 's', 's', 'a', 'g', 'e', 'S', 'e', 't', 'W', 'i', 'r', 'e', 'F', 'o', 'r', 'm', 'a', 't', '\022', 'L', '\n', '\037', 'n', 'o', +'_', 's', 't', 'a', 'n', 'd', 'a', 'r', 'd', '_', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '_', 'a', 'c', 'c', 'e', +'s', 's', 'o', 'r', '\030', '\002', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\034', 'n', 'o', 'S', 't', 'a', 'n', +'d', 'a', 'r', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'A', 'c', 'c', 'e', 's', 's', 'o', 'r', '\022', '%', '\n', +'\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', +'\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', '\033', '\n', '\t', 'm', 'a', 'p', '_', 'e', 'n', 't', 'r', 'y', '\030', +'\007', ' ', '\001', '(', '\010', 'R', '\010', 'm', 'a', 'p', 'E', 'n', 't', 'r', 'y', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', +'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', +'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', +'t', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', +'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\010', '\020', '\t', 'J', '\004', '\010', +'\t', '\020', '\n', '\"', '\342', '\003', '\n', '\014', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'A', '\n', '\005', 'c', +'t', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\016', '2', '#', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'C', 'T', 'y', 'p', 'e', ':', '\006', 'S', +'T', 'R', 'I', 'N', 'G', 'R', '\005', 'c', 't', 'y', 'p', 'e', '\022', '\026', '\n', '\006', 'p', 'a', 'c', 'k', 'e', 'd', '\030', '\002', ' ', +'\001', '(', '\010', 'R', '\006', 'p', 'a', 'c', 'k', 'e', 'd', '\022', 'G', '\n', '\006', 'j', 's', 't', 'y', 'p', 'e', '\030', '\006', ' ', '\001', +'(', '\016', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', +'d', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'J', 'S', 'T', 'y', 'p', 'e', ':', '\t', 'J', 'S', '_', 'N', 'O', 'R', 'M', 'A', +'L', 'R', '\006', 'j', 's', 't', 'y', 'p', 'e', '\022', '\031', '\n', '\004', 'l', 'a', 'z', 'y', '\030', '\005', ' ', '\001', '(', '\010', ':', '\005', +'f', 'a', 'l', 's', 'e', 'R', '\004', 'l', 'a', 'z', 'y', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', +'\030', '\003', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', +'\022', '\031', '\n', '\004', 'w', 'e', 'a', 'k', '\030', '\n', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\004', 'w', 'e', +'a', 'k', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', +'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', +'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', +'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\"', '/', '\n', '\005', 'C', 'T', 'y', 'p', +'e', '\022', '\n', '\n', '\006', 'S', 'T', 'R', 'I', 'N', 'G', '\020', '\000', '\022', '\010', '\n', '\004', 'C', 'O', 'R', 'D', '\020', '\001', '\022', '\020', +'\n', '\014', 'S', 'T', 'R', 'I', 'N', 'G', '_', 'P', 'I', 'E', 'C', 'E', '\020', '\002', '\"', '5', '\n', '\006', 'J', 'S', 'T', 'y', 'p', +'e', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'N', 'O', 'R', 'M', 'A', 'L', '\020', '\000', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'S', 'T', +'R', 'I', 'N', 'G', '\020', '\001', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'N', 'U', 'M', 'B', 'E', 'R', '\020', '\002', '*', '\t', '\010', '\350', +'\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\004', '\020', '\005', '\"', 's', '\n', '\014', 'O', 'n', 'e', 'o', 'f', 'O', 'p', 't', +'i', 'o', 'n', 's', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', +'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', +'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', +'\200', '\200', '\200', '\200', '\002', '\"', '\300', '\001', '\n', '\013', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '\037', '\n', '\013', +'a', 'l', 'l', 'o', 'w', '_', 'a', 'l', 'i', 'a', 's', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\n', 'a', 'l', 'l', 'o', 'w', 'A', +'l', 'i', 'a', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\010', ':', +'\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i', +'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', +'$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', +'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', +'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\005', '\020', '\006', +'\"', '\236', '\001', '\n', '\020', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', +'d', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', +'d', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', +'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', +'t', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', +'*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\234', '\001', '\n', '\016', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'O', 'p', +'t', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '!', ' ', '\001', '(', '\010', +':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', +'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', +'2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', +'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', +'t', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\340', '\002', '\n', '\r', +'M', 'e', 't', 'h', 'o', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', +'e', 'd', '\030', '!', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', +'e', 'd', '\022', 'q', '\n', '\021', 'i', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', '_', 'l', 'e', 'v', 'e', 'l', '\030', '\"', +' ', '\001', '(', '\016', '2', '/', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', +'t', 'h', 'o', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'I', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', +'v', 'e', 'l', ':', '\023', 'I', 'D', 'E', 'M', 'P', 'O', 'T', 'E', 'N', 'C', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', 'R', +'\020', 'i', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', 'v', 'e', 'l', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', +'t', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', +'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', +'d', 'O', 'p', 't', 'i', 'o', 'n', '\"', 'P', '\n', '\020', 'I', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', 'v', +'e', 'l', '\022', '\027', '\n', '\023', 'I', 'D', 'E', 'M', 'P', 'O', 'T', 'E', 'N', 'C', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', +'\020', '\000', '\022', '\023', '\n', '\017', 'N', 'O', '_', 'S', 'I', 'D', 'E', '_', 'E', 'F', 'F', 'E', 'C', 'T', 'S', '\020', '\001', '\022', '\016', +'\n', '\n', 'I', 'D', 'E', 'M', 'P', 'O', 'T', 'E', 'N', 'T', '\020', '\002', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', +'\"', '\232', '\003', '\n', '\023', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\022', +'A', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\003', '(', '\013', '2', '-', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', +'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', +'n', '.', 'N', 'a', 'm', 'e', 'P', 'a', 'r', 't', 'R', '\004', 'n', 'a', 'm', 'e', '\022', ')', '\n', '\020', 'i', 'd', 'e', 'n', 't', +'i', 'f', 'i', 'e', 'r', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'i', 'd', 'e', 'n', 't', 'i', +'f', 'i', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\022', ',', '\n', '\022', 'p', 'o', 's', 'i', 't', 'i', 'v', 'e', '_', 'i', 'n', 't', +'_', 'v', 'a', 'l', 'u', 'e', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\020', 'p', 'o', 's', 'i', 't', 'i', 'v', 'e', 'I', 'n', 't', +'V', 'a', 'l', 'u', 'e', '\022', ',', '\n', '\022', 'n', 'e', 'g', 'a', 't', 'i', 'v', 'e', '_', 'i', 'n', 't', '_', 'v', 'a', 'l', +'u', 'e', '\030', '\005', ' ', '\001', '(', '\003', 'R', '\020', 'n', 'e', 'g', 'a', 't', 'i', 'v', 'e', 'I', 'n', 't', 'V', 'a', 'l', 'u', +'e', '\022', '!', '\n', '\014', 'd', 'o', 'u', 'b', 'l', 'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\006', ' ', '\001', '(', '\001', 'R', '\013', +'d', 'o', 'u', 'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', '\022', '!', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_', 'v', 'a', 'l', +'u', 'e', '\030', '\007', ' ', '\001', '(', '\014', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\'', '\n', '\017', +'a', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\016', 'a', 'g', +'g', 'r', 'e', 'g', 'a', 't', 'e', 'V', 'a', 'l', 'u', 'e', '\032', 'J', '\n', '\010', 'N', 'a', 'm', 'e', 'P', 'a', 'r', 't', '\022', +'\033', '\n', '\t', 'n', 'a', 'm', 'e', '_', 'p', 'a', 'r', 't', '\030', '\001', ' ', '\002', '(', '\t', 'R', '\010', 'n', 'a', 'm', 'e', 'P', +'a', 'r', 't', '\022', '!', '\n', '\014', 'i', 's', '_', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\002', ' ', '\002', '(', '\010', +'R', '\013', 'i', 's', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\"', '\247', '\002', '\n', '\016', 'S', 'o', 'u', 'r', 'c', 'e', 'C', +'o', 'd', 'e', 'I', 'n', 'f', 'o', '\022', 'D', '\n', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\003', '(', '\013', +'2', '(', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e', +'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '.', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', 'R', '\010', 'l', 'o', 'c', 'a', 't', 'i', +'o', 'n', '\032', '\316', '\001', '\n', '\010', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', +' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', '\026', '\n', '\004', 's', 'p', 'a', 'n', '\030', '\002', ' ', +'\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', '\004', 's', 'p', 'a', 'n', '\022', ')', '\n', '\020', 'l', 'e', 'a', 'd', 'i', 'n', 'g', '_', +'c', 'o', 'm', 'm', 'e', 'n', 't', 's', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'l', 'e', 'a', 'd', 'i', 'n', 'g', 'C', 'o', +'m', 'm', 'e', 'n', 't', 's', '\022', '+', '\n', '\021', 't', 'r', 'a', 'i', 'l', 'i', 'n', 'g', '_', 'c', 'o', 'm', 'm', 'e', 'n', +'t', 's', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\020', 't', 'r', 'a', 'i', 'l', 'i', 'n', 'g', 'C', 'o', 'm', 'm', 'e', 'n', 't', +'s', '\022', ':', '\n', '\031', 'l', 'e', 'a', 'd', 'i', 'n', 'g', '_', 'd', 'e', 't', 'a', 'c', 'h', 'e', 'd', '_', 'c', 'o', 'm', +'m', 'e', 'n', 't', 's', '\030', '\006', ' ', '\003', '(', '\t', 'R', '\027', 'l', 'e', 'a', 'd', 'i', 'n', 'g', 'D', 'e', 't', 'a', 'c', +'h', 'e', 'd', 'C', 'o', 'm', 'm', 'e', 'n', 't', 's', '\"', '\321', '\001', '\n', '\021', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'd', +'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '\022', 'M', '\n', '\n', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', +'\003', '(', '\013', '2', '-', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'G', 'e', 'n', +'e', 'r', 'a', 't', 'e', 'd', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '.', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', +'R', '\n', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\032', 'm', '\n', '\n', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', '\022', '\026', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', '\004', 'p', 'a', 't', 'h', +'\022', '\037', '\n', '\013', 's', 'o', 'u', 'r', 'c', 'e', '_', 'f', 'i', 'l', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\n', 's', 'o', +'u', 'r', 'c', 'e', 'F', 'i', 'l', 'e', '\022', '\024', '\n', '\005', 'b', 'e', 'g', 'i', 'n', '\030', '\003', ' ', '\001', '(', '\005', 'R', '\005', +'b', 'e', 'g', 'i', 'n', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\004', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', 'B', '\217', +'\001', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\020', 'D', +'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 's', 'H', '\001', 'Z', '>', 'g', 'i', 't', 'h', 'u', 'b', +'.', 'c', 'o', 'm', '/', 'g', 'o', 'l', 'a', 'n', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'p', 'r', 'o', 't', +'o', 'c', '-', 'g', 'e', 'n', '-', 'g', 'o', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', ';', 'd', 'e', 's', 'c', +'r', 'i', 'p', 't', 'o', 'r', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\032', 'G', 'o', 'o', 'g', 'l', 'e', '.', +'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'R', 'e', 'f', 'l', 'e', 'c', 't', 'i', 'o', 'n', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init google_protobuf_descriptor_proto_upbdefinit = { + deps, + layouts, + "google/protobuf/descriptor.proto", + UPB_STRVIEW_INIT(descriptor, 7619) +}; diff --git a/src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h b/src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h new file mode 100644 index 00000000000..285d84e97b0 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h @@ -0,0 +1,165 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/descriptor.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPBDEFS_H_ +#define GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_protobuf_FileDescriptorSet_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.FileDescriptorSet"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_FileDescriptorProto_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.FileDescriptorProto"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_DescriptorProto_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.DescriptorProto"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_DescriptorProto_ExtensionRange_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.DescriptorProto.ExtensionRange"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_DescriptorProto_ReservedRange_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.DescriptorProto.ReservedRange"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_ExtensionRangeOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.ExtensionRangeOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_FieldDescriptorProto_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.FieldDescriptorProto"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_OneofDescriptorProto_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.OneofDescriptorProto"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_EnumDescriptorProto_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.EnumDescriptorProto"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_EnumDescriptorProto_EnumReservedRange_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.EnumDescriptorProto.EnumReservedRange"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_EnumValueDescriptorProto_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.EnumValueDescriptorProto"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_ServiceDescriptorProto_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.ServiceDescriptorProto"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_MethodDescriptorProto_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.MethodDescriptorProto"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_FileOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.FileOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_MessageOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.MessageOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_FieldOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.FieldOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_OneofOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.OneofOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_EnumOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.EnumOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_EnumValueOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.EnumValueOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_ServiceOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.ServiceOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_MethodOptions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.MethodOptions"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_UninterpretedOption_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.UninterpretedOption"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_UninterpretedOption_NamePart_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.UninterpretedOption.NamePart"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_SourceCodeInfo_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.SourceCodeInfo"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_SourceCodeInfo_Location_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.SourceCodeInfo.Location"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_GeneratedCodeInfo_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.GeneratedCodeInfo"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_GeneratedCodeInfo_Annotation_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.GeneratedCodeInfo.Annotation"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c b/src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c new file mode 100644 index 00000000000..566745d3655 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c @@ -0,0 +1,39 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/duration.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/protobuf/duration.upbdefs.h" + +extern const upb_msglayout google_protobuf_Duration_msginit; + +static const upb_msglayout *layouts[1] = { + &google_protobuf_Duration_msginit, +}; + +static const char descriptor[243] = {'\n', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', +'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', +':', '\n', '\010', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '\030', '\n', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030', '\001', ' ', +'\001', '(', '\003', 'R', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\022', '\024', '\n', '\005', 'n', 'a', 'n', 'o', 's', '\030', '\002', ' ', '\001', +'(', '\005', 'R', '\005', 'n', 'a', 'n', 'o', 's', 'B', '|', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\r', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', +'*', 'g', 'i', 't', 'h', 'u', 'b', '.', 'c', 'o', 'm', '/', 'g', 'o', 'l', 'a', 'n', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '/', 'p', 't', 'y', 'p', 'e', 's', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\370', '\001', '\001', '\242', '\002', '\003', 'G', +'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', +'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init google_protobuf_duration_proto_upbdefinit = { + deps, + layouts, + "google/protobuf/duration.proto", + UPB_STRVIEW_INIT(descriptor, 243) +}; diff --git a/src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h b/src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h new file mode 100644 index 00000000000..8cc191bf507 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/duration.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_PROTOBUF_DURATION_PROTO_UPBDEFS_H_ +#define GOOGLE_PROTOBUF_DURATION_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_protobuf_duration_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_protobuf_Duration_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_duration_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Duration"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_PROTOBUF_DURATION_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c b/src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c new file mode 100644 index 00000000000..a7ae1275d28 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c @@ -0,0 +1,37 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/empty.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/protobuf/empty.upbdefs.h" + +extern const upb_msglayout google_protobuf_Empty_msginit; + +static const upb_msglayout *layouts[1] = { + &google_protobuf_Empty_msginit, +}; + +static const char descriptor[183] = {'\n', '\033', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'e', 'm', 'p', 't', 'y', '.', 'p', +'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', '\007', '\n', '\005', +'E', 'm', 'p', 't', 'y', 'B', 'v', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', 'B', '\n', 'E', 'm', 'p', 't', 'y', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '\'', 'g', 'i', 't', 'h', 'u', 'b', +'.', 'c', 'o', 'm', '/', 'g', 'o', 'l', 'a', 'n', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'p', 't', 'y', 'p', +'e', 's', '/', 'e', 'm', 'p', 't', 'y', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', +'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', +'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init google_protobuf_empty_proto_upbdefinit = { + deps, + layouts, + "google/protobuf/empty.proto", + UPB_STRVIEW_INIT(descriptor, 183) +}; diff --git a/src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h b/src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h new file mode 100644 index 00000000000..9e6b0d0560d --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/empty.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_PROTOBUF_EMPTY_PROTO_UPBDEFS_H_ +#define GOOGLE_PROTOBUF_EMPTY_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_protobuf_empty_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_protobuf_Empty_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_empty_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Empty"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_PROTOBUF_EMPTY_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c b/src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c new file mode 100644 index 00000000000..fa9fa2aefd1 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c @@ -0,0 +1,65 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/struct.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/protobuf/struct.upbdefs.h" + +extern const upb_msglayout google_protobuf_Struct_msginit; +extern const upb_msglayout google_protobuf_Struct_FieldsEntry_msginit; +extern const upb_msglayout google_protobuf_Value_msginit; +extern const upb_msglayout google_protobuf_ListValue_msginit; + +static const upb_msglayout *layouts[4] = { + &google_protobuf_Struct_msginit, + &google_protobuf_Struct_FieldsEntry_msginit, + &google_protobuf_Value_msginit, + &google_protobuf_ListValue_msginit, +}; + +static const char descriptor[741] = {'\n', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', +'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', '\230', '\001', +'\n', '\006', 'S', 't', 'r', 'u', 'c', 't', '\022', ';', '\n', '\006', 'f', 'i', 'e', 'l', 'd', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', +'#', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', '.', +'F', 'i', 'e', 'l', 'd', 's', 'E', 'n', 't', 'r', 'y', 'R', '\006', 'f', 'i', 'e', 'l', 'd', 's', '\032', 'Q', '\n', '\013', 'F', 'i', +'e', 'l', 'd', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', +'e', 'y', '\022', ',', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\026', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'V', 'a', 'l', 'u', 'e', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', +'8', '\001', '\"', '\262', '\002', '\n', '\005', 'V', 'a', 'l', 'u', 'e', '\022', ';', '\n', '\n', 'n', 'u', 'l', 'l', '_', 'v', 'a', 'l', 'u', +'e', '\030', '\001', ' ', '\001', '(', '\016', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'N', 'u', 'l', 'l', 'V', 'a', 'l', 'u', 'e', 'H', '\000', 'R', '\t', 'n', 'u', 'l', 'l', 'V', 'a', 'l', 'u', 'e', '\022', '#', +'\n', '\014', 'n', 'u', 'm', 'b', 'e', 'r', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\001', 'H', '\000', 'R', '\013', 'n', +'u', 'm', 'b', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\022', '#', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_', 'v', 'a', 'l', 'u', +'e', '\030', '\003', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\037', '\n', +'\n', 'b', 'o', 'o', 'l', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\004', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\t', 'b', 'o', 'o', 'l', +'V', 'a', 'l', 'u', 'e', '\022', '<', '\n', '\014', 's', 't', 'r', 'u', 'c', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\005', ' ', '\001', +'(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', +'c', 't', 'H', '\000', 'R', '\013', 's', 't', 'r', 'u', 'c', 't', 'V', 'a', 'l', 'u', 'e', '\022', ';', '\n', '\n', 'l', 'i', 's', 't', +'_', 'v', 'a', 'l', 'u', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'L', 'i', 's', 't', 'V', 'a', 'l', 'u', 'e', 'H', '\000', 'R', '\t', 'l', 'i', 's', 't', 'V', 'a', +'l', 'u', 'e', 'B', '\006', '\n', '\004', 'k', 'i', 'n', 'd', '\"', ';', '\n', '\t', 'L', 'i', 's', 't', 'V', 'a', 'l', 'u', 'e', '\022', +'.', '\n', '\006', 'v', 'a', 'l', 'u', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\026', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', +'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'V', 'a', 'l', 'u', 'e', 'R', '\006', 'v', 'a', 'l', 'u', 'e', 's', '*', '\033', '\n', +'\t', 'N', 'u', 'l', 'l', 'V', 'a', 'l', 'u', 'e', '\022', '\016', '\n', '\n', 'N', 'U', 'L', 'L', '_', 'V', 'A', 'L', 'U', 'E', '\020', +'\000', 'B', '\201', '\001', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'B', '\013', 'S', 't', 'r', 'u', 'c', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '1', 'g', 'i', 't', 'h', 'u', 'b', '.', 'c', +'o', 'm', '/', 'g', 'o', 'l', 'a', 'n', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'p', 't', 'y', 'p', 'e', 's', +'/', 's', 't', 'r', 'u', 'c', 't', ';', 's', 't', 'r', 'u', 'c', 't', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', +'\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', +'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init google_protobuf_struct_proto_upbdefinit = { + deps, + layouts, + "google/protobuf/struct.proto", + UPB_STRVIEW_INIT(descriptor, 741) +}; diff --git a/src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h b/src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h new file mode 100644 index 00000000000..4e170213f74 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h @@ -0,0 +1,50 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/struct.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_PROTOBUF_STRUCT_PROTO_UPBDEFS_H_ +#define GOOGLE_PROTOBUF_STRUCT_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_protobuf_struct_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_protobuf_Struct_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_struct_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Struct"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_Struct_FieldsEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_struct_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Struct.FieldsEntry"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_Value_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_struct_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Value"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_ListValue_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_struct_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.ListValue"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_PROTOBUF_STRUCT_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c b/src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c new file mode 100644 index 00000000000..beb80cda829 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c @@ -0,0 +1,39 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/timestamp.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/protobuf/timestamp.upbdefs.h" + +extern const upb_msglayout google_protobuf_Timestamp_msginit; + +static const upb_msglayout *layouts[1] = { + &google_protobuf_Timestamp_msginit, +}; + +static const char descriptor[247] = {'\n', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', 'a', +'m', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'\"', ';', '\n', '\t', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '\030', '\n', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030', +'\001', ' ', '\001', '(', '\003', 'R', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\022', '\024', '\n', '\005', 'n', 'a', 'n', 'o', 's', '\030', '\002', +' ', '\001', '(', '\005', 'R', '\005', 'n', 'a', 'n', 'o', 's', 'B', '~', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\016', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'P', 'r', 'o', 't', 'o', +'P', '\001', 'Z', '+', 'g', 'i', 't', 'h', 'u', 'b', '.', 'c', 'o', 'm', '/', 'g', 'o', 'l', 'a', 'n', 'g', '/', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '/', 'p', 't', 'y', 'p', 'e', 's', '/', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\370', '\001', '\001', +'\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init google_protobuf_timestamp_proto_upbdefinit = { + deps, + layouts, + "google/protobuf/timestamp.proto", + UPB_STRVIEW_INIT(descriptor, 247) +}; diff --git a/src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h b/src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h new file mode 100644 index 00000000000..0e375559738 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/timestamp.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPBDEFS_H_ +#define GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_protobuf_timestamp_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_protobuf_Timestamp_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_timestamp_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Timestamp"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c b/src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c new file mode 100644 index 00000000000..547ea126fd2 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c @@ -0,0 +1,66 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/wrappers.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/protobuf/wrappers.upbdefs.h" + +extern const upb_msglayout google_protobuf_DoubleValue_msginit; +extern const upb_msglayout google_protobuf_FloatValue_msginit; +extern const upb_msglayout google_protobuf_Int64Value_msginit; +extern const upb_msglayout google_protobuf_UInt64Value_msginit; +extern const upb_msglayout google_protobuf_Int32Value_msginit; +extern const upb_msglayout google_protobuf_UInt32Value_msginit; +extern const upb_msglayout google_protobuf_BoolValue_msginit; +extern const upb_msglayout google_protobuf_StringValue_msginit; +extern const upb_msglayout google_protobuf_BytesValue_msginit; + +static const upb_msglayout *layouts[9] = { + &google_protobuf_DoubleValue_msginit, + &google_protobuf_FloatValue_msginit, + &google_protobuf_Int64Value_msginit, + &google_protobuf_UInt64Value_msginit, + &google_protobuf_Int32Value_msginit, + &google_protobuf_UInt32Value_msginit, + &google_protobuf_BoolValue_msginit, + &google_protobuf_StringValue_msginit, + &google_protobuf_BytesValue_msginit, +}; + +static const char descriptor[510] = {'\n', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', +'s', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', +'#', '\n', '\013', 'D', 'o', 'u', 'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', +' ', '\001', '(', '\001', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\"', '\n', '\n', 'F', 'l', 'o', 'a', 't', 'V', 'a', 'l', 'u', 'e', +'\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\002', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\"', '\n', +'\n', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', +'\003', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '#', '\n', '\013', 'U', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', '\022', '\024', +'\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\004', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\"', '\n', '\n', 'I', +'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\005', 'R', +'\005', 'v', 'a', 'l', 'u', 'e', '\"', '#', '\n', '\013', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', +'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '!', '\n', '\t', 'B', 'o', 'o', +'l', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\005', 'v', 'a', +'l', 'u', 'e', '\"', '#', '\n', '\013', 'S', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', +'u', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\"', '\n', '\n', 'B', 'y', 't', 'e', 's', 'V', +'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\014', 'R', '\005', 'v', 'a', 'l', 'u', +'e', 'B', '|', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', +'\r', 'W', 'r', 'a', 'p', 'p', 'e', 'r', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '*', 'g', 'i', 't', 'h', 'u', 'b', '.', +'c', 'o', 'm', '/', 'g', 'o', 'l', 'a', 'n', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'p', 't', 'y', 'p', 'e', +'s', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', +'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', +'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init google_protobuf_wrappers_proto_upbdefinit = { + deps, + layouts, + "google/protobuf/wrappers.proto", + UPB_STRVIEW_INIT(descriptor, 510) +}; diff --git a/src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h b/src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h new file mode 100644 index 00000000000..9cfcb290134 --- /dev/null +++ b/src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h @@ -0,0 +1,75 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/protobuf/wrappers.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPBDEFS_H_ +#define GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_protobuf_wrappers_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_protobuf_DoubleValue_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.DoubleValue"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_FloatValue_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.FloatValue"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_Int64Value_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Int64Value"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_UInt64Value_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.UInt64Value"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_Int32Value_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.Int32Value"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_UInt32Value_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.UInt32Value"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_BoolValue_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.BoolValue"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_StringValue_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.StringValue"); +} + +UPB_INLINE const upb_msgdef *google_protobuf_BytesValue_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.protobuf.BytesValue"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/google/rpc/status.upbdefs.c b/src/core/ext/upb-generated/google/rpc/status.upbdefs.c new file mode 100644 index 00000000000..a4300a1eb45 --- /dev/null +++ b/src/core/ext/upb-generated/google/rpc/status.upbdefs.c @@ -0,0 +1,42 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/rpc/status.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "google/rpc/status.upbdefs.h" + +extern upb_def_init google_protobuf_any_proto_upbdefinit; +extern const upb_msglayout google_rpc_Status_msginit; + +static const upb_msglayout *layouts[1] = { + &google_rpc_Status_msginit, +}; + +static const char descriptor[272] = {'\n', '\027', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'r', 'p', 'c', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', +'\022', '\n', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'r', 'p', 'c', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', +'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\"', 'f', '\n', '\006', 'S', 't', 'a', 't', 'u', 's', '\022', +'\022', '\n', '\004', 'c', 'o', 'd', 'e', '\030', '\001', ' ', '\001', '(', '\005', 'R', '\004', 'c', 'o', 'd', 'e', '\022', '\030', '\n', '\007', 'm', 'e', +'s', 's', 'a', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 'm', 'e', 's', 's', 'a', 'g', 'e', '\022', '.', '\n', '\007', 'd', +'e', 't', 'a', 'i', 'l', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\007', 'd', 'e', 't', 'a', 'i', 'l', 's', 'B', '^', '\n', '\016', 'c', 'o', 'm', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'r', 'p', 'c', 'B', '\013', 'S', 't', 'a', 't', 'u', 's', 'P', 'r', 'o', 't', 'o', 'P', +'\001', 'Z', '7', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'e', 'n', 'p', +'r', 'o', 't', 'o', '/', 'g', 'o', 'o', 'g', 'l', 'e', 'a', 'p', 'i', 's', '/', 'r', 'p', 'c', '/', 's', 't', 'a', 't', 'u', +'s', ';', 's', 't', 'a', 't', 'u', 's', '\242', '\002', '\003', 'R', 'P', 'C', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &google_protobuf_any_proto_upbdefinit, + NULL +}; + +upb_def_init google_rpc_status_proto_upbdefinit = { + deps, + layouts, + "google/rpc/status.proto", + UPB_STRVIEW_INIT(descriptor, 272) +}; diff --git a/src/core/ext/upb-generated/google/rpc/status.upbdefs.h b/src/core/ext/upb-generated/google/rpc/status.upbdefs.h new file mode 100644 index 00000000000..6a39edd9f6a --- /dev/null +++ b/src/core/ext/upb-generated/google/rpc/status.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * google/rpc/status.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef GOOGLE_RPC_STATUS_PROTO_UPBDEFS_H_ +#define GOOGLE_RPC_STATUS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init google_rpc_status_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *google_rpc_Status_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &google_rpc_status_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "google.rpc.Status"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* GOOGLE_RPC_STATUS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upbdefs.c b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upbdefs.c new file mode 100644 index 00000000000..c4fe57ea661 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upbdefs.c @@ -0,0 +1,62 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/gcp/altscontext.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "src/proto/grpc/gcp/altscontext.upbdefs.h" + +extern upb_def_init src_proto_grpc_gcp_transport_security_common_proto_upbdefinit; +extern const upb_msglayout grpc_gcp_AltsContext_msginit; +extern const upb_msglayout grpc_gcp_AltsContext_PeerAttributesEntry_msginit; + +static const upb_msglayout *layouts[2] = { + &grpc_gcp_AltsContext_msginit, + &grpc_gcp_AltsContext_PeerAttributesEntry_msginit, +}; + +static const char descriptor[718] = {'\n', '$', 's', 'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'g', 'c', 'p', '/', 'a', 'l', 't', 's', +'c', 'o', 'n', 't', 'e', 'x', 't', '.', 'p', 'r', 'o', 't', 'o', '\022', '\010', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '\032', '2', +'s', 'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'g', 'c', 'p', '/', 't', 'r', 'a', 'n', 's', 'p', +'o', 'r', 't', '_', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '_', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', +'\"', '\361', '\003', '\n', '\013', 'A', 'l', 't', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '1', '\n', '\024', 'a', 'p', 'p', 'l', 'i', +'c', 'a', 't', 'i', 'o', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\023', 'a', 'p', +'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '\'', '\n', '\017', 'r', 'e', 'c', 'o', +'r', 'd', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\016', 'r', 'e', 'c', 'o', 'r', 'd', +'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '>', '\n', '\016', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '_', 'l', 'e', 'v', 'e', +'l', '\030', '\003', ' ', '\001', '(', '\016', '2', '\027', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'S', 'e', 'c', 'u', 'r', 'i', +'t', 'y', 'L', 'e', 'v', 'e', 'l', 'R', '\r', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', 'L', 'e', 'v', 'e', 'l', '\022', '0', '\n', +'\024', 'p', 'e', 'e', 'r', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'a', 'c', 'c', 'o', 'u', 'n', 't', '\030', '\004', ' ', '\001', +'(', '\t', 'R', '\022', 'p', 'e', 'e', 'r', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'A', 'c', 'c', 'o', 'u', 'n', 't', '\022', '2', '\n', +'\025', 'l', 'o', 'c', 'a', 'l', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'a', 'c', 'c', 'o', 'u', 'n', 't', '\030', '\005', ' ', +'\001', '(', '\t', 'R', '\023', 'l', 'o', 'c', 'a', 'l', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'A', 'c', 'c', 'o', 'u', 'n', 't', '\022', +'I', '\n', '\021', 'p', 'e', 'e', 'r', '_', 'r', 'p', 'c', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', 's', '\030', '\006', ' ', '\001', '(', +'\013', '2', '\035', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'R', 'p', 'c', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'V', +'e', 'r', 's', 'i', 'o', 'n', 's', 'R', '\017', 'p', 'e', 'e', 'r', 'R', 'p', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '\022', +'R', '\n', '\017', 'p', 'e', 'e', 'r', '_', 'a', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\030', '\007', ' ', '\003', '(', '\013', '2', +')', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'A', 'l', 't', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'P', 'e', +'e', 'r', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', 'E', 'n', 't', 'r', 'y', 'R', '\016', 'p', 'e', 'e', 'r', 'A', 't', +'t', 'r', 'i', 'b', 'u', 't', 'e', 's', '\032', 'A', '\n', '\023', 'P', 'e', 'e', 'r', 'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', +'s', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', +'\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', +'B', 'l', '\n', '\025', 'i', 'o', '.', 'g', 'r', 'p', 'c', '.', 'a', 'l', 't', 's', '.', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', +'B', '\020', 'A', 'l', 't', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '?', 'g', 'o', 'o', +'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'r', 'p', 'c', '/', 'c', 'r', 'e', 'd', 'e', +'n', 't', 'i', 'a', 'l', 's', '/', 'a', 'l', 't', 's', '/', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', '/', 'p', 'r', 'o', 't', +'o', '/', 'g', 'r', 'p', 'c', '_', 'g', 'c', 'p', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &src_proto_grpc_gcp_transport_security_common_proto_upbdefinit, + NULL +}; + +upb_def_init src_proto_grpc_gcp_altscontext_proto_upbdefinit = { + deps, + layouts, + "src/proto/grpc/gcp/altscontext.proto", + UPB_STRVIEW_INIT(descriptor, 718) +}; diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upbdefs.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upbdefs.h new file mode 100644 index 00000000000..6c4d61133e6 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/gcp/altscontext.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPBDEFS_H_ +#define SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init src_proto_grpc_gcp_altscontext_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *grpc_gcp_AltsContext_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_altscontext_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.AltsContext"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_AltsContext_PeerAttributesEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_altscontext_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.AltsContext.PeerAttributesEntry"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* SRC_PROTO_GRPC_GCP_ALTSCONTEXT_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upbdefs.c b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upbdefs.c new file mode 100644 index 00000000000..e2f69459fa5 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upbdefs.c @@ -0,0 +1,176 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/gcp/handshaker.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "src/proto/grpc/gcp/handshaker.upbdefs.h" + +extern upb_def_init src_proto_grpc_gcp_transport_security_common_proto_upbdefinit; +extern const upb_msglayout grpc_gcp_Endpoint_msginit; +extern const upb_msglayout grpc_gcp_Identity_msginit; +extern const upb_msglayout grpc_gcp_Identity_AttributesEntry_msginit; +extern const upb_msglayout grpc_gcp_StartClientHandshakeReq_msginit; +extern const upb_msglayout grpc_gcp_ServerHandshakeParameters_msginit; +extern const upb_msglayout grpc_gcp_StartServerHandshakeReq_msginit; +extern const upb_msglayout grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit; +extern const upb_msglayout grpc_gcp_NextHandshakeMessageReq_msginit; +extern const upb_msglayout grpc_gcp_HandshakerReq_msginit; +extern const upb_msglayout grpc_gcp_HandshakerResult_msginit; +extern const upb_msglayout grpc_gcp_HandshakerStatus_msginit; +extern const upb_msglayout grpc_gcp_HandshakerResp_msginit; + +static const upb_msglayout *layouts[12] = { + &grpc_gcp_Endpoint_msginit, + &grpc_gcp_Identity_msginit, + &grpc_gcp_Identity_AttributesEntry_msginit, + &grpc_gcp_StartClientHandshakeReq_msginit, + &grpc_gcp_ServerHandshakeParameters_msginit, + &grpc_gcp_StartServerHandshakeReq_msginit, + &grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit, + &grpc_gcp_NextHandshakeMessageReq_msginit, + &grpc_gcp_HandshakerReq_msginit, + &grpc_gcp_HandshakerResult_msginit, + &grpc_gcp_HandshakerStatus_msginit, + &grpc_gcp_HandshakerResp_msginit, +}; + +static const char descriptor[3053] = {'\n', '#', 's', 'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'g', 'c', 'p', '/', 'h', 'a', 'n', 'd', +'s', 'h', 'a', 'k', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\010', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '\032', '2', 's', +'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'g', 'c', 'p', '/', 't', 'r', 'a', 'n', 's', 'p', 'o', +'r', 't', '_', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '_', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\"', +'t', '\n', '\010', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\022', '\035', '\n', '\n', 'i', 'p', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', +'\030', '\001', ' ', '\001', '(', '\t', 'R', '\t', 'i', 'p', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', '\022', '\n', '\004', 'p', 'o', 'r', 't', +'\030', '\002', ' ', '\001', '(', '\005', 'R', '\004', 'p', 'o', 'r', 't', '\022', '5', '\n', '\010', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', +'\003', ' ', '\001', '(', '\016', '2', '\031', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'N', 'e', 't', 'w', 'o', 'r', 'k', 'P', +'r', 'o', 't', 'o', 'c', 'o', 'l', 'R', '\010', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\"', '\350', '\001', '\n', '\010', 'I', 'd', 'e', +'n', 't', 'i', 't', 'y', '\022', ')', '\n', '\017', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'a', 'c', 'c', 'o', 'u', 'n', 't', '\030', +'\001', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\016', 's', 'e', 'r', 'v', 'i', 'c', 'e', 'A', 'c', 'c', 'o', 'u', 'n', 't', '\022', '\034', +'\n', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\010', 'h', 'o', 's', 't', 'n', +'a', 'm', 'e', '\022', 'B', '\n', '\n', 'a', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\"', +'.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'I', 'd', 'e', 'n', 't', 'i', 't', 'y', '.', 'A', 't', 't', 'r', 'i', 'b', +'u', 't', 'e', 's', 'E', 'n', 't', 'r', 'y', 'R', '\n', 'a', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', '\032', '=', '\n', '\017', +'A', 't', 't', 'r', 'i', 'b', 'u', 't', 'e', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', +'\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\005', +'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', 'B', '\020', '\n', '\016', 'i', 'd', 'e', 'n', 't', 'i', 't', 'y', '_', 'o', 'n', 'e', +'o', 'f', '\"', '\323', '\004', '\n', '\027', 'S', 't', 'a', 'r', 't', 'C', 'l', 'i', 'e', 'n', 't', 'H', 'a', 'n', 'd', 's', 'h', 'a', +'k', 'e', 'R', 'e', 'q', '\022', '[', '\n', '\033', 'h', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', '_', 's', 'e', 'c', 'u', 'r', 'i', +'t', 'y', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\001', ' ', '\001', '(', '\016', '2', '\033', '.', 'g', 'r', 'p', 'c', '.', +'g', 'c', 'p', '.', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'R', '\031', 'h', 'a', +'n', 'd', 's', 'h', 'a', 'k', 'e', 'S', 'e', 'c', 'u', 'r', 'i', 't', 'y', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '3', +'\n', '\025', 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\030', '\002', +' ', '\003', '(', '\t', 'R', '\024', 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', +'s', '\022', ')', '\n', '\020', 'r', 'e', 'c', 'o', 'r', 'd', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\030', '\003', ' ', '\003', +'(', '\t', 'R', '\017', 'r', 'e', 'c', 'o', 'r', 'd', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\022', '?', '\n', '\021', 't', 'a', +'r', 'g', 'e', 't', '_', 'i', 'd', 'e', 'n', 't', 'i', 't', 'i', 'e', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '\022', '.', 'g', +'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'I', 'd', 'e', 'n', 't', 'i', 't', 'y', 'R', '\020', 't', 'a', 'r', 'g', 'e', 't', 'I', +'d', 'e', 'n', 't', 'i', 't', 'i', 'e', 's', '\022', '9', '\n', '\016', 'l', 'o', 'c', 'a', 'l', '_', 'i', 'd', 'e', 'n', 't', 'i', +'t', 'y', '\030', '\005', ' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'I', 'd', 'e', 'n', 't', +'i', 't', 'y', 'R', '\r', 'l', 'o', 'c', 'a', 'l', 'I', 'd', 'e', 'n', 't', 'i', 't', 'y', '\022', '9', '\n', '\016', 'l', 'o', 'c', +'a', 'l', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\030', '\006', ' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'r', 'p', 'c', '.', +'g', 'c', 'p', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'R', '\r', 'l', 'o', 'c', 'a', 'l', 'E', 'n', 'd', 'p', 'o', 'i', +'n', 't', '\022', ';', '\n', '\017', 'r', 'e', 'm', 'o', 't', 'e', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\030', '\007', ' ', '\001', +'(', '\013', '2', '\022', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'R', '\016', 'r', +'e', 'm', 'o', 't', 'e', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\022', '\037', '\n', '\013', 't', 'a', 'r', 'g', 'e', 't', '_', 'n', +'a', 'm', 'e', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\n', 't', 'a', 'r', 'g', 'e', 't', 'N', 'a', 'm', 'e', '\022', '@', '\n', '\014', +'r', 'p', 'c', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', 's', '\030', '\t', ' ', '\001', '(', '\013', '2', '\035', '.', 'g', 'r', 'p', 'c', +'.', 'g', 'c', 'p', '.', 'R', 'p', 'c', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', 'R', +'\013', 'r', 'p', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '\022', '$', '\n', '\016', 'm', 'a', 'x', '_', 'f', 'r', 'a', 'm', 'e', +'_', 's', 'i', 'z', 'e', '\030', '\n', ' ', '\001', '(', '\r', 'R', '\014', 'm', 'a', 'x', 'F', 'r', 'a', 'm', 'e', 'S', 'i', 'z', 'e', +'\"', '\205', '\001', '\n', '\031', 'S', 'e', 'r', 'v', 'e', 'r', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'P', 'a', 'r', 'a', 'm', +'e', 't', 'e', 'r', 's', '\022', ')', '\n', '\020', 'r', 'e', 'c', 'o', 'r', 'd', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', +'\030', '\001', ' ', '\003', '(', '\t', 'R', '\017', 'r', 'e', 'c', 'o', 'r', 'd', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\022', '=', +'\n', '\020', 'l', 'o', 'c', 'a', 'l', '_', 'i', 'd', 'e', 'n', 't', 'i', 't', 'i', 'e', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', +'\022', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'I', 'd', 'e', 'n', 't', 'i', 't', 'y', 'R', '\017', 'l', 'o', 'c', 'a', +'l', 'I', 'd', 'e', 'n', 't', 'i', 't', 'i', 'e', 's', '\"', '\245', '\004', '\n', '\027', 'S', 't', 'a', 'r', 't', 'S', 'e', 'r', 'v', +'e', 'r', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'R', 'e', 'q', '\022', '3', '\n', '\025', 'a', 'p', 'p', 'l', 'i', 'c', 'a', +'t', 'i', 'o', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\030', '\001', ' ', '\003', '(', '\t', 'R', '\024', 'a', 'p', 'p', +'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\022', 'm', '\n', '\024', 'h', 'a', 'n', 'd', +'s', 'h', 'a', 'k', 'e', '_', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', ':', '.', +'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'S', 't', 'a', 'r', 't', 'S', 'e', 'r', 'v', 'e', 'r', 'H', 'a', 'n', 'd', 's', +'h', 'a', 'k', 'e', 'R', 'e', 'q', '.', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', +'r', 's', 'E', 'n', 't', 'r', 'y', 'R', '\023', 'h', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', +'e', 'r', 's', '\022', '\031', '\n', '\010', 'i', 'n', '_', 'b', 'y', 't', 'e', 's', '\030', '\003', ' ', '\001', '(', '\014', 'R', '\007', 'i', 'n', +'B', 'y', 't', 'e', 's', '\022', '9', '\n', '\016', 'l', 'o', 'c', 'a', 'l', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\030', '\004', +' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'R', +'\r', 'l', 'o', 'c', 'a', 'l', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\022', ';', '\n', '\017', 'r', 'e', 'm', 'o', 't', 'e', '_', +'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\030', '\005', ' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', +'.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'R', '\016', 'r', 'e', 'm', 'o', 't', 'e', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', +'\022', '@', '\n', '\014', 'r', 'p', 'c', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', 's', '\030', '\006', ' ', '\001', '(', '\013', '2', '\035', '.', +'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'R', 'p', 'c', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', +'o', 'n', 's', 'R', '\013', 'r', 'p', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '\022', '$', '\n', '\016', 'm', 'a', 'x', '_', 'f', +'r', 'a', 'm', 'e', '_', 's', 'i', 'z', 'e', '\030', '\007', ' ', '\001', '(', '\r', 'R', '\014', 'm', 'a', 'x', 'F', 'r', 'a', 'm', 'e', +'S', 'i', 'z', 'e', '\032', 'k', '\n', '\030', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', +'r', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\005', 'R', '\003', 'k', 'e', 'y', +'\022', '9', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '#', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', +'p', '.', 'S', 'e', 'r', 'v', 'e', 'r', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', +'r', 's', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', '4', '\n', '\027', 'N', 'e', 'x', 't', 'H', 'a', 'n', 'd', +'s', 'h', 'a', 'k', 'e', 'M', 'e', 's', 's', 'a', 'g', 'e', 'R', 'e', 'q', '\022', '\031', '\n', '\010', 'i', 'n', '_', 'b', 'y', 't', +'e', 's', '\030', '\001', ' ', '\001', '(', '\014', 'R', '\007', 'i', 'n', 'B', 'y', 't', 'e', 's', '\"', '\345', '\001', '\n', '\r', 'H', 'a', 'n', +'d', 's', 'h', 'a', 'k', 'e', 'r', 'R', 'e', 'q', '\022', 'F', '\n', '\014', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 't', 'a', 'r', +'t', '\030', '\001', ' ', '\001', '(', '\013', '2', '!', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'S', 't', 'a', 'r', 't', 'C', +'l', 'i', 'e', 'n', 't', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'R', 'e', 'q', 'H', '\000', 'R', '\013', 'c', 'l', 'i', 'e', +'n', 't', 'S', 't', 'a', 'r', 't', '\022', 'F', '\n', '\014', 's', 'e', 'r', 'v', 'e', 'r', '_', 's', 't', 'a', 'r', 't', '\030', '\002', +' ', '\001', '(', '\013', '2', '!', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'S', 't', 'a', 'r', 't', 'S', 'e', 'r', 'v', +'e', 'r', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'R', 'e', 'q', 'H', '\000', 'R', '\013', 's', 'e', 'r', 'v', 'e', 'r', 'S', +'t', 'a', 'r', 't', '\022', '7', '\n', '\004', 'n', 'e', 'x', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '!', '.', 'g', 'r', 'p', 'c', +'.', 'g', 'c', 'p', '.', 'N', 'e', 'x', 't', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'M', 'e', 's', 's', 'a', 'g', 'e', +'R', 'e', 'q', 'H', '\000', 'R', '\004', 'n', 'e', 'x', 't', 'B', '\013', '\n', '\t', 'r', 'e', 'q', '_', 'o', 'n', 'e', 'o', 'f', '\"', +'\232', '\003', '\n', '\020', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'r', 'R', 'e', 's', 'u', 'l', 't', '\022', '1', '\n', '\024', 'a', +'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\001', ' ', '\001', '(', '\t', +'R', '\023', 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '\'', '\n', '\017', +'r', 'e', 'c', 'o', 'r', 'd', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\016', 'r', 'e', +'c', 'o', 'r', 'd', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '\031', '\n', '\010', 'k', 'e', 'y', '_', 'd', 'a', 't', 'a', '\030', +'\003', ' ', '\001', '(', '\014', 'R', '\007', 'k', 'e', 'y', 'D', 'a', 't', 'a', '\022', '7', '\n', '\r', 'p', 'e', 'e', 'r', '_', 'i', 'd', +'e', 'n', 't', 'i', 't', 'y', '\030', '\004', ' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'I', +'d', 'e', 'n', 't', 'i', 't', 'y', 'R', '\014', 'p', 'e', 'e', 'r', 'I', 'd', 'e', 'n', 't', 'i', 't', 'y', '\022', '9', '\n', '\016', +'l', 'o', 'c', 'a', 'l', '_', 'i', 'd', 'e', 'n', 't', 'i', 't', 'y', '\030', '\005', ' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'r', +'p', 'c', '.', 'g', 'c', 'p', '.', 'I', 'd', 'e', 'n', 't', 'i', 't', 'y', 'R', '\r', 'l', 'o', 'c', 'a', 'l', 'I', 'd', 'e', +'n', 't', 'i', 't', 'y', '\022', '*', '\n', '\021', 'k', 'e', 'e', 'p', '_', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '_', 'o', 'p', 'e', +'n', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\017', 'k', 'e', 'e', 'p', 'C', 'h', 'a', 'n', 'n', 'e', 'l', 'O', 'p', 'e', 'n', '\022', +'I', '\n', '\021', 'p', 'e', 'e', 'r', '_', 'r', 'p', 'c', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', 's', '\030', '\007', ' ', '\001', '(', +'\013', '2', '\035', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'R', 'p', 'c', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'V', +'e', 'r', 's', 'i', 'o', 'n', 's', 'R', '\017', 'p', 'e', 'e', 'r', 'R', 'p', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '\022', +'$', '\n', '\016', 'm', 'a', 'x', '_', 'f', 'r', 'a', 'm', 'e', '_', 's', 'i', 'z', 'e', '\030', '\010', ' ', '\001', '(', '\r', 'R', '\014', +'m', 'a', 'x', 'F', 'r', 'a', 'm', 'e', 'S', 'i', 'z', 'e', '\"', '@', '\n', '\020', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', +'r', 'S', 't', 'a', 't', 'u', 's', '\022', '\022', '\n', '\004', 'c', 'o', 'd', 'e', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\004', 'c', 'o', +'d', 'e', '\022', '\030', '\n', '\007', 'd', 'e', 't', 'a', 'i', 'l', 's', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 'd', 'e', 't', 'a', +'i', 'l', 's', '\"', '\276', '\001', '\n', '\016', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'r', 'R', 'e', 's', 'p', '\022', '\035', '\n', +'\n', 'o', 'u', 't', '_', 'f', 'r', 'a', 'm', 'e', 's', '\030', '\001', ' ', '\001', '(', '\014', 'R', '\t', 'o', 'u', 't', 'F', 'r', 'a', +'m', 'e', 's', '\022', '%', '\n', '\016', 'b', 'y', 't', 'e', 's', '_', 'c', 'o', 'n', 's', 'u', 'm', 'e', 'd', '\030', '\002', ' ', '\001', +'(', '\r', 'R', '\r', 'b', 'y', 't', 'e', 's', 'C', 'o', 'n', 's', 'u', 'm', 'e', 'd', '\022', '2', '\n', '\006', 'r', 'e', 's', 'u', +'l', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'H', 'a', 'n', 'd', 's', +'h', 'a', 'k', 'e', 'r', 'R', 'e', 's', 'u', 'l', 't', 'R', '\006', 'r', 'e', 's', 'u', 'l', 't', '\022', '2', '\n', '\006', 's', 't', +'a', 't', 'u', 's', '\030', '\004', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'H', 'a', 'n', +'d', 's', 'h', 'a', 'k', 'e', 'r', 'S', 't', 'a', 't', 'u', 's', 'R', '\006', 's', 't', 'a', 't', 'u', 's', '*', 'J', '\n', '\021', +'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '\"', '\n', '\036', 'H', 'A', 'N', 'D', +'S', 'H', 'A', 'K', 'E', '_', 'P', 'R', 'O', 'T', 'O', 'C', 'O', 'L', '_', 'U', 'N', 'S', 'P', 'E', 'C', 'I', 'F', 'I', 'E', +'D', '\020', '\000', '\022', '\007', '\n', '\003', 'T', 'L', 'S', '\020', '\001', '\022', '\010', '\n', '\004', 'A', 'L', 'T', 'S', '\020', '\002', '*', 'E', '\n', +'\017', 'N', 'e', 't', 'w', 'o', 'r', 'k', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', ' ', '\n', '\034', 'N', 'E', 'T', 'W', 'O', +'R', 'K', '_', 'P', 'R', 'O', 'T', 'O', 'C', 'O', 'L', '_', 'U', 'N', 'S', 'P', 'E', 'C', 'I', 'F', 'I', 'E', 'D', '\020', '\000', +'\022', '\007', '\n', '\003', 'T', 'C', 'P', '\020', '\001', '\022', '\007', '\n', '\003', 'U', 'D', 'P', '\020', '\002', '2', '[', '\n', '\021', 'H', 'a', 'n', +'d', 's', 'h', 'a', 'k', 'e', 'r', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'F', '\n', '\013', 'D', 'o', 'H', 'a', 'n', 'd', 's', +'h', 'a', 'k', 'e', '\022', '\027', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', +'r', 'R', 'e', 'q', '\032', '\030', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', +'r', 'R', 'e', 's', 'p', '\"', '\000', '(', '\001', '0', '\001', 'B', 'k', '\n', '\025', 'i', 'o', '.', 'g', 'r', 'p', 'c', '.', 'a', 'l', +'t', 's', '.', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'B', '\017', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'r', 'P', 'r', +'o', 't', 'o', 'P', '\001', 'Z', '?', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', +'g', 'r', 'p', 'c', '/', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '/', 'a', 'l', 't', 's', '/', 'i', 'n', 't', +'e', 'r', 'n', 'a', 'l', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '_', 'g', 'c', 'p', 'b', '\006', 'p', 'r', 'o', +'t', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &src_proto_grpc_gcp_transport_security_common_proto_upbdefinit, + NULL +}; + +upb_def_init src_proto_grpc_gcp_handshaker_proto_upbdefinit = { + deps, + layouts, + "src/proto/grpc/gcp/handshaker.proto", + UPB_STRVIEW_INIT(descriptor, 3053) +}; diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upbdefs.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upbdefs.h new file mode 100644 index 00000000000..41bf499d484 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upbdefs.h @@ -0,0 +1,90 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/gcp/handshaker.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPBDEFS_H_ +#define SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init src_proto_grpc_gcp_handshaker_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *grpc_gcp_Endpoint_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.Endpoint"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_Identity_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.Identity"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_Identity_AttributesEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.Identity.AttributesEntry"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_StartClientHandshakeReq_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.StartClientHandshakeReq"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_ServerHandshakeParameters_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.ServerHandshakeParameters"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_StartServerHandshakeReq_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.StartServerHandshakeReq"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.StartServerHandshakeReq.HandshakeParametersEntry"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_NextHandshakeMessageReq_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.NextHandshakeMessageReq"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_HandshakerReq_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.HandshakerReq"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_HandshakerResult_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.HandshakerResult"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_HandshakerStatus_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.HandshakerStatus"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_HandshakerResp_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_handshaker_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.HandshakerResp"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* SRC_PROTO_GRPC_GCP_HANDSHAKER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upbdefs.c b/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upbdefs.c new file mode 100644 index 00000000000..0ae0baf8f5f --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upbdefs.c @@ -0,0 +1,52 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/gcp/transport_security_common.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "src/proto/grpc/gcp/transport_security_common.upbdefs.h" + +extern const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit; +extern const upb_msglayout grpc_gcp_RpcProtocolVersions_Version_msginit; + +static const upb_msglayout *layouts[2] = { + &grpc_gcp_RpcProtocolVersions_msginit, + &grpc_gcp_RpcProtocolVersions_Version_msginit, +}; + +static const char descriptor[512] = {'\n', '2', 's', 'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'g', 'c', 'p', '/', 't', 'r', 'a', 'n', +'s', 'p', 'o', 'r', 't', '_', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '_', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'p', 'r', 'o', +'t', 'o', '\022', '\010', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '\"', '\352', '\001', '\n', '\023', 'R', 'p', 'c', 'P', 'r', 'o', 't', 'o', +'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '\022', 'M', '\n', '\017', 'm', 'a', 'x', '_', 'r', 'p', 'c', '_', 'v', 'e', +'r', 's', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '%', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', 'p', '.', 'R', 'p', +'c', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '.', 'V', 'e', 'r', 's', 'i', 'o', 'n', +'R', '\r', 'm', 'a', 'x', 'R', 'p', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', 'M', '\n', '\017', 'm', 'i', 'n', '_', 'r', 'p', +'c', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\013', '2', '%', '.', 'g', 'r', 'p', 'c', '.', 'g', 'c', +'p', '.', 'R', 'p', 'c', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '.', 'V', 'e', 'r', +'s', 'i', 'o', 'n', 'R', '\r', 'm', 'i', 'n', 'R', 'p', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\032', '5', '\n', '\007', 'V', 'e', +'r', 's', 'i', 'o', 'n', '\022', '\024', '\n', '\005', 'm', 'a', 'j', 'o', 'r', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\005', 'm', 'a', 'j', +'o', 'r', '\022', '\024', '\n', '\005', 'm', 'i', 'n', 'o', 'r', '\030', '\002', ' ', '\001', '(', '\r', 'R', '\005', 'm', 'i', 'n', 'o', 'r', '*', +'Q', '\n', '\r', 'S', 'e', 'c', 'u', 'r', 'i', 't', 'y', 'L', 'e', 'v', 'e', 'l', '\022', '\021', '\n', '\r', 'S', 'E', 'C', 'U', 'R', +'I', 'T', 'Y', '_', 'N', 'O', 'N', 'E', '\020', '\000', '\022', '\022', '\n', '\016', 'I', 'N', 'T', 'E', 'G', 'R', 'I', 'T', 'Y', '_', 'O', +'N', 'L', 'Y', '\020', '\001', '\022', '\031', '\n', '\025', 'I', 'N', 'T', 'E', 'G', 'R', 'I', 'T', 'Y', '_', 'A', 'N', 'D', '_', 'P', 'R', +'I', 'V', 'A', 'C', 'Y', '\020', '\002', 'B', 'x', '\n', '\025', 'i', 'o', '.', 'g', 'r', 'p', 'c', '.', 'a', 'l', 't', 's', '.', 'i', +'n', 't', 'e', 'r', 'n', 'a', 'l', 'B', '\034', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'e', 'c', 'u', 'r', 'i', 't', +'y', 'C', 'o', 'm', 'm', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '?', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', +'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'r', 'p', 'c', '/', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', +'/', 'a', 'l', 't', 's', '/', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', +'_', 'g', 'c', 'p', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init src_proto_grpc_gcp_transport_security_common_proto_upbdefinit = { + deps, + layouts, + "src/proto/grpc/gcp/transport_security_common.proto", + UPB_STRVIEW_INIT(descriptor, 512) +}; diff --git a/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upbdefs.h b/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upbdefs.h new file mode 100644 index 00000000000..cf79d2e5b50 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/gcp/transport_security_common.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef SRC_PROTO_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PROTO_UPBDEFS_H_ +#define SRC_PROTO_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init src_proto_grpc_gcp_transport_security_common_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *grpc_gcp_RpcProtocolVersions_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_transport_security_common_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.RpcProtocolVersions"); +} + +UPB_INLINE const upb_msgdef *grpc_gcp_RpcProtocolVersions_Version_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_gcp_transport_security_common_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.gcp.RpcProtocolVersions.Version"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* SRC_PROTO_GRPC_GCP_TRANSPORT_SECURITY_COMMON_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upbdefs.c b/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upbdefs.c new file mode 100644 index 00000000000..4f63972d8b0 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upbdefs.c @@ -0,0 +1,54 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/health/v1/health.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "src/proto/grpc/health/v1/health.upbdefs.h" + +extern const upb_msglayout grpc_health_v1_HealthCheckRequest_msginit; +extern const upb_msglayout grpc_health_v1_HealthCheckResponse_msginit; + +static const upb_msglayout *layouts[2] = { + &grpc_health_v1_HealthCheckRequest_msginit, + &grpc_health_v1_HealthCheckResponse_msginit, +}; + +static const char descriptor[567] = {'\n', '%', 's', 'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'h', 'e', 'a', 'l', 't', 'h', '/', 'v', +'1', '/', 'h', 'e', 'a', 'l', 't', 'h', '.', 'p', 'r', 'o', 't', 'o', '\022', '\016', 'g', 'r', 'p', 'c', '.', 'h', 'e', 'a', 'l', +'t', 'h', '.', 'v', '1', '\"', '.', '\n', '\022', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'R', 'e', 'q', 'u', 'e', +'s', 't', '\022', '\030', '\n', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 's', 'e', 'r', 'v', +'i', 'c', 'e', '\"', '\261', '\001', '\n', '\023', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'R', 'e', 's', 'p', 'o', 'n', +'s', 'e', '\022', 'I', '\n', '\006', 's', 't', 'a', 't', 'u', 's', '\030', '\001', ' ', '\001', '(', '\016', '2', '1', '.', 'g', 'r', 'p', 'c', +'.', 'h', 'e', 'a', 'l', 't', 'h', '.', 'v', '1', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'R', 'e', 's', +'p', 'o', 'n', 's', 'e', '.', 'S', 'e', 'r', 'v', 'i', 'n', 'g', 'S', 't', 'a', 't', 'u', 's', 'R', '\006', 's', 't', 'a', 't', +'u', 's', '\"', 'O', '\n', '\r', 'S', 'e', 'r', 'v', 'i', 'n', 'g', 'S', 't', 'a', 't', 'u', 's', '\022', '\013', '\n', '\007', 'U', 'N', +'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\013', '\n', '\007', 'S', 'E', 'R', 'V', 'I', 'N', 'G', '\020', '\001', '\022', '\017', '\n', '\013', 'N', +'O', 'T', '_', 'S', 'E', 'R', 'V', 'I', 'N', 'G', '\020', '\002', '\022', '\023', '\n', '\017', 'S', 'E', 'R', 'V', 'I', 'C', 'E', '_', 'U', +'N', 'K', 'N', 'O', 'W', 'N', '\020', '\003', '2', '\256', '\001', '\n', '\006', 'H', 'e', 'a', 'l', 't', 'h', '\022', 'P', '\n', '\005', 'C', 'h', +'e', 'c', 'k', '\022', '\"', '.', 'g', 'r', 'p', 'c', '.', 'h', 'e', 'a', 'l', 't', 'h', '.', 'v', '1', '.', 'H', 'e', 'a', 'l', +'t', 'h', 'C', 'h', 'e', 'c', 'k', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '#', '.', 'g', 'r', 'p', 'c', '.', 'h', 'e', 'a', +'l', 't', 'h', '.', 'v', '1', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'R', 'e', 's', 'p', 'o', 'n', 's', +'e', '\022', 'R', '\n', '\005', 'W', 'a', 't', 'c', 'h', '\022', '\"', '.', 'g', 'r', 'p', 'c', '.', 'h', 'e', 'a', 'l', 't', 'h', '.', +'v', '1', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '#', '.', 'g', +'r', 'p', 'c', '.', 'h', 'e', 'a', 'l', 't', 'h', '.', 'v', '1', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', +'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '0', '\001', 'B', 'a', '\n', '\021', 'i', 'o', '.', 'g', 'r', 'p', 'c', '.', 'h', 'e', 'a', +'l', 't', 'h', '.', 'v', '1', 'B', '\013', 'H', 'e', 'a', 'l', 't', 'h', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', ',', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'r', 'p', 'c', '/', 'h', 'e', 'a', 'l', +'t', 'h', '/', 'g', 'r', 'p', 'c', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'v', '1', '\252', '\002', '\016', 'G', 'r', 'p', 'c', '.', +'H', 'e', 'a', 'l', 't', 'h', '.', 'V', '1', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[1] = { + NULL +}; + +upb_def_init src_proto_grpc_health_v1_health_proto_upbdefinit = { + deps, + layouts, + "src/proto/grpc/health/v1/health.proto", + UPB_STRVIEW_INIT(descriptor, 567) +}; diff --git a/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upbdefs.h b/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upbdefs.h new file mode 100644 index 00000000000..50a1021d5b2 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upbdefs.h @@ -0,0 +1,40 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/health/v1/health.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPBDEFS_H_ +#define SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init src_proto_grpc_health_v1_health_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *grpc_health_v1_HealthCheckRequest_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_health_v1_health_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.health.v1.HealthCheckRequest"); +} + +UPB_INLINE const upb_msgdef *grpc_health_v1_HealthCheckResponse_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_health_v1_health_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.health.v1.HealthCheckResponse"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* SRC_PROTO_GRPC_HEALTH_V1_HEALTH_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upbdefs.c b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upbdefs.c new file mode 100644 index 00000000000..99b925cc9d4 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upbdefs.c @@ -0,0 +1,120 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/lb/v1/load_balancer.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "src/proto/grpc/lb/v1/load_balancer.upbdefs.h" + +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_timestamp_proto_upbdefinit; +extern const upb_msglayout grpc_lb_v1_LoadBalanceRequest_msginit; +extern const upb_msglayout grpc_lb_v1_InitialLoadBalanceRequest_msginit; +extern const upb_msglayout grpc_lb_v1_ClientStatsPerToken_msginit; +extern const upb_msglayout grpc_lb_v1_ClientStats_msginit; +extern const upb_msglayout grpc_lb_v1_LoadBalanceResponse_msginit; +extern const upb_msglayout grpc_lb_v1_InitialLoadBalanceResponse_msginit; +extern const upb_msglayout grpc_lb_v1_ServerList_msginit; +extern const upb_msglayout grpc_lb_v1_Server_msginit; +extern const upb_msglayout grpc_lb_v1_FallbackResponse_msginit; + +static const upb_msglayout *layouts[9] = { + &grpc_lb_v1_LoadBalanceRequest_msginit, + &grpc_lb_v1_InitialLoadBalanceRequest_msginit, + &grpc_lb_v1_ClientStatsPerToken_msginit, + &grpc_lb_v1_ClientStats_msginit, + &grpc_lb_v1_LoadBalanceResponse_msginit, + &grpc_lb_v1_InitialLoadBalanceResponse_msginit, + &grpc_lb_v1_ServerList_msginit, + &grpc_lb_v1_Server_msginit, + &grpc_lb_v1_FallbackResponse_msginit, +}; + +static const char descriptor[1767] = {'\n', '(', 's', 'r', 'c', '/', 'p', 'r', 'o', 't', 'o', '/', 'g', 'r', 'p', 'c', '/', 'l', 'b', '/', 'v', '1', '/', 'l', 'o', +'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\n', 'g', 'r', 'p', 'c', '.', 'l', +'b', '.', 'v', '1', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', +'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '.', 'p', 'r', 'o', 't', 'o', '\"', '\301', '\001', '\n', '\022', 'L', +'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', '\022', 'P', '\n', '\017', 'i', 'n', 'i', 't', +'i', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '%', '.', 'g', 'r', 'p', 'c', '.', +'l', 'b', '.', 'v', '1', '.', 'I', 'n', 'i', 't', 'i', 'a', 'l', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'R', +'e', 'q', 'u', 'e', 's', 't', 'H', '\000', 'R', '\016', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', '\022', +'<', '\n', '\014', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 't', 'a', 't', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', +'r', 'p', 'c', '.', 'l', 'b', '.', 'v', '1', '.', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 's', 'H', '\000', 'R', '\013', +'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 's', 'B', '\033', '\n', '\031', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', +'c', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 't', 'y', 'p', 'e', '\"', '/', '\n', '\031', 'I', 'n', 'i', 't', 'i', 'a', +'l', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', '\022', '\022', '\n', '\004', 'n', 'a', +'m', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\"', '`', '\n', '\023', 'C', 'l', 'i', 'e', 'n', 't', 'S', +'t', 'a', 't', 's', 'P', 'e', 'r', 'T', 'o', 'k', 'e', 'n', '\022', ',', '\n', '\022', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', +'n', 'c', 'e', '_', 't', 'o', 'k', 'e', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\020', 'l', 'o', 'a', 'd', 'B', 'a', 'l', 'a', +'n', 'c', 'e', 'T', 'o', 'k', 'e', 'n', '\022', '\033', '\n', '\t', 'n', 'u', 'm', '_', 'c', 'a', 'l', 'l', 's', '\030', '\002', ' ', '\001', +'(', '\003', 'R', '\010', 'n', 'u', 'm', 'C', 'a', 'l', 'l', 's', '\"', '\260', '\003', '\n', '\013', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', +'a', 't', 's', '\022', '8', '\n', '\t', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', +'R', '\t', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '*', '\n', '\021', 'n', 'u', 'm', '_', 'c', 'a', 'l', 'l', 's', '_', +'s', 't', 'a', 'r', 't', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\003', 'R', '\017', 'n', 'u', 'm', 'C', 'a', 'l', 'l', 's', 'S', 't', +'a', 'r', 't', 'e', 'd', '\022', ',', '\n', '\022', 'n', 'u', 'm', '_', 'c', 'a', 'l', 'l', 's', '_', 'f', 'i', 'n', 'i', 's', 'h', +'e', 'd', '\030', '\003', ' ', '\001', '(', '\003', 'R', '\020', 'n', 'u', 'm', 'C', 'a', 'l', 'l', 's', 'F', 'i', 'n', 'i', 's', 'h', 'e', +'d', '\022', ']', '\n', '-', 'n', 'u', 'm', '_', 'c', 'a', 'l', 'l', 's', '_', 'f', 'i', 'n', 'i', 's', 'h', 'e', 'd', '_', 'w', +'i', 't', 'h', '_', 'c', 'l', 'i', 'e', 'n', 't', '_', 'f', 'a', 'i', 'l', 'e', 'd', '_', 't', 'o', '_', 's', 'e', 'n', 'd', +'\030', '\006', ' ', '\001', '(', '\003', 'R', '&', 'n', 'u', 'm', 'C', 'a', 'l', 'l', 's', 'F', 'i', 'n', 'i', 's', 'h', 'e', 'd', 'W', +'i', 't', 'h', 'C', 'l', 'i', 'e', 'n', 't', 'F', 'a', 'i', 'l', 'e', 'd', 'T', 'o', 'S', 'e', 'n', 'd', '\022', 'H', '\n', '!', +'n', 'u', 'm', '_', 'c', 'a', 'l', 'l', 's', '_', 'f', 'i', 'n', 'i', 's', 'h', 'e', 'd', '_', 'k', 'n', 'o', 'w', 'n', '_', +'r', 'e', 'c', 'e', 'i', 'v', 'e', 'd', '\030', '\007', ' ', '\001', '(', '\003', 'R', '\035', 'n', 'u', 'm', 'C', 'a', 'l', 'l', 's', 'F', +'i', 'n', 'i', 's', 'h', 'e', 'd', 'K', 'n', 'o', 'w', 'n', 'R', 'e', 'c', 'e', 'i', 'v', 'e', 'd', '\022', 'X', '\n', '\030', 'c', +'a', 'l', 'l', 's', '_', 'f', 'i', 'n', 'i', 's', 'h', 'e', 'd', '_', 'w', 'i', 't', 'h', '_', 'd', 'r', 'o', 'p', '\030', '\010', +' ', '\003', '(', '\013', '2', '\037', '.', 'g', 'r', 'p', 'c', '.', 'l', 'b', '.', 'v', '1', '.', 'C', 'l', 'i', 'e', 'n', 't', 'S', +'t', 'a', 't', 's', 'P', 'e', 'r', 'T', 'o', 'k', 'e', 'n', 'R', '\025', 'c', 'a', 'l', 'l', 's', 'F', 'i', 'n', 'i', 's', 'h', +'e', 'd', 'W', 'i', 't', 'h', 'D', 'r', 'o', 'p', 'J', '\004', '\010', '\004', '\020', '\005', 'J', '\004', '\010', '\005', '\020', '\006', '\"', '\220', '\002', +'\n', '\023', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', 'S', '\n', '\020', +'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '&', '.', +'g', 'r', 'p', 'c', '.', 'l', 'b', '.', 'v', '1', '.', 'I', 'n', 'i', 't', 'i', 'a', 'l', 'L', 'o', 'a', 'd', 'B', 'a', 'l', +'a', 'n', 'c', 'e', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', '\000', 'R', '\017', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'R', 'e', +'s', 'p', 'o', 'n', 's', 'e', '\022', '9', '\n', '\013', 's', 'e', 'r', 'v', 'e', 'r', '_', 'l', 'i', 's', 't', '\030', '\002', ' ', '\001', +'(', '\013', '2', '\026', '.', 'g', 'r', 'p', 'c', '.', 'l', 'b', '.', 'v', '1', '.', 'S', 'e', 'r', 'v', 'e', 'r', 'L', 'i', 's', +'t', 'H', '\000', 'R', '\n', 's', 'e', 'r', 'v', 'e', 'r', 'L', 'i', 's', 't', '\022', 'K', '\n', '\021', 'f', 'a', 'l', 'l', 'b', 'a', +'c', 'k', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'r', 'p', 'c', '.', +'l', 'b', '.', 'v', '1', '.', 'F', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', '\000', 'R', +'\020', 'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'B', '\034', '\n', '\032', 'l', 'o', 'a', 'd', +'_', 'b', 'a', 'l', 'a', 'n', 'c', 'e', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 't', 'y', 'p', 'e', '\"', '\256', '\001', +'\n', '\032', 'I', 'n', 'i', 't', 'i', 'a', 'l', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'R', 'e', 's', 'p', 'o', +'n', 's', 'e', '\022', '4', '\n', '\026', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'e', 'r', '_', 'd', 'e', 'l', 'e', +'g', 'a', 't', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\024', 'l', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'r', 'D', +'e', 'l', 'e', 'g', 'a', 't', 'e', '\022', 'Z', '\n', '\034', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 't', 'a', 't', 's', '_', 'r', +'e', 'p', 'o', 'r', 't', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\031', 'c', +'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 's', 'R', 'e', 'p', 'o', 'r', 't', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\"', +'@', '\n', '\n', 'S', 'e', 'r', 'v', 'e', 'r', 'L', 'i', 's', 't', '\022', ',', '\n', '\007', 's', 'e', 'r', 'v', 'e', 'r', 's', '\030', +'\001', ' ', '\003', '(', '\013', '2', '\022', '.', 'g', 'r', 'p', 'c', '.', 'l', 'b', '.', 'v', '1', '.', 'S', 'e', 'r', 'v', 'e', 'r', +'R', '\007', 's', 'e', 'r', 'v', 'e', 'r', 's', 'J', '\004', '\010', '\003', '\020', '\004', '\"', '\203', '\001', '\n', '\006', 'S', 'e', 'r', 'v', 'e', +'r', '\022', '\035', '\n', '\n', 'i', 'p', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\014', 'R', '\t', 'i', 'p', +'A', 'd', 'd', 'r', 'e', 's', 's', '\022', '\022', '\n', '\004', 'p', 'o', 'r', 't', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\004', 'p', 'o', +'r', 't', '\022', ',', '\n', '\022', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'e', '_', 't', 'o', 'k', 'e', 'n', '\030', +'\003', ' ', '\001', '(', '\t', 'R', '\020', 'l', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'T', 'o', 'k', 'e', 'n', '\022', '\022', +'\n', '\004', 'd', 'r', 'o', 'p', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\004', 'd', 'r', 'o', 'p', 'J', '\004', '\010', '\005', '\020', '\006', '\"', +'\022', '\n', '\020', 'F', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '2', 'b', '\n', '\014', 'L', 'o', +'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'r', '\022', 'R', '\n', '\013', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'L', 'o', 'a', 'd', +'\022', '\036', '.', 'g', 'r', 'p', 'c', '.', 'l', 'b', '.', 'v', '1', '.', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', +'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '\037', '.', 'g', 'r', 'p', 'c', '.', 'l', 'b', '.', 'v', '1', '.', 'L', 'o', 'a', 'd', +'B', 'a', 'l', 'a', 'n', 'c', 'e', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '(', '\001', '0', '\001', 'B', 'X', '\n', '\016', 'i', 'o', +'.', 'g', 'r', 'p', 'c', '.', 'g', 'r', 'p', 'c', 'l', 'b', 'B', '\021', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'e', +'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '1', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', +'r', 'g', '/', 'g', 'r', 'p', 'c', '/', 'b', 'a', 'l', 'a', 'n', 'c', 'e', 'r', '/', 'g', 'r', 'p', 'c', 'l', 'b', '/', 'g', +'r', 'p', 'c', '_', 'l', 'b', '_', 'v', '1', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[3] = { + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_timestamp_proto_upbdefinit, + NULL +}; + +upb_def_init src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit = { + deps, + layouts, + "src/proto/grpc/lb/v1/load_balancer.proto", + UPB_STRVIEW_INIT(descriptor, 1767) +}; diff --git a/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upbdefs.h b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upbdefs.h new file mode 100644 index 00000000000..87949a245b8 --- /dev/null +++ b/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upbdefs.h @@ -0,0 +1,75 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * src/proto/grpc/lb/v1/load_balancer.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPBDEFS_H_ +#define SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *grpc_lb_v1_LoadBalanceRequest_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.LoadBalanceRequest"); +} + +UPB_INLINE const upb_msgdef *grpc_lb_v1_InitialLoadBalanceRequest_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.InitialLoadBalanceRequest"); +} + +UPB_INLINE const upb_msgdef *grpc_lb_v1_ClientStatsPerToken_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.ClientStatsPerToken"); +} + +UPB_INLINE const upb_msgdef *grpc_lb_v1_ClientStats_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.ClientStats"); +} + +UPB_INLINE const upb_msgdef *grpc_lb_v1_LoadBalanceResponse_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.LoadBalanceResponse"); +} + +UPB_INLINE const upb_msgdef *grpc_lb_v1_InitialLoadBalanceResponse_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.InitialLoadBalanceResponse"); +} + +UPB_INLINE const upb_msgdef *grpc_lb_v1_ServerList_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.ServerList"); +} + +UPB_INLINE const upb_msgdef *grpc_lb_v1_Server_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.Server"); +} + +UPB_INLINE const upb_msgdef *grpc_lb_v1_FallbackResponse_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &src_proto_grpc_lb_v1_load_balancer_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "grpc.lb.v1.FallbackResponse"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* SRC_PROTO_GRPC_LB_V1_LOAD_BALANCER_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c b/src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c new file mode 100644 index 00000000000..6cfd7ee470c --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c @@ -0,0 +1,70 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/annotations/migrate.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "udpa/annotations/migrate.upbdefs.h" + +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; +extern const upb_msglayout udpa_annotations_MigrateAnnotation_msginit; +extern const upb_msglayout udpa_annotations_FieldMigrateAnnotation_msginit; +extern const upb_msglayout udpa_annotations_FileMigrateAnnotation_msginit; + +static const upb_msglayout *layouts[3] = { + &udpa_annotations_MigrateAnnotation_msginit, + &udpa_annotations_FieldMigrateAnnotation_msginit, + &udpa_annotations_FileMigrateAnnotation_msginit, +}; + +static const char descriptor[855] = {'\n', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', +'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\020', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', +'\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', +'t', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', '+', '\n', '\021', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\006', 'r', 'e', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\006', 'r', 'e', +'n', 'a', 'm', 'e', '\"', 'Y', '\n', '\026', 'F', 'i', 'e', 'l', 'd', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', +'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\006', 'r', 'e', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\006', 'r', 'e', +'n', 'a', 'm', 'e', '\022', '\'', '\n', '\017', 'o', 'n', 'e', 'o', 'f', '_', 'p', 'r', 'o', 'm', 'o', 't', 'i', 'o', 'n', '\030', '\002', +' ', '\001', '(', '\t', 'R', '\016', 'o', 'n', 'e', 'o', 'f', 'P', 'r', 'o', 'm', 'o', 't', 'i', 'o', 'n', '\"', '?', '\n', '\025', 'F', +'i', 'l', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\022', '&', '\n', '\017', 'm', +'o', 'v', 'e', '_', 't', 'o', '_', 'p', 'a', 'c', 'k', 'a', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\r', 'm', 'o', 'v', +'e', 'T', 'o', 'P', 'a', 'c', 'k', 'a', 'g', 'e', ':', 'p', '\n', '\017', 'm', 'e', 's', 's', 'a', 'g', 'e', '_', 'm', 'i', 'g', +'r', 'a', 't', 'e', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', +'s', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\343', '\377', 'Q', ' ', '\001', '(', '\013', '2', '#', '.', 'u', +'d', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', +'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\016', 'm', 'e', 's', 's', 'a', 'g', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', ':', +'o', '\n', '\r', 'f', 'i', 'e', 'l', 'd', '_', 'm', 'i', 'g', 'r', 'a', 't', 'e', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\343', +'\377', 'Q', ' ', '\001', '(', '\013', '2', '(', '.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', +'.', 'F', 'i', 'e', 'l', 'd', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\014', +'f', 'i', 'e', 'l', 'd', 'M', 'i', 'g', 'r', 'a', 't', 'e', ':', 'g', '\n', '\014', 'e', 'n', 'u', 'm', '_', 'm', 'i', 'g', 'r', +'a', 't', 'e', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', +'m', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\343', '\377', 'Q', ' ', '\001', '(', '\013', '2', '#', '.', 'u', 'd', 'p', 'a', '.', +'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', 'a', +'t', 'i', 'o', 'n', 'R', '\013', 'e', 'n', 'u', 'm', 'M', 'i', 'g', 'r', 'a', 't', 'e', ':', 'w', '\n', '\022', 'e', 'n', 'u', 'm', +'_', 'v', 'a', 'l', 'u', 'e', '_', 'm', 'i', 'g', 'r', 'a', 't', 'e', '\022', '!', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\216', '\343', '\377', 'Q', ' ', '\001', '(', '\013', '2', '#', '.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '.', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\020', 'e', 'n', 'u', +'m', 'V', 'a', 'l', 'u', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', ':', 'k', '\n', '\014', 'f', 'i', 'l', 'e', '_', 'm', 'i', 'g', +'r', 'a', 't', 'e', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', +'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\343', '\377', 'Q', ' ', '\001', '(', '\013', '2', '\'', '.', 'u', 'd', 'p', 'a', +'.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'F', 'i', 'l', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', +'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\013', 'f', 'i', 'l', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'b', '\006', 'p', +'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &google_protobuf_descriptor_proto_upbdefinit, + NULL +}; + +upb_def_init udpa_annotations_migrate_proto_upbdefinit = { + deps, + layouts, + "udpa/annotations/migrate.proto", + UPB_STRVIEW_INIT(descriptor, 855) +}; diff --git a/src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h b/src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h new file mode 100644 index 00000000000..a12d772fe38 --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.h @@ -0,0 +1,45 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/annotations/migrate.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef UDPA_ANNOTATIONS_MIGRATE_PROTO_UPBDEFS_H_ +#define UDPA_ANNOTATIONS_MIGRATE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init udpa_annotations_migrate_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *udpa_annotations_MigrateAnnotation_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &udpa_annotations_migrate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "udpa.annotations.MigrateAnnotation"); +} + +UPB_INLINE const upb_msgdef *udpa_annotations_FieldMigrateAnnotation_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &udpa_annotations_migrate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "udpa.annotations.FieldMigrateAnnotation"); +} + +UPB_INLINE const upb_msgdef *udpa_annotations_FileMigrateAnnotation_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &udpa_annotations_migrate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "udpa.annotations.FileMigrateAnnotation"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* UDPA_ANNOTATIONS_MIGRATE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c b/src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c new file mode 100644 index 00000000000..4e6416b21df --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c @@ -0,0 +1,33 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/annotations/sensitive.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "udpa/annotations/sensitive.upbdefs.h" + +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; + +static const char descriptor[158] = {'\n', ' ', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 'e', 'n', 's', 'i', 't', +'i', 'v', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\020', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', +'n', 's', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', +'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', ':', '>', '\n', '\t', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '\022', +'\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', +'t', 'i', 'o', 'n', 's', '\030', '\367', '\266', '\301', '$', ' ', '\001', '(', '\010', 'R', '\t', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', +'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &google_protobuf_descriptor_proto_upbdefinit, + NULL +}; + +upb_def_init udpa_annotations_sensitive_proto_upbdefinit = { + deps, + NULL, + "udpa/annotations/sensitive.proto", + UPB_STRVIEW_INIT(descriptor, 158) +}; diff --git a/src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h b/src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h new file mode 100644 index 00000000000..099a5782d51 --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.h @@ -0,0 +1,30 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/annotations/sensitive.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPBDEFS_H_ +#define UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init udpa_annotations_sensitive_proto_upbdefinit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c b/src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c new file mode 100644 index 00000000000..f130145dd2d --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c @@ -0,0 +1,49 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/annotations/status.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "udpa/annotations/status.upbdefs.h" + +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; +extern const upb_msglayout udpa_annotations_StatusAnnotation_msginit; + +static const upb_msglayout *layouts[1] = { + &udpa_annotations_StatusAnnotation_msginit, +}; + +static const char descriptor[445] = {'\n', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', +'.', 'p', 'r', 'o', 't', 'o', '\022', '\020', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '\032', +' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', +'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', '\232', '\001', '\n', '\020', 'S', 't', 'a', 't', 'u', 's', 'A', 'n', 'n', 'o', 't', 'a', +'t', 'i', 'o', 'n', '\022', '(', '\n', '\020', 'w', 'o', 'r', 'k', '_', 'i', 'n', '_', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', '\030', +'\001', ' ', '\001', '(', '\010', 'R', '\016', 'w', 'o', 'r', 'k', 'I', 'n', 'P', 'r', 'o', 'g', 'r', 'e', 's', 's', '\022', '\\', '\n', '\026', +'p', 'a', 'c', 'k', 'a', 'g', 'e', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\002', ' ', +'\001', '(', '\016', '2', '&', '.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'P', 'a', +'c', 'k', 'a', 'g', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'S', 't', 'a', 't', 'u', 's', 'R', '\024', 'p', 'a', 'c', 'k', 'a', +'g', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'S', 't', 'a', 't', 'u', 's', '*', ']', '\n', '\024', 'P', 'a', 'c', 'k', 'a', 'g', +'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'S', 't', 'a', 't', 'u', 's', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W', 'N', +'\020', '\000', '\022', '\n', '\n', '\006', 'F', 'R', 'O', 'Z', 'E', 'N', '\020', '\001', '\022', '\n', '\n', '\006', 'A', 'C', 'T', 'I', 'V', 'E', '\020', +'\002', '\022', ' ', '\n', '\034', 'N', 'E', 'X', 'T', '_', 'M', 'A', 'J', 'O', 'R', '_', 'V', 'E', 'R', 'S', 'I', 'O', 'N', '_', 'C', +'A', 'N', 'D', 'I', 'D', 'A', 'T', 'E', '\020', '\003', ':', 'd', '\n', '\013', 'f', 'i', 'l', 'e', '_', 's', 't', 'a', 't', 'u', 's', +'\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', +'t', 'i', 'o', 'n', 's', '\030', '\207', '\200', '\231', 'j', ' ', '\001', '(', '\013', '2', '\"', '.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', +'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'S', 't', 'a', 't', 'u', 's', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', +'R', '\n', 'f', 'i', 'l', 'e', 'S', 't', 'a', 't', 'u', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &google_protobuf_descriptor_proto_upbdefinit, + NULL +}; + +upb_def_init udpa_annotations_status_proto_upbdefinit = { + deps, + layouts, + "udpa/annotations/status.proto", + UPB_STRVIEW_INIT(descriptor, 445) +}; diff --git a/src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h b/src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h new file mode 100644 index 00000000000..80f165f20fa --- /dev/null +++ b/src/core/ext/upb-generated/udpa/annotations/status.upbdefs.h @@ -0,0 +1,35 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/annotations/status.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef UDPA_ANNOTATIONS_STATUS_PROTO_UPBDEFS_H_ +#define UDPA_ANNOTATIONS_STATUS_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init udpa_annotations_status_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *udpa_annotations_StatusAnnotation_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &udpa_annotations_status_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "udpa.annotations.StatusAnnotation"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* UDPA_ANNOTATIONS_STATUS_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upbdefs.c b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upbdefs.c new file mode 100644 index 00000000000..86f430cae82 --- /dev/null +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upbdefs.c @@ -0,0 +1,62 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/data/orca/v1/orca_load_report.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "udpa/data/orca/v1/orca_load_report.upbdefs.h" + +extern upb_def_init validate_validate_proto_upbdefinit; +extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit; +extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit; +extern const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit; + +static const upb_msglayout *layouts[3] = { + &udpa_data_orca_v1_OrcaLoadReport_msginit, + &udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit, + &udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit, +}; + +static const char descriptor[674] = {'\n', '(', 'u', 'd', 'p', 'a', '/', 'd', 'a', 't', 'a', '/', 'o', 'r', 'c', 'a', '/', 'v', '1', '/', 'o', 'r', 'c', 'a', '_', +'l', 'o', 'a', 'd', '_', 'r', 'e', 'p', 'o', 'r', 't', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'u', 'd', 'p', 'a', '.', 'd', +'a', 't', 'a', '.', 'o', 'r', 'c', 'a', '.', 'v', '1', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', +'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\205', '\004', '\n', '\016', 'O', 'r', 'c', 'a', 'L', 'o', 'a', 'd', 'R', +'e', 'p', 'o', 'r', 't', '\022', 'E', '\n', '\017', 'c', 'p', 'u', '_', 'u', 't', 'i', 'l', 'i', 'z', 'a', 't', 'i', 'o', 'n', '\030', +'\001', ' ', '\001', '(', '\001', 'B', '\034', '\372', 'B', '\013', '\022', '\t', ')', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\372', 'B', '\013', '\022', +'\t', '\031', '\000', '\000', '\000', '\000', '\000', '\000', '\360', '?', 'R', '\016', 'c', 'p', 'u', 'U', 't', 'i', 'l', 'i', 'z', 'a', 't', 'i', 'o', +'n', '\022', 'E', '\n', '\017', 'm', 'e', 'm', '_', 'u', 't', 'i', 'l', 'i', 'z', 'a', 't', 'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', +'\001', 'B', '\034', '\372', 'B', '\013', '\022', '\t', ')', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\372', 'B', '\013', '\022', '\t', '\031', '\000', '\000', +'\000', '\000', '\000', '\000', '\360', '?', 'R', '\016', 'm', 'e', 'm', 'U', 't', 'i', 'l', 'i', 'z', 'a', 't', 'i', 'o', 'n', '\022', '\020', '\n', +'\003', 'r', 'p', 's', '\030', '\003', ' ', '\001', '(', '\004', 'R', '\003', 'r', 'p', 's', '\022', 'U', '\n', '\014', 'r', 'e', 'q', 'u', 'e', 's', +'t', '_', 'c', 'o', 's', 't', '\030', '\004', ' ', '\003', '(', '\013', '2', '2', '.', 'u', 'd', 'p', 'a', '.', 'd', 'a', 't', 'a', '.', +'o', 'r', 'c', 'a', '.', 'v', '1', '.', 'O', 'r', 'c', 'a', 'L', 'o', 'a', 'd', 'R', 'e', 'p', 'o', 'r', 't', '.', 'R', 'e', +'q', 'u', 'e', 's', 't', 'C', 'o', 's', 't', 'E', 'n', 't', 'r', 'y', 'R', '\013', 'r', 'e', 'q', 'u', 'e', 's', 't', 'C', 'o', +'s', 't', '\022', '|', '\n', '\013', 'u', 't', 'i', 'l', 'i', 'z', 'a', 't', 'i', 'o', 'n', '\030', '\005', ' ', '\003', '(', '\013', '2', '2', +'.', 'u', 'd', 'p', 'a', '.', 'd', 'a', 't', 'a', '.', 'o', 'r', 'c', 'a', '.', 'v', '1', '.', 'O', 'r', 'c', 'a', 'L', 'o', +'a', 'd', 'R', 'e', 'p', 'o', 'r', 't', '.', 'U', 't', 'i', 'l', 'i', 'z', 'a', 't', 'i', 'o', 'n', 'E', 'n', 't', 'r', 'y', +'B', '&', '\372', 'B', '\020', '\232', '\001', '\r', '*', '\013', '\022', '\t', ')', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\372', 'B', '\020', '\232', +'\001', '\r', '*', '\013', '\022', '\t', '\031', '\000', '\000', '\000', '\000', '\000', '\000', '\360', '?', 'R', '\013', 'u', 't', 'i', 'l', 'i', 'z', 'a', 't', +'i', 'o', 'n', '\032', '>', '\n', '\020', 'R', 'e', 'q', 'u', 'e', 's', 't', 'C', 'o', 's', 't', 'E', 'n', 't', 'r', 'y', '\022', '\020', +'\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', +'\030', '\002', ' ', '\001', '(', '\001', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\032', '>', '\n', '\020', 'U', 't', 'i', 'l', +'i', 'z', 'a', 't', 'i', 'o', 'n', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', +'R', '\003', 'k', 'e', 'y', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\001', 'R', '\005', 'v', 'a', 'l', +'u', 'e', ':', '\002', '8', '\001', 'B', ':', '\n', '!', 'c', 'o', 'm', '.', 'g', 'i', 't', 'h', 'u', 'b', '.', 'u', 'd', 'p', 'a', +'.', 'u', 'd', 'p', 'a', '.', 'd', 'a', 't', 'a', '.', 'o', 'r', 'c', 'a', '.', 'v', '1', 'B', '\023', 'O', 'r', 'c', 'a', 'L', +'o', 'a', 'd', 'R', 'e', 'p', 'o', 'r', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3', +}; + +static upb_def_init *deps[2] = { + &validate_validate_proto_upbdefinit, + NULL +}; + +upb_def_init udpa_data_orca_v1_orca_load_report_proto_upbdefinit = { + deps, + layouts, + "udpa/data/orca/v1/orca_load_report.proto", + UPB_STRVIEW_INIT(descriptor, 674) +}; diff --git a/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upbdefs.h b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upbdefs.h new file mode 100644 index 00000000000..f923742c12f --- /dev/null +++ b/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upbdefs.h @@ -0,0 +1,45 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * udpa/data/orca/v1/orca_load_report.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPBDEFS_H_ +#define UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init udpa_data_orca_v1_orca_load_report_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *udpa_data_orca_v1_OrcaLoadReport_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &udpa_data_orca_v1_orca_load_report_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "udpa.data.orca.v1.OrcaLoadReport"); +} + +UPB_INLINE const upb_msgdef *udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &udpa_data_orca_v1_orca_load_report_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "udpa.data.orca.v1.OrcaLoadReport.RequestCostEntry"); +} + +UPB_INLINE const upb_msgdef *udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &udpa_data_orca_v1_orca_load_report_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "udpa.data.orca.v1.OrcaLoadReport.UtilizationEntry"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* UDPA_DATA_ORCA_V1_ORCA_LOAD_REPORT_PROTO_UPBDEFS_H_ */ diff --git a/src/core/ext/upb-generated/validate/validate.upbdefs.c b/src/core/ext/upb-generated/validate/validate.upbdefs.c new file mode 100644 index 00000000000..af02b2b9ead --- /dev/null +++ b/src/core/ext/upb-generated/validate/validate.upbdefs.c @@ -0,0 +1,307 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * validate/validate.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#include "upb/def.h" +#include "validate/validate.upbdefs.h" + +extern upb_def_init google_protobuf_descriptor_proto_upbdefinit; +extern upb_def_init google_protobuf_duration_proto_upbdefinit; +extern upb_def_init google_protobuf_timestamp_proto_upbdefinit; +extern const upb_msglayout validate_FieldRules_msginit; +extern const upb_msglayout validate_FloatRules_msginit; +extern const upb_msglayout validate_DoubleRules_msginit; +extern const upb_msglayout validate_Int32Rules_msginit; +extern const upb_msglayout validate_Int64Rules_msginit; +extern const upb_msglayout validate_UInt32Rules_msginit; +extern const upb_msglayout validate_UInt64Rules_msginit; +extern const upb_msglayout validate_SInt32Rules_msginit; +extern const upb_msglayout validate_SInt64Rules_msginit; +extern const upb_msglayout validate_Fixed32Rules_msginit; +extern const upb_msglayout validate_Fixed64Rules_msginit; +extern const upb_msglayout validate_SFixed32Rules_msginit; +extern const upb_msglayout validate_SFixed64Rules_msginit; +extern const upb_msglayout validate_BoolRules_msginit; +extern const upb_msglayout validate_StringRules_msginit; +extern const upb_msglayout validate_BytesRules_msginit; +extern const upb_msglayout validate_EnumRules_msginit; +extern const upb_msglayout validate_MessageRules_msginit; +extern const upb_msglayout validate_RepeatedRules_msginit; +extern const upb_msglayout validate_MapRules_msginit; +extern const upb_msglayout validate_AnyRules_msginit; +extern const upb_msglayout validate_DurationRules_msginit; +extern const upb_msglayout validate_TimestampRules_msginit; + +static const upb_msglayout *layouts[23] = { + &validate_FieldRules_msginit, + &validate_FloatRules_msginit, + &validate_DoubleRules_msginit, + &validate_Int32Rules_msginit, + &validate_Int64Rules_msginit, + &validate_UInt32Rules_msginit, + &validate_UInt64Rules_msginit, + &validate_SInt32Rules_msginit, + &validate_SInt64Rules_msginit, + &validate_Fixed32Rules_msginit, + &validate_Fixed64Rules_msginit, + &validate_SFixed32Rules_msginit, + &validate_SFixed64Rules_msginit, + &validate_BoolRules_msginit, + &validate_StringRules_msginit, + &validate_BytesRules_msginit, + &validate_EnumRules_msginit, + &validate_MessageRules_msginit, + &validate_RepeatedRules_msginit, + &validate_MapRules_msginit, + &validate_AnyRules_msginit, + &validate_DurationRules_msginit, + &validate_TimestampRules_msginit, +}; + +static const char descriptor[5699] = {'\n', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', +'\022', '\010', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', +'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', +'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', +'o', '\032', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', +'a', 'm', 'p', '.', 'p', 'r', 'o', 't', 'o', '\"', '\310', '\010', '\n', '\n', 'F', 'i', 'e', 'l', 'd', 'R', 'u', 'l', 'e', 's', '\022', +'0', '\n', '\007', 'm', 'e', 's', 's', 'a', 'g', 'e', '\030', '\021', ' ', '\001', '(', '\013', '2', '\026', '.', 'v', 'a', 'l', 'i', 'd', 'a', +'t', 'e', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'R', 'u', 'l', 'e', 's', 'R', '\007', 'm', 'e', 's', 's', 'a', 'g', 'e', '\022', +',', '\n', '\005', 'f', 'l', 'o', 'a', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', +'.', 'F', 'l', 'o', 'a', 't', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\005', 'f', 'l', 'o', 'a', 't', '\022', '/', '\n', '\006', 'd', +'o', 'u', 'b', 'l', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'D', 'o', +'u', 'b', 'l', 'e', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\006', 'd', 'o', 'u', 'b', 'l', 'e', '\022', ',', '\n', '\005', 'i', 'n', +'t', '3', '2', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'I', 'n', 't', '3', +'2', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\005', 'i', 'n', 't', '3', '2', '\022', ',', '\n', '\005', 'i', 'n', 't', '6', '4', '\030', +'\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', +'e', 's', 'H', '\000', 'R', '\005', 'i', 'n', 't', '6', '4', '\022', '/', '\n', '\006', 'u', 'i', 'n', 't', '3', '2', '\030', '\005', ' ', '\001', +'(', '\013', '2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'U', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', 's', +'H', '\000', 'R', '\006', 'u', 'i', 'n', 't', '3', '2', '\022', '/', '\n', '\006', 'u', 'i', 'n', 't', '6', '4', '\030', '\006', ' ', '\001', '(', +'\013', '2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'U', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', 'e', 's', 'H', +'\000', 'R', '\006', 'u', 'i', 'n', 't', '6', '4', '\022', '/', '\n', '\006', 's', 'i', 'n', 't', '3', '2', '\030', '\007', ' ', '\001', '(', '\013', +'2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', 's', 'H', '\000', +'R', '\006', 's', 'i', 'n', 't', '3', '2', '\022', '/', '\n', '\006', 's', 'i', 'n', 't', '6', '4', '\030', '\010', ' ', '\001', '(', '\013', '2', +'\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', +'\006', 's', 'i', 'n', 't', '6', '4', '\022', '2', '\n', '\007', 'f', 'i', 'x', 'e', 'd', '3', '2', '\030', '\t', ' ', '\001', '(', '\013', '2', +'\026', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'x', 'e', 'd', '3', '2', 'R', 'u', 'l', 'e', 's', 'H', '\000', +'R', '\007', 'f', 'i', 'x', 'e', 'd', '3', '2', '\022', '2', '\n', '\007', 'f', 'i', 'x', 'e', 'd', '6', '4', '\030', '\n', ' ', '\001', '(', +'\013', '2', '\026', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'x', 'e', 'd', '6', '4', 'R', 'u', 'l', 'e', 's', +'H', '\000', 'R', '\007', 'f', 'i', 'x', 'e', 'd', '6', '4', '\022', '5', '\n', '\010', 's', 'f', 'i', 'x', 'e', 'd', '3', '2', '\030', '\013', +' ', '\001', '(', '\013', '2', '\027', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 'F', 'i', 'x', 'e', 'd', '3', '2', 'R', +'u', 'l', 'e', 's', 'H', '\000', 'R', '\010', 's', 'f', 'i', 'x', 'e', 'd', '3', '2', '\022', '5', '\n', '\010', 's', 'f', 'i', 'x', 'e', +'d', '6', '4', '\030', '\014', ' ', '\001', '(', '\013', '2', '\027', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 'F', 'i', 'x', +'e', 'd', '6', '4', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\010', 's', 'f', 'i', 'x', 'e', 'd', '6', '4', '\022', ')', '\n', '\004', +'b', 'o', 'o', 'l', '\030', '\r', ' ', '\001', '(', '\013', '2', '\023', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'B', 'o', 'o', +'l', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\004', 'b', 'o', 'o', 'l', '\022', '/', '\n', '\006', 's', 't', 'r', 'i', 'n', 'g', '\030', +'\016', ' ', '\001', '(', '\013', '2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 't', 'r', 'i', 'n', 'g', 'R', 'u', +'l', 'e', 's', 'H', '\000', 'R', '\006', 's', 't', 'r', 'i', 'n', 'g', '\022', ',', '\n', '\005', 'b', 'y', 't', 'e', 's', '\030', '\017', ' ', +'\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'B', 'y', 't', 'e', 's', 'R', 'u', 'l', 'e', 's', +'H', '\000', 'R', '\005', 'b', 'y', 't', 'e', 's', '\022', ')', '\n', '\004', 'e', 'n', 'u', 'm', '\030', '\020', ' ', '\001', '(', '\013', '2', '\023', +'.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'E', 'n', 'u', 'm', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\004', 'e', 'n', +'u', 'm', '\022', '5', '\n', '\010', 'r', 'e', 'p', 'e', 'a', 't', 'e', 'd', '\030', '\022', ' ', '\001', '(', '\013', '2', '\027', '.', 'v', 'a', +'l', 'i', 'd', 'a', 't', 'e', '.', 'R', 'e', 'p', 'e', 'a', 't', 'e', 'd', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\010', 'r', +'e', 'p', 'e', 'a', 't', 'e', 'd', '\022', '&', '\n', '\003', 'm', 'a', 'p', '\030', '\023', ' ', '\001', '(', '\013', '2', '\022', '.', 'v', 'a', +'l', 'i', 'd', 'a', 't', 'e', '.', 'M', 'a', 'p', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\003', 'm', 'a', 'p', '\022', '&', '\n', +'\003', 'a', 'n', 'y', '\030', '\024', ' ', '\001', '(', '\013', '2', '\022', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'A', 'n', 'y', +'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\003', 'a', 'n', 'y', '\022', '5', '\n', '\010', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030', +'\025', ' ', '\001', '(', '\013', '2', '\027', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', +'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\010', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '8', '\n', '\t', 't', 'i', 'm', 'e', +'s', 't', 'a', 'm', 'p', '\030', '\026', ' ', '\001', '(', '\013', '2', '\030', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'T', 'i', +'m', 'e', 's', 't', 'a', 'm', 'p', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\t', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', +'B', '\006', '\n', '\004', 't', 'y', 'p', 'e', '\"', '\215', '\001', '\n', '\n', 'F', 'l', 'o', 'a', 't', 'R', 'u', 'l', 'e', 's', '\022', '\024', +'\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\002', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', +'t', '\030', '\002', ' ', '\001', '(', '\002', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\002', 'R', +'\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\002', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', +'t', 'e', '\030', '\005', ' ', '\001', '(', '\002', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\002', +'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\002', 'R', '\005', 'n', 'o', 't', +'I', 'n', '\"', '\216', '\001', '\n', '\013', 'D', 'o', 'u', 'b', 'l', 'e', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', +'s', 't', '\030', '\001', ' ', '\001', '(', '\001', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', +'(', '\001', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\001', 'R', '\003', 'l', 't', 'e', '\022', +'\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\001', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', +'\001', '(', '\001', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\001', 'R', '\002', 'i', 'n', '\022', +'\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\001', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\215', '\001', +'\n', '\n', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', +'(', '\005', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\002', 'l', 't', +'\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\005', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', +'\004', ' ', '\001', '(', '\005', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\005', 'R', '\003', 'g', +'t', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\005', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', +'_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\005', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\215', '\001', '\n', '\n', 'I', 'n', 't', '6', +'4', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\003', 'R', '\005', 'c', 'o', +'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\003', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', +'e', '\030', '\003', ' ', '\001', '(', '\003', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\003', 'R', +'\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\003', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', +'i', 'n', '\030', '\006', ' ', '\003', '(', '\003', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', +'\003', '(', '\003', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\216', '\001', '\n', '\013', 'U', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', +'s', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', +'\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\r', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', +'(', '\r', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\r', 'R', '\002', 'g', 't', '\022', '\020', +'\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\r', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', +'\003', '(', '\r', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\r', 'R', '\005', +'n', 'o', 't', 'I', 'n', '\"', '\216', '\001', '\n', '\013', 'U', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', +'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\004', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', +'\002', ' ', '\001', '(', '\004', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\004', 'R', '\003', 'l', +'t', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', +'\030', '\005', ' ', '\001', '(', '\004', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\004', 'R', '\002', +'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\004', 'R', '\005', 'n', 'o', 't', 'I', 'n', +'\"', '\216', '\001', '\n', '\013', 'S', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', +'\030', '\001', ' ', '\001', '(', '\021', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\021', +'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\021', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', +'\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\021', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', +'\021', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\021', 'R', '\002', 'i', 'n', '\022', '\025', '\n', +'\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\021', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\216', '\001', '\n', '\013', +'S', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', +'\022', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\022', 'R', '\002', 'l', 't', '\022', +'\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\022', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', +' ', '\001', '(', '\022', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\022', 'R', '\003', 'g', 't', +'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\022', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', +'i', 'n', '\030', '\007', ' ', '\003', '(', '\022', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\217', '\001', '\n', '\014', 'F', 'i', 'x', 'e', 'd', +'3', '2', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\007', 'R', '\005', 'c', +'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\007', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', +'t', 'e', '\030', '\003', ' ', '\001', '(', '\007', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\007', +'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\007', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', +'\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\007', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', +' ', '\003', '(', '\007', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\217', '\001', '\n', '\014', 'F', 'i', 'x', 'e', 'd', '6', '4', 'R', 'u', +'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\006', 'R', '\005', 'c', 'o', 'n', 's', 't', +'\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\006', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', +' ', '\001', '(', '\006', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\006', 'R', '\002', 'g', 't', +'\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\006', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', +'\006', ' ', '\003', '(', '\006', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\006', +'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\220', '\001', '\n', '\r', 'S', 'F', 'i', 'x', 'e', 'd', '3', '2', 'R', 'u', 'l', 'e', 's', +'\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\017', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', +'\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\017', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', +'\017', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\017', 'R', '\002', 'g', 't', '\022', '\020', '\n', +'\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\017', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', +'(', '\017', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\017', 'R', '\005', 'n', +'o', 't', 'I', 'n', '\"', '\220', '\001', '\n', '\r', 'S', 'F', 'i', 'x', 'e', 'd', '6', '4', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', +'\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\020', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', +'\030', '\002', ' ', '\001', '(', '\020', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\020', 'R', '\003', +'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\020', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', +'e', '\030', '\005', ' ', '\001', '(', '\020', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\020', 'R', +'\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\020', 'R', '\005', 'n', 'o', 't', 'I', +'n', '\"', '!', '\n', '\t', 'B', 'o', 'o', 'l', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', +' ', '\001', '(', '\010', 'R', '\005', 'c', 'o', 'n', 's', 't', '\"', '\261', '\005', '\n', '\013', 'S', 't', 'r', 'i', 'n', 'g', 'R', 'u', 'l', +'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', +'\020', '\n', '\003', 'l', 'e', 'n', '\030', '\023', ' ', '\001', '(', '\004', 'R', '\003', 'l', 'e', 'n', '\022', '\027', '\n', '\007', 'm', 'i', 'n', '_', +'l', 'e', 'n', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\006', 'm', 'i', 'n', 'L', 'e', 'n', '\022', '\027', '\n', '\007', 'm', 'a', 'x', '_', +'l', 'e', 'n', '\030', '\003', ' ', '\001', '(', '\004', 'R', '\006', 'm', 'a', 'x', 'L', 'e', 'n', '\022', '\033', '\n', '\t', 'l', 'e', 'n', '_', +'b', 'y', 't', 'e', 's', '\030', '\024', ' ', '\001', '(', '\004', 'R', '\010', 'l', 'e', 'n', 'B', 'y', 't', 'e', 's', '\022', '\033', '\n', '\t', +'m', 'i', 'n', '_', 'b', 'y', 't', 'e', 's', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\010', 'm', 'i', 'n', 'B', 'y', 't', 'e', 's', +'\022', '\033', '\n', '\t', 'm', 'a', 'x', '_', 'b', 'y', 't', 'e', 's', '\030', '\005', ' ', '\001', '(', '\004', 'R', '\010', 'm', 'a', 'x', 'B', +'y', 't', 'e', 's', '\022', '\030', '\n', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\007', 'p', 'a', +'t', 't', 'e', 'r', 'n', '\022', '\026', '\n', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\007', ' ', '\001', '(', '\t', 'R', '\006', 'p', 'r', +'e', 'f', 'i', 'x', '\022', '\026', '\n', '\006', 's', 'u', 'f', 'f', 'i', 'x', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\006', 's', 'u', 'f', +'f', 'i', 'x', '\022', '\032', '\n', '\010', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\030', '\t', ' ', '\001', '(', '\t', 'R', '\010', 'c', 'o', +'n', 't', 'a', 'i', 'n', 's', '\022', '!', '\n', '\014', 'n', 'o', 't', '_', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\030', '\027', ' ', +'\001', '(', '\t', 'R', '\013', 'n', 'o', 't', 'C', 'o', 'n', 't', 'a', 'i', 'n', 's', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\n', ' ', +'\003', '(', '\t', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\013', ' ', '\003', '(', '\t', 'R', '\005', +'n', 'o', 't', 'I', 'n', '\022', '\026', '\n', '\005', 'e', 'm', 'a', 'i', 'l', '\030', '\014', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\005', 'e', +'m', 'a', 'i', 'l', '\022', '\034', '\n', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\030', '\r', ' ', '\001', '(', '\010', 'H', '\000', 'R', +'\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\022', '\020', '\n', '\002', 'i', 'p', '\030', '\016', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\002', +'i', 'p', '\022', '\024', '\n', '\004', 'i', 'p', 'v', '4', '\030', '\017', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\004', 'i', 'p', 'v', '4', '\022', +'\024', '\n', '\004', 'i', 'p', 'v', '6', '\030', '\020', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\004', 'i', 'p', 'v', '6', '\022', '\022', '\n', '\003', +'u', 'r', 'i', '\030', '\021', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\003', 'u', 'r', 'i', '\022', '\031', '\n', '\007', 'u', 'r', 'i', '_', 'r', +'e', 'f', '\030', '\022', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\006', 'u', 'r', 'i', 'R', 'e', 'f', '\022', '\032', '\n', '\007', 'a', 'd', 'd', +'r', 'e', 's', 's', '\030', '\025', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '\024', '\n', '\004', +'u', 'u', 'i', 'd', '\030', '\026', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\004', 'u', 'u', 'i', 'd', '\022', '@', '\n', '\020', 'w', 'e', 'l', +'l', '_', 'k', 'n', 'o', 'w', 'n', '_', 'r', 'e', 'g', 'e', 'x', '\030', '\030', ' ', '\001', '(', '\016', '2', '\024', '.', 'v', 'a', 'l', +'i', 'd', 'a', 't', 'e', '.', 'K', 'n', 'o', 'w', 'n', 'R', 'e', 'g', 'e', 'x', 'H', '\000', 'R', '\016', 'w', 'e', 'l', 'l', 'K', +'n', 'o', 'w', 'n', 'R', 'e', 'g', 'e', 'x', '\022', '\034', '\n', '\006', 's', 't', 'r', 'i', 'c', 't', '\030', '\031', ' ', '\001', '(', '\010', +':', '\004', 't', 'r', 'u', 'e', 'R', '\006', 's', 't', 'r', 'i', 'c', 't', 'B', '\014', '\n', '\n', 'w', 'e', 'l', 'l', '_', 'k', 'n', +'o', 'w', 'n', '\"', '\277', '\002', '\n', '\n', 'B', 'y', 't', 'e', 's', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', +'s', 't', '\030', '\001', ' ', '\001', '(', '\014', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\020', '\n', '\003', 'l', 'e', 'n', '\030', '\r', ' ', +'\001', '(', '\004', 'R', '\003', 'l', 'e', 'n', '\022', '\027', '\n', '\007', 'm', 'i', 'n', '_', 'l', 'e', 'n', '\030', '\002', ' ', '\001', '(', '\004', +'R', '\006', 'm', 'i', 'n', 'L', 'e', 'n', '\022', '\027', '\n', '\007', 'm', 'a', 'x', '_', 'l', 'e', 'n', '\030', '\003', ' ', '\001', '(', '\004', +'R', '\006', 'm', 'a', 'x', 'L', 'e', 'n', '\022', '\030', '\n', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\030', '\004', ' ', '\001', '(', '\t', +'R', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\022', '\026', '\n', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\005', ' ', '\001', '(', '\014', +'R', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\022', '\026', '\n', '\006', 's', 'u', 'f', 'f', 'i', 'x', '\030', '\006', ' ', '\001', '(', '\014', 'R', +'\006', 's', 'u', 'f', 'f', 'i', 'x', '\022', '\032', '\n', '\010', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\030', '\007', ' ', '\001', '(', '\014', +'R', '\010', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\010', ' ', '\003', '(', '\014', 'R', '\002', 'i', +'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\t', ' ', '\003', '(', '\014', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\022', +'\020', '\n', '\002', 'i', 'p', '\030', '\n', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\002', 'i', 'p', '\022', '\024', '\n', '\004', 'i', 'p', 'v', '4', +'\030', '\013', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\004', 'i', 'p', 'v', '4', '\022', '\024', '\n', '\004', 'i', 'p', 'v', '6', '\030', '\014', ' ', +'\001', '(', '\010', 'H', '\000', 'R', '\004', 'i', 'p', 'v', '6', 'B', '\014', '\n', '\n', 'w', 'e', 'l', 'l', '_', 'k', 'n', 'o', 'w', 'n', +'\"', 'k', '\n', '\t', 'E', 'n', 'u', 'm', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', +'\001', '(', '\005', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '!', '\n', '\014', 'd', 'e', 'f', 'i', 'n', 'e', 'd', '_', 'o', 'n', 'l', +'y', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\013', 'd', 'e', 'f', 'i', 'n', 'e', 'd', 'O', 'n', 'l', 'y', '\022', '\016', '\n', '\002', 'i', +'n', '\030', '\003', ' ', '\003', '(', '\005', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\004', ' ', '\003', +'(', '\005', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '>', '\n', '\014', 'M', 'e', 's', 's', 'a', 'g', 'e', 'R', 'u', 'l', 'e', 's', +'\022', '\022', '\n', '\004', 's', 'k', 'i', 'p', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\004', 's', 'k', 'i', 'p', '\022', '\032', '\n', '\010', 'r', +'e', 'q', 'u', 'i', 'r', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\"', '\215', +'\001', '\n', '\r', 'R', 'e', 'p', 'e', 'a', 't', 'e', 'd', 'R', 'u', 'l', 'e', 's', '\022', '\033', '\n', '\t', 'm', 'i', 'n', '_', 'i', +'t', 'e', 'm', 's', '\030', '\001', ' ', '\001', '(', '\004', 'R', '\010', 'm', 'i', 'n', 'I', 't', 'e', 'm', 's', '\022', '\033', '\n', '\t', 'm', +'a', 'x', '_', 'i', 't', 'e', 'm', 's', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\010', 'm', 'a', 'x', 'I', 't', 'e', 'm', 's', '\022', +'\026', '\n', '\006', 'u', 'n', 'i', 'q', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\006', 'u', 'n', 'i', 'q', 'u', 'e', '\022', '*', +'\n', '\005', 'i', 't', 'e', 'm', 's', '\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', +'F', 'i', 'e', 'l', 'd', 'R', 'u', 'l', 'e', 's', 'R', '\005', 'i', 't', 'e', 'm', 's', '\"', '\271', '\001', '\n', '\010', 'M', 'a', 'p', +'R', 'u', 'l', 'e', 's', '\022', '\033', '\n', '\t', 'm', 'i', 'n', '_', 'p', 'a', 'i', 'r', 's', '\030', '\001', ' ', '\001', '(', '\004', 'R', +'\010', 'm', 'i', 'n', 'P', 'a', 'i', 'r', 's', '\022', '\033', '\n', '\t', 'm', 'a', 'x', '_', 'p', 'a', 'i', 'r', 's', '\030', '\002', ' ', +'\001', '(', '\004', 'R', '\010', 'm', 'a', 'x', 'P', 'a', 'i', 'r', 's', '\022', '\033', '\n', '\t', 'n', 'o', '_', 's', 'p', 'a', 'r', 's', +'e', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\010', 'n', 'o', 'S', 'p', 'a', 'r', 's', 'e', '\022', '(', '\n', '\004', 'k', 'e', 'y', 's', +'\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'e', 'l', 'd', 'R', 'u', +'l', 'e', 's', 'R', '\004', 'k', 'e', 'y', 's', '\022', ',', '\n', '\006', 'v', 'a', 'l', 'u', 'e', 's', '\030', '\005', ' ', '\001', '(', '\013', +'2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'e', 'l', 'd', 'R', 'u', 'l', 'e', 's', 'R', '\006', 'v', +'a', 'l', 'u', 'e', 's', '\"', 'M', '\n', '\010', 'A', 'n', 'y', 'R', 'u', 'l', 'e', 's', '\022', '\032', '\n', '\010', 'r', 'e', 'q', 'u', +'i', 'r', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\022', '\016', '\n', '\002', 'i', +'n', '\030', '\002', ' ', '\003', '(', '\t', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\003', ' ', '\003', +'(', '\t', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\351', '\002', '\n', '\r', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', 'u', 'l', +'e', 's', '\022', '\032', '\n', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', +'u', 'i', 'r', 'e', 'd', '\022', '/', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', +'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\005', 'c', +'o', 'n', 's', 't', '\022', ')', '\n', '\002', 'l', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', +'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\002', 'l', 't', '\022', '+', '\n', +'\003', 'l', 't', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\003', 'l', 't', 'e', '\022', ')', '\n', '\002', 'g', 't', '\030', '\005', +' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', +'r', 'a', 't', 'i', 'o', 'n', 'R', '\002', 'g', 't', '\022', '+', '\n', '\003', 'g', 't', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\031', +'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', +'R', '\003', 'g', 't', 'e', '\022', ')', '\n', '\002', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\002', 'i', 'n', '\022', '0', +'\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\010', ' ', '\003', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', +'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\363', +'\002', '\n', '\016', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', 'u', 'l', 'e', 's', '\022', '\032', '\n', '\010', 'r', 'e', 'q', 'u', +'i', 'r', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\022', '0', '\n', '\005', 'c', +'o', 'n', 's', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', +'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '*', '\n', '\002', 'l', +'t', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', +'.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\002', 'l', 't', '\022', ',', '\n', '\003', 'l', 't', 'e', '\030', '\004', ' ', '\001', +'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', +'s', 't', 'a', 'm', 'p', 'R', '\003', 'l', 't', 'e', '\022', '*', '\n', '\002', 'g', 't', '\030', '\005', ' ', '\001', '(', '\013', '2', '\032', '.', +'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', +'R', '\002', 'g', 't', '\022', ',', '\n', '\003', 'g', 't', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', +'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\003', 'g', 't', 'e', +'\022', '\025', '\n', '\006', 'l', 't', '_', 'n', 'o', 'w', '\030', '\007', ' ', '\001', '(', '\010', 'R', '\005', 'l', 't', 'N', 'o', 'w', '\022', '\025', +'\n', '\006', 'g', 't', '_', 'n', 'o', 'w', '\030', '\010', ' ', '\001', '(', '\010', 'R', '\005', 'g', 't', 'N', 'o', 'w', '\022', '1', '\n', '\006', +'w', 'i', 't', 'h', 'i', 'n', '\030', '\t', ' ', '\001', '(', '\013', '2', '\031', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', +'t', 'o', 'b', 'u', 'f', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\006', 'w', 'i', 't', 'h', 'i', 'n', '*', 'F', '\n', +'\n', 'K', 'n', 'o', 'w', 'n', 'R', 'e', 'g', 'e', 'x', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', +'\024', '\n', '\020', 'H', 'T', 'T', 'P', '_', 'H', 'E', 'A', 'D', 'E', 'R', '_', 'N', 'A', 'M', 'E', '\020', '\001', '\022', '\025', '\n', '\021', +'H', 'T', 'T', 'P', '_', 'H', 'E', 'A', 'D', 'E', 'R', '_', 'V', 'A', 'L', 'U', 'E', '\020', '\002', ':', '<', '\n', '\010', 'd', 'i', +'s', 'a', 'b', 'l', 'e', 'd', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', +'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\257', '\010', ' ', '\001', '(', '\010', 'R', '\010', 'd', 'i', +'s', 'a', 'b', 'l', 'e', 'd', ':', ':', '\n', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\022', '\035', '.', 'g', 'o', 'o', 'g', +'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'O', 'n', 'e', 'o', 'f', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', +'\257', '\010', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', ':', 'J', '\n', '\005', 'r', 'u', 'l', 'e', 's', +'\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', +'p', 't', 'i', 'o', 'n', 's', '\030', '\257', '\010', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', +'F', 'i', 'e', 'l', 'd', 'R', 'u', 'l', 'e', 's', 'R', '\005', 'r', 'u', 'l', 'e', 's', 'B', 'P', '\n', '\032', 'i', 'o', '.', 'e', +'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'p', 'g', 'v', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'Z', '2', 'g', +'i', 't', 'h', 'u', 'b', '.', 'c', 'o', 'm', '/', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '/', 'p', 'r', 'o', 't', +'o', 'c', '-', 'g', 'e', 'n', '-', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', +}; + +static upb_def_init *deps[4] = { + &google_protobuf_descriptor_proto_upbdefinit, + &google_protobuf_duration_proto_upbdefinit, + &google_protobuf_timestamp_proto_upbdefinit, + NULL +}; + +upb_def_init validate_validate_proto_upbdefinit = { + deps, + layouts, + "validate/validate.proto", + UPB_STRVIEW_INIT(descriptor, 5699) +}; diff --git a/src/core/ext/upb-generated/validate/validate.upbdefs.h b/src/core/ext/upb-generated/validate/validate.upbdefs.h new file mode 100644 index 00000000000..2637121f90f --- /dev/null +++ b/src/core/ext/upb-generated/validate/validate.upbdefs.h @@ -0,0 +1,145 @@ +/* This file was generated by upbc (the upb compiler) from the input + * file: + * + * validate/validate.proto + * + * Do not edit -- your changes will be discarded when the file is + * regenerated. */ + +#ifndef VALIDATE_VALIDATE_PROTO_UPBDEFS_H_ +#define VALIDATE_VALIDATE_PROTO_UPBDEFS_H_ + +#include "upb/def.h" +#include "upb/port_def.inc" +#ifdef __cplusplus +extern "C" { +#endif + +#include "upb/def.h" + +#include "upb/port_def.inc" + +extern upb_def_init validate_validate_proto_upbdefinit; + +UPB_INLINE const upb_msgdef *validate_FieldRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.FieldRules"); +} + +UPB_INLINE const upb_msgdef *validate_FloatRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.FloatRules"); +} + +UPB_INLINE const upb_msgdef *validate_DoubleRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.DoubleRules"); +} + +UPB_INLINE const upb_msgdef *validate_Int32Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.Int32Rules"); +} + +UPB_INLINE const upb_msgdef *validate_Int64Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.Int64Rules"); +} + +UPB_INLINE const upb_msgdef *validate_UInt32Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.UInt32Rules"); +} + +UPB_INLINE const upb_msgdef *validate_UInt64Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.UInt64Rules"); +} + +UPB_INLINE const upb_msgdef *validate_SInt32Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.SInt32Rules"); +} + +UPB_INLINE const upb_msgdef *validate_SInt64Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.SInt64Rules"); +} + +UPB_INLINE const upb_msgdef *validate_Fixed32Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.Fixed32Rules"); +} + +UPB_INLINE const upb_msgdef *validate_Fixed64Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.Fixed64Rules"); +} + +UPB_INLINE const upb_msgdef *validate_SFixed32Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.SFixed32Rules"); +} + +UPB_INLINE const upb_msgdef *validate_SFixed64Rules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.SFixed64Rules"); +} + +UPB_INLINE const upb_msgdef *validate_BoolRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.BoolRules"); +} + +UPB_INLINE const upb_msgdef *validate_StringRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.StringRules"); +} + +UPB_INLINE const upb_msgdef *validate_BytesRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.BytesRules"); +} + +UPB_INLINE const upb_msgdef *validate_EnumRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.EnumRules"); +} + +UPB_INLINE const upb_msgdef *validate_MessageRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.MessageRules"); +} + +UPB_INLINE const upb_msgdef *validate_RepeatedRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.RepeatedRules"); +} + +UPB_INLINE const upb_msgdef *validate_MapRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.MapRules"); +} + +UPB_INLINE const upb_msgdef *validate_AnyRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.AnyRules"); +} + +UPB_INLINE const upb_msgdef *validate_DurationRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.DurationRules"); +} + +UPB_INLINE const upb_msgdef *validate_TimestampRules_getmsgdef(upb_symtab *s) { + _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit); + return upb_symtab_lookupmsg(s, "validate.TimestampRules"); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#include "upb/port_undef.inc" + +#endif /* VALIDATE_VALIDATE_PROTO_UPBDEFS_H_ */ diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 664ff94526f..e87308c5cdd 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -14,7 +14,7 @@ def grpc_deps pod 'BoringSSL-GRPC', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true pod 'gRPC/InternalTesting', :path => GRPC_LOCAL_SRC - pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC, :inhibit_warnings => true pod 'RemoteTest', :path => "RemoteTestClient", :inhibit_warnings => true diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index a25f10239f6..37136b6a49a 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -127,78 +127,145 @@ CORE_SOURCE_FILES = [ 'src/core/ext/transport/inproc/inproc_plugin.cc', 'src/core/ext/transport/inproc/inproc_transport.cc', 'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c', + 'src/core/ext/upb-generated/envoy/annotations/deprecation.upbdefs.c', 'src/core/ext/upb-generated/envoy/annotations/resource.upb.c', + 'src/core/ext/upb-generated/envoy/annotations/resource.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/auth/cert.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/auth/common.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/auth/secret.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/auth/tls.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/cds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cds.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/address.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/backoff.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/base.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/config_source.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/health_check.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/protocol.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/discovery.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/eds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/eds.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/lds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/lds.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/listener.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/rds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/rds.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/route.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/route.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/route/route_components.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/scoped_route.upbdefs.c', 'src/core/ext/upb-generated/envoy/api/v2/srds.upb.c', + 'src/core/ext/upb-generated/envoy/api/v2/srds.upbdefs.c', 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c', + 'src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upbdefs.c', 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c', + 'src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upbdefs.c', 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c', + 'src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upbdefs.c', 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c', + 'src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upbdefs.c', 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.c', + 'src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upbdefs.c', 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c', + 'src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upbdefs.c', 'src/core/ext/upb-generated/envoy/type/http.upb.c', + 'src/core/ext/upb-generated/envoy/type/http.upbdefs.c', 'src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c', + 'src/core/ext/upb-generated/envoy/type/matcher/regex.upbdefs.c', 'src/core/ext/upb-generated/envoy/type/matcher/string.upb.c', + 'src/core/ext/upb-generated/envoy/type/matcher/string.upbdefs.c', 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c', + 'src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upbdefs.c', 'src/core/ext/upb-generated/envoy/type/percent.upb.c', + 'src/core/ext/upb-generated/envoy/type/percent.upbdefs.c', 'src/core/ext/upb-generated/envoy/type/range.upb.c', + 'src/core/ext/upb-generated/envoy/type/range.upbdefs.c', 'src/core/ext/upb-generated/envoy/type/semantic_version.upb.c', + 'src/core/ext/upb-generated/envoy/type/semantic_version.upbdefs.c', 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c', + 'src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upbdefs.c', 'src/core/ext/upb-generated/gogoproto/gogo.upb.c', + 'src/core/ext/upb-generated/gogoproto/gogo.upbdefs.c', 'src/core/ext/upb-generated/google/api/annotations.upb.c', + 'src/core/ext/upb-generated/google/api/annotations.upbdefs.c', 'src/core/ext/upb-generated/google/api/http.upb.c', + 'src/core/ext/upb-generated/google/api/http.upbdefs.c', 'src/core/ext/upb-generated/google/protobuf/any.upb.c', + 'src/core/ext/upb-generated/google/protobuf/any.upbdefs.c', 'src/core/ext/upb-generated/google/protobuf/descriptor.upb.c', + 'src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c', 'src/core/ext/upb-generated/google/protobuf/duration.upb.c', + 'src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c', 'src/core/ext/upb-generated/google/protobuf/empty.upb.c', + 'src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c', 'src/core/ext/upb-generated/google/protobuf/struct.upb.c', + 'src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c', 'src/core/ext/upb-generated/google/protobuf/timestamp.upb.c', + 'src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c', 'src/core/ext/upb-generated/google/protobuf/wrappers.upb.c', + 'src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c', 'src/core/ext/upb-generated/google/rpc/status.upb.c', + 'src/core/ext/upb-generated/google/rpc/status.upbdefs.c', 'src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c', 'src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c', 'src/core/ext/upb-generated/udpa/annotations/migrate.upb.c', + 'src/core/ext/upb-generated/udpa/annotations/migrate.upbdefs.c', 'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c', + 'src/core/ext/upb-generated/udpa/annotations/sensitive.upbdefs.c', 'src/core/ext/upb-generated/udpa/annotations/status.upb.c', + 'src/core/ext/upb-generated/udpa/annotations/status.upbdefs.c', 'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c', 'src/core/ext/upb-generated/validate/validate.upb.c', + 'src/core/ext/upb-generated/validate/validate.upbdefs.c', 'src/core/lib/avl/avl.cc', 'src/core/lib/backoff/backoff.cc', 'src/core/lib/channel/channel_args.cc', @@ -843,10 +910,13 @@ CORE_SOURCE_FILES = [ 'third_party/cares/cares/inet_ntop.c', 'third_party/cares/cares/windows_port.c', 'third_party/upb/upb/decode.c', + 'third_party/upb/upb/def.c', 'third_party/upb/upb/encode.c', 'third_party/upb/upb/msg.c', 'third_party/upb/upb/port.c', + 'third_party/upb/upb/reflection.c', 'third_party/upb/upb/table.c', + 'third_party/upb/upb/text_encode.c', 'third_party/upb/upb/upb.c', 'third_party/zlib/adler32.c', 'third_party/zlib/compress.c', diff --git a/src/upb/gen_build_yaml.py b/src/upb/gen_build_yaml.py index 2816bd4e4c0..d3dfa15d257 100755 --- a/src/upb/gen_build_yaml.py +++ b/src/upb/gen_build_yaml.py @@ -36,6 +36,23 @@ try: "third_party/upb/upb/port.c", "third_party/upb/upb/table.c", "third_party/upb/upb/upb.c", + "third_party/upb/upb/def.c", + "third_party/upb/upb/reflection.c", + "third_party/upb/upb/text_encode.c", + "src/core/ext/upb-generated/google/protobuf/any.upb.c", + "src/core/ext/upb-generated/google/protobuf/any.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c", + "src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/duration.upb.c", + "src/core/ext/upb-generated/google/protobuf/duration.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/empty.upb.c", + "src/core/ext/upb-generated/google/protobuf/empty.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/struct.upb.c", + "src/core/ext/upb-generated/google/protobuf/struct.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/timestamp.upb.c", + "src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.c", + "src/core/ext/upb-generated/google/protobuf/wrappers.upb.c", + "src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.c", ], 'headers': [ "third_party/upb/upb/decode.h", @@ -46,6 +63,23 @@ try: "third_party/upb/upb/table.int.h", "third_party/upb/upb/upb.h", "third_party/upb/upb/upb.hpp", + "third_party/upb/upb/def.h", + "third_party/upb/upb/reflection.h", + "third_party/upb/upb/text_encode.h", + "src/core/ext/upb-generated/google/protobuf/any.upb.h", + "src/core/ext/upb-generated/google/protobuf/any.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h", + "src/core/ext/upb-generated/google/protobuf/descriptor.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/duration.upb.h", + "src/core/ext/upb-generated/google/protobuf/duration.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/empty.upb.h", + "src/core/ext/upb-generated/google/protobuf/empty.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/struct.upb.h", + "src/core/ext/upb-generated/google/protobuf/struct.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/timestamp.upb.h", + "src/core/ext/upb-generated/google/protobuf/timestamp.upbdefs.h", + "src/core/ext/upb-generated/google/protobuf/wrappers.upb.h", + "src/core/ext/upb-generated/google/protobuf/wrappers.upbdefs.h", ], 'secure': False, }] diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 553e823f00d..13347b78673 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -237,7 +237,8 @@ sed -E -i '' 's;#include ;#if COCOAPODS==1\\\n #include \\\n#else\\\n #include \\\n#endif;g' $(find src/core -type f \\( -path '*.h' -or -path '*.cc' \\) -print | xargs grep -H -c '#include Date: Wed, 24 Jun 2020 10:24:17 -0700 Subject: [PATCH 145/239] Prefer SetMax*MessageSize value over ServerBuilderOption --- src/cpp/server/server_builder.cc | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 0acb486149d..6461c2fcffa 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -219,24 +219,13 @@ ServerBuilder& ServerBuilder::AddListeningPort( std::unique_ptr ServerBuilder::BuildAndStart() { grpc::ChannelArguments args; - + if (max_receive_message_size_ >= -1) { + args.SetInt(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, max_receive_message_size_); + } for (const auto& option : options_) { option->UpdateArguments(&args); option->UpdatePlugins(&plugins_); } - if (max_receive_message_size_ >= -1) { - grpc_channel_args c_args = args.c_channel_args(); - const grpc_arg* arg = - grpc_channel_args_find(&c_args, GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH); - // Some option has set max_receive_message_length and it is also set - // directly on the ServerBuilder. - if (arg != nullptr) { - gpr_log( - GPR_ERROR, - "gRPC ServerBuilder receives multiple max_receive_message_length"); - } - args.SetInt(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, max_receive_message_size_); - } // The default message size is -1 (max), so no need to explicitly set it for // -1. if (max_send_message_size_ >= 0) { From 1a17a14ceb731250204c26b5bd291759679fcb36 Mon Sep 17 00:00:00 2001 From: Sanjay Pujare Date: Wed, 24 Jun 2020 10:38:32 -0700 Subject: [PATCH 146/239] Remove 1.30.0 and 1.30.1 from the matrix --- tools/interop_matrix/client_matrix.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/interop_matrix/client_matrix.py b/tools/interop_matrix/client_matrix.py index b85ea3ba20c..cfd5bb7fd09 100644 --- a/tools/interop_matrix/client_matrix.py +++ b/tools/interop_matrix/client_matrix.py @@ -219,8 +219,6 @@ LANG_RELEASE_MATRIX = { ('v1.27.2', ReleaseInfo()), ('v1.28.1', ReleaseInfo()), ('v1.29.0', ReleaseInfo()), - ('v1.30.0', ReleaseInfo()), - ('v1.30.1', ReleaseInfo()), ('v1.30.2', ReleaseInfo()), ]), 'python': From fc059ded05247987b22160b35f8f2f24e9157870 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 24 Jun 2020 11:13:17 -0700 Subject: [PATCH 147/239] Make the same change for max send message size --- src/cpp/server/server_builder.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 6461c2fcffa..a2403fe996d 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -222,16 +222,13 @@ std::unique_ptr ServerBuilder::BuildAndStart() { if (max_receive_message_size_ >= -1) { args.SetInt(GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH, max_receive_message_size_); } + if (max_send_message_size_ >= -1) { + args.SetInt(GRPC_ARG_MAX_SEND_MESSAGE_LENGTH, max_send_message_size_); + } for (const auto& option : options_) { option->UpdateArguments(&args); option->UpdatePlugins(&plugins_); } - // The default message size is -1 (max), so no need to explicitly set it for - // -1. - if (max_send_message_size_ >= 0) { - args.SetInt(GRPC_ARG_MAX_SEND_MESSAGE_LENGTH, max_send_message_size_); - } - args.SetInt(GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET, enabled_compression_algorithms_bitset_); if (maybe_default_compression_level_.is_set) { From f69b8f831c7ad3fd01090e1c6ed8d2b81b5a5136 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Wed, 24 Jun 2020 11:49:54 -0700 Subject: [PATCH 148/239] Fix executable bit --- tools/interop_matrix/run_interop_matrix_tests.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 tools/interop_matrix/run_interop_matrix_tests.py diff --git a/tools/interop_matrix/run_interop_matrix_tests.py b/tools/interop_matrix/run_interop_matrix_tests.py old mode 100644 new mode 100755 From 53d734a0dc867f9e11577beda6c2101ae681a205 Mon Sep 17 00:00:00 2001 From: Graham Campbell Date: Wed, 24 Jun 2020 20:03:58 +0100 Subject: [PATCH 149/239] Fixed typo --- src/php/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php/README.md b/src/php/README.md index 0862ceac446..1704c814ad8 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -96,7 +96,7 @@ composer package as well. Add this to your project's `composer.json` file. ```json "require": { - "grpc/grpc": "~v1.30.0" + "grpc/grpc": "~1.30.0" } ``` From 9db914a0ccea0a89e92b1458c5016e810c54008e Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 24 Jun 2020 12:28:27 -0700 Subject: [PATCH 150/239] Revert "Revert "Move ServerBuilder back to ::grpc from ::grpc_impl"" --- BUILD | 1 - BUILD.gn | 1 - CMakeLists.txt | 2 - Makefile | 2 - gRPC-C++.podspec | 1 - .../impl/codegen/completion_queue_impl.h | 6 +- include/grpcpp/impl/server_builder_plugin.h | 5 +- include/grpcpp/server_builder.h | 388 +++++++++++++++- include/grpcpp/server_builder_impl.h | 417 ------------------ include/grpcpp/server_impl.h | 2 +- .../external_connection_acceptor_impl.cc | 2 +- src/cpp/server/server_builder.cc | 48 +- tools/doxygen/Doxyfile.c++ | 1 - tools/doxygen/Doxyfile.c++.internal | 1 - 14 files changed, 418 insertions(+), 459 deletions(-) delete mode 100644 include/grpcpp/server_builder_impl.h diff --git a/BUILD b/BUILD index 0d616078bd2..c5f70c7c3cc 100644 --- a/BUILD +++ b/BUILD @@ -261,7 +261,6 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/server.h", "include/grpcpp/server_impl.h", "include/grpcpp/server_builder.h", - "include/grpcpp/server_builder_impl.h", "include/grpcpp/server_context.h", "include/grpcpp/server_posix.h", "include/grpcpp/server_posix_impl.h", diff --git a/BUILD.gn b/BUILD.gn index cb133df9924..e1254bac136 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1318,7 +1318,6 @@ config("grpc_config") { "include/grpcpp/security/tls_credentials_options.h", "include/grpcpp/server.h", "include/grpcpp/server_builder.h", - "include/grpcpp/server_builder_impl.h", "include/grpcpp/server_context.h", "include/grpcpp/server_impl.h", "include/grpcpp/server_posix.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f19de24db9..c9033bb3318 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2881,7 +2881,6 @@ foreach(_hdr include/grpcpp/security/tls_credentials_options.h include/grpcpp/server.h include/grpcpp/server_builder.h - include/grpcpp/server_builder_impl.h include/grpcpp/server_context.h include/grpcpp/server_impl.h include/grpcpp/server_posix.h @@ -3574,7 +3573,6 @@ foreach(_hdr include/grpcpp/security/tls_credentials_options.h include/grpcpp/server.h include/grpcpp/server_builder.h - include/grpcpp/server_builder_impl.h include/grpcpp/server_context.h include/grpcpp/server_impl.h include/grpcpp/server_posix.h diff --git a/Makefile b/Makefile index cf294e9b9ba..54437717473 100644 --- a/Makefile +++ b/Makefile @@ -5078,7 +5078,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ - include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ @@ -5776,7 +5775,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ - include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index f7316b70fcf..7e85475aad0 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -173,7 +173,6 @@ Pod::Spec.new do |s| 'include/grpcpp/security/tls_credentials_options.h', 'include/grpcpp/server.h', 'include/grpcpp/server_builder.h', - 'include/grpcpp/server_builder_impl.h', 'include/grpcpp/server_context.h', 'include/grpcpp/server_impl.h', 'include/grpcpp/server_posix.h', diff --git a/include/grpcpp/impl/codegen/completion_queue_impl.h b/include/grpcpp/impl/codegen/completion_queue_impl.h index c65b12197dc..61538f1d512 100644 --- a/include/grpcpp/impl/codegen/completion_queue_impl.h +++ b/include/grpcpp/impl/codegen/completion_queue_impl.h @@ -48,7 +48,6 @@ namespace grpc_impl { class Channel; class Server; -class ServerBuilder; template class ClientReader; template @@ -79,6 +78,7 @@ class ErrorMethodHandler; namespace grpc { class ChannelInterface; +class ServerBuilder; class ServerInterface; namespace internal { @@ -255,7 +255,7 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen { private: // Friends for access to server registration lists that enable checking and // logging on shutdown - friend class ::grpc_impl::ServerBuilder; + friend class ::grpc::ServerBuilder; friend class ::grpc_impl::Server; // Friend synchronous wrappers so that they can access Pluck(), which is @@ -445,7 +445,7 @@ class ServerCompletionQueue : public CompletionQueue { polling_type_(polling_type) {} grpc_cq_polling_type polling_type_; - friend class ::grpc_impl::ServerBuilder; + friend class ::grpc::ServerBuilder; friend class ::grpc_impl::Server; }; diff --git a/include/grpcpp/impl/server_builder_plugin.h b/include/grpcpp/impl/server_builder_plugin.h index 203e5465bc3..daed32142b1 100644 --- a/include/grpcpp/impl/server_builder_plugin.h +++ b/include/grpcpp/impl/server_builder_plugin.h @@ -26,11 +26,12 @@ namespace grpc_impl { -class ServerBuilder; class ServerInitializer; } // namespace grpc_impl namespace grpc { +class ServerBuilder; + /// This interface is meant for internal usage only. Implementations of this /// interface should add themselves to a \a ServerBuilder instance through the /// \a InternalAddPluginFactory method. @@ -42,7 +43,7 @@ class ServerBuilderPlugin { /// UpdateServerBuilder will be called at an early stage in /// ServerBuilder::BuildAndStart(), right after the ServerBuilderOptions have /// done their updates. - virtual void UpdateServerBuilder(grpc_impl::ServerBuilder* /*builder*/) {} + virtual void UpdateServerBuilder(ServerBuilder* /*builder*/) {} /// InitServer will be called in ServerBuilder::BuildAndStart(), after the /// Server instance is created. diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index d9ec7c42f3d..746bda90a0a 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -1,6 +1,6 @@ /* * - * Copyright 2019 gRPC authors. + * Copyright 2015-2016 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,11 +19,393 @@ #ifndef GRPCPP_SERVER_BUILDER_H #define GRPCPP_SERVER_BUILDER_H -#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct grpc_resource_quota; + +namespace grpc_impl { + +class CompletionQueue; +class Server; +class ServerCompletionQueue; +class ServerCredentials; +} // namespace grpc_impl namespace grpc { -typedef ::grpc_impl::ServerBuilder ServerBuilder; +class AsyncGenericService; +class Service; +namespace testing { +class ServerBuilderPluginTest; +} // namespace testing + +namespace internal { +class ExternalConnectionAcceptorImpl; +} // namespace internal + +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL +namespace experimental { +#endif +class CallbackGenericService; +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL +} // namespace experimental +#endif + +namespace experimental { +// EXPERIMENTAL API: +// Interface for a grpc server to build transports with connections created out +// of band. +// See ServerBuilder's AddExternalConnectionAcceptor API. +class ExternalConnectionAcceptor { + public: + struct NewConnectionParameters { + int listener_fd = -1; + int fd = -1; + ByteBuffer read_buffer; // data intended for the grpc server + }; + virtual ~ExternalConnectionAcceptor() {} + // If called before grpc::Server is started or after it is shut down, the new + // connection will be closed. + virtual void HandleNewConnection(NewConnectionParameters* p) = 0; +}; + +} // namespace experimental + +/// A builder class for the creation and startup of \a grpc::Server instances. +class ServerBuilder { + public: + ServerBuilder(); + virtual ~ServerBuilder(); + + ////////////////////////////////////////////////////////////////////////////// + // Primary API's + + /// Return a running server which is ready for processing calls. + /// Before calling, one typically needs to ensure that: + /// 1. a service is registered - so that the server knows what to serve + /// (via RegisterService, or RegisterAsyncGenericService) + /// 2. a listening port has been added - so the server knows where to receive + /// traffic (via AddListeningPort) + /// 3. [for async api only] completion queues have been added via + /// AddCompletionQueue + /// + /// Will return a nullptr on errors. + virtual std::unique_ptr BuildAndStart(); + + /// Register a service. This call does not take ownership of the service. + /// The service must exist for the lifetime of the \a Server instance returned + /// by \a BuildAndStart(). + /// Matches requests with any :authority + ServerBuilder& RegisterService(grpc::Service* service); + + /// Enlists an endpoint \a addr (port with an optional IP address) to + /// bind the \a grpc::Server object to be created to. + /// + /// It can be invoked multiple times. + /// + /// \param addr_uri The address to try to bind to the server in URI form. If + /// the scheme name is omitted, "dns:///" is assumed. To bind to any address, + /// please use IPv6 any, i.e., [::]:, which also accepts IPv4 + /// connections. Valid values include dns:///localhost:1234, / + /// 192.168.1.1:31416, dns:///[::1]:27182, etc.). + /// \param creds The credentials associated with the server. + /// \param selected_port[out] If not `nullptr`, gets populated with the port + /// number bound to the \a grpc::Server for the corresponding endpoint after + /// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort + /// does not modify this pointer. + ServerBuilder& AddListeningPort( + const grpc::string& addr_uri, + std::shared_ptr creds, + int* selected_port = nullptr); + + /// Add a completion queue for handling asynchronous services. + /// + /// Best performance is typically obtained by using one thread per polling + /// completion queue. + /// + /// Caller is required to shutdown the server prior to shutting down the + /// returned completion queue. Caller is also required to drain the + /// completion queue after shutting it down. A typical usage scenario: + /// + /// // While building the server: + /// ServerBuilder builder; + /// ... + /// cq_ = builder.AddCompletionQueue(); + /// server_ = builder.BuildAndStart(); + /// + /// // While shutting down the server; + /// server_->Shutdown(); + /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! + /// // Drain the cq_ that was created + /// void* ignored_tag; + /// bool ignored_ok; + /// while (cq_->Next(&ignored_tag, &ignored_ok)) { } + /// + /// \param is_frequently_polled This is an optional parameter to inform gRPC + /// library about whether this completion queue would be frequently polled + /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is + /// 'true' and is the recommended setting. Setting this to 'false' (i.e. + /// not polling the completion queue frequently) will have a significantly + /// negative performance impact and hence should not be used in production + /// use cases. + std::unique_ptr AddCompletionQueue( + bool is_frequently_polled = true); + + ////////////////////////////////////////////////////////////////////////////// + // Less commonly used RegisterService variants + + /// Register a service. This call does not take ownership of the service. + /// The service must exist for the lifetime of the \a Server instance + /// returned by \a BuildAndStart(). Only matches requests with :authority \a + /// host + ServerBuilder& RegisterService(const grpc::string& host, + grpc::Service* service); + + /// Register a generic service. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterAsyncGenericService( + grpc::AsyncGenericService* service); + + ////////////////////////////////////////////////////////////////////////////// + // Fine control knobs + + /// Set max receive message size in bytes. + /// The default is GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH. + ServerBuilder& SetMaxReceiveMessageSize(int max_receive_message_size) { + max_receive_message_size_ = max_receive_message_size; + return *this; + } + + /// Set max send message size in bytes. + /// The default is GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH. + ServerBuilder& SetMaxSendMessageSize(int max_send_message_size) { + max_send_message_size_ = max_send_message_size; + return *this; + } + + /// \deprecated For backward compatibility. + ServerBuilder& SetMaxMessageSize(int max_message_size) { + return SetMaxReceiveMessageSize(max_message_size); + } + + /// Set the support status for compression algorithms. All algorithms are + /// enabled by default. + /// + /// Incoming calls compressed with an unsupported algorithm will fail with + /// \a GRPC_STATUS_UNIMPLEMENTED. + ServerBuilder& SetCompressionAlgorithmSupportStatus( + grpc_compression_algorithm algorithm, bool enabled); + + /// The default compression level to use for all channel calls in the + /// absence of a call-specific level. + ServerBuilder& SetDefaultCompressionLevel(grpc_compression_level level); + + /// The default compression algorithm to use for all channel calls in the + /// absence of a call-specific level. Note that it overrides any compression + /// level set by \a SetDefaultCompressionLevel. + ServerBuilder& SetDefaultCompressionAlgorithm( + grpc_compression_algorithm algorithm); + + /// Set the attached buffer pool for this server + ServerBuilder& SetResourceQuota(const grpc::ResourceQuota& resource_quota); + + ServerBuilder& SetOption(std::unique_ptr option); + + /// Options for synchronous servers. + enum SyncServerOption { + NUM_CQS, ///< Number of completion queues. + MIN_POLLERS, ///< Minimum number of polling threads. + MAX_POLLERS, ///< Maximum number of polling threads. + CQ_TIMEOUT_MSEC ///< Completion queue timeout in milliseconds. + }; + + /// Only useful if this is a Synchronous server. + ServerBuilder& SetSyncServerOption(SyncServerOption option, int value); + + /// Add a channel argument (an escape hatch to tuning core library parameters + /// directly) + template + ServerBuilder& AddChannelArgument(const grpc::string& arg, const T& value) { + return SetOption(grpc::MakeChannelArgumentOption(arg, value)); + } + + /// For internal use only: Register a ServerBuilderPlugin factory function. + static void InternalAddPluginFactory( + std::unique_ptr (*CreatePlugin)()); + + /// Enable a server workaround. Do not use unless you know what the workaround + /// does. For explanation and detailed descriptions of workarounds, see + /// doc/workarounds.md. + ServerBuilder& EnableWorkaround(grpc_workaround_list id); + + /// NOTE: class experimental_type is not part of the public API of this class. + /// TODO(yashykt): Integrate into public API when this is no longer + /// experimental. + class experimental_type { + public: + explicit experimental_type(ServerBuilder* builder) : builder_(builder) {} + + void SetInterceptorCreators( + std::vector> + interceptor_creators) { + builder_->interceptor_creators_ = std::move(interceptor_creators); + } + +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL + /// Register a generic service that uses the callback API. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterCallbackGenericService( + grpc::experimental::CallbackGenericService* service); +#endif + + enum class ExternalConnectionType { + FROM_FD = 0 // in the form of a file descriptor + }; + + /// Register an acceptor to handle the externally accepted connection in + /// grpc server. The returned acceptor can be used to pass the connection + /// to grpc server, where a channel will be created with the provided + /// server credentials. + std::unique_ptr + AddExternalConnectionAcceptor(ExternalConnectionType type, + std::shared_ptr creds); + + private: + ServerBuilder* builder_; + }; + +#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + /// Register a generic service that uses the callback API. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterCallbackGenericService( + grpc::CallbackGenericService* service); +#endif + + /// NOTE: The function experimental() is not stable public API. It is a view + /// to the experimental components of this class. It may be changed or removed + /// at any time. + experimental_type experimental() { return experimental_type(this); } + + protected: + /// Experimental, to be deprecated + struct Port { + grpc::string addr; + std::shared_ptr creds; + int* selected_port; + }; + + /// Experimental, to be deprecated + typedef std::unique_ptr HostString; + struct NamedService { + explicit NamedService(grpc::Service* s) : service(s) {} + NamedService(const grpc::string& h, grpc::Service* s) + : host(new grpc::string(h)), service(s) {} + HostString host; + grpc::Service* service; + }; + + /// Experimental, to be deprecated + std::vector ports() { return ports_; } + + /// Experimental, to be deprecated + std::vector services() { + std::vector service_refs; + for (auto& ptr : services_) { + service_refs.push_back(ptr.get()); + } + return service_refs; + } + + /// Experimental, to be deprecated + std::vector options() { + std::vector option_refs; + for (auto& ptr : options_) { + option_refs.push_back(ptr.get()); + } + return option_refs; + } + + private: + friend class ::grpc::testing::ServerBuilderPluginTest; + + struct SyncServerSettings { + SyncServerSettings() + : num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} + + /// Number of server completion queues to create to listen to incoming RPCs. + int num_cqs; + + /// Minimum number of threads per completion queue that should be listening + /// to incoming RPCs. + int min_pollers; + + /// Maximum number of threads per completion queue that can be listening to + /// incoming RPCs. + int max_pollers; + + /// The timeout for server completion queue's AsyncNext call. + int cq_timeout_msec; + }; + + int max_receive_message_size_; + int max_send_message_size_; + std::vector> options_; + std::vector> services_; + std::vector ports_; + + SyncServerSettings sync_server_settings_; + + /// List of completion queues added via \a AddCompletionQueue method. + std::vector cqs_; + + std::shared_ptr creds_; + std::vector> plugins_; + grpc_resource_quota* resource_quota_; + grpc::AsyncGenericService* generic_service_{nullptr}; +#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + grpc::CallbackGenericService* callback_generic_service_{nullptr}; +#else + grpc::experimental::CallbackGenericService* callback_generic_service_{ + nullptr}; +#endif + + struct { + bool is_set; + grpc_compression_level level; + } maybe_default_compression_level_; + struct { + bool is_set; + grpc_compression_algorithm algorithm; + } maybe_default_compression_algorithm_; + uint32_t enabled_compression_algorithms_bitset_; + std::vector< + std::unique_ptr> + interceptor_creators_; + std::vector> + acceptors_; +}; } // namespace grpc diff --git a/include/grpcpp/server_builder_impl.h b/include/grpcpp/server_builder_impl.h deleted file mode 100644 index 59aa54f4eca..00000000000 --- a/include/grpcpp/server_builder_impl.h +++ /dev/null @@ -1,417 +0,0 @@ -/* - * - * Copyright 2015-2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPCPP_SERVER_BUILDER_IMPL_H -#define GRPCPP_SERVER_BUILDER_IMPL_H - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -struct grpc_resource_quota; - -namespace grpc_impl { - -class CompletionQueue; -class Server; -class ServerCompletionQueue; -class ServerCredentials; -} // namespace grpc_impl - -namespace grpc { - -class AsyncGenericService; -class ResourceQuota; -class Service; -namespace testing { -class ServerBuilderPluginTest; -} // namespace testing - -namespace internal { -class ExternalConnectionAcceptorImpl; -} // namespace internal - -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL -namespace experimental { -#endif -class CallbackGenericService; -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL -} // namespace experimental -#endif - -namespace experimental { -// EXPERIMENTAL API: -// Interface for a grpc server to build transports with connections created out -// of band. -// See ServerBuilder's AddExternalConnectionAcceptor API. -class ExternalConnectionAcceptor { - public: - struct NewConnectionParameters { - int listener_fd = -1; - int fd = -1; - ByteBuffer read_buffer; // data intended for the grpc server - }; - virtual ~ExternalConnectionAcceptor() {} - // If called before grpc::Server is started or after it is shut down, the new - // connection will be closed. - virtual void HandleNewConnection(NewConnectionParameters* p) = 0; -}; - -} // namespace experimental -} // namespace grpc - -namespace grpc_impl { - -/// A builder class for the creation and startup of \a grpc::Server instances. -class ServerBuilder { - public: - ServerBuilder(); - virtual ~ServerBuilder(); - - ////////////////////////////////////////////////////////////////////////////// - // Primary API's - - /// Return a running server which is ready for processing calls. - /// Before calling, one typically needs to ensure that: - /// 1. a service is registered - so that the server knows what to serve - /// (via RegisterService, or RegisterAsyncGenericService) - /// 2. a listening port has been added - so the server knows where to receive - /// traffic (via AddListeningPort) - /// 3. [for async api only] completion queues have been added via - /// AddCompletionQueue - /// - /// Will return a nullptr on errors. - virtual std::unique_ptr BuildAndStart(); - - /// Register a service. This call does not take ownership of the service. - /// The service must exist for the lifetime of the \a Server instance returned - /// by \a BuildAndStart(). - /// Matches requests with any :authority - ServerBuilder& RegisterService(grpc::Service* service); - - /// Enlists an endpoint \a addr (port with an optional IP address) to - /// bind the \a grpc::Server object to be created to. - /// - /// It can be invoked multiple times. - /// - /// \param addr_uri The address to try to bind to the server in URI form. If - /// the scheme name is omitted, "dns:///" is assumed. To bind to any address, - /// please use IPv6 any, i.e., [::]:, which also accepts IPv4 - /// connections. Valid values include dns:///localhost:1234, / - /// 192.168.1.1:31416, dns:///[::1]:27182, etc.). - /// \param creds The credentials associated with the server. - /// \param selected_port[out] If not `nullptr`, gets populated with the port - /// number bound to the \a grpc::Server for the corresponding endpoint after - /// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort - /// does not modify this pointer. - ServerBuilder& AddListeningPort( - const grpc::string& addr_uri, - std::shared_ptr creds, - int* selected_port = nullptr); - - /// Add a completion queue for handling asynchronous services. - /// - /// Best performance is typically obtained by using one thread per polling - /// completion queue. - /// - /// Caller is required to shutdown the server prior to shutting down the - /// returned completion queue. Caller is also required to drain the - /// completion queue after shutting it down. A typical usage scenario: - /// - /// // While building the server: - /// ServerBuilder builder; - /// ... - /// cq_ = builder.AddCompletionQueue(); - /// server_ = builder.BuildAndStart(); - /// - /// // While shutting down the server; - /// server_->Shutdown(); - /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! - /// // Drain the cq_ that was created - /// void* ignored_tag; - /// bool ignored_ok; - /// while (cq_->Next(&ignored_tag, &ignored_ok)) { } - /// - /// \param is_frequently_polled This is an optional parameter to inform gRPC - /// library about whether this completion queue would be frequently polled - /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is - /// 'true' and is the recommended setting. Setting this to 'false' (i.e. - /// not polling the completion queue frequently) will have a significantly - /// negative performance impact and hence should not be used in production - /// use cases. - std::unique_ptr AddCompletionQueue( - bool is_frequently_polled = true); - - ////////////////////////////////////////////////////////////////////////////// - // Less commonly used RegisterService variants - - /// Register a service. This call does not take ownership of the service. - /// The service must exist for the lifetime of the \a Server instance - /// returned by \a BuildAndStart(). Only matches requests with :authority \a - /// host - ServerBuilder& RegisterService(const grpc::string& host, - grpc::Service* service); - - /// Register a generic service. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterAsyncGenericService( - grpc::AsyncGenericService* service); - - ////////////////////////////////////////////////////////////////////////////// - // Fine control knobs - - /// Set max receive message size in bytes. - /// The default is GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH. - ServerBuilder& SetMaxReceiveMessageSize(int max_receive_message_size) { - max_receive_message_size_ = max_receive_message_size; - return *this; - } - - /// Set max send message size in bytes. - /// The default is GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH. - ServerBuilder& SetMaxSendMessageSize(int max_send_message_size) { - max_send_message_size_ = max_send_message_size; - return *this; - } - - /// \deprecated For backward compatibility. - ServerBuilder& SetMaxMessageSize(int max_message_size) { - return SetMaxReceiveMessageSize(max_message_size); - } - - /// Set the support status for compression algorithms. All algorithms are - /// enabled by default. - /// - /// Incoming calls compressed with an unsupported algorithm will fail with - /// \a GRPC_STATUS_UNIMPLEMENTED. - ServerBuilder& SetCompressionAlgorithmSupportStatus( - grpc_compression_algorithm algorithm, bool enabled); - - /// The default compression level to use for all channel calls in the - /// absence of a call-specific level. - ServerBuilder& SetDefaultCompressionLevel(grpc_compression_level level); - - /// The default compression algorithm to use for all channel calls in the - /// absence of a call-specific level. Note that it overrides any compression - /// level set by \a SetDefaultCompressionLevel. - ServerBuilder& SetDefaultCompressionAlgorithm( - grpc_compression_algorithm algorithm); - - /// Set the attached buffer pool for this server - ServerBuilder& SetResourceQuota(const grpc::ResourceQuota& resource_quota); - - ServerBuilder& SetOption(std::unique_ptr option); - - /// Options for synchronous servers. - enum SyncServerOption { - NUM_CQS, ///< Number of completion queues. - MIN_POLLERS, ///< Minimum number of polling threads. - MAX_POLLERS, ///< Maximum number of polling threads. - CQ_TIMEOUT_MSEC ///< Completion queue timeout in milliseconds. - }; - - /// Only useful if this is a Synchronous server. - ServerBuilder& SetSyncServerOption(SyncServerOption option, int value); - - /// Add a channel argument (an escape hatch to tuning core library parameters - /// directly) - template - ServerBuilder& AddChannelArgument(const grpc::string& arg, const T& value) { - return SetOption(grpc::MakeChannelArgumentOption(arg, value)); - } - - /// For internal use only: Register a ServerBuilderPlugin factory function. - static void InternalAddPluginFactory( - std::unique_ptr (*CreatePlugin)()); - - /// Enable a server workaround. Do not use unless you know what the workaround - /// does. For explanation and detailed descriptions of workarounds, see - /// doc/workarounds.md. - ServerBuilder& EnableWorkaround(grpc_workaround_list id); - - /// NOTE: class experimental_type is not part of the public API of this class. - /// TODO(yashykt): Integrate into public API when this is no longer - /// experimental. - class experimental_type { - public: - explicit experimental_type(grpc_impl::ServerBuilder* builder) - : builder_(builder) {} - - void SetInterceptorCreators( - std::vector> - interceptor_creators) { - builder_->interceptor_creators_ = std::move(interceptor_creators); - } - -#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL - /// Register a generic service that uses the callback API. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterCallbackGenericService( - grpc::experimental::CallbackGenericService* service); -#endif - - enum class ExternalConnectionType { - FROM_FD = 0 // in the form of a file descriptor - }; - - /// Register an acceptor to handle the externally accepted connection in - /// grpc server. The returned acceptor can be used to pass the connection - /// to grpc server, where a channel will be created with the provided - /// server credentials. - std::unique_ptr - AddExternalConnectionAcceptor(ExternalConnectionType type, - std::shared_ptr creds); - - private: - ServerBuilder* builder_; - }; - -#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL - /// Register a generic service that uses the callback API. - /// Matches requests with any :authority - /// This is mostly useful for writing generic gRPC Proxies where the exact - /// serialization format is unknown - ServerBuilder& RegisterCallbackGenericService( - grpc::CallbackGenericService* service); -#endif - - /// NOTE: The function experimental() is not stable public API. It is a view - /// to the experimental components of this class. It may be changed or removed - /// at any time. - experimental_type experimental() { return experimental_type(this); } - - protected: - /// Experimental, to be deprecated - struct Port { - grpc::string addr; - std::shared_ptr creds; - int* selected_port; - }; - - /// Experimental, to be deprecated - typedef std::unique_ptr HostString; - struct NamedService { - explicit NamedService(grpc::Service* s) : service(s) {} - NamedService(const grpc::string& h, grpc::Service* s) - : host(new grpc::string(h)), service(s) {} - HostString host; - grpc::Service* service; - }; - - /// Experimental, to be deprecated - std::vector ports() { return ports_; } - - /// Experimental, to be deprecated - std::vector services() { - std::vector service_refs; - for (auto& ptr : services_) { - service_refs.push_back(ptr.get()); - } - return service_refs; - } - - /// Experimental, to be deprecated - std::vector options() { - std::vector option_refs; - for (auto& ptr : options_) { - option_refs.push_back(ptr.get()); - } - return option_refs; - } - - private: - friend class ::grpc::testing::ServerBuilderPluginTest; - - struct SyncServerSettings { - SyncServerSettings() - : num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} - - /// Number of server completion queues to create to listen to incoming RPCs. - int num_cqs; - - /// Minimum number of threads per completion queue that should be listening - /// to incoming RPCs. - int min_pollers; - - /// Maximum number of threads per completion queue that can be listening to - /// incoming RPCs. - int max_pollers; - - /// The timeout for server completion queue's AsyncNext call. - int cq_timeout_msec; - }; - - int max_receive_message_size_; - int max_send_message_size_; - std::vector> options_; - std::vector> services_; - std::vector ports_; - - SyncServerSettings sync_server_settings_; - - /// List of completion queues added via \a AddCompletionQueue method. - std::vector cqs_; - - std::shared_ptr creds_; - std::vector> plugins_; - grpc_resource_quota* resource_quota_; - grpc::AsyncGenericService* generic_service_{nullptr}; -#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL - grpc::CallbackGenericService* callback_generic_service_{nullptr}; -#else - grpc::experimental::CallbackGenericService* callback_generic_service_{ - nullptr}; -#endif - - struct { - bool is_set; - grpc_compression_level level; - } maybe_default_compression_level_; - struct { - bool is_set; - grpc_compression_algorithm algorithm; - } maybe_default_compression_algorithm_; - uint32_t enabled_compression_algorithms_bitset_; - std::vector< - std::unique_ptr> - interceptor_creators_; - std::vector> - acceptors_; -}; - -} // namespace grpc_impl - -#endif // GRPCPP_SERVER_BUILDER_IMPL_H diff --git a/include/grpcpp/server_impl.h b/include/grpcpp/server_impl.h index 5cbfee436de..887fa7b5f62 100644 --- a/include/grpcpp/server_impl.h +++ b/include/grpcpp/server_impl.h @@ -222,7 +222,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { } friend class grpc::AsyncGenericService; - friend class grpc_impl::ServerBuilder; + friend class grpc::ServerBuilder; friend class grpc_impl::ServerInitializer; class SyncRequest; diff --git a/src/cpp/server/external_connection_acceptor_impl.cc b/src/cpp/server/external_connection_acceptor_impl.cc index e03d3c6cc2c..f719e363019 100644 --- a/src/cpp/server/external_connection_acceptor_impl.cc +++ b/src/cpp/server/external_connection_acceptor_impl.cc @@ -20,7 +20,7 @@ #include -#include +#include #include namespace grpc { diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 0acb486149d..f42bace5fe9 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -32,15 +32,15 @@ #include "src/cpp/server/external_connection_acceptor_impl.h" #include "src/cpp/server/thread_pool_interface.h" -namespace grpc_impl { +namespace grpc { -static std::vector (*)()>* +static std::vector (*)()>* g_plugin_factory_list; static gpr_once once_init_plugin_list = GPR_ONCE_INIT; static void do_plugin_list_init(void) { g_plugin_factory_list = - new std::vector (*)()>(); + new std::vector (*)()>(); } ServerBuilder::ServerBuilder() @@ -68,29 +68,29 @@ ServerBuilder::~ServerBuilder() { } } -std::unique_ptr ServerBuilder::AddCompletionQueue( - bool is_frequently_polled) { - ServerCompletionQueue* cq = new ServerCompletionQueue( +std::unique_ptr +ServerBuilder::AddCompletionQueue(bool is_frequently_polled) { + grpc_impl::ServerCompletionQueue* cq = new grpc_impl::ServerCompletionQueue( GRPC_CQ_NEXT, is_frequently_polled ? GRPC_CQ_DEFAULT_POLLING : GRPC_CQ_NON_LISTENING, nullptr); cqs_.push_back(cq); - return std::unique_ptr(cq); + return std::unique_ptr(cq); } -ServerBuilder& ServerBuilder::RegisterService(grpc::Service* service) { +ServerBuilder& ServerBuilder::RegisterService(Service* service) { services_.emplace_back(new NamedService(service)); return *this; } ServerBuilder& ServerBuilder::RegisterService(const grpc::string& addr, - grpc::Service* service) { + Service* service) { services_.emplace_back(new NamedService(addr, service)); return *this; } ServerBuilder& ServerBuilder::RegisterAsyncGenericService( - grpc::AsyncGenericService* service) { + AsyncGenericService* service) { if (generic_service_ || callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -104,7 +104,7 @@ ServerBuilder& ServerBuilder::RegisterAsyncGenericService( #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL ServerBuilder& ServerBuilder::RegisterCallbackGenericService( - grpc::CallbackGenericService* service) { + CallbackGenericService* service) { if (generic_service_ || callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -117,7 +117,7 @@ ServerBuilder& ServerBuilder::RegisterCallbackGenericService( } #else ServerBuilder& ServerBuilder::experimental_type::RegisterCallbackGenericService( - grpc::experimental::CallbackGenericService* service) { + experimental::CallbackGenericService* service) { if (builder_->generic_service_ || builder_->callback_generic_service_) { gpr_log(GPR_ERROR, "Adding multiple generic services is unsupported for now. " @@ -144,7 +144,7 @@ ServerBuilder::experimental_type::AddExternalConnectionAcceptor( } ServerBuilder& ServerBuilder::SetOption( - std::unique_ptr option) { + std::unique_ptr option) { options_.push_back(std::move(option)); return *this; } @@ -203,8 +203,8 @@ ServerBuilder& ServerBuilder::SetResourceQuota( } ServerBuilder& ServerBuilder::AddListeningPort( - const grpc::string& addr_uri, - std::shared_ptr creds, int* selected_port) { + const grpc::string& addr_uri, std::shared_ptr creds, + int* selected_port) { const grpc::string uri_scheme = "dns:"; grpc::string addr = addr_uri; if (addr_uri.compare(0, uri_scheme.size(), uri_scheme) == 0) { @@ -218,7 +218,7 @@ ServerBuilder& ServerBuilder::AddListeningPort( } std::unique_ptr ServerBuilder::BuildAndStart() { - grpc::ChannelArguments args; + ChannelArguments args; for (const auto& option : options_) { option->UpdateArguments(&args); @@ -289,9 +289,11 @@ std::unique_ptr ServerBuilder::BuildAndStart() { // This is different from the completion queues added to the server via // ServerBuilder's AddCompletionQueue() method (those completion queues // are in 'cqs_' member variable of ServerBuilder object) - std::shared_ptr>> - sync_server_cqs(std::make_shared< - std::vector>>()); + std::shared_ptr< + std::vector>> + sync_server_cqs( + std::make_shared>>()); bool has_frequently_polled_cqs = false; for (const auto& cq : cqs_) { @@ -319,8 +321,8 @@ std::unique_ptr ServerBuilder::BuildAndStart() { // Create completion queues to listen to incoming rpc requests for (int i = 0; i < sync_server_settings_.num_cqs; i++) { - sync_server_cqs->emplace_back( - new ServerCompletionQueue(GRPC_CQ_NEXT, polling_type, nullptr)); + sync_server_cqs->emplace_back(new grpc_impl::ServerCompletionQueue( + GRPC_CQ_NEXT, polling_type, nullptr)); } } @@ -431,7 +433,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { } void ServerBuilder::InternalAddPluginFactory( - std::unique_ptr (*CreatePlugin)()) { + std::unique_ptr (*CreatePlugin)()) { gpr_once_init(&once_init_plugin_list, do_plugin_list_init); (*g_plugin_factory_list).push_back(CreatePlugin); } @@ -446,4 +448,4 @@ ServerBuilder& ServerBuilder::EnableWorkaround(grpc_workaround_list id) { } } -} // namespace grpc_impl +} // namespace grpc diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 71d25f587a6..f5868cc07c3 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -1033,7 +1033,6 @@ include/grpcpp/security/server_credentials_impl.h \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ -include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 48dcb673dcb..3d7e83d1c55 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1033,7 +1033,6 @@ include/grpcpp/security/server_credentials_impl.h \ include/grpcpp/security/tls_credentials_options.h \ include/grpcpp/server.h \ include/grpcpp/server_builder.h \ -include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ From 88a180a50522525135894661d607610a4fb965e9 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 24 Jun 2020 12:33:22 -0700 Subject: [PATCH 151/239] fix from sanitize.sh --- build_autogenerated.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 8f6fc380b4e..c052fa88224 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -2422,7 +2422,6 @@ libs: - include/grpcpp/security/tls_credentials_options.h - include/grpcpp/server.h - include/grpcpp/server_builder.h - - include/grpcpp/server_builder_impl.h - include/grpcpp/server_context.h - include/grpcpp/server_impl.h - include/grpcpp/server_posix.h @@ -2814,7 +2813,6 @@ libs: - include/grpcpp/security/tls_credentials_options.h - include/grpcpp/server.h - include/grpcpp/server_builder.h - - include/grpcpp/server_builder_impl.h - include/grpcpp/server_context.h - include/grpcpp/server_impl.h - include/grpcpp/server_posix.h From ecbbc03c3d9070651e34ebcf8c928fac0ddb8b03 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 24 Jun 2020 12:59:24 -0700 Subject: [PATCH 152/239] Move create_channel_posix from ::grpc_impl to ::grpc Revert https://github.com/grpc/grpc/pull/18373 --- BUILD | 1 - BUILD.gn | 1 - CMakeLists.txt | 2 - Makefile | 2 - build_autogenerated.yaml | 2 - include/grpcpp/create_channel_posix.h | 59 +++++++++++------- include/grpcpp/create_channel_posix_impl.h | 70 ---------------------- src/cpp/client/create_channel_posix.cc | 26 ++++---- tools/doxygen/Doxyfile.c++ | 1 - tools/doxygen/Doxyfile.c++.internal | 1 - 10 files changed, 51 insertions(+), 114 deletions(-) delete mode 100644 include/grpcpp/create_channel_posix_impl.h diff --git a/BUILD b/BUILD index 0d616078bd2..aeb5d42e372 100644 --- a/BUILD +++ b/BUILD @@ -227,7 +227,6 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/create_channel.h", "include/grpcpp/create_channel_impl.h", "include/grpcpp/create_channel_posix.h", - "include/grpcpp/create_channel_posix_impl.h", "include/grpcpp/ext/health_check_service_server_builder_option.h", "include/grpcpp/generic/async_generic_service.h", "include/grpcpp/generic/generic_stub.h", diff --git a/BUILD.gn b/BUILD.gn index cb133df9924..c56904d53ac 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1227,7 +1227,6 @@ config("grpc_config") { "include/grpcpp/create_channel.h", "include/grpcpp/create_channel_impl.h", "include/grpcpp/create_channel_posix.h", - "include/grpcpp/create_channel_posix_impl.h", "include/grpcpp/ext/health_check_service_server_builder_option.h", "include/grpcpp/generic/async_generic_service.h", "include/grpcpp/generic/generic_stub.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f19de24db9..3536c4a936c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2790,7 +2790,6 @@ foreach(_hdr include/grpcpp/create_channel.h include/grpcpp/create_channel_impl.h include/grpcpp/create_channel_posix.h - include/grpcpp/create_channel_posix_impl.h include/grpcpp/ext/health_check_service_server_builder_option.h include/grpcpp/generic/async_generic_service.h include/grpcpp/generic/generic_stub.h @@ -3483,7 +3482,6 @@ foreach(_hdr include/grpcpp/create_channel.h include/grpcpp/create_channel_impl.h include/grpcpp/create_channel_posix.h - include/grpcpp/create_channel_posix_impl.h include/grpcpp/ext/health_check_service_server_builder_option.h include/grpcpp/generic/async_generic_service.h include/grpcpp/generic/generic_stub.h diff --git a/Makefile b/Makefile index cf294e9b9ba..3450c9b34ff 100644 --- a/Makefile +++ b/Makefile @@ -4987,7 +4987,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/create_channel.h \ include/grpcpp/create_channel_impl.h \ include/grpcpp/create_channel_posix.h \ - include/grpcpp/create_channel_posix_impl.h \ include/grpcpp/ext/health_check_service_server_builder_option.h \ include/grpcpp/generic/async_generic_service.h \ include/grpcpp/generic/generic_stub.h \ @@ -5685,7 +5684,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/create_channel.h \ include/grpcpp/create_channel_impl.h \ include/grpcpp/create_channel_posix.h \ - include/grpcpp/create_channel_posix_impl.h \ include/grpcpp/ext/health_check_service_server_builder_option.h \ include/grpcpp/generic/async_generic_service.h \ include/grpcpp/generic/generic_stub.h \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 8f6fc380b4e..a801a404344 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -2331,7 +2331,6 @@ libs: - include/grpcpp/create_channel.h - include/grpcpp/create_channel_impl.h - include/grpcpp/create_channel_posix.h - - include/grpcpp/create_channel_posix_impl.h - include/grpcpp/ext/health_check_service_server_builder_option.h - include/grpcpp/generic/async_generic_service.h - include/grpcpp/generic/generic_stub.h @@ -2723,7 +2722,6 @@ libs: - include/grpcpp/create_channel.h - include/grpcpp/create_channel_impl.h - include/grpcpp/create_channel_posix.h - - include/grpcpp/create_channel_posix_impl.h - include/grpcpp/ext/health_check_service_server_builder_option.h - include/grpcpp/generic/async_generic_service.h - include/grpcpp/generic/generic_stub.h diff --git a/include/grpcpp/create_channel_posix.h b/include/grpcpp/create_channel_posix.h index b8a1f5e5c46..5c11120611a 100644 --- a/include/grpcpp/create_channel_posix.h +++ b/include/grpcpp/create_channel_posix.h @@ -1,6 +1,6 @@ /* * - * Copyright 2019 gRPC authors. + * Copyright 2016 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,42 +16,55 @@ * */ -#ifndef GRPCPP_CREATE_CHANNEL_POSIX_H -#define GRPCPP_CREATE_CHANNEL_POSIX_H +#ifndef GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H +#define GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H -#include +#include -namespace grpc { +#include +#include +#include + +namespace grpc_impl { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -static inline std::shared_ptr CreateInsecureChannelFromFd( - const grpc::string& target, int fd) { - return ::grpc_impl::CreateInsecureChannelFromFd(target, fd); -} +/// Create a new \a Channel communicating over the given file descriptor. +/// +/// \param target The name of the target. +/// \param fd The file descriptor representing a socket. +std::shared_ptr CreateInsecureChannelFromFd( + const grpc::string& target, int fd); -static inline std::shared_ptr CreateCustomInsecureChannelFromFd( - const grpc::string& target, int fd, const ChannelArguments& args) { - return ::grpc_impl::CreateCustomInsecureChannelFromFd(target, fd, args); -} +/// Create a new \a Channel communicating over given file descriptor with custom +/// channel arguments. +/// +/// \param target The name of the target. +/// \param fd The file descriptor representing a socket. +/// \param args Options for channel creation. +std::shared_ptr CreateCustomInsecureChannelFromFd( + const grpc::string& target, int fd, const grpc::ChannelArguments& args); namespace experimental { -static inline std::shared_ptr +/// Create a new \a Channel communicating over given file descriptor with custom +/// channel arguments. +/// +/// \param target The name of the target. +/// \param fd The file descriptor representing a socket. +/// \param args Options for channel creation. +/// \param interceptor_creators Vector of interceptor factory objects. +std::shared_ptr CreateCustomInsecureChannelWithInterceptorsFromFd( - const grpc::string& target, int fd, const ChannelArguments& args, + const grpc::string& target, int fd, const grpc::ChannelArguments& args, std::unique_ptr>> - interceptor_creators) { - return ::grpc_impl::experimental:: - CreateCustomInsecureChannelWithInterceptorsFromFd( - target, fd, args, std::move(interceptor_creators)); -} + std::unique_ptr>> + interceptor_creators); } // namespace experimental #endif // GPR_SUPPORT_CHANNELS_FROM_FD -} // namespace grpc +} // namespace grpc_impl -#endif // GRPCPP_CREATE_CHANNEL_POSIX_H +#endif // GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H diff --git a/include/grpcpp/create_channel_posix_impl.h b/include/grpcpp/create_channel_posix_impl.h deleted file mode 100644 index 5c11120611a..00000000000 --- a/include/grpcpp/create_channel_posix_impl.h +++ /dev/null @@ -1,70 +0,0 @@ -/* - * - * Copyright 2016 gRPC authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#ifndef GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H -#define GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H - -#include - -#include -#include -#include - -namespace grpc_impl { - -#ifdef GPR_SUPPORT_CHANNELS_FROM_FD - -/// Create a new \a Channel communicating over the given file descriptor. -/// -/// \param target The name of the target. -/// \param fd The file descriptor representing a socket. -std::shared_ptr CreateInsecureChannelFromFd( - const grpc::string& target, int fd); - -/// Create a new \a Channel communicating over given file descriptor with custom -/// channel arguments. -/// -/// \param target The name of the target. -/// \param fd The file descriptor representing a socket. -/// \param args Options for channel creation. -std::shared_ptr CreateCustomInsecureChannelFromFd( - const grpc::string& target, int fd, const grpc::ChannelArguments& args); - -namespace experimental { - -/// Create a new \a Channel communicating over given file descriptor with custom -/// channel arguments. -/// -/// \param target The name of the target. -/// \param fd The file descriptor representing a socket. -/// \param args Options for channel creation. -/// \param interceptor_creators Vector of interceptor factory objects. -std::shared_ptr -CreateCustomInsecureChannelWithInterceptorsFromFd( - const grpc::string& target, int fd, const grpc::ChannelArguments& args, - std::unique_ptr>> - interceptor_creators); - -} // namespace experimental - -#endif // GPR_SUPPORT_CHANNELS_FROM_FD - -} // namespace grpc_impl - -#endif // GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H diff --git a/src/cpp/client/create_channel_posix.cc b/src/cpp/client/create_channel_posix.cc index ca26c3f0a9f..d591837e1e7 100644 --- a/src/cpp/client/create_channel_posix.cc +++ b/src/cpp/client/create_channel_posix.cc @@ -27,37 +27,40 @@ namespace grpc_impl { class ChannelArguments; +} // namespace grpc_impl + +namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -std::shared_ptr CreateInsecureChannelFromFd( +std::shared_ptr CreateInsecureChannelFromFd( const grpc::string& target, int fd) { grpc::internal::GrpcLibrary init_lib; init_lib.init(); - return ::grpc::CreateChannelInternal( + return CreateChannelInternal( "", grpc_insecure_channel_create_from_fd(target.c_str(), fd, nullptr), std::vector>()); + experimental::ClientInterceptorFactoryInterface>>()); } -std::shared_ptr CreateCustomInsecureChannelFromFd( +std::shared_ptr CreateCustomInsecureChannelFromFd( const grpc::string& target, int fd, const grpc::ChannelArguments& args) { - grpc::internal::GrpcLibrary init_lib; + internal::GrpcLibrary init_lib; init_lib.init(); grpc_channel_args channel_args; args.SetChannelArgs(&channel_args); - return ::grpc::CreateChannelInternal( + return CreateChannelInternal( "", grpc_insecure_channel_create_from_fd(target.c_str(), fd, &channel_args), std::vector>()); + experimental::ClientInterceptorFactoryInterface>>()); } namespace experimental { -std::shared_ptr +std::shared_ptr CreateCustomInsecureChannelWithInterceptorsFromFd( - const grpc::string& target, int fd, const grpc::ChannelArguments& args, + const grpc::string& target, int fd, const ChannelArguments& args, std::vector< std::unique_ptr> interceptor_creators) { @@ -65,7 +68,7 @@ CreateCustomInsecureChannelWithInterceptorsFromFd( init_lib.init(); grpc_channel_args channel_args; args.SetChannelArgs(&channel_args); - return ::grpc::CreateChannelInternal( + return CreateChannelInternal( "", grpc_insecure_channel_create_from_fd(target.c_str(), fd, &channel_args), std::move(interceptor_creators)); @@ -75,4 +78,5 @@ CreateCustomInsecureChannelWithInterceptorsFromFd( #endif // GPR_SUPPORT_CHANNELS_FROM_FD -} // namespace grpc_impl + +} // namespace grpc diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 71d25f587a6..20f1453dedf 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -942,7 +942,6 @@ include/grpcpp/completion_queue_impl.h \ include/grpcpp/create_channel.h \ include/grpcpp/create_channel_impl.h \ include/grpcpp/create_channel_posix.h \ -include/grpcpp/create_channel_posix_impl.h \ include/grpcpp/ext/health_check_service_server_builder_option.h \ include/grpcpp/generic/async_generic_service.h \ include/grpcpp/generic/generic_stub.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 48dcb673dcb..d09488c7d04 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -942,7 +942,6 @@ include/grpcpp/completion_queue_impl.h \ include/grpcpp/create_channel.h \ include/grpcpp/create_channel_impl.h \ include/grpcpp/create_channel_posix.h \ -include/grpcpp/create_channel_posix_impl.h \ include/grpcpp/ext/health_check_service_server_builder_option.h \ include/grpcpp/generic/async_generic_service.h \ include/grpcpp/generic/generic_stub.h \ From 837c4ce589924640bbc395128ba07cbeffdd5b5c Mon Sep 17 00:00:00 2001 From: jiangtaoli2016 Date: Wed, 24 Jun 2020 10:54:58 -0700 Subject: [PATCH 153/239] Fix ALTS shutdown crash on envoy --- .../alts/handshaker/alts_handshaker_client.cc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc index 61927276195..067f46c46d6 100644 --- a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +++ b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc @@ -661,11 +661,18 @@ static void handshaker_client_destruct(alts_handshaker_client* c) { // TODO(apolcyn): we could remove this indirection and call // grpc_call_unref inline if there was an internal variant of // grpc_call_unref that didn't need to flush an ExecCtx. - grpc_core::ExecCtx::Run( - DEBUG_LOCATION, - GRPC_CLOSURE_CREATE(handshaker_call_unref, client->call, - grpc_schedule_on_exec_ctx), - GRPC_ERROR_NONE); + if (grpc_core::ExecCtx::Get() == nullptr) { + // Unref handshaker call if there is no exec_ctx, e.g., in the case of + // Envoy ALTS transport socket. + grpc_call_unref(client->call); + } else { + // Using existing exec_ctx to unref handshaker call. + grpc_core::ExecCtx::Run( + DEBUG_LOCATION, + GRPC_CLOSURE_CREATE(handshaker_call_unref, client->call, + grpc_schedule_on_exec_ctx), + GRPC_ERROR_NONE); + } } } From a94d8a1919f14103306451b6b3df16976d1ce5aa Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 24 Jun 2020 17:38:22 -0700 Subject: [PATCH 154/239] Make build and formatting fixes --- include/grpcpp/create_channel_posix.h | 10 +++++----- src/cpp/client/create_channel_posix.cc | 16 +++++++--------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/include/grpcpp/create_channel_posix.h b/include/grpcpp/create_channel_posix.h index 5c11120611a..36b8f6ab8ac 100644 --- a/include/grpcpp/create_channel_posix.h +++ b/include/grpcpp/create_channel_posix.h @@ -16,8 +16,8 @@ * */ -#ifndef GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H -#define GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H +#ifndef GRPCPP_CREATE_CHANNEL_POSIX_H +#define GRPCPP_CREATE_CHANNEL_POSIX_H #include @@ -25,7 +25,7 @@ #include #include -namespace grpc_impl { +namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD @@ -65,6 +65,6 @@ CreateCustomInsecureChannelWithInterceptorsFromFd( #endif // GPR_SUPPORT_CHANNELS_FROM_FD -} // namespace grpc_impl +} // namespace grpc -#endif // GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H +#endif // GRPCPP_CREATE_CHANNEL_POSIX_H diff --git a/src/cpp/client/create_channel_posix.cc b/src/cpp/client/create_channel_posix.cc index d591837e1e7..f4506fb8fc8 100644 --- a/src/cpp/client/create_channel_posix.cc +++ b/src/cpp/client/create_channel_posix.cc @@ -33,14 +33,14 @@ namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -std::shared_ptr CreateInsecureChannelFromFd( - const grpc::string& target, int fd) { +std::shared_ptr CreateInsecureChannelFromFd(const grpc::string& target, + int fd) { grpc::internal::GrpcLibrary init_lib; init_lib.init(); return CreateChannelInternal( "", grpc_insecure_channel_create_from_fd(target.c_str(), fd, nullptr), - std::vector>()); + std::vector< + std::unique_ptr>()); } std::shared_ptr CreateCustomInsecureChannelFromFd( @@ -52,14 +52,13 @@ std::shared_ptr CreateCustomInsecureChannelFromFd( return CreateChannelInternal( "", grpc_insecure_channel_create_from_fd(target.c_str(), fd, &channel_args), - std::vector>()); + std::vector< + std::unique_ptr>()); } namespace experimental { -std::shared_ptr -CreateCustomInsecureChannelWithInterceptorsFromFd( +std::shared_ptr CreateCustomInsecureChannelWithInterceptorsFromFd( const grpc::string& target, int fd, const ChannelArguments& args, std::vector< std::unique_ptr> @@ -78,5 +77,4 @@ CreateCustomInsecureChannelWithInterceptorsFromFd( #endif // GPR_SUPPORT_CHANNELS_FROM_FD - } // namespace grpc From 7af03152ab6d3578524889018d888725e1542302 Mon Sep 17 00:00:00 2001 From: yihuaz Date: Wed, 24 Jun 2020 18:29:03 -0700 Subject: [PATCH 155/239] handle the error in alts_tsi_handshaker_result_create --- src/core/tsi/alts/handshaker/alts_handshaker_client.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc index 28f65dd32fc..e2f04f7310d 100644 --- a/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +++ b/src/core/tsi/alts/handshaker/alts_handshaker_client.cc @@ -263,7 +263,13 @@ void alts_handshaker_client_handle_response(alts_handshaker_client* c, } tsi_handshaker_result* result = nullptr; if (is_handshake_finished_properly(resp)) { - alts_tsi_handshaker_result_create(resp, client->is_client, &result); + tsi_result status = + alts_tsi_handshaker_result_create(resp, client->is_client, &result); + if (status != TSI_OK) { + gpr_log(GPR_ERROR, "alts_tsi_handshaker_result_create() failed"); + handle_response_done(client, status, nullptr, 0, nullptr); + return; + } alts_tsi_handshaker_result_set_unused_bytes( result, &client->recv_bytes, grpc_gcp_HandshakerResp_bytes_consumed(resp)); From f25422a890a9f48e107576903fb8c0a5dace9890 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Wed, 24 Jun 2020 19:38:45 -0700 Subject: [PATCH 156/239] Add tests for unused bytes. --- src/core/tsi/ssl_transport_security.cc | 15 ++++++--------- test/core/tsi/ssl_transport_security_test.cc | 5 ++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 5ae1f75c19d..6854a8a663b 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1463,8 +1463,8 @@ static tsi_result ssl_bytes_remaining(tsi_ssl_handshaker* impl, return TSI_INVALID_ARGUMENT; } // Atempt to read all of the bytes in SSL's read BIO. These bytes should - // contain (encrypted) application data that was appended to a ClientFinished - // or ServerFinished record. + // contain application data records that were appended to a handshake record + // containing the ClientFinished or ServerFinished message. size_t bytes_in_ssl = BIO_pending(SSL_get_rbio(impl->ssl)); if (bytes_in_ssl == 0) return TSI_OK; *bytes_remaining = static_cast(gpr_malloc(bytes_in_ssl)); @@ -1523,13 +1523,10 @@ static tsi_result ssl_handshaker_next( if (ssl_handshaker_get_result(impl) == TSI_HANDSHAKE_IN_PROGRESS) { *handshaker_result = nullptr; } else { - // In TLS 1.3, the client may send application data records in the same - // flight of messages as the record containing the ClientFinished message. - // In TLS 1.2, this is not allowed; both the client and server must complete - // the handshake before any application data may be sent. - // - // These application data records are removed from the BIO after the - // server-side handshake completes, and set to |unused_bytes|. + // Any bytes that remain in |impl->ssl|'s read BIO after the handshake is + // complete must be extracted and set to the unused bytes of the handshaker + // result. This indicates to the gRPC stack that there are bytes from the + // peer that must be processed. unsigned char* unused_bytes = nullptr; size_t unused_bytes_size = 0; status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size); diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index b17e2d818c3..b06c836f295 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -436,7 +436,7 @@ static tsi_test_fixture* ssl_tsi_test_fixture_create() { ssl_tsi_test_fixture* ssl_fixture = static_cast(gpr_zalloc(sizeof(*ssl_fixture))); tsi_test_fixture_init(&ssl_fixture->base); - ssl_fixture->base.test_unused_bytes = false; + ssl_fixture->base.test_unused_bytes = true; ssl_fixture->base.vtable = &vtable; /* Create ssl_key_cert_lib. */ ssl_key_cert_lib* key_cert_lib = @@ -509,6 +509,9 @@ void ssl_tsi_test_do_handshake_tiny_handshake_buffer() { gpr_log(GPR_INFO, "ssl_tsi_test_do_handshake_tiny_handshake_buffer"); tsi_test_fixture* fixture = ssl_tsi_test_fixture_create(); fixture->handshake_buffer_size = TSI_TEST_TINY_HANDSHAKE_BUFFER_SIZE; + // Handshake buffer is too small to hold both handshake messages and the + // unused bytes. + fixture->test_unused_bytes = false; tsi_test_do_handshake(fixture); tsi_test_fixture_destroy(fixture); } From 4beb1eccf358e9a6294bdf6a0a1d2f51c14ad852 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Wed, 24 Jun 2020 21:40:34 -0700 Subject: [PATCH 157/239] Fix formatting and build files --- BUILD | 1 - BUILD.gn | 1 - CMakeLists.txt | 2 -- Makefile | 2 -- build_autogenerated.yaml | 2 -- gRPC-C++.podspec | 1 - tools/doxygen/Doxyfile.c++ | 1 - tools/doxygen/Doxyfile.c++.internal | 1 - 8 files changed, 11 deletions(-) diff --git a/BUILD b/BUILD index 0d616078bd2..e71cc3bcd6b 100644 --- a/BUILD +++ b/BUILD @@ -264,7 +264,6 @@ GRPCXX_PUBLIC_HDRS = [ "include/grpcpp/server_builder_impl.h", "include/grpcpp/server_context.h", "include/grpcpp/server_posix.h", - "include/grpcpp/server_posix_impl.h", "include/grpcpp/support/async_stream.h", "include/grpcpp/support/async_stream_impl.h", "include/grpcpp/support/async_unary_call.h", diff --git a/BUILD.gn b/BUILD.gn index cb133df9924..57e780447b1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1322,7 +1322,6 @@ config("grpc_config") { "include/grpcpp/server_context.h", "include/grpcpp/server_impl.h", "include/grpcpp/server_posix.h", - "include/grpcpp/server_posix_impl.h", "include/grpcpp/support/async_stream.h", "include/grpcpp/support/async_stream_impl.h", "include/grpcpp/support/async_unary_call.h", diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f19de24db9..5635b8685af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2885,7 +2885,6 @@ foreach(_hdr include/grpcpp/server_context.h include/grpcpp/server_impl.h include/grpcpp/server_posix.h - include/grpcpp/server_posix_impl.h include/grpcpp/support/async_stream.h include/grpcpp/support/async_stream_impl.h include/grpcpp/support/async_unary_call.h @@ -3578,7 +3577,6 @@ foreach(_hdr include/grpcpp/server_context.h include/grpcpp/server_impl.h include/grpcpp/server_posix.h - include/grpcpp/server_posix_impl.h include/grpcpp/support/async_stream.h include/grpcpp/support/async_stream_impl.h include/grpcpp/support/async_unary_call.h diff --git a/Makefile b/Makefile index cf294e9b9ba..617476400a4 100644 --- a/Makefile +++ b/Makefile @@ -5082,7 +5082,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ - include/grpcpp/server_posix_impl.h \ include/grpcpp/support/async_stream.h \ include/grpcpp/support/async_stream_impl.h \ include/grpcpp/support/async_unary_call.h \ @@ -5780,7 +5779,6 @@ PUBLIC_HEADERS_CXX += \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ - include/grpcpp/server_posix_impl.h \ include/grpcpp/support/async_stream.h \ include/grpcpp/support/async_stream_impl.h \ include/grpcpp/support/async_unary_call.h \ diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 8f6fc380b4e..cd69a5240cd 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -2426,7 +2426,6 @@ libs: - include/grpcpp/server_context.h - include/grpcpp/server_impl.h - include/grpcpp/server_posix.h - - include/grpcpp/server_posix_impl.h - include/grpcpp/support/async_stream.h - include/grpcpp/support/async_stream_impl.h - include/grpcpp/support/async_unary_call.h @@ -2818,7 +2817,6 @@ libs: - include/grpcpp/server_context.h - include/grpcpp/server_impl.h - include/grpcpp/server_posix.h - - include/grpcpp/server_posix_impl.h - include/grpcpp/support/async_stream.h - include/grpcpp/support/async_stream_impl.h - include/grpcpp/support/async_unary_call.h diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index f7316b70fcf..d3d95cb34bc 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -177,7 +177,6 @@ Pod::Spec.new do |s| 'include/grpcpp/server_context.h', 'include/grpcpp/server_impl.h', 'include/grpcpp/server_posix.h', - 'include/grpcpp/server_posix_impl.h', 'include/grpcpp/support/async_stream.h', 'include/grpcpp/support/async_stream_impl.h', 'include/grpcpp/support/async_unary_call.h', diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 71d25f587a6..d3ae80ff90d 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -1037,7 +1037,6 @@ include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ -include/grpcpp/server_posix_impl.h \ include/grpcpp/support/async_stream.h \ include/grpcpp/support/async_stream_impl.h \ include/grpcpp/support/async_unary_call.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 48dcb673dcb..30ecfaea1e4 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -1037,7 +1037,6 @@ include/grpcpp/server_builder_impl.h \ include/grpcpp/server_context.h \ include/grpcpp/server_impl.h \ include/grpcpp/server_posix.h \ -include/grpcpp/server_posix_impl.h \ include/grpcpp/support/async_stream.h \ include/grpcpp/support/async_stream_impl.h \ include/grpcpp/support/async_unary_call.h \ From c484ab2d939c21fc3c4c5a8b26d890345e8c8180 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 25 Jun 2020 10:24:31 -0700 Subject: [PATCH 158/239] Address Jiangtao's comments. --- .../ssl/ssl_security_connector.cc | 10 ++++++---- .../lib/security/security_connector/ssl_utils.cc | 12 ++++++++++++ .../lib/security/security_connector/ssl_utils.h | 3 +++ src/core/tsi/ssl_transport_security.cc | 16 ++++++++-------- src/core/tsi/ssl_transport_security.h | 16 ++++++++-------- src/core/tsi/transport_security_interface.h | 5 +++++ test/core/tsi/ssl_transport_security_test.cc | 8 ++++---- 7 files changed, 46 insertions(+), 24 deletions(-) diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc index 6dccda47d95..ef97c028109 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc @@ -107,8 +107,8 @@ class grpc_ssl_channel_security_connector final } options.cipher_suites = grpc_get_ssl_cipher_suites(); options.session_cache = ssl_session_cache; - options.min_tls_version = config->min_tls_version; - options.max_tls_version = config->max_tls_version; + options.min_tls_version = grpc_get_tsi_tls_version(config->min_tls_version); + options.max_tls_version = grpc_get_tsi_tls_version(config->max_tls_version); const tsi_result result = tsi_create_ssl_client_handshaker_factory_with_options( &options, &client_handshaker_factory_); @@ -253,8 +253,10 @@ class grpc_ssl_server_security_connector options.cipher_suites = grpc_get_ssl_cipher_suites(); options.alpn_protocols = alpn_protocol_strings; options.num_alpn_protocols = static_cast(num_alpn_protocols); - options.min_tls_version = server_credentials->config().min_tls_version; - options.max_tls_version = server_credentials->config().max_tls_version; + options.min_tls_version = grpc_get_tsi_tls_version( + server_credentials->config().min_tls_version); + options.max_tls_version = grpc_get_tsi_tls_version( + server_credentials->config().max_tls_version); const tsi_result result = tsi_create_ssl_server_handshaker_factory_with_options( &options, &server_handshaker_factory_); diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index f997006288a..dab4641b216 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -137,6 +137,18 @@ grpc_get_tsi_client_certificate_request_type( } } +tsi_tls_version grpc_get_tsi_tls_version(grpc_tls_version tls_version) { + switch (tls_version) { + case grpc_tls_version::TLS1_2: + return tsi_tls_version::TSI_TLS1_2; + case grpc_tls_version::TLS1_3: + return tsi_tls_version::TSI_TLS1_3; + default: + gpr_log(GPR_INFO, "Falling back to TLS 1.2."); + return tsi_tls_version::TSI_TLS1_2; + } +} + grpc_error* grpc_ssl_check_alpn(const tsi_peer* peer) { #if TSI_OPENSSL_ALPN_SUPPORT /* Check the ALPN if ALPN is supported. */ diff --git a/src/core/lib/security/security_connector/ssl_utils.h b/src/core/lib/security/security_connector/ssl_utils.h index b7522e8ab7c..258b4059d3a 100644 --- a/src/core/lib/security/security_connector/ssl_utils.h +++ b/src/core/lib/security/security_connector/ssl_utils.h @@ -73,6 +73,9 @@ grpc_get_tsi_client_certificate_request_type( grpc_security_level grpc_tsi_security_level_string_to_enum( const char* security_level); +/* Map grpc_tls_version to tsi_tls_version. */ +tsi_tls_version grpc_get_tsi_tls_version(grpc_tls_version tls_version); + /* Map grpc_security_level enum to a string. */ const char* grpc_security_level_to_string(grpc_security_level security_level); diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index 6854a8a663b..c72dda4dda5 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -892,8 +892,8 @@ static int NullVerifyCallback(int /*preverify_ok*/, X509_STORE_CTX* /*ctx*/) { // Sets the min and max TLS version of |ssl_context| to |min_tls_version| and // |max_tls_version|, respectively. static tsi_result tsi_set_min_and_max_tls_versions( - SSL_CTX* ssl_context, grpc_tls_version min_tls_version, - grpc_tls_version max_tls_version) { + SSL_CTX* ssl_context, tsi_tls_version min_tls_version, + tsi_tls_version max_tls_version) { if (ssl_context == nullptr) { gpr_log(GPR_INFO, "Invalid nullptr argument to |tsi_set_min_and_max_tls_versions|."); @@ -902,11 +902,11 @@ static tsi_result tsi_set_min_and_max_tls_versions( // Set the min TLS version of the SSL context. switch (min_tls_version) { #if OPENSSL_VERSION_NUMBER >= 0x10100000 - case grpc_tls_version::TLS1_2: + case tsi_tls_version::TSI_TLS1_2: SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION); break; #if defined(TLS1_3_VERSION) - case grpc_tls_version::TLS1_3: + case tsi_tls_version::TSI_TLS1_3: SSL_CTX_set_min_proto_version(ssl_context, TLS1_3_VERSION); break; #endif @@ -918,11 +918,11 @@ static tsi_result tsi_set_min_and_max_tls_versions( // Set the max TLS version of the SSL context. switch (max_tls_version) { #if OPENSSL_VERSION_NUMBER >= 0x10100000 - case grpc_tls_version::TLS1_2: + case tsi_tls_version::TSI_TLS1_2: SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION); break; #if defined(TLS1_3_VERSION) - case grpc_tls_version::TLS1_3: + case tsi_tls_version::TSI_TLS1_3: SSL_CTX_set_max_proto_version(ssl_context, TLS1_3_VERSION); break; #endif @@ -1473,7 +1473,7 @@ static tsi_result ssl_bytes_remaining(tsi_ssl_handshaker* impl, // If an unexpected number of bytes were read, return an error status and free // all of the bytes that were read. if (bytes_read < 0 || static_cast(bytes_read) != bytes_in_ssl) { - gpr_log(GPR_INFO, + gpr_log(GPR_ERROR, "Failed to read the expected number of bytes from SSL object."); gpr_free(*bytes_remaining); *bytes_remaining = nullptr; @@ -1532,7 +1532,7 @@ static tsi_result ssl_handshaker_next( status = ssl_bytes_remaining(impl, &unused_bytes, &unused_bytes_size); if (status != TSI_OK) return status; if (unused_bytes_size > received_bytes_size) { - gpr_log(GPR_INFO, "More unused bytes than received bytes."); + gpr_log(GPR_ERROR, "More unused bytes than received bytes."); gpr_free(unused_bytes); return TSI_INTERNAL_ERROR; } diff --git a/src/core/tsi/ssl_transport_security.h b/src/core/tsi/ssl_transport_security.h index e49e2731d12..8476c83f8b0 100644 --- a/src/core/tsi/ssl_transport_security.h +++ b/src/core/tsi/ssl_transport_security.h @@ -154,8 +154,8 @@ struct tsi_ssl_client_handshaker_options { bool skip_server_certificate_verification; /* The min and max TLS versions that will be negotiated by the handshaker. */ - grpc_tls_version min_tls_version; - grpc_tls_version max_tls_version; + tsi_tls_version min_tls_version; + tsi_tls_version max_tls_version; tsi_ssl_client_handshaker_options() : pem_key_cert_pair(nullptr), @@ -166,8 +166,8 @@ struct tsi_ssl_client_handshaker_options { num_alpn_protocols(0), session_cache(nullptr), skip_server_certificate_verification(false), - min_tls_version(grpc_tls_version::TLS1_2), - max_tls_version(grpc_tls_version::TLS1_3) {} + min_tls_version(tsi_tls_version::TSI_TLS1_2), + max_tls_version(tsi_tls_version::TSI_TLS1_3) {} }; /* Creates a client handshaker factory. @@ -284,8 +284,8 @@ struct tsi_ssl_server_handshaker_options { /* session_ticket_key_size is a size of session ticket encryption key. */ size_t session_ticket_key_size; /* The min and max TLS versions that will be negotiated by the handshaker. */ - grpc_tls_version min_tls_version; - grpc_tls_version max_tls_version; + tsi_tls_version min_tls_version; + tsi_tls_version max_tls_version; tsi_ssl_server_handshaker_options() : pem_key_cert_pairs(nullptr), @@ -297,8 +297,8 @@ struct tsi_ssl_server_handshaker_options { num_alpn_protocols(0), session_ticket_key(nullptr), session_ticket_key_size(0), - min_tls_version(grpc_tls_version::TLS1_2), - max_tls_version(grpc_tls_version::TLS1_3) {} + min_tls_version(tsi_tls_version::TSI_TLS1_2), + max_tls_version(tsi_tls_version::TSI_TLS1_3) {} }; /* Creates a server handshaker factory. diff --git a/src/core/tsi/transport_security_interface.h b/src/core/tsi/transport_security_interface.h index 6e93870bf04..4608f400914 100644 --- a/src/core/tsi/transport_security_interface.h +++ b/src/core/tsi/transport_security_interface.h @@ -64,6 +64,11 @@ typedef enum { TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY, } tsi_client_certificate_request_type; +typedef enum { + TSI_TLS1_2, + TSI_TLS1_3, +} tsi_tls_version; + const char* tsi_result_to_string(tsi_result result); const char* tsi_security_level_to_string(tsi_security_level security_level); diff --git a/test/core/tsi/ssl_transport_security_test.cc b/test/core/tsi/ssl_transport_security_test.cc index b06c836f295..586200358ec 100644 --- a/test/core/tsi/ssl_transport_security_test.cc +++ b/test/core/tsi/ssl_transport_security_test.cc @@ -56,7 +56,7 @@ const size_t kSessionTicketEncryptionKeySize = 48; #endif // Indicates the TLS version used for the test. -static grpc_tls_version test_tls_version = grpc_tls_version::TLS1_3; +static tsi_tls_version test_tls_version = tsi_tls_version::TSI_TLS1_3; typedef enum AlpnMode { NO_ALPN, @@ -332,7 +332,7 @@ static void ssl_test_check_handshaker_peers(tsi_test_fixture* fixture) { bool expect_server_success = !(key_cert_lib->use_bad_server_cert || (key_cert_lib->use_bad_client_cert && ssl_fixture->force_client_auth)); - bool expect_client_success = test_tls_version == grpc_tls_version::TLS1_2 + bool expect_client_success = test_tls_version == tsi_tls_version::TSI_TLS1_2 ? expect_server_success : !key_cert_lib->use_bad_server_cert; if (expect_client_success) { @@ -970,8 +970,8 @@ int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); grpc_init(); const size_t number_tls_versions = 2; - const grpc_tls_version tls_versions[] = {grpc_tls_version::TLS1_2, - grpc_tls_version::TLS1_3}; + const tsi_tls_version tls_versions[] = {tsi_tls_version::TSI_TLS1_2, + tsi_tls_version::TSI_TLS1_3}; for (size_t i = 0; i < number_tls_versions; i++) { // Set the TLS version to be used in the tests. test_tls_version = tls_versions[i]; From 34b210b44acac90dac88f4dc381d20f9aca8c07f Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Thu, 25 Jun 2020 16:29:10 -0700 Subject: [PATCH 159/239] Use the wrapper version of bazel in the script --- src/abseil-cpp/preprocessed_builds.yaml.gen.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/abseil-cpp/preprocessed_builds.yaml.gen.py b/src/abseil-cpp/preprocessed_builds.yaml.gen.py index 82bb15ef395..6e765e6f610 100755 --- a/src/abseil-cpp/preprocessed_builds.yaml.gen.py +++ b/src/abseil-cpp/preprocessed_builds.yaml.gen.py @@ -69,8 +69,11 @@ def parse_bazel_rule(elem, package): def read_bazel_build(package): """Runs bazel query on given package file and returns all cc rules.""" + # Use a wrapper version of bazel in gRPC not to use system-wide bazel + # to avoid bazel conflict when running on Kokoro. + BAZEL_BIN = "../../tools/bazel" result = subprocess.check_output( - ["bazel", "query", package + ":all", "--output", "xml"]) + [BAZEL_BIN, "query", package + ":all", "--output", "xml"]) root = ET.fromstring(result) return [ parse_bazel_rule(elem, package) From 4a9f38257eb4eaeeb589a6e448b293a0065518ca Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Thu, 25 Jun 2020 17:03:45 -0700 Subject: [PATCH 160/239] Remove use of TLSv1_2_method. --- src/core/tsi/ssl_transport_security.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index c72dda4dda5..a16752e99de 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -890,7 +890,8 @@ static int NullVerifyCallback(int /*preverify_ok*/, X509_STORE_CTX* /*ctx*/) { } // Sets the min and max TLS version of |ssl_context| to |min_tls_version| and -// |max_tls_version|, respectively. +// |max_tls_version|, respectively. Calling this method is a no-op when using +// OpenSSL versions < 1.1. static tsi_result tsi_set_min_and_max_tls_versions( SSL_CTX* ssl_context, tsi_tls_version min_tls_version, tsi_tls_version max_tls_version) { @@ -899,9 +900,9 @@ static tsi_result tsi_set_min_and_max_tls_versions( "Invalid nullptr argument to |tsi_set_min_and_max_tls_versions|."); return TSI_INVALID_ARGUMENT; } +#if OPENSSL_VERSION_NUMBER >= 0x10100000 // Set the min TLS version of the SSL context. switch (min_tls_version) { -#if OPENSSL_VERSION_NUMBER >= 0x10100000 case tsi_tls_version::TSI_TLS1_2: SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION); break; @@ -909,7 +910,6 @@ static tsi_result tsi_set_min_and_max_tls_versions( case tsi_tls_version::TSI_TLS1_3: SSL_CTX_set_min_proto_version(ssl_context, TLS1_3_VERSION); break; -#endif #endif default: gpr_log(GPR_INFO, "TLS version is not supported."); @@ -917,7 +917,6 @@ static tsi_result tsi_set_min_and_max_tls_versions( } // Set the max TLS version of the SSL context. switch (max_tls_version) { -#if OPENSSL_VERSION_NUMBER >= 0x10100000 case tsi_tls_version::TSI_TLS1_2: SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION); break; @@ -925,12 +924,12 @@ static tsi_result tsi_set_min_and_max_tls_versions( case tsi_tls_version::TSI_TLS1_3: SSL_CTX_set_max_proto_version(ssl_context, TLS1_3_VERSION); break; -#endif #endif default: gpr_log(GPR_INFO, "TLS version is not supported."); return TSI_FAILED_PRECONDITION; } +#endif return TSI_OK; } @@ -1888,14 +1887,10 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options( return TSI_INVALID_ARGUMENT; } -#if OPENSSL_VERSION_NUMBER >= 0x10100000 ssl_context = SSL_CTX_new(TLS_method()); result = tsi_set_min_and_max_tls_versions( ssl_context, options->min_tls_version, options->max_tls_version); if (result != TSI_OK) return result; -#else - ssl_context = SSL_CTX_new(TLSv1_2_method()); -#endif if (ssl_context == nullptr) { gpr_log(GPR_ERROR, "Could not create ssl context."); return TSI_INVALID_ARGUMENT; @@ -2055,15 +2050,11 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options( for (i = 0; i < options->num_key_cert_pairs; i++) { do { -#if OPENSSL_VERSION_NUMBER >= 0x10100000 impl->ssl_contexts[i] = SSL_CTX_new(TLS_method()); result = tsi_set_min_and_max_tls_versions(impl->ssl_contexts[i], options->min_tls_version, options->max_tls_version); if (result != TSI_OK) return result; -#else - impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method()); -#endif if (impl->ssl_contexts[i] == nullptr) { gpr_log(GPR_ERROR, "Could not create ssl context."); result = TSI_OUT_OF_RESOURCES; From 93d947b364184c2c363516668c9f972651a10cd2 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Thu, 25 Jun 2020 19:52:47 -0700 Subject: [PATCH 161/239] Removed sort_keys=True in yaml.gen.py --- src/abseil-cpp/preprocessed_builds.yaml.gen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abseil-cpp/preprocessed_builds.yaml.gen.py b/src/abseil-cpp/preprocessed_builds.yaml.gen.py index 6e765e6f610..599cc98de7f 100755 --- a/src/abseil-cpp/preprocessed_builds.yaml.gen.py +++ b/src/abseil-cpp/preprocessed_builds.yaml.gen.py @@ -206,7 +206,7 @@ def main(): builds = generate_builds("absl") os.chdir(previous_dir) with open(OUTPUT_PATH, 'w') as outfile: - outfile.write(yaml.dump(builds, indent=2, sort_keys=True)) + outfile.write(yaml.dump(builds, indent=2)) if __name__ == "__main__": From c33c67edf63197436da888b95672f001e2e78425 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Thu, 25 Jun 2020 20:35:00 -0700 Subject: [PATCH 162/239] Add Python 3.9 support --- .../grpc_artifact_python_manylinux2010_x64/Dockerfile | 2 ++ .../grpc_artifact_python_manylinux2010_x86/Dockerfile | 2 ++ .../grpc_artifact_python_manylinux2014_x64/Dockerfile | 2 ++ .../grpc_artifact_python_manylinux2014_x86/Dockerfile | 2 ++ 4 files changed, 8 insertions(+) diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2010_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2010_x64/Dockerfile index 390ab453136..287ed1c2725 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2010_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2010_x64/Dockerfile @@ -13,6 +13,7 @@ # limitations under the License. # Docker file for building gRPC manylinux Python artifacts. +# Updated: 2020-06-25 FROM quay.io/pypa/manylinux2010_x86_64 @@ -28,3 +29,4 @@ RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython RUN /opt/python/cp36-cp36m/bin/pip install --upgrade cython RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython +RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2010_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2010_x86/Dockerfile index 6e5e43315e7..240165a0e42 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2010_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2010_x86/Dockerfile @@ -13,6 +13,7 @@ # limitations under the License. # Docker file for building gRPC manylinux Python artifacts. +# Updated: 2020-06-25 FROM quay.io/pypa/manylinux2010_i686 @@ -28,3 +29,4 @@ RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython RUN /opt/python/cp36-cp36m/bin/pip install --upgrade cython RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython +RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile index 5e8fed0a0f2..ef90555174d 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x64/Dockerfile @@ -13,6 +13,7 @@ # limitations under the License. # Docker file for building gRPC manylinux Python artifacts. +# Updated: 2020-06-25 FROM quay.io/pypa/manylinux2014_x86_64 @@ -26,3 +27,4 @@ RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython RUN /opt/python/cp36-cp36m/bin/pip install --upgrade cython RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython +RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython diff --git a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile index 6695f642f74..ff23414ae4e 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux2014_x86/Dockerfile @@ -13,6 +13,7 @@ # limitations under the License. # Docker file for building gRPC manylinux Python artifacts. +# Updated: 2020-06-25 FROM quay.io/pypa/manylinux2014_i686 @@ -26,3 +27,4 @@ RUN /opt/python/cp35-cp35m/bin/pip install --upgrade cython RUN /opt/python/cp36-cp36m/bin/pip install --upgrade cython RUN /opt/python/cp37-cp37m/bin/pip install --upgrade cython RUN /opt/python/cp38-cp38/bin/pip install --upgrade cython +RUN /opt/python/cp39-cp39/bin/pip install --upgrade cython From e5098227aa202f5bac80369bc48baf1cffd2f04c Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 26 Jun 2020 00:03:49 -0700 Subject: [PATCH 163/239] Main Makefile should require protobuf 3.12+ now --- Makefile | 362 ++++++++++++++++++------------------ templates/Makefile.template | 10 +- 2 files changed, 186 insertions(+), 186 deletions(-) diff --git a/Makefile b/Makefile index cf294e9b9ba..f606c616c7c 100644 --- a/Makefile +++ b/Makefile @@ -551,7 +551,7 @@ endif ifeq ($(HAS_PKG_CONFIG),true) OPENSSL_ALPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.2 openssl ZLIB_CHECK_CMD = $(PKG_CONFIG) --exists zlib -PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.5.0 protobuf +PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.12.0 protobuf CARES_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.11.0 libcares else # HAS_PKG_CONFIG @@ -968,7 +968,7 @@ protobuf_dep_message: @echo @echo "DEPENDENCY ERROR" @echo - @echo "The target you are trying to run requires protobuf 3.5.0+" + @echo "The target you are trying to run requires protobuf 3.12.0+" @echo "Your system doesn't have it, and neither does the third_party directory." @echo @echo "Please consult INSTALL to get more information." @@ -982,7 +982,7 @@ protoc_dep_message: @echo @echo "DEPENDENCY ERROR" @echo - @echo "The target you are trying to run requires protobuf-compiler 3.5.0+" + @echo "The target you are trying to run requires protobuf-compiler 3.12.0+" @echo "Your system doesn't have it, and neither does the third_party directory." @echo @echo "Please consult INSTALL to get more information." @@ -6675,7 +6675,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/gen_hpack_tables: protobuf_dep_error @@ -6718,7 +6718,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters: protobuf_dep_error @@ -6761,7 +6761,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/gen_percent_encoding_tables: protobuf_dep_error @@ -11350,7 +11350,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/address_sorting_test: protobuf_dep_error @@ -11396,7 +11396,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/address_sorting_test_unsecure: protobuf_dep_error @@ -11445,7 +11445,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/alarm_test: protobuf_dep_error @@ -11492,7 +11492,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/alts_concurrent_connectivity_test: protobuf_dep_error @@ -11547,7 +11547,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer: protobuf_dep_error @@ -11592,7 +11592,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/alts_util_test: protobuf_dep_error @@ -11640,7 +11640,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/async_end2end_test: protobuf_dep_error @@ -11694,7 +11694,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/auth_property_iterator_test: protobuf_dep_error @@ -11737,7 +11737,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/backoff_test: protobuf_dep_error @@ -11782,7 +11782,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bad_streaming_id_bad_client_test: protobuf_dep_error @@ -11831,7 +11831,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/badreq_bad_client_test: protobuf_dep_error @@ -11878,7 +11878,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bdp_estimator_test: protobuf_dep_error @@ -11921,7 +11921,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_alarm: protobuf_dep_error @@ -11965,7 +11965,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_arena: protobuf_dep_error @@ -12009,7 +12009,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_byte_buffer: protobuf_dep_error @@ -12053,7 +12053,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_call_create: protobuf_dep_error @@ -12101,7 +12101,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_callback_streaming_ping_pong: protobuf_dep_error @@ -12157,7 +12157,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_callback_unary_ping_pong: protobuf_dep_error @@ -12209,7 +12209,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_channel: protobuf_dep_error @@ -12253,7 +12253,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_chttp2_hpack: protobuf_dep_error @@ -12297,7 +12297,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_chttp2_transport: protobuf_dep_error @@ -12341,7 +12341,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_closure: protobuf_dep_error @@ -12385,7 +12385,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_cq: protobuf_dep_error @@ -12429,7 +12429,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_cq_multiple_threads: protobuf_dep_error @@ -12473,7 +12473,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_error: protobuf_dep_error @@ -12517,7 +12517,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_ping_pong: protobuf_dep_error @@ -12561,7 +12561,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_fullstack_streaming_pump: protobuf_dep_error @@ -12605,7 +12605,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_fullstack_trickle: protobuf_dep_error @@ -12649,7 +12649,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_fullstack_unary_ping_pong: protobuf_dep_error @@ -12693,7 +12693,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_metadata: protobuf_dep_error @@ -12737,7 +12737,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_pollset: protobuf_dep_error @@ -12781,7 +12781,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_threadpool: protobuf_dep_error @@ -12825,7 +12825,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/bm_timer: protobuf_dep_error @@ -12869,7 +12869,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/byte_buffer_test: protobuf_dep_error @@ -12912,7 +12912,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/byte_stream_test: protobuf_dep_error @@ -12957,7 +12957,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/cancel_ares_query_test: protobuf_dep_error @@ -13008,7 +13008,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/cfstream_test: protobuf_dep_error @@ -13061,7 +13061,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/channel_arguments_test: protobuf_dep_error @@ -13104,7 +13104,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/channel_filter_test: protobuf_dep_error @@ -13149,7 +13149,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/channel_trace_test: protobuf_dep_error @@ -13198,7 +13198,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/channelz_registry_test: protobuf_dep_error @@ -13245,7 +13245,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/channelz_service_test: protobuf_dep_error @@ -13300,7 +13300,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/channelz_test: protobuf_dep_error @@ -13359,7 +13359,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/cli_call_test: protobuf_dep_error @@ -13434,7 +13434,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/client_callback_end2end_test: protobuf_dep_error @@ -13496,7 +13496,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/client_channel_stress_test: protobuf_dep_error @@ -13554,7 +13554,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/client_fuzzer: protobuf_dep_error @@ -13604,7 +13604,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/client_interceptors_end2end_test: protobuf_dep_error @@ -13667,7 +13667,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/client_lb_end2end_test: protobuf_dep_error @@ -13727,7 +13727,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/codegen_test_full: protobuf_dep_error @@ -13770,7 +13770,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/codegen_test_minimal: protobuf_dep_error @@ -13815,7 +13815,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test: protobuf_dep_error @@ -13862,7 +13862,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/connectivity_state_test: protobuf_dep_error @@ -13905,7 +13905,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/context_list_test: protobuf_dep_error @@ -13952,7 +13952,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/delegating_channel_test: protobuf_dep_error @@ -14005,7 +14005,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/destroy_grpclb_channel_with_active_connect_stress_test: protobuf_dep_error @@ -14050,7 +14050,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/duplicate_header_bad_client_test: protobuf_dep_error @@ -14103,7 +14103,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/end2end_test: protobuf_dep_error @@ -14162,7 +14162,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/error_details_test: protobuf_dep_error @@ -14208,7 +14208,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/eventmanager_libuv_test: protobuf_dep_error @@ -14254,7 +14254,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/exception_test: protobuf_dep_error @@ -14308,7 +14308,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/filter_end2end_test: protobuf_dep_error @@ -14364,7 +14364,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/flaky_network_test: protobuf_dep_error @@ -14421,7 +14421,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/generic_end2end_test: protobuf_dep_error @@ -14473,7 +14473,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/global_config_env_test: protobuf_dep_error @@ -14516,7 +14516,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/global_config_test: protobuf_dep_error @@ -14566,7 +14566,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_cli: protobuf_dep_error @@ -14622,7 +14622,7 @@ GRPC_CPP_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basen ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_cpp_plugin: protobuf_dep_error @@ -14653,7 +14653,7 @@ GRPC_CSHARP_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(ba ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_csharp_plugin: protobuf_dep_error @@ -14684,7 +14684,7 @@ GRPC_NODE_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(base ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_node_plugin: protobuf_dep_error @@ -14715,7 +14715,7 @@ GRPC_OBJECTIVE_C_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin: protobuf_dep_error @@ -14746,7 +14746,7 @@ GRPC_PHP_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basen ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_php_plugin: protobuf_dep_error @@ -14777,7 +14777,7 @@ GRPC_PYTHON_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(ba ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_python_plugin: protobuf_dep_error @@ -14808,7 +14808,7 @@ GRPC_RUBY_PLUGIN_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(base ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_ruby_plugin: protobuf_dep_error @@ -14847,7 +14847,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_tls_credentials_options_test: protobuf_dep_error @@ -14899,7 +14899,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpc_tool_test: protobuf_dep_error @@ -14968,7 +14968,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpclb_api_test: protobuf_dep_error @@ -15020,7 +15020,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/grpclb_end2end_test: protobuf_dep_error @@ -15077,7 +15077,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/h2_ssl_session_reuse_test: protobuf_dep_error @@ -15122,7 +15122,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/head_of_line_blocking_bad_client_test: protobuf_dep_error @@ -15171,7 +15171,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/headers_bad_client_test: protobuf_dep_error @@ -15225,7 +15225,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/health_service_end2end_test: protobuf_dep_error @@ -15286,7 +15286,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test: protobuf_dep_error @@ -15334,7 +15334,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/http2_client: protobuf_dep_error @@ -15385,7 +15385,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/http_request_fuzzer_test: protobuf_dep_error @@ -15431,7 +15431,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/http_response_fuzzer_test: protobuf_dep_error @@ -15481,7 +15481,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/hybrid_end2end_test: protobuf_dep_error @@ -15538,7 +15538,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test: protobuf_dep_error @@ -15591,7 +15591,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/interop_client: protobuf_dep_error @@ -15655,7 +15655,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/interop_server: protobuf_dep_error @@ -15711,7 +15711,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/interop_test: protobuf_dep_error @@ -15755,7 +15755,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/json_fuzzer_test: protobuf_dep_error @@ -15800,7 +15800,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/json_test: protobuf_dep_error @@ -15845,7 +15845,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/large_metadata_bad_client_test: protobuf_dep_error @@ -15896,7 +15896,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/lb_get_cpu_stats_test: protobuf_dep_error @@ -15948,7 +15948,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/lb_load_data_store_test: protobuf_dep_error @@ -15993,7 +15993,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/linux_system_roots_test: protobuf_dep_error @@ -16040,7 +16040,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/message_allocator_end2end_test: protobuf_dep_error @@ -16097,7 +16097,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/mock_test: protobuf_dep_error @@ -16150,7 +16150,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test: protobuf_dep_error @@ -16196,7 +16196,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test: protobuf_dep_error @@ -16244,7 +16244,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/nonblocking_test: protobuf_dep_error @@ -16294,7 +16294,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/noop-benchmark: protobuf_dep_error @@ -16338,7 +16338,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/orphanable_test: protobuf_dep_error @@ -16383,7 +16383,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/out_of_bounds_bad_client_test: protobuf_dep_error @@ -16431,7 +16431,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/percent_decode_fuzzer: protobuf_dep_error @@ -16477,7 +16477,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/percent_encode_fuzzer: protobuf_dep_error @@ -16522,7 +16522,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/pid_controller_test: protobuf_dep_error @@ -16569,7 +16569,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/port_sharing_end2end_test: protobuf_dep_error @@ -16628,7 +16628,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/proto_server_reflection_test: protobuf_dep_error @@ -16686,7 +16686,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/proto_utils_test: protobuf_dep_error @@ -16751,7 +16751,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/qps_json_driver: protobuf_dep_error @@ -16870,7 +16870,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/qps_worker: protobuf_dep_error @@ -16963,7 +16963,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/raw_end2end_test: protobuf_dep_error @@ -17018,7 +17018,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/ref_counted_ptr_test: protobuf_dep_error @@ -17061,7 +17061,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/ref_counted_test: protobuf_dep_error @@ -17104,7 +17104,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/retry_throttle_test: protobuf_dep_error @@ -17147,7 +17147,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/secure_auth_context_test: protobuf_dep_error @@ -17195,7 +17195,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_builder_plugin_test: protobuf_dep_error @@ -17253,7 +17253,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_builder_test: protobuf_dep_error @@ -17306,7 +17306,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_builder_with_socket_mutator_test: protobuf_dep_error @@ -17356,7 +17356,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_chttp2_test: protobuf_dep_error @@ -17399,7 +17399,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_context_test_spouse_test: protobuf_dep_error @@ -17445,7 +17445,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_early_return_test: protobuf_dep_error @@ -17496,7 +17496,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_fuzzer: protobuf_dep_error @@ -17546,7 +17546,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_interceptors_end2end_test: protobuf_dep_error @@ -17604,7 +17604,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_registered_method_bad_client_test: protobuf_dep_error @@ -17654,7 +17654,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_request_call_test: protobuf_dep_error @@ -17709,7 +17709,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/service_config_end2end_test: protobuf_dep_error @@ -17764,7 +17764,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/service_config_test: protobuf_dep_error @@ -17807,7 +17807,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/settings_timeout_test: protobuf_dep_error @@ -17854,7 +17854,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/shutdown_test: protobuf_dep_error @@ -17908,7 +17908,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/simple_request_bad_client_test: protobuf_dep_error @@ -17955,7 +17955,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/slice_hash_table_test: protobuf_dep_error @@ -17998,7 +17998,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/slice_weak_hash_table_test: protobuf_dep_error @@ -18042,7 +18042,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/ssl_server_fuzzer: protobuf_dep_error @@ -18087,7 +18087,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/static_metadata_test: protobuf_dep_error @@ -18130,7 +18130,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/stats_test: protobuf_dep_error @@ -18173,7 +18173,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/status_metadata_test: protobuf_dep_error @@ -18216,7 +18216,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/status_util_test: protobuf_dep_error @@ -18263,7 +18263,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/streaming_throughput_test: protobuf_dep_error @@ -18315,7 +18315,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/string_ref_test: protobuf_dep_error @@ -18358,7 +18358,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/test_cpp_client_credentials_test: protobuf_dep_error @@ -18401,7 +18401,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/test_cpp_util_slice_test: protobuf_dep_error @@ -18444,7 +18444,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/test_cpp_util_time_test: protobuf_dep_error @@ -18487,7 +18487,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/thread_manager_test: protobuf_dep_error @@ -18534,7 +18534,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/thread_stress_test: protobuf_dep_error @@ -18586,7 +18586,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/time_jump_test: protobuf_dep_error @@ -18629,7 +18629,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/timer_test: protobuf_dep_error @@ -18672,7 +18672,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/tls_security_connector_test: protobuf_dep_error @@ -18716,7 +18716,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/too_many_pings_test: protobuf_dep_error @@ -18763,7 +18763,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/unknown_frame_bad_client_test: protobuf_dep_error @@ -18811,7 +18811,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/uri_fuzzer_test: protobuf_dep_error @@ -18858,7 +18858,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/window_overflow_bad_client_test: protobuf_dep_error @@ -18905,7 +18905,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/work_serializer_test: protobuf_dep_error @@ -18971,7 +18971,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/writes_per_rpc_test: protobuf_dep_error @@ -19081,7 +19081,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/xds_bootstrap_test: protobuf_dep_error @@ -19134,7 +19134,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/xds_end2end_test: protobuf_dep_error @@ -19202,7 +19202,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/xds_interop_client: protobuf_dep_error @@ -19255,7 +19255,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/xds_interop_server: protobuf_dep_error @@ -19307,7 +19307,7 @@ $(BORINGSSL_SSL_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/boringssl_ssl_test: protobuf_dep_error @@ -19417,7 +19417,7 @@ $(BORINGSSL_CRYPTO_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/boringssl_crypto_test: protobuf_dep_error @@ -19584,7 +19584,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/alts_credentials_fuzzer_one_entry: protobuf_dep_error @@ -19630,7 +19630,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry: protobuf_dep_error @@ -19676,7 +19676,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry: protobuf_dep_error @@ -19722,7 +19722,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/http_request_fuzzer_test_one_entry: protobuf_dep_error @@ -19768,7 +19768,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/http_response_fuzzer_test_one_entry: protobuf_dep_error @@ -19814,7 +19814,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry: protobuf_dep_error @@ -19860,7 +19860,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test_one_entry: protobuf_dep_error @@ -19906,7 +19906,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test_one_entry: protobuf_dep_error @@ -19952,7 +19952,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/percent_decode_fuzzer_one_entry: protobuf_dep_error @@ -19998,7 +19998,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/percent_encode_fuzzer_one_entry: protobuf_dep_error @@ -20044,7 +20044,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/server_fuzzer_one_entry: protobuf_dep_error @@ -20090,7 +20090,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/ssl_server_fuzzer_one_entry: protobuf_dep_error @@ -20136,7 +20136,7 @@ else ifeq ($(NO_PROTOBUF),true) -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry: protobuf_dep_error diff --git a/templates/Makefile.template b/templates/Makefile.template index 815fac1ac5c..d62305f36f5 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -445,7 +445,7 @@ ifeq ($(HAS_PKG_CONFIG),true) OPENSSL_ALPN_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.0.2 openssl ZLIB_CHECK_CMD = $(PKG_CONFIG) --exists zlib - PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.5.0 protobuf + PROTOBUF_CHECK_CMD = $(PKG_CONFIG) --atleast-version=3.12.0 protobuf CARES_CHECK_CMD = $(PKG_CONFIG) --atleast-version=1.11.0 libcares else # HAS_PKG_CONFIG @@ -874,7 +874,7 @@ @echo @echo "DEPENDENCY ERROR" @echo - @echo "The target you are trying to run requires protobuf 3.5.0+" + @echo "The target you are trying to run requires protobuf 3.12.0+" @echo "Your system doesn't have it, and neither does the third_party directory." @echo @echo "Please consult INSTALL to get more information." @@ -888,7 +888,7 @@ @echo @echo "DEPENDENCY ERROR" @echo - @echo "The target you are trying to run requires protobuf-compiler 3.5.0+" + @echo "The target you are trying to run requires protobuf-compiler 3.12.0+" @echo "Your system doesn't have it, and neither does the third_party directory." @echo @echo "Please consult INSTALL to get more information." @@ -1717,7 +1717,7 @@ % endif % if lib.language == 'c++': ## If the lib was C++, we have to close the Makefile's if that tested - ## the presence of protobuf 3.5.0+ + ## the presence of protobuf 3.12.0+ endif % endif @@ -1783,7 +1783,7 @@ ifeq ($(NO_PROTOBUF),true) - # You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.5.0+. + # You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.12.0+. $(BINDIR)/$(CONFIG)/${tgt.name}: protobuf_dep_error From 1df2cb376049c52ceda8f22dc1c55a35139b7706 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 26 Jun 2020 11:26:55 -0700 Subject: [PATCH 164/239] Dump details around ruby call creds user callback invocation when debug logs are enabled --- src/ruby/ext/grpc/rb_call_credentials.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 61170cc73b2..a38145e129d 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -56,6 +56,28 @@ typedef struct callback_params { static VALUE grpc_rb_call_credentials_callback(VALUE callback_args) { VALUE result = rb_hash_new(); + if (gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) { + VALUE callback_args_as_str = + rb_funcall(callback_args, rb_intern("to_s"), 0); + VALUE callback_source_info = rb_funcall(rb_ary_entry(callback_args, 0), + rb_intern("source_location"), 0); + if (callback_source_info != Qnil) { + VALUE source_filename = rb_ary_entry(callback_source_info, 0); + VALUE source_line_number = rb_funcall( + rb_ary_entry(callback_source_info, 1), rb_intern("to_s"), 0); + gpr_log(GPR_DEBUG, + "GRPC_RUBY: grpc_rb_call_credentials invoking user callback " + "(source_filename:%s line_number:%s) with arguments:%s", + StringValueCStr(source_filename), + StringValueCStr(source_line_number), + StringValueCStr(callback_args_as_str)); + } else { + gpr_log(GPR_DEBUG, + "GRPC_RUBY: grpc_rb_call_credentials invoking user callback " + "(failed to get source filename ane line) with arguments:%s", + StringValueCStr(callback_args_as_str)); + } + } VALUE metadata = rb_funcall(rb_ary_entry(callback_args, 0), rb_intern("call"), 1, rb_ary_entry(callback_args, 1)); rb_hash_aset(result, rb_str_new2("metadata"), metadata); From b88c0a22c743a6d09a35d1754f1e125f03a76792 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 25 Jul 2019 11:46:32 -0700 Subject: [PATCH 165/239] Fix use-after-free in ruby call creds --- grpc.def | 2 + include/grpc/grpc_security.h | 8 + .../lib/security/transport/auth_filters.h | 5 - .../call_credentials_timeout_driver.rb | 153 ++++++++++++++++++ src/ruby/end2end/end2end_common.rb | 5 +- src/ruby/ext/grpc/rb_call_credentials.c | 5 +- src/ruby/ext/grpc/rb_grpc_imports.generated.c | 4 + src/ruby/ext/grpc/rb_grpc_imports.generated.h | 6 + src/ruby/spec/support/services.rb | 14 +- .../core/surface/public_headers_must_be_c89.c | 2 + .../helper_scripts/run_ruby_end2end_tests.sh | 1 + 11 files changed, 193 insertions(+), 12 deletions(-) create mode 100755 src/ruby/end2end/call_credentials_timeout_driver.rb diff --git a/grpc.def b/grpc.def index 2f753b29939..ad0dca2f0d4 100644 --- a/grpc.def +++ b/grpc.def @@ -112,6 +112,8 @@ EXPORTS grpc_access_token_credentials_create grpc_google_iam_credentials_create grpc_sts_credentials_create + grpc_auth_metadata_context_copy + grpc_auth_metadata_context_reset grpc_metadata_credentials_create_from_plugin grpc_secure_channel_create grpc_server_credentials_release diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index e910b86596b..99635ea8807 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -390,6 +390,14 @@ typedef struct { void* reserved; } grpc_auth_metadata_context; +/** Performs a deep copy from \a from to \a to. **/ +GRPCAPI void grpc_auth_metadata_context_copy(grpc_auth_metadata_context* from, + grpc_auth_metadata_context* to); + +/** Releases internal resources held by \a context. **/ +GRPCAPI void grpc_auth_metadata_context_reset( + grpc_auth_metadata_context* context); + /** Maximum number of metadata entries returnable by a credentials plugin via a synchronous return. */ #define GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX 4 diff --git a/src/core/lib/security/transport/auth_filters.h b/src/core/lib/security/transport/auth_filters.h index 5e73c21cc44..ae31b1d578b 100644 --- a/src/core/lib/security/transport/auth_filters.h +++ b/src/core/lib/security/transport/auth_filters.h @@ -32,9 +32,4 @@ void grpc_auth_metadata_context_build( const grpc_slice& call_method, grpc_auth_context* auth_context, grpc_auth_metadata_context* auth_md_context); -void grpc_auth_metadata_context_copy(grpc_auth_metadata_context* from, - grpc_auth_metadata_context* to); - -void grpc_auth_metadata_context_reset(grpc_auth_metadata_context* context); - #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H */ diff --git a/src/ruby/end2end/call_credentials_timeout_driver.rb b/src/ruby/end2end/call_credentials_timeout_driver.rb new file mode 100755 index 00000000000..7618b14b974 --- /dev/null +++ b/src/ruby/end2end/call_credentials_timeout_driver.rb @@ -0,0 +1,153 @@ +#!/usr/bin/env ruby +# +# Copyright 2016 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +this_dir = File.expand_path(File.dirname(__FILE__)) +protos_lib_dir = File.join(this_dir, 'lib') +grpc_lib_dir = File.join(File.dirname(this_dir), 'lib') +$LOAD_PATH.unshift(grpc_lib_dir) unless $LOAD_PATH.include?(grpc_lib_dir) +$LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) +$LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) + +require 'grpc' +require 'end2end_common' + +def create_channel_creds + test_root = File.join(File.dirname(__FILE__), '..', 'spec', 'testdata') + files = ['ca.pem', 'client.key', 'client.pem'] + creds = files.map { |f| File.open(File.join(test_root, f)).read } + GRPC::Core::ChannelCredentials.new(creds[0], creds[1], creds[2]) +end + +def client_cert + test_root = File.join(File.dirname(__FILE__), '..', 'spec', 'testdata') + cert = File.open(File.join(test_root, 'client.pem')).read + fail unless cert.is_a?(String) + cert +end + +def create_server_creds + test_root = File.join(File.dirname(__FILE__), '..', 'spec', 'testdata') + GRPC.logger.info("test root: #{test_root}") + files = ['ca.pem', 'server1.key', 'server1.pem'] + creds = files.map { |f| File.open(File.join(test_root, f)).read } + GRPC::Core::ServerCredentials.new( + creds[0], + [{ private_key: creds[1], cert_chain: creds[2] }], + true) # force client auth +end + +# Useful to update a value within a do block +class MutableValue + attr_accessor :value + + def initialize(value) + @value = value + end +end + +# rubocop:disable Metrics/AbcSize +# rubocop:disable Metrics/MethodLength +def main + server_runner = ServerRunner.new(EchoServerImpl) + server_runner.server_creds = create_server_creds + server_port = server_runner.run + channel_args = { + GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.fr' + } + token_fetch_attempts = MutableValue.new(0) + token_fetch_attempts_mu = Mutex.new + jwt_aud_uri_extraction_success_count = MutableValue.new(0) + jwt_aud_uri_extraction_success_count_mu = Mutex.new + expected_jwt_aud_uri = 'https://foo.test.google.fr/echo.EchoServer' + jwt_aud_uri_failure_values = [] + times_out_first_time_auth_proc = proc do |args| + # We check the value of jwt_aud_uri not necessarily as a test for + # the correctness of jwt_aud_uri w.r.t. its expected semantics, but + # more for as an indirect way to check for memory corruption. + jwt_aud_uri_extraction_success_count_mu.synchronize do + if args[:jwt_aud_uri] == expected_jwt_aud_uri + jwt_aud_uri_extraction_success_count.value += 1 + else + jwt_aud_uri_failure_values << args[:jwt_aud_uri] + end + end + token_fetch_attempts_mu.synchronize do + old_val = token_fetch_attempts.value + token_fetch_attempts.value += 1 + if old_val.zero? + STDERR.puts 'call creds plugin sleeping for 4 seconds' + sleep 4 + STDERR.puts 'call creds plugin done with 4 second sleep' + raise 'test exception thrown purposely from call creds plugin' + end + end + { 'authorization' => 'fake_val' }.merge(args) + end + channel_creds = create_channel_creds.compose( + GRPC::Core::CallCredentials.new(times_out_first_time_auth_proc)) + stub = Echo::EchoServer::Stub.new("localhost:#{server_port}", + channel_creds, + channel_args: channel_args) + STDERR.puts 'perform a first few RPCs to try to get things into a bad state...' + threads = [] + got_at_least_one_failure = MutableValue.new(false) + 2000.times do + threads << Thread.new do + begin + # 2 seconds is chosen as deadline here because it is less than the 4 second + # sleep that the first call creds user callback does. The idea here is that + # a lot of RPCs will be made concurrently all with 2 second deadlines, and they + # will all queue up onto the call creds user callback thread, and will all + # have to wait for the first 4 second sleep to finish. When the deadlines + # of the associated calls fire ~2 seconds in, some of their C-core data + # will have ownership dropped, and they will hit the user-after-free in + # https://github.com/grpc/grpc/issues/19195 if this isn't handled correctly. + stub.echo(Echo::EchoRequest.new(request: 'hello'), deadline: Time.now + 2) + rescue GRPC::BadStatus + got_at_least_one_failure.value = true + # We don't care if these RPCs succeed or fail. The purpose of these + # RPCs is just to try to induce a specific use-after-free bug, and to get + # the call credentials callback thread into a bad state. + end + end + end + threads.each(&:join) + unless got_at_least_one_failure.value + fail 'expected at least one of the initial RPCs to fail' + end + # Expect three more RPCs to succeed + STDERR.puts 'now perform another RPC and expect OK...' + stub.echo(Echo::EchoRequest.new(request: 'hello'), deadline: Time.now + 10) + STDERR.puts 'now perform another RPC and expect OK...' + stub.echo(Echo::EchoRequest.new(request: 'hello'), deadline: Time.now + 10) + STDERR.puts 'now perform another RPC and expect OK...' + stub.echo(Echo::EchoRequest.new(request: 'hello'), deadline: Time.now + 10) + jwt_aud_uri_extraction_success_count_mu.synchronize do + if jwt_aud_uri_extraction_success_count.value != 2003 + fail "Expected to get jwt_aud_uri:#{expected_jwt_aud_uri} passed to call creds +user callback 2003 times, but it was only passed to the call creds user callback +#{jwt_aud_uri_extraction_success_count.value} times. This suggests that either: +a) the expected jwt_aud_uri value is incorrect +b) there is some corruption of the jwt_aud_uri argument +Here are are the values of the jwt_aud_uri parameter that were passed to the call +creds user callback that did not match #{expected_jwt_aud_uri}: +#{jwt_aud_uri_failure_values}" + end + end + server_runner.stop +end + +main diff --git a/src/ruby/end2end/end2end_common.rb b/src/ruby/end2end/end2end_common.rb index ffbaa1986d0..1bc17066735 100755 --- a/src/ruby/end2end/end2end_common.rb +++ b/src/ruby/end2end/end2end_common.rb @@ -43,14 +43,17 @@ end # ServerRunner starts an "echo server" that test clients can make calls to class ServerRunner + attr_accessor :server_creds + def initialize(service_impl, rpc_server_args: {}) @service_impl = service_impl @rpc_server_args = rpc_server_args + @server_creds = :this_port_is_insecure end def run @srv = new_rpc_server_for_testing(@rpc_server_args) - port = @srv.add_http2_port('0.0.0.0:0', :this_port_is_insecure) + port = @srv.add_http2_port('0.0.0.0:0', @server_creds) @srv.handle(@service_impl) @thd = Thread.new do diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 61170cc73b2..a63d5dd5aa3 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -109,6 +109,7 @@ static void grpc_rb_call_credentials_callback_with_gil(void* param) { params->callback(params->user_data, md_ary.metadata, md_ary.count, status, error_details); grpc_rb_metadata_array_destroy_including_entries(&md_ary); + grpc_auth_metadata_context_reset(¶ms->context); gpr_free(params); } @@ -118,9 +119,9 @@ static int grpc_rb_call_credentials_plugin_get_metadata( grpc_metadata creds_md[GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX], size_t* num_creds_md, grpc_status_code* status, const char** error_details) { - callback_params* params = gpr_malloc(sizeof(callback_params)); + callback_params* params = gpr_zalloc(sizeof(callback_params)); params->get_metadata = (VALUE)state; - params->context = context; + grpc_auth_metadata_context_copy(&context, ¶ms->context); params->user_data = user_data; params->callback = cb; diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 4e50a5c3ea7..37b864d5be4 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -135,6 +135,8 @@ grpc_google_refresh_token_credentials_create_type grpc_google_refresh_token_cred grpc_access_token_credentials_create_type grpc_access_token_credentials_create_import; grpc_google_iam_credentials_create_type grpc_google_iam_credentials_create_import; grpc_sts_credentials_create_type grpc_sts_credentials_create_import; +grpc_auth_metadata_context_copy_type grpc_auth_metadata_context_copy_import; +grpc_auth_metadata_context_reset_type grpc_auth_metadata_context_reset_import; grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_create_from_plugin_import; grpc_secure_channel_create_type grpc_secure_channel_create_import; grpc_server_credentials_release_type grpc_server_credentials_release_import; @@ -407,6 +409,8 @@ void grpc_rb_load_imports(HMODULE library) { grpc_access_token_credentials_create_import = (grpc_access_token_credentials_create_type) GetProcAddress(library, "grpc_access_token_credentials_create"); grpc_google_iam_credentials_create_import = (grpc_google_iam_credentials_create_type) GetProcAddress(library, "grpc_google_iam_credentials_create"); grpc_sts_credentials_create_import = (grpc_sts_credentials_create_type) GetProcAddress(library, "grpc_sts_credentials_create"); + grpc_auth_metadata_context_copy_import = (grpc_auth_metadata_context_copy_type) GetProcAddress(library, "grpc_auth_metadata_context_copy"); + grpc_auth_metadata_context_reset_import = (grpc_auth_metadata_context_reset_type) GetProcAddress(library, "grpc_auth_metadata_context_reset"); grpc_metadata_credentials_create_from_plugin_import = (grpc_metadata_credentials_create_from_plugin_type) GetProcAddress(library, "grpc_metadata_credentials_create_from_plugin"); grpc_secure_channel_create_import = (grpc_secure_channel_create_type) GetProcAddress(library, "grpc_secure_channel_create"); grpc_server_credentials_release_import = (grpc_server_credentials_release_type) GetProcAddress(library, "grpc_server_credentials_release"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index cf351a50a19..260d673a668 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -380,6 +380,12 @@ extern grpc_google_iam_credentials_create_type grpc_google_iam_credentials_creat typedef grpc_call_credentials*(*grpc_sts_credentials_create_type)(const grpc_sts_credentials_options* options, void* reserved); extern grpc_sts_credentials_create_type grpc_sts_credentials_create_import; #define grpc_sts_credentials_create grpc_sts_credentials_create_import +typedef void(*grpc_auth_metadata_context_copy_type)(grpc_auth_metadata_context* from, grpc_auth_metadata_context* to); +extern grpc_auth_metadata_context_copy_type grpc_auth_metadata_context_copy_import; +#define grpc_auth_metadata_context_copy grpc_auth_metadata_context_copy_import +typedef void(*grpc_auth_metadata_context_reset_type)(grpc_auth_metadata_context* context); +extern grpc_auth_metadata_context_reset_type grpc_auth_metadata_context_reset_import; +#define grpc_auth_metadata_context_reset grpc_auth_metadata_context_reset_import typedef grpc_call_credentials*(*grpc_metadata_credentials_create_from_plugin_type)(grpc_metadata_credentials_plugin plugin, grpc_security_level min_security_level, void* reserved); extern grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_create_from_plugin_import; #define grpc_metadata_credentials_create_from_plugin grpc_metadata_credentials_create_from_plugin_import diff --git a/src/ruby/spec/support/services.rb b/src/ruby/spec/support/services.rb index 438459dfd79..a5d8e7c187b 100644 --- a/src/ruby/spec/support/services.rb +++ b/src/ruby/spec/support/services.rb @@ -17,12 +17,18 @@ require 'spec_helper' # A test message class EchoMsg - def self.marshal(_o) - '' + attr_reader :msg + + def initialize(msg: '') + @msg = msg end - def self.unmarshal(_o) - EchoMsg.new + def self.marshal(o) + o.msg + end + + def self.unmarshal(msg) + EchoMsg.new(msg: msg) end end diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index b6ba715e247..1b119317969 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -179,6 +179,8 @@ int main(int argc, char **argv) { printf("%lx", (unsigned long) grpc_access_token_credentials_create); printf("%lx", (unsigned long) grpc_google_iam_credentials_create); printf("%lx", (unsigned long) grpc_sts_credentials_create); + printf("%lx", (unsigned long) grpc_auth_metadata_context_copy); + printf("%lx", (unsigned long) grpc_auth_metadata_context_reset); printf("%lx", (unsigned long) grpc_metadata_credentials_create_from_plugin); printf("%lx", (unsigned long) grpc_secure_channel_create); printf("%lx", (unsigned long) grpc_server_credentials_release); diff --git a/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh b/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh index fc0759fc836..304814c2553 100755 --- a/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh +++ b/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh @@ -35,4 +35,5 @@ time ruby src/ruby/end2end/graceful_sig_stop_driver.rb || EXIT_CODE=1 time ruby src/ruby/end2end/errors_load_before_grpc_lib.rb || EXIT_CODE=1 time ruby src/ruby/end2end/logger_load_before_grpc_lib.rb || EXIT_CODE=1 time ruby src/ruby/end2end/status_codes_load_before_grpc_lib.rb || EXIT_CODE=1 +time ruby src/ruby/end2end/call_credentials_timeout_driver.rb || EXIT_CODE=1 exit $EXIT_CODE From 9b4f0ce32e60eec8a025dd25c1dc53839d0b4816 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Fri, 26 Jun 2020 14:16:58 -0700 Subject: [PATCH 166/239] Lower log level to INFO from ERROR from keepalive watchdog firing --- src/core/ext/transport/chttp2/transport/chttp2_transport.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index efe104aa0e2..6d25f5c7724 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -2890,7 +2890,7 @@ static void keepalive_watchdog_fired_locked(void* arg, grpc_error* error) { grpc_chttp2_transport* t = static_cast(arg); if (t->keepalive_state == GRPC_CHTTP2_KEEPALIVE_STATE_PINGING) { if (error == GRPC_ERROR_NONE) { - gpr_log(GPR_ERROR, "%s: Keepalive watchdog fired. Closing transport.", + gpr_log(GPR_INFO, "%s: Keepalive watchdog fired. Closing transport.", t->peer_string); t->keepalive_state = GRPC_CHTTP2_KEEPALIVE_STATE_DYING; close_transport_locked( From 95387716dc1bab23d432b6c730549bbfce612493 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Thu, 25 Jul 2019 11:46:32 -0700 Subject: [PATCH 167/239] Make sure call creds user callbacks can't kill the ruby call credentials thread --- ...ta_doesnt_kill_background_thread_driver.rb | 160 ++++++++++++++++++ src/ruby/ext/grpc/rb_call.c | 5 +- src/ruby/ext/grpc/rb_call.h | 4 + src/ruby/ext/grpc/rb_call_credentials.c | 61 ++++--- .../helper_scripts/run_ruby_end2end_tests.sh | 1 + 5 files changed, 209 insertions(+), 22 deletions(-) create mode 100755 src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb diff --git a/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb b/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb new file mode 100755 index 00000000000..2cc17b5883c --- /dev/null +++ b/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb @@ -0,0 +1,160 @@ +#!/usr/bin/env ruby +# +# Copyright 2016 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +this_dir = File.expand_path(File.dirname(__FILE__)) +protos_lib_dir = File.join(this_dir, 'lib') +grpc_lib_dir = File.join(File.dirname(this_dir), 'lib') +$LOAD_PATH.unshift(grpc_lib_dir) unless $LOAD_PATH.include?(grpc_lib_dir) +$LOAD_PATH.unshift(protos_lib_dir) unless $LOAD_PATH.include?(protos_lib_dir) +$LOAD_PATH.unshift(this_dir) unless $LOAD_PATH.include?(this_dir) + +require 'grpc' +require 'end2end_common' + +def create_channel_creds + test_root = File.join(File.dirname(__FILE__), '..', 'spec', 'testdata') + files = ['ca.pem', 'client.key', 'client.pem'] + creds = files.map { |f| File.open(File.join(test_root, f)).read } + GRPC::Core::ChannelCredentials.new(creds[0], creds[1], creds[2]) +end + +def client_cert + test_root = File.join(File.dirname(__FILE__), '..', 'spec', 'testdata') + cert = File.open(File.join(test_root, 'client.pem')).read + fail unless cert.is_a?(String) + cert +end + +def create_server_creds + test_root = File.join(File.dirname(__FILE__), '..', 'spec', 'testdata') + GRPC.logger.info("test root: #{test_root}") + files = ['ca.pem', 'server1.key', 'server1.pem'] + creds = files.map { |f| File.open(File.join(test_root, f)).read } + GRPC::Core::ServerCredentials.new( + creds[0], + [{ private_key: creds[1], cert_chain: creds[2] }], + true) # force client auth +end + +# Useful to update a value within a do block +class MutableValue + attr_accessor :value + + def initialize(value) + @value = value + end +end + +def run_rpc_expect_unavailable(stub) + exception = nil + begin + stub.echo(Echo::EchoRequest.new(request: 'hello'), deadline: Time.now + 10) + rescue GRPC::BadStatus => e + exception = e + end + fail "Expected call to fail UNAVAILABLE. Got failure:|#{exception}|" unless exception.is_a?(GRPC::Unavailable) +end + +# rubocop:disable Metrics/AbcSize +# rubocop:disable Metrics/MethodLength +def main + server_runner = ServerRunner.new(EchoServerImpl) + server_runner.server_creds = create_server_creds + server_port = server_runner.run + channel_args = { + GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.fr' + } + call_creds_invocation_count = MutableValue.new(0) + call_creds_invocation_count_mu = Mutex.new + empty_header_proc = proc do + call_creds_invocation_count_mu.synchronize do + call_creds_invocation_count.value += 1 + end + # Empty header values are invalid, so returning one here should + # raise cause grpc-ruby to fail the RPC. + { '' => '123' } + end + bad_type_proc = proc do + call_creds_invocation_count_mu.synchronize do + call_creds_invocation_count.value += 1 + end + # Returning bad type here (not nil or Hash) should cause the RPC to fail + 1 + end + nil_proc = proc do + call_creds_invocation_count_mu.synchronize do + call_creds_invocation_count.value += 1 + end + # The RPC should succeed in this case, but just not add any headers + nil + end + raising_proc = proc do + call_creds_invocation_count_mu.synchronize do + call_creds_invocation_count.value += 1 + end + # The RPC should fail in this case + raise 'exception thrown by raising_proc call creds' + end + good_header_proc = proc do + call_creds_invocation_count_mu.synchronize do + call_creds_invocation_count.value += 1 + end + { 'authorization' => 'fake_val' } + end + empty_header_stub = Echo::EchoServer::Stub.new( + "localhost:#{server_port}", + create_channel_creds.compose(GRPC::Core::CallCredentials.new(empty_header_proc)), + channel_args: channel_args) + bad_type_stub = Echo::EchoServer::Stub.new( + "localhost:#{server_port}", + create_channel_creds.compose(GRPC::Core::CallCredentials.new(bad_type_proc)), + channel_args: channel_args) + nil_stub = Echo::EchoServer::Stub.new( + "localhost:#{server_port}", + create_channel_creds.compose(GRPC::Core::CallCredentials.new(nil_proc)), + channel_args: channel_args) + raising_stub = Echo::EchoServer::Stub.new( + "localhost:#{server_port}", + create_channel_creds.compose(GRPC::Core::CallCredentials.new(raising_proc)), + channel_args: channel_args) + good_stub = Echo::EchoServer::Stub.new( + "localhost:#{server_port}", + create_channel_creds.compose(GRPC::Core::CallCredentials.new(good_header_proc)), + channel_args: channel_args) + STDERR.puts 'perform an RPC using call creds that return valid headers and expect OK...' + good_stub.echo(Echo::EchoRequest.new(request: 'hello'), deadline: Time.now + 10) + STDERR.puts 'perform an RPC using call creds that return an empty header and expect it to fail...' + run_rpc_expect_unavailable(empty_header_stub) + STDERR.puts 'perform an RPC using call creds that return a bad type and expect it to fail...' + run_rpc_expect_unavailable(bad_type_stub) + STDERR.puts 'perform an RPC using call creds that return nil and expect OK...' + nil_stub.echo(Echo::EchoRequest.new(request: 'hello'), deadline: Time.now + 10) + STDERR.puts 'perform an RPC using call creds that raise an error and expect it to fail...' + run_rpc_expect_unavailable(raising_stub) + STDERR.puts 'perform an RPC using call creds that return valid headers and expect OK...' + # Note that the purpose of this RPC is to test that the bad call creds used by the previous + # RPCs didn't get the gRPC-ruby library into a wedged state (specifically by killing + # the call credentials user callback invocation thread). + good_stub.echo(Echo::EchoRequest.new(request: 'hello'), deadline: Time.now + 10) + server_runner.stop + call_creds_invocation_count_mu.synchronize do + unless call_creds_invocation_count.value == 6 + fail 'test did not actually use the call credentials' + end + end +end + +main diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index fe6158183d8..117ab63e9af 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -48,7 +48,7 @@ static VALUE grpc_rb_sBatchResult; /* grpc_rb_cMdAry is the MetadataArray class whose instances proxy * grpc_metadata_array. */ -static VALUE grpc_rb_cMdAry; +VALUE grpc_rb_cMdAry; /* id_credentials is the name of the hidden ivar that preserves the value * of the credentials added to the call */ @@ -103,7 +103,7 @@ static void grpc_rb_call_destroy(void* p) { xfree(p); } -static const rb_data_type_t grpc_rb_md_ary_data_type = { +const rb_data_type_t grpc_rb_md_ary_data_type = { "grpc_metadata_array", {GRPC_RB_GC_NOT_MARKED, GRPC_RB_GC_DONT_FREE, @@ -489,6 +489,7 @@ static int grpc_rb_md_ary_capacity_hash_cb(VALUE key, VALUE val, /* grpc_rb_md_ary_convert converts a ruby metadata hash into a grpc_metadata_array. + Note that this function may throw exceptions. */ void grpc_rb_md_ary_convert(VALUE md_ary_hash, grpc_metadata_array* md_ary) { VALUE md_ary_obj = Qnil; diff --git a/src/ruby/ext/grpc/rb_call.h b/src/ruby/ext/grpc/rb_call.h index a2202eb8d31..790422169bc 100644 --- a/src/ruby/ext/grpc/rb_call.h +++ b/src/ruby/ext/grpc/rb_call.h @@ -23,6 +23,10 @@ #include +extern const rb_data_type_t grpc_rb_md_ary_data_type; + +extern VALUE grpc_rb_cMdAry; + /* Gets the wrapped call from a VALUE. */ grpc_call* grpc_rb_get_wrapped_call(VALUE v); diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 6ca9c060898..fb7d3550317 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -54,32 +54,41 @@ typedef struct callback_params { grpc_credentials_plugin_metadata_cb callback; } callback_params; -static VALUE grpc_rb_call_credentials_callback(VALUE callback_args) { +static VALUE grpc_rb_call_credentials_callback(VALUE args) { VALUE result = rb_hash_new(); + VALUE callback_func = rb_ary_entry(args, 0); + VALUE callback_args = rb_ary_entry(args, 1); + VALUE md_ary_obj = rb_ary_entry(args, 2); if (gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) { - VALUE callback_args_as_str = - rb_funcall(callback_args, rb_intern("to_s"), 0); - VALUE callback_source_info = rb_funcall(rb_ary_entry(callback_args, 0), - rb_intern("source_location"), 0); + VALUE callback_func_str = rb_funcall(callback_func, rb_intern("to_s"), 0); + VALUE callback_args_str = rb_funcall(callback_args, rb_intern("to_s"), 0); + VALUE callback_source_info = + rb_funcall(callback_func, rb_intern("source_location"), 0); if (callback_source_info != Qnil) { VALUE source_filename = rb_ary_entry(callback_source_info, 0); VALUE source_line_number = rb_funcall( rb_ary_entry(callback_source_info, 1), rb_intern("to_s"), 0); gpr_log(GPR_DEBUG, - "GRPC_RUBY: grpc_rb_call_credentials invoking user callback " - "(source_filename:%s line_number:%s) with arguments:%s", + "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| " + "source_filename:%s line_number:%s with arguments:|%s|", + StringValueCStr(callback_func_str), StringValueCStr(source_filename), StringValueCStr(source_line_number), - StringValueCStr(callback_args_as_str)); + StringValueCStr(callback_args_str)); } else { gpr_log(GPR_DEBUG, - "GRPC_RUBY: grpc_rb_call_credentials invoking user callback " - "(failed to get source filename ane line) with arguments:%s", - StringValueCStr(callback_args_as_str)); + "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| " + "(failed to get source filename ane line) with arguments:|%s|", + StringValueCStr(callback_func_str), + StringValueCStr(callback_args_str)); } } - VALUE metadata = rb_funcall(rb_ary_entry(callback_args, 0), rb_intern("call"), - 1, rb_ary_entry(callback_args, 1)); + VALUE metadata = + rb_funcall(callback_func, rb_intern("call"), 1, callback_args); + grpc_metadata_array* md_ary = NULL; + TypedData_Get_Struct(md_ary_obj, grpc_metadata_array, + &grpc_rb_md_ary_data_type, md_ary); + grpc_rb_md_ary_convert(metadata, md_ary); rb_hash_aset(result, rb_str_new2("metadata"), metadata); rb_hash_aset(result, rb_str_new2("status"), INT2NUM(GRPC_STATUS_OK)); rb_hash_aset(result, rb_str_new2("details"), rb_str_new2("")); @@ -89,14 +98,22 @@ static VALUE grpc_rb_call_credentials_callback(VALUE callback_args) { static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args, VALUE exception_object) { VALUE result = rb_hash_new(); - VALUE backtrace = - rb_funcall(rb_funcall(exception_object, rb_intern("backtrace"), 0), - rb_intern("join"), 1, rb_str_new2("\n\tfrom ")); + VALUE backtrace = rb_funcall(exception_object, rb_intern("backtrace"), 0); + VALUE backtrace_str; + if (backtrace != Qnil) { + backtrace_str = rb_funcall(backtrace, rb_intern("join"), 1, rb_str_new2("\n\tfrom ")); + } else { + backtrace_str = rb_str_new2( + "failed to get backtrace, this exception was likely thrown from native " + "code"); + } VALUE rb_exception_info = rb_funcall(exception_object, rb_intern("inspect"), 0); (void)args; - gpr_log(GPR_INFO, "Call credentials callback failed: %s\n%s", - StringValueCStr(rb_exception_info), StringValueCStr(backtrace)); + gpr_log(GPR_INFO, + "GRPC_RUBY call credentials callback failed, exception inspect:|%s| " + "backtrace:|%s|", + StringValueCStr(rb_exception_info), StringValueCStr(backtrace_str)); rb_hash_aset(result, rb_str_new2("metadata"), Qnil); rb_hash_aset(result, rb_str_new2("status"), INT2NUM(GRPC_STATUS_UNAUTHENTICATED)); @@ -120,11 +137,15 @@ static void grpc_rb_call_credentials_callback_with_gil(void* param) { rb_hash_aset(args, ID2SYM(rb_intern("jwt_aud_uri")), auth_uri); rb_ary_push(callback_args, params->get_metadata); rb_ary_push(callback_args, args); + // Wrap up the grpc_metadata_array into a ruby object and do the conversion + // from hash to grpc_metadata_array within the rescue block, because the + // conversion can throw exceptions. + rb_ary_push(callback_args, + TypedData_Wrap_Struct(grpc_rb_cMdAry, &grpc_rb_md_ary_data_type, + &md_ary)); result = rb_rescue(grpc_rb_call_credentials_callback, callback_args, grpc_rb_call_credentials_callback_rescue, Qnil); // Both callbacks return a hash, so result should be a hash - grpc_rb_md_ary_convert(rb_hash_aref(result, rb_str_new2("metadata")), - &md_ary); status = NUM2INT(rb_hash_aref(result, rb_str_new2("status"))); details = rb_hash_aref(result, rb_str_new2("details")); error_details = StringValueCStr(details); diff --git a/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh b/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh index 304814c2553..fe552ce318e 100755 --- a/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh +++ b/tools/run_tests/helper_scripts/run_ruby_end2end_tests.sh @@ -36,4 +36,5 @@ time ruby src/ruby/end2end/errors_load_before_grpc_lib.rb || EXIT_CODE=1 time ruby src/ruby/end2end/logger_load_before_grpc_lib.rb || EXIT_CODE=1 time ruby src/ruby/end2end/status_codes_load_before_grpc_lib.rb || EXIT_CODE=1 time ruby src/ruby/end2end/call_credentials_timeout_driver.rb || EXIT_CODE=1 +time ruby src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb || EXIT_CODE=1 exit $EXIT_CODE From 9e8f671cee5fefbbb072f137fe79d3cd1ad34c59 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Fri, 26 Jun 2020 23:00:31 -0700 Subject: [PATCH 168/239] Update license date; fix format and typo --- ...ning_bad_metadata_doesnt_kill_background_thread_driver.rb | 2 +- src/ruby/ext/grpc/rb_call_credentials.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb b/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb index 2cc17b5883c..414e97522ca 100755 --- a/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb +++ b/src/ruby/end2end/call_credentials_returning_bad_metadata_doesnt_kill_background_thread_driver.rb @@ -1,6 +1,6 @@ #!/usr/bin/env ruby # -# Copyright 2016 gRPC authors. +# Copyright 2020 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index fb7d3550317..76e5159cb6e 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -78,7 +78,7 @@ static VALUE grpc_rb_call_credentials_callback(VALUE args) { } else { gpr_log(GPR_DEBUG, "GRPC_RUBY: grpc_rb_call_credentials invoking user callback:|%s| " - "(failed to get source filename ane line) with arguments:|%s|", + "(failed to get source filename and line) with arguments:|%s|", StringValueCStr(callback_func_str), StringValueCStr(callback_args_str)); } @@ -101,7 +101,8 @@ static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args, VALUE backtrace = rb_funcall(exception_object, rb_intern("backtrace"), 0); VALUE backtrace_str; if (backtrace != Qnil) { - backtrace_str = rb_funcall(backtrace, rb_intern("join"), 1, rb_str_new2("\n\tfrom ")); + backtrace_str = + rb_funcall(backtrace, rb_intern("join"), 1, rb_str_new2("\n\tfrom ")); } else { backtrace_str = rb_str_new2( "failed to get backtrace, this exception was likely thrown from native " From e2889fe265ecd89b1f911759b3ff17f5fbabb246 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Sat, 27 Jun 2020 01:00:40 -0700 Subject: [PATCH 169/239] Added missing deps_linkage --- tools/buildgen/extract_metadata_from_bazel_xml.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/buildgen/extract_metadata_from_bazel_xml.py b/tools/buildgen/extract_metadata_from_bazel_xml.py index 720ce54f6c1..9d0dc2e7c26 100755 --- a/tools/buildgen/extract_metadata_from_bazel_xml.py +++ b/tools/buildgen/extract_metadata_from_bazel_xml.py @@ -589,6 +589,7 @@ _BUILD_EXTRA_METADATA = { 'build': 'all', 'baselib': True, 'secure': True, + 'deps_linkage': 'static', 'dll': True, 'generate_plugin_registry': True }, @@ -622,6 +623,7 @@ _BUILD_EXTRA_METADATA = { 'grpc_csharp_ext': { 'language': 'c', 'build': 'all', + 'deps_linkage': 'static', 'dll': 'only' }, 'grpc_unsecure': { @@ -629,6 +631,7 @@ _BUILD_EXTRA_METADATA = { 'build': 'all', 'baselib': True, 'secure': False, + 'deps_linkage': 'static', 'dll': True, 'generate_plugin_registry': True }, From 70e4e4f3e77aadd6d45d56a775e6eb827a6760f7 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Sat, 27 Jun 2020 01:02:19 -0700 Subject: [PATCH 170/239] Regenerated projects --- Makefile | 30 +++++++++++++++--------------- build_autogenerated.yaml | 3 +++ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index ebae573af33..328235869c4 100644 --- a/Makefile +++ b/Makefile @@ -4150,18 +4150,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so endif @@ -4207,18 +4207,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).so endif @@ -4776,18 +4776,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) +$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) +$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so endif diff --git a/build_autogenerated.yaml b/build_autogenerated.yaml index 505bd99ecbd..1ad6a258b25 100644 --- a/build_autogenerated.yaml +++ b/build_autogenerated.yaml @@ -1297,6 +1297,7 @@ libs: - absl/strings:strings - absl/container:inlined_vector baselib: true + deps_linkage: static dll: true generate_plugin_registry: true secure: true @@ -1312,6 +1313,7 @@ libs: - gpr - address_sorting - upb + deps_linkage: static dll: only - name: grpc_test_util build: private @@ -2216,6 +2218,7 @@ libs: - absl/strings:strings - absl/container:inlined_vector baselib: true + deps_linkage: static dll: true generate_plugin_registry: true secure: false From d2b917030f18bbd13a881fdaf0e8f27191f9f68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Sun, 28 Jun 2020 17:17:47 +0200 Subject: [PATCH 171/239] Fix typo --- src/python/grpcio/grpc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 303d89c6263..25f76b8a9d9 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -187,7 +187,7 @@ class Future(six.with_metaclass(abc.ABCMeta)): The callback will be passed this Future object describing the outcome of the computation. Callbacks will be invoked after the future is - terimated, whether successfully or not. + terminated, whether successfully or not. If the computation has already completed, the callback will be called immediately. From f027a4e3c936939786de559bf14290d75cdbd612 Mon Sep 17 00:00:00 2001 From: Karthik Ravi Shankar Date: Mon, 29 Jun 2020 11:01:40 -0700 Subject: [PATCH 172/239] Fix gRPC-C++.podspec file --- gRPC-C++.podspec | 1 - 1 file changed, 1 deletion(-) diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index f7316b70fcf..e7c994f2fe8 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -86,7 +86,6 @@ Pod::Spec.new do |s| 'include/grpcpp/create_channel.h', 'include/grpcpp/create_channel_impl.h', 'include/grpcpp/create_channel_posix.h', - 'include/grpcpp/create_channel_posix_impl.h', 'include/grpcpp/ext/health_check_service_server_builder_option.h', 'include/grpcpp/generic/async_generic_service.h', 'include/grpcpp/generic/generic_stub.h', From 4612834b2a225534c94d8076083d1405a58aa5dd Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Mon, 29 Jun 2020 14:30:52 -0700 Subject: [PATCH 173/239] Address David's comments. --- src/core/lib/security/security_connector/ssl_utils.cc | 3 --- src/core/tsi/ssl_transport_security.cc | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index dab4641b216..168a0a93233 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -67,9 +67,6 @@ static const char* cipher_suites = nullptr; // All cipher suites for default are compliant with HTTP2. GPR_GLOBAL_CONFIG_DEFINE_STRING( grpc_ssl_cipher_suites, - "TLS_AES_128_GCM_SHA256:" - "TLS_AES_256_GCM_SHA384:" - "TLS_CHACHA20_POLY1305_SHA256:" "ECDHE-ECDSA-AES128-GCM-SHA256:" "ECDHE-ECDSA-AES256-GCM-SHA384:" "ECDHE-RSA-AES128-GCM-SHA256:" diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index a16752e99de..b8bd60d36a6 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -1887,7 +1887,11 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options( return TSI_INVALID_ARGUMENT; } +#if OPENSSL_VERSION_NUMBER >= 0x10100000 ssl_context = SSL_CTX_new(TLS_method()); +#else + ssl_context = SSL_CTX_new(TLSv1_2_method()); +#endif result = tsi_set_min_and_max_tls_versions( ssl_context, options->min_tls_version, options->max_tls_version); if (result != TSI_OK) return result; @@ -2050,7 +2054,11 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options( for (i = 0; i < options->num_key_cert_pairs; i++) { do { +#if OPENSSL_VERSION_NUMBER >= 0x10100000 impl->ssl_contexts[i] = SSL_CTX_new(TLS_method()); +#else + impl->ssl_contexts[i] = SSL_CTX_new(TLSv1_2_method()); +#endif result = tsi_set_min_and_max_tls_versions(impl->ssl_contexts[i], options->min_tls_version, options->max_tls_version); From de075024a7cc19c98e58a5c4e928a53cd3acd74a Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Mon, 29 Jun 2020 14:53:07 -0700 Subject: [PATCH 174/239] Suppress exceptions from the __del__ of channel object --- src/python/grpcio/grpc/_channel.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index 3e8a6b75a9d..eff5d1a89c6 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -1123,10 +1123,12 @@ class _ChannelCallState(object): self.managed_calls = 0 def __del__(self): - if hasattr(self, - 'channel') and self.channel and cygrpc and cygrpc.StatusCode: + try: self.channel.close(cygrpc.StatusCode.cancelled, 'Channel deallocated!') + except (TypeError, AttributeError) as error: + logging.debug('Channel deallocation failed with: <%s>: %s', + type(error), str(error)) def _run_channel_spin_thread(state): From a3776a290077483ce542de1d23f0b63ecd14fe45 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Mon, 29 Jun 2020 15:39:28 -0700 Subject: [PATCH 175/239] Add back ciphersuites in ssl_utils.cc --- src/core/lib/security/security_connector/ssl_utils.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index 168a0a93233..dab4641b216 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -67,6 +67,9 @@ static const char* cipher_suites = nullptr; // All cipher suites for default are compliant with HTTP2. GPR_GLOBAL_CONFIG_DEFINE_STRING( grpc_ssl_cipher_suites, + "TLS_AES_128_GCM_SHA256:" + "TLS_AES_256_GCM_SHA384:" + "TLS_CHACHA20_POLY1305_SHA256:" "ECDHE-ECDSA-AES128-GCM-SHA256:" "ECDHE-ECDSA-AES256-GCM-SHA384:" "ECDHE-RSA-AES128-GCM-SHA256:" From 165ee5007a77e4afbaa48cd9a32851b6799419ce Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 29 Jun 2020 14:19:08 -0700 Subject: [PATCH 176/239] Replaced grpc::string with std::string --- doc/unit_testing.md | 2 +- .../cocoapods/HelloWorldCpp/ViewController.mm | 2 +- examples/cpp/metadata/greeter_client.cc | 2 +- include/grpcpp/channel_impl.h | 12 +- include/grpcpp/create_channel.h | 8 +- include/grpcpp/create_channel_impl.h | 6 +- include/grpcpp/create_channel_posix.h | 6 +- include/grpcpp/create_channel_posix_impl.h | 70 +++ .../ext/proto_server_reflection_plugin_impl.h | 4 +- include/grpcpp/ext/server_load_reporting.h | 2 +- .../grpcpp/ext/server_load_reporting_impl.h | 2 +- include/grpcpp/generic/generic_stub_impl.h | 26 +- include/grpcpp/grpcpp.h | 2 +- .../grpcpp/health_check_service_interface.h | 2 +- include/grpcpp/impl/channel_argument_option.h | 4 +- .../impl/codegen/async_generic_service.h | 16 +- include/grpcpp/impl/codegen/call_op_set.h | 22 +- .../grpcpp/impl/codegen/client_context_impl.h | 19 +- include/grpcpp/impl/codegen/config.h | 15 +- include/grpcpp/impl/codegen/interceptor.h | 5 +- .../grpcpp/impl/codegen/interceptor_common.h | 26 +- include/grpcpp/impl/codegen/metadata_map.h | 12 +- .../impl/codegen/security/auth_context.h | 7 +- .../grpcpp/impl/codegen/server_context_impl.h | 12 +- .../grpcpp/impl/codegen/server_interface.h | 4 +- include/grpcpp/impl/codegen/slice.h | 12 +- include/grpcpp/impl/codegen/status.h | 14 +- include/grpcpp/impl/codegen/string_ref.h | 4 +- include/grpcpp/impl/server_builder_plugin.h | 4 +- include/grpcpp/impl/server_initializer_impl.h | 2 +- include/grpcpp/resource_quota.h | 2 +- include/grpcpp/resource_quota_impl.h | 2 +- include/grpcpp/security/alts_context.h | 16 +- .../security/auth_metadata_processor_impl.h | 2 +- include/grpcpp/security/credentials.h | 12 +- include/grpcpp/security/credentials_impl.h | 58 ++- include/grpcpp/security/server_credentials.h | 6 +- .../grpcpp/security/server_credentials_impl.h | 3 +- .../grpcpp/security/tls_credentials_options.h | 36 +- include/grpcpp/server_builder.h | 14 +- include/grpcpp/server_builder_impl.h | 417 ++++++++++++++++++ include/grpcpp/server_impl.h | 8 +- .../grpcpp/support/channel_arguments_impl.h | 20 +- .../grpcpp/support/validate_service_config.h | 2 +- .../grpcpp/test/server_context_test_spouse.h | 10 +- src/compiler/config.h | 11 +- src/compiler/cpp_generator.cc | 233 +++++----- src/compiler/cpp_generator.h | 86 ++-- src/compiler/cpp_generator_helpers.h | 14 +- src/compiler/cpp_plugin.h | 28 +- src/compiler/csharp_generator.cc | 24 +- src/compiler/csharp_generator.h | 6 +- src/compiler/csharp_generator_helpers.h | 5 +- src/compiler/csharp_plugin.cc | 10 +- src/compiler/generator_helpers.h | 75 ++-- src/compiler/node_generator.cc | 57 ++- src/compiler/node_generator.h | 4 +- src/compiler/node_generator_helpers.h | 4 +- src/compiler/node_plugin.cc | 14 +- src/compiler/objective_c_generator.cc | 70 +-- src/compiler/objective_c_generator.h | 2 +- src/compiler/objective_c_generator_helpers.h | 56 +-- src/compiler/objective_c_plugin.cc | 74 ++-- src/compiler/php_generator.cc | 34 +- src/compiler/php_generator.h | 6 +- src/compiler/php_generator_helpers.h | 20 +- src/compiler/php_plugin.cc | 12 +- src/compiler/protobuf_plugin.h | 66 +-- src/compiler/python_generator.cc | 132 +++--- src/compiler/python_generator.h | 12 +- src/compiler/python_generator_helpers.h | 40 +- src/compiler/python_private_generator.h | 18 +- src/compiler/ruby_generator.cc | 34 +- src/compiler/ruby_generator.h | 2 +- src/compiler/ruby_generator_helpers-inl.h | 6 +- src/compiler/ruby_generator_map-inl.h | 10 +- src/compiler/ruby_generator_string-inl.h | 48 +- src/compiler/ruby_plugin.cc | 8 +- src/compiler/schema_interface.h | 58 +-- src/cpp/client/channel_cc.cc | 16 +- src/cpp/client/client_context.cc | 8 +- src/cpp/client/create_channel.cc | 6 +- src/cpp/client/create_channel_internal.cc | 2 +- src/cpp/client/create_channel_internal.h | 2 +- src/cpp/client/create_channel_posix.cc | 6 +- src/cpp/client/insecure_credentials.cc | 4 +- src/cpp/client/secure_credentials.cc | 18 +- src/cpp/client/secure_credentials.h | 8 +- src/cpp/common/alts_context.cc | 16 +- src/cpp/common/channel_arguments.cc | 22 +- src/cpp/common/resource_quota_cc.cc | 2 +- src/cpp/common/secure_auth_context.cc | 8 +- src/cpp/common/secure_auth_context.h | 8 +- src/cpp/common/secure_channel_arguments.cc | 6 +- src/cpp/common/tls_credentials_options.cc | 34 +- src/cpp/common/validate_service_config.cc | 5 +- src/cpp/common/version_cc.cc | 2 +- src/cpp/ext/proto_server_reflection.cc | 18 +- src/cpp/ext/proto_server_reflection.h | 10 +- src/cpp/ext/proto_server_reflection_plugin.cc | 4 +- src/cpp/server/channel_argument_option.cc | 14 +- .../channelz/channelz_service_plugin.cc | 5 +- .../external_connection_acceptor_impl.cc | 2 +- .../external_connection_acceptor_impl.h | 4 +- .../health/default_health_check_service.cc | 12 +- .../health/default_health_check_service.h | 17 +- src/cpp/server/insecure_server_credentials.cc | 2 +- .../server/load_reporter/load_data_store.cc | 50 +-- .../server/load_reporter/load_data_store.h | 112 +++-- src/cpp/server/load_reporter/load_reporter.cc | 60 +-- src/cpp/server/load_reporter/load_reporter.h | 24 +- .../load_reporter_async_service_impl.h | 6 +- ..._reporting_service_server_builder_plugin.h | 4 +- src/cpp/server/load_reporter/util.cc | 4 +- src/cpp/server/secure_server_credentials.cc | 2 +- src/cpp/server/secure_server_credentials.h | 2 +- src/cpp/server/server_builder.cc | 10 +- src/cpp/server/server_cc.cc | 6 +- src/cpp/server/server_context.cc | 14 +- .../src/cpp/common/version_cc.cc.template | 2 +- test/core/end2end/h2_ssl_cert_test.cc | 2 +- test/cpp/client/client_channel_stress_test.cc | 16 +- test/cpp/client/credentials_test.cc | 14 +- test/cpp/cocoapods/generic/generic.mm | 4 +- .../test/server_context_test_spouse_test.mm | 12 +- test/cpp/common/alts_util_test.cc | 10 +- test/cpp/common/channel_arguments_test.cc | 38 +- test/cpp/end2end/async_end2end_test.cc | 62 +-- test/cpp/end2end/cfstream_test.cc | 26 +- test/cpp/end2end/channelz_service_test.cc | 4 +- .../end2end/client_callback_end2end_test.cc | 44 +- .../client_interceptors_end2end_test.cc | 4 +- test/cpp/end2end/client_lb_end2end_test.cc | 18 +- test/cpp/end2end/end2end_test.cc | 66 +-- test/cpp/end2end/filter_end2end_test.cc | 6 +- test/cpp/end2end/flaky_network_test.cc | 30 +- test/cpp/end2end/generic_end2end_test.cc | 10 +- test/cpp/end2end/grpclb_end2end_test.cc | 32 +- .../end2end/health_service_end2end_test.cc | 24 +- test/cpp/end2end/hybrid_end2end_test.cc | 10 +- test/cpp/end2end/interceptors_util.cc | 2 +- test/cpp/end2end/interceptors_util.h | 2 +- .../end2end/message_allocator_end2end_test.cc | 12 +- test/cpp/end2end/mock_test.cc | 20 +- test/cpp/end2end/port_sharing_end2end_test.cc | 10 +- .../end2end/proto_server_reflection_test.cc | 10 +- .../cpp/end2end/server_builder_plugin_test.cc | 6 +- test/cpp/end2end/server_early_return_test.cc | 4 +- .../server_interceptors_end2end_test.cc | 2 +- .../server_load_reporting_end2end_test.cc | 11 +- .../end2end/service_config_end2end_test.cc | 16 +- test/cpp/end2end/shutdown_test.cc | 4 +- .../end2end/test_health_check_service_impl.cc | 2 +- .../end2end/test_health_check_service_impl.h | 4 +- test/cpp/end2end/test_service_impl.cc | 15 +- test/cpp/end2end/test_service_impl.h | 27 +- test/cpp/end2end/thread_stress_test.cc | 2 +- test/cpp/end2end/xds_end2end_test.cc | 36 +- test/cpp/grpclb/grpclb_api_test.cc | 12 +- test/cpp/interop/client.cc | 22 +- test/cpp/interop/client_helper.cc | 14 +- test/cpp/interop/client_helper.h | 18 +- test/cpp/interop/http2_client.cc | 12 +- test/cpp/interop/interop_client.cc | 83 ++-- test/cpp/interop/interop_client.h | 18 +- test/cpp/interop/interop_server.cc | 10 +- test/cpp/interop/stress_interop_client.cc | 2 +- test/cpp/interop/stress_interop_client.h | 6 +- test/cpp/interop/stress_test.cc | 24 +- .../ios/CronetTests/CppCronetEnd2EndTests.mm | 14 +- test/cpp/ios/CronetTests/TestHelper.h | 4 +- test/cpp/ios/CronetTests/TestHelper.mm | 14 +- .../callback_streaming_ping_pong.h | 2 +- .../microbenchmarks/callback_test_service.cc | 4 +- .../callback_unary_ping_pong.h | 2 +- .../fullstack_context_mutators.h | 36 +- test/cpp/microbenchmarks/fullstack_fixtures.h | 6 +- test/cpp/microbenchmarks/helpers.cc | 2 +- test/cpp/microbenchmarks/helpers.h | 4 +- test/cpp/qps/client.h | 8 +- test/cpp/qps/client_async.cc | 8 +- test/cpp/qps/driver.cc | 6 +- test/cpp/qps/driver.h | 6 +- test/cpp/qps/parse_json.cc | 14 +- test/cpp/qps/parse_json.h | 6 +- test/cpp/qps/qps_json_driver.cc | 4 +- test/cpp/qps/qps_worker.cc | 2 +- test/cpp/qps/qps_worker.h | 2 +- test/cpp/qps/report.cc | 2 +- test/cpp/qps/server.h | 2 +- .../load_reporter/load_data_store_test.cc | 48 +- .../load_reporter/load_reporter_test.cc | 46 +- test/cpp/server/server_builder_test.cc | 6 +- .../test/server_context_test_spouse_test.cc | 12 +- test/cpp/util/byte_buffer_proto_helper.cc | 6 +- test/cpp/util/channel_trace_proto_helper.cc | 2 +- test/cpp/util/cli_call.cc | 15 +- test/cpp/util/cli_call.h | 17 +- test/cpp/util/cli_call_test.cc | 8 +- test/cpp/util/cli_credentials.cc | 16 +- test/cpp/util/cli_credentials.h | 8 +- test/cpp/util/create_test_channel.cc | 29 +- test/cpp/util/create_test_channel.h | 24 +- test/cpp/util/error_details_test.cc | 12 +- test/cpp/util/grpc_cli.cc | 3 +- test/cpp/util/grpc_tool.cc | 86 ++-- test/cpp/util/grpc_tool.h | 2 +- test/cpp/util/grpc_tool_test.cc | 90 ++-- test/cpp/util/metrics_server.cc | 4 +- test/cpp/util/metrics_server.h | 2 +- test/cpp/util/proto_file_parser.cc | 67 ++- test/cpp/util/proto_file_parser.h | 46 +- .../proto_reflection_descriptor_database.cc | 4 +- .../proto_reflection_descriptor_database.h | 4 +- test/cpp/util/service_describer.cc | 23 +- test/cpp/util/service_describer.h | 12 +- test/cpp/util/slice_test.cc | 6 +- test/cpp/util/string_ref_helper.cc | 4 +- test/cpp/util/string_ref_helper.h | 2 +- test/cpp/util/test_credentials_provider.cc | 20 +- test/cpp/util/test_credentials_provider.h | 8 +- 221 files changed, 2427 insertions(+), 1959 deletions(-) create mode 100644 include/grpcpp/create_channel_posix_impl.h create mode 100644 include/grpcpp/server_builder_impl.h diff --git a/doc/unit_testing.md b/doc/unit_testing.md index 5672f7f65fd..72fb1f6f38c 100644 --- a/doc/unit_testing.md +++ b/doc/unit_testing.md @@ -102,7 +102,7 @@ class FakeClient { EchoRequest request; EchoResponse response; ClientContext context; - grpc::string msg("hello"); + std::string msg("hello"); std::unique_ptr> stream = stub_->BidiStream(&context); diff --git a/examples/cpp/helloworld/cocoapods/HelloWorldCpp/ViewController.mm b/examples/cpp/helloworld/cocoapods/HelloWorldCpp/ViewController.mm index 18a0972e320..36294848663 100644 --- a/examples/cpp/helloworld/cocoapods/HelloWorldCpp/ViewController.mm +++ b/examples/cpp/helloworld/cocoapods/HelloWorldCpp/ViewController.mm @@ -44,7 +44,7 @@ const uint8_t kMessage[] = CreateChannel("localhost:50051", grpc::InsecureChannelCredentials()); generic_stub_.reset(new grpc::GenericStub(channel)); - const grpc::string kMethodName("/helloworld.Greeter/SayHello"); + const std::string kMethodName("/helloworld.Greeter/SayHello"); void* got_tag; bool ok; diff --git a/examples/cpp/metadata/greeter_client.cc b/examples/cpp/metadata/greeter_client.cc index 80494389937..246c4af2739 100644 --- a/examples/cpp/metadata/greeter_client.cc +++ b/examples/cpp/metadata/greeter_client.cc @@ -60,7 +60,7 @@ class CustomHeaderClient { // Setting custom binary metadata char bytes[8] = {'\0', '\1', '\2', '\3', '\4', '\5', '\6', '\7'}; - context.AddMetadata("custom-bin", grpc::string(bytes, 8)); + context.AddMetadata("custom-bin", std::string(bytes, 8)); // The actual RPC. Status status = stub_->SayHello(&context, request, &reply); diff --git a/include/grpcpp/channel_impl.h b/include/grpcpp/channel_impl.h index 6cc63ba09aa..f1e4b89f106 100644 --- a/include/grpcpp/channel_impl.h +++ b/include/grpcpp/channel_impl.h @@ -38,7 +38,7 @@ class ChannelTestPeer; } // namespace testing std::shared_ptr<::grpc_impl::Channel> CreateChannelInternal( - const grpc::string& host, grpc_channel* c_channel, + const std::string& host, grpc_channel* c_channel, std::vector< std::unique_ptr> interceptor_creators); @@ -65,11 +65,11 @@ class Channel final : public ::grpc::ChannelInterface, grpc_connectivity_state GetState(bool try_to_connect) override; /// Returns the LB policy name, or the empty string if not yet available. - grpc::string GetLoadBalancingPolicyName() const; + std::string GetLoadBalancingPolicyName() const; /// Returns the service config in JSON form, or the empty string if /// not available. - grpc::string GetServiceConfigJSON() const; + std::string GetServiceConfigJSON() const; private: template @@ -77,12 +77,12 @@ class Channel final : public ::grpc::ChannelInterface, friend class ::grpc::testing::ChannelTestPeer; friend void experimental::ChannelResetConnectionBackoff(Channel* channel); friend std::shared_ptr grpc::CreateChannelInternal( - const grpc::string& host, grpc_channel* c_channel, + const std::string& host, grpc_channel* c_channel, std::vector> interceptor_creators); friend class ::grpc::internal::InterceptedChannel; - Channel(const grpc::string& host, grpc_channel* c_channel, + Channel(const std::string& host, grpc_channel* c_channel, std::vector> interceptor_creators); @@ -108,7 +108,7 @@ class Channel final : public ::grpc::ChannelInterface, ::grpc_impl::ClientContext* context, ::grpc_impl::CompletionQueue* cq, size_t interceptor_pos) override; - const grpc::string host_; + const std::string host_; grpc_channel* const c_channel_; // owned // mu_ protects callback_cq_ (the per-channel callbackable completion queue) diff --git a/include/grpcpp/create_channel.h b/include/grpcpp/create_channel.h index 9b257ace945..bfd018b26f0 100644 --- a/include/grpcpp/create_channel.h +++ b/include/grpcpp/create_channel.h @@ -25,14 +25,13 @@ namespace grpc { static inline std::shared_ptr<::grpc::Channel> CreateChannel( - const grpc::string& target, + const std::string& target, const std::shared_ptr& creds) { return ::grpc_impl::CreateChannelImpl(target, creds); } static inline std::shared_ptr<::grpc::Channel> CreateCustomChannel( - const grpc::string& target, - const std::shared_ptr& creds, + const std::string& target, const std::shared_ptr& creds, const ChannelArguments& args) { return ::grpc_impl::CreateCustomChannelImpl(target, creds, args); } @@ -41,8 +40,7 @@ namespace experimental { static inline std::shared_ptr<::grpc::Channel> CreateCustomChannelWithInterceptors( - const grpc::string& target, - const std::shared_ptr& creds, + const std::string& target, const std::shared_ptr& creds, const ChannelArguments& args, std::vector< std::unique_ptr> diff --git a/include/grpcpp/create_channel_impl.h b/include/grpcpp/create_channel_impl.h index 02896e66444..ac68728692c 100644 --- a/include/grpcpp/create_channel_impl.h +++ b/include/grpcpp/create_channel_impl.h @@ -35,7 +35,7 @@ namespace grpc_impl { /// hold an object or is invalid, a lame channel (one on which all operations /// fail) is returned. std::shared_ptr<::grpc::Channel> CreateChannelImpl( - const grpc::string& target, + const std::string& target, const std::shared_ptr<::grpc::ChannelCredentials>& creds); /// Create a new \em custom \a Channel pointing to \a target. @@ -49,7 +49,7 @@ std::shared_ptr<::grpc::Channel> CreateChannelImpl( /// fail) is returned. /// \param args Options for channel creation. std::shared_ptr<::grpc::Channel> CreateCustomChannelImpl( - const grpc::string& target, + const std::string& target, const std::shared_ptr<::grpc::ChannelCredentials>& creds, const ::grpc::ChannelArguments& args); @@ -66,7 +66,7 @@ namespace experimental { /// fail) is returned. /// \param args Options for channel creation. std::shared_ptr<::grpc::Channel> CreateCustomChannelWithInterceptors( - const grpc::string& target, + const std::string& target, const std::shared_ptr& creds, const ::grpc::ChannelArguments& args, std::vector< diff --git a/include/grpcpp/create_channel_posix.h b/include/grpcpp/create_channel_posix.h index 36b8f6ab8ac..e8c82b37d24 100644 --- a/include/grpcpp/create_channel_posix.h +++ b/include/grpcpp/create_channel_posix.h @@ -34,7 +34,7 @@ namespace grpc { /// \param target The name of the target. /// \param fd The file descriptor representing a socket. std::shared_ptr CreateInsecureChannelFromFd( - const grpc::string& target, int fd); + const std::string& target, int fd); /// Create a new \a Channel communicating over given file descriptor with custom /// channel arguments. @@ -43,7 +43,7 @@ std::shared_ptr CreateInsecureChannelFromFd( /// \param fd The file descriptor representing a socket. /// \param args Options for channel creation. std::shared_ptr CreateCustomInsecureChannelFromFd( - const grpc::string& target, int fd, const grpc::ChannelArguments& args); + const std::string& target, int fd, const grpc::ChannelArguments& args); namespace experimental { @@ -56,7 +56,7 @@ namespace experimental { /// \param interceptor_creators Vector of interceptor factory objects. std::shared_ptr CreateCustomInsecureChannelWithInterceptorsFromFd( - const grpc::string& target, int fd, const grpc::ChannelArguments& args, + const std::string& target, int fd, const grpc::ChannelArguments& args, std::unique_ptr>> interceptor_creators); diff --git a/include/grpcpp/create_channel_posix_impl.h b/include/grpcpp/create_channel_posix_impl.h new file mode 100644 index 00000000000..61415f01a32 --- /dev/null +++ b/include/grpcpp/create_channel_posix_impl.h @@ -0,0 +1,70 @@ +/* + * + * Copyright 2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H +#define GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H + +#include + +#include +#include +#include + +namespace grpc_impl { + +#ifdef GPR_SUPPORT_CHANNELS_FROM_FD + +/// Create a new \a Channel communicating over the given file descriptor. +/// +/// \param target The name of the target. +/// \param fd The file descriptor representing a socket. +std::shared_ptr CreateInsecureChannelFromFd( + const std::string& target, int fd); + +/// Create a new \a Channel communicating over given file descriptor with custom +/// channel arguments. +/// +/// \param target The name of the target. +/// \param fd The file descriptor representing a socket. +/// \param args Options for channel creation. +std::shared_ptr CreateCustomInsecureChannelFromFd( + const std::string& target, int fd, const grpc::ChannelArguments& args); + +namespace experimental { + +/// Create a new \a Channel communicating over given file descriptor with custom +/// channel arguments. +/// +/// \param target The name of the target. +/// \param fd The file descriptor representing a socket. +/// \param args Options for channel creation. +/// \param interceptor_creators Vector of interceptor factory objects. +std::shared_ptr +CreateCustomInsecureChannelWithInterceptorsFromFd( + const std::string& target, int fd, const grpc::ChannelArguments& args, + std::unique_ptr>> + interceptor_creators); + +} // namespace experimental + +#endif // GPR_SUPPORT_CHANNELS_FROM_FD + +} // namespace grpc_impl + +#endif // GRPCPP_CREATE_CHANNEL_POSIX_IMPL_H diff --git a/include/grpcpp/ext/proto_server_reflection_plugin_impl.h b/include/grpcpp/ext/proto_server_reflection_plugin_impl.h index a06fe14cdd7..bc51c2dda37 100644 --- a/include/grpcpp/ext/proto_server_reflection_plugin_impl.h +++ b/include/grpcpp/ext/proto_server_reflection_plugin_impl.h @@ -34,10 +34,10 @@ namespace reflection { class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { public: ProtoServerReflectionPlugin(); - ::grpc::string name() override; + ::std::string name() override; void InitServer(::grpc_impl::ServerInitializer* si) override; void Finish(::grpc_impl::ServerInitializer* si) override; - void ChangeArguments(const ::grpc::string& name, void* value) override; + void ChangeArguments(const ::std::string& name, void* value) override; bool has_async_methods() const override; bool has_sync_methods() const override; diff --git a/include/grpcpp/ext/server_load_reporting.h b/include/grpcpp/ext/server_load_reporting.h index 0c39a9e9830..ecc40c3df27 100644 --- a/include/grpcpp/ext/server_load_reporting.h +++ b/include/grpcpp/ext/server_load_reporting.h @@ -30,7 +30,7 @@ typedef ::grpc_impl::load_reporter::experimental:: LoadReportingServiceServerBuilderOption; static inline void AddLoadReportingCost(grpc::ServerContext* ctx, - const grpc::string& cost_name, + const std::string& cost_name, double cost_value) { ::grpc_impl::load_reporter::experimental::AddLoadReportingCost(ctx, cost_name, cost_value); diff --git a/include/grpcpp/ext/server_load_reporting_impl.h b/include/grpcpp/ext/server_load_reporting_impl.h index 1b27e0af6be..30eeef0ccd4 100644 --- a/include/grpcpp/ext/server_load_reporting_impl.h +++ b/include/grpcpp/ext/server_load_reporting_impl.h @@ -45,7 +45,7 @@ class LoadReportingServiceServerBuilderOption // Adds the load reporting cost with \a cost_name and \a cost_value in the // trailing metadata of the server context. void AddLoadReportingCost(grpc::ServerContext* ctx, - const grpc::string& cost_name, double cost_value); + const std::string& cost_name, double cost_value); } // namespace experimental } // namespace load_reporter diff --git a/include/grpcpp/generic/generic_stub_impl.h b/include/grpcpp/generic/generic_stub_impl.h index 906a5d25305..2573d7397c9 100644 --- a/include/grpcpp/generic/generic_stub_impl.h +++ b/include/grpcpp/generic/generic_stub_impl.h @@ -53,7 +53,7 @@ class TemplatedGenericStub final { /// The return value only indicates whether or not registration of the call /// succeeded (i.e. the call won't proceed if the return value is nullptr). std::unique_ptr> - PrepareCall(ClientContext* context, const grpc::string& method, + PrepareCall(ClientContext* context, const std::string& method, CompletionQueue* cq) { return CallInternal(channel_.get(), context, method, cq, false, nullptr); } @@ -63,7 +63,7 @@ class TemplatedGenericStub final { /// The return value only indicates whether or not registration of the call /// succeeded (i.e. the call won't proceed if the return value is nullptr). std::unique_ptr> PrepareUnaryCall( - ClientContext* context, const grpc::string& method, + ClientContext* context, const std::string& method, const RequestType& request, CompletionQueue* cq) { return std::unique_ptr>( internal::ClientAsyncResponseReaderFactory::Create( @@ -80,7 +80,7 @@ class TemplatedGenericStub final { /// The return value only indicates whether or not registration of the call /// succeeded (i.e. the call won't proceed if the return value is nullptr). std::unique_ptr> Call( - ClientContext* context, const grpc::string& method, CompletionQueue* cq, + ClientContext* context, const std::string& method, CompletionQueue* cq, void* tag) { return CallInternal(channel_.get(), context, method, cq, true, tag); } @@ -88,7 +88,7 @@ class TemplatedGenericStub final { #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL /// Setup and start a unary call to a named method \a method using /// \a context and specifying the \a request and \a response buffers. - void UnaryCall(ClientContext* context, const grpc::string& method, + void UnaryCall(ClientContext* context, const std::string& method, const RequestType* request, ResponseType* response, std::function on_completion) { UnaryCallInternal(context, method, request, response, @@ -99,7 +99,7 @@ class TemplatedGenericStub final { /// \a context and specifying the \a request and \a response buffers. /// Like any other reactor-based RPC, it will not be activated until /// StartCall is invoked on its reactor. - void PrepareUnaryCall(ClientContext* context, const grpc::string& method, + void PrepareUnaryCall(ClientContext* context, const std::string& method, const RequestType* request, ResponseType* response, ClientUnaryReactor* reactor) { PrepareUnaryCallInternal(context, method, request, response, reactor); @@ -109,7 +109,7 @@ class TemplatedGenericStub final { /// \a reactor . Like any other bidi streaming RPC, it will not be activated /// until StartCall is invoked on its reactor. void PrepareBidiStreamingCall( - ClientContext* context, const grpc::string& method, + ClientContext* context, const std::string& method, ClientBidiReactor* reactor) { PrepareBidiStreamingCallInternal(context, method, reactor); } @@ -124,7 +124,7 @@ class TemplatedGenericStub final { /// Setup and start a unary call to a named method \a method using /// \a context and specifying the \a request and \a response buffers. - void UnaryCall(ClientContext* context, const grpc::string& method, + void UnaryCall(ClientContext* context, const std::string& method, const RequestType* request, ResponseType* response, std::function on_completion) { stub_->UnaryCallInternal(context, method, request, response, @@ -135,7 +135,7 @@ class TemplatedGenericStub final { /// \a context and specifying the \a request and \a response buffers. /// Like any other reactor-based RPC, it will not be activated until /// StartCall is invoked on its reactor. - void PrepareUnaryCall(ClientContext* context, const grpc::string& method, + void PrepareUnaryCall(ClientContext* context, const std::string& method, const RequestType* request, ResponseType* response, ClientUnaryReactor* reactor) { stub_->PrepareUnaryCallInternal(context, method, request, response, @@ -146,7 +146,7 @@ class TemplatedGenericStub final { /// \a reactor . Like any other bidi streaming RPC, it will not be activated /// until StartCall is invoked on its reactor. void PrepareBidiStreamingCall( - ClientContext* context, const grpc::string& method, + ClientContext* context, const std::string& method, ClientBidiReactor* reactor) { stub_->PrepareBidiStreamingCallInternal(context, method, reactor); } @@ -163,7 +163,7 @@ class TemplatedGenericStub final { private: std::shared_ptr channel_; - void UnaryCallInternal(ClientContext* context, const grpc::string& method, + void UnaryCallInternal(ClientContext* context, const std::string& method, const RequestType* request, ResponseType* response, std::function on_completion) { internal::CallbackUnaryCall( @@ -174,7 +174,7 @@ class TemplatedGenericStub final { } void PrepareUnaryCallInternal(ClientContext* context, - const grpc::string& method, + const std::string& method, const RequestType* request, ResponseType* response, ClientUnaryReactor* reactor) { @@ -186,7 +186,7 @@ class TemplatedGenericStub final { } void PrepareBidiStreamingCallInternal( - ClientContext* context, const grpc::string& method, + ClientContext* context, const std::string& method, ClientBidiReactor* reactor) { internal::ClientCallbackReaderWriterFactory:: Create(channel_.get(), @@ -197,7 +197,7 @@ class TemplatedGenericStub final { std::unique_ptr> CallInternal(grpc::ChannelInterface* channel, ClientContext* context, - const grpc::string& method, CompletionQueue* cq, bool start, + const std::string& method, CompletionQueue* cq, bool start, void* tag) { return std::unique_ptr>( internal::ClientAsyncReaderWriterFactory:: diff --git a/include/grpcpp/grpcpp.h b/include/grpcpp/grpcpp.h index 41dc09581cd..8912f99f092 100644 --- a/include/grpcpp/grpcpp.h +++ b/include/grpcpp/grpcpp.h @@ -63,7 +63,7 @@ namespace grpc { /// Return gRPC library version. -grpc::string Version(); +std::string Version(); } // namespace grpc #endif // GRPCPP_GRPCPP_H diff --git a/include/grpcpp/health_check_service_interface.h b/include/grpcpp/health_check_service_interface.h index dfd4c3983af..9eab8fc115f 100644 --- a/include/grpcpp/health_check_service_interface.h +++ b/include/grpcpp/health_check_service_interface.h @@ -33,7 +33,7 @@ class HealthCheckServiceInterface { virtual ~HealthCheckServiceInterface() {} /// Set or change the serving status of the given \a service_name. - virtual void SetServingStatus(const grpc::string& service_name, + virtual void SetServingStatus(const std::string& service_name, bool serving) = 0; /// Apply to all registered service names. virtual void SetServingStatus(bool serving) = 0; diff --git a/include/grpcpp/impl/channel_argument_option.h b/include/grpcpp/impl/channel_argument_option.h index 0c4882478e2..335072a2d30 100644 --- a/include/grpcpp/impl/channel_argument_option.h +++ b/include/grpcpp/impl/channel_argument_option.h @@ -28,9 +28,9 @@ namespace grpc { std::unique_ptr MakeChannelArgumentOption( - const grpc::string& name, const grpc::string& value); + const std::string& name, const std::string& value); std::unique_ptr MakeChannelArgumentOption( - const grpc::string& name, int value); + const std::string& name, int value); } // namespace grpc diff --git a/include/grpcpp/impl/codegen/async_generic_service.h b/include/grpcpp/impl/codegen/async_generic_service.h index 05f10c67f25..81d5e8ed314 100644 --- a/include/grpcpp/impl/codegen/async_generic_service.h +++ b/include/grpcpp/impl/codegen/async_generic_service.h @@ -40,8 +40,8 @@ typedef ::grpc_impl::ServerAsyncWriter GenericServerAsyncWriter; class GenericServerContext final : public ::grpc_impl::ServerContext { public: - const grpc::string& method() const { return method_; } - const grpc::string& host() const { return host_; } + const std::string& method() const { return method_; } + const std::string& host() const { return host_; } private: friend class grpc_impl::Server; @@ -53,8 +53,8 @@ class GenericServerContext final : public ::grpc_impl::ServerContext { ::grpc_impl::ServerContext::Clear(); } - grpc::string method_; - grpc::string host_; + std::string method_; + std::string host_; }; // A generic service at the server side accepts all RPC methods and hosts. It is @@ -102,8 +102,8 @@ using ServerGenericBidiReactor = class GenericCallbackServerContext final : public ::grpc_impl::CallbackServerContext { public: - const grpc::string& method() const { return method_; } - const grpc::string& host() const { return host_; } + const std::string& method() const { return method_; } + const std::string& host() const { return host_; } private: friend class ::grpc_impl::Server; @@ -115,8 +115,8 @@ class GenericCallbackServerContext final ::grpc_impl::CallbackServerContext::Clear(); } - grpc::string method_; - grpc::string host_; + std::string method_; + std::string host_; }; /// \a CallbackGenericService is the base class for generic services implemented diff --git a/include/grpcpp/impl/codegen/call_op_set.h b/include/grpcpp/impl/codegen/call_op_set.h index ba91404eb0c..46073746604 100644 --- a/include/grpcpp/impl/codegen/call_op_set.h +++ b/include/grpcpp/impl/codegen/call_op_set.h @@ -51,8 +51,8 @@ class CallHook; // TODO(yangg) if the map is changed before we send, the pointers will be a // mess. Make sure it does not happen. inline grpc_metadata* FillMetadataArray( - const std::multimap& metadata, - size_t* metadata_count, const grpc::string& optional_error_details) { + const std::multimap& metadata, + size_t* metadata_count, const std::string& optional_error_details) { *metadata_count = metadata.size() + (optional_error_details.empty() ? 0 : 1); if (*metadata_count == 0) { return nullptr; @@ -219,7 +219,7 @@ class CallOpSendInitialMetadata { maybe_compression_level_.is_set = false; } - void SendInitialMetadata(std::multimap* metadata, + void SendInitialMetadata(std::multimap* metadata, uint32_t flags) { maybe_compression_level_.is_set = false; send_ = true; @@ -275,7 +275,7 @@ class CallOpSendInitialMetadata { bool send_; uint32_t flags_; size_t initial_metadata_count_; - std::multimap* metadata_map_; + std::multimap* metadata_map_; grpc_metadata* initial_metadata_; struct { bool is_set; @@ -654,7 +654,7 @@ class CallOpServerSendStatus { CallOpServerSendStatus() : send_status_available_(false) {} void ServerSendStatus( - std::multimap* trailing_metadata, + std::multimap* trailing_metadata, const Status& status) { send_error_details_ = status.error_details(); metadata_map_ = trailing_metadata; @@ -708,10 +708,10 @@ class CallOpServerSendStatus { bool hijacked_ = false; bool send_status_available_; grpc_status_code send_status_code_; - grpc::string send_error_details_; - grpc::string send_error_message_; + std::string send_error_details_; + std::string send_error_message_; size_t trailing_metadata_count_; - std::multimap* metadata_map_; + std::multimap* metadata_map_; grpc_metadata* trailing_metadata_; grpc_slice error_message_slice_; }; @@ -798,9 +798,9 @@ class CallOpClientRecvStatus { *recv_status_ = Status(static_cast(status_code_), GRPC_SLICE_IS_EMPTY(error_message_) - ? grpc::string() - : grpc::string(GRPC_SLICE_START_PTR(error_message_), - GRPC_SLICE_END_PTR(error_message_)), + ? std::string() + : std::string(GRPC_SLICE_START_PTR(error_message_), + GRPC_SLICE_END_PTR(error_message_)), metadata_map_->GetBinaryErrorDetails()); if (debug_error_string_ != nullptr) { client_context_->set_debug_error_string(debug_error_string_); diff --git a/include/grpcpp/impl/codegen/client_context_impl.h b/include/grpcpp/impl/codegen/client_context_impl.h index f44b1f764bb..9b6d1755edb 100644 --- a/include/grpcpp/impl/codegen/client_context_impl.h +++ b/include/grpcpp/impl/codegen/client_context_impl.h @@ -220,8 +220,7 @@ class ClientContext { /// ASCII-Header -> Header-Name ASCII-Value /// Header-Name -> 1*( %x30-39 / %x61-7A / "_" / "-" / ".") ; 0-9 a-z _ - . /// ASCII-Value -> 1*( %x20-%x7E ) ; space and printable ASCII - void AddMetadata(const grpc::string& meta_key, - const grpc::string& meta_value); + void AddMetadata(const std::string& meta_key, const std::string& meta_value); /// Return a collection of initial metadata key-value pairs. Note that keys /// may happen more than once (ie, a \a std::multimap is returned). @@ -297,7 +296,7 @@ class ClientContext { /// Set the per call authority header (see /// https://tools.ietf.org/html/rfc7540#section-8.1.2.3). - void set_authority(const grpc::string& authority) { authority_ = authority; } + void set_authority(const std::string& authority) { authority_ = authority; } /// Return the authentication context for the associated client call. /// It is only valid to call this during the lifetime of the client call. @@ -364,7 +363,7 @@ class ClientContext { /// functionality. Instead, use auth_context. /// /// \return The call's peer URI. - grpc::string peer() const; + std::string peer() const; /// Sets the census context. /// It is only valid to call this before the client call is created. A common @@ -409,7 +408,7 @@ class ClientContext { /// if status is not ok() for an RPC, this will return a detailed string /// of the gRPC Core error that led to the failure. It should not be relied /// upon for anything other than gaining more debug data in failure cases. - grpc::string debug_error_string() const { return debug_error_string_; } + std::string debug_error_string() const { return debug_error_string_; } private: // Disallow copy and assign. @@ -448,7 +447,7 @@ class ClientContext { friend class ::grpc_impl::internal::ClientContextAccessor; // Used by friend class CallOpClientRecvStatus - void set_debug_error_string(const grpc::string& debug_error_string) { + void set_debug_error_string(const std::string& debug_error_string) { debug_error_string_ = debug_error_string; } @@ -477,7 +476,7 @@ class ClientContext { (initial_metadata_corked_ ? GRPC_INITIAL_METADATA_CORKED : 0); } - grpc::string authority() { return authority_; } + std::string authority() { return authority_; } void SendCancelToInterceptors(); @@ -495,11 +494,11 @@ class ClientContext { grpc_call* call_; bool call_canceled_; gpr_timespec deadline_; - grpc::string authority_; + std::string authority_; std::shared_ptr creds_; mutable std::shared_ptr auth_context_; struct census_context* census_context_; - std::multimap send_initial_metadata_; + std::multimap send_initial_metadata_; mutable grpc::internal::MetadataMap recv_initial_metadata_; mutable grpc::internal::MetadataMap trailing_metadata_; @@ -509,7 +508,7 @@ class ClientContext { grpc_compression_algorithm compression_algorithm_; bool initial_metadata_corked_; - grpc::string debug_error_string_; + std::string debug_error_string_; grpc::experimental::ClientRpcInfo rpc_info_; }; diff --git a/include/grpcpp/impl/codegen/config.h b/include/grpcpp/impl/codegen/config.h index 37f0fd1faf8..7c398d14aaa 100644 --- a/include/grpcpp/impl/codegen/config.h +++ b/include/grpcpp/impl/codegen/config.h @@ -19,10 +19,7 @@ #ifndef GRPCPP_IMPL_CODEGEN_CONFIG_H #define GRPCPP_IMPL_CODEGEN_CONFIG_H -#ifndef GRPC_CUSTOM_STRING #include -#define GRPC_CUSTOM_STRING std::string -#endif /// The following macros are deprecated and appear only for users /// with PB files generated using gRPC 1.0.x plugins. They should @@ -30,11 +27,17 @@ #define GRPC_OVERRIDE override // deprecated #define GRPC_FINAL final // deprecated -namespace grpc { +#ifdef GRPC_CUSTOM_STRING +#warning GRPC_CUSTOM_STRING is no longer supported. Please use std::string. +#endif -typedef GRPC_CUSTOM_STRING string; +namespace grpc { -using std::to_string; +// Using grpc::string and grpc::to_string is discouraged in favor of +// std::string and std::to_string. This is only for legacy code using +// them explictly. +using std::string; // deprecated +using std::to_string; // deprecated } // namespace grpc diff --git a/include/grpcpp/impl/codegen/interceptor.h b/include/grpcpp/impl/codegen/interceptor.h index 71c32d70f4c..58fb36c81c5 100644 --- a/include/grpcpp/impl/codegen/interceptor.h +++ b/include/grpcpp/impl/codegen/interceptor.h @@ -157,8 +157,7 @@ class InterceptorBatchMethods { /// Returns a modifiable multimap of the initial metadata to be sent. Valid /// for PRE_SEND_INITIAL_METADATA interceptions. A value of nullptr indicates /// that this field is not valid. - virtual std::multimap* - GetSendInitialMetadata() = 0; + virtual std::multimap* GetSendInitialMetadata() = 0; /// Returns the status to be sent. Valid for PRE_SEND_STATUS interceptions. virtual Status GetSendStatus() = 0; @@ -170,7 +169,7 @@ class InterceptorBatchMethods { /// Returns a modifiable multimap of the trailing metadata to be sent. Valid /// for PRE_SEND_STATUS interceptions. A value of nullptr indicates /// that this field is not valid. - virtual std::multimap* + virtual std::multimap* GetSendTrailingMetadata() = 0; /// Returns a pointer to the modifiable received message. Note that the diff --git a/include/grpcpp/impl/codegen/interceptor_common.h b/include/grpcpp/impl/codegen/interceptor_common.h index c87c8034c77..b6a9fc3abb2 100644 --- a/include/grpcpp/impl/codegen/interceptor_common.h +++ b/include/grpcpp/impl/codegen/interceptor_common.h @@ -100,7 +100,7 @@ class InterceptorBatchMethodsImpl bool GetSendMessageStatus() override { return !*fail_send_message_; } - std::multimap* GetSendInitialMetadata() override { + std::multimap* GetSendInitialMetadata() override { return send_initial_metadata_; } @@ -115,8 +115,7 @@ class InterceptorBatchMethodsImpl *error_message_ = status.error_message(); } - std::multimap* GetSendTrailingMetadata() - override { + std::multimap* GetSendTrailingMetadata() override { return send_trailing_metadata_; } @@ -150,19 +149,19 @@ class InterceptorBatchMethodsImpl } void SetSendInitialMetadata( - std::multimap* metadata) { + std::multimap* metadata) { send_initial_metadata_ = metadata; } - void SetSendStatus(grpc_status_code* code, grpc::string* error_details, - grpc::string* error_message) { + void SetSendStatus(grpc_status_code* code, std::string* error_details, + std::string* error_message) { code_ = code; error_details_ = error_details; error_message_ = error_message; } void SetSendTrailingMetadata( - std::multimap* metadata) { + std::multimap* metadata) { send_trailing_metadata_ = metadata; } @@ -398,13 +397,13 @@ class InterceptorBatchMethodsImpl const void** orig_send_message_ = nullptr; std::function serializer_; - std::multimap* send_initial_metadata_; + std::multimap* send_initial_metadata_; grpc_status_code* code_ = nullptr; - grpc::string* error_details_ = nullptr; - grpc::string* error_message_ = nullptr; + std::string* error_details_ = nullptr; + std::string* error_message_ = nullptr; - std::multimap* send_trailing_metadata_ = nullptr; + std::multimap* send_trailing_metadata_ = nullptr; void* recv_message_ = nullptr; bool* hijacked_recv_message_failed_ = nullptr; @@ -472,7 +471,7 @@ class CancelInterceptorBatchMethods "has a Cancel notification"); } - std::multimap* GetSendInitialMetadata() override { + std::multimap* GetSendInitialMetadata() override { GPR_CODEGEN_ASSERT(false && "It is illegal to call GetSendInitialMetadata on a " "method which has a Cancel notification"); @@ -493,8 +492,7 @@ class CancelInterceptorBatchMethods return; } - std::multimap* GetSendTrailingMetadata() - override { + std::multimap* GetSendTrailingMetadata() override { GPR_CODEGEN_ASSERT(false && "It is illegal to call GetSendTrailingMetadata on a " "method which has a Cancel notification"); diff --git a/include/grpcpp/impl/codegen/metadata_map.h b/include/grpcpp/impl/codegen/metadata_map.h index 9cec54d9f01..9b9957bb4c1 100644 --- a/include/grpcpp/impl/codegen/metadata_map.h +++ b/include/grpcpp/impl/codegen/metadata_map.h @@ -36,12 +36,12 @@ class MetadataMap { ~MetadataMap() { Destroy(); } - grpc::string GetBinaryErrorDetails() { + std::string GetBinaryErrorDetails() { // if filled_, extract from the multimap for O(log(n)) if (filled_) { auto iter = map_.find(kBinaryErrorDetailsKey); if (iter != map_.end()) { - return grpc::string(iter->second.begin(), iter->second.length()); + return std::string(iter->second.begin(), iter->second.length()); } } // if not yet filled, take the O(n) lookup to avoid allocating the @@ -54,13 +54,13 @@ class MetadataMap { GRPC_SLICE_START_PTR(arr_.metadata[i].key)), kBinaryErrorDetailsKey, GRPC_SLICE_LENGTH(arr_.metadata[i].key)) == 0) { - return grpc::string(reinterpret_cast( - GRPC_SLICE_START_PTR(arr_.metadata[i].value)), - GRPC_SLICE_LENGTH(arr_.metadata[i].value)); + return std::string(reinterpret_cast( + GRPC_SLICE_START_PTR(arr_.metadata[i].value)), + GRPC_SLICE_LENGTH(arr_.metadata[i].value)); } } } - return grpc::string(); + return std::string(); } std::multimap* map() { diff --git a/include/grpcpp/impl/codegen/security/auth_context.h b/include/grpcpp/impl/codegen/security/auth_context.h index 6c0089ca424..728be37fb9f 100644 --- a/include/grpcpp/impl/codegen/security/auth_context.h +++ b/include/grpcpp/impl/codegen/security/auth_context.h @@ -74,19 +74,18 @@ class AuthContext { /// It is, in general, comprised of one or more properties (in which case they /// have the same name). virtual std::vector GetPeerIdentity() const = 0; - virtual grpc::string GetPeerIdentityPropertyName() const = 0; + virtual std::string GetPeerIdentityPropertyName() const = 0; /// Returns all the property values with the given name. virtual std::vector FindPropertyValues( - const grpc::string& name) const = 0; + const std::string& name) const = 0; /// Iteration over all the properties. virtual AuthPropertyIterator begin() const = 0; virtual AuthPropertyIterator end() const = 0; /// Mutation functions: should only be used by an AuthMetadataProcessor. - virtual void AddProperty(const grpc::string& key, - const string_ref& value) = 0; + virtual void AddProperty(const std::string& key, const string_ref& value) = 0; virtual bool SetPeerIdentityPropertyName(const string& name) = 0; }; diff --git a/include/grpcpp/impl/codegen/server_context_impl.h b/include/grpcpp/impl/codegen/server_context_impl.h index 77d1c026b5d..7310c23b385 100644 --- a/include/grpcpp/impl/codegen/server_context_impl.h +++ b/include/grpcpp/impl/codegen/server_context_impl.h @@ -151,7 +151,7 @@ class ServerContextBase { /// ASCII-Header -> Header-Name ASCII-Value /// Header-Name -> 1*( %x30-39 / %x61-7A / "_" / "-" / ".") ; 0-9 a-z _ - . /// ASCII-Value -> 1*( %x20-%x7E ) ; space and printable ASCII - void AddInitialMetadata(const grpc::string& key, const grpc::string& value); + void AddInitialMetadata(const std::string& key, const std::string& value); /// Add the (\a key, \a value) pair to the initial metadata /// associated with a server call. These are made available at the client @@ -172,7 +172,7 @@ class ServerContextBase { /// ASCII-Header -> Header-Name ASCII-Value /// Header-Name -> 1*( %x30-39 / %x61-7A / "_" / "-" / ".") ; 0-9 a-z _ - . /// ASCII-Value -> 1*( %x20-%x7E ) ; space and printable ASCII - void AddTrailingMetadata(const grpc::string& key, const grpc::string& value); + void AddTrailingMetadata(const std::string& key, const std::string& value); /// Return whether this RPC failed before the server could provide its status /// back to the client. This could be because of explicit API cancellation @@ -252,7 +252,7 @@ class ServerContextBase { void set_compression_algorithm(grpc_compression_algorithm algorithm); /// Set the serialized load reporting costs in \a cost_data for the call. - void SetLoadReportingCosts(const std::vector& cost_data); + void SetLoadReportingCosts(const std::vector& cost_data); /// Return the authentication context for this server call. /// @@ -268,7 +268,7 @@ class ServerContextBase { /// WARNING: this value is never authenticated or subject to any security /// related code. It must not be used for any authentication related /// functionality. Instead, use auth_context. - grpc::string peer() const; + std::string peer() const; /// Get the census context associated with this server call. const struct census_context* census_context() const; @@ -430,8 +430,8 @@ class ServerContextBase { bool sent_initial_metadata_; mutable std::shared_ptr auth_context_; mutable ::grpc::internal::MetadataMap client_metadata_; - std::multimap initial_metadata_; - std::multimap trailing_metadata_; + std::multimap initial_metadata_; + std::multimap trailing_metadata_; bool compression_level_set_; grpc_compression_level compression_level_; diff --git a/include/grpcpp/impl/codegen/server_interface.h b/include/grpcpp/impl/codegen/server_interface.h index 80fba7fe57d..3294c4037b5 100644 --- a/include/grpcpp/impl/codegen/server_interface.h +++ b/include/grpcpp/impl/codegen/server_interface.h @@ -127,7 +127,7 @@ class ServerInterface : public internal::CallHook { /// Register a service. This call does not take ownership of the service. /// The service must exist for the lifetime of the Server instance. - virtual bool RegisterService(const grpc::string* host, Service* service) = 0; + virtual bool RegisterService(const std::string* host, Service* service) = 0; /// Register a generic service. This call does not take ownership of the /// service. The service must exist for the lifetime of the Server instance. @@ -172,7 +172,7 @@ class ServerInterface : public internal::CallHook { /// \return bound port number on success, 0 on failure. /// /// \warning It's an error to call this method on an already started server. - virtual int AddListeningPort(const grpc::string& addr, + virtual int AddListeningPort(const std::string& addr, grpc_impl::ServerCredentials* creds) = 0; /// Start the server. diff --git a/include/grpcpp/impl/codegen/slice.h b/include/grpcpp/impl/codegen/slice.h index 8966559dc85..1ef093ec00a 100644 --- a/include/grpcpp/impl/codegen/slice.h +++ b/include/grpcpp/impl/codegen/slice.h @@ -58,7 +58,7 @@ class Slice final { reinterpret_cast(buf), len)) {} /// Construct a slice from a copied string - Slice(const grpc::string& str) + Slice(const std::string& str) : slice_(g_core_codegen_interface->grpc_slice_from_copied_buffer( str.c_str(), str.length())) {} @@ -123,17 +123,17 @@ inline grpc::string_ref StringRefFromSlice(const grpc_slice* slice) { GRPC_SLICE_LENGTH(*slice)); } -inline grpc::string StringFromCopiedSlice(grpc_slice slice) { - return grpc::string(reinterpret_cast(GRPC_SLICE_START_PTR(slice)), - GRPC_SLICE_LENGTH(slice)); +inline std::string StringFromCopiedSlice(grpc_slice slice) { + return std::string(reinterpret_cast(GRPC_SLICE_START_PTR(slice)), + GRPC_SLICE_LENGTH(slice)); } -inline grpc_slice SliceReferencingString(const grpc::string& str) { +inline grpc_slice SliceReferencingString(const std::string& str) { return g_core_codegen_interface->grpc_slice_from_static_buffer(str.data(), str.length()); } -inline grpc_slice SliceFromCopiedString(const grpc::string& str) { +inline grpc_slice SliceFromCopiedString(const std::string& str) { return g_core_codegen_interface->grpc_slice_from_copied_buffer(str.data(), str.length()); } diff --git a/include/grpcpp/impl/codegen/status.h b/include/grpcpp/impl/codegen/status.h index e625a76b15d..9a6cf89b17f 100644 --- a/include/grpcpp/impl/codegen/status.h +++ b/include/grpcpp/impl/codegen/status.h @@ -88,14 +88,14 @@ class Status { /// Construct an instance with associated \a code and \a error_message. /// It is an error to construct an OK status with non-empty \a error_message. - Status(StatusCode code, const grpc::string& error_message) + Status(StatusCode code, const std::string& error_message) : code_(code), error_message_(error_message) {} /// Construct an instance with \a code, \a error_message and /// \a error_details. It is an error to construct an OK status with non-empty /// \a error_message and/or \a error_details. - Status(StatusCode code, const grpc::string& error_message, - const grpc::string& error_details) + Status(StatusCode code, const std::string& error_message, + const std::string& error_details) : code_(code), error_message_(error_message), binary_error_details_(error_details) {} @@ -109,10 +109,10 @@ class Status { /// Return the instance's error code. StatusCode error_code() const { return code_; } /// Return the instance's error message. - grpc::string error_message() const { return error_message_; } + std::string error_message() const { return error_message_; } /// Return the (binary) error details. // Usually it contains a serialized google.rpc.Status proto. - grpc::string error_details() const { return binary_error_details_; } + std::string error_details() const { return binary_error_details_; } /// Is the status OK? bool ok() const { return code_ == StatusCode::OK; } @@ -124,8 +124,8 @@ class Status { private: StatusCode code_; - grpc::string error_message_; - grpc::string binary_error_details_; + std::string error_message_; + std::string binary_error_details_; }; } // namespace grpc diff --git a/include/grpcpp/impl/codegen/string_ref.h b/include/grpcpp/impl/codegen/string_ref.h index 5d55fc41805..6bdcfc1a6a6 100644 --- a/include/grpcpp/impl/codegen/string_ref.h +++ b/include/grpcpp/impl/codegen/string_ref.h @@ -59,7 +59,7 @@ class string_ref { string_ref(const char* s) : data_(s), length_(strlen(s)) {} string_ref(const char* s, size_t l) : data_(s), length_(l) {} - string_ref(const grpc::string& s) : data_(s.data()), length_(s.length()) {} + string_ref(const std::string& s) : data_(s.data()), length_(s.length()) {} /// iterators const_iterator begin() const { return data_; } @@ -138,7 +138,7 @@ inline bool operator>(string_ref x, string_ref y) { return x.compare(y) > 0; } inline bool operator>=(string_ref x, string_ref y) { return x.compare(y) >= 0; } inline std::ostream& operator<<(std::ostream& out, const string_ref& string) { - return out << grpc::string(string.begin(), string.end()); + return out << std::string(string.begin(), string.end()); } } // namespace grpc diff --git a/include/grpcpp/impl/server_builder_plugin.h b/include/grpcpp/impl/server_builder_plugin.h index daed32142b1..482729fc667 100644 --- a/include/grpcpp/impl/server_builder_plugin.h +++ b/include/grpcpp/impl/server_builder_plugin.h @@ -38,7 +38,7 @@ class ServerBuilder; class ServerBuilderPlugin { public: virtual ~ServerBuilderPlugin() {} - virtual grpc::string name() = 0; + virtual std::string name() = 0; /// UpdateServerBuilder will be called at an early stage in /// ServerBuilder::BuildAndStart(), right after the ServerBuilderOptions have @@ -54,7 +54,7 @@ class ServerBuilderPlugin { /// ChangeArguments is an interface that can be used in /// ServerBuilderOption::UpdatePlugins - virtual void ChangeArguments(const grpc::string& name, void* value) = 0; + virtual void ChangeArguments(const std::string& name, void* value) = 0; /// UpdateChannelArguments will be called in ServerBuilder::BuildAndStart(), /// before the Server instance is created. diff --git a/include/grpcpp/impl/server_initializer_impl.h b/include/grpcpp/impl/server_initializer_impl.h index 0e2c65f4af4..649bde15a78 100644 --- a/include/grpcpp/impl/server_initializer_impl.h +++ b/include/grpcpp/impl/server_initializer_impl.h @@ -43,7 +43,7 @@ class ServerInitializer { return true; } - const std::vector* GetServiceList() { + const std::vector* GetServiceList() { return &server_->services_; } diff --git a/include/grpcpp/resource_quota.h b/include/grpcpp/resource_quota.h index 3c75b271e6d..e51121329be 100644 --- a/include/grpcpp/resource_quota.h +++ b/include/grpcpp/resource_quota.h @@ -34,7 +34,7 @@ namespace grpc { class ResourceQuota final : private ::grpc::GrpcLibraryCodegen { public: /// \param name - a unique name for this ResourceQuota. - explicit ResourceQuota(const grpc::string& name); + explicit ResourceQuota(const std::string& name); ResourceQuota(); ~ResourceQuota(); diff --git a/include/grpcpp/resource_quota_impl.h b/include/grpcpp/resource_quota_impl.h index 16c0e35385b..b93ec04be8d 100644 --- a/include/grpcpp/resource_quota_impl.h +++ b/include/grpcpp/resource_quota_impl.h @@ -34,7 +34,7 @@ namespace grpc_impl { class ResourceQuota final : private ::grpc::GrpcLibraryCodegen { public: /// \param name - a unique name for this ResourceQuota. - explicit ResourceQuota(const grpc::string& name); + explicit ResourceQuota(const std::string& name); ResourceQuota(); ~ResourceQuota(); diff --git a/include/grpcpp/security/alts_context.h b/include/grpcpp/security/alts_context.h index 9208730dbc1..e8e2aca8018 100644 --- a/include/grpcpp/security/alts_context.h +++ b/include/grpcpp/security/alts_context.h @@ -44,19 +44,19 @@ class AltsContext { AltsContext& operator=(const AltsContext&) = default; AltsContext(const AltsContext&) = default; - grpc::string application_protocol() const; - grpc::string record_protocol() const; - grpc::string peer_service_account() const; - grpc::string local_service_account() const; + std::string application_protocol() const; + std::string record_protocol() const; + std::string peer_service_account() const; + std::string local_service_account() const; grpc_security_level security_level() const; RpcProtocolVersions peer_rpc_versions() const; private: // TODO(ZhenLian): Also plumb field peer_attributes when it is in use - grpc::string application_protocol_; - grpc::string record_protocol_; - grpc::string peer_service_account_; - grpc::string local_service_account_; + std::string application_protocol_; + std::string record_protocol_; + std::string peer_service_account_; + std::string local_service_account_; grpc_security_level security_level_ = GRPC_SECURITY_NONE; RpcProtocolVersions peer_rpc_versions_ = {{0, 0}, {0, 0}}; }; diff --git a/include/grpcpp/security/auth_metadata_processor_impl.h b/include/grpcpp/security/auth_metadata_processor_impl.h index ae454200622..ba80e488dc6 100644 --- a/include/grpcpp/security/auth_metadata_processor_impl.h +++ b/include/grpcpp/security/auth_metadata_processor_impl.h @@ -33,7 +33,7 @@ namespace grpc_impl { class AuthMetadataProcessor { public: typedef std::multimap InputMetadata; - typedef std::multimap OutputMetadata; + typedef std::multimap OutputMetadata; virtual ~AuthMetadataProcessor() {} diff --git a/include/grpcpp/security/credentials.h b/include/grpcpp/security/credentials.h index 0449017e77b..45c6d55546f 100644 --- a/include/grpcpp/security/credentials.h +++ b/include/grpcpp/security/credentials.h @@ -51,25 +51,25 @@ constexpr long kMaxAuthTokenLifetimeSecs = static inline std::shared_ptr ServiceAccountJWTAccessCredentials( - const grpc::string& json_key, + const std::string& json_key, long token_lifetime_seconds = grpc::kMaxAuthTokenLifetimeSecs) { return ::grpc_impl::ServiceAccountJWTAccessCredentials( json_key, token_lifetime_seconds); } static inline std::shared_ptr -GoogleRefreshTokenCredentials(const grpc::string& json_refresh_token) { +GoogleRefreshTokenCredentials(const std::string& json_refresh_token) { return ::grpc_impl::GoogleRefreshTokenCredentials(json_refresh_token); } static inline std::shared_ptr -AccessTokenCredentials(const grpc::string& access_token) { +AccessTokenCredentials(const std::string& access_token) { return ::grpc_impl::AccessTokenCredentials(access_token); } static inline std::shared_ptr GoogleIAMCredentials( - const grpc::string& authorization_token, - const grpc::string& authority_selector) { + const std::string& authorization_token, + const std::string& authority_selector) { return ::grpc_impl::GoogleIAMCredentials(authorization_token, authority_selector); } @@ -104,7 +104,7 @@ namespace experimental { typedef ::grpc_impl::experimental::StsCredentialsOptions StsCredentialsOptions; static inline grpc::Status StsCredentialsOptionsFromJson( - const grpc::string& json_string, StsCredentialsOptions* options) { + const std::string& json_string, StsCredentialsOptions* options) { return ::grpc_impl::experimental::StsCredentialsOptionsFromJson(json_string, options); } diff --git a/include/grpcpp/security/credentials_impl.h b/include/grpcpp/security/credentials_impl.h index 2148cf8d32b..84206a688bc 100644 --- a/include/grpcpp/security/credentials_impl.h +++ b/include/grpcpp/security/credentials_impl.h @@ -43,14 +43,12 @@ class SecureCallCredentials; class SecureChannelCredentials; std::shared_ptr CreateCustomChannelImpl( - const grpc::string& target, - const std::shared_ptr& creds, + const std::string& target, const std::shared_ptr& creds, const ChannelArguments& args); namespace experimental { std::shared_ptr CreateCustomChannelWithInterceptors( - const grpc::string& target, - const std::shared_ptr& creds, + const std::string& target, const std::shared_ptr& creds, const ChannelArguments& args, std::vector< std::unique_ptr> @@ -77,13 +75,13 @@ class ChannelCredentials : private grpc::GrpcLibraryCodegen { private: friend std::shared_ptr CreateCustomChannelImpl( - const grpc::string& target, + const std::string& target, const std::shared_ptr& creds, const ChannelArguments& args); friend std::shared_ptr grpc_impl::experimental::CreateCustomChannelWithInterceptors( - const grpc::string& target, + const std::string& target, const std::shared_ptr& creds, const ChannelArguments& args, std::vector CreateChannelImpl( - const grpc::string& target, const ChannelArguments& args) = 0; + const std::string& target, const ChannelArguments& args) = 0; // This function should have been a pure virtual function, but it is // implemented as a virtual function so that it does not break API. virtual std::shared_ptr CreateChannelWithInterceptors( - const grpc::string& /*target*/, const ChannelArguments& /*args*/, + const std::string& /*target*/, const ChannelArguments& /*args*/, std::vector> /*interceptor_creators*/) { @@ -115,7 +113,7 @@ class CallCredentials : private grpc::GrpcLibraryCodegen { /// Apply this instance's credentials to \a call. virtual bool ApplyToCall(grpc_call* call) = 0; - virtual grpc::string DebugString() { + virtual std::string DebugString() { return "CallCredentials did not provide a debug string"; } @@ -138,16 +136,16 @@ struct SslCredentialsOptions { /// roots can be overridden using the \a GRPC_DEFAULT_SSL_ROOTS_FILE_PATH /// environment variable pointing to a file on the file system containing the /// roots. - grpc::string pem_root_certs; + std::string pem_root_certs; /// The buffer containing the PEM encoding of the client's private key. This /// parameter can be empty if the client does not have a private key. - grpc::string pem_private_key; + std::string pem_private_key; /// The buffer containing the PEM encoding of the client's certificate chain. /// This parameter can be empty if the client does not have a certificate /// chain. - grpc::string pem_cert_chain; + std::string pem_cert_chain; }; // Factories for building different types of Credentials The functions may @@ -183,7 +181,7 @@ constexpr long kMaxAuthTokenLifetimeSecs = 3600; /// (JWT) created with this credentials. It should not exceed /// \a kMaxAuthTokenLifetimeSecs or will be cropped to this value. std::shared_ptr ServiceAccountJWTAccessCredentials( - const grpc::string& json_key, + const std::string& json_key, long token_lifetime_seconds = grpc_impl::kMaxAuthTokenLifetimeSecs); /// Builds refresh token credentials. @@ -195,7 +193,7 @@ std::shared_ptr ServiceAccountJWTAccessCredentials( /// service being able to impersonate your client for requests to Google /// services. std::shared_ptr GoogleRefreshTokenCredentials( - const grpc::string& json_refresh_token); + const std::string& json_refresh_token); /// Builds access token credentials. /// access_token is an oauth2 access token that was fetched using an out of band @@ -206,7 +204,7 @@ std::shared_ptr GoogleRefreshTokenCredentials( /// service being able to impersonate your client for requests to Google /// services. std::shared_ptr AccessTokenCredentials( - const grpc::string& access_token); + const std::string& access_token); /// Builds IAM credentials. /// @@ -215,8 +213,8 @@ std::shared_ptr AccessTokenCredentials( /// service being able to impersonate your client for requests to Google /// services. std::shared_ptr GoogleIAMCredentials( - const grpc::string& authorization_token, - const grpc::string& authority_selector); + const std::string& authorization_token, + const std::string& authority_selector); /// Combines a channel credentials and a call credentials into a composite /// channel credentials. @@ -252,9 +250,9 @@ class MetadataCredentialsPlugin { virtual grpc::Status GetMetadata( grpc::string_ref service_url, grpc::string_ref method_name, const grpc::AuthContext& channel_auth_context, - std::multimap* metadata) = 0; + std::multimap* metadata) = 0; - virtual grpc::string DebugString() { + virtual std::string DebugString() { return "MetadataCredentialsPlugin did not provide a debug string"; } }; @@ -270,15 +268,15 @@ namespace experimental { /// caller to ensure that the subject and actor tokens are refreshed on disk at /// the specified paths. struct StsCredentialsOptions { - grpc::string token_exchange_service_uri; // Required. - grpc::string resource; // Optional. - grpc::string audience; // Optional. - grpc::string scope; // Optional. - grpc::string requested_token_type; // Optional. - grpc::string subject_token_path; // Required. - grpc::string subject_token_type; // Required. - grpc::string actor_token_path; // Optional. - grpc::string actor_token_type; // Optional. + std::string token_exchange_service_uri; // Required. + std::string resource; // Optional. + std::string audience; // Optional. + std::string scope; // Optional. + std::string requested_token_type; // Optional. + std::string subject_token_path; // Required. + std::string subject_token_type; // Required. + std::string actor_token_path; // Optional. + std::string actor_token_type; // Optional. }; /// Creates STS Options from a JSON string. The JSON schema is as follows: @@ -317,7 +315,7 @@ struct StsCredentialsOptions { /// } /// } /// } -grpc::Status StsCredentialsOptionsFromJson(const grpc::string& json_string, +grpc::Status StsCredentialsOptionsFromJson(const std::string& json_string, StsCredentialsOptions* options); /// Creates STS credentials options from the $STS_CREDENTIALS environment @@ -337,7 +335,7 @@ struct AltsCredentialsOptions { /// service accounts of target endpoint that will be acceptable /// by the client. If service accounts are provided and none of them matches /// that of the server, authentication will fail. - std::vector target_service_accounts; + std::vector target_service_accounts; }; /// Builds ALTS Credentials given ALTS specific options diff --git a/include/grpcpp/security/server_credentials.h b/include/grpcpp/security/server_credentials.h index f41c05d59f2..5228ac138cc 100644 --- a/include/grpcpp/security/server_credentials.h +++ b/include/grpcpp/security/server_credentials.h @@ -40,10 +40,10 @@ struct SslServerCredentialsOptions { : force_client_auth(false), client_certificate_request(request_type) {} struct PemKeyCertPair { - grpc::string private_key; - grpc::string cert_chain; + std::string private_key; + std::string cert_chain; }; - grpc::string pem_root_certs; + std::string pem_root_certs; std::vector pem_key_cert_pairs; /// \warning Deprecated bool force_client_auth; diff --git a/include/grpcpp/security/server_credentials_impl.h b/include/grpcpp/security/server_credentials_impl.h index efd7cf66759..7e9e784f6e5 100644 --- a/include/grpcpp/security/server_credentials_impl.h +++ b/include/grpcpp/security/server_credentials_impl.h @@ -54,8 +54,7 @@ class ServerCredentials { /// /// \return bound port number on success, 0 on failure. // TODO(dgq): the "port" part seems to be a misnomer. - virtual int AddPortToServer(const grpc::string& addr, - grpc_server* server) = 0; + virtual int AddPortToServer(const std::string& addr, grpc_server* server) = 0; }; /// Builds SSL ServerCredentials given SSL specific options diff --git a/include/grpcpp/security/tls_credentials_options.h b/include/grpcpp/security/tls_credentials_options.h index d29e56eee40..8df44e37f93 100644 --- a/include/grpcpp/security/tls_credentials_options.h +++ b/include/grpcpp/security/tls_credentials_options.h @@ -44,12 +44,12 @@ namespace experimental { class TlsKeyMaterialsConfig { public: struct PemKeyCertPair { - grpc::string private_key; - grpc::string cert_chain; + std::string private_key; + std::string cert_chain; }; /** Getters for member fields. **/ - const grpc::string pem_root_certs() const { return pem_root_certs_; } + const std::string pem_root_certs() const { return pem_root_certs_; } const std::vector& pem_key_cert_pair_list() const { return pem_key_cert_pair_list_; } @@ -57,17 +57,17 @@ class TlsKeyMaterialsConfig { /** Setter for key materials that will be called by the user. Ownership of the * arguments will not be transferred. **/ - void set_pem_root_certs(const grpc::string& pem_root_certs); + void set_pem_root_certs(const std::string& pem_root_certs); void add_pem_key_cert_pair(const PemKeyCertPair& pem_key_cert_pair); void set_key_materials( - const grpc::string& pem_root_certs, + const std::string& pem_root_certs, const std::vector& pem_key_cert_pair_list); void set_version(int version) { version_ = version; }; private: int version_ = 0; std::vector pem_key_cert_pair_list_; - grpc::string pem_root_certs_; + std::string pem_root_certs_; }; /** TLS credential reload arguments, wraps grpc_tls_credential_reload_arg. It is @@ -90,21 +90,21 @@ class TlsCredentialReloadArg { void* cb_user_data() const; bool is_pem_key_cert_pair_list_empty() const; grpc_ssl_certificate_config_reload_status status() const; - grpc::string error_details() const; + std::string error_details() const; /** Setters for member fields. Ownership of the arguments will not be * transferred. **/ void set_cb_user_data(void* cb_user_data); - void set_pem_root_certs(const grpc::string& pem_root_certs); + void set_pem_root_certs(const std::string& pem_root_certs); void add_pem_key_cert_pair( const TlsKeyMaterialsConfig::PemKeyCertPair& pem_key_cert_pair); - void set_key_materials(const grpc::string& pem_root_certs, + void set_key_materials(const std::string& pem_root_certs, std::vector pem_key_cert_pair_list); void set_key_materials_config( const std::shared_ptr& key_materials_config); void set_status(grpc_ssl_certificate_config_reload_status status); - void set_error_details(const grpc::string& error_details); + void set_error_details(const std::string& error_details); /** Calls the C arg's callback function. **/ void OnCredentialReloadDoneCallback(); @@ -187,20 +187,20 @@ class TlsServerAuthorizationCheckArg { /** Getters for member fields. **/ void* cb_user_data() const; int success() const; - grpc::string target_name() const; - grpc::string peer_cert() const; - grpc::string peer_cert_full_chain() const; + std::string target_name() const; + std::string peer_cert() const; + std::string peer_cert_full_chain() const; grpc_status_code status() const; - grpc::string error_details() const; + std::string error_details() const; /** Setters for member fields. **/ void set_cb_user_data(void* cb_user_data); void set_success(int success); - void set_target_name(const grpc::string& target_name); - void set_peer_cert(const grpc::string& peer_cert); - void set_peer_cert_full_chain(const grpc::string& peer_cert_full_chain); + void set_target_name(const std::string& target_name); + void set_peer_cert(const std::string& peer_cert); + void set_peer_cert_full_chain(const std::string& peer_cert_full_chain); void set_status(grpc_status_code status); - void set_error_details(const grpc::string& error_details); + void set_error_details(const std::string& error_details); /** Calls the C arg's callback function. **/ void OnServerAuthorizationCheckDoneCallback(); diff --git a/include/grpcpp/server_builder.h b/include/grpcpp/server_builder.h index 746bda90a0a..2ebf6c2716f 100644 --- a/include/grpcpp/server_builder.h +++ b/include/grpcpp/server_builder.h @@ -129,7 +129,7 @@ class ServerBuilder { /// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort /// does not modify this pointer. ServerBuilder& AddListeningPort( - const grpc::string& addr_uri, + const std::string& addr_uri, std::shared_ptr creds, int* selected_port = nullptr); @@ -173,7 +173,7 @@ class ServerBuilder { /// The service must exist for the lifetime of the \a Server instance /// returned by \a BuildAndStart(). Only matches requests with :authority \a /// host - ServerBuilder& RegisterService(const grpc::string& host, + ServerBuilder& RegisterService(const std::string& host, grpc::Service* service); /// Register a generic service. @@ -242,7 +242,7 @@ class ServerBuilder { /// Add a channel argument (an escape hatch to tuning core library parameters /// directly) template - ServerBuilder& AddChannelArgument(const grpc::string& arg, const T& value) { + ServerBuilder& AddChannelArgument(const std::string& arg, const T& value) { return SetOption(grpc::MakeChannelArgumentOption(arg, value)); } @@ -311,17 +311,17 @@ class ServerBuilder { protected: /// Experimental, to be deprecated struct Port { - grpc::string addr; + std::string addr; std::shared_ptr creds; int* selected_port; }; /// Experimental, to be deprecated - typedef std::unique_ptr HostString; + typedef std::unique_ptr HostString; struct NamedService { explicit NamedService(grpc::Service* s) : service(s) {} - NamedService(const grpc::string& h, grpc::Service* s) - : host(new grpc::string(h)), service(s) {} + NamedService(const std::string& h, grpc::Service* s) + : host(new std::string(h)), service(s) {} HostString host; grpc::Service* service; }; diff --git a/include/grpcpp/server_builder_impl.h b/include/grpcpp/server_builder_impl.h new file mode 100644 index 00000000000..c86aa8eef4c --- /dev/null +++ b/include/grpcpp/server_builder_impl.h @@ -0,0 +1,417 @@ +/* + * + * Copyright 2015-2016 gRPC authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#ifndef GRPCPP_SERVER_BUILDER_IMPL_H +#define GRPCPP_SERVER_BUILDER_IMPL_H + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +struct grpc_resource_quota; + +namespace grpc_impl { + +class CompletionQueue; +class Server; +class ServerCompletionQueue; +class ServerCredentials; +} // namespace grpc_impl + +namespace grpc { + +class AsyncGenericService; +class ResourceQuota; +class Service; +namespace testing { +class ServerBuilderPluginTest; +} // namespace testing + +namespace internal { +class ExternalConnectionAcceptorImpl; +} // namespace internal + +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL +namespace experimental { +#endif +class CallbackGenericService; +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL +} // namespace experimental +#endif + +namespace experimental { +// EXPERIMENTAL API: +// Interface for a grpc server to build transports with connections created out +// of band. +// See ServerBuilder's AddExternalConnectionAcceptor API. +class ExternalConnectionAcceptor { + public: + struct NewConnectionParameters { + int listener_fd = -1; + int fd = -1; + ByteBuffer read_buffer; // data intended for the grpc server + }; + virtual ~ExternalConnectionAcceptor() {} + // If called before grpc::Server is started or after it is shut down, the new + // connection will be closed. + virtual void HandleNewConnection(NewConnectionParameters* p) = 0; +}; + +} // namespace experimental +} // namespace grpc + +namespace grpc_impl { + +/// A builder class for the creation and startup of \a grpc::Server instances. +class ServerBuilder { + public: + ServerBuilder(); + virtual ~ServerBuilder(); + + ////////////////////////////////////////////////////////////////////////////// + // Primary API's + + /// Return a running server which is ready for processing calls. + /// Before calling, one typically needs to ensure that: + /// 1. a service is registered - so that the server knows what to serve + /// (via RegisterService, or RegisterAsyncGenericService) + /// 2. a listening port has been added - so the server knows where to receive + /// traffic (via AddListeningPort) + /// 3. [for async api only] completion queues have been added via + /// AddCompletionQueue + /// + /// Will return a nullptr on errors. + virtual std::unique_ptr BuildAndStart(); + + /// Register a service. This call does not take ownership of the service. + /// The service must exist for the lifetime of the \a Server instance returned + /// by \a BuildAndStart(). + /// Matches requests with any :authority + ServerBuilder& RegisterService(grpc::Service* service); + + /// Enlists an endpoint \a addr (port with an optional IP address) to + /// bind the \a grpc::Server object to be created to. + /// + /// It can be invoked multiple times. + /// + /// \param addr_uri The address to try to bind to the server in URI form. If + /// the scheme name is omitted, "dns:///" is assumed. To bind to any address, + /// please use IPv6 any, i.e., [::]:, which also accepts IPv4 + /// connections. Valid values include dns:///localhost:1234, / + /// 192.168.1.1:31416, dns:///[::1]:27182, etc.). + /// \param creds The credentials associated with the server. + /// \param selected_port[out] If not `nullptr`, gets populated with the port + /// number bound to the \a grpc::Server for the corresponding endpoint after + /// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort + /// does not modify this pointer. + ServerBuilder& AddListeningPort( + const std::string& addr_uri, + std::shared_ptr creds, + int* selected_port = nullptr); + + /// Add a completion queue for handling asynchronous services. + /// + /// Best performance is typically obtained by using one thread per polling + /// completion queue. + /// + /// Caller is required to shutdown the server prior to shutting down the + /// returned completion queue. Caller is also required to drain the + /// completion queue after shutting it down. A typical usage scenario: + /// + /// // While building the server: + /// ServerBuilder builder; + /// ... + /// cq_ = builder.AddCompletionQueue(); + /// server_ = builder.BuildAndStart(); + /// + /// // While shutting down the server; + /// server_->Shutdown(); + /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! + /// // Drain the cq_ that was created + /// void* ignored_tag; + /// bool ignored_ok; + /// while (cq_->Next(&ignored_tag, &ignored_ok)) { } + /// + /// \param is_frequently_polled This is an optional parameter to inform gRPC + /// library about whether this completion queue would be frequently polled + /// (i.e. by calling \a Next() or \a AsyncNext()). The default value is + /// 'true' and is the recommended setting. Setting this to 'false' (i.e. + /// not polling the completion queue frequently) will have a significantly + /// negative performance impact and hence should not be used in production + /// use cases. + std::unique_ptr AddCompletionQueue( + bool is_frequently_polled = true); + + ////////////////////////////////////////////////////////////////////////////// + // Less commonly used RegisterService variants + + /// Register a service. This call does not take ownership of the service. + /// The service must exist for the lifetime of the \a Server instance + /// returned by \a BuildAndStart(). Only matches requests with :authority \a + /// host + ServerBuilder& RegisterService(const std::string& host, + grpc::Service* service); + + /// Register a generic service. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterAsyncGenericService( + grpc::AsyncGenericService* service); + + ////////////////////////////////////////////////////////////////////////////// + // Fine control knobs + + /// Set max receive message size in bytes. + /// The default is GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH. + ServerBuilder& SetMaxReceiveMessageSize(int max_receive_message_size) { + max_receive_message_size_ = max_receive_message_size; + return *this; + } + + /// Set max send message size in bytes. + /// The default is GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH. + ServerBuilder& SetMaxSendMessageSize(int max_send_message_size) { + max_send_message_size_ = max_send_message_size; + return *this; + } + + /// \deprecated For backward compatibility. + ServerBuilder& SetMaxMessageSize(int max_message_size) { + return SetMaxReceiveMessageSize(max_message_size); + } + + /// Set the support status for compression algorithms. All algorithms are + /// enabled by default. + /// + /// Incoming calls compressed with an unsupported algorithm will fail with + /// \a GRPC_STATUS_UNIMPLEMENTED. + ServerBuilder& SetCompressionAlgorithmSupportStatus( + grpc_compression_algorithm algorithm, bool enabled); + + /// The default compression level to use for all channel calls in the + /// absence of a call-specific level. + ServerBuilder& SetDefaultCompressionLevel(grpc_compression_level level); + + /// The default compression algorithm to use for all channel calls in the + /// absence of a call-specific level. Note that it overrides any compression + /// level set by \a SetDefaultCompressionLevel. + ServerBuilder& SetDefaultCompressionAlgorithm( + grpc_compression_algorithm algorithm); + + /// Set the attached buffer pool for this server + ServerBuilder& SetResourceQuota(const grpc::ResourceQuota& resource_quota); + + ServerBuilder& SetOption(std::unique_ptr option); + + /// Options for synchronous servers. + enum SyncServerOption { + NUM_CQS, ///< Number of completion queues. + MIN_POLLERS, ///< Minimum number of polling threads. + MAX_POLLERS, ///< Maximum number of polling threads. + CQ_TIMEOUT_MSEC ///< Completion queue timeout in milliseconds. + }; + + /// Only useful if this is a Synchronous server. + ServerBuilder& SetSyncServerOption(SyncServerOption option, int value); + + /// Add a channel argument (an escape hatch to tuning core library parameters + /// directly) + template + ServerBuilder& AddChannelArgument(const std::string& arg, const T& value) { + return SetOption(grpc::MakeChannelArgumentOption(arg, value)); + } + + /// For internal use only: Register a ServerBuilderPlugin factory function. + static void InternalAddPluginFactory( + std::unique_ptr (*CreatePlugin)()); + + /// Enable a server workaround. Do not use unless you know what the workaround + /// does. For explanation and detailed descriptions of workarounds, see + /// doc/workarounds.md. + ServerBuilder& EnableWorkaround(grpc_workaround_list id); + + /// NOTE: class experimental_type is not part of the public API of this class. + /// TODO(yashykt): Integrate into public API when this is no longer + /// experimental. + class experimental_type { + public: + explicit experimental_type(grpc_impl::ServerBuilder* builder) + : builder_(builder) {} + + void SetInterceptorCreators( + std::vector> + interceptor_creators) { + builder_->interceptor_creators_ = std::move(interceptor_creators); + } + +#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL + /// Register a generic service that uses the callback API. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterCallbackGenericService( + grpc::experimental::CallbackGenericService* service); +#endif + + enum class ExternalConnectionType { + FROM_FD = 0 // in the form of a file descriptor + }; + + /// Register an acceptor to handle the externally accepted connection in + /// grpc server. The returned acceptor can be used to pass the connection + /// to grpc server, where a channel will be created with the provided + /// server credentials. + std::unique_ptr + AddExternalConnectionAcceptor(ExternalConnectionType type, + std::shared_ptr creds); + + private: + ServerBuilder* builder_; + }; + +#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + /// Register a generic service that uses the callback API. + /// Matches requests with any :authority + /// This is mostly useful for writing generic gRPC Proxies where the exact + /// serialization format is unknown + ServerBuilder& RegisterCallbackGenericService( + grpc::CallbackGenericService* service); +#endif + + /// NOTE: The function experimental() is not stable public API. It is a view + /// to the experimental components of this class. It may be changed or removed + /// at any time. + experimental_type experimental() { return experimental_type(this); } + + protected: + /// Experimental, to be deprecated + struct Port { + std::string addr; + std::shared_ptr creds; + int* selected_port; + }; + + /// Experimental, to be deprecated + typedef std::unique_ptr HostString; + struct NamedService { + explicit NamedService(grpc::Service* s) : service(s) {} + NamedService(const std::string& h, grpc::Service* s) + : host(new std::string(h)), service(s) {} + HostString host; + grpc::Service* service; + }; + + /// Experimental, to be deprecated + std::vector ports() { return ports_; } + + /// Experimental, to be deprecated + std::vector services() { + std::vector service_refs; + for (auto& ptr : services_) { + service_refs.push_back(ptr.get()); + } + return service_refs; + } + + /// Experimental, to be deprecated + std::vector options() { + std::vector option_refs; + for (auto& ptr : options_) { + option_refs.push_back(ptr.get()); + } + return option_refs; + } + + private: + friend class ::grpc::testing::ServerBuilderPluginTest; + + struct SyncServerSettings { + SyncServerSettings() + : num_cqs(1), min_pollers(1), max_pollers(2), cq_timeout_msec(10000) {} + + /// Number of server completion queues to create to listen to incoming RPCs. + int num_cqs; + + /// Minimum number of threads per completion queue that should be listening + /// to incoming RPCs. + int min_pollers; + + /// Maximum number of threads per completion queue that can be listening to + /// incoming RPCs. + int max_pollers; + + /// The timeout for server completion queue's AsyncNext call. + int cq_timeout_msec; + }; + + int max_receive_message_size_; + int max_send_message_size_; + std::vector> options_; + std::vector> services_; + std::vector ports_; + + SyncServerSettings sync_server_settings_; + + /// List of completion queues added via \a AddCompletionQueue method. + std::vector cqs_; + + std::shared_ptr creds_; + std::vector> plugins_; + grpc_resource_quota* resource_quota_; + grpc::AsyncGenericService* generic_service_{nullptr}; +#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL + grpc::CallbackGenericService* callback_generic_service_{nullptr}; +#else + grpc::experimental::CallbackGenericService* callback_generic_service_{ + nullptr}; +#endif + + struct { + bool is_set; + grpc_compression_level level; + } maybe_default_compression_level_; + struct { + bool is_set; + grpc_compression_algorithm algorithm; + } maybe_default_compression_algorithm_; + uint32_t enabled_compression_algorithms_bitset_; + std::vector< + std::unique_ptr> + interceptor_creators_; + std::vector> + acceptors_; +}; + +} // namespace grpc_impl + +#endif // GRPCPP_SERVER_BUILDER_IMPL_H diff --git a/include/grpcpp/server_impl.h b/include/grpcpp/server_impl.h index 887fa7b5f62..7561696ae2d 100644 --- a/include/grpcpp/server_impl.h +++ b/include/grpcpp/server_impl.h @@ -89,7 +89,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { /// Called before server is started. virtual void PreServerStart(Server* /*server*/) {} /// Called after a server port is added. - virtual void AddPort(Server* /*server*/, const grpc::string& /*addr*/, + virtual void AddPort(Server* /*server*/, const std::string& /*addr*/, grpc::ServerCredentials* /*creds*/, int /*port*/) {} }; /// Set the global callback object. Can only be called once per application. @@ -138,7 +138,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { protected: /// Register a service. This call does not take ownership of the service. /// The service must exist for the lifetime of the Server instance. - bool RegisterService(const grpc::string* host, + bool RegisterService(const std::string* host, grpc::Service* service) override; /// Try binding the server to the given \a addr endpoint @@ -154,7 +154,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { /// \return bound port number on success, 0 on failure. /// /// \warning It is an error to call this method on an already started server. - int AddListeningPort(const grpc::string& addr, + int AddListeningPort(const std::string& addr, grpc::ServerCredentials* creds) override; /// NOTE: This is *NOT* a public API. The server constructors are supposed to @@ -341,7 +341,7 @@ class Server : public grpc::ServerInterface, private grpc::GrpcLibraryCodegen { std::shared_ptr global_callbacks_; - std::vector services_; + std::vector services_; bool has_async_generic_service_ = false; bool has_callback_generic_service_ = false; bool has_callback_methods_ = false; diff --git a/include/grpcpp/support/channel_arguments_impl.h b/include/grpcpp/support/channel_arguments_impl.h index ca3188a9e75..e526f72f177 100644 --- a/include/grpcpp/support/channel_arguments_impl.h +++ b/include/grpcpp/support/channel_arguments_impl.h @@ -63,7 +63,7 @@ class ChannelArguments { // gRPC specific channel argument setters /// Set target name override for SSL host name checking. This option should /// be used with caution in production. - void SetSslTargetNameOverride(const grpc::string& name); + void SetSslTargetNameOverride(const std::string& name); // TODO(yangg) add flow control options /// Set the compression algorithm for the channel. void SetCompressionAlgorithm(grpc_compression_algorithm algorithm); @@ -84,7 +84,7 @@ class ChannelArguments { void SetSocketMutator(grpc_socket_mutator* mutator); /// Set the string to prepend to the user agent. - void SetUserAgentPrefix(const grpc::string& user_agent_prefix); + void SetUserAgentPrefix(const std::string& user_agent_prefix); /// Set the buffer pool to be attached to the constructed channel. void SetResourceQuota(const grpc::ResourceQuota& resource_quota); @@ -96,25 +96,25 @@ class ChannelArguments { /// Set LB policy name. /// Note that if the name resolver returns only balancer addresses, the /// grpclb LB policy will be used, regardless of what is specified here. - void SetLoadBalancingPolicyName(const grpc::string& lb_policy_name); + void SetLoadBalancingPolicyName(const std::string& lb_policy_name); /// Set service config in JSON form. /// Primarily meant for use in unit tests. - void SetServiceConfigJSON(const grpc::string& service_config_json); + void SetServiceConfigJSON(const std::string& service_config_json); // Generic channel argument setters. Only for advanced use cases. /// Set an integer argument \a value under \a key. - void SetInt(const grpc::string& key, int value); + void SetInt(const std::string& key, int value); // Generic channel argument setter. Only for advanced use cases. /// Set a pointer argument \a value under \a key. Owership is not transferred. - void SetPointer(const grpc::string& key, void* value); + void SetPointer(const std::string& key, void* value); - void SetPointerWithVtable(const grpc::string& key, void* value, + void SetPointerWithVtable(const std::string& key, void* value, const grpc_arg_pointer_vtable* vtable); /// Set a textual argument \a value under \a key. - void SetString(const grpc::string& key, const grpc::string& value); + void SetString(const std::string& key, const std::string& value); /// Return (by value) a C \a grpc_channel_args structure which points to /// arguments owned by this \a ChannelArguments instance @@ -141,10 +141,10 @@ class ChannelArguments { }; // Returns empty string when it is not set. - grpc::string GetSslTargetNameOverride() const; + std::string GetSslTargetNameOverride() const; std::vector args_; - std::list strings_; + std::list strings_; }; } // namespace grpc_impl diff --git a/include/grpcpp/support/validate_service_config.h b/include/grpcpp/support/validate_service_config.h index 41f2c636bd9..4306cb8d136 100644 --- a/include/grpcpp/support/validate_service_config.h +++ b/include/grpcpp/support/validate_service_config.h @@ -28,7 +28,7 @@ namespace experimental { /// Otherwise, returns the validation error. /// TODO(yashykt): Promote it to out of experimental once it is proved useful /// and gRFC is accepted. -grpc::string ValidateServiceConfigJSON(const grpc::string& service_config_json); +std::string ValidateServiceConfigJSON(const std::string& service_config_json); } // namespace experimental } // namespace grpc diff --git a/include/grpcpp/test/server_context_test_spouse.h b/include/grpcpp/test/server_context_test_spouse.h index 75a41ef3acf..743d417c08f 100644 --- a/include/grpcpp/test/server_context_test_spouse.h +++ b/include/grpcpp/test/server_context_test_spouse.h @@ -33,9 +33,9 @@ class ServerContextTestSpouse { /// Inject client metadata to the ServerContext for the test. The test spouse /// must be alive when \a ServerContext::client_metadata is called. - void AddClientMetadata(const grpc::string& key, const grpc::string& value) { + void AddClientMetadata(const std::string& key, const std::string& value) { client_metadata_storage_.insert( - std::pair(key, value)); + std::pair(key, value)); ctx_->client_metadata_.map()->clear(); for (const auto& item : client_metadata_storage_) { ctx_->client_metadata_.map()->insert( @@ -45,17 +45,17 @@ class ServerContextTestSpouse { } } - std::multimap GetInitialMetadata() const { + std::multimap GetInitialMetadata() const { return ctx_->initial_metadata_; } - std::multimap GetTrailingMetadata() const { + std::multimap GetTrailingMetadata() const { return ctx_->trailing_metadata_; } private: ServerContext* ctx_; // not owned - std::multimap client_metadata_storage_; + std::multimap client_metadata_storage_; }; } // namespace testing diff --git a/src/compiler/config.h b/src/compiler/config.h index 60772f2be68..f25f394c9d5 100644 --- a/src/compiler/config.h +++ b/src/compiler/config.h @@ -21,14 +21,19 @@ #include "src/compiler/config_protobuf.h" -#ifndef GRPC_CUSTOM_STRING #include -#define GRPC_CUSTOM_STRING std::string + +#ifdef GRPC_CUSTOM_STRING +#warning GRPC_CUSTOM_STRING is no longer supported. Please use std::string. #endif namespace grpc { -typedef GRPC_CUSTOM_STRING string; +// Using grpc::string and grpc::to_string is discouraged in favor of +// std::string and std::to_string. This is only for legacy code using +// them explictly. +using std::string; // deprecated +using std::to_string; // deprecated namespace protobuf { diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index 21cf1d69ea7..d2f672f5590 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -26,7 +26,7 @@ namespace grpc_cpp_generator { namespace { template -grpc::string as_string(T x) { +std::string as_string(T x) { std::ostringstream out; out << x; return out.str(); @@ -40,8 +40,8 @@ inline bool ServerOnlyStreaming(const grpc_generator::Method* method) { return !method->ClientStreaming() && method->ServerStreaming(); } -grpc::string FilenameIdentifier(const grpc::string& filename) { - grpc::string result; +std::string FilenameIdentifier(const std::string& filename) { + std::string result; for (unsigned i = 0; i < filename.size(); i++) { char c = filename[i]; if (isalnum(c)) { @@ -63,9 +63,9 @@ T* array_end(T (&array)[N]) { } void PrintIncludes(grpc_generator::Printer* printer, - const std::vector& headers, - bool use_system_headers, const grpc::string& search_path) { - std::map vars; + const std::vector& headers, + bool use_system_headers, const std::string& search_path) { + std::map vars; vars["l"] = use_system_headers ? '<' : '"'; vars["r"] = use_system_headers ? '>' : '"'; @@ -83,13 +83,13 @@ void PrintIncludes(grpc_generator::Printer* printer, } } -grpc::string GetHeaderPrologue(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetHeaderPrologue(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; vars["filename"] = file->filename(); vars["filename_identifier"] = FilenameIdentifier(file->filename()); @@ -102,7 +102,7 @@ grpc::string GetHeaderPrologue(grpc_generator::File* file, printer->Print(vars, "// If you make any local change, they will be lost.\n"); printer->Print(vars, "// source: $filename$\n"); - grpc::string leading_comments = file->GetLeadingComments("//"); + std::string leading_comments = file->GetLeadingComments("//"); if (!leading_comments.empty()) { printer->Print(vars, "// Original file comments:\n"); printer->PrintRaw(leading_comments.c_str()); @@ -118,19 +118,19 @@ grpc::string GetHeaderPrologue(grpc_generator::File* file, } // Convert from "a/b/c.proto" to "#include \"a/b/c$message_header_ext$\"\n" -grpc::string ImportInludeFromProtoName(const grpc::string& proto_name) { - return grpc::string("#include \"") + +std::string ImportInludeFromProtoName(const std::string& proto_name) { + return std::string("#include \"") + proto_name.substr(0, proto_name.size() - 6) + - grpc::string("$message_header_ext$\"\n"); + std::string("$message_header_ext$\"\n"); } -grpc::string GetHeaderIncludes(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetHeaderIncludes(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; if (!params.additional_header_includes.empty()) { PrintIncludes(printer.get(), params.additional_header_includes, false, @@ -160,7 +160,7 @@ grpc::string GetHeaderIncludes(grpc_generator::File* file, "grpcpp/impl/codegen/stub_options.h", "grpcpp/impl/codegen/sync_stream.h", }; - std::vector headers(headers_strs, array_end(headers_strs)); + std::vector headers(headers_strs, array_end(headers_strs)); PrintIncludes(printer.get(), headers, params.use_system_headers, params.grpc_search_path); printer->Print(vars, "\n"); @@ -170,17 +170,16 @@ grpc::string GetHeaderIncludes(grpc_generator::File* file, : params.message_header_extension; if (params.include_import_headers) { - const std::vector import_names = file->GetImportNames(); + const std::vector import_names = file->GetImportNames(); for (const auto& import_name : import_names) { - const grpc::string include_name = - ImportInludeFromProtoName(import_name); + const std::string include_name = ImportInludeFromProtoName(import_name); printer->Print(vars, include_name.c_str()); } printer->PrintRaw("\n"); } if (!file->package().empty()) { - std::vector parts = file->package_parts(); + std::vector parts = file->package_parts(); for (auto part = parts.begin(); part != parts.end(); part++) { vars["part"] = *part; @@ -192,17 +191,18 @@ grpc::string GetHeaderIncludes(grpc_generator::File* file, return output; } -void PrintHeaderClientMethodInterfaces( - grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars, bool is_public) { +void PrintHeaderClientMethodInterfaces(grpc_generator::Printer* printer, + const grpc_generator::Method* method, + std::map* vars, + bool is_public) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); struct { - grpc::string prefix; - grpc::string method_params; // extra arguments to method - grpc::string raw_args; // extra arguments to raw version of method + std::string prefix; + std::string method_params; // extra arguments to method + std::string raw_args; // extra arguments to raw version of method } async_prefixes[] = {{"Async", ", void* tag", ", tag"}, {"PrepareAsync", "", ""}}; @@ -392,15 +392,15 @@ void PrintHeaderClientMethodInterfaces( void PrintHeaderClientMethod(grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars, + std::map* vars, bool is_public) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); struct { - grpc::string prefix; - grpc::string method_params; // extra arguments to method - grpc::string raw_args; // extra arguments to raw version of method + std::string prefix; + std::string method_params; // extra arguments to method + std::string raw_args; // extra arguments to raw version of method } async_prefixes[] = {{"Async", ", void* tag", ", tag"}, {"PrepareAsync", "", ""}}; @@ -579,7 +579,7 @@ void PrintHeaderClientMethod(grpc_generator::Printer* printer, void PrintHeaderClientMethodCallbackInterfacesStart( grpc_generator::Printer* printer, - std::map* /*vars*/) { + std::map* /*vars*/) { // This declares the interface for the callback-based API. The components // are pure; even though this is new (post-1.0) API, it can be pure because // it is an entirely new interface that happens to be scoped within @@ -594,7 +594,7 @@ void PrintHeaderClientMethodCallbackInterfacesStart( void PrintHeaderClientMethodCallbackInterfaces( grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); @@ -672,7 +672,7 @@ void PrintHeaderClientMethodCallbackInterfaces( void PrintHeaderClientMethodCallbackInterfacesEnd( grpc_generator::Printer* printer, - std::map* /*vars*/) { + std::map* /*vars*/) { printer->Outdent(); printer->Print("};\n"); printer->Print( @@ -696,7 +696,7 @@ void PrintHeaderClientMethodCallbackInterfacesEnd( void PrintHeaderClientMethodCallbackStart( grpc_generator::Printer* printer, - std::map* /*vars*/) { + std::map* /*vars*/) { // This declares the stub entry for the callback-based API. printer->Print("class experimental_async final :\n"); printer->Print(" public StubInterface::experimental_async_interface {\n"); @@ -704,9 +704,9 @@ void PrintHeaderClientMethodCallbackStart( printer->Indent(); } -void PrintHeaderClientMethodCallback( - grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { +void PrintHeaderClientMethodCallback(grpc_generator::Printer* printer, + const grpc_generator::Method* method, + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); @@ -785,7 +785,7 @@ void PrintHeaderClientMethodCallback( void PrintHeaderClientMethodCallbackEnd( grpc_generator::Printer* printer, - std::map* /*vars*/) { + std::map* /*vars*/) { printer->Outdent(); printer->Print(" private:\n"); printer->Indent(); @@ -805,7 +805,7 @@ void PrintHeaderClientMethodCallbackEnd( void PrintHeaderClientMethodData(grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); printer->Print(*vars, "const ::grpc::internal::RpcMethod rpcmethod_$Method$_;\n"); @@ -813,7 +813,7 @@ void PrintHeaderClientMethodData(grpc_generator::Printer* printer, void PrintHeaderServerMethodSync(grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); @@ -850,7 +850,7 @@ void PrintHeaderServerMethodSync(grpc_generator::Printer* printer, // to generate async and raw async APIs. void PrintHeaderServerAsyncMethodsHelper( grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { if (method->NoStreaming()) { printer->Print( *vars, @@ -945,7 +945,7 @@ void PrintHeaderServerAsyncMethodsHelper( void PrintHeaderServerMethodAsync(grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); // These will be disabled (*vars)["Request"] = method->input_type_name(); @@ -980,7 +980,7 @@ void PrintHeaderServerMethodAsync(grpc_generator::Printer* printer, // to generate callback and raw callback APIs. void PrintHeaderServerCallbackMethodsHelper( grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { if (method->NoStreaming()) { printer->Print( *vars, @@ -1080,9 +1080,9 @@ void PrintHeaderServerCallbackMethodsHelper( } } -void PrintHeaderServerMethodCallback( - grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { +void PrintHeaderServerMethodCallback(grpc_generator::Printer* printer, + const grpc_generator::Method* method, + std::map* vars) { (*vars)["Method"] = method->name(); // These will be disabled (*vars)["Request"] = method->input_type_name(); @@ -1211,7 +1211,7 @@ void PrintHeaderServerMethodCallback( void PrintHeaderServerMethodRawCallback( grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); // These will be disabled (*vars)["Request"] = method->input_type_name(); @@ -1325,7 +1325,7 @@ void PrintHeaderServerMethodRawCallback( void PrintHeaderServerMethodStreamedUnary( grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); @@ -1379,7 +1379,7 @@ void PrintHeaderServerMethodStreamedUnary( void PrintHeaderServerMethodSplitStreaming( grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); @@ -1432,9 +1432,9 @@ void PrintHeaderServerMethodSplitStreaming( } } -void PrintHeaderServerMethodGeneric( - grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { +void PrintHeaderServerMethodGeneric(grpc_generator::Printer* printer, + const grpc_generator::Method* method, + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); @@ -1505,7 +1505,7 @@ void PrintHeaderServerMethodGeneric( void PrintHeaderServerMethodRaw(grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); // These will be disabled (*vars)["Request"] = method->input_type_name(); @@ -1536,7 +1536,7 @@ void PrintHeaderServerMethodRaw(grpc_generator::Printer* printer, void PrintHeaderService(grpc_generator::Printer* printer, const grpc_generator::Service* service, - std::map* vars) { + std::map* vars) { (*vars)["Service"] = service->name(); printer->Print(service->GetLeadingComments("//").c_str()); @@ -1769,13 +1769,13 @@ void PrintHeaderService(grpc_generator::Printer* printer, printer->Print(service->GetTrailingComments("//").c_str()); } -grpc::string GetHeaderServices(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetHeaderServices(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; // Package string is empty or ends with a dot. It is used to fully qualify // method names. vars["Package"] = file->package(); @@ -1800,19 +1800,19 @@ grpc::string GetHeaderServices(grpc_generator::File* file, return output; } -grpc::string GetHeaderEpilogue(grpc_generator::File* file, - const Parameters& /*params*/) { - grpc::string output; +std::string GetHeaderEpilogue(grpc_generator::File* file, + const Parameters& /*params*/) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; vars["filename"] = file->filename(); vars["filename_identifier"] = FilenameIdentifier(file->filename()); if (!file->package().empty()) { - std::vector parts = file->package_parts(); + std::vector parts = file->package_parts(); for (auto part = parts.rbegin(); part != parts.rend(); part++) { vars["part"] = *part; @@ -1829,13 +1829,13 @@ grpc::string GetHeaderEpilogue(grpc_generator::File* file, return output; } -grpc::string GetSourcePrologue(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetSourcePrologue(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; vars["filename"] = file->filename(); vars["filename_base"] = file->filename_without_ext(); @@ -1856,13 +1856,13 @@ grpc::string GetSourcePrologue(grpc_generator::File* file, return output; } -grpc::string GetSourceIncludes(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetSourceIncludes(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; static const char* headers_strs[] = { "functional", "grpcpp/impl/codegen/async_stream.h", @@ -1878,12 +1878,12 @@ grpc::string GetSourceIncludes(grpc_generator::File* file, "grpcpp/impl/codegen/server_context.h", "grpcpp/impl/codegen/service_type.h", "grpcpp/impl/codegen/sync_stream.h"}; - std::vector headers(headers_strs, array_end(headers_strs)); + std::vector headers(headers_strs, array_end(headers_strs)); PrintIncludes(printer.get(), headers, params.use_system_headers, params.grpc_search_path); if (!file->package().empty()) { - std::vector parts = file->package_parts(); + std::vector parts = file->package_parts(); for (auto part = parts.begin(); part != parts.end(); part++) { vars["part"] = *part; @@ -1898,15 +1898,15 @@ grpc::string GetSourceIncludes(grpc_generator::File* file, void PrintSourceClientMethod(grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); struct { - grpc::string prefix; - grpc::string start; // bool literal expressed as string - grpc::string method_params; // extra arguments to method - grpc::string create_args; // extra arguments to creator + std::string prefix; + std::string start; // bool literal expressed as string + std::string method_params; // extra arguments to method + std::string create_args; // extra arguments to creator } async_prefixes[] = {{"Async", "true", ", void* tag", ", tag"}, {"PrepareAsync", "false", "", ", nullptr"}}; if (method->NoStreaming()) { @@ -2122,7 +2122,7 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer, void PrintSourceServerMethod(grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); @@ -2181,7 +2181,7 @@ void PrintSourceServerMethod(grpc_generator::Printer* printer, void PrintSourceService(grpc_generator::Printer* printer, const grpc_generator::Service* service, - std::map* vars) { + std::map* vars) { (*vars)["Service"] = service->name(); if (service->method_count() > 0) { @@ -2316,13 +2316,13 @@ void PrintSourceService(grpc_generator::Printer* printer, } } -grpc::string GetSourceServices(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetSourceServices(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; // Package string is empty or ends with a dot. It is used to fully qualify // method names. vars["Package"] = file->package(); @@ -2345,12 +2345,12 @@ grpc::string GetSourceServices(grpc_generator::File* file, return output; } -grpc::string GetSourceEpilogue(grpc_generator::File* file, - const Parameters& /*params*/) { - grpc::string temp; +std::string GetSourceEpilogue(grpc_generator::File* file, + const Parameters& /*params*/) { + std::string temp; if (!file->package().empty()) { - std::vector parts = file->package_parts(); + std::vector parts = file->package_parts(); for (auto part = parts.begin(); part != parts.end(); part++) { temp.append("} // namespace "); @@ -2364,13 +2364,13 @@ grpc::string GetSourceEpilogue(grpc_generator::File* file, } // TODO(mmukhi): Make sure we need parameters or not. -grpc::string GetMockPrologue(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetMockPrologue(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; vars["filename"] = file->filename(); vars["filename_base"] = file->filename_without_ext(); @@ -2387,10 +2387,9 @@ grpc::string GetMockPrologue(grpc_generator::File* file, printer->Print(vars, "#include \"$filename_base$$message_header_ext$\"\n"); printer->Print(vars, "#include \"$filename_base$$service_header_ext$\"\n"); if (params.include_import_headers) { - const std::vector import_names = file->GetImportNames(); + const std::vector import_names = file->GetImportNames(); for (const auto& import_name : import_names) { - const grpc::string include_name = - ImportInludeFromProtoName(import_name); + const std::string include_name = ImportInludeFromProtoName(import_name); printer->Print(vars, include_name.c_str()); } printer->PrintRaw("\n"); @@ -2402,23 +2401,23 @@ grpc::string GetMockPrologue(grpc_generator::File* file, } // TODO(mmukhi): Add client-stream and completion-queue headers. -grpc::string GetMockIncludes(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetMockIncludes(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; static const char* headers_strs[] = { "grpcpp/impl/codegen/async_stream.h", "grpcpp/impl/codegen/sync_stream.h", }; - std::vector headers(headers_strs, array_end(headers_strs)); + std::vector headers(headers_strs, array_end(headers_strs)); PrintIncludes(printer.get(), headers, params.use_system_headers, params.grpc_search_path); - std::vector gmock_header; + std::vector gmock_header; if (params.gmock_search_path.empty()) { gmock_header.push_back("gmock/gmock.h"); PrintIncludes(printer.get(), gmock_header, params.use_system_headers, @@ -2431,7 +2430,7 @@ grpc::string GetMockIncludes(grpc_generator::File* file, } if (!file->package().empty()) { - std::vector parts = file->package_parts(); + std::vector parts = file->package_parts(); for (auto part = parts.begin(); part != parts.end(); part++) { vars["part"] = *part; @@ -2446,14 +2445,14 @@ grpc::string GetMockIncludes(grpc_generator::File* file, void PrintMockClientMethods(grpc_generator::Printer* printer, const grpc_generator::Method* method, - std::map* vars) { + std::map* vars) { (*vars)["Method"] = method->name(); (*vars)["Request"] = method->input_type_name(); (*vars)["Response"] = method->output_type_name(); struct { - grpc::string prefix; - grpc::string method_params; // extra arguments to method + std::string prefix; + std::string method_params; // extra arguments to method int extra_method_param_count; } async_prefixes[] = {{"Async", ", void* tag", 1}, {"PrepareAsync", "", 0}}; @@ -2530,7 +2529,7 @@ void PrintMockClientMethods(grpc_generator::Printer* printer, void PrintMockService(grpc_generator::Printer* printer, const grpc_generator::Service* service, - std::map* vars) { + std::map* vars) { (*vars)["Service"] = service->name(); printer->Print(*vars, @@ -2544,13 +2543,13 @@ void PrintMockService(grpc_generator::Printer* printer, printer->Print("};\n"); } -grpc::string GetMockServices(grpc_generator::File* file, - const Parameters& params) { - grpc::string output; +std::string GetMockServices(grpc_generator::File* file, + const Parameters& params) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto printer = file->CreatePrinter(&output); - std::map vars; + std::map vars; // Package string is empty or ends with a dot. It is used to fully qualify // method names. vars["Package"] = file->package(); @@ -2575,12 +2574,12 @@ grpc::string GetMockServices(grpc_generator::File* file, return output; } -grpc::string GetMockEpilogue(grpc_generator::File* file, - const Parameters& /*params*/) { - grpc::string temp; +std::string GetMockEpilogue(grpc_generator::File* file, + const Parameters& /*params*/) { + std::string temp; if (!file->package().empty()) { - std::vector parts = file->package_parts(); + std::vector parts = file->package_parts(); for (auto part = parts.begin(); part != parts.end(); part++) { temp.append("} // namespace "); diff --git a/src/compiler/cpp_generator.h b/src/compiler/cpp_generator.h index c1d64e61d7b..4032876cef8 100644 --- a/src/compiler/cpp_generator.h +++ b/src/compiler/cpp_generator.h @@ -24,19 +24,23 @@ // FlatBuffers. #include +#include #include #include "src/compiler/config.h" #include "src/compiler/schema_interface.h" -#ifndef GRPC_CUSTOM_STRING -#include -#define GRPC_CUSTOM_STRING std::string +#ifdef GRPC_CUSTOM_STRING +#warning GRPC_CUSTOM_STRING is no longer supported. Please use std::string. #endif namespace grpc { -typedef GRPC_CUSTOM_STRING string; +// Using grpc::string and grpc::to_string is discouraged in favor of +// std::string and std::to_string. This is only for legacy code using +// them explictly. +using std::string; // deprecated +using std::to_string; // deprecated } // namespace grpc @@ -45,86 +49,86 @@ namespace grpc_cpp_generator { // Contains all the parameters that are parsed from the command line. struct Parameters { // Puts the service into a namespace - grpc::string services_namespace; + std::string services_namespace; // Use system includes (<>) or local includes ("") bool use_system_headers; // Prefix to any grpc include - grpc::string grpc_search_path; + std::string grpc_search_path; // Generate Google Mock code to facilitate unit testing. bool generate_mock_code; // Google Mock search path, when non-empty, local includes will be used. - grpc::string gmock_search_path; + std::string gmock_search_path; // *EXPERIMENTAL* Additional include files in grpc.pb.h - std::vector additional_header_includes; + std::vector additional_header_includes; // By default, use "pb.h" - grpc::string message_header_extension; + std::string message_header_extension; // Whether to include headers corresponding to imports in source file. bool include_import_headers; }; // Return the prologue of the generated header file. -grpc::string GetHeaderPrologue(grpc_generator::File* file, - const Parameters& params); +std::string GetHeaderPrologue(grpc_generator::File* file, + const Parameters& params); // Return the includes needed for generated header file. -grpc::string GetHeaderIncludes(grpc_generator::File* file, - const Parameters& params); +std::string GetHeaderIncludes(grpc_generator::File* file, + const Parameters& params); // Return the includes needed for generated source file. -grpc::string GetSourceIncludes(grpc_generator::File* file, - const Parameters& params); +std::string GetSourceIncludes(grpc_generator::File* file, + const Parameters& params); // Return the epilogue of the generated header file. -grpc::string GetHeaderEpilogue(grpc_generator::File* file, - const Parameters& params); +std::string GetHeaderEpilogue(grpc_generator::File* file, + const Parameters& params); // Return the prologue of the generated source file. -grpc::string GetSourcePrologue(grpc_generator::File* file, - const Parameters& params); +std::string GetSourcePrologue(grpc_generator::File* file, + const Parameters& params); // Return the services for generated header file. -grpc::string GetHeaderServices(grpc_generator::File* file, - const Parameters& params); +std::string GetHeaderServices(grpc_generator::File* file, + const Parameters& params); // Return the services for generated source file. -grpc::string GetSourceServices(grpc_generator::File* file, - const Parameters& params); +std::string GetSourceServices(grpc_generator::File* file, + const Parameters& params); // Return the epilogue of the generated source file. -grpc::string GetSourceEpilogue(grpc_generator::File* file, - const Parameters& params); +std::string GetSourceEpilogue(grpc_generator::File* file, + const Parameters& params); // Return the prologue of the generated mock file. -grpc::string GetMockPrologue(grpc_generator::File* file, - const Parameters& params); +std::string GetMockPrologue(grpc_generator::File* file, + const Parameters& params); // Return the includes needed for generated mock file. -grpc::string GetMockIncludes(grpc_generator::File* file, - const Parameters& params); +std::string GetMockIncludes(grpc_generator::File* file, + const Parameters& params); // Return the services for generated mock file. -grpc::string GetMockServices(grpc_generator::File* file, - const Parameters& params); +std::string GetMockServices(grpc_generator::File* file, + const Parameters& params); // Return the epilogue of generated mock file. -grpc::string GetMockEpilogue(grpc_generator::File* file, - const Parameters& params); +std::string GetMockEpilogue(grpc_generator::File* file, + const Parameters& params); // Return the prologue of the generated mock file. -grpc::string GetMockPrologue(grpc_generator::File* file, - const Parameters& params); +std::string GetMockPrologue(grpc_generator::File* file, + const Parameters& params); // Return the includes needed for generated mock file. -grpc::string GetMockIncludes(grpc_generator::File* file, - const Parameters& params); +std::string GetMockIncludes(grpc_generator::File* file, + const Parameters& params); // Return the services for generated mock file. -grpc::string GetMockServices(grpc_generator::File* file, - const Parameters& params); +std::string GetMockServices(grpc_generator::File* file, + const Parameters& params); // Return the epilogue of generated mock file. -grpc::string GetMockEpilogue(grpc_generator::File* file, - const Parameters& params); +std::string GetMockEpilogue(grpc_generator::File* file, + const Parameters& params); } // namespace grpc_cpp_generator diff --git a/src/compiler/cpp_generator_helpers.h b/src/compiler/cpp_generator_helpers.h index f9a69373bd1..28592ec8784 100644 --- a/src/compiler/cpp_generator_helpers.h +++ b/src/compiler/cpp_generator_helpers.h @@ -26,23 +26,23 @@ namespace grpc_cpp_generator { -inline grpc::string DotsToColons(const grpc::string& name) { +inline std::string DotsToColons(const std::string& name) { return grpc_generator::StringReplace(name, ".", "::"); } -inline grpc::string DotsToUnderscores(const grpc::string& name) { +inline std::string DotsToUnderscores(const std::string& name) { return grpc_generator::StringReplace(name, ".", "_"); } -inline grpc::string ClassName(const grpc::protobuf::Descriptor* descriptor, - bool qualified) { +inline std::string ClassName(const grpc::protobuf::Descriptor* descriptor, + bool qualified) { // Find "outer", the descriptor of the top-level message in which // "descriptor" is embedded. const grpc::protobuf::Descriptor* outer = descriptor; while (outer->containing_type() != NULL) outer = outer->containing_type(); - const grpc::string& outer_name = outer->full_name(); - grpc::string inner_name = descriptor->full_name().substr(outer_name.size()); + const std::string& outer_name = outer->full_name(); + std::string inner_name = descriptor->full_name().substr(outer_name.size()); if (qualified) { return "::" + DotsToColons(outer_name) + DotsToUnderscores(inner_name); @@ -54,7 +54,7 @@ inline grpc::string ClassName(const grpc::protobuf::Descriptor* descriptor, // Get leading or trailing comments in a string. Comment lines start with "// ". // Leading detached comments are put in front of leading comments. template -inline grpc::string GetCppComments(const DescriptorType* desc, bool leading) { +inline std::string GetCppComments(const DescriptorType* desc, bool leading) { return grpc_generator::GetPrefixedComments(desc, leading, "//"); } diff --git a/src/compiler/cpp_plugin.h b/src/compiler/cpp_plugin.h index bd8d056701b..a3a0f339b92 100644 --- a/src/compiler/cpp_plugin.h +++ b/src/compiler/cpp_plugin.h @@ -39,9 +39,9 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } virtual bool Generate(const grpc::protobuf::FileDescriptor* file, - const grpc::string& parameter, + const std::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const override { + std::string* error) const override { if (file->options().cc_generic_services()) { *error = "cpp grpc proto compiler plugin does not work with generic " @@ -58,11 +58,11 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ProtoBufFile pbfile(file); if (!parameter.empty()) { - std::vector parameters_list = + std::vector parameters_list = grpc_generator::tokenize(parameter, ","); for (auto parameter_string = parameters_list.begin(); parameter_string != parameters_list.end(); parameter_string++) { - std::vector param = + std::vector param = grpc_generator::tokenize(*parameter_string, "="); if (param[0] == "services_namespace") { generator_parameters.services_namespace = param[1]; @@ -72,7 +72,7 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } else if (param[1] == "false") { generator_parameters.use_system_headers = false; } else { - *error = grpc::string("Invalid parameter: ") + *parameter_string; + *error = std::string("Invalid parameter: ") + *parameter_string; return false; } } else if (param[0] == "grpc_search_path") { @@ -81,7 +81,7 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { if (param[1] == "true") { generator_parameters.generate_mock_code = true; } else if (param[1] != "false") { - *error = grpc::string("Invalid parameter: ") + *parameter_string; + *error = std::string("Invalid parameter: ") + *parameter_string; return false; } } else if (param[0] == "gmock_search_path") { @@ -95,19 +95,19 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { if (param[1] == "true") { generator_parameters.include_import_headers = true; } else if (param[1] != "false") { - *error = grpc::string("Invalid parameter: ") + *parameter_string; + *error = std::string("Invalid parameter: ") + *parameter_string; return false; } } else { - *error = grpc::string("Unknown parameter: ") + *parameter_string; + *error = std::string("Unknown parameter: ") + *parameter_string; return false; } } } - grpc::string file_name = grpc_generator::StripProto(file->name()); + std::string file_name = grpc_generator::StripProto(file->name()); - grpc::string header_code = + std::string header_code = grpc_cpp_generator::GetHeaderPrologue(&pbfile, generator_parameters) + grpc_cpp_generator::GetHeaderIncludes(&pbfile, generator_parameters) + grpc_cpp_generator::GetHeaderServices(&pbfile, generator_parameters) + @@ -117,7 +117,7 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { grpc::protobuf::io::CodedOutputStream header_coded_out(header_output.get()); header_coded_out.WriteRaw(header_code.data(), header_code.size()); - grpc::string source_code = + std::string source_code = grpc_cpp_generator::GetSourcePrologue(&pbfile, generator_parameters) + grpc_cpp_generator::GetSourceIncludes(&pbfile, generator_parameters) + grpc_cpp_generator::GetSourceServices(&pbfile, generator_parameters) + @@ -130,7 +130,7 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { if (!generator_parameters.generate_mock_code) { return true; } - grpc::string mock_code = + std::string mock_code = grpc_cpp_generator::GetMockPrologue(&pbfile, generator_parameters) + grpc_cpp_generator::GetMockIncludes(&pbfile, generator_parameters) + grpc_cpp_generator::GetMockServices(&pbfile, generator_parameters) + @@ -146,8 +146,8 @@ class CppGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { private: // Insert the given code into the given file at the given insertion point. void Insert(grpc::protobuf::compiler::GeneratorContext* context, - const grpc::string& filename, const grpc::string& insertion_point, - const grpc::string& code) const { + const std::string& filename, const std::string& insertion_point, + const std::string& code) const { std::unique_ptr output( context->OpenForInsert(filename, insertion_point)); grpc::protobuf::io::CodedOutputStream coded_out(output.get()); diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 2a97e4f24cb..8c8ea5e090f 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -54,9 +54,9 @@ namespace { // TODO(jtattermusch): reuse the functionality from google/protobuf. bool GenerateDocCommentBodyImpl(grpc::protobuf::io::Printer* printer, grpc::protobuf::SourceLocation location) { - grpc::string comments = location.leading_comments.empty() - ? location.trailing_comments - : location.leading_comments; + std::string comments = location.leading_comments.empty() + ? location.trailing_comments + : location.leading_comments; if (comments.empty()) { return false; } @@ -66,7 +66,7 @@ bool GenerateDocCommentBodyImpl(grpc::protobuf::io::Printer* printer, comments = grpc_generator::StringReplace(comments, "&", "&", true); comments = grpc_generator::StringReplace(comments, "<", "<", true); - std::vector lines; + std::vector lines; grpc_generator::Split(comments, '\n', &lines); // TODO: We really should work out which part to put in the summary and which // to put in the remarks... @@ -81,9 +81,9 @@ bool GenerateDocCommentBodyImpl(grpc::protobuf::io::Printer* printer, // Note that we can't remove leading or trailing whitespace as *that's* // relevant in markdown too. // (We don't skip "just whitespace" lines, either.) - for (std::vector::iterator it = lines.begin(); - it != lines.end(); ++it) { - grpc::string line = *it; + for (std::vector::iterator it = lines.begin(); it != lines.end(); + ++it) { + std::string line = *it; if (line.empty()) { last_was_empty = true; } else { @@ -706,9 +706,9 @@ void GenerateService(Printer* out, const ServiceDescriptor* service, } // anonymous namespace -grpc::string GetServices(const FileDescriptor* file, bool generate_client, - bool generate_server, bool internal_access) { - grpc::string output; +std::string GetServices(const FileDescriptor* file, bool generate_client, + bool generate_server, bool internal_access) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. @@ -729,7 +729,7 @@ grpc::string GetServices(const FileDescriptor* file, bool generate_client, out.Print("// \n"); // use C++ style as there are no file-level XML comments in .NET - grpc::string leading_comments = GetCsharpComments(file, true); + std::string leading_comments = GetCsharpComments(file, true); if (!leading_comments.empty()) { out.Print("// Original file comments:\n"); out.PrintRaw(leading_comments.c_str()); @@ -742,7 +742,7 @@ grpc::string GetServices(const FileDescriptor* file, bool generate_client, out.Print("using grpc = global::Grpc.Core;\n"); out.Print("\n"); - grpc::string file_namespace = GetFileNamespace(file); + std::string file_namespace = GetFileNamespace(file); if (file_namespace != "") { out.Print("namespace $namespace$ {\n", "namespace", file_namespace); out.Indent(); diff --git a/src/compiler/csharp_generator.h b/src/compiler/csharp_generator.h index fd36e11851b..1596840ef38 100644 --- a/src/compiler/csharp_generator.h +++ b/src/compiler/csharp_generator.h @@ -25,9 +25,9 @@ namespace grpc_csharp_generator { -grpc::string GetServices(const grpc::protobuf::FileDescriptor* file, - bool generate_client, bool generate_server, - bool internal_access); +std::string GetServices(const grpc::protobuf::FileDescriptor* file, + bool generate_client, bool generate_server, + bool internal_access); } // namespace grpc_csharp_generator diff --git a/src/compiler/csharp_generator_helpers.h b/src/compiler/csharp_generator_helpers.h index 0d9ae6360dd..c269431544c 100644 --- a/src/compiler/csharp_generator_helpers.h +++ b/src/compiler/csharp_generator_helpers.h @@ -25,7 +25,7 @@ namespace grpc_csharp_generator { inline bool ServicesFilename(const grpc::protobuf::FileDescriptor* file, - grpc::string* file_name_or_error) { + std::string* file_name_or_error) { *file_name_or_error = grpc_generator::FileNameInUpperCamel(file, false) + "Grpc.cs"; return true; @@ -34,8 +34,7 @@ inline bool ServicesFilename(const grpc::protobuf::FileDescriptor* file, // Get leading or trailing comments in a string. Comment lines start with "// ". // Leading detached comments are put in front of leading comments. template -inline grpc::string GetCsharpComments(const DescriptorType* desc, - bool leading) { +inline std::string GetCsharpComments(const DescriptorType* desc, bool leading) { return grpc_generator::GetPrefixedComments(desc, leading, "//"); } diff --git a/src/compiler/csharp_plugin.cc b/src/compiler/csharp_plugin.cc index d4648b45757..cac50d28dc5 100644 --- a/src/compiler/csharp_plugin.cc +++ b/src/compiler/csharp_plugin.cc @@ -34,10 +34,10 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } bool Generate(const grpc::protobuf::FileDescriptor* file, - const grpc::string& parameter, + const std::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const override { - std::vector > options; + std::string* error) const override { + std::vector > options; grpc::protobuf::compiler::ParseGeneratorParameter(parameter, &options); bool generate_client = true; @@ -56,14 +56,14 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } } - grpc::string code = grpc_csharp_generator::GetServices( + std::string code = grpc_csharp_generator::GetServices( file, generate_client, generate_server, internal_access); if (code.size() == 0) { return true; // don't generate a file if there are no services } // Get output file name. - grpc::string file_name; + std::string file_name; if (!grpc_csharp_generator::ServicesFilename(file, &file_name)) { return false; } diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h index 2b6b2bacb01..6f54c0dd3b4 100644 --- a/src/compiler/generator_helpers.h +++ b/src/compiler/generator_helpers.h @@ -29,10 +29,10 @@ namespace grpc_generator { -inline bool StripSuffix(grpc::string* filename, const grpc::string& suffix) { +inline bool StripSuffix(std::string* filename, const std::string& suffix) { if (filename->length() >= suffix.length()) { size_t suffix_pos = filename->length() - suffix.length(); - if (filename->compare(suffix_pos, grpc::string::npos, suffix) == 0) { + if (filename->compare(suffix_pos, std::string::npos, suffix) == 0) { filename->resize(filename->size() - suffix.size()); return true; } @@ -41,7 +41,7 @@ inline bool StripSuffix(grpc::string* filename, const grpc::string& suffix) { return false; } -inline bool StripPrefix(grpc::string* name, const grpc::string& prefix) { +inline bool StripPrefix(std::string* name, const std::string& prefix) { if (name->length() >= prefix.length()) { if (name->substr(0, prefix.size()) == prefix) { *name = name->substr(prefix.size()); @@ -51,20 +51,20 @@ inline bool StripPrefix(grpc::string* name, const grpc::string& prefix) { return false; } -inline grpc::string StripProto(grpc::string filename) { +inline std::string StripProto(std::string filename) { if (!StripSuffix(&filename, ".protodevel")) { StripSuffix(&filename, ".proto"); } return filename; } -inline grpc::string StringReplace(grpc::string str, const grpc::string& from, - const grpc::string& to, bool replace_all) { +inline std::string StringReplace(std::string str, const std::string& from, + const std::string& to, bool replace_all) { size_t pos = 0; do { pos = str.find(from, pos); - if (pos == grpc::string::npos) { + if (pos == std::string::npos) { break; } str.replace(pos, from.length(), to); @@ -74,20 +74,20 @@ inline grpc::string StringReplace(grpc::string str, const grpc::string& from, return str; } -inline grpc::string StringReplace(grpc::string str, const grpc::string& from, - const grpc::string& to) { +inline std::string StringReplace(std::string str, const std::string& from, + const std::string& to) { return StringReplace(str, from, to, true); } -inline std::vector tokenize(const grpc::string& input, - const grpc::string& delimiters) { - std::vector tokens; +inline std::vector tokenize(const std::string& input, + const std::string& delimiters) { + std::vector tokens; size_t pos, last_pos = 0; for (;;) { bool done = false; pos = input.find_first_of(delimiters, last_pos); - if (pos == grpc::string::npos) { + if (pos == std::string::npos) { done = true; pos = input.length(); } @@ -99,7 +99,7 @@ inline std::vector tokenize(const grpc::string& input, } } -inline grpc::string CapitalizeFirstLetter(grpc::string s) { +inline std::string CapitalizeFirstLetter(std::string s) { if (s.empty()) { return s; } @@ -107,7 +107,7 @@ inline grpc::string CapitalizeFirstLetter(grpc::string s) { return s; } -inline grpc::string LowercaseFirstLetter(grpc::string s) { +inline std::string LowercaseFirstLetter(std::string s) { if (s.empty()) { return s; } @@ -115,19 +115,19 @@ inline grpc::string LowercaseFirstLetter(grpc::string s) { return s; } -inline grpc::string LowerUnderscoreToUpperCamel(grpc::string str) { - std::vector tokens = tokenize(str, "_"); - grpc::string result = ""; +inline std::string LowerUnderscoreToUpperCamel(std::string str) { + std::vector tokens = tokenize(str, "_"); + std::string result = ""; for (unsigned int i = 0; i < tokens.size(); i++) { result += CapitalizeFirstLetter(tokens[i]); } return result; } -inline grpc::string FileNameInUpperCamel( +inline std::string FileNameInUpperCamel( const grpc::protobuf::FileDescriptor* file, bool include_package_path) { - std::vector tokens = tokenize(StripProto(file->name()), "/"); - grpc::string result = ""; + std::vector tokens = tokenize(StripProto(file->name()), "/"); + std::string result = ""; if (include_package_path) { for (unsigned int i = 0; i < tokens.size() - 1; i++) { result += tokens[i] + "/"; @@ -137,7 +137,7 @@ inline grpc::string FileNameInUpperCamel( return result; } -inline grpc::string FileNameInUpperCamel( +inline std::string FileNameInUpperCamel( const grpc::protobuf::FileDescriptor* file) { return FileNameInUpperCamel(file, true); } @@ -166,10 +166,10 @@ inline MethodType GetMethodType( } } -inline void Split(const grpc::string& s, char /*delim*/, - std::vector* append_to) { +inline void Split(const std::string& s, char /*delim*/, + std::vector* append_to) { std::istringstream iss(s); - grpc::string piece; + std::string piece; while (std::getline(iss, piece)) { append_to->push_back(piece); } @@ -184,15 +184,15 @@ enum CommentType { // Get all the raw comments and append each line without newline to out. template inline void GetComment(const DescriptorType* desc, CommentType type, - std::vector* out) { + std::vector* out) { grpc::protobuf::SourceLocation location; if (!desc->GetSourceLocation(&location)) { return; } if (type == COMMENTTYPE_LEADING || type == COMMENTTYPE_TRAILING) { - const grpc::string& comments = type == COMMENTTYPE_LEADING - ? location.leading_comments - : location.trailing_comments; + const std::string& comments = type == COMMENTTYPE_LEADING + ? location.leading_comments + : location.trailing_comments; Split(comments, '\n', out); } else if (type == COMMENTTYPE_LEADING_DETACHED) { for (unsigned int i = 0; i < location.leading_detached_comments.size(); @@ -211,7 +211,7 @@ inline void GetComment(const DescriptorType* desc, CommentType type, // above syntax line. Return nothing for trailing comments. template <> inline void GetComment(const grpc::protobuf::FileDescriptor* desc, - CommentType type, std::vector* out) { + CommentType type, std::vector* out) { if (type == COMMENTTYPE_TRAILING) { return; } @@ -237,11 +237,11 @@ inline void GetComment(const grpc::protobuf::FileDescriptor* desc, // Add prefix and newline to each comment line and concatenate them together. // Make sure there is a space after the prefix unless the line is empty. -inline grpc::string GenerateCommentsWithPrefix( - const std::vector& in, const grpc::string& prefix) { +inline std::string GenerateCommentsWithPrefix( + const std::vector& in, const std::string& prefix) { std::ostringstream oss; for (auto it = in.begin(); it != in.end(); it++) { - const grpc::string& elem = *it; + const std::string& elem = *it; if (elem.empty()) { oss << prefix << "\n"; } else if (elem[0] == ' ') { @@ -254,14 +254,13 @@ inline grpc::string GenerateCommentsWithPrefix( } template -inline grpc::string GetPrefixedComments(const DescriptorType* desc, - bool leading, - const grpc::string& prefix) { - std::vector out; +inline std::string GetPrefixedComments(const DescriptorType* desc, bool leading, + const std::string& prefix) { + std::vector out; if (leading) { grpc_generator::GetComment( desc, grpc_generator::COMMENTTYPE_LEADING_DETACHED, &out); - std::vector leading; + std::vector leading; grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING, &leading); out.insert(out.end(), leading.begin(), leading.end()); diff --git a/src/compiler/node_generator.cc b/src/compiler/node_generator.cc index a430628dbc6..465ac7e477d 100644 --- a/src/compiler/node_generator.cc +++ b/src/compiler/node_generator.cc @@ -37,7 +37,7 @@ namespace { // Returns the alias we assign to the module of the given .proto filename // when importing. Copied entirely from // github:google/protobuf/src/google/protobuf/compiler/js/js_generator.cc#L154 -grpc::string ModuleAlias(const grpc::string filename) { +std::string ModuleAlias(const std::string filename) { // This scheme could technically cause problems if a file includes any 2 of: // foo/bar_baz.proto // foo_bar_baz.proto @@ -45,7 +45,7 @@ grpc::string ModuleAlias(const grpc::string filename) { // // We'll worry about this problem if/when we actually see it. This name isn't // exposed to users so we can change it later if we need to. - grpc::string basename = grpc_generator::StripProto(filename); + std::string basename = grpc_generator::StripProto(filename); basename = grpc_generator::StringReplace(basename, "-", "$"); basename = grpc_generator::StringReplace(basename, "/", "_"); basename = grpc_generator::StringReplace(basename, ".", "_"); @@ -54,15 +54,15 @@ grpc::string ModuleAlias(const grpc::string filename) { // Given a filename like foo/bar/baz.proto, returns the corresponding JavaScript // message file foo/bar/baz.js -grpc::string GetJSMessageFilename(const grpc::string& filename) { - grpc::string name = filename; +std::string GetJSMessageFilename(const std::string& filename) { + std::string name = filename; return grpc_generator::StripProto(name) + "_pb.js"; } // Given a filename like foo/bar/baz.proto, returns the root directory // path ../../ -grpc::string GetRootPath(const grpc::string& from_filename, - const grpc::string& to_filename) { +std::string GetRootPath(const std::string& from_filename, + const std::string& to_filename) { if (to_filename.find("google/protobuf") == 0) { // Well-known types (.proto files in the google/protobuf directory) are // assumed to come from the 'google-protobuf' npm package. We may want to @@ -74,7 +74,7 @@ grpc::string GetRootPath(const grpc::string& from_filename, if (slashes == 0) { return "./"; } - grpc::string result = ""; + std::string result = ""; for (size_t i = 0; i < slashes; i++) { result += "../"; } @@ -83,16 +83,15 @@ grpc::string GetRootPath(const grpc::string& from_filename, // Return the relative path to load to_file from the directory containing // from_file, assuming that both paths are relative to the same directory -grpc::string GetRelativePath(const grpc::string& from_file, - const grpc::string& to_file) { +std::string GetRelativePath(const std::string& from_file, + const std::string& to_file) { return GetRootPath(from_file, to_file) + to_file; } /* Finds all message types used in all services in the file, and returns them * as a map of fully qualified message type name to message descriptor */ -map GetAllMessages( - const FileDescriptor* file) { - map message_types; +map GetAllMessages(const FileDescriptor* file) { + map message_types; for (int service_num = 0; service_num < file->service_count(); service_num++) { const ServiceDescriptor* service = file->service(service_num); @@ -108,13 +107,13 @@ map GetAllMessages( return message_types; } -grpc::string MessageIdentifierName(const grpc::string& name) { +std::string MessageIdentifierName(const std::string& name) { return grpc_generator::StringReplace(name, ".", "_"); } -grpc::string NodeObjectPath(const Descriptor* descriptor) { - grpc::string module_alias = ModuleAlias(descriptor->file()->name()); - grpc::string name = descriptor->full_name(); +std::string NodeObjectPath(const Descriptor* descriptor) { + std::string module_alias = ModuleAlias(descriptor->file()->name()); + std::string name = descriptor->full_name(); grpc_generator::StripPrefix(&name, descriptor->file()->package() + "."); return module_alias + "." + name; } @@ -122,8 +121,8 @@ grpc::string NodeObjectPath(const Descriptor* descriptor) { // Prints out the message serializer and deserializer functions void PrintMessageTransformer(const Descriptor* descriptor, Printer* out, const Parameters& params) { - map template_vars; - grpc::string full_name = descriptor->full_name(); + map template_vars; + std::string full_name = descriptor->full_name(); template_vars["identifier_name"] = MessageIdentifierName(full_name); template_vars["name"] = full_name; template_vars["node_name"] = NodeObjectPath(descriptor); @@ -159,7 +158,7 @@ void PrintMessageTransformer(const Descriptor* descriptor, Printer* out, void PrintMethod(const MethodDescriptor* method, Printer* out) { const Descriptor* input_type = method->input_type(); const Descriptor* output_type = method->output_type(); - map vars; + map vars; vars["service_name"] = method->service()->full_name(); vars["name"] = method->name(); vars["input_type"] = NodeObjectPath(input_type); @@ -185,13 +184,13 @@ void PrintMethod(const MethodDescriptor* method, Printer* out) { // Prints out the service descriptor object void PrintService(const ServiceDescriptor* service, Printer* out) { - map template_vars; + map template_vars; out->Print(GetNodeComments(service, true).c_str()); template_vars["name"] = service->name(); out->Print(template_vars, "var $name$Service = exports.$name$Service = {\n"); out->Indent(); for (int i = 0; i < service->method_count(); i++) { - grpc::string method_name = + std::string method_name = grpc_generator::LowercaseFirstLetter(service->method(i)->name()); out->Print(GetNodeComments(service->method(i), true).c_str()); out->Print("$method_name$: ", "method_name", method_name); @@ -210,14 +209,14 @@ void PrintService(const ServiceDescriptor* service, Printer* out) { void PrintImports(const FileDescriptor* file, Printer* out) { out->Print("var grpc = require('grpc');\n"); if (file->message_type_count() > 0) { - grpc::string file_path = + std::string file_path = GetRelativePath(file->name(), GetJSMessageFilename(file->name())); out->Print("var $module_alias$ = require('$file_path$');\n", "module_alias", ModuleAlias(file->name()), "file_path", file_path); } for (int i = 0; i < file->dependency_count(); i++) { - grpc::string file_path = GetRelativePath( + std::string file_path = GetRelativePath( file->name(), GetJSMessageFilename(file->dependency(i)->name())); out->Print("var $module_alias$ = require('$file_path$');\n", "module_alias", ModuleAlias(file->dependency(i)->name()), "file_path", @@ -228,9 +227,8 @@ void PrintImports(const FileDescriptor* file, Printer* out) { void PrintTransformers(const FileDescriptor* file, Printer* out, const Parameters& params) { - map messages = GetAllMessages(file); - for (std::map::iterator it = - messages.begin(); + map messages = GetAllMessages(file); + for (std::map::iterator it = messages.begin(); it != messages.end(); it++) { PrintMessageTransformer(it->second, out, params); } @@ -244,9 +242,8 @@ void PrintServices(const FileDescriptor* file, Printer* out) { } } // namespace -grpc::string GenerateFile(const FileDescriptor* file, - const Parameters& params) { - grpc::string output; +std::string GenerateFile(const FileDescriptor* file, const Parameters& params) { + std::string output; { StringOutputStream output_stream(&output); Printer out(&output_stream, '$'); @@ -256,7 +253,7 @@ grpc::string GenerateFile(const FileDescriptor* file, } out.Print("// GENERATED CODE -- DO NOT EDIT!\n\n"); - grpc::string leading_comments = GetNodeComments(file, true); + std::string leading_comments = GetNodeComments(file, true); if (!leading_comments.empty()) { out.Print("// Original file comments:\n"); out.PrintRaw(leading_comments.c_str()); diff --git a/src/compiler/node_generator.h b/src/compiler/node_generator.h index f3a531597a1..48709bac632 100644 --- a/src/compiler/node_generator.h +++ b/src/compiler/node_generator.h @@ -29,8 +29,8 @@ struct Parameters { int minimum_node_version; }; -grpc::string GenerateFile(const grpc::protobuf::FileDescriptor* file, - const Parameters& params); +std::string GenerateFile(const grpc::protobuf::FileDescriptor* file, + const Parameters& params); } // namespace grpc_node_generator diff --git a/src/compiler/node_generator_helpers.h b/src/compiler/node_generator_helpers.h index 110749f77f1..65fc0a00267 100644 --- a/src/compiler/node_generator_helpers.h +++ b/src/compiler/node_generator_helpers.h @@ -26,14 +26,14 @@ namespace grpc_node_generator { -inline grpc::string GetJSServiceFilename(const grpc::string& filename) { +inline std::string GetJSServiceFilename(const std::string& filename) { return grpc_generator::StripProto(filename) + "_grpc_pb.js"; } // Get leading or trailing comments in a string. Comment lines start with "// ". // Leading detached comments are put in front of leading comments. template -inline grpc::string GetNodeComments(const DescriptorType* desc, bool leading) { +inline std::string GetNodeComments(const DescriptorType* desc, bool leading) { return grpc_generator::GetPrefixedComments(desc, leading, "//"); } diff --git a/src/compiler/node_plugin.cc b/src/compiler/node_plugin.cc index 7b89a715535..9334024e413 100644 --- a/src/compiler/node_plugin.cc +++ b/src/compiler/node_plugin.cc @@ -37,36 +37,36 @@ class NodeGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } bool Generate(const grpc::protobuf::FileDescriptor* file, - const grpc::string& parameter, + const std::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const override { + std::string* error) const override { grpc_node_generator::Parameters generator_parameters; generator_parameters.minimum_node_version = 4; if (!parameter.empty()) { - std::vector parameters_list = + std::vector parameters_list = grpc_generator::tokenize(parameter, ","); for (auto parameter_string = parameters_list.begin(); parameter_string != parameters_list.end(); parameter_string++) { - std::vector param = + std::vector param = grpc_generator::tokenize(*parameter_string, "="); if (param[0] == "minimum_node_version") { sscanf(param[1].c_str(), "%d", &generator_parameters.minimum_node_version); } else { - *error = grpc::string("Unknown parameter: ") + *parameter_string; + *error = std::string("Unknown parameter: ") + *parameter_string; return false; } } } - grpc::string code = GenerateFile(file, generator_parameters); + std::string code = GenerateFile(file, generator_parameters); if (code.size() == 0) { return true; } // Get output file name - grpc::string file_name = GetJSServiceFilename(file->name()); + std::string file_name = GetJSServiceFilename(file->name()); std::unique_ptr output( context->Open(file_name)); diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index b5a37e470d2..c8f1c43c6c0 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -37,9 +37,9 @@ using ::std::set; namespace grpc_objective_c_generator { namespace { -void PrintProtoRpcDeclarationAsPragma( - Printer* printer, const MethodDescriptor* method, - map< ::grpc::string, ::grpc::string> vars) { +void PrintProtoRpcDeclarationAsPragma(Printer* printer, + const MethodDescriptor* method, + map< ::std::string, ::std::string> vars) { vars["client_stream"] = method->client_streaming() ? "stream " : ""; vars["server_stream"] = method->server_streaming() ? "stream " : ""; @@ -51,7 +51,7 @@ void PrintProtoRpcDeclarationAsPragma( template static void PrintAllComments(const DescriptorType* desc, Printer* printer, bool deprecated = false) { - std::vector comments; + std::vector comments; grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING_DETACHED, &comments); grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING, @@ -65,7 +65,7 @@ static void PrintAllComments(const DescriptorType* desc, Printer* printer, for (auto it = comments.begin(); it != comments.end(); ++it) { printer->Print(" * "); size_t start_pos = it->find_first_not_of(' '); - if (start_pos != grpc::string::npos) { + if (start_pos != std::string::npos) { printer->PrintRaw(it->c_str() + start_pos); } printer->Print("\n"); @@ -81,7 +81,7 @@ static void PrintAllComments(const DescriptorType* desc, Printer* printer, } void PrintMethodSignature(Printer* printer, const MethodDescriptor* method, - const map< ::grpc::string, ::grpc::string>& vars) { + const map< ::std::string, ::std::string>& vars) { // Print comment PrintAllComments(method, printer, true); @@ -106,7 +106,7 @@ void PrintMethodSignature(Printer* printer, const MethodDescriptor* method, } void PrintSimpleSignature(Printer* printer, const MethodDescriptor* method, - map< ::grpc::string, ::grpc::string> vars) { + map< ::std::string, ::std::string> vars) { vars["method_name"] = grpc_generator::LowercaseFirstLetter(vars["method_name"]); vars["return_type"] = "void"; @@ -114,14 +114,14 @@ void PrintSimpleSignature(Printer* printer, const MethodDescriptor* method, } void PrintAdvancedSignature(Printer* printer, const MethodDescriptor* method, - map< ::grpc::string, ::grpc::string> vars) { + map< ::std::string, ::std::string> vars) { vars["method_name"] = "RPCTo" + vars["method_name"]; vars["return_type"] = "GRPCProtoCall *"; PrintMethodSignature(printer, method, vars); } void PrintV2Signature(Printer* printer, const MethodDescriptor* method, - map< ::grpc::string, ::grpc::string> vars) { + map< ::std::string, ::std::string> vars) { if (method->client_streaming()) { vars["return_type"] = "GRPCStreamingProtoCall *"; } else { @@ -143,9 +143,9 @@ void PrintV2Signature(Printer* printer, const MethodDescriptor* method, printer->Print(" callOptions:(GRPCCallOptions *_Nullable)callOptions"); } -inline map< ::grpc::string, ::grpc::string> GetMethodVars( +inline map< ::std::string, ::std::string> GetMethodVars( const MethodDescriptor* method) { - map< ::grpc::string, ::grpc::string> res; + map< ::std::string, ::std::string> res; res["method_name"] = method->name(); res["request_type"] = method->input_type()->name(); res["response_type"] = method->output_type()->name(); @@ -155,7 +155,7 @@ inline map< ::grpc::string, ::grpc::string> GetMethodVars( } void PrintMethodDeclarations(Printer* printer, const MethodDescriptor* method) { - map< ::grpc::string, ::grpc::string> vars = GetMethodVars(method); + map< ::std::string, ::std::string> vars = GetMethodVars(method); PrintProtoRpcDeclarationAsPragma(printer, method, vars); @@ -167,7 +167,7 @@ void PrintMethodDeclarations(Printer* printer, const MethodDescriptor* method) { void PrintV2MethodDeclarations(Printer* printer, const MethodDescriptor* method) { - map< ::grpc::string, ::grpc::string> vars = GetMethodVars(method); + map< ::std::string, ::std::string> vars = GetMethodVars(method); PrintProtoRpcDeclarationAsPragma(printer, method, vars); @@ -176,7 +176,7 @@ void PrintV2MethodDeclarations(Printer* printer, } void PrintSimpleImplementation(Printer* printer, const MethodDescriptor* method, - map< ::grpc::string, ::grpc::string> vars) { + map< ::std::string, ::std::string> vars) { printer->Print("{\n"); printer->Print(vars, " [[self RPCTo$method_name$With"); if (method->client_streaming()) { @@ -194,7 +194,7 @@ void PrintSimpleImplementation(Printer* printer, const MethodDescriptor* method, void PrintAdvancedImplementation(Printer* printer, const MethodDescriptor* method, - map< ::grpc::string, ::grpc::string> vars) { + map< ::std::string, ::std::string> vars) { printer->Print("{\n"); printer->Print(vars, " return [self RPCToMethod:@\"$method_name$\"\n"); @@ -218,7 +218,7 @@ void PrintAdvancedImplementation(Printer* printer, } void PrintV2Implementation(Printer* printer, const MethodDescriptor* method, - map< ::grpc::string, ::grpc::string> vars) { + map< ::std::string, ::std::string> vars) { printer->Print(" {\n"); if (method->client_streaming()) { printer->Print(vars, " return [self RPCToMethod:@\"$method_name$\"\n"); @@ -239,7 +239,7 @@ void PrintV2Implementation(Printer* printer, const MethodDescriptor* method, void PrintMethodImplementations(Printer* printer, const MethodDescriptor* method, const Parameters& generator_params) { - map< ::grpc::string, ::grpc::string> vars = GetMethodVars(method); + map< ::std::string, ::std::string> vars = GetMethodVars(method); PrintProtoRpcDeclarationAsPragma(printer, method, vars); @@ -259,9 +259,9 @@ void PrintMethodImplementations(Printer* printer, } // namespace -::grpc::string GetAllMessageClasses(const FileDescriptor* file) { - ::grpc::string output; - set< ::grpc::string> classes; +::std::string GetAllMessageClasses(const FileDescriptor* file) { + ::std::string output; + set< ::std::string> classes; for (int i = 0; i < file->service_count(); i++) { const auto service = file->service(i); for (int i = 0; i < service->method_count(); i++) { @@ -277,9 +277,9 @@ void PrintMethodImplementations(Printer* printer, return output; } -::grpc::string GetProtocol(const ServiceDescriptor* service, - const Parameters& generator_params) { - ::grpc::string output; +::std::string GetProtocol(const ServiceDescriptor* service, + const Parameters& generator_params) { + ::std::string output; if (generator_params.no_v1_compatibility) return output; @@ -287,7 +287,7 @@ void PrintMethodImplementations(Printer* printer, grpc::protobuf::io::StringOutputStream output_stream(&output); Printer printer(&output_stream, '$'); - map< ::grpc::string, ::grpc::string> vars = { + map< ::std::string, ::std::string> vars = { {"service_class", ServiceClassName(service)}}; printer.Print(vars, @@ -306,14 +306,14 @@ void PrintMethodImplementations(Printer* printer, return output; } -::grpc::string GetV2Protocol(const ServiceDescriptor* service) { - ::grpc::string output; +::std::string GetV2Protocol(const ServiceDescriptor* service) { + ::std::string output; // Scope the output stream so it closes and finalizes output to the string. grpc::protobuf::io::StringOutputStream output_stream(&output); Printer printer(&output_stream, '$'); - map< ::grpc::string, ::grpc::string> vars = { + map< ::std::string, ::std::string> vars = { {"service_class", ServiceClassName(service) + "2"}}; printer.Print(vars, "@protocol $service_class$ \n\n"); @@ -325,15 +325,15 @@ void PrintMethodImplementations(Printer* printer, return output; } -::grpc::string GetInterface(const ServiceDescriptor* service, - const Parameters& generator_params) { - ::grpc::string output; +::std::string GetInterface(const ServiceDescriptor* service, + const Parameters& generator_params) { + ::std::string output; // Scope the output stream so it closes and finalizes output to the string. grpc::protobuf::io::StringOutputStream output_stream(&output); Printer printer(&output_stream, '$'); - map< ::grpc::string, ::grpc::string> vars = { + map< ::std::string, ::std::string> vars = { {"service_class", ServiceClassName(service)}}; printer.Print(vars, @@ -368,15 +368,15 @@ void PrintMethodImplementations(Printer* printer, return output; } -::grpc::string GetSource(const ServiceDescriptor* service, - const Parameters& generator_params) { - ::grpc::string output; +::std::string GetSource(const ServiceDescriptor* service, + const Parameters& generator_params) { + ::std::string output; { // Scope the output stream so it closes and finalizes output to the string. grpc::protobuf::io::StringOutputStream output_stream(&output); Printer printer(&output_stream, '$'); - map< ::grpc::string, ::grpc::string> vars = { + map< ::std::string, ::std::string> vars = { {"service_name", service->name()}, {"service_class", ServiceClassName(service)}, {"package", service->file()->package()}}; diff --git a/src/compiler/objective_c_generator.h b/src/compiler/objective_c_generator.h index a47d4764383..eef37235cd7 100644 --- a/src/compiler/objective_c_generator.h +++ b/src/compiler/objective_c_generator.h @@ -28,9 +28,9 @@ struct Parameters { bool no_v1_compatibility; }; -using ::grpc::string; using ::grpc::protobuf::FileDescriptor; using ::grpc::protobuf::ServiceDescriptor; +using ::std::string; // Returns forward declaration of classes in the generated header file. string GetAllMessageClasses(const FileDescriptor* file); diff --git a/src/compiler/objective_c_generator_helpers.h b/src/compiler/objective_c_generator_helpers.h index 2896a178535..b372e24deba 100644 --- a/src/compiler/objective_c_generator_helpers.h +++ b/src/compiler/objective_c_generator_helpers.h @@ -27,9 +27,9 @@ namespace grpc_objective_c_generator { -using ::grpc::string; using ::grpc::protobuf::FileDescriptor; using ::grpc::protobuf::ServiceDescriptor; +using ::std::string; inline string MessageHeaderName(const FileDescriptor* file) { return google::protobuf::compiler::objectivec::FilePath(file) + ".pbobjc.h"; @@ -41,53 +41,53 @@ inline string ServiceClassName(const ServiceDescriptor* service) { return prefix + service->name(); } -inline ::grpc::string LocalImport(const ::grpc::string& import) { - return ::grpc::string("#import \"" + import + "\"\n"); +inline ::std::string LocalImport(const ::std::string& import) { + return ::std::string("#import \"" + import + "\"\n"); } -inline ::grpc::string FrameworkImport(const ::grpc::string& import, - const ::grpc::string& framework) { +inline ::std::string FrameworkImport(const ::std::string& import, + const ::std::string& framework) { // Flattens the directory structure: grab the file name only std::size_t pos = import.rfind("/"); // If pos is npos, pos + 1 is 0, which gives us the entire string, // so there's no need to check that - ::grpc::string filename = import.substr(pos + 1, import.size() - (pos + 1)); - return ::grpc::string("#import <" + framework + "/" + filename + ">\n"); + ::std::string filename = import.substr(pos + 1, import.size() - (pos + 1)); + return ::std::string("#import <" + framework + "/" + filename + ">\n"); } -inline ::grpc::string SystemImport(const ::grpc::string& import) { - return ::grpc::string("#import <" + import + ">\n"); +inline ::std::string SystemImport(const ::std::string& import) { + return ::std::string("#import <" + import + ">\n"); } -inline ::grpc::string PreprocConditional(::grpc::string symbol, bool invert) { +inline ::std::string PreprocConditional(::std::string symbol, bool invert) { return invert ? "!defined(" + symbol + ") || !" + symbol : "defined(" + symbol + ") && " + symbol; } -inline ::grpc::string PreprocIf(const ::grpc::string& symbol, - const ::grpc::string& if_true) { - return ::grpc::string("#if " + PreprocConditional(symbol, false) + "\n" + - if_true + "#endif\n"); +inline ::std::string PreprocIf(const ::std::string& symbol, + const ::std::string& if_true) { + return ::std::string("#if " + PreprocConditional(symbol, false) + "\n" + + if_true + "#endif\n"); } -inline ::grpc::string PreprocIfNot(const ::grpc::string& symbol, - const ::grpc::string& if_true) { - return ::grpc::string("#if " + PreprocConditional(symbol, true) + "\n" + - if_true + "#endif\n"); +inline ::std::string PreprocIfNot(const ::std::string& symbol, + const ::std::string& if_true) { + return ::std::string("#if " + PreprocConditional(symbol, true) + "\n" + + if_true + "#endif\n"); } -inline ::grpc::string PreprocIfElse(const ::grpc::string& symbol, - const ::grpc::string& if_true, - const ::grpc::string& if_false) { - return ::grpc::string("#if " + PreprocConditional(symbol, false) + "\n" + - if_true + "#else\n" + if_false + "#endif\n"); +inline ::std::string PreprocIfElse(const ::std::string& symbol, + const ::std::string& if_true, + const ::std::string& if_false) { + return ::std::string("#if " + PreprocConditional(symbol, false) + "\n" + + if_true + "#else\n" + if_false + "#endif\n"); } -inline ::grpc::string PreprocIfNotElse(const ::grpc::string& symbol, - const ::grpc::string& if_true, - const ::grpc::string& if_false) { - return ::grpc::string("#if " + PreprocConditional(symbol, true) + "\n" + - if_true + "#else\n" + if_false + "#endif\n"); +inline ::std::string PreprocIfNotElse(const ::std::string& symbol, + const ::std::string& if_true, + const ::std::string& if_false) { + return ::std::string("#if " + PreprocConditional(symbol, true) + "\n" + + if_true + "#else\n" + if_false + "#endif\n"); } } // namespace grpc_objective_c_generator diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 5a5fa0e4082..0aeab19b1ad 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -37,10 +37,10 @@ using ::grpc_objective_c_generator::SystemImport; namespace { -inline ::grpc::string ImportProtoHeaders( +inline ::std::string ImportProtoHeaders( const grpc::protobuf::FileDescriptor* dep, const char* indent, - const ::grpc::string& framework) { - ::grpc::string header = grpc_objective_c_generator::MessageHeaderName(dep); + const ::std::string& framework) { + ::std::string header = grpc_objective_c_generator::MessageHeaderName(dep); if (!IsProtobufLibraryBundledProtoFile(dep)) { if (framework.empty()) { @@ -50,14 +50,14 @@ inline ::grpc::string ImportProtoHeaders( } } - ::grpc::string base_name = header; + ::std::string base_name = header; grpc_generator::StripPrefix(&base_name, "google/protobuf/"); - ::grpc::string file_name = "GPB" + base_name; + ::std::string file_name = "GPB" + base_name; // create the import code snippet - ::grpc::string framework_header = - ::grpc::string(ProtobufLibraryFrameworkName) + "/" + file_name; + ::std::string framework_header = + ::std::string(ProtobufLibraryFrameworkName) + "/" + file_name; - static const ::grpc::string kFrameworkImportsCondition = + static const ::std::string kFrameworkImportsCondition = "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS"; return PreprocIfElse(kFrameworkImportsCondition, indent + SystemImport(framework_header), @@ -77,54 +77,54 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } virtual bool Generate(const grpc::protobuf::FileDescriptor* file, - const ::grpc::string& parameter, + const ::std::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - ::grpc::string* error) const override { + ::std::string* error) const override { if (file->service_count() == 0) { // No services. Do nothing. return true; } - ::grpc::string framework; - std::vector<::grpc::string> params_list = + ::std::string framework; + std::vector<::std::string> params_list = grpc_generator::tokenize(parameter, ","); for (auto param_str = params_list.begin(); param_str != params_list.end(); ++param_str) { - std::vector<::grpc::string> param = + std::vector<::std::string> param = grpc_generator::tokenize(*param_str, "="); if (param[0] == "generate_for_named_framework") { if (param.size() != 2) { *error = - grpc::string("Format: generate_for_named_framework="); + std::string("Format: generate_for_named_framework="); return false; } else if (param[1].empty()) { - *error = grpc::string( - "Name of framework cannot be empty for parameter: ") + - param[0]; + *error = + std::string("Name of framework cannot be empty for parameter: ") + + param[0]; return false; } framework = param[1]; } } - static const ::grpc::string kNonNullBegin = "NS_ASSUME_NONNULL_BEGIN\n"; - static const ::grpc::string kNonNullEnd = "NS_ASSUME_NONNULL_END\n"; - static const ::grpc::string kProtocolOnly = "GPB_GRPC_PROTOCOL_ONLY"; - static const ::grpc::string kForwardDeclare = + static const ::std::string kNonNullBegin = "NS_ASSUME_NONNULL_BEGIN\n"; + static const ::std::string kNonNullEnd = "NS_ASSUME_NONNULL_END\n"; + static const ::std::string kProtocolOnly = "GPB_GRPC_PROTOCOL_ONLY"; + static const ::std::string kForwardDeclare = "GPB_GRPC_FORWARD_DECLARE_MESSAGE_PROTO"; - ::grpc::string file_name = + ::std::string file_name = google::protobuf::compiler::objectivec::FilePath(file); grpc_objective_c_generator::Parameters generator_params; generator_params.no_v1_compatibility = false; if (!parameter.empty()) { - std::vector parameters_list = + std::vector parameters_list = grpc_generator::tokenize(parameter, ","); for (auto parameter_string = parameters_list.begin(); parameter_string != parameters_list.end(); parameter_string++) { - std::vector param = + std::vector param = grpc_generator::tokenize(*parameter_string, "="); if (param[0] == "no_v1_compatibility") { generator_params.no_v1_compatibility = true; @@ -133,7 +133,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } // Write out a file header. - ::grpc::string file_header = + ::std::string file_header = "// Code generated by gRPC proto compiler. DO NOT EDIT!\n" "// source: " + file->name() + "\n\n"; @@ -141,14 +141,14 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { { // Generate .pbrpc.h - ::grpc::string imports; + ::std::string imports; if (framework.empty()) { imports = LocalImport(file_name + ".pbobjc.h"); } else { imports = FrameworkImport(file_name + ".pbobjc.h", framework); } - ::grpc::string system_imports = + ::std::string system_imports = SystemImport("ProtoRPC/ProtoService.h") + (generator_params.no_v1_compatibility ? SystemImport("ProtoRPC/ProtoRPC.h") @@ -158,7 +158,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { SystemImport("RxLibrary/GRXWriter.h"); } - ::grpc::string forward_declarations = + ::std::string forward_declarations = "@class GRPCUnaryProtoCall;\n" "@class GRPCStreamingProtoCall;\n" "@class GRPCCallOptions;\n" @@ -168,29 +168,29 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } forward_declarations += "\n"; - ::grpc::string class_declarations = + ::std::string class_declarations = grpc_objective_c_generator::GetAllMessageClasses(file); - ::grpc::string class_imports; + ::std::string class_imports; for (int i = 0; i < file->dependency_count(); i++) { class_imports += ImportProtoHeaders(file->dependency(i), " ", framework); } - ::grpc::string ng_protocols; + ::std::string ng_protocols; for (int i = 0; i < file->service_count(); i++) { const grpc::protobuf::ServiceDescriptor* service = file->service(i); ng_protocols += grpc_objective_c_generator::GetV2Protocol(service); } - ::grpc::string protocols; + ::std::string protocols; for (int i = 0; i < file->service_count(); i++) { const grpc::protobuf::ServiceDescriptor* service = file->service(i); protocols += grpc_objective_c_generator::GetProtocol(service, generator_params); } - ::grpc::string interfaces; + ::std::string interfaces; for (int i = 0; i < file->service_count(); i++) { const grpc::protobuf::ServiceDescriptor* service = file->service(i); interfaces += @@ -211,7 +211,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { { // Generate .pbrpc.m - ::grpc::string imports; + ::std::string imports; if (framework.empty()) { imports = LocalImport(file_name + ".pbrpc.h") + LocalImport(file_name + ".pbobjc.h"); @@ -226,12 +226,12 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { imports += SystemImport("RxLibrary/GRXWriter+Immediate.h"); } - ::grpc::string class_imports; + ::std::string class_imports; for (int i = 0; i < file->dependency_count(); i++) { class_imports += ImportProtoHeaders(file->dependency(i), "", framework); } - ::grpc::string definitions; + ::std::string definitions; for (int i = 0; i < file->service_count(); i++) { const grpc::protobuf::ServiceDescriptor* service = file->service(i); definitions += @@ -250,7 +250,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { private: // Write the given code into the given file. void Write(grpc::protobuf::compiler::GeneratorContext* context, - const ::grpc::string& filename, const ::grpc::string& code) const { + const ::std::string& filename, const ::std::string& code) const { std::unique_ptr output( context->Open(filename)); grpc::protobuf::io::CodedOutputStream coded_out(output.get()); diff --git a/src/compiler/php_generator.cc b/src/compiler/php_generator.cc index ddeb2bc7a96..4ceab989369 100644 --- a/src/compiler/php_generator.cc +++ b/src/compiler/php_generator.cc @@ -35,8 +35,8 @@ using std::map; namespace grpc_php_generator { namespace { -grpc::string ConvertToPhpNamespace(const grpc::string& name) { - std::vector tokens = grpc_generator::tokenize(name, "."); +std::string ConvertToPhpNamespace(const std::string& name) { + std::vector tokens = grpc_generator::tokenize(name, "."); std::ostringstream oss; for (unsigned int i = 0; i < tokens.size(); i++) { oss << (i == 0 ? "" : "\\") @@ -45,7 +45,7 @@ grpc::string ConvertToPhpNamespace(const grpc::string& name) { return oss.str(); } -grpc::string PackageName(const FileDescriptor* file) { +std::string PackageName(const FileDescriptor* file) { if (file->options().has_php_namespace()) { return file->options().php_namespace(); } else { @@ -53,9 +53,9 @@ grpc::string PackageName(const FileDescriptor* file) { } } -grpc::string MessageIdentifierName(const grpc::string& name, - const FileDescriptor* file) { - std::vector tokens = grpc_generator::tokenize(name, "."); +std::string MessageIdentifierName(const std::string& name, + const FileDescriptor* file) { + std::vector tokens = grpc_generator::tokenize(name, "."); std::ostringstream oss; if (PackageName(file) != "") { oss << PackageName(file) << "\\"; @@ -67,7 +67,7 @@ grpc::string MessageIdentifierName(const grpc::string& name, void PrintMethod(const MethodDescriptor* method, Printer* out) { const Descriptor* input_type = method->input_type(); const Descriptor* output_type = method->output_type(); - map vars; + map vars; vars["service_name"] = method->service()->full_name(); vars["name"] = method->name(); vars["input_type_id"] = @@ -123,8 +123,8 @@ void PrintMethod(const MethodDescriptor* method, Printer* out) { // Prints out the service descriptor object void PrintService(const ServiceDescriptor* service, - const grpc::string& class_suffix, Printer* out) { - map vars; + const std::string& class_suffix, Printer* out) { + map vars; out->Print("/**\n"); out->Print(GetPHPComments(service, " *").c_str()); out->Print(" */\n"); @@ -146,7 +146,7 @@ void PrintService(const ServiceDescriptor* service, out->Outdent(); out->Print("}\n\n"); for (int i = 0; i < service->method_count(); i++) { - grpc::string method_name = + std::string method_name = grpc_generator::LowercaseFirstLetter(service->method(i)->name()); PrintMethod(service->method(i), out); } @@ -156,10 +156,10 @@ void PrintService(const ServiceDescriptor* service, } } // namespace -grpc::string GenerateFile(const FileDescriptor* file, - const ServiceDescriptor* service, - const grpc::string& class_suffix) { - grpc::string output; +std::string GenerateFile(const FileDescriptor* file, + const ServiceDescriptor* service, + const std::string& class_suffix) { + std::string output; { StringOutputStream output_stream(&output); Printer out(&output_stream, '$'); @@ -167,14 +167,14 @@ grpc::string GenerateFile(const FileDescriptor* file, out.Print(" vars; - grpc::string php_namespace = PackageName(file); + map vars; + std::string php_namespace = PackageName(file); vars["package"] = php_namespace; out.Print(vars, "namespace $package$;\n\n"); diff --git a/src/compiler/php_generator.h b/src/compiler/php_generator.h index 46222b3d8e7..aa6d20c7fd7 100644 --- a/src/compiler/php_generator.h +++ b/src/compiler/php_generator.h @@ -23,9 +23,9 @@ namespace grpc_php_generator { -grpc::string GenerateFile(const grpc::protobuf::FileDescriptor* file, - const grpc::protobuf::ServiceDescriptor* service, - const grpc::string& class_suffix); +std::string GenerateFile(const grpc::protobuf::FileDescriptor* file, + const grpc::protobuf::ServiceDescriptor* service, + const std::string& class_suffix); } // namespace grpc_php_generator diff --git a/src/compiler/php_generator_helpers.h b/src/compiler/php_generator_helpers.h index abe273d47bb..24560e4d984 100644 --- a/src/compiler/php_generator_helpers.h +++ b/src/compiler/php_generator_helpers.h @@ -26,32 +26,32 @@ namespace grpc_php_generator { -inline grpc::string GetPHPServiceClassname( +inline std::string GetPHPServiceClassname( const grpc::protobuf::ServiceDescriptor* service, - const grpc::string& class_suffix) { + const std::string& class_suffix) { return service->name() + (class_suffix == "" ? "Client" : class_suffix); } // ReplaceAll replaces all instances of search with replace in s. -inline grpc::string ReplaceAll(grpc::string s, const grpc::string& search, - const grpc::string& replace) { +inline std::string ReplaceAll(std::string s, const std::string& search, + const std::string& replace) { size_t pos = 0; - while ((pos = s.find(search, pos)) != grpc::string::npos) { + while ((pos = s.find(search, pos)) != std::string::npos) { s.replace(pos, search.length(), replace); pos += replace.length(); } return s; } -inline grpc::string GetPHPServiceFilename( +inline std::string GetPHPServiceFilename( const grpc::protobuf::FileDescriptor* file, const grpc::protobuf::ServiceDescriptor* service, - const grpc::string& class_suffix) { + const std::string& class_suffix) { std::ostringstream oss; if (file->options().has_php_namespace()) { oss << ReplaceAll(file->options().php_namespace(), "\\", "/"); } else { - std::vector tokens = + std::vector tokens = grpc_generator::tokenize(file->package(), "."); for (unsigned int i = 0; i < tokens.size(); i++) { oss << (i == 0 ? "" : "/") @@ -65,8 +65,8 @@ inline grpc::string GetPHPServiceFilename( // Get leading or trailing comments in a string. Comment lines start with "// ". // Leading detached comments are put in front of leading comments. template -inline grpc::string GetPHPComments(const DescriptorType* desc, - grpc::string prefix) { +inline std::string GetPHPComments(const DescriptorType* desc, + std::string prefix) { return ReplaceAll(grpc_generator::GetPrefixedComments(desc, true, prefix), "*/", "*/"); } diff --git a/src/compiler/php_plugin.cc b/src/compiler/php_plugin.cc index d16cd08c849..c1be38765f5 100644 --- a/src/compiler/php_plugin.cc +++ b/src/compiler/php_plugin.cc @@ -38,17 +38,17 @@ class PHPGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } bool Generate(const grpc::protobuf::FileDescriptor* file, - const grpc::string& parameter, + const std::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const override { + std::string* error) const override { if (file->service_count() == 0) { return true; } - std::vector > options; + std::vector > options; ParseGeneratorParameter(parameter, &options); - grpc::string class_suffix; + std::string class_suffix; for (size_t i = 0; i < options.size(); ++i) { if (options[i].first == "class_suffix") { class_suffix = options[i].second; @@ -59,10 +59,10 @@ class PHPGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } for (int i = 0; i < file->service_count(); i++) { - grpc::string code = GenerateFile(file, file->service(i), class_suffix); + std::string code = GenerateFile(file, file->service(i), class_suffix); // Get output file name - grpc::string file_name = + std::string file_name = GetPHPServiceFilename(file, file->service(i), class_suffix); std::unique_ptr output( diff --git a/src/compiler/protobuf_plugin.h b/src/compiler/protobuf_plugin.h index 06cda5f85e6..951ff5ebd8c 100644 --- a/src/compiler/protobuf_plugin.h +++ b/src/compiler/protobuf_plugin.h @@ -29,8 +29,8 @@ // Get leading or trailing comments in a string. template -inline grpc::string GetCommentsHelper(const DescriptorType* desc, bool leading, - const grpc::string& prefix) { +inline std::string GetCommentsHelper(const DescriptorType* desc, bool leading, + const std::string& prefix) { return grpc_generator::GetPrefixedComments(desc, leading, prefix); } @@ -39,36 +39,36 @@ class ProtoBufMethod : public grpc_generator::Method { ProtoBufMethod(const grpc::protobuf::MethodDescriptor* method) : method_(method) {} - grpc::string name() const { return method_->name(); } + std::string name() const { return method_->name(); } - grpc::string input_type_name() const { + std::string input_type_name() const { return grpc_cpp_generator::ClassName(method_->input_type(), true); } - grpc::string output_type_name() const { + std::string output_type_name() const { return grpc_cpp_generator::ClassName(method_->output_type(), true); } - grpc::string get_input_type_name() const { + std::string get_input_type_name() const { return method_->input_type()->file()->name(); } - grpc::string get_output_type_name() const { + std::string get_output_type_name() const { return method_->output_type()->file()->name(); } // TODO(https://github.com/grpc/grpc/issues/18800): Clean this up. bool get_module_and_message_path_input( - grpc::string* str, grpc::string generator_file_name, - bool generate_in_pb2_grpc, grpc::string import_prefix, - const std::vector& prefixes_to_filter) const final { + std::string* str, std::string generator_file_name, + bool generate_in_pb2_grpc, std::string import_prefix, + const std::vector& prefixes_to_filter) const final { return grpc_python_generator::GetModuleAndMessagePath( method_->input_type(), str, generator_file_name, generate_in_pb2_grpc, import_prefix, prefixes_to_filter); } bool get_module_and_message_path_output( - grpc::string* str, grpc::string generator_file_name, - bool generate_in_pb2_grpc, grpc::string import_prefix, - const std::vector& prefixes_to_filter) const final { + std::string* str, std::string generator_file_name, + bool generate_in_pb2_grpc, std::string import_prefix, + const std::vector& prefixes_to_filter) const final { return grpc_python_generator::GetModuleAndMessagePath( method_->output_type(), str, generator_file_name, generate_in_pb2_grpc, import_prefix, prefixes_to_filter); @@ -86,15 +86,15 @@ class ProtoBufMethod : public grpc_generator::Method { return method_->client_streaming() && method_->server_streaming(); } - grpc::string GetLeadingComments(const grpc::string prefix) const { + std::string GetLeadingComments(const std::string prefix) const { return GetCommentsHelper(method_, true, prefix); } - grpc::string GetTrailingComments(const grpc::string prefix) const { + std::string GetTrailingComments(const std::string prefix) const { return GetCommentsHelper(method_, false, prefix); } - vector GetAllComments() const { + vector GetAllComments() const { return grpc_python_generator::get_all_comments(method_); } @@ -107,7 +107,7 @@ class ProtoBufService : public grpc_generator::Service { ProtoBufService(const grpc::protobuf::ServiceDescriptor* service) : service_(service) {} - grpc::string name() const { return service_->name(); } + std::string name() const { return service_->name(); } int method_count() const { return service_->method_count(); } std::unique_ptr method(int i) const { @@ -115,15 +115,15 @@ class ProtoBufService : public grpc_generator::Service { new ProtoBufMethod(service_->method(i))); } - grpc::string GetLeadingComments(const grpc::string prefix) const { + std::string GetLeadingComments(const std::string prefix) const { return GetCommentsHelper(service_, true, prefix); } - grpc::string GetTrailingComments(const grpc::string prefix) const { + std::string GetTrailingComments(const std::string prefix) const { return GetCommentsHelper(service_, false, prefix); } - vector GetAllComments() const { + vector GetAllComments() const { return grpc_python_generator::get_all_comments(service_); } @@ -133,10 +133,10 @@ class ProtoBufService : public grpc_generator::Service { class ProtoBufPrinter : public grpc_generator::Printer { public: - ProtoBufPrinter(grpc::string* str) + ProtoBufPrinter(std::string* str) : output_stream_(str), printer_(&output_stream_, '$') {} - void Print(const std::map& vars, + void Print(const std::map& vars, const char* string_template) { printer_.Print(vars, string_template); } @@ -155,17 +155,17 @@ class ProtoBufFile : public grpc_generator::File { public: ProtoBufFile(const grpc::protobuf::FileDescriptor* file) : file_(file) {} - grpc::string filename() const { return file_->name(); } - grpc::string filename_without_ext() const { + std::string filename() const { return file_->name(); } + std::string filename_without_ext() const { return grpc_generator::StripProto(filename()); } - grpc::string package() const { return file_->package(); } - std::vector package_parts() const { + std::string package() const { return file_->package(); } + std::vector package_parts() const { return grpc_generator::tokenize(package(), "."); } - grpc::string additional_headers() const { return ""; } + std::string additional_headers() const { return ""; } int service_count() const { return file_->service_count(); } std::unique_ptr service(int i) const { @@ -174,24 +174,24 @@ class ProtoBufFile : public grpc_generator::File { } std::unique_ptr CreatePrinter( - grpc::string* str) const { + std::string* str) const { return std::unique_ptr(new ProtoBufPrinter(str)); } - grpc::string GetLeadingComments(const grpc::string prefix) const { + std::string GetLeadingComments(const std::string prefix) const { return GetCommentsHelper(file_, true, prefix); } - grpc::string GetTrailingComments(const grpc::string prefix) const { + std::string GetTrailingComments(const std::string prefix) const { return GetCommentsHelper(file_, false, prefix); } - vector GetAllComments() const { + vector GetAllComments() const { return grpc_python_generator::get_all_comments(file_); } - vector GetImportNames() const { - vector proto_names; + vector GetImportNames() const { + vector proto_names; for (int i = 0; i < file_->dependency_count(); ++i) { const auto& dep = *file_->dependency(i); proto_names.push_back(dep.name()); diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index e61db000e00..40e79b54530 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -51,13 +51,13 @@ using std::vector; namespace grpc_python_generator { -grpc::string generator_file_name; +std::string generator_file_name; namespace { -typedef map StringMap; -typedef vector StringVector; -typedef tuple StringPair; +typedef map StringMap; +typedef vector StringVector; +typedef tuple StringPair; typedef set StringPairSet; // Provides RAII indentation handling. Use as: @@ -107,7 +107,7 @@ void PrivateGenerator::PrintAllComments(StringVector comments, for (StringVector::iterator it = comments.begin(); it != comments.end(); ++it) { size_t start_pos = it->find_first_not_of(' '); - if (start_pos != grpc::string::npos) { + if (start_pos != std::string::npos) { out->PrintRaw(it->c_str() + start_pos); } out->Print("\n"); @@ -134,7 +134,7 @@ bool PrivateGenerator::PrintBetaServicer(const grpc_generator::Service* service, PrintAllComments(service_comments, out); for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); - grpc::string arg_name = + std::string arg_name = method->ClientStreaming() ? "request_iterator" : "request"; StringMap method_dict; method_dict["Method"] = method->name(); @@ -170,7 +170,7 @@ bool PrivateGenerator::PrintBetaStub(const grpc_generator::Service* service, PrintAllComments(service_comments, out); for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); - grpc::string arg_name = + std::string arg_name = method->ClientStreaming() ? "request_iterator" : "request"; StringMap method_dict; method_dict["Method"] = method->name(); @@ -193,7 +193,7 @@ bool PrivateGenerator::PrintBetaStub(const grpc_generator::Service* service, } bool PrivateGenerator::PrintBetaServerFactory( - const grpc::string& package_qualified_service_name, + const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out) { StringMap service_dict; service_dict["Service"] = service->name(); @@ -214,18 +214,18 @@ bool PrivateGenerator::PrintBetaServerFactory( StringMap output_message_modules_and_classes; for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); - const grpc::string method_implementation_constructor = - grpc::string(method->ClientStreaming() ? "stream_" : "unary_") + - grpc::string(method->ServerStreaming() ? "stream_" : "unary_") + + const std::string method_implementation_constructor = + std::string(method->ClientStreaming() ? "stream_" : "unary_") + + std::string(method->ServerStreaming() ? "stream_" : "unary_") + "inline"; - grpc::string input_message_module_and_class; + std::string input_message_module_and_class; if (!method->get_module_and_message_path_input( &input_message_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, config.prefixes_to_filter)) { return false; } - grpc::string output_message_module_and_class; + std::string output_message_module_and_class; if (!method->get_module_and_message_path_output( &output_message_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, @@ -280,7 +280,7 @@ bool PrivateGenerator::PrintBetaServerFactory( method_dict["Method"] = name_and_implementation_constructor->first; method_dict["Constructor"] = name_and_implementation_constructor->second; IndentScope raii_descriptions_indent(out); - const grpc::string method_name = + const std::string method_name = name_and_implementation_constructor->first; out->Print(method_dict, "(\'$PackageQualifiedServiceName$\', \'$Method$\'): " @@ -302,7 +302,7 @@ bool PrivateGenerator::PrintBetaServerFactory( } bool PrivateGenerator::PrintBetaStubFactory( - const grpc::string& package_qualified_service_name, + const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out) { StringMap dict; dict["Service"] = service->name(); @@ -323,17 +323,17 @@ bool PrivateGenerator::PrintBetaStubFactory( StringMap output_message_modules_and_classes; for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); - const grpc::string method_cardinality = - grpc::string(method->ClientStreaming() ? "STREAM" : "UNARY") + "_" + - grpc::string(method->ServerStreaming() ? "STREAM" : "UNARY"); - grpc::string input_message_module_and_class; + const std::string method_cardinality = + std::string(method->ClientStreaming() ? "STREAM" : "UNARY") + "_" + + std::string(method->ServerStreaming() ? "STREAM" : "UNARY"); + std::string input_message_module_and_class; if (!method->get_module_and_message_path_input( &input_message_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, config.prefixes_to_filter)) { return false; } - grpc::string output_message_module_and_class; + std::string output_message_module_and_class; if (!method->get_module_and_message_path_output( &output_message_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, @@ -406,7 +406,7 @@ bool PrivateGenerator::PrintBetaStubFactory( } bool PrivateGenerator::PrintStub( - const grpc::string& package_qualified_service_name, + const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out) { StringMap dict; dict["Service"] = service->name(); @@ -430,17 +430,17 @@ bool PrivateGenerator::PrintStub( out->Print("\"\"\"\n"); for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); - grpc::string multi_callable_constructor = - grpc::string(method->ClientStreaming() ? "stream" : "unary") + "_" + - grpc::string(method->ServerStreaming() ? "stream" : "unary"); - grpc::string request_module_and_class; + std::string multi_callable_constructor = + std::string(method->ClientStreaming() ? "stream" : "unary") + "_" + + std::string(method->ServerStreaming() ? "stream" : "unary"); + std::string request_module_and_class; if (!method->get_module_and_message_path_input( &request_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, config.prefixes_to_filter)) { return false; } - grpc::string response_module_and_class; + std::string response_module_and_class; if (!method->get_module_and_message_path_output( &response_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, @@ -486,7 +486,7 @@ bool PrivateGenerator::PrintServicer(const grpc_generator::Service* service, PrintAllComments(service_comments, out); for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); - grpc::string arg_name = + std::string arg_name = method->ClientStreaming() ? "request_iterator" : "request"; StringMap method_dict; method_dict["Method"] = method->name(); @@ -507,7 +507,7 @@ bool PrivateGenerator::PrintServicer(const grpc_generator::Service* service, } bool PrivateGenerator::PrintAddServicerToServer( - const grpc::string& package_qualified_service_name, + const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out) { StringMap service_dict; service_dict["Service"] = service->name(); @@ -522,18 +522,18 @@ bool PrivateGenerator::PrintAddServicerToServer( IndentScope raii_dict_second_indent(out); for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); - grpc::string method_handler_constructor = - grpc::string(method->ClientStreaming() ? "stream" : "unary") + "_" + - grpc::string(method->ServerStreaming() ? "stream" : "unary") + + std::string method_handler_constructor = + std::string(method->ClientStreaming() ? "stream" : "unary") + "_" + + std::string(method->ServerStreaming() ? "stream" : "unary") + "_rpc_method_handler"; - grpc::string request_module_and_class; + std::string request_module_and_class; if (!method->get_module_and_message_path_input( &request_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, config.prefixes_to_filter)) { return false; } - grpc::string response_module_and_class; + std::string response_module_and_class; if (!method->get_module_and_message_path_output( &response_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, @@ -583,7 +583,7 @@ bool PrivateGenerator::PrintAddServicerToServer( * should never be instantiated. */ bool PrivateGenerator::PrintServiceClass( - const grpc::string& package_qualified_service_name, + const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out) { StringMap dict; dict["Service"] = service->name(); @@ -596,14 +596,14 @@ bool PrivateGenerator::PrintServiceClass( PrintAllComments(service_comments, out); for (int i = 0; i < service->method_count(); ++i) { const auto& method = service->method(i); - grpc::string request_module_and_class; + std::string request_module_and_class; if (!method->get_module_and_message_path_input( &request_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, config.prefixes_to_filter)) { return false; } - grpc::string response_module_and_class; + std::string response_module_and_class; if (!method->get_module_and_message_path_output( &response_module_and_class, generator_file_name, generate_in_pb2_grpc, config.import_prefix, @@ -615,7 +615,7 @@ bool PrivateGenerator::PrintServiceClass( method_dict["Method"] = method->name(); out->Print("@staticmethod\n"); out->Print(method_dict, "def $Method$("); - grpc::string request_parameter( + std::string request_parameter( method->ClientStreaming() ? "request_iterator" : "request"); StringMap args_dict; args_dict["RequestParameter"] = request_parameter; @@ -635,9 +635,9 @@ bool PrivateGenerator::PrintServiceClass( } { IndentScope method_indent(out); - grpc::string arity_method_name = - grpc::string(method->ClientStreaming() ? "stream" : "unary") + "_" + - grpc::string(method->ServerStreaming() ? "stream" : "unary"); + std::string arity_method_name = + std::string(method->ClientStreaming() ? "stream" : "unary") + "_" + + std::string(method->ServerStreaming() ? "stream" : "unary"); args_dict["ArityMethodName"] = arity_method_name; args_dict["PackageQualifiedService"] = package_qualified_service_name; args_dict["Method"] = method->name(); @@ -690,21 +690,21 @@ bool PrivateGenerator::PrintPreamble(grpc_generator::Printer* out) { for (int j = 0; j < service->method_count(); ++j) { auto method = service.get()->method(j); - grpc::string input_type_file_name = method->get_input_type_name(); - grpc::string input_module_name = + std::string input_type_file_name = method->get_input_type_name(); + std::string input_module_name = ModuleName(input_type_file_name, config.import_prefix, config.prefixes_to_filter); - grpc::string input_module_alias = + std::string input_module_alias = ModuleAlias(input_type_file_name, config.import_prefix, config.prefixes_to_filter); imports_set.insert( std::make_tuple(input_module_name, input_module_alias)); - grpc::string output_type_file_name = method->get_output_type_name(); - grpc::string output_module_name = + std::string output_type_file_name = method->get_output_type_name(); + std::string output_module_name = ModuleName(output_type_file_name, config.import_prefix, config.prefixes_to_filter); - grpc::string output_module_alias = + std::string output_module_alias = ModuleAlias(output_type_file_name, config.import_prefix, config.prefixes_to_filter); imports_set.insert( @@ -717,7 +717,7 @@ bool PrivateGenerator::PrintPreamble(grpc_generator::Printer* out) { auto module_name = std::get<0>(*it); var["ModuleAlias"] = std::get<1>(*it); const size_t last_dot_pos = module_name.rfind('.'); - if (last_dot_pos == grpc::string::npos) { + if (last_dot_pos == std::string::npos) { var["ImportStatement"] = "import " + module_name; } else { var["ImportStatement"] = "from " + module_name.substr(0, last_dot_pos) + @@ -731,13 +731,13 @@ bool PrivateGenerator::PrintPreamble(grpc_generator::Printer* out) { } bool PrivateGenerator::PrintGAServices(grpc_generator::Printer* out) { - grpc::string package = file->package(); + std::string package = file->package(); if (!package.empty()) { package = package.append("."); } for (int i = 0; i < file->service_count(); ++i) { auto service = file->service(i); - grpc::string package_qualified_service_name = package + service->name(); + std::string package_qualified_service_name = package + service->name(); if (!(PrintStub(package_qualified_service_name, service.get(), out) && PrintServicer(service.get(), out) && PrintAddServicerToServer(package_qualified_service_name, @@ -751,13 +751,13 @@ bool PrivateGenerator::PrintGAServices(grpc_generator::Printer* out) { } bool PrivateGenerator::PrintBetaServices(grpc_generator::Printer* out) { - grpc::string package = file->package(); + std::string package = file->package(); if (!package.empty()) { package = package.append("."); } for (int i = 0; i < file->service_count(); ++i) { auto service = file->service(i); - grpc::string package_qualified_service_name = package + service->name(); + std::string package_qualified_service_name = package + service->name(); if (!(PrintBetaServicer(service.get(), out) && PrintBetaStub(service.get(), out) && PrintBetaServerFactory(package_qualified_service_name, service.get(), @@ -770,8 +770,8 @@ bool PrivateGenerator::PrintBetaServices(grpc_generator::Printer* out) { return true; } -pair PrivateGenerator::GetGrpcServices() { - grpc::string output; +pair PrivateGenerator::GetGrpcServices() { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. auto out = file->CreatePrinter(&output); @@ -830,11 +830,11 @@ PythonGrpcGenerator::PythonGrpcGenerator(const GeneratorConfiguration& config) PythonGrpcGenerator::~PythonGrpcGenerator() {} static bool GenerateGrpc(GeneratorContext* context, PrivateGenerator& generator, - grpc::string file_name, bool generate_in_pb2_grpc) { + std::string file_name, bool generate_in_pb2_grpc) { bool success; std::unique_ptr output; std::unique_ptr coded_output; - grpc::string grpc_code; + std::string grpc_code; if (generate_in_pb2_grpc) { output.reset(context->Open(file_name)); @@ -855,11 +855,11 @@ static bool GenerateGrpc(GeneratorContext* context, PrivateGenerator& generator, } } -static bool ParseParameters(const grpc::string& parameter, - grpc::string* grpc_version, - std::vector* strip_prefixes, - grpc::string* error) { - std::vector comma_delimited_parameters; +static bool ParseParameters(const std::string& parameter, + std::string* grpc_version, + std::vector* strip_prefixes, + std::string* error) { + std::vector comma_delimited_parameters; grpc_python_generator::Split(parameter, ',', &comma_delimited_parameters); if (comma_delimited_parameters.size() == 1 && comma_delimited_parameters[0].empty()) { @@ -883,16 +883,16 @@ uint64_t PythonGrpcGenerator::GetSupportedFeatures() const { } bool PythonGrpcGenerator::Generate(const FileDescriptor* file, - const grpc::string& parameter, + const std::string& parameter, GeneratorContext* context, - grpc::string* error) const { + std::string* error) const { // Get output file name. - grpc::string pb2_file_name; - grpc::string pb2_grpc_file_name; + std::string pb2_file_name; + std::string pb2_grpc_file_name; static const int proto_suffix_length = strlen(".proto"); if (file->name().size() > static_cast(proto_suffix_length) && file->name().find_last_of(".proto") == file->name().size() - 1) { - grpc::string base = + std::string base = file->name().substr(0, file->name().size() - proto_suffix_length); std::replace(base.begin(), base.end(), '-', '_'); pb2_file_name = base + "_pb2.py"; @@ -904,7 +904,7 @@ bool PythonGrpcGenerator::Generate(const FileDescriptor* file, generator_file_name = file->name(); ProtoBufFile pbfile(file); - grpc::string grpc_version; + std::string grpc_version; GeneratorConfiguration extended_config(config_); bool success = ParseParameters(parameter, &grpc_version, &(extended_config.prefixes_to_filter), error); diff --git a/src/compiler/python_generator.h b/src/compiler/python_generator.h index c816e3f2b84..9480796828c 100644 --- a/src/compiler/python_generator.h +++ b/src/compiler/python_generator.h @@ -31,12 +31,12 @@ namespace grpc_python_generator { // that may be used internally at Google. struct GeneratorConfiguration { GeneratorConfiguration(); - grpc::string grpc_package_root; + std::string grpc_package_root; // TODO(https://github.com/grpc/grpc/issues/8622): Drop this. - grpc::string beta_package_root; + std::string beta_package_root; // TODO(https://github.com/google/protobuf/issues/888): Drop this. - grpc::string import_prefix; - std::vector prefixes_to_filter; + std::string import_prefix; + std::vector prefixes_to_filter; }; class PythonGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { @@ -47,9 +47,9 @@ class PythonGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { uint64_t GetSupportedFeatures() const override; bool Generate(const grpc::protobuf::FileDescriptor* file, - const grpc::string& parameter, + const std::string& parameter, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* error) const override; + std::string* error) const override; private: GeneratorConfiguration config_; diff --git a/src/compiler/python_generator_helpers.h b/src/compiler/python_generator_helpers.h index 862292db475..a52e920d82a 100644 --- a/src/compiler/python_generator_helpers.h +++ b/src/compiler/python_generator_helpers.h @@ -47,11 +47,11 @@ namespace grpc_python_generator { namespace { typedef vector DescriptorVector; -typedef vector StringVector; +typedef vector StringVector; -static grpc::string StripModulePrefixes( - const grpc::string& raw_module_name, - const std::vector& prefixes_to_filter) { +static std::string StripModulePrefixes( + const std::string& raw_module_name, + const std::vector& prefixes_to_filter) { for (const auto& prefix : prefixes_to_filter) { if (raw_module_name.rfind(prefix, 0) == 0) { return raw_module_name.substr(prefix.size(), @@ -64,10 +64,10 @@ static grpc::string StripModulePrefixes( // TODO(https://github.com/google/protobuf/issues/888): // Export `ModuleName` from protobuf's // `src/google/protobuf/compiler/python/python_generator.cc` file. -grpc::string ModuleName(const grpc::string& filename, - const grpc::string& import_prefix, - const std::vector& prefixes_to_filter) { - grpc::string basename = StripProto(filename); +std::string ModuleName(const std::string& filename, + const std::string& import_prefix, + const std::vector& prefixes_to_filter) { + std::string basename = StripProto(filename); basename = StringReplace(basename, "-", "_"); basename = StringReplace(basename, "/", "."); return StripModulePrefixes(import_prefix + basename + "_pb2", @@ -77,10 +77,10 @@ grpc::string ModuleName(const grpc::string& filename, // TODO(https://github.com/google/protobuf/issues/888): // Export `ModuleAlias` from protobuf's // `src/google/protobuf/compiler/python/python_generator.cc` file. -grpc::string ModuleAlias(const grpc::string& filename, - const grpc::string& import_prefix, - const std::vector& prefixes_to_filter) { - grpc::string module_name = +std::string ModuleAlias(const std::string& filename, + const std::string& import_prefix, + const std::vector& prefixes_to_filter) { + std::string module_name = ModuleName(filename, import_prefix, prefixes_to_filter); // We can't have dots in the module name, so we replace each with _dot_. // But that could lead to a collision between a.b and a_dot_b, so we also @@ -91,29 +91,29 @@ grpc::string ModuleAlias(const grpc::string& filename, } bool GetModuleAndMessagePath( - const Descriptor* type, grpc::string* out, grpc::string generator_file_name, - bool generate_in_pb2_grpc, grpc::string& import_prefix, - const std::vector& prefixes_to_filter) { + const Descriptor* type, std::string* out, std::string generator_file_name, + bool generate_in_pb2_grpc, std::string& import_prefix, + const std::vector& prefixes_to_filter) { const Descriptor* path_elem_type = type; DescriptorVector message_path; do { message_path.push_back(path_elem_type); path_elem_type = path_elem_type->containing_type(); } while (path_elem_type); // implicit nullptr comparison; don't be explicit - grpc::string file_name = type->file()->name(); + std::string file_name = type->file()->name(); static const int proto_suffix_length = strlen(".proto"); if (!(file_name.size() > static_cast(proto_suffix_length) && file_name.find_last_of(".proto") == file_name.size() - 1)) { return false; } - grpc::string module; + std::string module; if (generator_file_name != file_name || generate_in_pb2_grpc) { module = ModuleAlias(file_name, import_prefix, prefixes_to_filter) + "."; } else { module = ""; } - grpc::string message_type; + std::string message_type; for (DescriptorVector::reverse_iterator path_iter = message_path.rbegin(); path_iter != message_path.rend(); ++path_iter) { message_type += (*path_iter)->name() + "."; @@ -136,8 +136,8 @@ StringVector get_all_comments(const DescriptorType* descriptor) { return comments; } -inline void Split(const grpc::string& s, char delim, - std::vector* append_to) { +inline void Split(const std::string& s, char delim, + std::vector* append_to) { auto current = s.begin(); while (current <= s.end()) { auto next = std::find(current, s.end(), delim); diff --git a/src/compiler/python_private_generator.h b/src/compiler/python_private_generator.h index 4d27839ad47..62f92509f9e 100644 --- a/src/compiler/python_private_generator.h +++ b/src/compiler/python_private_generator.h @@ -42,7 +42,7 @@ struct PrivateGenerator { PrivateGenerator(const GeneratorConfiguration& config, const grpc_generator::File* file); - std::pair GetGrpcServices(); + std::pair GetGrpcServices(); private: bool PrintPreamble(grpc_generator::Printer* out); @@ -51,32 +51,32 @@ struct PrivateGenerator { bool PrintBetaServices(grpc_generator::Printer* out); bool PrintAddServicerToServer( - const grpc::string& package_qualified_service_name, + const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out); bool PrintServicer(const grpc_generator::Service* service, grpc_generator::Printer* out); - bool PrintStub(const grpc::string& package_qualified_service_name, + bool PrintStub(const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out); - bool PrintServiceClass(const grpc::string& package_qualified_service_name, + bool PrintServiceClass(const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out); bool PrintBetaServicer(const grpc_generator::Service* service, grpc_generator::Printer* out); - bool PrintBetaServerFactory( - const grpc::string& package_qualified_service_name, - const grpc_generator::Service* service, grpc_generator::Printer* out); + bool PrintBetaServerFactory(const std::string& package_qualified_service_name, + const grpc_generator::Service* service, + grpc_generator::Printer* out); bool PrintBetaStub(const grpc_generator::Service* service, grpc_generator::Printer* out); - bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name, + bool PrintBetaStubFactory(const std::string& package_qualified_service_name, const grpc_generator::Service* service, grpc_generator::Printer* out); // Get all comments (leading, leading_detached, trailing) and print them as a // docstring. Any leading space of a line will be removed, but the line // wrapping will not be changed. - void PrintAllComments(std::vector comments, + void PrintAllComments(std::vector comments, grpc_generator::Printer* out); }; diff --git a/src/compiler/ruby_generator.cc b/src/compiler/ruby_generator.cc index 2a71aae32bb..af2f2487118 100644 --- a/src/compiler/ruby_generator.cc +++ b/src/compiler/ruby_generator.cc @@ -38,17 +38,17 @@ namespace grpc_ruby_generator { namespace { // Prints out the method using the ruby gRPC DSL. -void PrintMethod(const MethodDescriptor* method, const grpc::string& package, +void PrintMethod(const MethodDescriptor* method, const std::string& package, Printer* out) { - grpc::string input_type = RubyTypeOf(method->input_type(), package); + std::string input_type = RubyTypeOf(method->input_type(), package); if (method->client_streaming()) { input_type = "stream(" + input_type + ")"; } - grpc::string output_type = RubyTypeOf(method->output_type(), package); + std::string output_type = RubyTypeOf(method->output_type(), package); if (method->server_streaming()) { output_type = "stream(" + output_type + ")"; } - std::map method_vars = ListToDict({ + std::map method_vars = ListToDict({ "mth.name", method->name(), "input.type", @@ -62,14 +62,14 @@ void PrintMethod(const MethodDescriptor* method, const grpc::string& package, } // Prints out the service using the ruby gRPC DSL. -void PrintService(const ServiceDescriptor* service, const grpc::string& package, +void PrintService(const ServiceDescriptor* service, const std::string& package, Printer* out) { if (service->method_count() == 0) { return; } // Begin the service module - std::map module_vars = ListToDict({ + std::map module_vars = ListToDict({ "module.name", Modularize(service->name()), }); @@ -86,7 +86,7 @@ void PrintService(const ServiceDescriptor* service, const grpc::string& package, out->Print("\n"); out->Print("self.marshal_class_method = :encode\n"); out->Print("self.unmarshal_class_method = :decode\n"); - std::map pkg_vars = + std::map pkg_vars = ListToDict({"service_full_name", service->full_name()}); out->Print(pkg_vars, "self.service_name = '$service_full_name$'\n"); out->Print("\n"); @@ -122,12 +122,12 @@ char ToUpper(char ch) { return IsLower(ch) ? (ch - 'a' + 'A') : ch; } // names must be PascalCased. // // foo_bar_baz -> FooBarBaz -grpc::string PackageToModule(const grpc::string& name) { +std::string PackageToModule(const std::string& name) { bool next_upper = true; - grpc::string result; + std::string result; result.reserve(name.size()); - for (grpc::string::size_type i = 0; i < name.size(); i++) { + for (std::string::size_type i = 0; i < name.size(); i++) { if (name[i] == '_') { next_upper = true; } else { @@ -144,8 +144,8 @@ grpc::string PackageToModule(const grpc::string& name) { } // end copying of protoc generator for ruby code -grpc::string GetServices(const FileDescriptor* file) { - grpc::string output; +std::string GetServices(const FileDescriptor* file) { + std::string output; { // Scope the output stream so it closes and finalizes output to the string. @@ -161,7 +161,7 @@ grpc::string GetServices(const FileDescriptor* file) { std::string package_name = RubyPackage(file); // Write out a file header. - std::map header_comment_vars = ListToDict({ + std::map header_comment_vars = ListToDict({ "file.name", file->name(), "file.package", @@ -171,7 +171,7 @@ grpc::string GetServices(const FileDescriptor* file) { out.Print(header_comment_vars, "# Source: $file.name$ for package '$file.package$'\n"); - grpc::string leading_comments = GetRubyComments(file, true); + std::string leading_comments = GetRubyComments(file, true); if (!leading_comments.empty()) { out.Print("# Original file comments:\n"); out.PrintRaw(leading_comments.c_str()); @@ -182,7 +182,7 @@ grpc::string GetServices(const FileDescriptor* file) { // Write out require statemment to import the separately generated file // that defines the messages used by the service. This is generated by the // main ruby plugin. - std::map dep_vars = ListToDict({ + std::map dep_vars = ListToDict({ "dep.name", MessagesRequireName(file), }); @@ -190,9 +190,9 @@ grpc::string GetServices(const FileDescriptor* file) { // Write out services within the modules out.Print("\n"); - std::vector modules = Split(package_name, '.'); + std::vector modules = Split(package_name, '.'); for (size_t i = 0; i < modules.size(); ++i) { - std::map module_vars = ListToDict({ + std::map module_vars = ListToDict({ "module.name", PackageToModule(modules[i]), }); diff --git a/src/compiler/ruby_generator.h b/src/compiler/ruby_generator.h index 9a03e0d1396..939b2453db7 100644 --- a/src/compiler/ruby_generator.h +++ b/src/compiler/ruby_generator.h @@ -23,7 +23,7 @@ namespace grpc_ruby_generator { -grpc::string GetServices(const grpc::protobuf::FileDescriptor* file); +std::string GetServices(const grpc::protobuf::FileDescriptor* file); } // namespace grpc_ruby_generator diff --git a/src/compiler/ruby_generator_helpers-inl.h b/src/compiler/ruby_generator_helpers-inl.h index 67a899be93d..bb919439d55 100644 --- a/src/compiler/ruby_generator_helpers-inl.h +++ b/src/compiler/ruby_generator_helpers-inl.h @@ -26,7 +26,7 @@ namespace grpc_ruby_generator { inline bool ServicesFilename(const grpc::protobuf::FileDescriptor* file, - grpc::string* file_name_or_error) { + std::string* file_name_or_error) { // Get output file name. static const unsigned proto_suffix_length = 6; // length of ".proto" if (file->name().size() > proto_suffix_length && @@ -41,7 +41,7 @@ inline bool ServicesFilename(const grpc::protobuf::FileDescriptor* file, } } -inline grpc::string MessagesRequireName( +inline std::string MessagesRequireName( const grpc::protobuf::FileDescriptor* file) { return Replace(file->name(), ".proto", "_pb"); } @@ -49,7 +49,7 @@ inline grpc::string MessagesRequireName( // Get leading or trailing comments in a string. Comment lines start with "# ". // Leading detached comments are put in front of leading comments. template -inline grpc::string GetRubyComments(const DescriptorType* desc, bool leading) { +inline std::string GetRubyComments(const DescriptorType* desc, bool leading) { return grpc_generator::GetPrefixedComments(desc, leading, "#"); } diff --git a/src/compiler/ruby_generator_map-inl.h b/src/compiler/ruby_generator_map-inl.h index 89a74b1d410..5f85abc3931 100644 --- a/src/compiler/ruby_generator_map-inl.h +++ b/src/compiler/ruby_generator_map-inl.h @@ -35,17 +35,17 @@ namespace grpc_ruby_generator { // Converts an initializer list of the form { key0, value0, key1, value1, ... } // into a map of key* to value*. Is merely a readability helper for later code. -inline std::map ListToDict( - const initializer_list& values) { +inline std::map ListToDict( + const initializer_list& values) { if (values.size() % 2 != 0) { std::cerr << "Not every 'key' has a value in `values`." << std::endl; } - std::map value_map; + std::map value_map; auto value_iter = values.begin(); for (unsigned i = 0; i < values.size() / 2; ++i) { - grpc::string key = *value_iter; + std::string key = *value_iter; ++value_iter; - grpc::string value = *value_iter; + std::string value = *value_iter; value_map[key] = value; ++value_iter; } diff --git a/src/compiler/ruby_generator_string-inl.h b/src/compiler/ruby_generator_string-inl.h index 36f659d9973..6779ad8a728 100644 --- a/src/compiler/ruby_generator_string-inl.h +++ b/src/compiler/ruby_generator_string-inl.h @@ -31,10 +31,10 @@ using std::transform; namespace grpc_ruby_generator { // Split splits a string using char into elems. -inline std::vector& Split(const grpc::string& s, char delim, - std::vector* elems) { +inline std::vector& Split(const std::string& s, char delim, + std::vector* elems) { std::stringstream ss(s); - grpc::string item; + std::string item; while (getline(ss, item, delim)) { elems->push_back(item); } @@ -42,17 +42,17 @@ inline std::vector& Split(const grpc::string& s, char delim, } // Split splits a string using char, returning the result in a vector. -inline std::vector Split(const grpc::string& s, char delim) { - std::vector elems; +inline std::vector Split(const std::string& s, char delim) { + std::vector elems; Split(s, delim, &elems); return elems; } // Replace replaces from with to in s. -inline grpc::string Replace(grpc::string s, const grpc::string& from, - const grpc::string& to) { +inline std::string Replace(std::string s, const std::string& from, + const std::string& to) { size_t start_pos = s.find(from); - if (start_pos == grpc::string::npos) { + if (start_pos == std::string::npos) { return s; } s.replace(start_pos, from.length(), to); @@ -60,10 +60,10 @@ inline grpc::string Replace(grpc::string s, const grpc::string& from, } // ReplaceAll replaces all instances of search with replace in s. -inline grpc::string ReplaceAll(grpc::string s, const grpc::string& search, - const grpc::string& replace) { +inline std::string ReplaceAll(std::string s, const std::string& search, + const std::string& replace) { size_t pos = 0; - while ((pos = s.find(search, pos)) != grpc::string::npos) { + while ((pos = s.find(search, pos)) != std::string::npos) { s.replace(pos, search.length(), replace); pos += replace.length(); } @@ -71,10 +71,10 @@ inline grpc::string ReplaceAll(grpc::string s, const grpc::string& search, } // ReplacePrefix replaces from with to in s if search is a prefix of s. -inline bool ReplacePrefix(grpc::string* s, const grpc::string& from, - const grpc::string& to) { +inline bool ReplacePrefix(std::string* s, const std::string& from, + const std::string& to) { size_t start_pos = s->find(from); - if (start_pos == grpc::string::npos || start_pos != 0) { + if (start_pos == std::string::npos || start_pos != 0) { return false; } s->replace(start_pos, from.length(), to); @@ -82,14 +82,14 @@ inline bool ReplacePrefix(grpc::string* s, const grpc::string& from, } // Modularize converts a string into a ruby module compatible name -inline grpc::string Modularize(grpc::string s) { +inline std::string Modularize(std::string s) { if (s.empty()) { return s; } - grpc::string new_string = ""; + std::string new_string = ""; bool was_last_underscore = false; new_string.append(1, ::toupper(s[0])); - for (grpc::string::size_type i = 1; i < s.size(); ++i) { + for (std::string::size_type i = 1; i < s.size(); ++i) { if (was_last_underscore && s[i] != '_') { new_string.append(1, ::toupper(s[i])); } else if (s[i] != '_') { @@ -101,8 +101,8 @@ inline grpc::string Modularize(grpc::string s) { } // RubyPackage gets the ruby package in either proto or ruby_package format -inline grpc::string RubyPackage(const grpc::protobuf::FileDescriptor* file) { - grpc::string package_name = file->package(); +inline std::string RubyPackage(const grpc::protobuf::FileDescriptor* file) { + std::string package_name = file->package(); if (file->options().has_ruby_package()) { package_name = file->options().ruby_package(); @@ -116,8 +116,8 @@ inline grpc::string RubyPackage(const grpc::protobuf::FileDescriptor* file) { } // RubyTypeOf updates a proto type to the required ruby equivalent. -inline grpc::string RubyTypeOf(const grpc::protobuf::Descriptor* descriptor, - const grpc::string& package) { +inline std::string RubyTypeOf(const grpc::protobuf::Descriptor* descriptor, + const std::string& package) { std::string proto_type = descriptor->full_name(); ReplacePrefix(&proto_type, package, ""); // remove the leading package if present @@ -125,11 +125,11 @@ inline grpc::string RubyTypeOf(const grpc::protobuf::Descriptor* descriptor, if (descriptor->file()->options().has_ruby_package()) { proto_type = RubyPackage(descriptor->file()) + "." + proto_type; } - grpc::string res(proto_type); - if (res.find('.') == grpc::string::npos) { + std::string res(proto_type); + if (res.find('.') == std::string::npos) { return res; } else { - std::vector prefixes_and_type = Split(res, '.'); + std::vector prefixes_and_type = Split(res, '.'); res.clear(); for (unsigned int i = 0; i < prefixes_and_type.size(); ++i) { if (i != 0) { diff --git a/src/compiler/ruby_plugin.cc b/src/compiler/ruby_plugin.cc index 1b5f7aec50d..8821e613bae 100644 --- a/src/compiler/ruby_plugin.cc +++ b/src/compiler/ruby_plugin.cc @@ -34,16 +34,16 @@ class RubyGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } bool Generate(const grpc::protobuf::FileDescriptor* file, - const grpc::string& /*parameter*/, + const std::string& /*parameter*/, grpc::protobuf::compiler::GeneratorContext* context, - grpc::string* /*error*/) const override { - grpc::string code = grpc_ruby_generator::GetServices(file); + std::string* /*error*/) const override { + std::string code = grpc_ruby_generator::GetServices(file); if (code.size() == 0) { return true; // don't generate a file if there are no services } // Get output file name. - grpc::string file_name; + std::string file_name; if (!grpc_ruby_generator::ServicesFilename(file, &file_name)) { return false; } diff --git a/src/compiler/schema_interface.h b/src/compiler/schema_interface.h index e7b427d89b1..f1a255ace1f 100644 --- a/src/compiler/schema_interface.h +++ b/src/compiler/schema_interface.h @@ -22,16 +22,20 @@ #include "src/compiler/config.h" #include +#include #include -#ifndef GRPC_CUSTOM_STRING -#include -#define GRPC_CUSTOM_STRING std::string +#ifdef GRPC_CUSTOM_STRING +#warning GRPC_CUSTOM_STRING is no longer supported. Please use std::string. #endif namespace grpc { -typedef GRPC_CUSTOM_STRING string; +// Using grpc::string and grpc::to_string is discouraged in favor of +// std::string and std::to_string. This is only for legacy code using +// them explictly. +using std::string; // deprecated +using std::to_string; // deprecated } // namespace grpc @@ -41,31 +45,31 @@ namespace grpc_generator { // Return formatted comments to be inserted in generated code. struct CommentHolder { virtual ~CommentHolder() {} - virtual grpc::string GetLeadingComments(const grpc::string prefix) const = 0; - virtual grpc::string GetTrailingComments(const grpc::string prefix) const = 0; - virtual std::vector GetAllComments() const = 0; + virtual std::string GetLeadingComments(const std::string prefix) const = 0; + virtual std::string GetTrailingComments(const std::string prefix) const = 0; + virtual std::vector GetAllComments() const = 0; }; // An abstract interface representing a method. struct Method : public CommentHolder { virtual ~Method() {} - virtual grpc::string name() const = 0; + virtual std::string name() const = 0; - virtual grpc::string input_type_name() const = 0; - virtual grpc::string output_type_name() const = 0; + virtual std::string input_type_name() const = 0; + virtual std::string output_type_name() const = 0; virtual bool get_module_and_message_path_input( - grpc::string* str, grpc::string generator_file_name, - bool generate_in_pb2_grpc, grpc::string import_prefix, - const std::vector& prefixes_to_filter) const = 0; + std::string* str, std::string generator_file_name, + bool generate_in_pb2_grpc, std::string import_prefix, + const std::vector& prefixes_to_filter) const = 0; virtual bool get_module_and_message_path_output( - grpc::string* str, grpc::string generator_file_name, - bool generate_in_pb2_grpc, grpc::string import_prefix, - const std::vector& prefixes_to_filter) const = 0; + std::string* str, std::string generator_file_name, + bool generate_in_pb2_grpc, std::string import_prefix, + const std::vector& prefixes_to_filter) const = 0; - virtual grpc::string get_input_type_name() const = 0; - virtual grpc::string get_output_type_name() const = 0; + virtual std::string get_input_type_name() const = 0; + virtual std::string get_output_type_name() const = 0; virtual bool NoStreaming() const = 0; virtual bool ClientStreaming() const = 0; virtual bool ServerStreaming() const = 0; @@ -76,7 +80,7 @@ struct Method : public CommentHolder { struct Service : public CommentHolder { virtual ~Service() {} - virtual grpc::string name() const = 0; + virtual std::string name() const = 0; virtual int method_count() const = 0; virtual std::unique_ptr method(int i) const = 0; @@ -85,7 +89,7 @@ struct Service : public CommentHolder { struct Printer { virtual ~Printer() {} - virtual void Print(const std::map& vars, + virtual void Print(const std::map& vars, const char* template_string) = 0; virtual void Print(const char* string) = 0; virtual void PrintRaw(const char* string) = 0; @@ -98,17 +102,17 @@ struct Printer { struct File : public CommentHolder { virtual ~File() {} - virtual grpc::string filename() const = 0; - virtual grpc::string filename_without_ext() const = 0; - virtual grpc::string package() const = 0; - virtual std::vector package_parts() const = 0; - virtual grpc::string additional_headers() const = 0; - virtual std::vector GetImportNames() const { return {}; } + virtual std::string filename() const = 0; + virtual std::string filename_without_ext() const = 0; + virtual std::string package() const = 0; + virtual std::vector package_parts() const = 0; + virtual std::string additional_headers() const = 0; + virtual std::vector GetImportNames() const { return {}; } virtual int service_count() const = 0; virtual std::unique_ptr service(int i) const = 0; - virtual std::unique_ptr CreatePrinter(grpc::string* str) const = 0; + virtual std::unique_ptr CreatePrinter(std::string* str) const = 0; }; } // namespace grpc_generator diff --git a/src/cpp/client/channel_cc.cc b/src/cpp/client/channel_cc.cc index f7ac2848425..9fcc4ed1443 100644 --- a/src/cpp/client/channel_cc.cc +++ b/src/cpp/client/channel_cc.cc @@ -48,7 +48,7 @@ void ::grpc::experimental::ChannelResetConnectionBackoff(Channel* channel) { namespace grpc_impl { static ::grpc::internal::GrpcLibraryInitializer g_gli_initializer; -Channel::Channel(const grpc::string& host, grpc_channel* channel, +Channel::Channel(const std::string& host, grpc_channel* channel, std::vector> interceptor_creators) @@ -71,28 +71,28 @@ inline grpc_slice SliceFromArray(const char* arr, size_t len) { len); } -grpc::string GetChannelInfoField(grpc_channel* channel, - grpc_channel_info* channel_info, - char*** channel_info_field) { +std::string GetChannelInfoField(grpc_channel* channel, + grpc_channel_info* channel_info, + char*** channel_info_field) { char* value = nullptr; memset(channel_info, 0, sizeof(*channel_info)); *channel_info_field = &value; grpc_channel_get_info(channel, channel_info); if (value == nullptr) return ""; - grpc::string result = value; + std::string result = value; gpr_free(value); return result; } } // namespace -grpc::string Channel::GetLoadBalancingPolicyName() const { +std::string Channel::GetLoadBalancingPolicyName() const { grpc_channel_info channel_info; return GetChannelInfoField(c_channel_, &channel_info, &channel_info.lb_policy_name); } -grpc::string Channel::GetServiceConfigJSON() const { +std::string Channel::GetServiceConfigJSON() const { grpc_channel_info channel_info; return GetChannelInfoField(c_channel_, &channel_info, &channel_info.service_config_json); @@ -117,7 +117,7 @@ void ChannelResetConnectionBackoff(Channel* channel) { context->propagation_options_.c_bitmask(), cq->cq(), method.channel_tag(), context->raw_deadline(), nullptr); } else { - const ::grpc::string* host_str = nullptr; + const ::std::string* host_str = nullptr; if (!context->authority_.empty()) { host_str = &context->authority_; } else if (!host_.empty()) { diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index 6865758142a..8642799e905 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -108,8 +108,8 @@ std::unique_ptr ClientContext::FromCallbackServerContext( return FromInternalServerContext(server_context, options); } -void ClientContext::AddMetadata(const grpc::string& meta_key, - const grpc::string& meta_value) { +void ClientContext::AddMetadata(const std::string& meta_key, + const std::string& meta_value) { send_initial_metadata_.insert(std::make_pair(meta_key, meta_value)); } @@ -161,8 +161,8 @@ void ClientContext::SendCancelToInterceptors() { } } -grpc::string ClientContext::peer() const { - grpc::string peer; +std::string ClientContext::peer() const { + std::string peer; if (call_) { char* c_peer = grpc_call_get_peer(call_); peer = c_peer; diff --git a/src/cpp/client/create_channel.cc b/src/cpp/client/create_channel.cc index c6041edcb36..2bbeebc2df6 100644 --- a/src/cpp/client/create_channel.cc +++ b/src/cpp/client/create_channel.cc @@ -28,13 +28,13 @@ namespace grpc_impl { std::shared_ptr CreateChannelImpl( - const grpc::string& target, + const std::string& target, const std::shared_ptr& creds) { return CreateCustomChannelImpl(target, creds, grpc::ChannelArguments()); } std::shared_ptr CreateCustomChannelImpl( - const grpc::string& target, + const std::string& target, const std::shared_ptr& creds, const grpc::ChannelArguments& args) { grpc::GrpcLibraryCodegen @@ -63,7 +63,7 @@ namespace experimental { /// fail) is returned. /// \param args Options for channel creation. std::shared_ptr CreateCustomChannelWithInterceptors( - const grpc::string& target, + const std::string& target, const std::shared_ptr& creds, const grpc::ChannelArguments& args, std::vector< diff --git a/src/cpp/client/create_channel_internal.cc b/src/cpp/client/create_channel_internal.cc index 63e1d14eb34..71398bd0f86 100644 --- a/src/cpp/client/create_channel_internal.cc +++ b/src/cpp/client/create_channel_internal.cc @@ -25,7 +25,7 @@ struct grpc_channel; namespace grpc { std::shared_ptr CreateChannelInternal( - const grpc::string& host, grpc_channel* c_channel, + const std::string& host, grpc_channel* c_channel, std::vector> interceptor_creators) { diff --git a/src/cpp/client/create_channel_internal.h b/src/cpp/client/create_channel_internal.h index 4abd4c3dda9..82b69790911 100644 --- a/src/cpp/client/create_channel_internal.h +++ b/src/cpp/client/create_channel_internal.h @@ -30,7 +30,7 @@ struct grpc_channel; namespace grpc { std::shared_ptr CreateChannelInternal( - const grpc::string& host, grpc_channel* c_channel, + const std::string& host, grpc_channel* c_channel, std::vector> interceptor_creators); diff --git a/src/cpp/client/create_channel_posix.cc b/src/cpp/client/create_channel_posix.cc index f4506fb8fc8..0adc59353a4 100644 --- a/src/cpp/client/create_channel_posix.cc +++ b/src/cpp/client/create_channel_posix.cc @@ -33,7 +33,7 @@ namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -std::shared_ptr CreateInsecureChannelFromFd(const grpc::string& target, +std::shared_ptr CreateInsecureChannelFromFd(const std::string& target, int fd) { grpc::internal::GrpcLibrary init_lib; init_lib.init(); @@ -44,7 +44,7 @@ std::shared_ptr CreateInsecureChannelFromFd(const grpc::string& target, } std::shared_ptr CreateCustomInsecureChannelFromFd( - const grpc::string& target, int fd, const grpc::ChannelArguments& args) { + const std::string& target, int fd, const grpc::ChannelArguments& args) { internal::GrpcLibrary init_lib; init_lib.init(); grpc_channel_args channel_args; @@ -59,7 +59,7 @@ std::shared_ptr CreateCustomInsecureChannelFromFd( namespace experimental { std::shared_ptr CreateCustomInsecureChannelWithInterceptorsFromFd( - const grpc::string& target, int fd, const ChannelArguments& args, + const std::string& target, int fd, const ChannelArguments& args, std::vector< std::unique_ptr> interceptor_creators) { diff --git a/src/cpp/client/insecure_credentials.cc b/src/cpp/client/insecure_credentials.cc index 0556fa0e50f..0495b9378b0 100644 --- a/src/cpp/client/insecure_credentials.cc +++ b/src/cpp/client/insecure_credentials.cc @@ -30,7 +30,7 @@ namespace { class InsecureChannelCredentialsImpl final : public ChannelCredentials { public: std::shared_ptr CreateChannelImpl( - const grpc::string& target, const ChannelArguments& args) override { + const std::string& target, const ChannelArguments& args) override { return CreateChannelWithInterceptors( target, args, std::vector CreateChannelWithInterceptors( - const grpc::string& target, const ChannelArguments& args, + const std::string& target, const ChannelArguments& args, std::vector> interceptor_creators) override { diff --git a/src/cpp/client/secure_credentials.cc b/src/cpp/client/secure_credentials.cc index b21d5102e23..32ac91d4bbb 100644 --- a/src/cpp/client/secure_credentials.cc +++ b/src/cpp/client/secure_credentials.cc @@ -48,7 +48,7 @@ SecureChannelCredentials::SecureChannelCredentials( } std::shared_ptr SecureChannelCredentials::CreateChannelImpl( - const grpc::string& target, const ChannelArguments& args) { + const std::string& target, const ChannelArguments& args) { return CreateChannelWithInterceptors( target, args, std::vector SecureChannelCredentials::CreateChannelImpl( std::shared_ptr SecureChannelCredentials::CreateChannelWithInterceptors( - const grpc::string& target, const ChannelArguments& args, + const std::string& target, const ChannelArguments& args, std::vector< std::unique_ptr> interceptor_creators) { @@ -134,7 +134,7 @@ void ClearStsCredentialsOptions(StsCredentialsOptions* options) { } // namespace // Builds STS credentials options from JSON. -grpc::Status StsCredentialsOptionsFromJson(const grpc::string& json_string, +grpc::Status StsCredentialsOptionsFromJson(const std::string& json_string, StsCredentialsOptions* options) { if (options == nullptr) { return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, @@ -304,7 +304,7 @@ std::shared_ptr GoogleComputeEngineCredentials() { // Builds JWT credentials. std::shared_ptr ServiceAccountJWTAccessCredentials( - const grpc::string& json_key, long token_lifetime_seconds) { + const std::string& json_key, long token_lifetime_seconds) { grpc::GrpcLibraryCodegen init; // To call grpc_init(). if (token_lifetime_seconds <= 0) { gpr_log(GPR_ERROR, @@ -319,7 +319,7 @@ std::shared_ptr ServiceAccountJWTAccessCredentials( // Builds refresh token credentials. std::shared_ptr GoogleRefreshTokenCredentials( - const grpc::string& json_refresh_token) { + const std::string& json_refresh_token) { grpc::GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials(grpc_google_refresh_token_credentials_create( json_refresh_token.c_str(), nullptr)); @@ -327,7 +327,7 @@ std::shared_ptr GoogleRefreshTokenCredentials( // Builds access token credentials. std::shared_ptr AccessTokenCredentials( - const grpc::string& access_token) { + const std::string& access_token) { grpc::GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials( grpc_access_token_credentials_create(access_token.c_str(), nullptr)); @@ -335,8 +335,8 @@ std::shared_ptr AccessTokenCredentials( // Builds IAM credentials. std::shared_ptr GoogleIAMCredentials( - const grpc::string& authorization_token, - const grpc::string& authority_selector) { + const std::string& authorization_token, + const std::string& authority_selector) { grpc::GrpcLibraryCodegen init; // To call grpc_init(). return WrapCallCredentials(grpc_google_iam_credentials_create( authorization_token.c_str(), authority_selector.c_str(), nullptr)); @@ -463,7 +463,7 @@ void MetadataCredentialsPluginWrapper::InvokePlugin( grpc_auth_metadata_context context, grpc_credentials_plugin_metadata_cb cb, void* user_data, grpc_metadata creds_md[4], size_t* num_creds_md, grpc_status_code* status_code, const char** error_details) { - std::multimap metadata; + std::multimap metadata; // const_cast is safe since the SecureAuthContext only inc/dec the refcount // and the object is passed as a const ref to plugin_->GetMetadata. diff --git a/src/cpp/client/secure_credentials.h b/src/cpp/client/secure_credentials.h index 84852a47942..9238738146d 100644 --- a/src/cpp/client/secure_credentials.h +++ b/src/cpp/client/secure_credentials.h @@ -43,13 +43,13 @@ class SecureChannelCredentials final : public ChannelCredentials { grpc_channel_credentials* GetRawCreds() { return c_creds_; } std::shared_ptr CreateChannelImpl( - const grpc::string& target, const ChannelArguments& args) override; + const std::string& target, const ChannelArguments& args) override; SecureChannelCredentials* AsSecureCredentials() override { return this; } private: std::shared_ptr CreateChannelWithInterceptors( - const grpc::string& target, const ChannelArguments& args, + const std::string& target, const ChannelArguments& args, std::vector> interceptor_creators) override; @@ -66,9 +66,9 @@ class SecureCallCredentials final : public CallCredentials { bool ApplyToCall(grpc_call* call) override; SecureCallCredentials* AsSecureCredentials() override { return this; } - grpc::string DebugString() override { + std::string DebugString() override { return absl::StrCat("SecureCallCredentials{", - grpc::string(c_creds_->debug_string()), "}"); + std::string(c_creds_->debug_string()), "}"); } private: diff --git a/src/cpp/common/alts_context.cc b/src/cpp/common/alts_context.cc index f58d9f5f047..ccbe9c580e8 100644 --- a/src/cpp/common/alts_context.cc +++ b/src/cpp/common/alts_context.cc @@ -33,23 +33,23 @@ AltsContext::AltsContext(const grpc_gcp_AltsContext* ctx) { grpc_gcp_AltsContext_application_protocol(ctx); if (application_protocol.data != nullptr && application_protocol.size > 0) { application_protocol_ = - grpc::string(application_protocol.data, application_protocol.size); + std::string(application_protocol.data, application_protocol.size); } upb_strview record_protocol = grpc_gcp_AltsContext_record_protocol(ctx); if (record_protocol.data != nullptr && record_protocol.size > 0) { - record_protocol_ = grpc::string(record_protocol.data, record_protocol.size); + record_protocol_ = std::string(record_protocol.data, record_protocol.size); } upb_strview peer_service_account = grpc_gcp_AltsContext_peer_service_account(ctx); if (peer_service_account.data != nullptr && peer_service_account.size > 0) { peer_service_account_ = - grpc::string(peer_service_account.data, peer_service_account.size); + std::string(peer_service_account.data, peer_service_account.size); } upb_strview local_service_account = grpc_gcp_AltsContext_local_service_account(ctx); if (local_service_account.data != nullptr && local_service_account.size > 0) { local_service_account_ = - grpc::string(local_service_account.data, local_service_account.size); + std::string(local_service_account.data, local_service_account.size); } const grpc_gcp_RpcProtocolVersions* versions = grpc_gcp_AltsContext_peer_rpc_versions(ctx); @@ -82,17 +82,17 @@ AltsContext::AltsContext(const grpc_gcp_AltsContext* ctx) { } } -grpc::string AltsContext::application_protocol() const { +std::string AltsContext::application_protocol() const { return application_protocol_; } -grpc::string AltsContext::record_protocol() const { return record_protocol_; } +std::string AltsContext::record_protocol() const { return record_protocol_; } -grpc::string AltsContext::peer_service_account() const { +std::string AltsContext::peer_service_account() const { return peer_service_account_; } -grpc::string AltsContext::local_service_account() const { +std::string AltsContext::local_service_account() const { return local_service_account_; } diff --git a/src/cpp/common/channel_arguments.cc b/src/cpp/common/channel_arguments.cc index ba0220ab876..60a06087dea 100644 --- a/src/cpp/common/channel_arguments.cc +++ b/src/cpp/common/channel_arguments.cc @@ -97,7 +97,7 @@ void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) { grpc_core::ExecCtx exec_ctx; for (auto& arg : args_) { if (arg.type == mutator_arg.type && - grpc::string(arg.key) == grpc::string(mutator_arg.key)) { + std::string(arg.key) == std::string(mutator_arg.key)) { GPR_ASSERT(!replaced); arg.value.pointer.vtable->destroy(arg.value.pointer.p); arg.value.pointer = mutator_arg.value.pointer; @@ -106,7 +106,7 @@ void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) { } if (!replaced) { - strings_.push_back(grpc::string(mutator_arg.key)); + strings_.push_back(std::string(mutator_arg.key)); args_.push_back(mutator_arg); args_.back().key = const_cast(strings_.back().c_str()); } @@ -117,7 +117,7 @@ void ChannelArguments::SetSocketMutator(grpc_socket_mutator* mutator) { // prefix. The user can build up a prefix string by calling this multiple times, // each with more significant identifier. void ChannelArguments::SetUserAgentPrefix( - const grpc::string& user_agent_prefix) { + const std::string& user_agent_prefix) { if (user_agent_prefix.empty()) { return; } @@ -126,7 +126,7 @@ void ChannelArguments::SetUserAgentPrefix( for (auto& arg : args_) { ++strings_it; if (arg.type == GRPC_ARG_STRING) { - if (grpc::string(arg.key) == GRPC_ARG_PRIMARY_USER_AGENT_STRING) { + if (std::string(arg.key) == GRPC_ARG_PRIMARY_USER_AGENT_STRING) { GPR_ASSERT(arg.value.string == strings_it->c_str()); *(strings_it) = user_agent_prefix + " " + arg.value.string; arg.value.string = const_cast(strings_it->c_str()); @@ -157,16 +157,16 @@ void ChannelArguments::SetMaxSendMessageSize(int size) { } void ChannelArguments::SetLoadBalancingPolicyName( - const grpc::string& lb_policy_name) { + const std::string& lb_policy_name) { SetString(GRPC_ARG_LB_POLICY_NAME, lb_policy_name); } void ChannelArguments::SetServiceConfigJSON( - const grpc::string& service_config_json) { + const std::string& service_config_json) { SetString(GRPC_ARG_SERVICE_CONFIG, service_config_json); } -void ChannelArguments::SetInt(const grpc::string& key, int value) { +void ChannelArguments::SetInt(const std::string& key, int value) { grpc_arg arg; arg.type = GRPC_ARG_INTEGER; strings_.push_back(key); @@ -176,7 +176,7 @@ void ChannelArguments::SetInt(const grpc::string& key, int value) { args_.push_back(arg); } -void ChannelArguments::SetPointer(const grpc::string& key, void* value) { +void ChannelArguments::SetPointer(const std::string& key, void* value) { static const grpc_arg_pointer_vtable vtable = { &PointerVtableMembers::Copy, &PointerVtableMembers::Destroy, &PointerVtableMembers::Compare}; @@ -184,7 +184,7 @@ void ChannelArguments::SetPointer(const grpc::string& key, void* value) { } void ChannelArguments::SetPointerWithVtable( - const grpc::string& key, void* value, + const std::string& key, void* value, const grpc_arg_pointer_vtable* vtable) { grpc_arg arg; arg.type = GRPC_ARG_POINTER; @@ -195,8 +195,8 @@ void ChannelArguments::SetPointerWithVtable( args_.push_back(arg); } -void ChannelArguments::SetString(const grpc::string& key, - const grpc::string& value) { +void ChannelArguments::SetString(const std::string& key, + const std::string& value) { grpc_arg arg; arg.type = GRPC_ARG_STRING; strings_.push_back(key); diff --git a/src/cpp/common/resource_quota_cc.cc b/src/cpp/common/resource_quota_cc.cc index 276e5f79548..25aa01ed015 100644 --- a/src/cpp/common/resource_quota_cc.cc +++ b/src/cpp/common/resource_quota_cc.cc @@ -23,7 +23,7 @@ namespace grpc { ResourceQuota::ResourceQuota() : impl_(grpc_resource_quota_create(nullptr)) {} -ResourceQuota::ResourceQuota(const grpc::string& name) +ResourceQuota::ResourceQuota(const std::string& name) : impl_(grpc_resource_quota_create(name.c_str())) {} ResourceQuota::~ResourceQuota() { grpc_resource_quota_unref(impl_); } diff --git a/src/cpp/common/secure_auth_context.cc b/src/cpp/common/secure_auth_context.cc index 7a2b5afed69..0ba01e5553f 100644 --- a/src/cpp/common/secure_auth_context.cc +++ b/src/cpp/common/secure_auth_context.cc @@ -37,7 +37,7 @@ std::vector SecureAuthContext::GetPeerIdentity() const { return identity; } -grpc::string SecureAuthContext::GetPeerIdentityPropertyName() const { +std::string SecureAuthContext::GetPeerIdentityPropertyName() const { if (ctx_ == nullptr) { return ""; } @@ -46,7 +46,7 @@ grpc::string SecureAuthContext::GetPeerIdentityPropertyName() const { } std::vector SecureAuthContext::FindPropertyValues( - const grpc::string& name) const { + const std::string& name) const { if (ctx_ == nullptr) { return std::vector(); } @@ -76,14 +76,14 @@ AuthPropertyIterator SecureAuthContext::end() const { return AuthPropertyIterator(); } -void SecureAuthContext::AddProperty(const grpc::string& key, +void SecureAuthContext::AddProperty(const std::string& key, const grpc::string_ref& value) { if (ctx_ == nullptr) return; grpc_auth_context_add_property(ctx_.get(), key.c_str(), value.data(), value.size()); } -bool SecureAuthContext::SetPeerIdentityPropertyName(const grpc::string& name) { +bool SecureAuthContext::SetPeerIdentityPropertyName(const std::string& name) { if (ctx_ == nullptr) return false; return grpc_auth_context_set_peer_identity_property_name(ctx_.get(), name.c_str()) != 0; diff --git a/src/cpp/common/secure_auth_context.h b/src/cpp/common/secure_auth_context.h index 2e8f7937211..3375237c34b 100644 --- a/src/cpp/common/secure_auth_context.h +++ b/src/cpp/common/secure_auth_context.h @@ -37,19 +37,19 @@ class SecureAuthContext final : public AuthContext { std::vector GetPeerIdentity() const override; - grpc::string GetPeerIdentityPropertyName() const override; + std::string GetPeerIdentityPropertyName() const override; std::vector FindPropertyValues( - const grpc::string& name) const override; + const std::string& name) const override; AuthPropertyIterator begin() const override; AuthPropertyIterator end() const override; - void AddProperty(const grpc::string& key, + void AddProperty(const std::string& key, const grpc::string_ref& value) override; - virtual bool SetPeerIdentityPropertyName(const grpc::string& name) override; + virtual bool SetPeerIdentityPropertyName(const std::string& name) override; private: grpc_core::RefCountedPtr ctx_; diff --git a/src/cpp/common/secure_channel_arguments.cc b/src/cpp/common/secure_channel_arguments.cc index e5d03cd2378..da647c6ef89 100644 --- a/src/cpp/common/secure_channel_arguments.cc +++ b/src/cpp/common/secure_channel_arguments.cc @@ -23,13 +23,13 @@ namespace grpc_impl { -void ChannelArguments::SetSslTargetNameOverride(const grpc::string& name) { +void ChannelArguments::SetSslTargetNameOverride(const std::string& name) { SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, name); } -grpc::string ChannelArguments::GetSslTargetNameOverride() const { +std::string ChannelArguments::GetSslTargetNameOverride() const { for (unsigned int i = 0; i < args_.size(); i++) { - if (grpc::string(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG) == args_[i].key) { + if (std::string(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG) == args_[i].key) { return args_[i].value.string; } } diff --git a/src/cpp/common/tls_credentials_options.cc b/src/cpp/common/tls_credentials_options.cc index 8c6fd51c0cf..a9122e962d3 100644 --- a/src/cpp/common/tls_credentials_options.cc +++ b/src/cpp/common/tls_credentials_options.cc @@ -28,7 +28,7 @@ namespace experimental { /** TLS key materials config API implementation **/ void TlsKeyMaterialsConfig::set_pem_root_certs( - const grpc::string& pem_root_certs) { + const std::string& pem_root_certs) { pem_root_certs_ = pem_root_certs; } @@ -38,7 +38,7 @@ void TlsKeyMaterialsConfig::add_pem_key_cert_pair( } void TlsKeyMaterialsConfig::set_key_materials( - const grpc::string& pem_root_certs, + const std::string& pem_root_certs, const std::vector& pem_key_cert_pair_list) { pem_key_cert_pair_list_ = pem_key_cert_pair_list; pem_root_certs_ = pem_root_certs; @@ -69,7 +69,7 @@ grpc_ssl_certificate_config_reload_status TlsCredentialReloadArg::status() return c_arg_->status; } -grpc::string TlsCredentialReloadArg::error_details() const { +std::string TlsCredentialReloadArg::error_details() const { return c_arg_->error_details->error_details(); } @@ -78,7 +78,7 @@ void TlsCredentialReloadArg::set_cb_user_data(void* cb_user_data) { } void TlsCredentialReloadArg::set_pem_root_certs( - const grpc::string& pem_root_certs) { + const std::string& pem_root_certs) { ::grpc_core::UniquePtr c_pem_root_certs( gpr_strdup(pem_root_certs.c_str())); c_arg_->key_materials_config->set_pem_root_certs(std::move(c_pem_root_certs)); @@ -105,7 +105,7 @@ void TlsCredentialReloadArg::add_pem_key_cert_pair( } void TlsCredentialReloadArg::set_key_materials( - const grpc::string& pem_root_certs, + const std::string& pem_root_certs, std::vector pem_key_cert_pair_list) { /** Initialize the |key_materials_config| field of |c_arg_|, if it has not * already been done. **/ @@ -159,7 +159,7 @@ void TlsCredentialReloadArg::set_status( } void TlsCredentialReloadArg::set_error_details( - const grpc::string& error_details) { + const std::string& error_details) { c_arg_->error_details->set_error_details(error_details.c_str()); } @@ -202,18 +202,18 @@ void* TlsServerAuthorizationCheckArg::cb_user_data() const { int TlsServerAuthorizationCheckArg::success() const { return c_arg_->success; } -grpc::string TlsServerAuthorizationCheckArg::target_name() const { - grpc::string cpp_target_name(c_arg_->target_name); +std::string TlsServerAuthorizationCheckArg::target_name() const { + std::string cpp_target_name(c_arg_->target_name); return cpp_target_name; } -grpc::string TlsServerAuthorizationCheckArg::peer_cert() const { - grpc::string cpp_peer_cert(c_arg_->peer_cert); +std::string TlsServerAuthorizationCheckArg::peer_cert() const { + std::string cpp_peer_cert(c_arg_->peer_cert); return cpp_peer_cert; } -grpc::string TlsServerAuthorizationCheckArg::peer_cert_full_chain() const { - grpc::string cpp_peer_cert_full_chain(c_arg_->peer_cert_full_chain); +std::string TlsServerAuthorizationCheckArg::peer_cert_full_chain() const { + std::string cpp_peer_cert_full_chain(c_arg_->peer_cert_full_chain); return cpp_peer_cert_full_chain; } @@ -221,7 +221,7 @@ grpc_status_code TlsServerAuthorizationCheckArg::status() const { return c_arg_->status; } -grpc::string TlsServerAuthorizationCheckArg::error_details() const { +std::string TlsServerAuthorizationCheckArg::error_details() const { return c_arg_->error_details->error_details(); } @@ -234,17 +234,17 @@ void TlsServerAuthorizationCheckArg::set_success(int success) { } void TlsServerAuthorizationCheckArg::set_target_name( - const grpc::string& target_name) { + const std::string& target_name) { c_arg_->target_name = gpr_strdup(target_name.c_str()); } void TlsServerAuthorizationCheckArg::set_peer_cert( - const grpc::string& peer_cert) { + const std::string& peer_cert) { c_arg_->peer_cert = gpr_strdup(peer_cert.c_str()); } void TlsServerAuthorizationCheckArg::set_peer_cert_full_chain( - const grpc::string& peer_cert_full_chain) { + const std::string& peer_cert_full_chain) { c_arg_->peer_cert_full_chain = gpr_strdup(peer_cert_full_chain.c_str()); } @@ -253,7 +253,7 @@ void TlsServerAuthorizationCheckArg::set_status(grpc_status_code status) { } void TlsServerAuthorizationCheckArg::set_error_details( - const grpc::string& error_details) { + const std::string& error_details) { c_arg_->error_details->set_error_details(error_details.c_str()); } diff --git a/src/cpp/common/validate_service_config.cc b/src/cpp/common/validate_service_config.cc index 0f193cf1c42..8f06fa7cefe 100644 --- a/src/cpp/common/validate_service_config.cc +++ b/src/cpp/common/validate_service_config.cc @@ -23,12 +23,11 @@ namespace grpc { namespace experimental { -grpc::string ValidateServiceConfigJSON( - const grpc::string& service_config_json) { +std::string ValidateServiceConfigJSON(const std::string& service_config_json) { grpc_init(); grpc_error* error = GRPC_ERROR_NONE; grpc_core::ServiceConfig::Create(service_config_json.c_str(), &error); - grpc::string return_value; + std::string return_value; if (error != GRPC_ERROR_NONE) { return_value = grpc_error_string(error); GRPC_ERROR_UNREF(error); diff --git a/src/cpp/common/version_cc.cc b/src/cpp/common/version_cc.cc index 1d838f7179f..b495db96ac1 100644 --- a/src/cpp/common/version_cc.cc +++ b/src/cpp/common/version_cc.cc @@ -22,5 +22,5 @@ #include namespace grpc { -grpc::string Version() { return "1.31.0-dev"; } +std::string Version() { return "1.31.0-dev"; } } // namespace grpc diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc index de72e18327a..3df372f4236 100644 --- a/src/cpp/ext/proto_server_reflection.cc +++ b/src/cpp/ext/proto_server_reflection.cc @@ -40,7 +40,7 @@ ProtoServerReflection::ProtoServerReflection() : descriptor_pool_(protobuf::DescriptorPool::generated_pool()) {} void ProtoServerReflection::SetServiceList( - const std::vector* services) { + const std::vector* services) { services_ = services; } @@ -110,7 +110,7 @@ Status ProtoServerReflection::ListService(ServerContext* /*context*/, } Status ProtoServerReflection::GetFileByName( - ServerContext* /*context*/, const grpc::string& filename, + ServerContext* /*context*/, const std::string& filename, ServerReflectionResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; @@ -121,13 +121,13 @@ Status ProtoServerReflection::GetFileByName( if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "File not found."); } - std::unordered_set seen_files; + std::unordered_set seen_files; FillFileDescriptorResponse(file_desc, response, &seen_files); return Status::OK; } Status ProtoServerReflection::GetFileContainingSymbol( - ServerContext* /*context*/, const grpc::string& symbol, + ServerContext* /*context*/, const std::string& symbol, ServerReflectionResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; @@ -138,7 +138,7 @@ Status ProtoServerReflection::GetFileContainingSymbol( if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Symbol not found."); } - std::unordered_set seen_files; + std::unordered_set seen_files; FillFileDescriptorResponse(file_desc, response, &seen_files); return Status::OK; } @@ -162,13 +162,13 @@ Status ProtoServerReflection::GetFileContainingExtension( if (field_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Extension not found."); } - std::unordered_set seen_files; + std::unordered_set seen_files; FillFileDescriptorResponse(field_desc->file(), response, &seen_files); return Status::OK; } Status ProtoServerReflection::GetAllExtensionNumbers( - ServerContext* /*context*/, const grpc::string& type, + ServerContext* /*context*/, const std::string& type, ExtensionNumberResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; @@ -192,14 +192,14 @@ Status ProtoServerReflection::GetAllExtensionNumbers( void ProtoServerReflection::FillFileDescriptorResponse( const protobuf::FileDescriptor* file_desc, ServerReflectionResponse* response, - std::unordered_set* seen_files) { + std::unordered_set* seen_files) { if (seen_files->find(file_desc->name()) != seen_files->end()) { return; } seen_files->insert(file_desc->name()); protobuf::FileDescriptorProto file_desc_proto; - grpc::string data; + std::string data; file_desc->CopyTo(&file_desc_proto); file_desc_proto.SerializeToString(&data); response->mutable_file_descriptor_response()->add_file_descriptor_proto(data); diff --git a/src/cpp/ext/proto_server_reflection.h b/src/cpp/ext/proto_server_reflection.h index bf40c3c1807..31e386f3732 100644 --- a/src/cpp/ext/proto_server_reflection.h +++ b/src/cpp/ext/proto_server_reflection.h @@ -33,7 +33,7 @@ class ProtoServerReflection final ProtoServerReflection(); // Add the full names of registered services - void SetServiceList(const std::vector* services); + void SetServiceList(const std::vector* services); // implementation of ServerReflectionInfo(stream ServerReflectionRequest) rpc // in ServerReflection service @@ -47,11 +47,11 @@ class ProtoServerReflection final Status ListService(ServerContext* context, reflection::v1alpha::ListServiceResponse* response); - Status GetFileByName(ServerContext* context, const grpc::string& file_name, + Status GetFileByName(ServerContext* context, const std::string& file_name, reflection::v1alpha::ServerReflectionResponse* response); Status GetFileContainingSymbol( - ServerContext* context, const grpc::string& symbol, + ServerContext* context, const std::string& symbol, reflection::v1alpha::ServerReflectionResponse* response); Status GetFileContainingExtension( @@ -60,13 +60,13 @@ class ProtoServerReflection final reflection::v1alpha::ServerReflectionResponse* response); Status GetAllExtensionNumbers( - ServerContext* context, const grpc::string& type, + ServerContext* context, const std::string& type, reflection::v1alpha::ExtensionNumberResponse* response); void FillFileDescriptorResponse( const protobuf::FileDescriptor* file_desc, reflection::v1alpha::ServerReflectionResponse* response, - std::unordered_set* seen_files); + std::unordered_set* seen_files); void FillErrorResponse(const Status& status, reflection::v1alpha::ErrorResponse* error_response); diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc index 306e96a4464..d263235012e 100644 --- a/src/cpp/ext/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -29,7 +29,7 @@ namespace reflection { ProtoServerReflectionPlugin::ProtoServerReflectionPlugin() : reflection_service_(new grpc::ProtoServerReflection()) {} -grpc::string ProtoServerReflectionPlugin::name() { +std::string ProtoServerReflectionPlugin::name() { return "proto_server_reflection"; } @@ -41,7 +41,7 @@ void ProtoServerReflectionPlugin::Finish(grpc::ServerInitializer* si) { reflection_service_->SetServiceList(si->GetServiceList()); } -void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& /*name*/, +void ProtoServerReflectionPlugin::ChangeArguments(const std::string& /*name*/, void* /*value*/) {} bool ProtoServerReflectionPlugin::has_sync_methods() const { diff --git a/src/cpp/server/channel_argument_option.cc b/src/cpp/server/channel_argument_option.cc index 9bd091c8872..a8e5e52a770 100644 --- a/src/cpp/server/channel_argument_option.cc +++ b/src/cpp/server/channel_argument_option.cc @@ -21,10 +21,10 @@ namespace grpc { std::unique_ptr MakeChannelArgumentOption( - const grpc::string& name, const grpc::string& value) { + const std::string& name, const std::string& value) { class StringOption final : public ServerBuilderOption { public: - StringOption(const grpc::string& name, const grpc::string& value) + StringOption(const std::string& name, const std::string& value) : name_(name), value_(value) {} virtual void UpdateArguments(ChannelArguments* args) override { @@ -35,17 +35,17 @@ std::unique_ptr MakeChannelArgumentOption( override {} private: - const grpc::string name_; - const grpc::string value_; + const std::string name_; + const std::string value_; }; return std::unique_ptr(new StringOption(name, value)); } std::unique_ptr MakeChannelArgumentOption( - const grpc::string& name, int value) { + const std::string& name, int value) { class IntOption final : public ServerBuilderOption { public: - IntOption(const grpc::string& name, int value) + IntOption(const std::string& name, int value) : name_(name), value_(value) {} virtual void UpdateArguments(ChannelArguments* args) override { @@ -56,7 +56,7 @@ std::unique_ptr MakeChannelArgumentOption( override {} private: - const grpc::string name_; + const std::string name_; const int value_; }; return std::unique_ptr(new IntOption(name, value)); diff --git a/src/cpp/server/channelz/channelz_service_plugin.cc b/src/cpp/server/channelz/channelz_service_plugin.cc index 5892b9b8eed..bd8a30f3a0b 100644 --- a/src/cpp/server/channelz/channelz_service_plugin.cc +++ b/src/cpp/server/channelz/channelz_service_plugin.cc @@ -33,7 +33,7 @@ class ChannelzServicePlugin : public ::grpc::ServerBuilderPlugin { public: ChannelzServicePlugin() : channelz_service_(new grpc::ChannelzService()) {} - grpc::string name() override { return "channelz_service"; } + std::string name() override { return "channelz_service"; } void InitServer(grpc::ServerInitializer* si) override { si->RegisterService(channelz_service_); @@ -41,8 +41,7 @@ class ChannelzServicePlugin : public ::grpc::ServerBuilderPlugin { void Finish(grpc::ServerInitializer* /*si*/) override {} - void ChangeArguments(const grpc::string& /*name*/, void* /*value*/) override { - } + void ChangeArguments(const std::string& /*name*/, void* /*value*/) override {} bool has_sync_methods() const override { if (channelz_service_) { diff --git a/src/cpp/server/external_connection_acceptor_impl.cc b/src/cpp/server/external_connection_acceptor_impl.cc index f719e363019..1b0c68ffcbd 100644 --- a/src/cpp/server/external_connection_acceptor_impl.cc +++ b/src/cpp/server/external_connection_acceptor_impl.cc @@ -42,7 +42,7 @@ class AcceptorWrapper : public experimental::ExternalConnectionAcceptor { } // namespace ExternalConnectionAcceptorImpl::ExternalConnectionAcceptorImpl( - const grpc::string& name, + const std::string& name, ServerBuilder::experimental_type::ExternalConnectionType type, std::shared_ptr creds) : name_(name), creds_(std::move(creds)) { diff --git a/src/cpp/server/external_connection_acceptor_impl.h b/src/cpp/server/external_connection_acceptor_impl.h index a5459509a81..3fb94c90848 100644 --- a/src/cpp/server/external_connection_acceptor_impl.h +++ b/src/cpp/server/external_connection_acceptor_impl.h @@ -37,7 +37,7 @@ class ExternalConnectionAcceptorImpl : public std::enable_shared_from_this { public: ExternalConnectionAcceptorImpl( - const grpc::string& name, + const std::string& name, ServerBuilder::experimental_type::ExternalConnectionType type, std::shared_ptr creds); // Should only be called once. @@ -57,7 +57,7 @@ class ExternalConnectionAcceptorImpl void SetToChannelArgs(::grpc::ChannelArguments* args); private: - const grpc::string name_; + const std::string name_; std::shared_ptr creds_; grpc_core::TcpServerFdHandler* handler_ = nullptr; // not owned grpc_core::Mutex mu_; diff --git a/src/cpp/server/health/default_health_check_service.cc b/src/cpp/server/health/default_health_check_service.cc index a6688e23800..187e69166fc 100644 --- a/src/cpp/server/health/default_health_check_service.cc +++ b/src/cpp/server/health/default_health_check_service.cc @@ -42,7 +42,7 @@ DefaultHealthCheckService::DefaultHealthCheckService() { } void DefaultHealthCheckService::SetServingStatus( - const grpc::string& service_name, bool serving) { + const std::string& service_name, bool serving) { grpc_core::MutexLock lock(&mu_); if (shutdown_) { // Set to NOT_SERVING in case service_name is not in the map. @@ -77,7 +77,7 @@ void DefaultHealthCheckService::Shutdown() { DefaultHealthCheckService::ServingStatus DefaultHealthCheckService::GetServingStatus( - const grpc::string& service_name) const { + const std::string& service_name) const { grpc_core::MutexLock lock(&mu_); auto it = services_map_.find(service_name); if (it == services_map_.end()) { @@ -88,7 +88,7 @@ DefaultHealthCheckService::GetServingStatus( } void DefaultHealthCheckService::RegisterCallHandler( - const grpc::string& service_name, + const std::string& service_name, std::shared_ptr handler) { grpc_core::MutexLock lock(&mu_); ServiceData& service_data = services_map_[service_name]; @@ -98,7 +98,7 @@ void DefaultHealthCheckService::RegisterCallHandler( } void DefaultHealthCheckService::UnregisterCallHandler( - const grpc::string& service_name, + const std::string& service_name, const std::shared_ptr& handler) { grpc_core::MutexLock lock(&mu_); auto it = services_map_.find(service_name); @@ -200,7 +200,7 @@ void DefaultHealthCheckService::HealthCheckServiceImpl::Serve(void* arg) { } bool DefaultHealthCheckService::HealthCheckServiceImpl::DecodeRequest( - const ByteBuffer& request, grpc::string* service_name) { + const ByteBuffer& request, std::string* service_name) { std::vector slices; if (!request.Dump(&slices).ok()) return false; uint8_t* request_bytes = nullptr; @@ -301,7 +301,7 @@ void DefaultHealthCheckService::HealthCheckServiceImpl::CheckCallHandler:: // Process request. gpr_log(GPR_DEBUG, "[HCS %p] Health check started for handler %p", service_, this); - grpc::string service_name; + std::string service_name; grpc::Status status = Status::OK; ByteBuffer response; if (!service_->DecodeRequest(request_, &service_name)) { diff --git a/src/cpp/server/health/default_health_check_service.h b/src/cpp/server/health/default_health_check_service.h index 1a9bd33e355..0d4b60ec0da 100644 --- a/src/cpp/server/health/default_health_check_service.h +++ b/src/cpp/server/health/default_health_check_service.h @@ -194,7 +194,7 @@ class DefaultHealthCheckService final : public HealthCheckServiceInterface { HealthCheckServiceImpl* service_; ByteBuffer request_; - grpc::string service_name_; + std::string service_name_; GenericServerAsyncWriter stream_; ServerContext ctx_; @@ -213,7 +213,7 @@ class DefaultHealthCheckService final : public HealthCheckServiceInterface { // Returns true on success. static bool DecodeRequest(const ByteBuffer& request, - grpc::string* service_name); + std::string* service_name); static bool EncodeResponse(ServingStatus status, ByteBuffer* response); // Needed to appease Windows compilers, which don't seem to allow @@ -234,13 +234,12 @@ class DefaultHealthCheckService final : public HealthCheckServiceInterface { DefaultHealthCheckService(); - void SetServingStatus(const grpc::string& service_name, - bool serving) override; + void SetServingStatus(const std::string& service_name, bool serving) override; void SetServingStatus(bool serving) override; void Shutdown() override; - ServingStatus GetServingStatus(const grpc::string& service_name) const; + ServingStatus GetServingStatus(const std::string& service_name) const; HealthCheckServiceImpl* GetHealthCheckService( std::unique_ptr cq); @@ -267,16 +266,16 @@ class DefaultHealthCheckService final : public HealthCheckServiceInterface { }; void RegisterCallHandler( - const grpc::string& service_name, + const std::string& service_name, std::shared_ptr handler); void UnregisterCallHandler( - const grpc::string& service_name, + const std::string& service_name, const std::shared_ptr& handler); mutable grpc_core::Mutex mu_; - bool shutdown_ = false; // Guarded by mu_. - std::map services_map_; // Guarded by mu_. + bool shutdown_ = false; // Guarded by mu_. + std::map services_map_; // Guarded by mu_. std::unique_ptr impl_; }; diff --git a/src/cpp/server/insecure_server_credentials.cc b/src/cpp/server/insecure_server_credentials.cc index e4623ececef..bc908920b8d 100644 --- a/src/cpp/server/insecure_server_credentials.cc +++ b/src/cpp/server/insecure_server_credentials.cc @@ -25,7 +25,7 @@ namespace grpc_impl { namespace { class InsecureServerCredentialsImpl final : public ServerCredentials { public: - int AddPortToServer(const grpc::string& addr, grpc_server* server) override { + int AddPortToServer(const std::string& addr, grpc_server* server) override { return grpc_server_add_insecure_http2_port(server, addr.c_str()); } void SetAuthMetadataProcessor( diff --git a/src/cpp/server/load_reporter/load_data_store.cc b/src/cpp/server/load_reporter/load_data_store.cc index 594473f5e7a..f536d2587e4 100644 --- a/src/cpp/server/load_reporter/load_data_store.cc +++ b/src/cpp/server/load_reporter/load_data_store.cc @@ -77,8 +77,8 @@ const typename C::value_type* RandomElement(const C& container) { } // namespace -LoadRecordKey::LoadRecordKey(const grpc::string& client_ip_and_token, - grpc::string user_id) +LoadRecordKey::LoadRecordKey(const std::string& client_ip_and_token, + std::string user_id) : user_id_(std::move(user_id)) { GPR_ASSERT(client_ip_and_token.size() >= 2); int ip_hex_size; @@ -98,7 +98,7 @@ LoadRecordKey::LoadRecordKey(const grpc::string& client_ip_and_token, } } -grpc::string LoadRecordKey::GetClientIpBytes() const { +std::string LoadRecordKey::GetClientIpBytes() const { if (client_ip_hex_.empty()) { return ""; } else if (client_ip_hex_.size() == kIpv4AddressLength) { @@ -110,8 +110,8 @@ grpc::string LoadRecordKey::GetClientIpBytes() const { return ""; } ip_bytes = grpc_htonl(ip_bytes); - return grpc::string(reinterpret_cast(&ip_bytes), - sizeof(ip_bytes)); + return std::string(reinterpret_cast(&ip_bytes), + sizeof(ip_bytes)); } else if (client_ip_hex_.size() == kIpv6AddressLength) { uint32_t ip_bytes[4]; for (size_t i = 0; i < 4; ++i) { @@ -125,14 +125,14 @@ grpc::string LoadRecordKey::GetClientIpBytes() const { } ip_bytes[i] = grpc_htonl(ip_bytes[i]); } - return grpc::string(reinterpret_cast(ip_bytes), - sizeof(ip_bytes)); + return std::string(reinterpret_cast(ip_bytes), + sizeof(ip_bytes)); } else { GPR_UNREACHABLE_CODE(return ""); } } -LoadRecordValue::LoadRecordValue(grpc::string metric_name, uint64_t num_calls, +LoadRecordValue::LoadRecordValue(std::string metric_name, uint64_t num_calls, double total_metric_value) { call_metrics_.emplace(std::move(metric_name), CallMetricValue(num_calls, total_metric_value)); @@ -177,8 +177,8 @@ uint64_t PerBalancerStore::GetNumCallsInProgressForReport() { return num_calls_in_progress_; } -void PerHostStore::ReportStreamCreated(const grpc::string& lb_id, - const grpc::string& load_key) { +void PerHostStore::ReportStreamCreated(const std::string& lb_id, + const std::string& load_key) { GPR_ASSERT(lb_id != kInvalidLbId); SetUpForNewLbId(lb_id, load_key); // Prior to this one, there was no load balancer receiving report, so we may @@ -188,7 +188,7 @@ void PerHostStore::ReportStreamCreated(const grpc::string& lb_id, // this stream. Need to discuss with LB team. if (assigned_stores_.size() == 1) { for (const auto& p : per_balancer_stores_) { - const grpc::string& other_lb_id = p.first; + const std::string& other_lb_id = p.first; const std::unique_ptr& orphaned_store = p.second; if (other_lb_id != lb_id) { orphaned_store->Resume(); @@ -203,7 +203,7 @@ void PerHostStore::ReportStreamCreated(const grpc::string& lb_id, } } -void PerHostStore::ReportStreamClosed(const grpc::string& lb_id) { +void PerHostStore::ReportStreamClosed(const std::string& lb_id) { auto it_store_for_gone_lb = per_balancer_stores_.find(lb_id); GPR_ASSERT(it_store_for_gone_lb != per_balancer_stores_.end()); // Remove this closed stream from our records. @@ -215,7 +215,7 @@ void PerHostStore::ReportStreamClosed(const grpc::string& lb_id) { // The stores that were assigned to this balancer are orphaned now. They // should be re-assigned to other balancers which are still receiving reports. for (PerBalancerStore* orphaned_store : orphaned_stores) { - const grpc::string* new_receiver = nullptr; + const std::string* new_receiver = nullptr; auto it = load_key_to_receiving_lb_ids_.find(orphaned_store->load_key()); if (it != load_key_to_receiving_lb_ids_.end()) { // First, try to pick from the active balancers with the same load key. @@ -235,21 +235,21 @@ void PerHostStore::ReportStreamClosed(const grpc::string& lb_id) { } PerBalancerStore* PerHostStore::FindPerBalancerStore( - const grpc::string& lb_id) const { + const std::string& lb_id) const { return per_balancer_stores_.find(lb_id) != per_balancer_stores_.end() ? per_balancer_stores_.find(lb_id)->second.get() : nullptr; } const std::set* PerHostStore::GetAssignedStores( - const grpc::string& lb_id) const { + const std::string& lb_id) const { auto it = assigned_stores_.find(lb_id); if (it == assigned_stores_.end()) return nullptr; return &(it->second); } void PerHostStore::AssignOrphanedStore(PerBalancerStore* orphaned_store, - const grpc::string& new_receiver) { + const std::string& new_receiver) { auto it = assigned_stores_.find(new_receiver); GPR_ASSERT(it != assigned_stores_.end()); it->second.insert(orphaned_store); @@ -260,8 +260,8 @@ void PerHostStore::AssignOrphanedStore(PerBalancerStore* orphaned_store, new_receiver.c_str()); } -void PerHostStore::SetUpForNewLbId(const grpc::string& lb_id, - const grpc::string& load_key) { +void PerHostStore::SetUpForNewLbId(const std::string& lb_id, + const std::string& load_key) { // The top-level caller (i.e., LoadReportService) should guarantee the // lb_id is unique for each reporting stream. GPR_ASSERT(per_balancer_stores_.find(lb_id) == per_balancer_stores_.end()); @@ -284,7 +284,7 @@ PerBalancerStore* LoadDataStore::FindPerBalancerStore( } } -void LoadDataStore::MergeRow(const grpc::string& hostname, +void LoadDataStore::MergeRow(const std::string& hostname, const LoadRecordKey& key, const LoadRecordValue& value) { PerBalancerStore* per_balancer_store = @@ -315,20 +315,20 @@ void LoadDataStore::MergeRow(const grpc::string& hostname, } const std::set* LoadDataStore::GetAssignedStores( - const grpc::string& hostname, const grpc::string& lb_id) { + const std::string& hostname, const std::string& lb_id) { auto it = per_host_stores_.find(hostname); if (it == per_host_stores_.end()) return nullptr; return it->second.GetAssignedStores(lb_id); } -void LoadDataStore::ReportStreamCreated(const grpc::string& hostname, - const grpc::string& lb_id, - const grpc::string& load_key) { +void LoadDataStore::ReportStreamCreated(const std::string& hostname, + const std::string& lb_id, + const std::string& load_key) { per_host_stores_[hostname].ReportStreamCreated(lb_id, load_key); } -void LoadDataStore::ReportStreamClosed(const grpc::string& hostname, - const grpc::string& lb_id) { +void LoadDataStore::ReportStreamClosed(const std::string& hostname, + const std::string& lb_id) { auto it_per_host_store = per_host_stores_.find(hostname); GPR_ASSERT(it_per_host_store != per_host_stores_.end()); it_per_host_store->second.ReportStreamClosed(lb_id); diff --git a/src/cpp/server/load_reporter/load_data_store.h b/src/cpp/server/load_reporter/load_data_store.h index dc08ecf4794..658b1526a5e 100644 --- a/src/cpp/server/load_reporter/load_data_store.h +++ b/src/cpp/server/load_reporter/load_data_store.h @@ -67,17 +67,17 @@ class CallMetricValue { // The key of a load record. class LoadRecordKey { public: - LoadRecordKey(grpc::string lb_id, grpc::string lb_tag, grpc::string user_id, - grpc::string client_ip_hex) + LoadRecordKey(std::string lb_id, std::string lb_tag, std::string user_id, + std::string client_ip_hex) : lb_id_(std::move(lb_id)), lb_tag_(std::move(lb_tag)), user_id_(std::move(user_id)), client_ip_hex_(std::move(client_ip_hex)) {} // Parses the input client_ip_and_token to set client IP, LB ID, and LB tag. - LoadRecordKey(const grpc::string& client_ip_and_token, grpc::string user_id); + LoadRecordKey(const std::string& client_ip_and_token, std::string user_id); - grpc::string ToString() const { + std::string ToString() const { return "[lb_id_=" + lb_id_ + ", lb_tag_=" + lb_tag_ + ", user_id_=" + user_id_ + ", client_ip_hex_=" + client_ip_hex_ + "]"; @@ -89,17 +89,17 @@ class LoadRecordKey { } // Gets the client IP bytes in network order (i.e., big-endian). - grpc::string GetClientIpBytes() const; + std::string GetClientIpBytes() const; // Getters. - const grpc::string& lb_id() const { return lb_id_; } - const grpc::string& lb_tag() const { return lb_tag_; } - const grpc::string& user_id() const { return user_id_; } - const grpc::string& client_ip_hex() const { return client_ip_hex_; } + const std::string& lb_id() const { return lb_id_; } + const std::string& lb_tag() const { return lb_tag_; } + const std::string& user_id() const { return user_id_; } + const std::string& client_ip_hex() const { return client_ip_hex_; } struct Hasher { - void hash_combine(size_t* seed, const grpc::string& k) const { - *seed ^= std::hash()(k) + 0x9e3779b9 + (*seed << 6) + + void hash_combine(size_t* seed, const std::string& k) const { + *seed ^= std::hash()(k) + 0x9e3779b9 + (*seed << 6) + (*seed >> 2); } @@ -114,10 +114,10 @@ class LoadRecordKey { }; private: - grpc::string lb_id_; - grpc::string lb_tag_; - grpc::string user_id_; - grpc::string client_ip_hex_; + std::string lb_id_; + std::string lb_tag_; + std::string user_id_; + std::string client_ip_hex_; }; // The value of a load record. @@ -133,7 +133,7 @@ class LoadRecordValue { bytes_recv_(bytes_recv), latency_ms_(latency_ms) {} - LoadRecordValue(grpc::string metric_name, uint64_t num_calls, + LoadRecordValue(std::string metric_name, uint64_t num_calls, double total_metric_value); void MergeFrom(const LoadRecordValue& other) { @@ -144,7 +144,7 @@ class LoadRecordValue { bytes_recv_ += other.bytes_recv_; latency_ms_ += other.latency_ms_; for (const auto& p : other.call_metrics_) { - const grpc::string& key = p.first; + const std::string& key = p.first; const CallMetricValue& value = p.second; call_metrics_[key].MergeFrom(value); } @@ -154,17 +154,17 @@ class LoadRecordValue { return static_cast(start_count_ - ok_count_ - error_count_); } - grpc::string ToString() const { - return "[start_count_=" + grpc::to_string(start_count_) + - ", ok_count_=" + grpc::to_string(ok_count_) + - ", error_count_=" + grpc::to_string(error_count_) + - ", bytes_sent_=" + grpc::to_string(bytes_sent_) + - ", bytes_recv_=" + grpc::to_string(bytes_recv_) + - ", latency_ms_=" + grpc::to_string(latency_ms_) + ", " + - grpc::to_string(call_metrics_.size()) + " other call metric(s)]"; + std::string ToString() const { + return "[start_count_=" + std::to_string(start_count_) + + ", ok_count_=" + std::to_string(ok_count_) + + ", error_count_=" + std::to_string(error_count_) + + ", bytes_sent_=" + std::to_string(bytes_sent_) + + ", bytes_recv_=" + std::to_string(bytes_recv_) + + ", latency_ms_=" + std::to_string(latency_ms_) + ", " + + std::to_string(call_metrics_.size()) + " other call metric(s)]"; } - bool InsertCallMetric(const grpc::string& metric_name, + bool InsertCallMetric(const std::string& metric_name, const CallMetricValue& metric_value) { return call_metrics_.insert({metric_name, metric_value}).second; } @@ -176,8 +176,7 @@ class LoadRecordValue { uint64_t bytes_sent() const { return bytes_sent_; } uint64_t bytes_recv() const { return bytes_recv_; } uint64_t latency_ms() const { return latency_ms_; } - const std::unordered_map& call_metrics() - const { + const std::unordered_map& call_metrics() const { return call_metrics_; } @@ -188,7 +187,7 @@ class LoadRecordValue { uint64_t bytes_sent_ = 0; uint64_t bytes_recv_ = 0; uint64_t latency_ms_ = 0; - std::unordered_map call_metrics_; + std::unordered_map call_metrics_; }; // Stores the data associated with a particular LB ID. @@ -197,7 +196,7 @@ class PerBalancerStore { using LoadRecordMap = std::unordered_map; - PerBalancerStore(grpc::string lb_id, grpc::string load_key) + PerBalancerStore(std::string lb_id, std::string load_key) : lb_id_(std::move(lb_id)), load_key_(std::move(load_key)) {} // Merge a load record with the given key and value if the store is not @@ -217,7 +216,7 @@ class PerBalancerStore { uint64_t GetNumCallsInProgressForReport(); - grpc::string ToString() { + std::string ToString() { return "[PerBalancerStore lb_id_=" + lb_id_ + " load_key_=" + load_key_ + "]"; } @@ -225,14 +224,14 @@ class PerBalancerStore { void ClearLoadRecordMap() { load_record_map_.clear(); } // Getters. - const grpc::string& lb_id() const { return lb_id_; } - const grpc::string& load_key() const { return load_key_; } + const std::string& lb_id() const { return lb_id_; } + const std::string& load_key() const { return load_key_; } const LoadRecordMap& load_record_map() const { return load_record_map_; } private: - grpc::string lb_id_; + std::string lb_id_; // TODO(juanlishen): Use bytestring protobuf type? - grpc::string load_key_; + std::string load_key_; LoadRecordMap load_record_map_; uint64_t num_calls_in_progress_ = 0; uint64_t last_reported_num_calls_in_progress_ = 0; @@ -246,39 +245,39 @@ class PerHostStore { // LB ID (guaranteed unique) associated with that stream. If it is the only // active store, adopt all the orphaned stores. If it is the first created // store, adopt the store of kInvalidLbId. - void ReportStreamCreated(const grpc::string& lb_id, - const grpc::string& load_key); + void ReportStreamCreated(const std::string& lb_id, + const std::string& load_key); // When a report stream is closed, the PerBalancerStores assigned to the // associate LB ID need to be re-assigned to other active balancers, // ideally with the same load key. If there is no active balancer, we have // to suspend those stores and drop the incoming load data until they are // resumed. - void ReportStreamClosed(const grpc::string& lb_id); + void ReportStreamClosed(const std::string& lb_id); // Returns null if not found. Caller doesn't own the returned store. - PerBalancerStore* FindPerBalancerStore(const grpc::string& lb_id) const; + PerBalancerStore* FindPerBalancerStore(const std::string& lb_id) const; // Returns null if lb_id is not found. The returned pointer points to the // underlying data structure, which is not owned by the caller. const std::set* GetAssignedStores( - const grpc::string& lb_id) const; + const std::string& lb_id) const; private: // Creates a PerBalancerStore for the given LB ID, assigns the store to // itself, and records the LB ID to the load key. - void SetUpForNewLbId(const grpc::string& lb_id, const grpc::string& load_key); + void SetUpForNewLbId(const std::string& lb_id, const std::string& load_key); void AssignOrphanedStore(PerBalancerStore* orphaned_store, - const grpc::string& new_receiver); + const std::string& new_receiver); - std::unordered_map> + std::unordered_map> load_key_to_receiving_lb_ids_; // Key: LB ID. The key set includes all the LB IDs that have been // allocated for reporting streams so far. // Value: the unique pointer to the PerBalancerStore of the LB ID. - std::unordered_map> + std::unordered_map> per_balancer_stores_; // Key: LB ID. The key set includes the LB IDs of the balancers that are @@ -286,8 +285,7 @@ class PerHostStore { // Value: the set of raw pointers to the PerBalancerStores assigned to the LB // ID. Note that the sets in assigned_stores_ form a division of the value set // of per_balancer_stores_. - std::unordered_map> - assigned_stores_; + std::unordered_map> assigned_stores_; }; // Thread-unsafe two-level bookkeeper of all the load data. @@ -302,8 +300,8 @@ class PerHostStore { class LoadDataStore { public: // Returns null if not found. Caller doesn't own the returned store. - PerBalancerStore* FindPerBalancerStore(const grpc::string& hostname, - const grpc::string& lb_id) const; + PerBalancerStore* FindPerBalancerStore(const std::string& hostname, + const std::string& lb_id) const; // Returns null if hostname or lb_id is not found. The returned pointer points // to the underlying data structure, which is not owned by the caller. @@ -313,33 +311,33 @@ class LoadDataStore { // If a PerBalancerStore can be found by the hostname and LB ID in // LoadRecordKey, the load data will be merged to that store. Otherwise, // only track the number of the in-progress calls for this unknown LB ID. - void MergeRow(const grpc::string& hostname, const LoadRecordKey& key, + void MergeRow(const std::string& hostname, const LoadRecordKey& key, const LoadRecordValue& value); // Is the given lb_id a tracked unknown LB ID (i.e., the LB ID was associated // with some received load data but unknown to this load data store)? - bool IsTrackedUnknownBalancerId(const grpc::string& lb_id) const { + bool IsTrackedUnknownBalancerId(const std::string& lb_id) const { return unknown_balancer_id_trackers_.find(lb_id) != unknown_balancer_id_trackers_.end(); } // Wrapper around PerHostStore::ReportStreamCreated. - void ReportStreamCreated(const grpc::string& hostname, - const grpc::string& lb_id, - const grpc::string& load_key); + void ReportStreamCreated(const std::string& hostname, + const std::string& lb_id, + const std::string& load_key); // Wrapper around PerHostStore::ReportStreamClosed. - void ReportStreamClosed(const grpc::string& hostname, - const grpc::string& lb_id); + void ReportStreamClosed(const std::string& hostname, + const std::string& lb_id); private: // Buffered data that was fetched from Census but hasn't been sent to // balancer. We need to keep this data ourselves because Census will // delete the data once it's returned. - std::unordered_map per_host_stores_; + std::unordered_map per_host_stores_; // Tracks the number of in-progress calls for each unknown LB ID. - std::unordered_map unknown_balancer_id_trackers_; + std::unordered_map unknown_balancer_id_trackers_; }; } // namespace load_reporter diff --git a/src/cpp/server/load_reporter/load_reporter.cc b/src/cpp/server/load_reporter/load_reporter.cc index b4c5e57c354..7881f85c8a1 100644 --- a/src/cpp/server/load_reporter/load_reporter.cc +++ b/src/cpp/server/load_reporter/load_reporter.cc @@ -160,8 +160,8 @@ CensusViewProvider::CensusViewProvider() double CensusViewProvider::GetRelatedViewDataRowDouble( const ViewDataMap& view_data_map, const char* view_name, - size_t view_name_len, const std::vector& tag_values) { - auto it_vd = view_data_map.find(grpc::string(view_name, view_name_len)); + size_t view_name_len, const std::vector& tag_values) { + auto it_vd = view_data_map.find(std::string(view_name, view_name_len)); GPR_ASSERT(it_vd != view_data_map.end()); GPR_ASSERT(it_vd->second.type() == ::opencensus::stats::ViewData::Type::kDouble); @@ -172,8 +172,8 @@ double CensusViewProvider::GetRelatedViewDataRowDouble( uint64_t CensusViewProvider::GetRelatedViewDataRowInt( const ViewDataMap& view_data_map, const char* view_name, - size_t view_name_len, const std::vector& tag_values) { - auto it_vd = view_data_map.find(grpc::string(view_name, view_name_len)); + size_t view_name_len, const std::vector& tag_values) { + auto it_vd = view_data_map.find(std::string(view_name, view_name_len)); GPR_ASSERT(it_vd != view_data_map.end()); GPR_ASSERT(it_vd->second.type() == ::opencensus::stats::ViewData::Type::kInt64); @@ -185,7 +185,7 @@ uint64_t CensusViewProvider::GetRelatedViewDataRowInt( CensusViewProviderDefaultImpl::CensusViewProviderDefaultImpl() { for (const auto& p : view_descriptor_map()) { - const grpc::string& view_name = p.first; + const std::string& view_name = p.first; const ::opencensus::stats::ViewDescriptor& vd = p.second; // We need to use pair's piecewise ctor here, otherwise the deleted copy // ctor of View will be called. @@ -199,7 +199,7 @@ CensusViewProvider::ViewDataMap CensusViewProviderDefaultImpl::FetchViewData() { gpr_log(GPR_DEBUG, "[CVP %p] Starts fetching Census view data.", this); ViewDataMap view_data_map; for (auto& p : view_map_) { - const grpc::string& view_name = p.first; + const std::string& view_name = p.first; ::opencensus::stats::View& view = p.second; if (view.IsValid()) { view_data_map.emplace(view_name, view.GetData()); @@ -215,7 +215,7 @@ CensusViewProvider::ViewDataMap CensusViewProviderDefaultImpl::FetchViewData() { return view_data_map; } -grpc::string LoadReporter::GenerateLbId() { +std::string LoadReporter::GenerateLbId() { while (true) { if (next_lb_id_ > UINT32_MAX) { gpr_log(GPR_ERROR, "[LR %p] The LB ID exceeds the max valid value!", @@ -228,7 +228,7 @@ grpc::string LoadReporter::GenerateLbId() { // Convert to padded hex string for a 32-bit LB ID. E.g, "0000ca5b". char buf[kLbIdLength + 1]; snprintf(buf, sizeof(buf), "%08lx", lb_id); - grpc::string lb_id_str(buf, kLbIdLength); + std::string lb_id_str(buf, kLbIdLength); // The client may send requests with LB ID that has never been allocated // by this load reporter. Those IDs are tracked and will be skipped when // we generate a new ID. @@ -289,8 +289,8 @@ LoadReporter::GenerateLoadBalancingFeedback() { } ::google::protobuf::RepeatedPtrField<::grpc::lb::v1::Load> -LoadReporter::GenerateLoads(const grpc::string& hostname, - const grpc::string& lb_id) { +LoadReporter::GenerateLoads(const std::string& hostname, + const std::string& lb_id) { grpc_core::MutexLock lock(&store_mu_); auto assigned_stores = load_data_store_.GetAssignedStores(hostname, lb_id); GPR_ASSERT(assigned_stores != nullptr); @@ -319,7 +319,7 @@ LoadReporter::GenerateLoads(const grpc::string& hostname, load->mutable_total_latency()->set_nanos( (static_cast(value.latency_ms()) % 1000) * 1000000); for (const auto& p : value.call_metrics()) { - const grpc::string& metric_name = p.first; + const std::string& metric_name = p.first; const CallMetricValue& metric_value = p.second; auto call_metric_data = load->add_metric_data(); call_metric_data->set_metric_name(metric_name); @@ -377,9 +377,9 @@ void LoadReporter::AppendNewFeedbackRecord(uint64_t rpcs, uint64_t errors) { cpu_stats.first, cpu_stats.second); } -void LoadReporter::ReportStreamCreated(const grpc::string& hostname, - const grpc::string& lb_id, - const grpc::string& load_key) { +void LoadReporter::ReportStreamCreated(const std::string& hostname, + const std::string& lb_id, + const std::string& load_key) { grpc_core::MutexLock lock(&store_mu_); load_data_store_.ReportStreamCreated(hostname, lb_id, load_key); gpr_log(GPR_INFO, @@ -387,8 +387,8 @@ void LoadReporter::ReportStreamCreated(const grpc::string& hostname, this, hostname.c_str(), lb_id.c_str(), load_key.c_str()); } -void LoadReporter::ReportStreamClosed(const grpc::string& hostname, - const grpc::string& lb_id) { +void LoadReporter::ReportStreamClosed(const std::string& hostname, + const std::string& lb_id) { grpc_core::MutexLock lock(&store_mu_); load_data_store_.ReportStreamClosed(hostname, lb_id); gpr_log(GPR_INFO, "[LR %p] Report stream closed (host: %s, LB ID: %s).", this, @@ -400,11 +400,11 @@ void LoadReporter::ProcessViewDataCallStart( auto it = view_data_map.find(kViewStartCount); if (it != view_data_map.end()) { for (const auto& p : it->second.int_data()) { - const std::vector& tag_values = p.first; + const std::vector& tag_values = p.first; const uint64_t start_count = static_cast(p.second); - const grpc::string& client_ip_and_token = tag_values[0]; - const grpc::string& host = tag_values[1]; - const grpc::string& user_id = tag_values[2]; + const std::string& client_ip_and_token = tag_values[0]; + const std::string& host = tag_values[1]; + const std::string& user_id = tag_values[2]; LoadRecordKey key(client_ip_and_token, user_id); LoadRecordValue value = LoadRecordValue(start_count); { @@ -422,12 +422,12 @@ void LoadReporter::ProcessViewDataCallEnd( auto it = view_data_map.find(kViewEndCount); if (it != view_data_map.end()) { for (const auto& p : it->second.int_data()) { - const std::vector& tag_values = p.first; + const std::vector& tag_values = p.first; const uint64_t end_count = static_cast(p.second); - const grpc::string& client_ip_and_token = tag_values[0]; - const grpc::string& host = tag_values[1]; - const grpc::string& user_id = tag_values[2]; - const grpc::string& status = tag_values[3]; + const std::string& client_ip_and_token = tag_values[0]; + const std::string& host = tag_values[1]; + const std::string& user_id = tag_values[2]; + const std::string& status = tag_values[3]; // This is due to a bug reported internally of Java server load reporting // implementation. // TODO(juanlishen): Check whether this situation happens in OSS C++. @@ -473,12 +473,12 @@ void LoadReporter::ProcessViewDataOtherCallMetrics( auto it = view_data_map.find(kViewOtherCallMetricCount); if (it != view_data_map.end()) { for (const auto& p : it->second.int_data()) { - const std::vector& tag_values = p.first; + const std::vector& tag_values = p.first; const int64_t num_calls = p.second; - const grpc::string& client_ip_and_token = tag_values[0]; - const grpc::string& host = tag_values[1]; - const grpc::string& user_id = tag_values[2]; - const grpc::string& metric_name = tag_values[3]; + const std::string& client_ip_and_token = tag_values[0]; + const std::string& host = tag_values[1]; + const std::string& user_id = tag_values[2]; + const std::string& metric_name = tag_values[3]; LoadRecordKey key(client_ip_and_token, user_id); const double total_metric_value = CensusViewProvider::GetRelatedViewDataRowDouble( diff --git a/src/cpp/server/load_reporter/load_reporter.h b/src/cpp/server/load_reporter/load_reporter.h index 44767ee841e..f8b1123cb1a 100644 --- a/src/cpp/server/load_reporter/load_reporter.h +++ b/src/cpp/server/load_reporter/load_reporter.h @@ -44,10 +44,10 @@ class CensusViewProvider { public: // Maps from the view name to the view data. using ViewDataMap = - std::unordered_map; + std::unordered_map; // Maps from the view name to the view descriptor. using ViewDescriptorMap = - std::unordered_map; + std::unordered_map; CensusViewProvider(); virtual ~CensusViewProvider() = default; @@ -63,10 +63,10 @@ class CensusViewProvider { // recorded at the same time. static double GetRelatedViewDataRowDouble( const ViewDataMap& view_data_map, const char* view_name, - size_t view_name_len, const std::vector& tag_values); + size_t view_name_len, const std::vector& tag_values); static uint64_t GetRelatedViewDataRowInt( const ViewDataMap& view_data_map, const char* view_name, - size_t view_name_len, const std::vector& tag_values); + size_t view_name_len, const std::vector& tag_values); protected: const ViewDescriptorMap& view_descriptor_map() const { @@ -91,7 +91,7 @@ class CensusViewProviderDefaultImpl : public CensusViewProvider { ViewDataMap FetchViewData() override; private: - std::unordered_map view_map_; + std::unordered_map view_map_; }; // The interface to get the CPU stats. Abstracted for mocking. @@ -141,7 +141,7 @@ class LoadReporter { // consumption) and the last fetch from Census (i.e., the last production). // Thread-safe. ::google::protobuf::RepeatedPtrField<::grpc::lb::v1::Load> GenerateLoads( - const grpc::string& hostname, const grpc::string& lb_id); + const std::string& hostname, const std::string& lb_id); // The feedback is calculated from the stats data recorded in the sliding // window. Outdated records are discarded. @@ -150,18 +150,18 @@ class LoadReporter { // Wrapper around LoadDataStore::ReportStreamCreated. // Thread-safe. - void ReportStreamCreated(const grpc::string& hostname, - const grpc::string& lb_id, - const grpc::string& load_key); + void ReportStreamCreated(const std::string& hostname, + const std::string& lb_id, + const std::string& load_key); // Wrapper around LoadDataStore::ReportStreamClosed. // Thread-safe. - void ReportStreamClosed(const grpc::string& hostname, - const grpc::string& lb_id); + void ReportStreamClosed(const std::string& hostname, + const std::string& lb_id); // Generates a unique LB ID of length kLbIdLength. Returns an empty string // upon failure. Thread-safe. - grpc::string GenerateLbId(); + std::string GenerateLbId(); // Accessors only for testing. CensusViewProvider* census_view_provider() { diff --git a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h index 3087cbfc04d..969e20f6245 100644 --- a/src/cpp/server/load_reporter/load_reporter_async_service_impl.h +++ b/src/cpp/server/load_reporter/load_reporter_async_service_impl.h @@ -135,9 +135,9 @@ class LoadReporterAsyncServiceImpl void Shutdown(std::shared_ptr self, const char* reason); // The key fields of the stream. - grpc::string lb_id_; - grpc::string load_balanced_hostname_; - grpc::string load_key_; + std::string lb_id_; + std::string load_balanced_hostname_; + std::string load_key_; uint64_t load_report_interval_ms_; // The data for RPC communication with the load reportee. diff --git a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h index c80802b2638..2fffeb89cfd 100644 --- a/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h +++ b/src/cpp/server/load_reporter/load_reporting_service_server_builder_plugin.h @@ -33,7 +33,7 @@ namespace load_reporter { class LoadReportingServiceServerBuilderPlugin : public ServerBuilderPlugin { public: ~LoadReportingServiceServerBuilderPlugin() override = default; - grpc::string name() override { return "load_reporting_service"; } + std::string name() override { return "load_reporting_service"; } // Creates a load reporting service. void UpdateServerBuilder(ServerBuilder* builder) override; @@ -44,7 +44,7 @@ class LoadReportingServiceServerBuilderPlugin : public ServerBuilderPlugin { // Starts the load reporter service. void Finish(grpc_impl::ServerInitializer* si) override; - void ChangeArguments(const grpc::string& name, void* value) override {} + void ChangeArguments(const std::string& name, void* value) override {} void UpdateChannelArguments(grpc::ChannelArguments* args) override {} bool has_sync_methods() const override; bool has_async_methods() const override; diff --git a/src/cpp/server/load_reporter/util.cc b/src/cpp/server/load_reporter/util.cc index b69705a6994..59847f69092 100644 --- a/src/cpp/server/load_reporter/util.cc +++ b/src/cpp/server/load_reporter/util.cc @@ -29,9 +29,9 @@ namespace load_reporter { namespace experimental { void AddLoadReportingCost(grpc::ServerContext* ctx, - const grpc::string& cost_name, double cost_value) { + const std::string& cost_name, double cost_value) { if (std::isnormal(cost_value)) { - grpc::string buf; + std::string buf; buf.resize(sizeof(cost_value) + cost_name.size()); memcpy(&(*buf.begin()), &cost_value, sizeof(cost_value)); memcpy(&(*buf.begin()) + sizeof(cost_value), cost_name.data(), diff --git a/src/cpp/server/secure_server_credentials.cc b/src/cpp/server/secure_server_credentials.cc index cf8dcd7d7c9..f94696fd767 100644 --- a/src/cpp/server/secure_server_credentials.cc +++ b/src/cpp/server/secure_server_credentials.cc @@ -96,7 +96,7 @@ void AuthMetadataProcessorAyncWrapper::InvokeProcessor( namespace grpc_impl { -int SecureServerCredentials::AddPortToServer(const grpc::string& addr, +int SecureServerCredentials::AddPortToServer(const std::string& addr, grpc_server* server) { return grpc_server_add_secure_http2_port(server, addr.c_str(), creds_); } diff --git a/src/cpp/server/secure_server_credentials.h b/src/cpp/server/secure_server_credentials.h index 7db0ee25994..9e9e33579f0 100644 --- a/src/cpp/server/secure_server_credentials.h +++ b/src/cpp/server/secure_server_credentials.h @@ -73,7 +73,7 @@ class SecureServerCredentials final : public ServerCredentials { grpc_server_credentials_release(creds_); } - int AddPortToServer(const grpc::string& addr, grpc_server* server) override; + int AddPortToServer(const std::string& addr, grpc_server* server) override; void SetAuthMetadataProcessor( const std::shared_ptr& processor) override; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index f7eee688584..7fa33a803e9 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -83,7 +83,7 @@ ServerBuilder& ServerBuilder::RegisterService(Service* service) { return *this; } -ServerBuilder& ServerBuilder::RegisterService(const grpc::string& addr, +ServerBuilder& ServerBuilder::RegisterService(const std::string& addr, Service* service) { services_.emplace_back(new NamedService(addr, service)); return *this; @@ -134,7 +134,7 @@ std::unique_ptr ServerBuilder::experimental_type::AddExternalConnectionAcceptor( experimental_type::ExternalConnectionType type, std::shared_ptr creds) { - grpc::string name_prefix("external:"); + std::string name_prefix("external:"); char count_str[GPR_LTOA_MIN_BUFSIZE]; gpr_ltoa(static_cast(builder_->acceptors_.size()), count_str); builder_->acceptors_.emplace_back( @@ -203,10 +203,10 @@ ServerBuilder& ServerBuilder::SetResourceQuota( } ServerBuilder& ServerBuilder::AddListeningPort( - const grpc::string& addr_uri, std::shared_ptr creds, + const std::string& addr_uri, std::shared_ptr creds, int* selected_port) { - const grpc::string uri_scheme = "dns:"; - grpc::string addr = addr_uri; + const std::string uri_scheme = "dns:"; + std::string addr = addr_uri; if (addr_uri.compare(0, uri_scheme.size(), uri_scheme) == 0) { size_t pos = uri_scheme.size(); while (addr_uri[pos] == '/') ++pos; // Skip slashes. diff --git a/src/cpp/server/server_cc.cc b/src/cpp/server/server_cc.cc index 2f6c2700076..489480bc503 100644 --- a/src/cpp/server/server_cc.cc +++ b/src/cpp/server/server_cc.cc @@ -1028,7 +1028,7 @@ static grpc_server_register_method_payload_handling PayloadHandlingForMethod( GPR_UNREACHABLE_CODE(return GRPC_SRM_PAYLOAD_NONE;); } -bool Server::RegisterService(const grpc::string* host, grpc::Service* service) { +bool Server::RegisterService(const std::string* host, grpc::Service* service) { bool has_async_methods = service->has_async_methods(); if (has_async_methods) { GPR_ASSERT(service->server_ == nullptr && @@ -1078,7 +1078,7 @@ bool Server::RegisterService(const grpc::string* host, grpc::Service* service) { // Parse service name. if (method_name != nullptr) { std::stringstream ss(method_name); - grpc::string service_name; + std::string service_name; if (std::getline(ss, service_name, '/') && std::getline(ss, service_name, '/')) { services_.push_back(service_name); @@ -1111,7 +1111,7 @@ void Server::RegisterCallbackGenericService( }); } -int Server::AddListeningPort(const grpc::string& addr, +int Server::AddListeningPort(const std::string& addr, grpc::ServerCredentials* creds) { GPR_ASSERT(!started_); int port = creds->AddPortToServer(addr, server_); diff --git a/src/cpp/server/server_context.cc b/src/cpp/server/server_context.cc index 21a13048bdd..c7cad23741c 100644 --- a/src/cpp/server/server_context.cc +++ b/src/cpp/server/server_context.cc @@ -305,13 +305,13 @@ void ServerContextBase::BeginCompletionOp( return static_cast<::grpc::internal::CompletionQueueTag*>(completion_op_); } -void ServerContextBase::AddInitialMetadata(const grpc::string& key, - const grpc::string& value) { +void ServerContextBase::AddInitialMetadata(const std::string& key, + const std::string& value) { initial_metadata_.insert(std::make_pair(key, value)); } -void ServerContextBase::AddTrailingMetadata(const grpc::string& key, - const grpc::string& value) { +void ServerContextBase::AddTrailingMetadata(const std::string& key, + const std::string& value) { trailing_metadata_.insert(std::make_pair(key, value)); } @@ -356,8 +356,8 @@ void ServerContextBase::set_compression_algorithm( AddInitialMetadata(GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY, algorithm_name); } -grpc::string ServerContextBase::peer() const { - grpc::string peer; +std::string ServerContextBase::peer() const { + std::string peer; if (call_) { char* c_peer = grpc_call_get_peer(call_); peer = c_peer; @@ -371,7 +371,7 @@ const struct census_context* ServerContextBase::census_context() const { } void ServerContextBase::SetLoadReportingCosts( - const std::vector& cost_data) { + const std::vector& cost_data) { if (call_ == nullptr) return; for (const auto& cost_datum : cost_data) { AddTrailingMetadata(GRPC_LB_COST_MD_KEY, cost_datum); diff --git a/templates/src/cpp/common/version_cc.cc.template b/templates/src/cpp/common/version_cc.cc.template index a3b0cf69a53..5c14ffd0a22 100644 --- a/templates/src/cpp/common/version_cc.cc.template +++ b/templates/src/cpp/common/version_cc.cc.template @@ -24,5 +24,5 @@ #include namespace grpc { - grpc::string Version() { return "${settings.cpp_version}"; } + std::string Version() { return "${settings.cpp_version}"; } } // namespace grpc diff --git a/test/core/end2end/h2_ssl_cert_test.cc b/test/core/end2end/h2_ssl_cert_test.cc index 21c3d288a41..46d38a63e54 100644 --- a/test/core/end2end/h2_ssl_cert_test.cc +++ b/test/core/end2end/h2_ssl_cert_test.cc @@ -42,7 +42,7 @@ extern "C" { #include } -static grpc::string test_server1_key_id; +static std::string test_server1_key_id; namespace grpc { namespace testing { diff --git a/test/cpp/client/client_channel_stress_test.cc b/test/cpp/client/client_channel_stress_test.cc index 8e92d5373ad..61e109bd67c 100644 --- a/test/cpp/client/client_channel_stress_test.cc +++ b/test/cpp/client/client_channel_stress_test.cc @@ -90,10 +90,10 @@ class BalancerServiceImpl : public LoadBalancer::Service { void Shutdown() { shutdown_ = true; } private: - grpc::string Ip4ToPackedString(const char* ip_str) { + std::string Ip4ToPackedString(const char* ip_str) { struct in_addr ip4; GPR_ASSERT(inet_pton(AF_INET, ip_str, &ip4) == 1); - return grpc::string(reinterpret_cast(&ip4), sizeof(ip4)); + return std::string(reinterpret_cast(&ip4), sizeof(ip4)); } LoadBalanceResponse BuildRandomResponseForBackends() { @@ -167,8 +167,8 @@ class ClientChannelStressTest { private: template struct ServerThread { - explicit ServerThread(const grpc::string& type, - const grpc::string& server_host, T* service) + explicit ServerThread(const std::string& type, + const std::string& server_host, T* service) : type_(type), service_(service) { grpc::internal::Mutex mu; // We need to acquire the lock here in order to prevent the notify_one @@ -183,7 +183,7 @@ class ClientChannelStressTest { gpr_log(GPR_INFO, "%s server startup complete", type_.c_str()); } - void Start(const grpc::string& server_host, grpc::internal::Mutex* mu, + void Start(const std::string& server_host, grpc::internal::Mutex* mu, grpc::internal::CondVar* cond) { // We need to acquire the lock here in order to prevent the notify_one // below from firing before its corresponding wait is executed. @@ -206,7 +206,7 @@ class ClientChannelStressTest { } int port_; - grpc::string type_; + std::string type_; std::unique_ptr server_; T* service_; std::unique_ptr thread_; @@ -214,7 +214,7 @@ class ClientChannelStressTest { struct AddressData { int port; - grpc::string balancer_name; + std::string balancer_name; }; static grpc_core::ServerAddressList CreateAddressListFromAddressDataList( @@ -325,7 +325,7 @@ class ClientChannelStressTest { } std::atomic_bool shutdown_{false}; - const grpc::string server_host_ = "localhost"; + const std::string server_host_ = "localhost"; std::shared_ptr channel_; std::unique_ptr stub_; std::mutex stub_mutex_; diff --git a/test/cpp/client/credentials_test.cc b/test/cpp/client/credentials_test.cc index c8d2713140a..7862cd0ecec 100644 --- a/test/cpp/client/credentials_test.cc +++ b/test/cpp/client/credentials_test.cc @@ -72,7 +72,7 @@ class TestTlsCredentialReload : public TlsCredentialReloadInterface { static void tls_server_authorization_check_callback( grpc_tls_server_authorization_check_arg* arg) { GPR_ASSERT(arg != nullptr); - grpc::string cb_user_data = "cb_user_data"; + std::string cb_user_data = "cb_user_data"; arg->cb_user_data = static_cast(gpr_strdup(cb_user_data.c_str())); arg->success = 1; arg->target_name = gpr_strdup("callback_target_name"); @@ -85,7 +85,7 @@ class TestTlsServerAuthorizationCheck : public TlsServerAuthorizationCheckInterface { int Schedule(TlsServerAuthorizationCheckArg* arg) override { GPR_ASSERT(arg != nullptr); - grpc::string cb_user_data = "cb_user_data"; + std::string cb_user_data = "cb_user_data"; arg->set_cb_user_data(static_cast(gpr_strdup(cb_user_data.c_str()))); arg->set_success(1); arg->set_target_name("sync_target_name"); @@ -390,8 +390,8 @@ TEST_F(CredentialsTest, TlsCredentialReloadConfigCppToC) { c_arg.context = nullptr; c_arg.cb_user_data = static_cast(nullptr); grpc_tls_key_materials_config c_key_materials; - grpc::string test_private_key = "private_key"; - grpc::string test_cert_chain = "cert_chain"; + std::string test_private_key = "private_key"; + std::string test_cert_chain = "cert_chain"; grpc_ssl_pem_key_cert_pair* ssl_pair = (grpc_ssl_pem_key_cert_pair*)gpr_malloc( sizeof(grpc_ssl_pem_key_cert_pair)); @@ -401,12 +401,12 @@ TEST_F(CredentialsTest, TlsCredentialReloadConfigCppToC) { ::grpc_core::PemKeyCertPair(ssl_pair); ::absl::InlinedVector<::grpc_core::PemKeyCertPair, 1> pem_key_cert_pair_list; pem_key_cert_pair_list.push_back(pem_key_cert_pair); - grpc::string test_pem_root_certs = "pem_root_certs"; + std::string test_pem_root_certs = "pem_root_certs"; c_key_materials.set_key_materials(test_pem_root_certs.c_str(), pem_key_cert_pair_list); c_arg.key_materials_config = &c_key_materials; c_arg.status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED; - grpc::string test_error_details = "error_details"; + std::string test_error_details = "error_details"; c_arg.error_details->set_error_details(test_error_details.c_str()); grpc_tls_credential_reload_config* c_config = config.c_config(); @@ -589,7 +589,7 @@ TEST_F(CredentialsTest, TlsCredentialsOptionsCppToC) { c_credential_reload_arg.key_materials_config = c_options->key_materials_config(); c_credential_reload_arg.status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED; - grpc::string test_error_details = "error_details"; + std::string test_error_details = "error_details"; c_credential_reload_arg.error_details = new grpc_tls_error_details(); c_credential_reload_arg.error_details->set_error_details( test_error_details.c_str()); diff --git a/test/cpp/cocoapods/generic/generic.mm b/test/cpp/cocoapods/generic/generic.mm index 6740e9c3ad2..827ad7d4092 100644 --- a/test/cpp/cocoapods/generic/generic.mm +++ b/test/cpp/cocoapods/generic/generic.mm @@ -90,7 +90,7 @@ int byte_buffer_eq_string(ByteBuffer* bb, const char* str) { @end @implementation GenericTest { - grpc::string server_host_; + std::string server_host_; CompletionQueue cli_cq_; std::unique_ptr srv_cq_; std::unique_ptr generic_stub_; @@ -164,7 +164,7 @@ int byte_buffer_eq_string(ByteBuffer* bb, const char* str) { } - (void)SendRpc:(int)num_rpcs check_deadline:(bool)check_deadline deadline:(gpr_timespec)deadline { - const grpc::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); + const std::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); for (int i = 0; i < num_rpcs; i++) { Status recv_status; diff --git a/test/cpp/cocoapods/test/server_context_test_spouse_test.mm b/test/cpp/cocoapods/test/server_context_test_spouse_test.mm index 59f60e3ca1f..f1ffe8cffa7 100644 --- a/test/cpp/cocoapods/test/server_context_test_spouse_test.mm +++ b/test/cpp/cocoapods/test/server_context_test_spouse_test.mm @@ -70,28 +70,28 @@ TEST(ServerContextTestSpouseTest, ClientMetadata) { TEST(ServerContextTestSpouseTest, InitialMetadata) { grpc::ServerContext context; grpc::testing::ServerContextTestSpouse spouse(&context); - std::multimap metadata; + std::multimap metadata; context.AddInitialMetadata(key1, val1); - metadata.insert(std::pair(key1, val1)); + metadata.insert(std::pair(key1, val1)); ASSERT_EQ(metadata, spouse.GetInitialMetadata()); context.AddInitialMetadata(key2, val2); - metadata.insert(std::pair(key2, val2)); + metadata.insert(std::pair(key2, val2)); ASSERT_EQ(metadata, spouse.GetInitialMetadata()); } TEST(ServerContextTestSpouseTest, TrailingMetadata) { grpc::ServerContext context; grpc::testing::ServerContextTestSpouse spouse(&context); - std::multimap metadata; + std::multimap metadata; context.AddTrailingMetadata(key1, val1); - metadata.insert(std::pair(key1, val1)); + metadata.insert(std::pair(key1, val1)); ASSERT_EQ(metadata, spouse.GetTrailingMetadata()); context.AddTrailingMetadata(key2, val2); - metadata.insert(std::pair(key2, val2)); + metadata.insert(std::pair(key2, val2)); ASSERT_EQ(metadata, spouse.GetTrailingMetadata()); } diff --git a/test/cpp/common/alts_util_test.cc b/test/cpp/common/alts_util_test.cc index b3d53faddfe..e76d783ad3d 100644 --- a/test/cpp/common/alts_util_test.cc +++ b/test/cpp/common/alts_util_test.cc @@ -79,10 +79,10 @@ TEST(AltsUtilTest, AuthContextWithGoodAltsContextWithoutRpcVersions) { const std::shared_ptr auth_context( new SecureAuthContext(ctx.get())); ctx.reset(); - grpc::string expected_ap("application protocol"); - grpc::string expected_rp("record protocol"); - grpc::string expected_peer("peer"); - grpc::string expected_local("local"); + std::string expected_ap("application protocol"); + std::string expected_rp("record protocol"); + std::string expected_peer("peer"); + std::string expected_local("local"); grpc_security_level expected_sl = GRPC_INTEGRITY_ONLY; upb::Arena context_arena; grpc_gcp_AltsContext* context = grpc_gcp_AltsContext_new(context_arena.ptr()); @@ -174,7 +174,7 @@ TEST(AltsUtilTest, AltsClientAuthzCheck) { const std::shared_ptr auth_context( new SecureAuthContext(ctx.get())); ctx.reset(); - grpc::string peer("good_client"); + std::string peer("good_client"); std::vector good_service_accounts{"good_client", "good_client_1"}; std::vector bad_service_accounts{"bad_client", "bad_client_1"}; diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index f9ab14c003b..ead9fb138f7 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -89,7 +89,7 @@ class ChannelArgumentsTest : public ::testing::Test { static void TearDownTestCase() { grpc_shutdown(); } - grpc::string GetDefaultUserAgentPrefix() { + std::string GetDefaultUserAgentPrefix() { std::ostringstream user_agent_prefix; user_agent_prefix << "grpc-c++/" << Version(); return user_agent_prefix.str(); @@ -101,7 +101,7 @@ class ChannelArgumentsTest : public ::testing::Test { EXPECT_EQ(static_cast(1), args.num_args); EXPECT_STREQ(GRPC_ARG_PRIMARY_USER_AGENT_STRING, args.args[0].key); EXPECT_EQ(GetDefaultUserAgentPrefix(), - grpc::string(args.args[0].value.string)); + std::string(args.args[0].value.string)); } bool HasArg(grpc_arg expected_arg) { @@ -110,11 +110,11 @@ class ChannelArgumentsTest : public ::testing::Test { for (size_t i = 0; i < args.num_args; i++) { const grpc_arg& arg = args.args[i]; if (arg.type == expected_arg.type && - grpc::string(arg.key) == expected_arg.key) { + std::string(arg.key) == expected_arg.key) { if (arg.type == GRPC_ARG_INTEGER) { return arg.value.integer == expected_arg.value.integer; } else if (arg.type == GRPC_ARG_STRING) { - return grpc::string(arg.value.string) == expected_arg.value.string; + return std::string(arg.value.string) == expected_arg.value.string; } else if (arg.type == GRPC_ARG_POINTER) { return arg.value.pointer.p == expected_arg.value.pointer.p && arg.value.pointer.vtable->copy == @@ -132,24 +132,24 @@ class ChannelArgumentsTest : public ::testing::Test { TEST_F(ChannelArgumentsTest, SetInt) { VerifyDefaultChannelArgs(); - grpc::string key0("key0"); + std::string key0("key0"); grpc_arg arg0; arg0.type = GRPC_ARG_INTEGER; arg0.key = const_cast(key0.c_str()); arg0.value.integer = 0; - grpc::string key1("key1"); + std::string key1("key1"); grpc_arg arg1; arg1.type = GRPC_ARG_INTEGER; arg1.key = const_cast(key1.c_str()); arg1.value.integer = 1; - grpc::string arg_key0(key0); + std::string arg_key0(key0); channel_args_.SetInt(arg_key0, arg0.value.integer); // Clear key early to make sure channel_args takes a copy arg_key0.clear(); EXPECT_TRUE(HasArg(arg0)); - grpc::string arg_key1(key1); + std::string arg_key1(key1); channel_args_.SetInt(arg_key1, arg1.value.integer); arg_key1.clear(); EXPECT_TRUE(HasArg(arg0)); @@ -158,21 +158,21 @@ TEST_F(ChannelArgumentsTest, SetInt) { TEST_F(ChannelArgumentsTest, SetString) { VerifyDefaultChannelArgs(); - grpc::string key0("key0"); - grpc::string val0("val0"); + std::string key0("key0"); + std::string val0("val0"); grpc_arg arg0; arg0.type = GRPC_ARG_STRING; arg0.key = const_cast(key0.c_str()); arg0.value.string = const_cast(val0.c_str()); - grpc::string key1("key1"); - grpc::string val1("val1"); + std::string key1("key1"); + std::string val1("val1"); grpc_arg arg1; arg1.type = GRPC_ARG_STRING; arg1.key = const_cast(key1.c_str()); arg1.value.string = const_cast(val1.c_str()); - grpc::string key(key0); - grpc::string val(val0); + std::string key(key0); + std::string val(val0); channel_args_.SetString(key, val); // Clear key/val early to make sure channel_args takes a copy key = ""; @@ -191,14 +191,14 @@ TEST_F(ChannelArgumentsTest, SetString) { TEST_F(ChannelArgumentsTest, SetPointer) { VerifyDefaultChannelArgs(); - grpc::string key0("key0"); + std::string key0("key0"); grpc_arg arg0; arg0.type = GRPC_ARG_POINTER; arg0.key = const_cast(key0.c_str()); arg0.value.pointer.p = &key0; arg0.value.pointer.vtable = &pointer_vtable_; - grpc::string key(key0); + std::string key(key0); channel_args_.SetPointer(key, arg0.value.pointer.p); EXPECT_TRUE(HasArg(arg0)); } @@ -225,8 +225,8 @@ TEST_F(ChannelArgumentsTest, SetSocketMutator) { TEST_F(ChannelArgumentsTest, SetUserAgentPrefix) { VerifyDefaultChannelArgs(); - grpc::string prefix("prefix"); - grpc::string whole_prefix = prefix + " " + GetDefaultUserAgentPrefix(); + std::string prefix("prefix"); + std::string whole_prefix = prefix + " " + GetDefaultUserAgentPrefix(); grpc_arg arg0; arg0.type = GRPC_ARG_STRING; arg0.key = const_cast(GRPC_ARG_PRIMARY_USER_AGENT_STRING); @@ -243,7 +243,7 @@ TEST_F(ChannelArgumentsTest, SetUserAgentPrefix) { for (size_t i = 0; i < args.num_args; i++) { const grpc_arg& arg = args.args[i]; if (arg.type == GRPC_ARG_STRING && - grpc::string(arg.key) == GRPC_ARG_PRIMARY_USER_AGENT_STRING) { + std::string(arg.key) == GRPC_ARG_PRIMARY_USER_AGENT_STRING) { EXPECT_FALSE(found); EXPECT_EQ(0, strcmp(arg.value.string, arg0.value.string)); found = true; diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 1f1b2db855a..a91a0027afd 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -220,8 +220,8 @@ class ServerBuilderSyncPluginDisabler : public ::grpc::ServerBuilderOption { class TestScenario { public: - TestScenario(bool inproc_stub, const grpc::string& creds_type, bool hcs, - const grpc::string& content) + TestScenario(bool inproc_stub, const std::string& creds_type, bool hcs, + const std::string& content) : inproc(inproc_stub), health_check_service(hcs), credentials_type(creds_type), @@ -229,8 +229,8 @@ class TestScenario { void Log() const; bool inproc; bool health_check_service; - const grpc::string credentials_type; - const grpc::string message_content; + const std::string credentials_type; + const std::string message_content; }; static std::ostream& operator<<(std::ostream& out, @@ -927,9 +927,9 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) { grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); send_request.set_message(GetParam().message_content); - std::pair meta1("key1", "val1"); - std::pair meta2("key2", "val2"); - std::pair meta3("g.r.d-bin", "xyz"); + std::pair meta1("key1", "val1"); + std::pair meta2("key2", "val2"); + std::pair meta3("g.r.d-bin", "xyz"); cli_ctx.AddMetadata(meta1.first, meta1.second); cli_ctx.AddMetadata(meta2.first, meta2.second); cli_ctx.AddMetadata(meta3.first, meta3.second); @@ -973,8 +973,8 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataRpc) { grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); send_request.set_message(GetParam().message_content); - std::pair meta1("key1", "val1"); - std::pair meta2("key2", "val2"); + std::pair meta1("key1", "val1"); + std::pair meta2("key2", "val2"); std::unique_ptr> response_reader( stub_->AsyncEcho(&cli_ctx, send_request, cq_.get())); @@ -1016,8 +1016,8 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataServerStreaming) { ServerContext srv_ctx; ServerAsyncWriter srv_stream(&srv_ctx); - std::pair<::grpc::string, ::grpc::string> meta1("key1", "val1"); - std::pair<::grpc::string, ::grpc::string> meta2("key2", "val2"); + std::pair<::std::string, ::std::string> meta1("key1", "val1"); + std::pair<::std::string, ::std::string> meta2("key2", "val2"); std::unique_ptr> cli_stream( stub_->AsyncResponseStream(&cli_ctx, send_request, cq_.get(), tag(1))); @@ -1071,8 +1071,8 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataServerStreamingImplicit) { ServerAsyncWriter srv_stream(&srv_ctx); send_request.set_message(GetParam().message_content); - std::pair<::grpc::string, ::grpc::string> meta1("key1", "val1"); - std::pair<::grpc::string, ::grpc::string> meta2("key2", "val2"); + std::pair<::std::string, ::std::string> meta1("key1", "val1"); + std::pair<::std::string, ::std::string> meta2("key2", "val2"); std::unique_ptr> cli_stream( stub_->AsyncResponseStream(&cli_ctx, send_request, cq_.get(), tag(1))); @@ -1126,8 +1126,8 @@ TEST_P(AsyncEnd2endTest, ServerTrailingMetadataRpc) { grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); send_request.set_message(GetParam().message_content); - std::pair meta1("key1", "val1"); - std::pair meta2("key2", "val2"); + std::pair meta1("key1", "val1"); + std::pair meta2("key2", "val2"); std::unique_ptr> response_reader( stub_->AsyncEcho(&cli_ctx, send_request, cq_.get())); @@ -1171,19 +1171,19 @@ TEST_P(AsyncEnd2endTest, MetadataRpc) { grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); send_request.set_message(GetParam().message_content); - std::pair meta1("key1", "val1"); - std::pair meta2( + std::pair meta1("key1", "val1"); + std::pair meta2( "key2-bin", - grpc::string("\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc", 13)); - std::pair meta3("key3", "val3"); - std::pair meta6( + std::string("\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc", 13)); + std::pair meta3("key3", "val3"); + std::pair meta6( "key4-bin", - grpc::string("\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d", - 14)); - std::pair meta5("key5", "val5"); - std::pair meta4( + std::string("\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d", + 14)); + std::pair meta5("key5", "val5"); + std::pair meta4( "key6-bin", - grpc::string( + std::string( "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee", 15)); cli_ctx.AddMetadata(meta1.first, meta1.second); @@ -1403,7 +1403,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { EchoRequest send_request; // Client sends 3 messages (tags 3, 4 and 5) for (int tag_idx = 3; tag_idx <= 5; tag_idx++) { - send_request.set_message("Ping " + grpc::to_string(tag_idx)); + send_request.set_message("Ping " + std::to_string(tag_idx)); cli_stream->Write(send_request, tag(tag_idx)); Verifier() .Expect(tag_idx, expected_client_cq_result) @@ -1588,7 +1588,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Server sends three messages (tags 3, 4 and 5) // But if want_done tag is true, we might also see tag 11 for (int tag_idx = 3; tag_idx <= 5; tag_idx++) { - send_response.set_message("Pong " + grpc::to_string(tag_idx)); + send_response.set_message("Pong " + std::to_string(tag_idx)); srv_stream.Write(send_response, tag(tag_idx)); // Note that we'll add something to the verifier and verify that // something was seen, but it might be tag 11 and not what we @@ -1870,8 +1870,8 @@ TEST_P(AsyncEnd2endServerTryCancelTest, ServerBidiStreamingTryCancelAfter) { std::vector CreateTestScenarios(bool /*test_secure*/, bool test_message_size_limit) { std::vector scenarios; - std::vector credentials_types; - std::vector messages; + std::vector credentials_types; + std::vector messages; auto insec_ok = [] { // Only allow insecure credentials type when it is registered with the @@ -1893,7 +1893,7 @@ std::vector CreateTestScenarios(bool /*test_secure*/, if (test_message_size_limit) { for (size_t k = 1; k < GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH / 1024; k *= 32) { - grpc::string big_msg; + std::string big_msg; for (size_t i = 0; i < k * 1024; ++i) { char c = 'a' + (i % 26); big_msg += c; @@ -1905,7 +1905,7 @@ std::vector CreateTestScenarios(bool /*test_secure*/, // (causes timeouts) and doesn't really increase the signal from tests. // Reserve 100 bytes for other fields of the message proto. messages.push_back( - grpc::string(GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH - 100, 'a')); + std::string(GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH - 100, 'a')); #endif } diff --git a/test/cpp/end2end/cfstream_test.cc b/test/cpp/end2end/cfstream_test.cc index b87f2c35cbf..a69ee496501 100644 --- a/test/cpp/end2end/cfstream_test.cc +++ b/test/cpp/end2end/cfstream_test.cc @@ -60,10 +60,10 @@ namespace testing { namespace { struct TestScenario { - TestScenario(const grpc::string& creds_type, const grpc::string& content) + TestScenario(const std::string& creds_type, const std::string& content) : credentials_type(creds_type), message_content(content) {} - const grpc::string credentials_type; - const grpc::string message_content; + const std::string credentials_type; + const std::string message_content; }; class CFStreamTest : public ::testing::TestWithParam { @@ -244,16 +244,16 @@ class CFStreamTest : public ::testing::TestWithParam { private: struct ServerData { int port_; - const grpc::string creds_; + const std::string creds_; std::unique_ptr server_; TestServiceImpl service_; std::unique_ptr thread_; bool server_ready_ = false; - ServerData(int port, const grpc::string& creds) + ServerData(int port, const std::string& creds) : port_(port), creds_(creds) {} - void Start(const grpc::string& server_host) { + void Start(const std::string& server_host) { gpr_log(GPR_INFO, "starting server on port %d", port_); std::mutex mu; std::unique_lock lock(mu); @@ -265,7 +265,7 @@ class CFStreamTest : public ::testing::TestWithParam { gpr_log(GPR_INFO, "server startup complete"); } - void Serve(const grpc::string& server_host, std::mutex* mu, + void Serve(const std::string& server_host, std::mutex* mu, std::condition_variable* cond) { std::ostringstream server_address; server_address << server_host << ":" << port_; @@ -287,17 +287,17 @@ class CFStreamTest : public ::testing::TestWithParam { }; CompletionQueue cq_; - const grpc::string server_host_; - const grpc::string interface_; - const grpc::string ipv4_address_; + const std::string server_host_; + const std::string interface_; + const std::string ipv4_address_; std::unique_ptr server_; int port_; }; std::vector CreateTestScenarios() { std::vector scenarios; - std::vector credentials_types; - std::vector messages; + std::vector credentials_types; + std::vector messages; credentials_types.push_back(kInsecureCredentialsType); auto sec_list = GetCredentialsProvider()->GetSecureCredentialsTypeList(); @@ -307,7 +307,7 @@ std::vector CreateTestScenarios() { messages.push_back("🖖"); for (size_t k = 1; k < GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH / 1024; k *= 32) { - grpc::string big_msg; + std::string big_msg; for (size_t i = 0; i < k * 1024; ++i) { char c = 'a' + (i % 26); big_msg += c; diff --git a/test/cpp/end2end/channelz_service_test.cc b/test/cpp/end2end/channelz_service_test.cc index 325a6ef7094..1fe0921d963 100644 --- a/test/cpp/end2end/channelz_service_test.cc +++ b/test/cpp/end2end/channelz_service_test.cc @@ -118,7 +118,7 @@ class ChannelzServerTest : public ::testing::Test { // We set up a proxy server with channelz enabled. proxy_port_ = grpc_pick_unused_port_or_die(); ServerBuilder proxy_builder; - grpc::string proxy_server_address = "localhost:" + to_string(proxy_port_); + std::string proxy_server_address = "localhost:" + to_string(proxy_port_); proxy_builder.AddListeningPort(proxy_server_address, InsecureServerCredentials()); // forces channelz and channel tracing to be enabled. @@ -136,7 +136,7 @@ class ChannelzServerTest : public ::testing::Test { // create a new backend. backends_[i].port = grpc_pick_unused_port_or_die(); ServerBuilder backend_builder; - grpc::string backend_server_address = + std::string backend_server_address = "localhost:" + to_string(backends_[i].port); backend_builder.AddListeningPort(backend_server_address, InsecureServerCredentials()); diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index f9c2dbaca30..5387e5f0af9 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -65,7 +65,7 @@ enum class Protocol { INPROC, TCP }; class TestScenario { public: TestScenario(bool serve_callback, Protocol protocol, bool intercept, - const grpc::string& creds_type) + const std::string& creds_type) : callback_server(serve_callback), protocol(protocol), use_interceptors(intercept), @@ -74,7 +74,7 @@ class TestScenario { bool callback_server; Protocol protocol; bool use_interceptors; - const grpc::string credentials_type; + const std::string credentials_type; }; static std::ostream& operator<<(std::ostream& out, @@ -180,7 +180,7 @@ class ClientCallbackEnd2endTest } void SendRpcs(int num_rpcs, bool with_binary_metadata) { - grpc::string test_string(""); + std::string test_string(""); for (int i = 0; i < num_rpcs; i++) { EchoRequest request; EchoResponse response; @@ -188,12 +188,12 @@ class ClientCallbackEnd2endTest test_string += "Hello world. "; request.set_message(test_string); - grpc::string val; + std::string val; if (with_binary_metadata) { request.mutable_param()->set_echo_metadata(true); char bytes[8] = {'\0', '\1', '\2', '\3', '\4', '\5', '\6', static_cast(i)}; - val = grpc::string(bytes, 8); + val = std::string(bytes, 8); cli_ctx.AddMetadata("custom-bin", val); } @@ -228,7 +228,7 @@ class ClientCallbackEnd2endTest } void SendRpcsRawReq(int num_rpcs) { - grpc::string test_string("Hello raw world."); + std::string test_string("Hello raw world."); EchoRequest request; request.set_message(test_string); std::unique_ptr send_buf = SerializeToByteBuffer(&request); @@ -258,8 +258,8 @@ class ClientCallbackEnd2endTest } void SendRpcsGeneric(int num_rpcs, bool maybe_except) { - const grpc::string kMethodName("/grpc.testing.EchoTestService/Echo"); - grpc::string test_string(""); + const std::string kMethodName("/grpc.testing.EchoTestService/Echo"); + std::string test_string(""); for (int i = 0; i < num_rpcs; i++) { EchoRequest request; std::unique_ptr send_buf; @@ -300,15 +300,15 @@ class ClientCallbackEnd2endTest } void SendGenericEchoAsBidi(int num_rpcs, int reuses, bool do_writes_done) { - const grpc::string kMethodName("/grpc.testing.EchoTestService/Echo"); - grpc::string test_string(""); + const std::string kMethodName("/grpc.testing.EchoTestService/Echo"); + std::string test_string(""); for (int i = 0; i < num_rpcs; i++) { test_string += "Hello world. "; class Client : public grpc::experimental::ClientBidiReactor { public: - Client(ClientCallbackEnd2endTest* test, const grpc::string& method_name, - const grpc::string& test_str, int reuses, bool do_writes_done) + Client(ClientCallbackEnd2endTest* test, const std::string& method_name, + const std::string& test_str, int reuses, bool do_writes_done) : reuses_remaining_(reuses), do_writes_done_(do_writes_done) { activate_ = [this, test, method_name, test_str] { if (reuses_remaining_ > 0) { @@ -645,7 +645,7 @@ TEST_P(ClientCallbackEnd2endTest, RequestEchoServerCancel) { ClientContext context; request.set_message("hello"); context.AddMetadata(kServerTryCancelRequest, - grpc::to_string(CANCEL_BEFORE_PROCESSING)); + std::to_string(CANCEL_BEFORE_PROCESSING)); std::mutex mu; std::condition_variable cv; @@ -680,14 +680,14 @@ class WriteClient : public grpc::experimental::ClientWriteReactor { : server_try_cancel_(server_try_cancel), num_msgs_to_send_(num_msgs_to_send), client_cancel_{client_cancel} { - grpc::string msg{"Hello server."}; + std::string msg{"Hello server."}; for (int i = 0; i < num_msgs_to_send; i++) { desired_ += msg; } if (server_try_cancel != DO_NOT_CANCEL) { // Send server_try_cancel value in the client metadata context_.AddMetadata(kServerTryCancelRequest, - grpc::to_string(server_try_cancel)); + std::to_string(server_try_cancel)); } context_.set_initial_metadata_corked(true); stub->experimental_async()->RequestStream(&context_, &response_, this); @@ -761,7 +761,7 @@ class WriteClient : public grpc::experimental::ClientWriteReactor { const ServerTryCancelRequestPhase server_try_cancel_; int num_msgs_sent_{0}; const int num_msgs_to_send_; - grpc::string desired_; + std::string desired_; const ClientCancelInfo client_cancel_; std::mutex mu_; std::condition_variable cv_; @@ -889,10 +889,10 @@ TEST_P(ClientCallbackEnd2endTest, UnaryReactor) { TEST_P(ClientCallbackEnd2endTest, GenericUnaryReactor) { MAYBE_SKIP_TEST; ResetStub(); - const grpc::string kMethodName("/grpc.testing.EchoTestService/Echo"); + const std::string kMethodName("/grpc.testing.EchoTestService/Echo"); class UnaryClient : public grpc::experimental::ClientUnaryReactor { public: - UnaryClient(grpc::GenericStub* stub, const grpc::string& method_name) { + UnaryClient(grpc::GenericStub* stub, const std::string& method_name) { cli_ctx_.AddMetadata("key1", "val1"); cli_ctx_.AddMetadata("key2", "val2"); request_.mutable_param()->set_echo_metadata_initially(true); @@ -961,7 +961,7 @@ class ReadClient : public grpc::experimental::ClientReadReactor { if (server_try_cancel_ != DO_NOT_CANCEL) { // Send server_try_cancel value in the client metadata context_.AddMetadata(kServerTryCancelRequest, - grpc::to_string(server_try_cancel)); + std::to_string(server_try_cancel)); } request_.set_message("Hello client "); stub->experimental_async()->ResponseStream(&context_, &request_, this); @@ -982,7 +982,7 @@ class ReadClient : public grpc::experimental::ClientReadReactor { } else { EXPECT_LE(reads_complete_, kServerDefaultResponseStreamsToSend); EXPECT_EQ(response_.message(), - request_.message() + grpc::to_string(reads_complete_)); + request_.message() + std::to_string(reads_complete_)); reads_complete_++; if (client_cancel_.cancel && reads_complete_ == client_cancel_.ops_before_cancel) { @@ -1122,7 +1122,7 @@ class BidiClient if (server_try_cancel_ != DO_NOT_CANCEL) { // Send server_try_cancel value in the client metadata context_.AddMetadata(kServerTryCancelRequest, - grpc::to_string(server_try_cancel)); + std::to_string(server_try_cancel)); } request_.set_message("Hello fren "); context_.set_initial_metadata_corked(cork_metadata); @@ -1542,7 +1542,7 @@ std::vector CreateTestScenarios(bool test_insecure) { #endif std::vector scenarios; - std::vector credentials_types{ + std::vector credentials_types{ GetCredentialsProvider()->GetSecureCredentialsTypeList()}; auto insec_ok = [] { // Only allow insecure credentials type when it is registered with the diff --git a/test/cpp/end2end/client_interceptors_end2end_test.cc b/test/cpp/end2end/client_interceptors_end2end_test.cc index 86012a34586..58d9c2a8bb2 100644 --- a/test/cpp/end2end/client_interceptors_end2end_test.cc +++ b/test/cpp/end2end/client_interceptors_end2end_test.cc @@ -267,7 +267,7 @@ class HijackingInterceptorMakesAnotherCall : public experimental::Interceptor { private: experimental::ClientRpcInfo* info_; - std::multimap metadata_map_; + std::multimap metadata_map_; ClientContext ctx_; EchoRequest req_; EchoResponse resp_; @@ -349,7 +349,7 @@ class BidiStreamingRpcHijackingInterceptor : public experimental::Interceptor { private: experimental::ClientRpcInfo* info_; - grpc::string msg; + std::string msg; }; class ClientStreamingRpcHijackingInterceptor diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index e6c28800931..174c09cd79d 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -125,7 +125,7 @@ class MyTestServiceImpl : public TestServiceImpl { request_count_ = 0; } - std::set clients() { + std::set clients() { grpc::internal::MutexLock lock(&clients_mu_); return clients_; } @@ -136,7 +136,7 @@ class MyTestServiceImpl : public TestServiceImpl { } private: - void AddClient(const grpc::string& client) { + void AddClient(const std::string& client) { grpc::internal::MutexLock lock(&clients_mu_); clients_.insert(client); } @@ -145,7 +145,7 @@ class MyTestServiceImpl : public TestServiceImpl { int request_count_ = 0; const udpa::data::orca::v1::OrcaLoadReport* load_report_ = nullptr; grpc::internal::Mutex clients_mu_; - std::set clients_; + std::set clients_; }; class FakeResolverResponseGeneratorWrapper { @@ -276,7 +276,7 @@ class ClientLbEnd2endTest : public ::testing::Test { } std::shared_ptr BuildChannel( - const grpc::string& lb_policy_name, + const std::string& lb_policy_name, const FakeResolverResponseGeneratorWrapper& response_generator, ChannelArguments args = ChannelArguments()) { if (lb_policy_name.size() > 0) { @@ -338,7 +338,7 @@ class ClientLbEnd2endTest : public ::testing::Test { port_ = port > 0 ? port : grpc_pick_unused_port_or_die(); } - void Start(const grpc::string& server_host) { + void Start(const std::string& server_host) { gpr_log(GPR_INFO, "starting server on port %d", port_); started_ = true; grpc::internal::Mutex mu; @@ -351,7 +351,7 @@ class ClientLbEnd2endTest : public ::testing::Test { gpr_log(GPR_INFO, "server startup complete"); } - void Serve(const grpc::string& server_host, grpc::internal::Mutex* mu, + void Serve(const std::string& server_host, grpc::internal::Mutex* mu, grpc::internal::CondVar* cond) { std::ostringstream server_address; server_address << server_host << ":" << port_; @@ -373,7 +373,7 @@ class ClientLbEnd2endTest : public ::testing::Test { started_ = false; } - void SetServingStatus(const grpc::string& service, bool serving) { + void SetServingStatus(const std::string& service, bool serving) { server_->GetHealthCheckService()->SetServingStatus(service, serving); } }; @@ -448,9 +448,9 @@ class ClientLbEnd2endTest : public ::testing::Test { } } - const grpc::string server_host_; + const std::string server_host_; std::vector> servers_; - const grpc::string kRequestMessage_; + const std::string kRequestMessage_; std::shared_ptr creds_; }; diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 79b5f4bbcc1..f157d20cc6f 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -77,10 +77,10 @@ namespace grpc { namespace testing { namespace { -bool CheckIsLocalhost(const grpc::string& addr) { - const grpc::string kIpv6("ipv6:[::1]:"); - const grpc::string kIpv4MappedIpv6("ipv6:[::ffff:127.0.0.1]:"); - const grpc::string kIpv4("ipv4:127.0.0.1:"); +bool CheckIsLocalhost(const std::string& addr) { + const std::string kIpv6("ipv6:[::1]:"); + const std::string kIpv4MappedIpv6("ipv6:[::ffff:127.0.0.1]:"); + const std::string kIpv4("ipv4:127.0.0.1:"); return addr.substr(0, kIpv4.size()) == kIpv4 || addr.substr(0, kIpv4MappedIpv6.size()) == kIpv4MappedIpv6 || addr.substr(0, kIpv6.size()) == kIpv6; @@ -162,7 +162,7 @@ class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin { Status GetMetadata( grpc::string_ref service_url, grpc::string_ref method_name, const grpc::AuthContext& channel_auth_context, - std::multimap* metadata) override { + std::multimap* metadata) override { if (delay_ms_ != 0) { gpr_sleep_until( gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), @@ -180,14 +180,14 @@ class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin { } } - grpc::string DebugString() override { + std::string DebugString() override { return absl::StrFormat("TestMetadataCredentials{key:%s,value:%s}", metadata_key_.c_str(), metadata_value_.c_str()); } private: - grpc::string metadata_key_; - grpc::string metadata_value_; + std::string metadata_key_; + std::string metadata_value_; bool is_blocking_; bool is_successful_; int delay_ms_; @@ -284,7 +284,7 @@ class TestServiceImplDupPkg class TestScenario { public: TestScenario(bool interceptors, bool proxy, bool inproc_stub, - const grpc::string& creds_type, bool use_callback_server) + const std::string& creds_type, bool use_callback_server) : use_interceptors(interceptors), use_proxy(proxy), inproc(inproc_stub), @@ -294,7 +294,7 @@ class TestScenario { bool use_interceptors; bool use_proxy; bool inproc; - const grpc::string credentials_type; + const std::string credentials_type; bool callback_server; }; @@ -482,7 +482,7 @@ class End2endTest : public ::testing::TestWithParam { CallbackTestServiceImpl callback_service_; TestServiceImpl special_service_; TestServiceImplDupPkg dup_pkg_service_; - grpc::string user_agent_prefix_; + std::string user_agent_prefix_; int first_picked_port_; }; @@ -497,7 +497,7 @@ static void SendRpc(grpc::testing::EchoTestService::Stub* stub, int num_rpcs, if (with_binary_metadata) { char bytes[8] = {'\0', '\1', '\2', '\3', '\4', '\5', '\6', static_cast(i)}; - context.AddMetadata("custom-bin", grpc::string(bytes, 8)); + context.AddMetadata("custom-bin", std::string(bytes, 8)); } context.set_compression_algorithm(GRPC_COMPRESS_GZIP); Status s = stub->Echo(&context, request, &response); @@ -534,7 +534,7 @@ class End2endServerTryCancelTest : public End2endTest { // Send server_try_cancel value in the client metadata context.AddMetadata(kServerTryCancelRequest, - grpc::to_string(server_try_cancel)); + std::to_string(server_try_cancel)); auto stream = stub_->RequestStream(&context, &response); @@ -613,7 +613,7 @@ class End2endServerTryCancelTest : public End2endTest { // Send server_try_cancel in the client metadata context.AddMetadata(kServerTryCancelRequest, - grpc::to_string(server_try_cancel)); + std::to_string(server_try_cancel)); request.set_message("hello"); auto stream = stub_->ResponseStream(&context, request); @@ -624,7 +624,7 @@ class End2endServerTryCancelTest : public End2endTest { break; } EXPECT_EQ(response.message(), - request.message() + grpc::to_string(num_msgs_read)); + request.message() + std::to_string(num_msgs_read)); num_msgs_read++; } gpr_log(GPR_INFO, "Read %d messages", num_msgs_read); @@ -695,14 +695,14 @@ class End2endServerTryCancelTest : public End2endTest { // Send server_try_cancel in the client metadata context.AddMetadata(kServerTryCancelRequest, - grpc::to_string(server_try_cancel)); + std::to_string(server_try_cancel)); auto stream = stub_->BidiStream(&context); int num_msgs_read = 0; int num_msgs_sent = 0; while (num_msgs_sent < num_messages) { - request.set_message("hello " + grpc::to_string(num_msgs_sent)); + request.set_message("hello " + std::to_string(num_msgs_sent)); if (!stream->Write(request)) { break; } @@ -769,7 +769,7 @@ TEST_P(End2endServerTryCancelTest, RequestEchoServerCancel) { ClientContext context; context.AddMetadata(kServerTryCancelRequest, - grpc::to_string(CANCEL_BEFORE_PROCESSING)); + std::to_string(CANCEL_BEFORE_PROCESSING)); Status s = stub_->Echo(&context, request, &response); EXPECT_FALSE(s.ok()); EXPECT_EQ(grpc::StatusCode::CANCELLED, s.error_code()); @@ -844,7 +844,7 @@ TEST_P(End2endTest, SimpleRpcWithCustomUserAgentPrefix) { const auto& trailing_metadata = context.GetServerTrailingMetadata(); auto iter = trailing_metadata.find("user-agent"); EXPECT_TRUE(iter != trailing_metadata.end()); - grpc::string expected_prefix = user_agent_prefix_ + " grpc-c++/"; + std::string expected_prefix = user_agent_prefix_ + " grpc-c++/"; EXPECT_TRUE(iter->second.starts_with(expected_prefix)) << iter->second; } @@ -1023,7 +1023,7 @@ TEST_P(End2endTest, ResponseStream) { auto stream = stub_->ResponseStream(&context, request); for (int i = 0; i < kServerDefaultResponseStreamsToSend; ++i) { EXPECT_TRUE(stream->Read(&response)); - EXPECT_EQ(response.message(), request.message() + grpc::to_string(i)); + EXPECT_EQ(response.message(), request.message() + std::to_string(i)); } EXPECT_FALSE(stream->Read(&response)); @@ -1043,7 +1043,7 @@ TEST_P(End2endTest, ResponseStreamWithCoalescingApi) { auto stream = stub_->ResponseStream(&context, request); for (int i = 0; i < kServerDefaultResponseStreamsToSend; ++i) { EXPECT_TRUE(stream->Read(&response)); - EXPECT_EQ(response.message(), request.message() + grpc::to_string(i)); + EXPECT_EQ(response.message(), request.message() + std::to_string(i)); } EXPECT_FALSE(stream->Read(&response)); @@ -1081,12 +1081,12 @@ TEST_P(End2endTest, BidiStream) { EchoRequest request; EchoResponse response; ClientContext context; - grpc::string msg("hello"); + std::string msg("hello"); auto stream = stub_->BidiStream(&context); for (int i = 0; i < kServerDefaultResponseStreamsToSend; ++i) { - request.set_message(msg + grpc::to_string(i)); + request.set_message(msg + std::to_string(i)); EXPECT_TRUE(stream->Write(request)); EXPECT_TRUE(stream->Read(&response)); EXPECT_EQ(response.message(), request.message()); @@ -1108,7 +1108,7 @@ TEST_P(End2endTest, BidiStreamWithCoalescingApi) { ClientContext context; context.AddMetadata(kServerFinishAfterNReads, "3"); context.set_initial_metadata_corked(true); - grpc::string msg("hello"); + std::string msg("hello"); auto stream = stub_->BidiStream(&context); @@ -1144,7 +1144,7 @@ TEST_P(End2endTest, BidiStreamWithEverythingCoalesced) { ClientContext context; context.AddMetadata(kServerFinishAfterNReads, "1"); context.set_initial_metadata_corked(true); - grpc::string msg("hello"); + std::string msg("hello"); auto stream = stub_->BidiStream(&context); @@ -1310,7 +1310,7 @@ TEST_P(End2endTest, ClientCancelsBidi) { EchoRequest request; EchoResponse response; ClientContext context; - grpc::string msg("hello"); + std::string msg("hello"); auto stream = stub_->BidiStream(&context); @@ -1460,7 +1460,7 @@ TEST_P(End2endTest, BinaryTrailerTest) { info->add_stack_entries("stack_entry_2"); info->add_stack_entries("stack_entry_3"); info->set_detail("detailed debug info"); - grpc::string expected_string = info->SerializeAsString(); + std::string expected_string = info->SerializeAsString(); request.set_message("Hello"); Status s = stub_->Echo(&context, request, &response); @@ -1774,7 +1774,7 @@ TEST_P(SecureEnd2endTest, SimpleRpcWithHost) { bool MetadataContains( const std::multimap& metadata, - const grpc::string& key, const grpc::string& value) { + const std::string& key, const std::string& value) { int count = 0; for (std::multimap::const_iterator iter = @@ -1810,7 +1810,7 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorSuccess) { // Metadata should have been consumed by the processor. EXPECT_FALSE(MetadataContains( context.GetServerTrailingMetadata(), GRPC_AUTHORIZATION_METADATA_KEY, - grpc::string("Bearer ") + TestAuthMetadataProcessor::kGoodGuy)); + std::string("Bearer ") + TestAuthMetadataProcessor::kGoodGuy)); } TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorFailure) { @@ -2097,7 +2097,7 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginFailure) { EXPECT_FALSE(s.ok()); EXPECT_EQ(s.error_code(), StatusCode::UNAVAILABLE); EXPECT_EQ(s.error_message(), - grpc::string("Getting metadata from plugin failed with error: ") + + std::string("Getting metadata from plugin failed with error: ") + kTestCredsPluginErrorMsg); EXPECT_EQ(context.credentials()->DebugString(), kExpectedNonBlockingAuthMetadataPluginFailureCredsDebugString); @@ -2126,7 +2126,7 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorSuccess) { // Metadata should have been consumed by the processor. EXPECT_FALSE(MetadataContains( context.GetServerTrailingMetadata(), GRPC_AUTHORIZATION_METADATA_KEY, - grpc::string("Bearer ") + TestAuthMetadataProcessor::kGoodGuy)); + std::string("Bearer ") + TestAuthMetadataProcessor::kGoodGuy)); EXPECT_EQ( context.credentials()->DebugString(), kExpectedNonBlockingAuthMetadataPluginAndProcessorSuccessCredsDebugString); @@ -2169,7 +2169,7 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) { EXPECT_FALSE(s.ok()); EXPECT_EQ(s.error_code(), StatusCode::UNAVAILABLE); EXPECT_EQ(s.error_message(), - grpc::string("Getting metadata from plugin failed with error: ") + + std::string("Getting metadata from plugin failed with error: ") + kTestCredsPluginErrorMsg); EXPECT_EQ(context.credentials()->DebugString(), kExpectedBlockingAuthMetadataPluginFailureCredsDebugString); @@ -2274,7 +2274,7 @@ std::vector CreateTestScenarios(bool use_proxy, bool test_inproc, bool test_callback_server) { std::vector scenarios; - std::vector credentials_types; + std::vector credentials_types; GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, kClientChannelBackupPollIntervalMs); diff --git a/test/cpp/end2end/filter_end2end_test.cc b/test/cpp/end2end/filter_end2end_test.cc index 91300268e78..04421d2765e 100644 --- a/test/cpp/end2end/filter_end2end_test.cc +++ b/test/cpp/end2end/filter_end2end_test.cc @@ -170,7 +170,7 @@ class FilterEnd2endTest : public ::testing::Test { void client_fail(int i) { verify_ok(&cli_cq_, i, false); } void SendRpc(int num_rpcs) { - const grpc::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); + const std::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); for (int i = 0; i < num_rpcs; i++) { EchoRequest send_request; EchoRequest recv_request; @@ -237,7 +237,7 @@ class FilterEnd2endTest : public ::testing::Test { std::unique_ptr generic_stub_; std::unique_ptr server_; AsyncGenericService generic_service_; - const grpc::string server_host_; + const std::string server_host_; std::ostringstream server_address_; }; @@ -265,7 +265,7 @@ TEST_F(FilterEnd2endTest, SimpleBidiStreaming) { EXPECT_EQ(0, GetConnectionCounterValue()); EXPECT_EQ(0, GetCallCounterValue()); - const grpc::string kMethodName( + const std::string kMethodName( "/grpc.cpp.test.util.EchoTestService/BidiStream"); EchoRequest send_request; EchoRequest recv_request; diff --git a/test/cpp/end2end/flaky_network_test.cc b/test/cpp/end2end/flaky_network_test.cc index 93c41e55fa9..ec8a0b8194d 100644 --- a/test/cpp/end2end/flaky_network_test.cc +++ b/test/cpp/end2end/flaky_network_test.cc @@ -56,10 +56,10 @@ namespace testing { namespace { struct TestScenario { - TestScenario(const grpc::string& creds_type, const grpc::string& content) + TestScenario(const std::string& creds_type, const std::string& content) : credentials_type(creds_type), message_content(content) {} - const grpc::string credentials_type; - const grpc::string message_content; + const std::string credentials_type; + const std::string message_content; }; class FlakyNetworkTest : public ::testing::TestWithParam { @@ -191,7 +191,7 @@ class FlakyNetworkTest : public ::testing::TestWithParam { } std::shared_ptr BuildChannel( - const grpc::string& lb_policy_name, + const std::string& lb_policy_name, ChannelArguments args = ChannelArguments()) { if (lb_policy_name.size() > 0) { args.SetLoadBalancingPolicyName(lb_policy_name); @@ -243,16 +243,16 @@ class FlakyNetworkTest : public ::testing::TestWithParam { struct ServerData { int port_; - const grpc::string creds_; + const std::string creds_; std::unique_ptr server_; TestServiceImpl service_; std::unique_ptr thread_; bool server_ready_ = false; - ServerData(int port, const grpc::string& creds) + ServerData(int port, const std::string& creds) : port_(port), creds_(creds) {} - void Start(const grpc::string& server_host) { + void Start(const std::string& server_host) { gpr_log(GPR_INFO, "starting server on port %d", port_); std::mutex mu; std::unique_lock lock(mu); @@ -264,7 +264,7 @@ class FlakyNetworkTest : public ::testing::TestWithParam { gpr_log(GPR_INFO, "server startup complete"); } - void Serve(const grpc::string& server_host, std::mutex* mu, + void Serve(const std::string& server_host, std::mutex* mu, std::condition_variable* cond) { std::ostringstream server_address; server_address << server_host << ":" << port_; @@ -308,10 +308,10 @@ class FlakyNetworkTest : public ::testing::TestWithParam { } private: - const grpc::string server_host_; - const grpc::string interface_; - const grpc::string ipv4_address_; - const grpc::string netmask_; + const std::string server_host_; + const std::string interface_; + const std::string ipv4_address_; + const std::string netmask_; std::unique_ptr stub_; std::unique_ptr server_; const int SERVER_PORT = 32750; @@ -320,8 +320,8 @@ class FlakyNetworkTest : public ::testing::TestWithParam { std::vector CreateTestScenarios() { std::vector scenarios; - std::vector credentials_types; - std::vector messages; + std::vector credentials_types; + std::vector messages; credentials_types.push_back(kInsecureCredentialsType); auto sec_list = GetCredentialsProvider()->GetSecureCredentialsTypeList(); @@ -331,7 +331,7 @@ std::vector CreateTestScenarios() { messages.push_back("🖖"); for (size_t k = 1; k < GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH / 1024; k *= 32) { - grpc::string big_msg; + std::string big_msg; for (size_t i = 0; i < k * 1024; ++i) { char c = 'a' + (i % 26); big_msg += c; diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index 5b65b407d31..60ea51875b1 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -111,7 +111,7 @@ class GenericEnd2endTest : public ::testing::Test { } void SendRpc(int num_rpcs, bool check_deadline, gpr_timespec deadline) { - const grpc::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); + const std::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); for (int i = 0; i < num_rpcs; i++) { EchoRequest send_request; EchoRequest recv_request; @@ -133,7 +133,7 @@ class GenericEnd2endTest : public ::testing::Test { // Rather than using the original kMethodName, make a short-lived // copy to also confirm that we don't refer to this object beyond // the initial call preparation - const grpc::string* method_name = new grpc::string(kMethodName); + const std::string* method_name = new std::string(kMethodName); std::unique_ptr call = generic_stub_->PrepareCall(&cli_ctx, *method_name, &cli_cq_); @@ -245,7 +245,7 @@ class GenericEnd2endTest : public ::testing::Test { std::unique_ptr generic_stub_; std::unique_ptr server_; AsyncGenericService generic_service_; - const grpc::string server_host_; + const std::string server_host_; std::ostringstream server_address_; bool shutting_down_; bool shut_down_; @@ -265,7 +265,7 @@ TEST_F(GenericEnd2endTest, SequentialRpcs) { TEST_F(GenericEnd2endTest, SequentialUnaryRpcs) { ResetStub(); const int num_rpcs = 10; - const grpc::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); + const std::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); for (int i = 0; i < num_rpcs; i++) { EchoRequest send_request; EchoRequest recv_request; @@ -324,7 +324,7 @@ TEST_F(GenericEnd2endTest, SequentialUnaryRpcs) { TEST_F(GenericEnd2endTest, SimpleBidiStreaming) { ResetStub(); - const grpc::string kMethodName( + const std::string kMethodName( "/grpc.cpp.test.util.EchoTestService/BidiStream"); EchoRequest send_request; EchoRequest recv_request; diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index ac727688ca5..a6a7d3697b6 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -158,26 +158,26 @@ class BackendServiceImpl : public BackendService { void Shutdown() {} - std::set clients() { + std::set clients() { grpc::internal::MutexLock lock(&clients_mu_); return clients_; } private: - void AddClient(const grpc::string& client) { + void AddClient(const std::string& client) { grpc::internal::MutexLock lock(&clients_mu_); clients_.insert(client); } grpc::internal::Mutex mu_; grpc::internal::Mutex clients_mu_; - std::set clients_; + std::set clients_; }; -grpc::string Ip4ToPackedString(const char* ip_str) { +std::string Ip4ToPackedString(const char* ip_str) { struct in_addr ip4; GPR_ASSERT(inet_pton(AF_INET, ip_str, &ip4) == 1); - return grpc::string(reinterpret_cast(&ip4), sizeof(ip4)); + return std::string(reinterpret_cast(&ip4), sizeof(ip4)); } struct ClientStats { @@ -185,7 +185,7 @@ struct ClientStats { size_t num_calls_finished = 0; size_t num_calls_finished_with_client_failed_to_send = 0; size_t num_calls_finished_known_received = 0; - std::map drop_token_counts; + std::map drop_token_counts; ClientStats& operator+=(const ClientStats& other) { num_calls_started += other.num_calls_started; @@ -314,7 +314,7 @@ class BalancerServiceImpl : public BalancerService { static LoadBalanceResponse BuildResponseForBackends( const std::vector& backend_ports, - const std::map& drop_token_counts) { + const std::map& drop_token_counts) { LoadBalanceResponse response; for (const auto& drop_token_count : drop_token_counts) { for (size_t i = 0; i < drop_token_count.second; ++i) { @@ -439,7 +439,7 @@ class GrpclbEnd2endTest : public ::testing::Test { void ShutdownBackend(size_t index) { backends_[index]->Shutdown(); } void ResetStub(int fallback_timeout = 0, - const grpc::string& expected_targets = "") { + const std::string& expected_targets = "") { ChannelArguments args; if (fallback_timeout > 0) args.SetGrpclbFallbackTimeout(fallback_timeout); args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR, @@ -530,7 +530,7 @@ class GrpclbEnd2endTest : public ::testing::Test { struct AddressData { int port; - grpc::string balancer_name; + std::string balancer_name; }; static grpc_core::ServerAddressList CreateLbAddressesFromAddressDataList( @@ -656,12 +656,12 @@ class GrpclbEnd2endTest : public ::testing::Test { template struct ServerThread { template - explicit ServerThread(const grpc::string& type, Args&&... args) + explicit ServerThread(const std::string& type, Args&&... args) : port_(grpc_pick_unused_port_or_die()), type_(type), service_(std::forward(args)...) {} - void Start(const grpc::string& server_host) { + void Start(const std::string& server_host) { gpr_log(GPR_INFO, "starting %s server on port %d", type_.c_str(), port_); GPR_ASSERT(!running_); running_ = true; @@ -677,7 +677,7 @@ class GrpclbEnd2endTest : public ::testing::Test { gpr_log(GPR_INFO, "%s server startup complete", type_.c_str()); } - void Serve(const grpc::string& server_host, grpc::internal::Mutex* mu, + void Serve(const std::string& server_host, grpc::internal::Mutex* mu, grpc::internal::CondVar* cond) { // We need to acquire the lock here in order to prevent the notify_one // below from firing before its corresponding wait is executed. @@ -704,14 +704,14 @@ class GrpclbEnd2endTest : public ::testing::Test { } const int port_; - grpc::string type_; + std::string type_; T service_; std::unique_ptr server_; std::unique_ptr thread_; bool running_ = false; }; - const grpc::string server_host_; + const std::string server_host_; const size_t num_backends_; const size_t num_balancers_; const int client_load_reporting_interval_seconds_; @@ -721,8 +721,8 @@ class GrpclbEnd2endTest : public ::testing::Test { std::vector>> balancers_; grpc_core::RefCountedPtr response_generator_; - const grpc::string kRequestMessage_ = "Live long and prosper."; - const grpc::string kApplicationTargetName_ = "application_target_name"; + const std::string kRequestMessage_ = "Live long and prosper."; + const std::string kApplicationTargetName_ = "application_target_name"; }; class SingleBalancerTest : public GrpclbEnd2endTest { diff --git a/test/cpp/end2end/health_service_end2end_test.cc b/test/cpp/end2end/health_service_end2end_test.cc index 13d5ea55c15..c36a7cd607e 100644 --- a/test/cpp/end2end/health_service_end2end_test.cc +++ b/test/cpp/end2end/health_service_end2end_test.cc @@ -59,7 +59,7 @@ class CustomHealthCheckService : public HealthCheckServiceInterface { : impl_(impl) { impl_->SetStatus("", HealthCheckResponse::SERVING); } - void SetServingStatus(const grpc::string& service_name, + void SetServingStatus(const std::string& service_name, bool serving) override { impl_->SetStatus(service_name, serving ? HealthCheckResponse::SERVING : HealthCheckResponse::NOT_SERVING); @@ -130,7 +130,7 @@ class HealthServiceEnd2endTest : public ::testing::Test { } // When the expected_status is NOT OK, we do not care about the response. - void SendHealthCheckRpc(const grpc::string& service_name, + void SendHealthCheckRpc(const std::string& service_name, const Status& expected_status) { EXPECT_FALSE(expected_status.ok()); SendHealthCheckRpc(service_name, expected_status, @@ -138,7 +138,7 @@ class HealthServiceEnd2endTest : public ::testing::Test { } void SendHealthCheckRpc( - const grpc::string& service_name, const Status& expected_status, + const std::string& service_name, const Status& expected_status, HealthCheckResponse::ServingStatus expected_serving_status) { HealthCheckRequest request; request.set_service(service_name); @@ -154,9 +154,9 @@ class HealthServiceEnd2endTest : public ::testing::Test { void VerifyHealthCheckService() { HealthCheckServiceInterface* service = server_->GetHealthCheckService(); EXPECT_TRUE(service != nullptr); - const grpc::string kHealthyService("healthy_service"); - const grpc::string kUnhealthyService("unhealthy_service"); - const grpc::string kNotRegisteredService("not_registered"); + const std::string kHealthyService("healthy_service"); + const std::string kUnhealthyService("unhealthy_service"); + const std::string kNotRegisteredService("not_registered"); service->SetServingStatus(kHealthyService, true); service->SetServingStatus(kUnhealthyService, false); @@ -181,7 +181,7 @@ class HealthServiceEnd2endTest : public ::testing::Test { } void VerifyHealthCheckServiceStreaming() { - const grpc::string kServiceName("service_name"); + const std::string kServiceName("service_name"); HealthCheckServiceInterface* service = server_->GetHealthCheckService(); // Start Watch for service. ClientContext context; @@ -217,10 +217,10 @@ class HealthServiceEnd2endTest : public ::testing::Test { void VerifyHealthCheckServiceShutdown() { HealthCheckServiceInterface* service = server_->GetHealthCheckService(); EXPECT_TRUE(service != nullptr); - const grpc::string kHealthyService("healthy_service"); - const grpc::string kUnhealthyService("unhealthy_service"); - const grpc::string kNotRegisteredService("not_registered"); - const grpc::string kNewService("add_after_shutdown"); + const std::string kHealthyService("healthy_service"); + const std::string kUnhealthyService("unhealthy_service"); + const std::string kNotRegisteredService("not_registered"); + const std::string kNewService("add_after_shutdown"); service->SetServingStatus(kHealthyService, true); service->SetServingStatus(kUnhealthyService, false); @@ -305,7 +305,7 @@ TEST_F(HealthServiceEnd2endTest, DefaultHealthService) { VerifyHealthCheckServiceStreaming(); // The default service has a size limit of the service name. - const grpc::string kTooLongServiceName(201, 'x'); + const std::string kTooLongServiceName(201, 'x'); SendHealthCheckRpc(kTooLongServiceName, Status(StatusCode::INVALID_ARGUMENT, "")); } diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 392f324f0c7..9656e71293d 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -354,7 +354,7 @@ class HybridEnd2endTest : public ::testing::TestWithParam { void SendSimpleClientStreaming() { EchoRequest send_request; EchoResponse recv_response; - grpc::string expected_message; + std::string expected_message; ClientContext cli_ctx; cli_ctx.set_wait_for_ready(true); send_request.set_message("Hello"); @@ -417,7 +417,7 @@ class HybridEnd2endTest : public ::testing::TestWithParam { EchoResponse response; ClientContext context; context.set_wait_for_ready(true); - grpc::string msg("hello"); + std::string msg("hello"); auto stream = stub_->BidiStream(&context); @@ -661,7 +661,7 @@ class SplitResponseStreamDupPkg gpr_log(GPR_INFO, "Split Streamed Next Message Size is %u", next_msg_sz); GPR_ASSERT(stream->Read(&req)); for (int i = 0; i < kServerDefaultResponseStreamsToSend; i++) { - resp.set_message(req.message() + grpc::to_string(i) + "_dup"); + resp.set_message(req.message() + std::to_string(i) + "_dup"); GPR_ASSERT(stream->Write(resp)); } return Status::OK; @@ -701,7 +701,7 @@ class FullySplitStreamedDupPkg gpr_log(GPR_INFO, "Split Streamed Next Message Size is %u", next_msg_sz); GPR_ASSERT(stream->Read(&req)); for (int i = 0; i < kServerDefaultResponseStreamsToSend; i++) { - resp.set_message(req.message() + grpc::to_string(i) + "_dup"); + resp.set_message(req.message() + std::to_string(i) + "_dup"); GPR_ASSERT(stream->Write(resp)); } return Status::OK; @@ -753,7 +753,7 @@ class FullyStreamedDupPkg : public duplicate::EchoTestService::StreamedService { gpr_log(GPR_INFO, "Split Streamed Next Message Size is %u", next_msg_sz); GPR_ASSERT(stream->Read(&req)); for (int i = 0; i < kServerDefaultResponseStreamsToSend; i++) { - resp.set_message(req.message() + grpc::to_string(i) + "_dup"); + resp.set_message(req.message() + std::to_string(i) + "_dup"); GPR_ASSERT(stream->Write(resp)); } return Status::OK; diff --git a/test/cpp/end2end/interceptors_util.cc b/test/cpp/end2end/interceptors_util.cc index 7d74a48db62..96295fb9ae2 100644 --- a/test/cpp/end2end/interceptors_util.cc +++ b/test/cpp/end2end/interceptors_util.cc @@ -185,7 +185,7 @@ bool CheckMetadata(const std::multimap& map, return false; } -bool CheckMetadata(const std::multimap& map, +bool CheckMetadata(const std::multimap& map, const string& key, const string& value) { for (const auto& pair : map) { if (pair.first == key && pair.second == value) { diff --git a/test/cpp/end2end/interceptors_util.h b/test/cpp/end2end/interceptors_util.h index 2aafea2d54e..4eafcea2670 100644 --- a/test/cpp/end2end/interceptors_util.h +++ b/test/cpp/end2end/interceptors_util.h @@ -185,7 +185,7 @@ void MakeCallbackCall(const std::shared_ptr& channel); bool CheckMetadata(const std::multimap& map, const string& key, const string& value); -bool CheckMetadata(const std::multimap& map, +bool CheckMetadata(const std::multimap& map, const string& key, const string& value); std::vector> diff --git a/test/cpp/end2end/message_allocator_end2end_test.cc b/test/cpp/end2end/message_allocator_end2end_test.cc index 312f182bdbf..3cae255d43e 100644 --- a/test/cpp/end2end/message_allocator_end2end_test.cc +++ b/test/cpp/end2end/message_allocator_end2end_test.cc @@ -93,11 +93,11 @@ enum class Protocol { INPROC, TCP }; class TestScenario { public: - TestScenario(Protocol protocol, const grpc::string& creds_type) + TestScenario(Protocol protocol, const std::string& creds_type) : protocol(protocol), credentials_type(creds_type) {} void Log() const; Protocol protocol; - const grpc::string credentials_type; + const std::string credentials_type; }; static std::ostream& operator<<(std::ostream& out, @@ -174,15 +174,15 @@ class MessageAllocatorEnd2endTestBase } void SendRpcs(int num_rpcs) { - grpc::string test_string(""); + std::string test_string(""); for (int i = 0; i < num_rpcs; i++) { EchoRequest request; EchoResponse response; ClientContext cli_ctx; - test_string += grpc::string(1024, 'x'); + test_string += std::string(1024, 'x'); request.set_message(test_string); - grpc::string val; + std::string val; cli_ctx.set_compression_algorithm(GRPC_COMPRESS_GZIP); std::mutex mu; @@ -376,7 +376,7 @@ TEST_P(ArenaAllocatorTest, SimpleRpc) { std::vector CreateTestScenarios(bool test_insecure) { std::vector scenarios; - std::vector credentials_types{ + std::vector credentials_types{ GetCredentialsProvider()->GetSecureCredentialsTypeList()}; auto insec_ok = [] { // Only allow insecure credentials type when it is registered with the diff --git a/test/cpp/end2end/mock_test.cc b/test/cpp/end2end/mock_test.cc index 2a6579d0586..8c68ee4f75d 100644 --- a/test/cpp/end2end/mock_test.cc +++ b/test/cpp/end2end/mock_test.cc @@ -81,8 +81,8 @@ class FakeClient { EchoResponse response; ClientContext context; - grpc::string msg("hello"); - grpc::string exp(msg); + std::string msg("hello"); + std::string exp(msg); std::unique_ptr> cstream = stub_->RequestStream(&context, &response); @@ -111,7 +111,7 @@ class FakeClient { std::unique_ptr> cstream = stub_->ResponseStream(&context, request); - grpc::string exp = ""; + std::string exp = ""; EXPECT_TRUE(cstream->Read(&response)); exp.append(response.message() + " "); @@ -129,7 +129,7 @@ class FakeClient { EchoRequest request; EchoResponse response; ClientContext context; - grpc::string msg("hello"); + std::string msg("hello"); std::unique_ptr> stream = stub_->BidiStream(&context); @@ -256,7 +256,7 @@ class TestServiceImpl : public EchoTestService::Service { ServerReader* reader, EchoResponse* response) override { EchoRequest request; - grpc::string resp(""); + std::string resp(""); while (reader->Read(&request)) { gpr_log(GPR_INFO, "recv msg %s", request.message().c_str()); resp.append(request.message()); @@ -268,8 +268,8 @@ class TestServiceImpl : public EchoTestService::Service { Status ResponseStream(ServerContext* /*context*/, const EchoRequest* request, ServerWriter* writer) override { EchoResponse response; - vector tokens = split(request->message()); - for (const grpc::string& token : tokens) { + vector tokens = split(request->message()); + for (const std::string& token : tokens) { response.set_message(token); writer->Write(response); } @@ -290,9 +290,9 @@ class TestServiceImpl : public EchoTestService::Service { } private: - const vector split(const grpc::string& input) { - grpc::string buff(""); - vector result; + const vector split(const std::string& input) { + std::string buff(""); + vector result; for (auto n : input) { if (n != ' ') { diff --git a/test/cpp/end2end/port_sharing_end2end_test.cc b/test/cpp/end2end/port_sharing_end2end_test.cc index 8398517eee3..94b4540cf70 100644 --- a/test/cpp/end2end/port_sharing_end2end_test.cc +++ b/test/cpp/end2end/port_sharing_end2end_test.cc @@ -58,7 +58,7 @@ namespace { class TestScenario { public: TestScenario(bool server_port, bool pending_data, - const grpc::string& creds_type) + const std::string& creds_type) : server_has_port(server_port), queue_pending_data(pending_data), credentials_type(creds_type) {} @@ -67,7 +67,7 @@ class TestScenario { bool server_has_port; // whether tcp server should read some data before handoff bool queue_pending_data; - const grpc::string credentials_type; + const std::string credentials_type; }; static std::ostream& operator<<(std::ostream& out, @@ -115,7 +115,7 @@ class TestTcpServer { gpr_log(GPR_INFO, "Test TCP server started at %s", address_.c_str()); } - const grpc::string& address() { return address_; } + const std::string& address() { return address_; } void SetAcceptor( std::unique_ptr acceptor) { @@ -195,7 +195,7 @@ class TestTcpServer { grpc_closure on_fd_released_; std::thread running_thread_; int port_ = -1; - grpc::string address_; + std::string address_; std::unique_ptr connection_acceptor_; test_tcp_server tcp_server_; @@ -310,7 +310,7 @@ static void SendRpc(EchoTestService::Stub* stub, int num_rpcs) { std::vector CreateTestScenarios() { std::vector scenarios; - std::vector credentials_types; + std::vector credentials_types; #if TARGET_OS_IPHONE // Workaround Apple CFStream bug diff --git a/test/cpp/end2end/proto_server_reflection_test.cc b/test/cpp/end2end/proto_server_reflection_test.cc index d817438f41b..5153b5c8b14 100644 --- a/test/cpp/end2end/proto_server_reflection_test.cc +++ b/test/cpp/end2end/proto_server_reflection_test.cc @@ -47,7 +47,7 @@ class ProtoServerReflectionTest : public ::testing::Test { ref_desc_pool_ = protobuf::DescriptorPool::generated_pool(); ServerBuilder builder; - grpc::string server_address = "localhost:" + to_string(port_); + std::string server_address = "localhost:" + to_string(port_); builder.AddListeningPort(server_address, InsecureServerCredentials()); server_ = builder.BuildAndStart(); } @@ -67,7 +67,7 @@ class ProtoServerReflectionTest : public ::testing::Test { return strs.str(); } - void CompareService(const grpc::string& service) { + void CompareService(const std::string& service) { const protobuf::ServiceDescriptor* service_desc = desc_pool_->FindServiceByName(service); const protobuf::ServiceDescriptor* ref_service_desc = @@ -89,7 +89,7 @@ class ProtoServerReflectionTest : public ::testing::Test { } } - void CompareMethod(const grpc::string& method) { + void CompareMethod(const std::string& method) { const protobuf::MethodDescriptor* method_desc = desc_pool_->FindMethodByName(method); const protobuf::MethodDescriptor* ref_method_desc = @@ -102,7 +102,7 @@ class ProtoServerReflectionTest : public ::testing::Test { CompareType(method_desc->output_type()->full_name()); } - void CompareType(const grpc::string& type) { + void CompareType(const std::string& type) { if (known_types_.find(type) != known_types_.end()) { return; } @@ -130,7 +130,7 @@ class ProtoServerReflectionTest : public ::testing::Test { TEST_F(ProtoServerReflectionTest, CheckResponseWithLocalDescriptorPool) { ResetStub(); - std::vector services; + std::vector services; desc_db_->GetServices(&services); // The service list has at least one service (reflection servcie). EXPECT_TRUE(services.size() > 0); diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index 5f3c5cefd89..d9a8f60f1d2 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -52,7 +52,7 @@ class TestServerBuilderPlugin : public ServerBuilderPlugin { register_service_ = false; } - grpc::string name() override { return PLUGIN_NAME; } + std::string name() override { return PLUGIN_NAME; } void InitServer(ServerInitializer* si) override { init_server_is_called_ = true; @@ -63,7 +63,7 @@ class TestServerBuilderPlugin : public ServerBuilderPlugin { void Finish(ServerInitializer* /*si*/) override { finish_is_called_ = true; } - void ChangeArguments(const grpc::string& /*name*/, void* /*value*/) override { + void ChangeArguments(const std::string& /*name*/, void* /*value*/) override { change_arguments_is_called_ = true; } @@ -173,7 +173,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { } void StartServer() { - grpc::string server_address = "localhost:" + to_string(port_); + std::string server_address = "localhost:" + to_string(port_); builder_->AddListeningPort(server_address, InsecureServerCredentials()); // we run some tests without a service, and for those we need to supply a // frequently polled completion queue diff --git a/test/cpp/end2end/server_early_return_test.cc b/test/cpp/end2end/server_early_return_test.cc index 6f35c3e7d93..49bf45eb197 100644 --- a/test/cpp/end2end/server_early_return_test.cc +++ b/test/cpp/end2end/server_early_return_test.cc @@ -152,7 +152,7 @@ class ServerEarlyReturnTest : public ::testing::Test { auto stream = stub_->BidiStream(&context); for (int i = 0; i < 20; i++) { - request.set_message(grpc::string("hello") + grpc::to_string(i)); + request.set_message(std::string("hello") + std::to_string(i)); bool write_ok = stream->Write(request); bool read_ok = stream->Read(&response); if (i < 10) { @@ -189,7 +189,7 @@ class ServerEarlyReturnTest : public ::testing::Test { auto stream = stub_->RequestStream(&context, &response); for (int i = 0; i < 20; i++) { - request.set_message(grpc::string("hello") + grpc::to_string(i)); + request.set_message(std::string("hello") + std::to_string(i)); bool written = stream->Write(request); if (i < 10) { EXPECT_TRUE(written); diff --git a/test/cpp/end2end/server_interceptors_end2end_test.cc b/test/cpp/end2end/server_interceptors_end2end_test.cc index 70697275c3a..e8e0435a960 100644 --- a/test/cpp/end2end/server_interceptors_end2end_test.cc +++ b/test/cpp/end2end/server_interceptors_end2end_test.cc @@ -521,7 +521,7 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, GenericRPCTest) { grpc::CreateChannel(server_address, InsecureChannelCredentials()); GenericStub generic_stub(channel); - const grpc::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); + const std::string kMethodName("/grpc.cpp.test.util.EchoTestService/Echo"); EchoRequest send_request; EchoRequest recv_request; EchoResponse send_response; diff --git a/test/cpp/end2end/server_load_reporting_end2end_test.cc b/test/cpp/end2end/server_load_reporting_end2end_test.cc index 8eba9127ec6..111fd0c26f5 100644 --- a/test/cpp/end2end/server_load_reporting_end2end_test.cc +++ b/test/cpp/end2end/server_load_reporting_end2end_test.cc @@ -90,12 +90,11 @@ class ServerLoadReportingEnd2endTest : public ::testing::Test { server_thread_.join(); } - void ClientMakeEchoCalls(const grpc::string& lb_id, - const grpc::string& lb_tag, - const grpc::string& message, size_t num_requests) { + void ClientMakeEchoCalls(const std::string& lb_id, const std::string& lb_tag, + const std::string& message, size_t num_requests) { auto stub = EchoTestService::NewStub( grpc::CreateChannel(server_address_, InsecureChannelCredentials())); - grpc::string lb_token = lb_id + lb_tag; + std::string lb_token = lb_id + lb_tag; for (int i = 0; i < num_requests; ++i) { ClientContext ctx; if (!lb_token.empty()) ctx.AddMetadata(GRPC_LB_TOKEN_MD_KEY, lb_token); @@ -114,7 +113,7 @@ class ServerLoadReportingEnd2endTest : public ::testing::Test { } } - grpc::string server_address_; + std::string server_address_; std::unique_ptr server_; std::thread server_thread_; EchoTestServiceImpl echo_service_; @@ -139,7 +138,7 @@ TEST_F(ServerLoadReportingEnd2endTest, BasicReport) { gpr_log(GPR_INFO, "Initial request sent."); ::grpc::lb::v1::LoadReportResponse response; stream->Read(&response); - const grpc::string& lb_id = response.initial_response().load_balancer_id(); + const std::string& lb_id = response.initial_response().load_balancer_id(); gpr_log(GPR_INFO, "Initial response received (lb_id: %s).", lb_id.c_str()); ClientMakeEchoCalls(lb_id, "LB_TAG", kOkMessage, 1); while (true) { diff --git a/test/cpp/end2end/service_config_end2end_test.cc b/test/cpp/end2end/service_config_end2end_test.cc index 7466cf2a563..feabb30bbde 100644 --- a/test/cpp/end2end/service_config_end2end_test.cc +++ b/test/cpp/end2end/service_config_end2end_test.cc @@ -94,13 +94,13 @@ class MyTestServiceImpl : public TestServiceImpl { request_count_ = 0; } - std::set clients() { + std::set clients() { grpc::internal::MutexLock lock(&clients_mu_); return clients_; } private: - void AddClient(const grpc::string& client) { + void AddClient(const std::string& client) { grpc::internal::MutexLock lock(&clients_mu_); clients_.insert(client); } @@ -108,7 +108,7 @@ class MyTestServiceImpl : public TestServiceImpl { grpc::internal::Mutex mu_; int request_count_; grpc::internal::Mutex clients_mu_; - std::set clients_; + std::set clients_; }; class ServiceConfigEnd2endTest : public ::testing::Test { @@ -305,7 +305,7 @@ class ServiceConfigEnd2endTest : public ::testing::Test { port_ = port > 0 ? port : grpc_pick_unused_port_or_die(); } - void Start(const grpc::string& server_host) { + void Start(const std::string& server_host) { gpr_log(GPR_INFO, "starting server on port %d", port_); started_ = true; grpc::internal::Mutex mu; @@ -318,7 +318,7 @@ class ServiceConfigEnd2endTest : public ::testing::Test { gpr_log(GPR_INFO, "server startup complete"); } - void Serve(const grpc::string& server_host, grpc::internal::Mutex* mu, + void Serve(const std::string& server_host, grpc::internal::Mutex* mu, grpc::internal::CondVar* cond) { std::ostringstream server_address; server_address << server_host << ":" << port_; @@ -340,7 +340,7 @@ class ServiceConfigEnd2endTest : public ::testing::Test { started_ = false; } - void SetServingStatus(const grpc::string& service, bool serving) { + void SetServingStatus(const std::string& service, bool serving) { server_->GetHealthCheckService()->SetServingStatus(service, serving); } }; @@ -422,12 +422,12 @@ class ServiceConfigEnd2endTest : public ::testing::Test { return "{\"version\": \"invalid_default\""; } - const grpc::string server_host_; + const std::string server_host_; std::unique_ptr stub_; std::vector> servers_; grpc_core::RefCountedPtr response_generator_; - const grpc::string kRequestMessage_; + const std::string kRequestMessage_; std::shared_ptr creds_; }; diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc index ec8597f3e72..37dfcd44a71 100644 --- a/test/cpp/end2end/shutdown_test.cc +++ b/test/cpp/end2end/shutdown_test.cc @@ -68,7 +68,7 @@ class ShutdownTest : public ::testing::TestWithParam { } std::unique_ptr SetUpServer(const int port) { - grpc::string server_address = "localhost:" + to_string(port); + std::string server_address = "localhost:" + to_string(port); ServerBuilder builder; auto server_creds = @@ -117,7 +117,7 @@ class ShutdownTest : public ::testing::TestWithParam { }; std::vector GetAllCredentialsTypeList() { - std::vector credentials_types; + std::vector credentials_types; if (GetCredentialsProvider()->GetChannelCredentials(kInsecureCredentialsType, nullptr) != nullptr) { credentials_types.push_back(kInsecureCredentialsType); diff --git a/test/cpp/end2end/test_health_check_service_impl.cc b/test/cpp/end2end/test_health_check_service_impl.cc index 6a31e0ee9a6..957538eb950 100644 --- a/test/cpp/end2end/test_health_check_service_impl.cc +++ b/test/cpp/end2end/test_health_check_service_impl.cc @@ -64,7 +64,7 @@ Status HealthCheckServiceImpl::Watch( } void HealthCheckServiceImpl::SetStatus( - const grpc::string& service_name, + const std::string& service_name, HealthCheckResponse::ServingStatus status) { std::lock_guard lock(mu_); if (shutdown_) { diff --git a/test/cpp/end2end/test_health_check_service_impl.h b/test/cpp/end2end/test_health_check_service_impl.h index 5d36ce5320a..fe613fb14ac 100644 --- a/test/cpp/end2end/test_health_check_service_impl.h +++ b/test/cpp/end2end/test_health_check_service_impl.h @@ -39,7 +39,7 @@ class HealthCheckServiceImpl : public health::v1::Health::Service { Status Watch(ServerContext* context, const health::v1::HealthCheckRequest* request, ServerWriter* writer) override; - void SetStatus(const grpc::string& service_name, + void SetStatus(const std::string& service_name, health::v1::HealthCheckResponse::ServingStatus status); void SetAll(health::v1::HealthCheckResponse::ServingStatus status); @@ -48,7 +48,7 @@ class HealthCheckServiceImpl : public health::v1::Health::Service { private: std::mutex mu_; bool shutdown_ = false; - std::map + std::map status_map_; }; diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index c3391bb1243..a45f4cfe353 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -49,10 +49,9 @@ void MaybeEchoDeadline(experimental::ServerContextBase* context, } } -void CheckServerAuthContext( - const experimental::ServerContextBase* context, - const grpc::string& expected_transport_security_type, - const grpc::string& expected_client_identity) { +void CheckServerAuthContext(const experimental::ServerContextBase* context, + const std::string& expected_transport_security_type, + const std::string& expected_client_identity) { std::shared_ptr auth_ctx = context->auth_context(); std::vector tst = auth_ctx->FindPropertyValues("transport_security_type"); @@ -74,7 +73,7 @@ void CheckServerAuthContext( // key-value pair. Returns -1 if the pair wasn't found. int MetadataMatchCount( const std::multimap& metadata, - const grpc::string& key, const grpc::string& value) { + const std::string& key, const std::string& value) { int count = 0; for (const auto& metadatum : metadata) { if (ToString(metadatum.first) == key && @@ -273,7 +272,7 @@ experimental::ServerUnaryReactor* CallbackTestServiceImpl::Echo( // Terminate rpc with error and debug info in trailer. if (req_->param().debug_info().stack_entries_size() || !req_->param().debug_info().detail().empty()) { - grpc::string serialized_debug_info = + std::string serialized_debug_info = req_->param().debug_info().SerializeAsString(); ctx_->AddTrailingMetadata(kDebugInfoTrailerKey, serialized_debug_info); @@ -290,7 +289,7 @@ experimental::ServerUnaryReactor* CallbackTestServiceImpl::Echo( } if (req_->has_param() && req_->param().response_message_length() > 0) { resp_->set_message( - grpc::string(req_->param().response_message_length(), '\0')); + std::string(req_->param().response_message_length(), '\0')); } if (req_->has_param() && req_->param().echo_peer()) { resp_->mutable_param()->set_peer(ctx_->peer()); @@ -499,7 +498,7 @@ CallbackTestServiceImpl::ResponseStream( void NextWrite() { response_.set_message(request_->message() + - grpc::to_string(num_msgs_sent_)); + std::to_string(num_msgs_sent_)); if (num_msgs_sent_ == server_responses_to_send_ - 1 && server_coalescing_api_ != 0) { num_msgs_sent_++; diff --git a/test/cpp/end2end/test_service_impl.h b/test/cpp/end2end/test_service_impl.h index d890bdbaff0..55b9fbb54dd 100644 --- a/test/cpp/end2end/test_service_impl.h +++ b/test/cpp/end2end/test_service_impl.h @@ -63,16 +63,15 @@ namespace internal { void MaybeEchoDeadline(experimental::ServerContextBase* context, const EchoRequest* request, EchoResponse* response); -void CheckServerAuthContext( - const experimental::ServerContextBase* context, - const grpc::string& expected_transport_security_type, - const grpc::string& expected_client_identity); +void CheckServerAuthContext(const experimental::ServerContextBase* context, + const std::string& expected_transport_security_type, + const std::string& expected_client_identity); // Returns the number of pairs in metadata that exactly match the given // key-value pair. Returns -1 if the pair wasn't found. int MetadataMatchCount( const std::multimap& metadata, - const grpc::string& key, const grpc::string& value); + const std::string& key, const std::string& value); int GetIntValueFromMetadataHelper( const char* key, @@ -120,8 +119,8 @@ template class TestMultipleServiceImpl : public RpcService { public: TestMultipleServiceImpl() : signal_client_(false), host_() {} - explicit TestMultipleServiceImpl(const grpc::string& host) - : signal_client_(false), host_(new grpc::string(host)) {} + explicit TestMultipleServiceImpl(const std::string& host) + : signal_client_(false), host_(new std::string(host)) {} Status Echo(ServerContext* context, const EchoRequest* request, EchoResponse* response) { @@ -207,7 +206,7 @@ class TestMultipleServiceImpl : public RpcService { // Terminate rpc with error and debug info in trailer. if (request->param().debug_info().stack_entries_size() || !request->param().debug_info().detail().empty()) { - grpc::string serialized_debug_info = + std::string serialized_debug_info = request->param().debug_info().SerializeAsString(); context->AddTrailingMetadata(kDebugInfoTrailerKey, serialized_debug_info); @@ -224,7 +223,7 @@ class TestMultipleServiceImpl : public RpcService { if (request->has_param() && request->param().response_message_length() > 0) { response->set_message( - grpc::string(request->param().response_message_length(), '\0')); + std::string(request->param().response_message_length(), '\0')); } if (request->has_param() && request->param().echo_peer()) { response->mutable_param()->set_peer(context->peer()); @@ -339,7 +338,7 @@ class TestMultipleServiceImpl : public RpcService { } for (int i = 0; i < server_responses_to_send; i++) { - response.set_message(request->message() + grpc::to_string(i)); + response.set_message(request->message() + std::to_string(i)); if (i == server_responses_to_send - 1 && server_coalescing_api != 0) { writer->WriteLast(response, WriteOptions()); } else { @@ -431,15 +430,15 @@ class TestMultipleServiceImpl : public RpcService { bool signal_client_; std::mutex mu_; TestServiceSignaller signaller_; - std::unique_ptr host_; + std::unique_ptr host_; }; class CallbackTestServiceImpl : public ::grpc::testing::EchoTestService::ExperimentalCallbackService { public: CallbackTestServiceImpl() : signal_client_(false), host_() {} - explicit CallbackTestServiceImpl(const grpc::string& host) - : signal_client_(false), host_(new grpc::string(host)) {} + explicit CallbackTestServiceImpl(const std::string& host) + : signal_client_(false), host_(new std::string(host)) {} experimental::ServerUnaryReactor* Echo( experimental::CallbackServerContext* context, const EchoRequest* request, @@ -472,7 +471,7 @@ class CallbackTestServiceImpl bool signal_client_; std::mutex mu_; TestServiceSignaller signaller_; - std::unique_ptr host_; + std::unique_ptr host_; }; using TestServiceImpl = diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index 65f740ffcbf..01b46e11ff3 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -367,7 +367,7 @@ class AsyncClientEnd2endTest : public ::testing::Test { for (int i = 0; i < num_rpcs; ++i) { AsyncClientCall* call = new AsyncClientCall; EchoRequest request; - request.set_message("Hello: " + grpc::to_string(i)); + request.set_message("Hello: " + std::to_string(i)); call->response_reader = common_.GetStub()->AsyncEcho(&call->context, request, &cq_); call->response_reader->Finish(&call->response, &call->status, diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 9db3306738a..055af310169 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -273,19 +273,19 @@ class BackendServiceImpl void Start() {} void Shutdown() {} - std::set clients() { + std::set clients() { grpc_core::MutexLock lock(&clients_mu_); return clients_; } private: - void AddClient(const grpc::string& client) { + void AddClient(const std::string& client) { grpc_core::MutexLock lock(&clients_mu_); clients_.insert(client); } grpc_core::Mutex clients_mu_; - std::set clients_; + std::set clients_; }; class ClientStats { @@ -325,7 +325,7 @@ class ClientStats { const std::string& cluster_name() const { return cluster_name_; } - const std::map& locality_stats() const { + const std::map& locality_stats() const { return locality_stats_; } uint64_t total_successful_requests() const { @@ -359,7 +359,7 @@ class ClientStats { uint64_t total_dropped_requests() const { return total_dropped_requests_; } - uint64_t dropped_requests(const grpc::string& category) const { + uint64_t dropped_requests(const std::string& category) const { auto iter = dropped_requests_.find(category); GPR_ASSERT(iter != dropped_requests_.end()); return iter->second; @@ -367,9 +367,9 @@ class ClientStats { private: std::string cluster_name_; - std::map locality_stats_; + std::map locality_stats_; uint64_t total_dropped_requests_; - std::map dropped_requests_; + std::map dropped_requests_; }; class AdsServiceImpl : public AggregatedDiscoveryService::Service, @@ -383,7 +383,7 @@ class AdsServiceImpl : public AggregatedDiscoveryService::Service, struct EdsResourceArgs { struct Locality { - Locality(const grpc::string& sub_zone, std::vector ports, + Locality(const std::string& sub_zone, std::vector ports, int lb_weight = kDefaultLocalityWeight, int priority = kDefaultLocalityPriority, std::vector health_statuses = {}) @@ -393,7 +393,7 @@ class AdsServiceImpl : public AggregatedDiscoveryService::Service, priority(priority), health_statuses(std::move(health_statuses)) {} - const grpc::string sub_zone; + const std::string sub_zone; std::vector ports; int lb_weight; int priority; @@ -405,7 +405,7 @@ class AdsServiceImpl : public AggregatedDiscoveryService::Service, : locality_list(std::move(locality_list)) {} std::vector locality_list; - std::map drop_categories; + std::map drop_categories; FractionalPercent::DenominatorType drop_denominator = FractionalPercent::MILLION; }; @@ -773,7 +773,7 @@ class AdsServiceImpl : public AggregatedDiscoveryService::Service, if (!args.drop_categories.empty()) { auto* policy = assignment.mutable_policy(); for (const auto& p : args.drop_categories) { - const grpc::string& name = p.first; + const std::string& name = p.first; const uint32_t parts_per_million = p.second; auto* drop_overload = policy->add_drop_overloads(); drop_overload->set_category(name); @@ -1100,8 +1100,8 @@ class TestType { bool enable_load_reporting() const { return enable_load_reporting_; } bool enable_rds_testing() const { return enable_rds_testing_; } - grpc::string AsString() const { - grpc::string retval = (use_xds_resolver_ ? "XdsResolver" : "FakeResolver"); + std::string AsString() const { + std::string retval = (use_xds_resolver_ ? "XdsResolver" : "FakeResolver"); if (enable_load_reporting_) retval += "WithLoadReporting"; if (enable_rds_testing_) retval += "Rds"; return retval; @@ -1179,7 +1179,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam { void ShutdownBackend(size_t index) { backends_[index]->Shutdown(); } void ResetStub(int failover_timeout = 0, - const grpc::string& expected_targets = "", + const std::string& expected_targets = "", int xds_resource_does_not_exist_timeout = 0) { ChannelArguments args; if (failover_timeout > 0) { @@ -1204,7 +1204,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam { if (!expected_targets.empty()) { args.SetString(GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS, expected_targets); } - grpc::string scheme = GetParam().use_xds_resolver() ? "xds" : "fake"; + std::string scheme = GetParam().use_xds_resolver() ? "xds" : "fake"; std::ostringstream uri; uri << scheme << ":///" << kApplicationTargetName_; // TODO(dgq): templatize tests to run everything using both secure and @@ -1686,8 +1686,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam { response_generator_; grpc_core::RefCountedPtr lb_channel_response_generator_; - const grpc::string kRequestMessage_ = "Live long and prosper."; - const grpc::string kApplicationTargetName_ = kDefaultResourceName; + const std::string kRequestMessage_ = "Live long and prosper."; + const std::string kApplicationTargetName_ = kDefaultResourceName; const char* kDefaultServiceConfig_ = "{\n" " \"loadBalancingConfig\":[\n" @@ -4709,7 +4709,7 @@ TEST_P(ClientLoadReportingWithDropTest, Vanilla) { kDropRateForThrottle * (1 + kErrorTolerance)))); } -grpc::string TestTypeName(const ::testing::TestParamInfo& info) { +std::string TestTypeName(const ::testing::TestParamInfo& info) { return info.param.AsString(); } diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index eb8ac54e514..94142bbf80f 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -41,13 +41,13 @@ class GrpclbTest : public ::testing::Test { static void TearDownTestCase() { grpc_shutdown(); } }; -grpc::string Ip4ToPackedString(const char* ip_str) { +std::string Ip4ToPackedString(const char* ip_str) { struct in_addr ip4; GPR_ASSERT(inet_pton(AF_INET, ip_str, &ip4) == 1); - return grpc::string(reinterpret_cast(&ip4), sizeof(ip4)); + return std::string(reinterpret_cast(&ip4), sizeof(ip4)); } -grpc::string PackedStringToIp(const grpc_core::GrpcLbServer& server) { +std::string PackedStringToIp(const grpc_core::GrpcLbServer& server) { char ip_str[46] = {0}; int af = -1; if (server.ip_size == 4) { @@ -62,7 +62,7 @@ grpc::string PackedStringToIp(const grpc_core::GrpcLbServer& server) { } TEST_F(GrpclbTest, CreateRequest) { - const grpc::string service_name = "AServiceName"; + const std::string service_name = "AServiceName"; LoadBalanceRequest request; upb::Arena arena; grpc_slice slice = @@ -82,7 +82,7 @@ TEST_F(GrpclbTest, ParseInitialResponse) { initial_response->mutable_client_stats_report_interval(); client_stats_report_interval->set_seconds(123); client_stats_report_interval->set_nanos(456000000); - const grpc::string encoded_response = response.SerializeAsString(); + const std::string encoded_response = response.SerializeAsString(); grpc_slice encoded_slice = grpc_slice_from_copied_string(encoded_response.c_str()); // Test parsing. @@ -110,7 +110,7 @@ TEST_F(GrpclbTest, ParseResponseServerList) { server->set_port(54321); server->set_load_balance_token("load_balancing"); server->set_drop(true); - const grpc::string encoded_response = response.SerializeAsString(); + const std::string encoded_response = response.SerializeAsString(); const grpc_slice encoded_slice = grpc_slice_from_copied_buffer( encoded_response.data(), encoded_response.size()); // Test parsing. diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 5ca6bd18621..2aefb620a40 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -119,27 +119,27 @@ namespace { // in values. Convert keys to lowercase. On failure, log an error and return // false. bool ParseAdditionalMetadataFlag( - const grpc::string& flag, - std::multimap* additional_metadata) { + const std::string& flag, + std::multimap* additional_metadata) { size_t start_pos = 0; while (start_pos < flag.length()) { size_t colon_pos = flag.find(':', start_pos); - if (colon_pos == grpc::string::npos) { + if (colon_pos == std::string::npos) { gpr_log(GPR_ERROR, "Couldn't parse metadata flag: extra characters at end of flag"); return false; } size_t semicolon_pos = flag.find(';', colon_pos); - grpc::string key = flag.substr(start_pos, colon_pos - start_pos); - grpc::string value = + std::string key = flag.substr(start_pos, colon_pos - start_pos); + std::string value = flag.substr(colon_pos + 1, semicolon_pos - colon_pos - 1); constexpr char alphanum_and_hyphen[] = "-0123456789" "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - if (key.find_first_not_of(alphanum_and_hyphen) != grpc::string::npos) { + if (key.find_first_not_of(alphanum_and_hyphen) != std::string::npos) { gpr_log(GPR_ERROR, "Couldn't parse metadata flag: key contains characters other " "than alphanumeric and hyphens: %s", @@ -158,7 +158,7 @@ bool ParseAdditionalMetadataFlag( key.c_str(), value.c_str()); additional_metadata->insert({key, value}); - if (semicolon_pos == grpc::string::npos) { + if (semicolon_pos == std::string::npos) { break; } else { start_pos = semicolon_pos + 1; @@ -177,13 +177,13 @@ int main(int argc, char** argv) { int ret = 0; grpc::testing::ChannelCreationFunc channel_creation_func; - grpc::string test_case = FLAGS_test_case; + std::string test_case = FLAGS_test_case; if (FLAGS_additional_metadata == "") { channel_creation_func = [test_case]() { return CreateChannelForTestCase(test_case); }; } else { - std::multimap additional_metadata; + std::multimap additional_metadata; if (!ParseAdditionalMetadataFlag(FLAGS_additional_metadata, &additional_metadata)) { return 1; @@ -203,7 +203,7 @@ int main(int argc, char** argv) { grpc::testing::InteropClient client(channel_creation_func, true, FLAGS_do_not_abort_on_transient_failures); - std::unordered_map> actions; + std::unordered_map> actions; actions["empty_unary"] = std::bind(&grpc::testing::InteropClient::DoEmpty, &client); actions["large_unary"] = @@ -289,7 +289,7 @@ int main(int argc, char** argv) { } else if (actions.find(FLAGS_test_case) != actions.end()) { actions.find(FLAGS_test_case)->second(); } else { - grpc::string test_cases; + std::string test_cases; for (const auto& action : actions) { if (!test_cases.empty()) test_cases += "\n"; test_cases += action.first; diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index 581d52f3724..f43e315fbd9 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -50,8 +50,8 @@ DECLARE_string(oauth_scope); namespace grpc { namespace testing { -grpc::string GetServiceAccountJsonKey() { - static grpc::string json_key; +std::string GetServiceAccountJsonKey() { + static std::string json_key; if (json_key.empty()) { std::ifstream json_key_file(FLAGS_service_account_key_file); std::stringstream key_stream; @@ -61,7 +61,7 @@ grpc::string GetServiceAccountJsonKey() { return json_key; } -grpc::string GetOauth2AccessToken() { +std::string GetOauth2AccessToken() { std::shared_ptr creds = GoogleComputeEngineCredentials(); SecureCallCredentials* secure_creds = dynamic_cast(creds.get()); @@ -70,16 +70,16 @@ grpc::string GetOauth2AccessToken() { char* token = grpc_test_fetch_oauth2_token_with_credentials(c_creds); GPR_ASSERT(token != nullptr); gpr_log(GPR_INFO, "Get raw oauth2 access token: %s", token); - grpc::string access_token(token + sizeof("Bearer ") - 1); + std::string access_token(token + sizeof("Bearer ") - 1); gpr_free(token); return access_token; } void UpdateActions( - std::unordered_map>* /*actions*/) {} + std::unordered_map>* /*actions*/) {} std::shared_ptr CreateChannelForTestCase( - const grpc::string& test_case, + const std::string& test_case, std::vector< std::unique_ptr> interceptor_creators) { @@ -95,7 +95,7 @@ std::shared_ptr CreateChannelForTestCase( ? nullptr : GoogleComputeEngineCredentials(); } else if (test_case == "jwt_token_creds") { - grpc::string json_key = GetServiceAccountJsonKey(); + std::string json_key = GetServiceAccountJsonKey(); std::chrono::seconds token_lifetime = std::chrono::hours(1); creds = FLAGS_custom_credentials_type == "google_default_credentials" ? nullptr diff --git a/test/cpp/interop/client_helper.h b/test/cpp/interop/client_helper.h index e97274177ab..adb9d72af56 100644 --- a/test/cpp/interop/client_helper.h +++ b/test/cpp/interop/client_helper.h @@ -32,15 +32,15 @@ namespace grpc { namespace testing { -grpc::string GetServiceAccountJsonKey(); +std::string GetServiceAccountJsonKey(); -grpc::string GetOauth2AccessToken(); +std::string GetOauth2AccessToken(); void UpdateActions( - std::unordered_map>* actions); + std::unordered_map>* actions); std::shared_ptr CreateChannelForTestCase( - const grpc::string& test_case, + const std::string& test_case, std::vector< std::unique_ptr> interceptor_creators = {}); @@ -69,13 +69,13 @@ class InteropClientContextInspector { class AdditionalMetadataInterceptor : public experimental::Interceptor { public: AdditionalMetadataInterceptor( - std::multimap additional_metadata) + std::multimap additional_metadata) : additional_metadata_(std::move(additional_metadata)) {} void Intercept(experimental::InterceptorBatchMethods* methods) override { if (methods->QueryInterceptionHookPoint( experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) { - std::multimap* metadata = + std::multimap* metadata = methods->GetSendInitialMetadata(); for (const auto& entry : additional_metadata_) { metadata->insert(entry); @@ -85,14 +85,14 @@ class AdditionalMetadataInterceptor : public experimental::Interceptor { } private: - const std::multimap additional_metadata_; + const std::multimap additional_metadata_; }; class AdditionalMetadataInterceptorFactory : public experimental::ClientInterceptorFactoryInterface { public: AdditionalMetadataInterceptorFactory( - std::multimap additional_metadata) + std::multimap additional_metadata) : additional_metadata_(std::move(additional_metadata)) {} experimental::Interceptor* CreateClientInterceptor( @@ -100,7 +100,7 @@ class AdditionalMetadataInterceptorFactory return new AdditionalMetadataInterceptor(additional_metadata_); } - const std::multimap additional_metadata_; + const std::multimap additional_metadata_; }; } // namespace testing diff --git a/test/cpp/interop/http2_client.cc b/test/cpp/interop/http2_client.cc index ba65174cb45..dbe9f7f5620 100644 --- a/test/cpp/interop/http2_client.cc +++ b/test/cpp/interop/http2_client.cc @@ -72,7 +72,7 @@ Status Http2Client::SendUnaryCall(SimpleResponse* response) { SimpleRequest Http2Client::BuildDefaultRequest() { SimpleRequest request; request.set_response_size(kLargeResponseSize); - grpc::string payload(kLargeRequestSize, '\0'); + std::string payload(kLargeRequestSize, '\0'); request.mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); return request; } @@ -115,7 +115,7 @@ bool Http2Client::DoGoaway() { SimpleResponse response; AssertStatusCode(SendUnaryCall(&response), grpc::StatusCode::OK); GPR_ASSERT(response.payload().body() == - grpc::string(kLargeResponseSize, '\0')); + std::string(kLargeResponseSize, '\0')); // Sleep for one second to give time for client to receive goaway frame. gpr_timespec sleep_time = gpr_time_add( @@ -125,7 +125,7 @@ bool Http2Client::DoGoaway() { response.Clear(); AssertStatusCode(SendUnaryCall(&response), grpc::StatusCode::OK); GPR_ASSERT(response.payload().body() == - grpc::string(kLargeResponseSize, '\0')); + std::string(kLargeResponseSize, '\0')); gpr_log(GPR_DEBUG, "Done testing goaway"); return true; } @@ -135,7 +135,7 @@ bool Http2Client::DoPing() { SimpleResponse response; AssertStatusCode(SendUnaryCall(&response), grpc::StatusCode::OK); GPR_ASSERT(response.payload().body() == - grpc::string(kLargeResponseSize, '\0')); + std::string(kLargeResponseSize, '\0')); gpr_log(GPR_DEBUG, "Done testing ping"); return true; } @@ -145,7 +145,7 @@ void Http2Client::MaxStreamsWorker( SimpleResponse response; AssertStatusCode(SendUnaryCall(&response), grpc::StatusCode::OK); GPR_ASSERT(response.payload().body() == - grpc::string(kLargeResponseSize, '\0')); + std::string(kLargeResponseSize, '\0')); } bool Http2Client::DoMaxStreams() { @@ -156,7 +156,7 @@ bool Http2Client::DoMaxStreams() { SimpleResponse response; AssertStatusCode(SendUnaryCall(&response), grpc::StatusCode::OK); GPR_ASSERT(response.payload().body() == - grpc::string(kLargeResponseSize, '\0')); + std::string(kLargeResponseSize, '\0')); std::vector test_threads; diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index f0c65482fcf..c7782a408d9 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -118,7 +118,7 @@ InteropClient::InteropClient(ChannelCreationFunc channel_creation_func, do_not_abort_on_transient_failures_(do_not_abort_on_transient_failures) {} bool InteropClient::AssertStatusOk(const Status& s, - const grpc::string& optional_debug_string) { + const std::string& optional_debug_string) { if (s.ok()) { return true; } @@ -130,9 +130,8 @@ bool InteropClient::AssertStatusOk(const Status& s, return AssertStatusCode(s, StatusCode::OK, optional_debug_string); } -bool InteropClient::AssertStatusCode( - const Status& s, StatusCode expected_code, - const grpc::string& optional_debug_string) { +bool InteropClient::AssertStatusCode(const Status& s, StatusCode expected_code, + const std::string& optional_debug_string) { if (s.error_code() == expected_code) { return true; } @@ -180,7 +179,7 @@ bool InteropClient::PerformLargeUnary(SimpleRequest* request, ClientContext context; InteropClientContextInspector inspector(context); request->set_response_size(kLargeResponseSize); - grpc::string payload(kLargeRequestSize, '\0'); + std::string payload(kLargeRequestSize, '\0'); request->mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); if (request->has_expect_compressed()) { if (request->expect_compressed().value()) { @@ -199,13 +198,13 @@ bool InteropClient::PerformLargeUnary(SimpleRequest* request, // Payload related checks. GPR_ASSERT(response->payload().body() == - grpc::string(kLargeResponseSize, '\0')); + std::string(kLargeResponseSize, '\0')); return true; } bool InteropClient::DoComputeEngineCreds( - const grpc::string& default_service_account, - const grpc::string& oauth_scope) { + const std::string& default_service_account, + const std::string& oauth_scope) { gpr_log(GPR_DEBUG, "Sending a large unary rpc with compute engine credentials ..."); SimpleRequest request; @@ -223,13 +222,13 @@ bool InteropClient::DoComputeEngineCreds( GPR_ASSERT(response.username().c_str() == default_service_account); GPR_ASSERT(!response.oauth_scope().empty()); const char* oauth_scope_str = response.oauth_scope().c_str(); - GPR_ASSERT(oauth_scope.find(oauth_scope_str) != grpc::string::npos); + GPR_ASSERT(oauth_scope.find(oauth_scope_str) != std::string::npos); gpr_log(GPR_DEBUG, "Large unary with compute engine creds done."); return true; } -bool InteropClient::DoOauth2AuthToken(const grpc::string& username, - const grpc::string& oauth_scope) { +bool InteropClient::DoOauth2AuthToken(const std::string& username, + const std::string& oauth_scope) { gpr_log(GPR_DEBUG, "Sending a unary rpc with raw oauth2 access token credentials ..."); SimpleRequest request; @@ -249,12 +248,12 @@ bool InteropClient::DoOauth2AuthToken(const grpc::string& username, GPR_ASSERT(!response.oauth_scope().empty()); GPR_ASSERT(username == response.username()); const char* oauth_scope_str = response.oauth_scope().c_str(); - GPR_ASSERT(oauth_scope.find(oauth_scope_str) != grpc::string::npos); + GPR_ASSERT(oauth_scope.find(oauth_scope_str) != std::string::npos); gpr_log(GPR_DEBUG, "Unary with oauth2 access token credentials done."); return true; } -bool InteropClient::DoPerRpcCreds(const grpc::string& json_key) { +bool InteropClient::DoPerRpcCreds(const std::string& json_key) { gpr_log(GPR_DEBUG, "Sending a unary rpc with per-rpc JWT access token ..."); SimpleRequest request; SimpleResponse response; @@ -274,12 +273,12 @@ bool InteropClient::DoPerRpcCreds(const grpc::string& json_key) { } GPR_ASSERT(!response.username().empty()); - GPR_ASSERT(json_key.find(response.username()) != grpc::string::npos); + GPR_ASSERT(json_key.find(response.username()) != std::string::npos); gpr_log(GPR_DEBUG, "Unary with per-rpc JWT access token done."); return true; } -bool InteropClient::DoJwtTokenCreds(const grpc::string& username) { +bool InteropClient::DoJwtTokenCreds(const std::string& username) { gpr_log(GPR_DEBUG, "Sending a large unary rpc with JWT token credentials ..."); SimpleRequest request; @@ -291,13 +290,13 @@ bool InteropClient::DoJwtTokenCreds(const grpc::string& username) { } GPR_ASSERT(!response.username().empty()); - GPR_ASSERT(username.find(response.username()) != grpc::string::npos); + GPR_ASSERT(username.find(response.username()) != std::string::npos); gpr_log(GPR_DEBUG, "Large unary with JWT token creds done."); return true; } bool InteropClient::DoGoogleDefaultCredentials( - const grpc::string& default_service_account) { + const std::string& default_service_account) { gpr_log(GPR_DEBUG, "Sending a large unary rpc with GoogleDefaultCredentials..."); SimpleRequest request; @@ -336,7 +335,7 @@ bool InteropClient::DoClientCompressedUnary() { probe_req.mutable_expect_compressed()->set_value(true); // lies! probe_req.set_response_size(kLargeResponseSize); - probe_req.mutable_payload()->set_body(grpc::string(kLargeRequestSize, '\0')); + probe_req.mutable_payload()->set_body(std::string(kLargeRequestSize, '\0')); gpr_log(GPR_DEBUG, "Sending probe for compressed unary request."); const Status s = @@ -421,7 +420,7 @@ bool InteropClient::DoRequestStreaming() { int aggregated_payload_size = 0; for (size_t i = 0; i < request_stream_sizes.size(); ++i) { Payload* payload = request.mutable_payload(); - payload->set_body(grpc::string(request_stream_sizes[i], '\0')); + payload->set_body(std::string(request_stream_sizes[i], '\0')); if (!stream->Write(request)) { gpr_log(GPR_ERROR, "DoRequestStreaming(): stream->Write() failed"); return TransientFailureOrAbort(); @@ -455,7 +454,7 @@ bool InteropClient::DoResponseStreaming() { unsigned int i = 0; while (stream->Read(&response)) { GPR_ASSERT(response.payload().body() == - grpc::string(response_stream_sizes[i], '\0')); + std::string(response_stream_sizes[i], '\0')); ++i; } @@ -486,7 +485,7 @@ bool InteropClient::DoClientCompressedStreaming() { probe_context.set_compression_algorithm(GRPC_COMPRESS_NONE); probe_req.mutable_expect_compressed()->set_value(true); // lies! - probe_req.mutable_payload()->set_body(grpc::string(27182, '\0')); + probe_req.mutable_payload()->set_body(std::string(27182, '\0')); gpr_log(GPR_DEBUG, "Sending probe for compressed streaming request."); @@ -515,7 +514,7 @@ bool InteropClient::DoClientCompressedStreaming() { std::unique_ptr> stream( serviceStub_.Get()->StreamingInputCall(&context, &response)); - request.mutable_payload()->set_body(grpc::string(27182, '\0')); + request.mutable_payload()->set_body(std::string(27182, '\0')); request.mutable_expect_compressed()->set_value(true); gpr_log(GPR_DEBUG, "Sending streaming request with compression enabled"); if (!stream->Write(request)) { @@ -525,7 +524,7 @@ bool InteropClient::DoClientCompressedStreaming() { WriteOptions wopts; wopts.set_no_compression(); - request.mutable_payload()->set_body(grpc::string(45904, '\0')); + request.mutable_payload()->set_body(std::string(45904, '\0')); request.mutable_expect_compressed()->set_value(false); gpr_log(GPR_DEBUG, "Sending streaming request with compression disabled"); if (!stream->Write(request, wopts)) { @@ -572,7 +571,7 @@ bool InteropClient::DoServerCompressedStreaming() { while (stream->Read(&response)) { // Payload size checks. GPR_ASSERT(response.payload().body() == - grpc::string(request.response_parameters(k).size(), '\0')); + std::string(request.response_parameters(k).size(), '\0')); // Compression checks. GPR_ASSERT(request.response_parameters(k).has_compressed()); @@ -620,7 +619,7 @@ bool InteropClient::DoResponseStreamingWithSlowConsumer() { int i = 0; while (stream->Read(&response)) { GPR_ASSERT(response.payload().body() == - grpc::string(kResponseMessageSize, '\0')); + std::string(kResponseMessageSize, '\0')); gpr_log(GPR_DEBUG, "received message %d", i); gpr_sleep_until(gpr_time_add( gpr_now(GPR_CLOCK_REALTIME), @@ -670,7 +669,7 @@ bool InteropClient::DoHalfDuplex() { StreamingOutputCallResponse response; while (stream->Read(&response)) { GPR_ASSERT(response.payload().body() == - grpc::string(response_stream_sizes[i], '\0')); + std::string(response_stream_sizes[i], '\0')); ++i; } @@ -708,7 +707,7 @@ bool InteropClient::DoPingPong() { for (unsigned int i = 0; i < request_stream_sizes.size(); ++i) { response_parameter->set_size(response_stream_sizes[i]); - payload->set_body(grpc::string(request_stream_sizes[i], '\0')); + payload->set_body(std::string(request_stream_sizes[i], '\0')); if (!stream->Write(request)) { gpr_log(GPR_ERROR, "DoPingPong(): stream->Write() failed. i: %d", i); @@ -721,7 +720,7 @@ bool InteropClient::DoPingPong() { } GPR_ASSERT(response.payload().body() == - grpc::string(response_stream_sizes[i], '\0')); + std::string(response_stream_sizes[i], '\0')); } stream->WritesDone(); @@ -771,7 +770,7 @@ bool InteropClient::DoCancelAfterFirstResponse() { StreamingOutputCallRequest request; ResponseParameters* response_parameter = request.add_response_parameters(); response_parameter->set_size(31415); - request.mutable_payload()->set_body(grpc::string(27182, '\0')); + request.mutable_payload()->set_body(std::string(27182, '\0')); StreamingOutputCallResponse response; if (!stream->Write(request)) { @@ -783,7 +782,7 @@ bool InteropClient::DoCancelAfterFirstResponse() { gpr_log(GPR_ERROR, "DoCancelAfterFirstResponse(): stream->Read failed"); return TransientFailureOrAbort(); } - GPR_ASSERT(response.payload().body() == grpc::string(31415, '\0')); + GPR_ASSERT(response.payload().body() == std::string(31415, '\0')); gpr_log(GPR_DEBUG, "Trying to cancel..."); context.TryCancel(); @@ -806,7 +805,7 @@ bool InteropClient::DoTimeoutOnSleepingServer() { stream(serviceStub_.Get()->FullDuplexCall(&context)); StreamingOutputCallRequest request; - request.mutable_payload()->set_body(grpc::string(27182, '\0')); + request.mutable_payload()->set_body(std::string(27182, '\0')); stream->Write(request); Status s = stream->Finish(); @@ -844,7 +843,7 @@ bool InteropClient::DoStatusWithMessage() { "Sending RPC with a request for status code 2 and message"); const grpc::StatusCode test_code = grpc::StatusCode::UNKNOWN; - const grpc::string test_msg = "This is a test message"; + const std::string test_msg = "This is a test message"; // Test UnaryCall. ClientContext context; @@ -977,11 +976,11 @@ bool InteropClient::DoPickFirstUnary() { } bool InteropClient::DoCustomMetadata() { - const grpc::string kEchoInitialMetadataKey("x-grpc-test-echo-initial"); - const grpc::string kInitialMetadataValue("test_initial_metadata_value"); - const grpc::string kEchoTrailingBinMetadataKey( + const std::string kEchoInitialMetadataKey("x-grpc-test-echo-initial"); + const std::string kInitialMetadataValue("test_initial_metadata_value"); + const std::string kEchoTrailingBinMetadataKey( "x-grpc-test-echo-trailing-bin"); - const grpc::string kTrailingBinValue("\x0a\x0b\x0a\x0b\x0a\x0b"); + const std::string kTrailingBinValue("\x0a\x0b\x0a\x0b\x0a\x0b"); ; { @@ -992,7 +991,7 @@ bool InteropClient::DoCustomMetadata() { SimpleRequest request; SimpleResponse response; request.set_response_size(kLargeResponseSize); - grpc::string payload(kLargeRequestSize, '\0'); + std::string payload(kLargeRequestSize, '\0'); request.mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); Status s = serviceStub_.Get()->UnaryCall(&context, request, &response); @@ -1007,7 +1006,7 @@ bool InteropClient::DoCustomMetadata() { const auto& server_trailing_metadata = context.GetServerTrailingMetadata(); iter = server_trailing_metadata.find(kEchoTrailingBinMetadataKey); GPR_ASSERT(iter != server_trailing_metadata.end()); - GPR_ASSERT(grpc::string(iter->second.begin(), iter->second.end()) == + GPR_ASSERT(std::string(iter->second.begin(), iter->second.end()) == kTrailingBinValue); gpr_log(GPR_DEBUG, "Done testing RPC with custom metadata"); @@ -1025,7 +1024,7 @@ bool InteropClient::DoCustomMetadata() { StreamingOutputCallRequest request; ResponseParameters* response_parameter = request.add_response_parameters(); response_parameter->set_size(kLargeResponseSize); - grpc::string payload(kLargeRequestSize, '\0'); + std::string payload(kLargeRequestSize, '\0'); request.mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); StreamingOutputCallResponse response; @@ -1042,7 +1041,7 @@ bool InteropClient::DoCustomMetadata() { } GPR_ASSERT(response.payload().body() == - grpc::string(kLargeResponseSize, '\0')); + std::string(kLargeResponseSize, '\0')); GPR_ASSERT(!stream->Read(&response)); @@ -1058,7 +1057,7 @@ bool InteropClient::DoCustomMetadata() { const auto& server_trailing_metadata = context.GetServerTrailingMetadata(); iter = server_trailing_metadata.find(kEchoTrailingBinMetadataKey); GPR_ASSERT(iter != server_trailing_metadata.end()); - GPR_ASSERT(grpc::string(iter->second.begin(), iter->second.end()) == + GPR_ASSERT(std::string(iter->second.begin(), iter->second.end()) == kTrailingBinValue); gpr_log(GPR_DEBUG, "Done testing stream with custom metadata"); @@ -1080,7 +1079,7 @@ InteropClient::PerformOneSoakTestIteration( ClientContext context; InteropClientContextInspector inspector(context); request.set_response_size(kLargeResponseSize); - grpc::string payload(kLargeRequestSize, '\0'); + std::string payload(kLargeRequestSize, '\0'); request.mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); if (reset_channel) { serviceStub_.ResetChannel(); diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index f9ecbd634b6..e7a612a05b4 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -87,16 +87,16 @@ class InteropClient { // Auth tests. // username is a string containing the user email - bool DoJwtTokenCreds(const grpc::string& username); - bool DoComputeEngineCreds(const grpc::string& default_service_account, - const grpc::string& oauth_scope); + bool DoJwtTokenCreds(const std::string& username); + bool DoComputeEngineCreds(const std::string& default_service_account, + const std::string& oauth_scope); // username the GCE default service account email - bool DoOauth2AuthToken(const grpc::string& username, - const grpc::string& oauth_scope); + bool DoOauth2AuthToken(const std::string& username, + const std::string& oauth_scope); // username is a string containing the user email - bool DoPerRpcCreds(const grpc::string& json_key); + bool DoPerRpcCreds(const std::string& json_key); // default_service_account is the GCE default service account email - bool DoGoogleDefaultCredentials(const grpc::string& default_service_account); + bool DoGoogleDefaultCredentials(const std::string& default_service_account); private: class ServiceStub { @@ -127,9 +127,9 @@ class InteropClient { bool PerformLargeUnary(SimpleRequest* request, SimpleResponse* response, const CheckerFn& custom_checks_fn); bool AssertStatusOk(const Status& s, - const grpc::string& optional_debug_string); + const std::string& optional_debug_string); bool AssertStatusCode(const Status& s, StatusCode expected_code, - const grpc::string& optional_debug_string); + const std::string& optional_debug_string); bool TransientFailureOrAbort(); std::tuple PerformOneSoakTestIteration( diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index ca3a03883df..153aec7c9c2 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -77,13 +77,13 @@ void MaybeEchoMetadata(ServerContext* context) { if (iter != client_metadata.end()) { context->AddInitialMetadata( kEchoInitialMetadataKey, - grpc::string(iter->second.begin(), iter->second.end())); + std::string(iter->second.begin(), iter->second.end())); } iter = client_metadata.find(kEchoTrailingBinMetadataKey); if (iter != client_metadata.end()) { context->AddTrailingMetadata( kEchoTrailingBinMetadataKey, - grpc::string(iter->second.begin(), iter->second.end())); + std::string(iter->second.begin(), iter->second.end())); } // Check if client sent a magic key in the header that makes us echo // back the user-agent (for testing purpose) @@ -93,7 +93,7 @@ void MaybeEchoMetadata(ServerContext* context) { if (iter != client_metadata.end()) { context->AddInitialMetadata( kEchoUserAgentKey, - grpc::string(iter->second.begin(), iter->second.end())); + std::string(iter->second.begin(), iter->second.end())); } } } @@ -267,7 +267,7 @@ class TestServiceImpl : public TestService::Service { if (request.response_parameters_size() != 0) { response.mutable_payload()->set_type(request.payload().type()); response.mutable_payload()->set_body( - grpc::string(request.response_parameters(0).size(), '\0')); + std::string(request.response_parameters(0).size(), '\0')); int time_us; if ((time_us = request.response_parameters(0).interval_us()) > 0) { // Sleep before response if needed @@ -305,7 +305,7 @@ class TestServiceImpl : public TestService::Service { "Request does not have response parameters."); } response.mutable_payload()->set_body( - grpc::string(requests[i].response_parameters(0).size(), '\0')); + std::string(requests[i].response_parameters(0).size(), '\0')); write_success = stream->Write(response); } if (write_success) { diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index 5bbe913365c..f001f815683 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -67,7 +67,7 @@ TestCaseType WeightedRandomTestSelector::GetNextTest() const { } StressTestInteropClient::StressTestInteropClient( - int test_id, const grpc::string& server_address, + int test_id, const std::string& server_address, ChannelCreationFunc channel_creation_func, const WeightedRandomTestSelector& test_selector, long test_duration_secs, long sleep_duration_ms, bool do_not_abort_on_transient_failures) diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index 58680d80935..eb2ec415af6 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -55,7 +55,7 @@ enum TestCaseType { CUSTOM_METADATA }; -const vector> kTestCaseList = { +const vector> kTestCaseList = { {EMPTY_UNARY, "empty_unary"}, {LARGE_UNARY, "large_unary"}, {CLIENT_COMPRESSED_UNARY, "client_compressed_unary"}, @@ -90,7 +90,7 @@ class WeightedRandomTestSelector { class StressTestInteropClient { public: - StressTestInteropClient(int test_id, const grpc::string& server_address, + StressTestInteropClient(int test_id, const std::string& server_address, ChannelCreationFunc channel_creation_func, const WeightedRandomTestSelector& test_selector, long test_duration_secs, long sleep_duration_ms, @@ -104,7 +104,7 @@ class StressTestInteropClient { bool RunTest(TestCaseType test_case); int test_id_; - const grpc::string& server_address_; + const std::string& server_address_; ChannelCreationFunc channel_creation_func_; std::unique_ptr interop_client_; const WeightedRandomTestSelector& test_selector_; diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index 73c05e60f69..071b0e27da9 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -128,7 +128,7 @@ void TestLogFunction(gpr_log_func_args* args) { } } -TestCaseType GetTestTypeFromName(const grpc::string& test_name) { +TestCaseType GetTestTypeFromName(const std::string& test_name) { TestCaseType test_case = UNKNOWN_TEST; for (auto it = kTestCaseList.begin(); it != kTestCaseList.end(); it++) { @@ -142,12 +142,12 @@ TestCaseType GetTestTypeFromName(const grpc::string& test_name) { } // Converts a string of comma delimited tokens to a vector of tokens -bool ParseCommaDelimitedString(const grpc::string& comma_delimited_str, - std::vector& tokens) { +bool ParseCommaDelimitedString(const std::string& comma_delimited_str, + std::vector& tokens) { size_t bpos = 0; - size_t epos = grpc::string::npos; + size_t epos = std::string::npos; - while ((epos = comma_delimited_str.find(',', bpos)) != grpc::string::npos) { + while ((epos = comma_delimited_str.find(',', bpos)) != std::string::npos) { tokens.emplace_back(comma_delimited_str.substr(bpos, epos - bpos)); bpos = epos + 1; } @@ -160,23 +160,23 @@ bool ParseCommaDelimitedString(const grpc::string& comma_delimited_str, // Output: // - Whether parsing was successful (return value) // - Vector of (test_type_enum, weight) pairs returned via 'tests' parameter -bool ParseTestCasesString(const grpc::string& test_cases, +bool ParseTestCasesString(const std::string& test_cases, std::vector>& tests) { bool is_success = true; - std::vector tokens; + std::vector tokens; ParseCommaDelimitedString(test_cases, tokens); for (auto it = tokens.begin(); it != tokens.end(); it++) { // Token is in the form : size_t colon_pos = it->find(':'); - if (colon_pos == grpc::string::npos) { + if (colon_pos == std::string::npos) { gpr_log(GPR_ERROR, "Error in parsing test case string: %s", it->c_str()); is_success = false; break; } - grpc::string test_name = it->substr(0, colon_pos); + std::string test_name = it->substr(0, colon_pos); int weight = std::stoi(it->substr(colon_pos + 1)); TestCaseType test_case = GetTestTypeFromName(test_name); if (test_case == UNKNOWN_TEST) { @@ -192,7 +192,7 @@ bool ParseTestCasesString(const grpc::string& test_cases, } // For debugging purposes -void LogParameterInfo(const std::vector& addresses, +void LogParameterInfo(const std::vector& addresses, const std::vector>& tests) { gpr_log(GPR_INFO, "server_addresses: %s", FLAGS_server_addresses.c_str()); gpr_log(GPR_INFO, "test_cases : %s", FLAGS_test_cases.c_str()); @@ -237,7 +237,7 @@ int main(int argc, char** argv) { srand(time(nullptr)); // Parse the server addresses - std::vector server_addresses; + std::vector server_addresses; ParseCommaDelimitedString(FLAGS_server_addresses, server_addresses); // Parse test cases and weights @@ -285,7 +285,7 @@ int main(int argc, char** argv) { channel_idx); grpc::testing::ChannelCreationFunc channel_creation_func = std::bind( static_cast (*)( - const grpc::string&, const grpc::string&, + const std::string&, const std::string&, grpc::testing::transport_security, bool)>( grpc::CreateTestChannel), *it, FLAGS_server_host_override, security_type, !FLAGS_use_test_ca); diff --git a/test/cpp/ios/CronetTests/CppCronetEnd2EndTests.mm b/test/cpp/ios/CronetTests/CppCronetEnd2EndTests.mm index c6c3e3f345b..53ab3f710be 100644 --- a/test/cpp/ios/CronetTests/CppCronetEnd2EndTests.mm +++ b/test/cpp/ios/CronetTests/CppCronetEnd2EndTests.mm @@ -103,7 +103,7 @@ using grpc::ClientContext; ClientContext context; if (with_binary_metadata) { char bytes[8] = {'\0', '\1', '\2', '\3', '\4', '\5', '\6', static_cast(i)}; - context.AddMetadata("custom-bin", grpc::string(bytes, 8)); + context.AddMetadata("custom-bin", std::string(bytes, 8)); } context.set_compression_algorithm(GRPC_COMPRESS_GZIP); Status s = stub->Echo(&context, request, &response); @@ -257,7 +257,7 @@ using grpc::ClientContext; auto stream = stub->ResponseStream(&context, request); for (int i = 0; i < kServerDefaultResponseStreamsToSend; ++i) { XCTAssertTrue(stream->Read(&response)); - XCTAssertEqual(response.message(), request.message() + grpc::to_string(i)); + XCTAssertEqual(response.message(), request.message() + std::to_string(i)); } XCTAssertFalse(stream->Read(&response)); @@ -270,12 +270,12 @@ using grpc::ClientContext; EchoRequest request; EchoResponse response; ClientContext context; - grpc::string msg("hello"); + std::string msg("hello"); auto stream = stub->BidiStream(&context); for (int i = 0; i < kServerDefaultResponseStreamsToSend; ++i) { - request.set_message(msg + grpc::to_string(i)); + request.set_message(msg + std::to_string(i)); XCTAssertTrue(stream->Write(request)); XCTAssertTrue(stream->Read(&response)); XCTAssertEqual(response.message(), request.message()); @@ -296,7 +296,7 @@ using grpc::ClientContext; ClientContext context; context.AddMetadata(kServerFinishAfterNReads, "3"); context.set_initial_metadata_corked(true); - grpc::string msg("hello"); + std::string msg("hello"); auto stream = stub->BidiStream(&context); @@ -383,7 +383,7 @@ using grpc::ClientContext; EchoRequest request; EchoResponse response; ClientContext context; - grpc::string msg("hello"); + std::string msg("hello"); auto stream = stub->BidiStream(&context); @@ -436,7 +436,7 @@ using grpc::ClientContext; info->add_stack_entries("stack_entry_2"); info->add_stack_entries("stack_entry_3"); info->set_detail("detailed debug info"); - grpc::string expected_string = info->SerializeAsString(); + std::string expected_string = info->SerializeAsString(); request.set_message("Hello"); Status s = stub->Echo(&context, request, &response); diff --git a/test/cpp/ios/CronetTests/TestHelper.h b/test/cpp/ios/CronetTests/TestHelper.h index fb8a42d459a..0375d3d70f0 100644 --- a/test/cpp/ios/CronetTests/TestHelper.h +++ b/test/cpp/ios/CronetTests/TestHelper.h @@ -34,9 +34,9 @@ const char* const kServerResponseStreamsToSend = "server_responses_to_send"; const int kServerDefaultResponseStreamsToSend = 3; const char* const kDebugInfoTrailerKey = "debug-info-bin"; -grpc::string ToString(const grpc::string_ref& r); +std::string ToString(const grpc::string_ref& r); void configureCronet(void); -bool CheckIsLocalhost(const grpc::string& addr); +bool CheckIsLocalhost(const std::string& addr); class DummyInterceptor : public grpc::experimental::Interceptor { public: diff --git a/test/cpp/ios/CronetTests/TestHelper.mm b/test/cpp/ios/CronetTests/TestHelper.mm index 3b2d1803960..a5c69e3f7c4 100644 --- a/test/cpp/ios/CronetTests/TestHelper.mm +++ b/test/cpp/ios/CronetTests/TestHelper.mm @@ -31,7 +31,7 @@ using grpc::Status; std::atomic DummyInterceptor::num_times_run_; std::atomic DummyInterceptor::num_times_run_reverse_; -grpc::string ToString(const grpc::string_ref& r) { return grpc::string(r.data(), r.size()); } +std::string ToString(const grpc::string_ref& r) { return std::string(r.data(), r.size()); } void configureCronet(void) { static dispatch_once_t configureCronet; @@ -46,10 +46,10 @@ void configureCronet(void) { }); } -bool CheckIsLocalhost(const grpc::string& addr) { - const grpc::string kIpv6("[::1]:"); - const grpc::string kIpv4MappedIpv6("[::ffff:127.0.0.1]:"); - const grpc::string kIpv4("127.0.0.1:"); +bool CheckIsLocalhost(const std::string& addr) { + const std::string kIpv6("[::1]:"); + const std::string kIpv4MappedIpv6("[::ffff:127.0.0.1]:"); + const std::string kIpv4("127.0.0.1:"); return addr.substr(0, kIpv4.size()) == kIpv4 || addr.substr(0, kIpv4MappedIpv6.size()) == kIpv4MappedIpv6 || addr.substr(0, kIpv6.size()) == kIpv6; @@ -110,7 +110,7 @@ Status TestServiceImpl::Echo(ServerContext* context, const EchoRequest* request, // Terminate rpc with error and debug info in trailer. if (request->param().debug_info().stack_entries_size() || !request->param().debug_info().detail().empty()) { - grpc::string serialized_debug_info = request->param().debug_info().SerializeAsString(); + std::string serialized_debug_info = request->param().debug_info().SerializeAsString(); context->AddTrailingMetadata(kDebugInfoTrailerKey, serialized_debug_info); return Status::CANCELLED; } @@ -141,7 +141,7 @@ Status TestServiceImpl::ResponseStream(ServerContext* context, const EchoRequest GetIntValueFromMetadata(kServerResponseStreamsToSend, context->client_metadata(), kServerDefaultResponseStreamsToSend); for (int i = 0; i < server_responses_to_send; i++) { - response.set_message(request->message() + grpc::to_string(i)); + response.set_message(request->message() + std::to_string(i)); if (i == server_responses_to_send - 1) { writer->WriteLast(response, grpc::WriteOptions()); } else { diff --git a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h index 0d27e0efa50..4807f53529b 100644 --- a/test/cpp/microbenchmarks/callback_streaming_ping_pong.h +++ b/test/cpp/microbenchmarks/callback_streaming_ping_pong.h @@ -83,7 +83,7 @@ class BidiClient void StartNewRpc() { cli_ctx_->~ClientContext(); new (cli_ctx_) ClientContext(); - cli_ctx_->AddMetadata(kServerMessageSize, grpc::to_string(msgs_size_)); + cli_ctx_->AddMetadata(kServerMessageSize, std::to_string(msgs_size_)); stub_->experimental_async()->BidiStream(cli_ctx_, this); MaybeWrite(); StartCall(); diff --git a/test/cpp/microbenchmarks/callback_test_service.cc b/test/cpp/microbenchmarks/callback_test_service.cc index b81f21b40ec..3d52bce51d3 100644 --- a/test/cpp/microbenchmarks/callback_test_service.cc +++ b/test/cpp/microbenchmarks/callback_test_service.cc @@ -22,8 +22,8 @@ namespace grpc { namespace testing { namespace { -grpc::string ToString(const grpc::string_ref& r) { - return grpc::string(r.data(), r.size()); +std::string ToString(const grpc::string_ref& r) { + return std::string(r.data(), r.size()); } int GetIntValueFromMetadataHelper( diff --git a/test/cpp/microbenchmarks/callback_unary_ping_pong.h b/test/cpp/microbenchmarks/callback_unary_ping_pong.h index 359b91eb6fe..97a69ec9e56 100644 --- a/test/cpp/microbenchmarks/callback_unary_ping_pong.h +++ b/test/cpp/microbenchmarks/callback_unary_ping_pong.h @@ -41,7 +41,7 @@ void SendCallbackUnaryPingPong(benchmark::State* state, ClientContext* cli_ctx, EchoTestService::Stub* stub_, bool* done, std::mutex* mu, std::condition_variable* cv) { int response_msgs_size = state->range(1); - cli_ctx->AddMetadata(kServerMessageSize, grpc::to_string(response_msgs_size)); + cli_ctx->AddMetadata(kServerMessageSize, std::to_string(response_msgs_size)); stub_->experimental_async()->Echo( cli_ctx, request, response, [state, cli_ctx, request, response, stub_, done, mu, cv](Status s) { diff --git a/test/cpp/microbenchmarks/fullstack_context_mutators.h b/test/cpp/microbenchmarks/fullstack_context_mutators.h index f20263c519b..06a1d78f153 100644 --- a/test/cpp/microbenchmarks/fullstack_context_mutators.h +++ b/test/cpp/microbenchmarks/fullstack_context_mutators.h @@ -58,18 +58,16 @@ class NoOpMutator { template class RandomBinaryMetadata { public: - static const grpc::string& Key() { return kKey; } + static const std::string& Key() { return kKey; } - static const grpc::string& Value() { - return kValues[rand() % kValues.size()]; - } + static const std::string& Value() { return kValues[rand() % kValues.size()]; } private: - static const grpc::string kKey; - static const std::vector kValues; + static const std::string kKey; + static const std::vector kValues; - static grpc::string GenerateOneString() { - grpc::string s; + static std::string GenerateOneString() { + std::string s; s.reserve(length + 1); for (int i = 0; i < length; i++) { s += static_cast(rand()); @@ -81,18 +79,16 @@ class RandomBinaryMetadata { template class RandomAsciiMetadata { public: - static const grpc::string& Key() { return kKey; } + static const std::string& Key() { return kKey; } - static const grpc::string& Value() { - return kValues[rand() % kValues.size()]; - } + static const std::string& Value() { return kValues[rand() % kValues.size()]; } private: - static const grpc::string kKey; - static const std::vector kValues; + static const std::string kKey; + static const std::vector kValues; - static grpc::string GenerateOneString() { - grpc::string s; + static std::string GenerateOneString() { + std::string s; s.reserve(length + 1); for (int i = 0; i < length; i++) { s += static_cast(rand() % 26 + 'a'); @@ -124,17 +120,17 @@ class Server_AddInitialMetadata : public NoOpMutator { // static initialization template -const grpc::string RandomBinaryMetadata::kKey = "foo-bin"; +const std::string RandomBinaryMetadata::kKey = "foo-bin"; template -const std::vector RandomBinaryMetadata::kValues = +const std::vector RandomBinaryMetadata::kValues = MakeVector(kPregenerateKeyCount, GenerateOneString); template -const grpc::string RandomAsciiMetadata::kKey = "foo"; +const std::string RandomAsciiMetadata::kKey = "foo"; template -const std::vector RandomAsciiMetadata::kValues = +const std::vector RandomAsciiMetadata::kValues = MakeVector(kPregenerateKeyCount, GenerateOneString); } // namespace testing diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index deee5909ca0..4d399ff87d5 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -65,7 +65,7 @@ class BaseFixture : public TrackCounters {}; class FullstackFixture : public BaseFixture { public: FullstackFixture(Service* service, const FixtureConfiguration& config, - const grpc::string& address) { + const std::string& address) { ServerBuilder b; if (address.length() > 0) { b.AddListeningPort(address, InsecureServerCredentials()); @@ -120,7 +120,7 @@ class TCP : public FullstackFixture { private: int port_; - static grpc::string MakeAddress(int* port) { + static std::string MakeAddress(int* port) { *port = grpc_pick_unused_port_or_die(); std::stringstream addr; addr << "localhost:" << *port; @@ -139,7 +139,7 @@ class UDS : public FullstackFixture { private: int port_; - static grpc::string MakeAddress(int* port) { + static std::string MakeAddress(int* port) { *port = grpc_pick_unused_port_or_die(); // just for a unique id - not a // real port std::stringstream addr; diff --git a/test/cpp/microbenchmarks/helpers.cc b/test/cpp/microbenchmarks/helpers.cc index 98c6c73338d..8f1ffb06ae1 100644 --- a/test/cpp/microbenchmarks/helpers.cc +++ b/test/cpp/microbenchmarks/helpers.cc @@ -59,7 +59,7 @@ void TrackCounters::Finish(benchmark::State& state) { state.SetLabel(label.c_str()); } -void TrackCounters::AddLabel(const grpc::string& label) { +void TrackCounters::AddLabel(const std::string& label) { labels_.push_back(label); } diff --git a/test/cpp/microbenchmarks/helpers.h b/test/cpp/microbenchmarks/helpers.h index b712c85d354..cd5b9d90130 100644 --- a/test/cpp/microbenchmarks/helpers.h +++ b/test/cpp/microbenchmarks/helpers.h @@ -55,12 +55,12 @@ class TrackCounters { TrackCounters() { grpc_stats_collect(&stats_begin_); } virtual ~TrackCounters() {} virtual void Finish(benchmark::State& state); - virtual void AddLabel(const grpc::string& label); + virtual void AddLabel(const std::string& label); virtual void AddToLabel(std::ostream& out, benchmark::State& state); private: grpc_stats_data stats_begin_; - std::vector labels_; + std::vector labels_; #ifdef GPR_LOW_LEVEL_COUNTERS const size_t mu_locks_at_start_ = gpr_atm_no_barrier_load(&gpr_mu_locks); const size_t atm_cas_at_start_ = diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 7518a8b028d..ab6d72ab404 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -503,7 +503,7 @@ class ClientImpl : public Client { class ClientChannelInfo { public: ClientChannelInfo( - const grpc::string& target, const ClientConfig& config, + const std::string& target, const ClientConfig& config, std::function(std::shared_ptr)> create_stub, int shard) { @@ -511,7 +511,7 @@ class ClientImpl : public Client { args.SetInt("shard_to_ensure_no_subchannel_merges", shard); set_channel_args(config, &args); - grpc::string type; + std::string type; if (config.has_security_params() && config.security_params().cred_type().empty()) { type = kTlsCredentialsType; @@ -519,7 +519,7 @@ class ClientImpl : public Client { type = config.security_params().cred_type(); } - grpc::string inproc_pfx(INPROC_NAME_PREFIX); + std::string inproc_pfx(INPROC_NAME_PREFIX); if (target.find(inproc_pfx) != 0) { channel_ = CreateTestChannel( target, type, config.security_params().server_host_override(), @@ -528,7 +528,7 @@ class ClientImpl : public Client { gpr_log(GPR_INFO, "Connecting to %s", target.c_str()); is_inproc_ = false; } else { - grpc::string tgt = target; + std::string tgt = target; tgt.erase(0, inproc_pfx.length()); int srv_num = std::stoi(tgt); channel_ = (*g_inproc_servers)[srv_num]->InProcessChannel(args); diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 45082fd3e22..c3d9ae6de95 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -773,7 +773,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { std::function next_issue, std::function( grpc::GenericStub*, grpc::ClientContext*, - const grpc::string& method_name, CompletionQueue*)> + const std::string& method_name, CompletionQueue*)> prepare_req, std::function on_done) : context_(), @@ -874,7 +874,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { std::function callback_; std::function next_issue_; std::function( - grpc::GenericStub*, grpc::ClientContext*, const grpc::string&, + grpc::GenericStub*, grpc::ClientContext*, const std::string&, CompletionQueue*)> prepare_req_; grpc::Status status_; @@ -887,7 +887,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { void StartInternal(CompletionQueue* cq, int messages_per_stream) { cq_ = cq; - const grpc::string kMethodName( + const std::string kMethodName( "/grpc.testing.BenchmarkService/StreamingCall"); messages_per_stream_ = messages_per_stream; messages_issued_ = 0; @@ -917,7 +917,7 @@ class GenericAsyncStreamingClient final static void CheckDone(const grpc::Status& /*s*/, ByteBuffer* /*response*/) {} static std::unique_ptr PrepareReq( grpc::GenericStub* stub, grpc::ClientContext* ctx, - const grpc::string& method_name, CompletionQueue* cq) { + const std::string& method_name, CompletionQueue* cq) { auto stream = stub->PrepareCall(ctx, method_name, cq); return stream; }; diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index a4e474cf4bd..3fce130e013 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -359,8 +359,8 @@ std::unique_ptr RunScenario( const ClientConfig& initial_client_config, size_t num_clients, const ServerConfig& initial_server_config, size_t num_servers, int warmup_seconds, int benchmark_seconds, int spawn_local_worker_count, - const grpc::string& qps_server_target_override, - const grpc::string& credential_type, + const std::string& qps_server_target_override, + const std::string& credential_type, const std::map& per_worker_credential_types, bool run_inproc, int32_t median_latency_collection_interval_millis) { if (run_inproc) { @@ -650,7 +650,7 @@ std::unique_ptr RunScenario( } bool RunQuit( - const grpc::string& credential_type, + const std::string& credential_type, const std::map& per_worker_credential_types) { // Get client, server lists bool result = true; diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 568871d2daa..2e1d697cc2f 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -31,13 +31,13 @@ std::unique_ptr RunScenario( const grpc::testing::ClientConfig& client_config, size_t num_clients, const grpc::testing::ServerConfig& server_config, size_t num_servers, int warmup_seconds, int benchmark_seconds, int spawn_local_worker_count, - const grpc::string& qps_server_target_override, - const grpc::string& credential_type, + const std::string& qps_server_target_override, + const std::string& credential_type, const std::map& per_worker_credential_types, bool run_inproc, int32_t median_latency_collection_interval_millis); bool RunQuit( - const grpc::string& credential_type, + const std::string& credential_type, const std::map& per_worker_credential_types); } // namespace testing } // namespace grpc diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc index a98ae394dbe..387813daf62 100644 --- a/test/cpp/qps/parse_json.cc +++ b/test/cpp/qps/parse_json.cc @@ -27,17 +27,17 @@ namespace grpc { namespace testing { -void ParseJson(const grpc::string& json, const grpc::string& type, +void ParseJson(const std::string& json, const std::string& type, GRPC_CUSTOM_MESSAGE* msg) { std::unique_ptr type_resolver( google::protobuf::util::NewTypeResolverForDescriptorPool( "type.googleapis.com", google::protobuf::DescriptorPool::generated_pool())); - grpc::string binary; + std::string binary; auto status = JsonToBinaryString( type_resolver.get(), "type.googleapis.com/" + type, json, &binary); if (!status.ok()) { - grpc::string errmsg(status.error_message()); + std::string errmsg(status.error_message()); gpr_log(GPR_ERROR, "Failed to convert json to binary: errcode=%d msg=%s", status.error_code(), errmsg.c_str()); gpr_log(GPR_ERROR, "JSON: %s", json.c_str()); @@ -46,14 +46,14 @@ void ParseJson(const grpc::string& json, const grpc::string& type, GPR_ASSERT(msg->ParseFromString(binary)); } -grpc::string SerializeJson(const GRPC_CUSTOM_MESSAGE& msg, - const grpc::string& type) { +std::string SerializeJson(const GRPC_CUSTOM_MESSAGE& msg, + const std::string& type) { std::unique_ptr type_resolver( google::protobuf::util::NewTypeResolverForDescriptorPool( "type.googleapis.com", google::protobuf::DescriptorPool::generated_pool())); - grpc::string binary; - grpc::string json_string; + std::string binary; + std::string json_string; msg.SerializeToString(&binary); auto status = BinaryToJsonString(type_resolver.get(), type, binary, &json_string); diff --git a/test/cpp/qps/parse_json.h b/test/cpp/qps/parse_json.h index 089d9989ba6..6f61afc6222 100644 --- a/test/cpp/qps/parse_json.h +++ b/test/cpp/qps/parse_json.h @@ -25,11 +25,11 @@ namespace grpc { namespace testing { -void ParseJson(const grpc::string& json, const grpc::string& type, +void ParseJson(const std::string& json, const std::string& type, GRPC_CUSTOM_MESSAGE* msg); -grpc::string SerializeJson(const GRPC_CUSTOM_MESSAGE& msg, - const grpc::string& type); +std::string SerializeJson(const GRPC_CUSTOM_MESSAGE& msg, + const std::string& type); } // namespace testing } // namespace grpc diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index 1d67e79b868..c573e07072c 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -226,7 +226,7 @@ static double SearchOfferedLoad( } static bool QpsDriver() { - grpc::string json; + std::string json; bool scfile = (FLAGS_scenarios_file != ""); bool scjson = (FLAGS_scenarios_json != ""); @@ -249,7 +249,7 @@ static bool QpsDriver() { fseek(json_file, 0, SEEK_SET); GPR_ASSERT(len == (long)fread(data, 1, len, json_file)); fclose(json_file); - json = grpc::string(data, data + len); + json = std::string(data, data + len); delete[] data; } else if (scjson) { json = FLAGS_scenarios_json.c_str(); diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index c364216bc02..83c2afdeec7 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -275,7 +275,7 @@ class WorkerServiceImpl final : public WorkerService::Service { }; QpsWorker::QpsWorker(int driver_port, int server_port, - const grpc::string& credential_type) { + const std::string& credential_type) { impl_.reset(new WorkerServiceImpl(server_port, this)); gpr_atm_rel_store(&done_, static_cast(0)); diff --git a/test/cpp/qps/qps_worker.h b/test/cpp/qps/qps_worker.h index 3a8796ee5a8..841260c776d 100644 --- a/test/cpp/qps/qps_worker.h +++ b/test/cpp/qps/qps_worker.h @@ -39,7 +39,7 @@ extern std::vector* g_inproc_servers; class QpsWorker { public: explicit QpsWorker(int driver_port, int server_port, - const grpc::string& credential_type); + const std::string& credential_type); ~QpsWorker(); bool Done() const; diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index f9925ca015a..62bcb3bfe5b 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -164,7 +164,7 @@ void GprLogReporter::ReportQueriesPerCpuSec(const ScenarioResult& result) { } void JsonReporter::ReportQPS(const ScenarioResult& result) { - grpc::string json_string = + std::string json_string = SerializeJson(result, "type.googleapis.com/grpc.testing.ScenarioResult"); std::ofstream output_file(report_file_); output_file << json_string; diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 2b82abce202..9a90d1735e2 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -97,7 +97,7 @@ class Server { static std::shared_ptr CreateServerCredentials( const ServerConfig& config) { if (config.has_security_params()) { - grpc::string type; + std::string type; if (config.security_params().cred_type().empty()) { type = kTlsCredentialsType; } else { diff --git a/test/cpp/server/load_reporter/load_data_store_test.cc b/test/cpp/server/load_reporter/load_data_store_test.cc index da94d37d1cb..74fd3264351 100644 --- a/test/cpp/server/load_reporter/load_data_store_test.cc +++ b/test/cpp/server/load_reporter/load_data_store_test.cc @@ -50,8 +50,8 @@ class LoadDataStoreTest : public ::testing::Test { bool PerBalancerStoresContains( const LoadDataStore& load_data_store, const std::set* per_balancer_stores, - const grpc::string& hostname, const grpc::string& lb_id, - const grpc::string& load_key) { + const std::string& hostname, const std::string& lb_id, + const std::string& load_key) { auto original_per_balancer_store = load_data_store.FindPerBalancerStore(hostname, lb_id); EXPECT_NE(original_per_balancer_store, nullptr); @@ -65,26 +65,26 @@ class LoadDataStoreTest : public ::testing::Test { return false; } - grpc::string FormatLbId(size_t index) { + std::string FormatLbId(size_t index) { return "kLbId" + std::to_string(index); } - const grpc::string kHostname1 = "kHostname1"; - const grpc::string kHostname2 = "kHostname2"; - const grpc::string kLbId1 = "kLbId1"; - const grpc::string kLbId2 = "kLbId2"; - const grpc::string kLbId3 = "kLbId3"; - const grpc::string kLbId4 = "kLbId4"; - const grpc::string kLoadKey1 = "kLoadKey1"; - const grpc::string kLoadKey2 = "kLoadKey2"; - const grpc::string kLbTag1 = "kLbTag1"; - const grpc::string kLbTag2 = "kLbTag2"; - const grpc::string kUser1 = "kUser1"; - const grpc::string kUser2 = "kUser2"; - const grpc::string kClientIp1 = "00"; - const grpc::string kClientIp2 = "02"; - const grpc::string kMetric1 = "kMetric1"; - const grpc::string kMetric2 = "kMetric2"; + const std::string kHostname1 = "kHostname1"; + const std::string kHostname2 = "kHostname2"; + const std::string kLbId1 = "kLbId1"; + const std::string kLbId2 = "kLbId2"; + const std::string kLbId3 = "kLbId3"; + const std::string kLbId4 = "kLbId4"; + const std::string kLoadKey1 = "kLoadKey1"; + const std::string kLoadKey2 = "kLoadKey2"; + const std::string kLbTag1 = "kLbTag1"; + const std::string kLbTag2 = "kLbTag2"; + const std::string kUser1 = "kUser1"; + const std::string kUser2 = "kUser2"; + const std::string kClientIp1 = "00"; + const std::string kClientIp2 = "02"; + const std::string kMetric1 = "kMetric1"; + const std::string kMetric2 = "kMetric2"; const LoadRecordKey kKey1; const LoadRecordKey kKey2; }; @@ -144,17 +144,17 @@ TEST_F(LoadDataStoreTest, ReassignOrphanStores) { TEST_F(LoadDataStoreTest, OrphanAssignmentIsSticky) { LoadDataStore load_data_store; - std::set active_lb_ids; + std::set active_lb_ids; size_t num_lb_ids = 1000; for (size_t i = 0; i < num_lb_ids; ++i) { load_data_store.ReportStreamCreated(kHostname1, FormatLbId(i), kLoadKey1); active_lb_ids.insert(FormatLbId(i)); } - grpc::string orphaned_lb_id = FormatLbId(std::rand() % num_lb_ids); + std::string orphaned_lb_id = FormatLbId(std::rand() % num_lb_ids); load_data_store.ReportStreamClosed(kHostname1, orphaned_lb_id); active_lb_ids.erase(orphaned_lb_id); // Find which LB is assigned the orphaned store. - grpc::string assigned_lb_id = ""; + std::string assigned_lb_id = ""; for (const auto& lb_id : active_lb_ids) { if (PerBalancerStoresContains( load_data_store, @@ -168,7 +168,7 @@ TEST_F(LoadDataStoreTest, OrphanAssignmentIsSticky) { // Close 10 more stream, skipping the assigned_lb_id. The assignment of // orphaned_lb_id shouldn't change. for (size_t _ = 0; _ < 10; ++_) { - grpc::string lb_id_to_close = ""; + std::string lb_id_to_close = ""; for (const auto& lb_id : active_lb_ids) { if (lb_id != assigned_lb_id) { lb_id_to_close = lb_id; @@ -289,7 +289,7 @@ TEST_F(LoadDataStoreTest, ExactlyOnceAssignment) { for (size_t i = 0; i < num_close; ++i) { load_data_store.ReportStreamClosed(kHostname1, FormatLbId(i)); } - std::set reported_lb_ids; + std::set reported_lb_ids; for (size_t i = num_close; i < num_create; ++i) { for (auto assigned_store : *load_data_store.GetAssignedStores(kHostname1, FormatLbId(i))) { diff --git a/test/cpp/server/load_reporter/load_reporter_test.cc b/test/cpp/server/load_reporter/load_reporter_test.cc index 1866286069e..a859108a0e9 100644 --- a/test/cpp/server/load_reporter/load_reporter_test.cc +++ b/test/cpp/server/load_reporter/load_reporter_test.cc @@ -59,7 +59,7 @@ class MockCensusViewProvider : public CensusViewProvider { MOCK_METHOD0(FetchViewData, CensusViewProvider::ViewDataMap()); const ::opencensus::stats::ViewDescriptor& FindViewDescriptor( - const grpc::string& view_name) { + const std::string& view_name) { auto it = view_descriptor_map().find(view_name); GPR_ASSERT(it != view_descriptor_map().end()); return it->second; @@ -98,29 +98,29 @@ class LoadReporterTest : public ::testing::Test { std::unique_ptr load_reporter_; - const grpc::string kHostname1 = "kHostname1"; - const grpc::string kHostname2 = "kHostname2"; - const grpc::string kHostname3 = "kHostname3"; + const std::string kHostname1 = "kHostname1"; + const std::string kHostname2 = "kHostname2"; + const std::string kHostname3 = "kHostname3"; // Pad to the length of a valid LB ID. - const grpc::string kLbId1 = "kLbId111"; - const grpc::string kLbId2 = "kLbId222"; - const grpc::string kLbId3 = "kLbId333"; - const grpc::string kLbId4 = "kLbId444"; - const grpc::string kLoadKey1 = "kLoadKey1"; - const grpc::string kLoadKey2 = "kLoadKey2"; - const grpc::string kLoadKey3 = "kLoadKey3"; - const grpc::string kLbTag1 = "kLbTag1"; - const grpc::string kLbTag2 = "kLbTag2"; - const grpc::string kLbToken1 = "kLbId111kLbTag1"; - const grpc::string kLbToken2 = "kLbId222kLbTag2"; - const grpc::string kUser1 = "kUser1"; - const grpc::string kUser2 = "kUser2"; - const grpc::string kUser3 = "kUser3"; - const grpc::string kClientIp0 = "00"; - const grpc::string kClientIp1 = "0800000001"; - const grpc::string kClientIp2 = "3200000000000000000000000000000002"; - const grpc::string kMetric1 = "kMetric1"; - const grpc::string kMetric2 = "kMetric2"; + const std::string kLbId1 = "kLbId111"; + const std::string kLbId2 = "kLbId222"; + const std::string kLbId3 = "kLbId333"; + const std::string kLbId4 = "kLbId444"; + const std::string kLoadKey1 = "kLoadKey1"; + const std::string kLoadKey2 = "kLoadKey2"; + const std::string kLoadKey3 = "kLoadKey3"; + const std::string kLbTag1 = "kLbTag1"; + const std::string kLbTag2 = "kLbTag2"; + const std::string kLbToken1 = "kLbId111kLbTag1"; + const std::string kLbToken2 = "kLbId222kLbTag2"; + const std::string kUser1 = "kUser1"; + const std::string kUser2 = "kUser2"; + const std::string kUser3 = "kUser3"; + const std::string kClientIp0 = "00"; + const std::string kClientIp1 = "0800000001"; + const std::string kClientIp2 = "3200000000000000000000000000000002"; + const std::string kMetric1 = "kMetric1"; + const std::string kMetric2 = "kMetric2"; private: void SetUp() override { diff --git a/test/cpp/server/server_builder_test.cc b/test/cpp/server/server_builder_test.cc index e07ae8dbc66..df78708a83c 100644 --- a/test/cpp/server/server_builder_test.cc +++ b/test/cpp/server/server_builder_test.cc @@ -32,15 +32,15 @@ namespace { testing::EchoTestService::Service g_service; -grpc::string MakePort() { +std::string MakePort() { std::ostringstream s; int p = grpc_pick_unused_port_or_die(); s << "localhost:" << p; return s.str(); } -const grpc::string& GetPort() { - static grpc::string g_port = MakePort(); +const std::string& GetPort() { + static std::string g_port = MakePort(); return g_port; } diff --git a/test/cpp/test/server_context_test_spouse_test.cc b/test/cpp/test/server_context_test_spouse_test.cc index e199a0fe3d1..d4531a82c3f 100644 --- a/test/cpp/test/server_context_test_spouse_test.cc +++ b/test/cpp/test/server_context_test_spouse_test.cc @@ -62,28 +62,28 @@ TEST(ServerContextTestSpouseTest, ClientMetadata) { TEST(ServerContextTestSpouseTest, InitialMetadata) { ServerContext context; ServerContextTestSpouse spouse(&context); - std::multimap metadata; + std::multimap metadata; context.AddInitialMetadata(key1, val1); - metadata.insert(std::pair(key1, val1)); + metadata.insert(std::pair(key1, val1)); ASSERT_EQ(metadata, spouse.GetInitialMetadata()); context.AddInitialMetadata(key2, val2); - metadata.insert(std::pair(key2, val2)); + metadata.insert(std::pair(key2, val2)); ASSERT_EQ(metadata, spouse.GetInitialMetadata()); } TEST(ServerContextTestSpouseTest, TrailingMetadata) { ServerContext context; ServerContextTestSpouse spouse(&context); - std::multimap metadata; + std::multimap metadata; context.AddTrailingMetadata(key1, val1); - metadata.insert(std::pair(key1, val1)); + metadata.insert(std::pair(key1, val1)); ASSERT_EQ(metadata, spouse.GetTrailingMetadata()); context.AddTrailingMetadata(key2, val2); - metadata.insert(std::pair(key2, val2)); + metadata.insert(std::pair(key2, val2)); ASSERT_EQ(metadata, spouse.GetTrailingMetadata()); } diff --git a/test/cpp/util/byte_buffer_proto_helper.cc b/test/cpp/util/byte_buffer_proto_helper.cc index 37098955d40..3dabb6b8c92 100644 --- a/test/cpp/util/byte_buffer_proto_helper.cc +++ b/test/cpp/util/byte_buffer_proto_helper.cc @@ -24,7 +24,7 @@ namespace testing { bool ParseFromByteBuffer(ByteBuffer* buffer, grpc::protobuf::Message* message) { std::vector slices; (void)buffer->Dump(&slices); - grpc::string buf; + std::string buf; buf.reserve(buffer->Length()); for (auto s = slices.begin(); s != slices.end(); s++) { buf.append(reinterpret_cast(s->begin()), s->size()); @@ -34,7 +34,7 @@ bool ParseFromByteBuffer(ByteBuffer* buffer, grpc::protobuf::Message* message) { std::unique_ptr SerializeToByteBuffer( grpc::protobuf::Message* message) { - grpc::string buf; + std::string buf; message->SerializeToString(&buf); Slice slice(buf); return std::unique_ptr(new ByteBuffer(&slice, 1)); @@ -42,7 +42,7 @@ std::unique_ptr SerializeToByteBuffer( bool SerializeToByteBufferInPlace(grpc::protobuf::Message* message, ByteBuffer* buffer) { - grpc::string buf; + std::string buf; if (!message->SerializeToString(&buf)) { return false; } diff --git a/test/cpp/util/channel_trace_proto_helper.cc b/test/cpp/util/channel_trace_proto_helper.cc index 301bac45d07..88fb7e423dc 100644 --- a/test/cpp/util/channel_trace_proto_helper.cc +++ b/test/cpp/util/channel_trace_proto_helper.cc @@ -49,7 +49,7 @@ void VaidateProtoJsonTranslation(const std::string& json_str) { grpc::protobuf::util::Status s = grpc::protobuf::json::JsonStringToMessage(json_str, &msg, parse_options); EXPECT_TRUE(s.ok()); - grpc::string proto_json_str; + std::string proto_json_str; grpc::protobuf::json::JsonPrintOptions print_options; // We usually do not want this to be true, however it can be helpful to // uncomment and see the output produced then all fields are printed. diff --git a/test/cpp/util/cli_call.cc b/test/cpp/util/cli_call.cc index 91eddb2ce84..049588f860f 100644 --- a/test/cpp/util/cli_call.cc +++ b/test/cpp/util/cli_call.cc @@ -35,8 +35,8 @@ void* tag(int i) { return (void*)static_cast(i); } } // namespace Status CliCall::Call(const std::shared_ptr& channel, - const grpc::string& method, const grpc::string& request, - grpc::string* response, + const std::string& method, const std::string& request, + std::string* response, const OutgoingMetadataContainer& metadata, IncomingMetadataContainer* server_initial_metadata, IncomingMetadataContainer* server_trailing_metadata) { @@ -50,7 +50,7 @@ Status CliCall::Call(const std::shared_ptr& channel, } CliCall::CliCall(const std::shared_ptr& channel, - const grpc::string& method, + const std::string& method, const OutgoingMetadataContainer& metadata) : stub_(new grpc::GenericStub(channel)) { gpr_mu_init(&write_mu_); @@ -74,7 +74,7 @@ CliCall::~CliCall() { gpr_mu_destroy(&write_mu_); } -void CliCall::Write(const grpc::string& request) { +void CliCall::Write(const std::string& request) { void* got_tag; bool ok; @@ -86,7 +86,7 @@ void CliCall::Write(const grpc::string& request) { GPR_ASSERT(ok); } -bool CliCall::Read(grpc::string* response, +bool CliCall::Read(std::string* response, IncomingMetadataContainer* server_initial_metadata) { void* got_tag; bool ok; @@ -120,7 +120,7 @@ void CliCall::WritesDone() { GPR_ASSERT(ok); } -void CliCall::WriteAndWait(const grpc::string& request) { +void CliCall::WriteAndWait(const std::string& request) { grpc::Slice req_slice(request); grpc::ByteBuffer send_buffer(&req_slice, 1); @@ -144,8 +144,7 @@ void CliCall::WritesDoneAndWait() { } bool CliCall::ReadAndMaybeNotifyWrite( - grpc::string* response, - IncomingMetadataContainer* server_initial_metadata) { + std::string* response, IncomingMetadataContainer* server_initial_metadata) { void* got_tag; bool ok; grpc::ByteBuffer recv_buffer; diff --git a/test/cpp/util/cli_call.h b/test/cpp/util/cli_call.h index 853d43d7f15..b431ded9c62 100644 --- a/test/cpp/util/cli_call.h +++ b/test/cpp/util/cli_call.h @@ -40,36 +40,35 @@ namespace testing { // and thread-unsafe methods should not be used together. class CliCall final { public: - typedef std::multimap OutgoingMetadataContainer; + typedef std::multimap OutgoingMetadataContainer; typedef std::multimap IncomingMetadataContainer; CliCall(const std::shared_ptr& channel, - const grpc::string& method, - const OutgoingMetadataContainer& metadata); + const std::string& method, const OutgoingMetadataContainer& metadata); ~CliCall(); // Perform an unary generic RPC. static Status Call(const std::shared_ptr& channel, - const grpc::string& method, const grpc::string& request, - grpc::string* response, + const std::string& method, const std::string& request, + std::string* response, const OutgoingMetadataContainer& metadata, IncomingMetadataContainer* server_initial_metadata, IncomingMetadataContainer* server_trailing_metadata); // Send a generic request message in a synchronous manner. NOT thread-safe. - void Write(const grpc::string& request); + void Write(const std::string& request); // Send a generic request message in a synchronous manner. NOT thread-safe. void WritesDone(); // Receive a generic response message in a synchronous manner.NOT thread-safe. - bool Read(grpc::string* response, + bool Read(std::string* response, IncomingMetadataContainer* server_initial_metadata); // Thread-safe write. Must be used with ReadAndMaybeNotifyWrite. Send out a // generic request message and wait for ReadAndMaybeNotifyWrite to finish it. - void WriteAndWait(const grpc::string& request); + void WriteAndWait(const std::string& request); // Thread-safe WritesDone. Must be used with ReadAndMaybeNotifyWrite. Send out // WritesDone for gereneric request messages and wait for @@ -79,7 +78,7 @@ class CliCall final { // Thread-safe Read. Blockingly receive a generic response message. Notify // writes if they are finished when this read is waiting for a resposne. bool ReadAndMaybeNotifyWrite( - grpc::string* response, + std::string* response, IncomingMetadataContainer* server_initial_metadata); // Finish the RPC. diff --git a/test/cpp/util/cli_call_test.cc b/test/cpp/util/cli_call_test.cc index a91705bd514..51c2424bd71 100644 --- a/test/cpp/util/cli_call_test.cc +++ b/test/cpp/util/cli_call_test.cc @@ -100,14 +100,14 @@ TEST_F(CliCallTest, SimpleRpc) { EXPECT_EQ(response.message(), request.message()); EXPECT_TRUE(s.ok()); - const grpc::string kMethod("/grpc.testing.EchoTestService/Echo"); - grpc::string request_bin, response_bin, expected_response_bin; + const std::string kMethod("/grpc.testing.EchoTestService/Echo"); + std::string request_bin, response_bin, expected_response_bin; EXPECT_TRUE(request.SerializeToString(&request_bin)); EXPECT_TRUE(response.SerializeToString(&expected_response_bin)); - std::multimap client_metadata; + std::multimap client_metadata; std::multimap server_initial_metadata, server_trailing_metadata; - client_metadata.insert(std::pair("key1", "val1")); + client_metadata.insert(std::pair("key1", "val1")); Status s2 = CliCall::Call(channel_, kMethod, request_bin, &response_bin, client_metadata, &server_initial_metadata, &server_trailing_metadata); diff --git a/test/cpp/util/cli_credentials.cc b/test/cpp/util/cli_credentials.cc index 207bef13825..7384612fedc 100644 --- a/test/cpp/util/cli_credentials.cc +++ b/test/cpp/util/cli_credentials.cc @@ -69,21 +69,21 @@ const char ACCESS_TOKEN_PREFIX[] = "access_token="; constexpr int ACCESS_TOKEN_PREFIX_LEN = sizeof(ACCESS_TOKEN_PREFIX) / sizeof(*ACCESS_TOKEN_PREFIX) - 1; -bool IsAccessToken(const grpc::string& auth) { +bool IsAccessToken(const std::string& auth) { return auth.length() > ACCESS_TOKEN_PREFIX_LEN && auth.compare(0, ACCESS_TOKEN_PREFIX_LEN, ACCESS_TOKEN_PREFIX) == 0; } -grpc::string AccessToken(const grpc::string& auth) { +std::string AccessToken(const std::string& auth) { if (!IsAccessToken(auth)) { return ""; } - return grpc::string(auth, ACCESS_TOKEN_PREFIX_LEN); + return std::string(auth, ACCESS_TOKEN_PREFIX_LEN); } } // namespace -grpc::string CliCredentials::GetDefaultChannelCredsType() const { +std::string CliCredentials::GetDefaultChannelCredsType() const { // Compatibility logic for --enable_ssl. if (FLAGS_enable_ssl) { fprintf(stderr, @@ -101,12 +101,12 @@ grpc::string CliCredentials::GetDefaultChannelCredsType() const { return "insecure"; } -grpc::string CliCredentials::GetDefaultCallCreds() const { +std::string CliCredentials::GetDefaultCallCreds() const { if (!FLAGS_access_token.empty()) { fprintf(stderr, "warning: --access_token is deprecated. Use " "--call_creds=access_token=.\n"); - return grpc::string("access_token=") + FLAGS_access_token; + return std::string("access_token=") + FLAGS_access_token; } return "none"; } @@ -216,7 +216,7 @@ std::shared_ptr CliCredentials::GetCredentials() : grpc::CompositeChannelCredentials(channel_creds, call_creds); } -const grpc::string CliCredentials::GetCredentialUsage() const { +const std::string CliCredentials::GetCredentialUsage() const { return " --enable_ssl ; Set whether to use ssl " "(deprecated)\n" " --use_auth ; Set whether to create default google" @@ -235,7 +235,7 @@ const grpc::string CliCredentials::GetCredentialUsage() const { " access_token=\n"; } -const grpc::string CliCredentials::GetSslTargetNameOverride() const { +const std::string CliCredentials::GetSslTargetNameOverride() const { bool use_ssl = FLAGS_channel_creds_type.compare("ssl") == 0 || FLAGS_channel_creds_type.compare("gdc") == 0; return use_ssl ? FLAGS_ssl_target : ""; diff --git a/test/cpp/util/cli_credentials.h b/test/cpp/util/cli_credentials.h index 472c7abef29..8595eb425d1 100644 --- a/test/cpp/util/cli_credentials.h +++ b/test/cpp/util/cli_credentials.h @@ -29,16 +29,16 @@ class CliCredentials { public: virtual ~CliCredentials() {} std::shared_ptr GetCredentials() const; - virtual const grpc::string GetCredentialUsage() const; - virtual const grpc::string GetSslTargetNameOverride() const; + virtual const std::string GetCredentialUsage() const; + virtual const std::string GetSslTargetNameOverride() const; protected: // Returns the appropriate channel_creds_type value for the set of legacy // flag arguments. - virtual grpc::string GetDefaultChannelCredsType() const; + virtual std::string GetDefaultChannelCredsType() const; // Returns the appropriate call_creds value for the set of legacy flag // arguments. - virtual grpc::string GetDefaultCallCreds() const; + virtual std::string GetDefaultCallCreds() const; // Returns the base transport channel credentials. Child classes can override // to support additional channel_creds_types unknown to this base class. virtual std::shared_ptr GetChannelCredentials() diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index c4ba24749a6..b2551150f2a 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -86,8 +86,8 @@ void MaybeSetCustomChannelArgs(grpc::ChannelArguments* args) { // same as above // CreateTestChannel("", "ssl", "test.google.com:443", true, creds); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& cred_type, - const grpc::string& override_hostname, bool use_prod_roots, + const std::string& server, const std::string& cred_type, + const std::string& override_hostname, bool use_prod_roots, const std::shared_ptr& creds, const ChannelArguments& args) { return CreateTestChannel(server, cred_type, override_hostname, use_prod_roots, @@ -96,7 +96,7 @@ std::shared_ptr CreateTestChannel( } std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots, const std::shared_ptr& creds, const ChannelArguments& args) { @@ -106,7 +106,7 @@ std::shared_ptr CreateTestChannel( } std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots, const std::shared_ptr& creds) { return CreateTestChannel(server, override_hostname, security_type, @@ -114,7 +114,7 @@ std::shared_ptr CreateTestChannel( } std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots) { return CreateTestChannel(server, override_hostname, security_type, use_prod_roots, std::shared_ptr()); @@ -122,12 +122,12 @@ std::shared_ptr CreateTestChannel( // Shortcut for end2end and interop tests. std::shared_ptr CreateTestChannel( - const grpc::string& server, testing::transport_security security_type) { + const std::string& server, testing::transport_security security_type) { return CreateTestChannel(server, "foo.test.google.fr", security_type, false); } std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& credential_type, + const std::string& server, const std::string& credential_type, const std::shared_ptr& creds) { ChannelArguments channel_args; MaybeSetCustomChannelArgs(&channel_args); @@ -142,8 +142,8 @@ std::shared_ptr CreateTestChannel( } std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& cred_type, - const grpc::string& override_hostname, bool use_prod_roots, + const std::string& server, const std::string& cred_type, + const std::string& override_hostname, bool use_prod_roots, const std::shared_ptr& creds, const ChannelArguments& args, std::vector< std::unique_ptr> @@ -175,8 +175,7 @@ std::shared_ptr CreateTestChannel( } GPR_ASSERT(channel_creds != nullptr); - const grpc::string& connect_to = - server.empty() ? override_hostname : server; + const std::string& connect_to = server.empty() ? override_hostname : server; if (creds.get()) { channel_creds = grpc::CompositeChannelCredentials(channel_creds, creds); } @@ -203,13 +202,13 @@ std::shared_ptr CreateTestChannel( } std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots, const std::shared_ptr& creds, const ChannelArguments& args, std::vector< std::unique_ptr> interceptor_creators) { - grpc::string credential_type = + std::string credential_type = security_type == testing::ALTS ? testing::kAltsCredentialsType : (security_type == testing::TLS ? testing::kTlsCredentialsType @@ -220,7 +219,7 @@ std::shared_ptr CreateTestChannel( } std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots, const std::shared_ptr& creds, std::vector< @@ -232,7 +231,7 @@ std::shared_ptr CreateTestChannel( } std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& credential_type, + const std::string& server, const std::string& credential_type, const std::shared_ptr& creds, std::vector< std::unique_ptr> diff --git a/test/cpp/util/create_test_channel.h b/test/cpp/util/create_test_channel.h index 2aacbc9bdf3..fe3c4152b9a 100644 --- a/test/cpp/util/create_test_channel.h +++ b/test/cpp/util/create_test_channel.h @@ -40,35 +40,35 @@ typedef enum { INSECURE = 0, TLS, ALTS } transport_security; } // namespace testing std::shared_ptr CreateTestChannel( - const grpc::string& server, testing::transport_security security_type); + const std::string& server, testing::transport_security security_type); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots, const std::shared_ptr& creds); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots, const std::shared_ptr& creds, const ChannelArguments& args); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& cred_type, - const grpc::string& override_hostname, bool use_prod_roots, + const std::string& server, const std::string& cred_type, + const std::string& override_hostname, bool use_prod_roots, const std::shared_ptr& creds, const ChannelArguments& args); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& credential_type, + const std::string& server, const std::string& credential_type, const std::shared_ptr& creds); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots, const std::shared_ptr& creds, std::vector< @@ -76,7 +76,7 @@ std::shared_ptr CreateTestChannel( interceptor_creators); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& override_hostname, + const std::string& server, const std::string& override_hostname, testing::transport_security security_type, bool use_prod_roots, const std::shared_ptr& creds, const ChannelArguments& args, std::vector< @@ -84,15 +84,15 @@ std::shared_ptr CreateTestChannel( interceptor_creators); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& cred_type, - const grpc::string& override_hostname, bool use_prod_roots, + const std::string& server, const std::string& cred_type, + const std::string& override_hostname, bool use_prod_roots, const std::shared_ptr& creds, const ChannelArguments& args, std::vector< std::unique_ptr> interceptor_creators); std::shared_ptr CreateTestChannel( - const grpc::string& server, const grpc::string& credential_type, + const std::string& server, const std::string& credential_type, const std::shared_ptr& creds, std::vector< std::unique_ptr> diff --git a/test/cpp/util/error_details_test.cc b/test/cpp/util/error_details_test.cc index f71dfc0df99..d88005267f8 100644 --- a/test/cpp/util/error_details_test.cc +++ b/test/cpp/util/error_details_test.cc @@ -30,11 +30,11 @@ TEST(ExtractTest, Success) { expected.set_code(13); // INTERNAL expected.set_message("I am an error message"); testing::EchoRequest expected_details; - expected_details.set_message(grpc::string(100, '\0')); + expected_details.set_message(std::string(100, '\0')); expected.add_details()->PackFrom(expected_details); google::rpc::Status to; - grpc::string error_details = expected.SerializeAsString(); + std::string error_details = expected.SerializeAsString(); Status from(static_cast(expected.code()), expected.message(), error_details); EXPECT_TRUE(ExtractErrorDetails(from, &to).ok()); @@ -52,7 +52,7 @@ TEST(ExtractTest, NullInput) { } TEST(ExtractTest, Unparsable) { - grpc::string error_details("I am not a status object"); + std::string error_details("I am not a status object"); Status from(StatusCode::INTERNAL, "", error_details); google::rpc::Status to; EXPECT_EQ(StatusCode::INVALID_ARGUMENT, @@ -64,7 +64,7 @@ TEST(SetTest, Success) { expected.set_code(13); // INTERNAL expected.set_message("I am an error message"); testing::EchoRequest expected_details; - expected_details.set_message(grpc::string(100, '\0')); + expected_details.set_message(std::string(100, '\0')); expected.add_details()->PackFrom(expected_details); Status to; @@ -85,7 +85,7 @@ TEST(SetTest, OutOfScopeErrorCode) { expected.set_code(17); // Out of scope (UNAUTHENTICATED is 16). expected.set_message("I am an error message"); testing::EchoRequest expected_details; - expected_details.set_message(grpc::string(100, '\0')); + expected_details.set_message(std::string(100, '\0')); expected.add_details()->PackFrom(expected_details); Status to; @@ -102,7 +102,7 @@ TEST(SetTest, ValidScopeErrorCode) { expected.set_code(c); expected.set_message("I am an error message"); testing::EchoRequest expected_details; - expected_details.set_message(grpc::string(100, '\0')); + expected_details.set_message(std::string(100, '\0')); expected.add_details()->PackFrom(expected_details); Status to; diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 663b44b9f56..5c840ff540d 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -68,8 +68,7 @@ DEFINE_string(outfile, "", "Output file (default is stdout)"); -static bool SimplePrint(const grpc::string& outfile, - const grpc::string& output) { +static bool SimplePrint(const std::string& outfile, const std::string& output) { if (outfile.empty()) { std::cout << output << std::flush; } else { diff --git a/test/cpp/util/grpc_tool.cc b/test/cpp/util/grpc_tool.cc index a7bdb2b54ff..10959988590 100644 --- a/test/cpp/util/grpc_tool.cc +++ b/test/cpp/util/grpc_tool.cc @@ -106,10 +106,10 @@ class GrpcTool { } private: - void CommandUsage(const grpc::string& usage) const; + void CommandUsage(const std::string& usage) const; bool print_command_usage_; int usage_exit_status_; - const grpc::string cred_usage_; + const std::string cred_usage_; }; template @@ -128,11 +128,11 @@ size_t ArraySize(T& a) { } void ParseMetadataFlag( - std::multimap* client_metadata) { + std::multimap* client_metadata) { if (FLAGS_metadata.empty()) { return; } - std::vector fields; + std::vector fields; const char delim = ':'; const char escape = '\\'; size_t cur = -1; @@ -165,17 +165,17 @@ void ParseMetadataFlag( } for (size_t i = 0; i < fields.size(); i += 2) { client_metadata->insert( - std::pair(fields[i], fields[i + 1])); + std::pair(fields[i], fields[i + 1])); } } template -void PrintMetadata(const T& m, const grpc::string& message) { +void PrintMetadata(const T& m, const std::string& message) { if (m.empty()) { return; } fprintf(stderr, "%s\n", message.c_str()); - grpc::string pair; + std::string pair; for (typename T::const_iterator iter = m.begin(); iter != m.end(); ++iter) { pair.clear(); pair.append(iter->first.data(), iter->first.size()); @@ -185,10 +185,10 @@ void PrintMetadata(const T& m, const grpc::string& message) { } } -void ReadResponse(CliCall* call, const grpc::string& method_name, +void ReadResponse(CliCall* call, const std::string& method_name, GrpcToolOutputCallback callback, ProtoFileParser* parser, gpr_mu* parser_mu, bool print_mode) { - grpc::string serialized_response_proto; + std::string serialized_response_proto; std::multimap server_initial_metadata; for (bool receive_initial_metadata = true; call->ReadAndMaybeNotifyWrite( @@ -217,7 +217,7 @@ void ReadResponse(CliCall* call, const grpc::string& method_name, } std::shared_ptr CreateCliChannel( - const grpc::string& server_address, const CliCredentials& cred) { + const std::string& server_address, const CliCredentials& cred) { grpc::ChannelArguments args; if (!cred.GetSslTargetNameOverride().empty()) { args.SetSslTargetNameOverride(cred.GetSslTargetNameOverride()); @@ -251,7 +251,7 @@ const Command ops[] = { {"tojson", BindWith5Args(&GrpcTool::ToJson), 2, 3}, }; -void Usage(const grpc::string& msg) { +void Usage(const std::string& msg) { fprintf( stderr, "%s\n" @@ -269,7 +269,7 @@ void Usage(const grpc::string& msg) { exit(1); } -const Command* FindCommand(const grpc::string& name) { +const Command* FindCommand(const std::string& name) { for (int i = 0; i < (int)ArraySize(ops); i++) { if (name == ops[i].command) { return &ops[i]; @@ -285,7 +285,7 @@ int GrpcToolMainLib(int argc, const char** argv, const CliCredentials& cred, Usage("No command specified"); } - grpc::string command = argv[1]; + std::string command = argv[1]; argc -= 2; argv += 2; @@ -301,14 +301,14 @@ int GrpcToolMainLib(int argc, const char** argv, const CliCredentials& cred, const bool ok = cmd->function(&grpc_tool, argc, argv, cred, callback); return ok ? 0 : 1; } else { - Usage("Invalid command '" + grpc::string(command.c_str()) + "'"); + Usage("Invalid command '" + std::string(command.c_str()) + "'"); } return 1; } GrpcTool::GrpcTool() : print_command_usage_(false), usage_exit_status_(0) {} -void GrpcTool::CommandUsage(const grpc::string& usage) const { +void GrpcTool::CommandUsage(const std::string& usage) const { if (print_command_usage_) { fprintf(stderr, "\n%s%s\n", usage.c_str(), (usage.empty() || usage[usage.size() - 1] != '\n') ? "\n" : ""); @@ -327,7 +327,7 @@ bool GrpcTool::Help(int argc, const char** argv, const CliCredentials& cred, } else { const Command* cmd = FindCommand(argv[0]); if (cmd == nullptr) { - Usage("Unknown command '" + grpc::string(argv[0]) + "'"); + Usage("Unknown command '" + std::string(argv[0]) + "'"); } SetPrintCommandMode(0); cmd->function(this, -1, nullptr, cred, callback); @@ -348,20 +348,20 @@ bool GrpcTool::ListServices(int argc, const char** argv, " --outfile ; Output filename (defaults to stdout)\n" + cred.GetCredentialUsage()); - grpc::string server_address(argv[0]); + std::string server_address(argv[0]); std::shared_ptr channel = CreateCliChannel(server_address, cred); grpc::ProtoReflectionDescriptorDatabase desc_db(channel); grpc::protobuf::DescriptorPool desc_pool(&desc_db); - std::vector service_list; + std::vector service_list; if (!desc_db.GetServices(&service_list)) { fprintf(stderr, "Received an error when querying services endpoint.\n"); return false; } // If no service is specified, dump the list of services. - grpc::string output; + std::string output; if (argc < 2) { // List all services, if --l is passed, then include full description, // otherwise include a summarized list only. @@ -375,8 +375,8 @@ bool GrpcTool::ListServices(int argc, const char** argv, } } } else { - grpc::string service_name; - grpc::string method_name; + std::string service_name; + std::string method_name; std::stringstream ss(argv[1]); // Remove leading slashes. @@ -446,13 +446,13 @@ bool GrpcTool::PrintType(int /*argc*/, const char** argv, " ; Protocol buffer type name\n" + cred.GetCredentialUsage()); - grpc::string server_address(argv[0]); + std::string server_address(argv[0]); std::shared_ptr channel = CreateCliChannel(server_address, cred); grpc::ProtoReflectionDescriptorDatabase desc_db(channel); grpc::protobuf::DescriptorPool desc_pool(&desc_db); - grpc::string output; + std::string output; const grpc::protobuf::Descriptor* descriptor = desc_pool.FindMessageTypeByName(argv[1]); if (descriptor != nullptr) { @@ -490,12 +490,12 @@ bool GrpcTool::CallMethod(int argc, const char** argv, cred.GetCredentialUsage()); std::stringstream output_ss; - grpc::string request_text; - grpc::string server_address(argv[0]); - grpc::string method_name(argv[1]); - grpc::string formatted_method_name; + std::string request_text; + std::string server_address(argv[0]); + std::string method_name(argv[1]); + std::string formatted_method_name; std::unique_ptr parser; - grpc::string serialized_request_proto; + std::string serialized_request_proto; bool print_mode = false; std::shared_ptr channel = @@ -536,7 +536,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv, return false; } - std::multimap client_metadata; + std::multimap client_metadata; ParseMetadataFlag(&client_metadata); PrintMetadata(client_metadata, "Sending client initial metadata:"); @@ -559,7 +559,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv, parser.get(), &parser_mu, print_mode); std::stringstream request_ss; - grpc::string line; + std::string line; while (!request_text.empty() || (!input_stream->eof() && getline(*input_stream, line))) { if (!request_text.empty()) { @@ -589,7 +589,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv, } else { if (line.length() == 0) { request_text = request_ss.str(); - request_ss.str(grpc::string()); + request_ss.str(std::string()); request_ss.clear(); } else { request_ss << line << ' '; @@ -639,14 +639,14 @@ bool GrpcTool::CallMethod(int argc, const char** argv, input_stream = &input_file; } - std::multimap client_metadata; + std::multimap client_metadata; ParseMetadataFlag(&client_metadata); if (print_mode) { PrintMetadata(client_metadata, "Sending client initial metadata:"); } std::stringstream request_ss; - grpc::string line; + std::string line; while (!request_text.empty() || (!input_stream->eof() && getline(*input_stream, line))) { if (!request_text.empty()) { @@ -666,7 +666,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv, } } - grpc::string serialized_response_proto; + std::string serialized_response_proto; std::multimap server_initial_metadata, server_trailing_metadata; CliCall call(channel, formatted_method_name, client_metadata); @@ -692,7 +692,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv, break; } } else { - grpc::string response_text = parser->GetFormattedStringFromMethod( + std::string response_text = parser->GetFormattedStringFromMethod( method_name, serialized_response_proto, false /* is_request */, FLAGS_json_output); @@ -714,7 +714,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv, } else { if (line.length() == 0) { request_text = request_ss.str(); - request_ss.str(grpc::string()); + request_ss.str(std::string()); request_ss.clear(); } else { request_ss << line << ' '; @@ -760,8 +760,8 @@ bool GrpcTool::CallMethod(int argc, const char** argv, } fprintf(stderr, "connecting to %s\n", server_address.c_str()); - grpc::string serialized_response_proto; - std::multimap client_metadata; + std::string serialized_response_proto; + std::multimap client_metadata; std::multimap server_initial_metadata, server_trailing_metadata; ParseMetadataFlag(&client_metadata); @@ -832,11 +832,11 @@ bool GrpcTool::ParseMessage(int argc, const char** argv, cred.GetCredentialUsage()); std::stringstream output_ss; - grpc::string message_text; - grpc::string server_address(argv[0]); - grpc::string type_name(argv[1]); + std::string message_text; + std::string server_address(argv[0]); + std::string type_name(argv[1]); std::unique_ptr parser; - grpc::string serialized_request_proto; + std::string serialized_request_proto; if (argc == 3) { message_text = argv[2]; @@ -886,7 +886,7 @@ bool GrpcTool::ParseMessage(int argc, const char** argv, if (FLAGS_binary_output) { output_ss << serialized_request_proto; } else { - grpc::string output_text; + std::string output_text; output_text = parser->GetFormattedStringFromMessageType( type_name, serialized_request_proto, FLAGS_json_output); if (parser->HasError()) { diff --git a/test/cpp/util/grpc_tool.h b/test/cpp/util/grpc_tool.h index fb53af77c85..e998807cc61 100644 --- a/test/cpp/util/grpc_tool.h +++ b/test/cpp/util/grpc_tool.h @@ -28,7 +28,7 @@ namespace grpc { namespace testing { -typedef std::function GrpcToolOutputCallback; +typedef std::function GrpcToolOutputCallback; int GrpcToolMainLib(int argc, const char** argv, const CliCredentials& cred, GrpcToolOutputCallback callback); diff --git a/test/cpp/util/grpc_tool_test.cc b/test/cpp/util/grpc_tool_test.cc index 5d15e8c183a..c98a7d1d2a8 100644 --- a/test/cpp/util/grpc_tool_test.cc +++ b/test/cpp/util/grpc_tool_test.cc @@ -143,13 +143,13 @@ class TestCliCredentials final : public grpc::testing::CliCredentials { grpc_slice_unref(ca_slice); return credential_ptr; } - const grpc::string GetCredentialUsage() const override { return ""; } + const std::string GetCredentialUsage() const override { return ""; } private: const bool secure_; }; -bool PrintStream(std::stringstream* ss, const grpc::string& output) { +bool PrintStream(std::stringstream* ss, const std::string& output) { (*ss) << output; return true; } @@ -212,7 +212,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service { EchoResponse response; for (int i = 0; i < kServerDefaultResponseStreamsToSend; i++) { - response.set_message(request->message() + grpc::to_string(i)); + response.set_message(request->message() + std::to_string(i)); writer->Write(response); } @@ -252,7 +252,7 @@ class GrpcToolTest : public ::testing::Test { // SetUpServer cannot be used with EXPECT_EXIT. grpc_pick_unused_port_or_die() // uses atexit() to free chosen ports, and it will spawn a new thread in // resolve_address_posix.c:192 at exit time. - const grpc::string SetUpServer(bool secure = false) { + const std::string SetUpServer(bool secure = false) { std::ostringstream server_address; int port = grpc_pick_unused_port_or_die(); server_address << "localhost:" << port; @@ -338,7 +338,7 @@ TEST_F(GrpcToolTest, ListCommand) { // Test input "grpc_cli list localhost:" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "ls", server_address.c_str()}; FLAGS_l = false; @@ -356,7 +356,7 @@ TEST_F(GrpcToolTest, ListOneService) { // Test input "grpc_cli list localhost: grpc.testing.EchoTestService" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "ls", server_address.c_str(), "grpc.testing.EchoTestService"}; // without -l flag @@ -369,7 +369,7 @@ TEST_F(GrpcToolTest, ListOneService) { strcmp(output_stream.str().c_str(), ECHO_TEST_SERVICE_SUMMARY)); // with -l flag - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); FLAGS_l = true; EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(), @@ -386,7 +386,7 @@ TEST_F(GrpcToolTest, TypeCommand) { // Test input "grpc_cli type localhost: grpc.testing.EchoRequest" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "type", server_address.c_str(), "grpc.testing.EchoRequest"}; @@ -407,7 +407,7 @@ TEST_F(GrpcToolTest, ListOneMethod) { // Test input "grpc_cli list localhost: grpc.testing.EchoTestService" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "ls", server_address.c_str(), "grpc.testing.EchoTestService.Echo"}; // without -l flag @@ -419,7 +419,7 @@ TEST_F(GrpcToolTest, ListOneMethod) { EXPECT_TRUE(0 == strcmp(output_stream.str().c_str(), "Echo\n")); // with -l flag - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); FLAGS_l = true; EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(), @@ -436,7 +436,7 @@ TEST_F(GrpcToolTest, TypeNotFound) { // Test input "grpc_cli type localhost: grpc.testing.DummyRequest" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "type", server_address.c_str(), "grpc.testing.DummyRequest"}; @@ -450,7 +450,7 @@ TEST_F(GrpcToolTest, CallCommand) { // Test input "grpc_cli call localhost: Echo "message: 'Hello'" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo", "message: 'Hello'"}; @@ -462,7 +462,7 @@ TEST_F(GrpcToolTest, CallCommand) { strstr(output_stream.str().c_str(), "message: \"Hello\"")); // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); FLAGS_json_output = true; @@ -485,7 +485,7 @@ TEST_F(GrpcToolTest, CallCommandJsonInput) { // Test input "grpc_cli call localhost: Echo "{ \"message\": \"Hello\"}" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo", "{ \"message\": \"Hello\"}"}; @@ -498,7 +498,7 @@ TEST_F(GrpcToolTest, CallCommandJsonInput) { strstr(output_stream.str().c_str(), "message: \"Hello\"")); // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); FLAGS_json_output = true; @@ -522,7 +522,7 @@ TEST_F(GrpcToolTest, CallCommandBatch) { // Test input "grpc_cli call Echo" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo", "message: 'Hello0'"}; @@ -543,7 +543,7 @@ TEST_F(GrpcToolTest, CallCommandBatch) { "message: \"Hello0\"\nmessage: " "\"Hello1\"\nmessage: \"Hello2\"\n")); // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); ss.clear(); ss.seekg(0); @@ -582,7 +582,7 @@ TEST_F(GrpcToolTest, CallCommandBatchJsonInput) { // Test input "grpc_cli call Echo" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo", "{\"message\": \"Hello0\"}"}; @@ -605,7 +605,7 @@ TEST_F(GrpcToolTest, CallCommandBatchJsonInput) { "message: \"Hello0\"\nmessage: " "\"Hello1\"\nmessage: \"Hello2\"\n")); // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); ss.clear(); ss.seekg(0); @@ -645,7 +645,7 @@ TEST_F(GrpcToolTest, CallCommandBatchWithBadRequest) { // Test input "grpc_cli call Echo" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo", "message: 'Hello0'"}; @@ -665,7 +665,7 @@ TEST_F(GrpcToolTest, CallCommandBatchWithBadRequest) { "message: \"Hello0\"\nmessage: \"Hello2\"\n")); // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); ss.clear(); ss.seekg(0); @@ -700,7 +700,7 @@ TEST_F(GrpcToolTest, CallCommandBatchJsonInputWithBadRequest) { // Test input "grpc_cli call Echo" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo", "{ \"message\": \"Hello0\"}"}; @@ -723,7 +723,7 @@ TEST_F(GrpcToolTest, CallCommandBatchJsonInputWithBadRequest) { "message: \"Hello0\"\nmessage: \"Hello2\"\n")); // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); ss.clear(); ss.seekg(0); @@ -761,7 +761,7 @@ TEST_F(GrpcToolTest, CallCommandRequestStream) { // 'Hello0'" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "RequestStream", "message: 'Hello0'"}; @@ -786,7 +786,7 @@ TEST_F(GrpcToolTest, CallCommandRequestStreamJsonInput) { // \"Hello0\"}" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "RequestStream", "{ \"message\": \"Hello0\" }"}; @@ -814,7 +814,7 @@ TEST_F(GrpcToolTest, CallCommandRequestStreamWithBadRequest) { // 'Hello0'" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "RequestStream", "message: 'Hello0'"}; @@ -839,7 +839,7 @@ TEST_F(GrpcToolTest, CallCommandRequestStreamWithBadRequestJsonInput) { // 'Hello0'" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "RequestStream", "{ \"message\": \"Hello0\" }"}; @@ -867,7 +867,7 @@ TEST_F(GrpcToolTest, CallCommandResponseStream) { // 'Hello'" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "ResponseStream", "message: 'Hello'"}; @@ -877,14 +877,14 @@ TEST_F(GrpcToolTest, CallCommandResponseStream) { // Expected output: "message: \"Hello{n}\"" for (int i = 0; i < kServerDefaultResponseStreamsToSend; i++) { - grpc::string expected_response_text = - "message: \"Hello" + grpc::to_string(i) + "\"\n"; + std::string expected_response_text = + "message: \"Hello" + std::to_string(i) + "\"\n"; EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(), expected_response_text.c_str())); } // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); FLAGS_json_output = true; @@ -895,8 +895,8 @@ TEST_F(GrpcToolTest, CallCommandResponseStream) { // Expected output: "{\n \"message\": \"Hello{n}\"\n}\n" for (int i = 0; i < kServerDefaultResponseStreamsToSend; i++) { - grpc::string expected_response_text = - "{\n \"message\": \"Hello" + grpc::to_string(i) + "\"\n}\n"; + std::string expected_response_text = + "{\n \"message\": \"Hello" + std::to_string(i) + "\"\n}\n"; EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(), expected_response_text.c_str())); } @@ -908,7 +908,7 @@ TEST_F(GrpcToolTest, CallCommandBidiStream) { // Test input: grpc_cli call localhost: BidiStream "message: 'Hello0'" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "BidiStream", "message: 'Hello0'"}; @@ -934,7 +934,7 @@ TEST_F(GrpcToolTest, CallCommandBidiStreamWithBadRequest) { // Test input: grpc_cli call localhost: BidiStream "message: 'Hello0'" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "BidiStream", "message: 'Hello0'"}; @@ -962,7 +962,7 @@ TEST_F(GrpcToolTest, ParseCommand) { std::stringstream output_stream; std::stringstream binary_output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "parse", server_address.c_str(), "grpc.testing.EchoResponse", ECHO_RESPONSE_MESSAGE_TEXT_FORMAT}; @@ -977,7 +977,7 @@ TEST_F(GrpcToolTest, ParseCommand) { ECHO_RESPONSE_MESSAGE_TEXT_FORMAT)); // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); FLAGS_json_output = true; @@ -991,14 +991,14 @@ TEST_F(GrpcToolTest, ParseCommand) { ECHO_RESPONSE_MESSAGE_JSON_FORMAT)); // Parse text message to binary message and then parse it back to text message - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); FLAGS_binary_output = true; EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(), std::bind(PrintStream, &output_stream, std::placeholders::_1))); - grpc::string binary_data = output_stream.str(); - output_stream.str(grpc::string()); + std::string binary_data = output_stream.str(); + output_stream.str(std::string()); output_stream.clear(); argv[4] = binary_data.c_str(); FLAGS_binary_input = true; @@ -1022,7 +1022,7 @@ TEST_F(GrpcToolTest, ParseCommandJsonFormat) { std::stringstream output_stream; std::stringstream binary_output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "parse", server_address.c_str(), "grpc.testing.EchoResponse", ECHO_RESPONSE_MESSAGE_JSON_FORMAT}; @@ -1037,7 +1037,7 @@ TEST_F(GrpcToolTest, ParseCommandJsonFormat) { ECHO_RESPONSE_MESSAGE_TEXT_FORMAT)); // with json_output - output_stream.str(grpc::string()); + output_stream.str(std::string()); output_stream.clear(); FLAGS_json_output = true; @@ -1087,7 +1087,7 @@ TEST_F(GrpcToolTest, TooManyArguments) { TEST_F(GrpcToolTest, CallCommandWithMetadata) { // Test input "grpc_cli call localhost: Echo "message: 'Hello'" - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo", "message: 'Hello'"}; @@ -1171,7 +1171,7 @@ TEST_F(GrpcToolTest, CallCommandWithBadMetadata) { } TEST_F(GrpcToolTest, ListCommand_OverrideSslHostName) { - const grpc::string server_address = SetUpServer(true); + const std::string server_address = SetUpServer(true); // Test input "grpc_cli ls localhost: --channel_creds_type=ssl // --ssl_target=z.test.google.fr" @@ -1197,7 +1197,7 @@ TEST_F(GrpcToolTest, ConfiguringDefaultServiceConfig) { // Test input "grpc_cli list localhost: // --default_service_config={\"loadBalancingConfig\":[{\"pick_first\":{}}]}" std::stringstream output_stream; - const grpc::string server_address = SetUpServer(); + const std::string server_address = SetUpServer(); const char* argv[] = {"grpc_cli", "ls", server_address.c_str()}; // Just check that the tool is still operational when --default_service_config // is configured. This particular service config is in reality redundant with diff --git a/test/cpp/util/metrics_server.cc b/test/cpp/util/metrics_server.cc index 1143de5710d..9504c700fa9 100644 --- a/test/cpp/util/metrics_server.cc +++ b/test/cpp/util/metrics_server.cc @@ -81,7 +81,7 @@ grpc::Status MetricsServiceImpl::GetGauge(ServerContext* /*context*/, } std::shared_ptr MetricsServiceImpl::CreateQpsGauge( - const grpc::string& name, bool* already_present) { + const std::string& name, bool* already_present) { std::lock_guard lock(mu_); std::shared_ptr qps_gauge(new QpsGauge()); @@ -100,7 +100,7 @@ std::shared_ptr MetricsServiceImpl::CreateQpsGauge( std::unique_ptr MetricsServiceImpl::StartServer(int port) { gpr_log(GPR_INFO, "Building metrics server.."); - const grpc::string address = "0.0.0.0:" + grpc::to_string(port); + const std::string address = "0.0.0.0:" + std::to_string(port); ServerBuilder builder; builder.AddListeningPort(address, grpc::InsecureServerCredentials()); diff --git a/test/cpp/util/metrics_server.h b/test/cpp/util/metrics_server.h index 08f6034c28e..732e8520489 100644 --- a/test/cpp/util/metrics_server.h +++ b/test/cpp/util/metrics_server.h @@ -82,7 +82,7 @@ class MetricsServiceImpl final : public MetricsService::Service { // is already present in the map. // NOTE: CreateQpsGauge can be called anytime (i.e before or after calling // StartServer). - std::shared_ptr CreateQpsGauge(const grpc::string& name, + std::shared_ptr CreateQpsGauge(const std::string& name, bool* already_present); std::unique_ptr StartServer(int port); diff --git a/test/cpp/util/proto_file_parser.cc b/test/cpp/util/proto_file_parser.cc index 68ecfeae2c3..89ec917b78a 100644 --- a/test/cpp/util/proto_file_parser.cc +++ b/test/cpp/util/proto_file_parser.cc @@ -30,8 +30,8 @@ namespace testing { namespace { // Match the user input method string to the full_name from method descriptor. -bool MethodNameMatch(const grpc::string& full_name, const grpc::string& input) { - grpc::string clean_input = input; +bool MethodNameMatch(const std::string& full_name, const std::string& input) { + std::string clean_input = input; std::replace(clean_input.begin(), clean_input.end(), '/', '.'); if (clean_input.size() > full_name.size()) { return false; @@ -45,16 +45,16 @@ class ErrorPrinter : public protobuf::compiler::MultiFileErrorCollector { public: explicit ErrorPrinter(ProtoFileParser* parser) : parser_(parser) {} - void AddError(const grpc::string& filename, int line, int column, - const grpc::string& message) override { + void AddError(const std::string& filename, int line, int column, + const std::string& message) override { std::ostringstream oss; oss << "error " << filename << " " << line << " " << column << " " << message << "\n"; parser_->LogError(oss.str()); } - void AddWarning(const grpc::string& filename, int line, int column, - const grpc::string& message) override { + void AddWarning(const std::string& filename, int line, int column, + const std::string& message) override { std::cerr << "warning " << filename << " " << line << " " << column << " " << message << std::endl; } @@ -64,24 +64,24 @@ class ErrorPrinter : public protobuf::compiler::MultiFileErrorCollector { }; ProtoFileParser::ProtoFileParser(const std::shared_ptr& channel, - const grpc::string& proto_path, - const grpc::string& protofiles) + const std::string& proto_path, + const std::string& protofiles) : has_error_(false), dynamic_factory_(new protobuf::DynamicMessageFactory()) { - std::vector service_list; + std::vector service_list; if (channel) { reflection_db_.reset(new grpc::ProtoReflectionDescriptorDatabase(channel)); reflection_db_->GetServices(&service_list); } - std::unordered_set known_services; + std::unordered_set known_services; if (!protofiles.empty()) { source_tree_.MapPath("", proto_path); error_printer_.reset(new ErrorPrinter(this)); importer_.reset( new protobuf::compiler::Importer(&source_tree_, error_printer_.get())); - grpc::string file_name; + std::string file_name; std::stringstream ss(protofiles); while (std::getline(ss, file_name, ',')) { const auto* file_desc = importer_->Import(file_name); @@ -127,7 +127,7 @@ ProtoFileParser::ProtoFileParser(const std::shared_ptr& channel, ProtoFileParser::~ProtoFileParser() {} -grpc::string ProtoFileParser::GetFullMethodName(const grpc::string& method) { +std::string ProtoFileParser::GetFullMethodName(const std::string& method) { has_error_ = false; if (known_methods_.find(method) != known_methods_.end()) { @@ -164,25 +164,24 @@ grpc::string ProtoFileParser::GetFullMethodName(const grpc::string& method) { return method_descriptor->full_name(); } -grpc::string ProtoFileParser::GetFormattedMethodName( - const grpc::string& method) { +std::string ProtoFileParser::GetFormattedMethodName(const std::string& method) { has_error_ = false; - grpc::string formatted_method_name = GetFullMethodName(method); + std::string formatted_method_name = GetFullMethodName(method); if (has_error_) { return ""; } size_t last_dot = formatted_method_name.find_last_of('.'); - if (last_dot != grpc::string::npos) { + if (last_dot != std::string::npos) { formatted_method_name[last_dot] = '/'; } formatted_method_name.insert(formatted_method_name.begin(), '/'); return formatted_method_name; } -grpc::string ProtoFileParser::GetMessageTypeFromMethod( - const grpc::string& method, bool is_request) { +std::string ProtoFileParser::GetMessageTypeFromMethod(const std::string& method, + bool is_request) { has_error_ = false; - grpc::string full_method_name = GetFullMethodName(method); + std::string full_method_name = GetFullMethodName(method); if (has_error_) { return ""; } @@ -197,10 +196,10 @@ grpc::string ProtoFileParser::GetMessageTypeFromMethod( : method_desc->output_type()->full_name(); } -bool ProtoFileParser::IsStreaming(const grpc::string& method, bool is_request) { +bool ProtoFileParser::IsStreaming(const std::string& method, bool is_request) { has_error_ = false; - grpc::string full_method_name = GetFullMethodName(method); + std::string full_method_name = GetFullMethodName(method); if (has_error_) { return false; } @@ -216,11 +215,11 @@ bool ProtoFileParser::IsStreaming(const grpc::string& method, bool is_request) { : method_desc->server_streaming(); } -grpc::string ProtoFileParser::GetSerializedProtoFromMethod( - const grpc::string& method, const grpc::string& formatted_proto, +std::string ProtoFileParser::GetSerializedProtoFromMethod( + const std::string& method, const std::string& formatted_proto, bool is_request, bool is_json_format) { has_error_ = false; - grpc::string message_type_name = GetMessageTypeFromMethod(method, is_request); + std::string message_type_name = GetMessageTypeFromMethod(method, is_request); if (has_error_) { return ""; } @@ -228,11 +227,11 @@ grpc::string ProtoFileParser::GetSerializedProtoFromMethod( is_json_format); } -grpc::string ProtoFileParser::GetFormattedStringFromMethod( - const grpc::string& method, const grpc::string& serialized_proto, +std::string ProtoFileParser::GetFormattedStringFromMethod( + const std::string& method, const std::string& serialized_proto, bool is_request, bool is_json_format) { has_error_ = false; - grpc::string message_type_name = GetMessageTypeFromMethod(method, is_request); + std::string message_type_name = GetMessageTypeFromMethod(method, is_request); if (has_error_) { return ""; } @@ -240,11 +239,11 @@ grpc::string ProtoFileParser::GetFormattedStringFromMethod( is_json_format); } -grpc::string ProtoFileParser::GetSerializedProtoFromMessageType( - const grpc::string& message_type_name, const grpc::string& formatted_proto, +std::string ProtoFileParser::GetSerializedProtoFromMessageType( + const std::string& message_type_name, const std::string& formatted_proto, bool is_json_format) { has_error_ = false; - grpc::string serialized; + std::string serialized; const protobuf::Descriptor* desc = desc_pool_->FindMessageTypeByName(message_type_name); if (!desc) { @@ -278,8 +277,8 @@ grpc::string ProtoFileParser::GetSerializedProtoFromMessageType( return serialized; } -grpc::string ProtoFileParser::GetFormattedStringFromMessageType( - const grpc::string& message_type_name, const grpc::string& serialized_proto, +std::string ProtoFileParser::GetFormattedStringFromMessageType( + const std::string& message_type_name, const std::string& serialized_proto, bool is_json_format) { has_error_ = false; const protobuf::Descriptor* desc = @@ -294,7 +293,7 @@ grpc::string ProtoFileParser::GetFormattedStringFromMessageType( LogError("Failed to deserialize proto."); return ""; } - grpc::string formatted_string; + std::string formatted_string; if (is_json_format) { grpc::protobuf::json::JsonPrintOptions jsonPrintOptions; @@ -314,7 +313,7 @@ grpc::string ProtoFileParser::GetFormattedStringFromMessageType( return formatted_string; } -void ProtoFileParser::LogError(const grpc::string& error_msg) { +void ProtoFileParser::LogError(const std::string& error_msg) { if (!error_msg.empty()) { std::cerr << error_msg << std::endl; } diff --git a/test/cpp/util/proto_file_parser.h b/test/cpp/util/proto_file_parser.h index 114f5cba7c6..38abbc12cb9 100644 --- a/test/cpp/util/proto_file_parser.h +++ b/test/cpp/util/proto_file_parser.h @@ -37,8 +37,7 @@ class ProtoFileParser { // provided on the given channel. The given protofiles in a source tree rooted // from proto_path will also be searched. ProtoFileParser(const std::shared_ptr& channel, - const grpc::string& proto_path, - const grpc::string& protofiles); + const std::string& proto_path, const std::string& protofiles); ~ProtoFileParser(); @@ -47,11 +46,11 @@ class ProtoFileParser { // there is ambiguity. // Full method name is in the form of Service.Method, it's good to be used in // descriptor database queries. - grpc::string GetFullMethodName(const grpc::string& method); + std::string GetFullMethodName(const std::string& method); // Formatted method name is in the form of /Service/Method, it's good to be // used as the argument of Stub::Call() - grpc::string GetFormattedMethodName(const grpc::string& method); + std::string GetFormattedMethodName(const std::string& method); /// Converts a text or json string to its binary proto representation for the /// given method's input or return type. @@ -64,18 +63,18 @@ class ProtoFileParser { /// json-formatted proto, otherwise it is treated as a text-formatted /// proto /// \return the serialised binary proto representation of \c formatted_proto - grpc::string GetSerializedProtoFromMethod(const grpc::string& method, - const grpc::string& formatted_proto, - bool is_request, - bool is_json_format); + std::string GetSerializedProtoFromMethod(const std::string& method, + const std::string& formatted_proto, + bool is_request, + bool is_json_format); /// Converts a text or json string to its proto representation for the given /// message type. /// \param formatted_proto the text- or json-formatted proto string /// \return the serialised binary proto representation of \c formatted_proto - grpc::string GetSerializedProtoFromMessageType( - const grpc::string& message_type_name, - const grpc::string& formatted_proto, bool is_json_format); + std::string GetSerializedProtoFromMessageType( + const std::string& message_type_name, const std::string& formatted_proto, + bool is_json_format); /// Converts a binary proto string to its text or json string representation /// for the given method's input or return type. @@ -84,31 +83,32 @@ class ProtoFileParser { /// \param the serialised binary proto representation of type /// \c message_type_name /// \return the text- or json-formatted proto string of \c serialized_proto - grpc::string GetFormattedStringFromMethod( - const grpc::string& method, const grpc::string& serialized_proto, - bool is_request, bool is_json_format); + std::string GetFormattedStringFromMethod(const std::string& method, + const std::string& serialized_proto, + bool is_request, + bool is_json_format); /// Converts a binary proto string to its text or json string representation /// for the given message type. /// \param the serialised binary proto representation of type /// \c message_type_name /// \return the text- or json-formatted proto string of \c serialized_proto - grpc::string GetFormattedStringFromMessageType( - const grpc::string& message_type_name, - const grpc::string& serialized_proto, bool is_json_format); + std::string GetFormattedStringFromMessageType( + const std::string& message_type_name, const std::string& serialized_proto, + bool is_json_format); - bool IsStreaming(const grpc::string& method, bool is_request); + bool IsStreaming(const std::string& method, bool is_request); bool HasError() const { return has_error_; } - void LogError(const grpc::string& error_msg); + void LogError(const std::string& error_msg); private: - grpc::string GetMessageTypeFromMethod(const grpc::string& method, - bool is_request); + std::string GetMessageTypeFromMethod(const std::string& method, + bool is_request); bool has_error_; - grpc::string request_text_; + std::string request_text_; protobuf::compiler::DiskSourceTree source_tree_; std::unique_ptr error_printer_; std::unique_ptr importer_; @@ -119,7 +119,7 @@ class ProtoFileParser { std::unique_ptr dynamic_factory_; std::unique_ptr request_prototype_; std::unique_ptr response_prototype_; - std::unordered_map known_methods_; + std::unordered_map known_methods_; std::vector service_desc_list_; }; diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index d0c1a847253..f2c18f5c23f 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -257,7 +257,7 @@ bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( } bool ProtoReflectionDescriptorDatabase::GetServices( - std::vector* output) { + std::vector* output) { ServerReflectionRequest request; request.set_list_services(""); ServerReflectionResponse response; @@ -292,7 +292,7 @@ bool ProtoReflectionDescriptorDatabase::GetServices( const protobuf::FileDescriptorProto ProtoReflectionDescriptorDatabase::ParseFileDescriptorProtoResponse( - const grpc::string& byte_fd_proto) { + const std::string& byte_fd_proto) { protobuf::FileDescriptorProto file_desc_proto; file_desc_proto.ParseFromString(byte_fd_proto); return file_desc_proto; diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index e91546ff3a0..a1ceeadb3bd 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -74,7 +74,7 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase { std::vector* output) override; // Provide a list of full names of registered services - bool GetServices(std::vector* output); + bool GetServices(std::vector* output); private: typedef ClientReaderWriter< @@ -83,7 +83,7 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase { ClientStream; const protobuf::FileDescriptorProto ParseFileDescriptorProtoResponse( - const grpc::string& byte_fd_proto); + const std::string& byte_fd_proto); void AddFileFromResponse( const grpc::reflection::v1alpha::FileDescriptorResponse& response); diff --git a/test/cpp/util/service_describer.cc b/test/cpp/util/service_describer.cc index 169f6cf9350..f5b6208df6d 100644 --- a/test/cpp/util/service_describer.cc +++ b/test/cpp/util/service_describer.cc @@ -26,8 +26,8 @@ namespace grpc { namespace testing { -grpc::string DescribeServiceList(std::vector service_list, - grpc::protobuf::DescriptorPool& desc_pool) { +std::string DescribeServiceList(std::vector service_list, + grpc::protobuf::DescriptorPool& desc_pool) { std::stringstream result; for (auto it = service_list.begin(); it != service_list.end(); it++) { auto const& service = *it; @@ -40,16 +40,16 @@ grpc::string DescribeServiceList(std::vector service_list, return result.str(); } -grpc::string DescribeService(const grpc::protobuf::ServiceDescriptor* service) { - grpc::string result; +std::string DescribeService(const grpc::protobuf::ServiceDescriptor* service) { + std::string result; if (service->options().deprecated()) { result.append("DEPRECATED\n"); } result.append("filename: " + service->file()->name() + "\n"); - grpc::string package = service->full_name(); + std::string package = service->full_name(); size_t pos = package.rfind("." + service->name()); - if (pos != grpc::string::npos) { + if (pos != std::string::npos) { package.erase(pos); result.append("package: " + package + ";\n"); } @@ -61,7 +61,7 @@ grpc::string DescribeService(const grpc::protobuf::ServiceDescriptor* service) { return result; } -grpc::string DescribeMethod(const grpc::protobuf::MethodDescriptor* method) { +std::string DescribeMethod(const grpc::protobuf::MethodDescriptor* method) { std::stringstream result; result << " rpc " << method->name() << (method->client_streaming() ? "(stream " : "(") @@ -74,17 +74,16 @@ grpc::string DescribeMethod(const grpc::protobuf::MethodDescriptor* method) { return result.str(); } -grpc::string SummarizeService( - const grpc::protobuf::ServiceDescriptor* service) { - grpc::string result; +std::string SummarizeService(const grpc::protobuf::ServiceDescriptor* service) { + std::string result; for (int i = 0; i < service->method_count(); ++i) { result.append(SummarizeMethod(service->method(i))); } return result; } -grpc::string SummarizeMethod(const grpc::protobuf::MethodDescriptor* method) { - grpc::string result = method->name(); +std::string SummarizeMethod(const grpc::protobuf::MethodDescriptor* method) { + std::string result = method->name(); result.append("\n"); return result; } diff --git a/test/cpp/util/service_describer.h b/test/cpp/util/service_describer.h index f7ef50c7bb7..b342d4d68ba 100644 --- a/test/cpp/util/service_describer.h +++ b/test/cpp/util/service_describer.h @@ -25,16 +25,16 @@ namespace grpc { namespace testing { -grpc::string DescribeServiceList(std::vector service_list, - grpc::protobuf::DescriptorPool& desc_pool); +std::string DescribeServiceList(std::vector service_list, + grpc::protobuf::DescriptorPool& desc_pool); -grpc::string DescribeService(const grpc::protobuf::ServiceDescriptor* service); +std::string DescribeService(const grpc::protobuf::ServiceDescriptor* service); -grpc::string DescribeMethod(const grpc::protobuf::MethodDescriptor* method); +std::string DescribeMethod(const grpc::protobuf::MethodDescriptor* method); -grpc::string SummarizeService(const grpc::protobuf::ServiceDescriptor* service); +std::string SummarizeService(const grpc::protobuf::ServiceDescriptor* service); -grpc::string SummarizeMethod(const grpc::protobuf::MethodDescriptor* method); +std::string SummarizeMethod(const grpc::protobuf::MethodDescriptor* method); } // namespace testing } // namespace grpc diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index a631f2eb010..3b37ebe582c 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -37,13 +37,13 @@ class SliceTest : public ::testing::Test { static void TearDownTestCase() { grpc_shutdown(); } - void CheckSliceSize(const Slice& s, const grpc::string& content) { + void CheckSliceSize(const Slice& s, const std::string& content) { EXPECT_EQ(content.size(), s.size()); } - void CheckSlice(const Slice& s, const grpc::string& content) { + void CheckSlice(const Slice& s, const std::string& content) { EXPECT_EQ(content.size(), s.size()); EXPECT_EQ(content, - grpc::string(reinterpret_cast(s.begin()), s.size())); + std::string(reinterpret_cast(s.begin()), s.size())); } }; diff --git a/test/cpp/util/string_ref_helper.cc b/test/cpp/util/string_ref_helper.cc index c8382dbb27c..247e7a7147f 100644 --- a/test/cpp/util/string_ref_helper.cc +++ b/test/cpp/util/string_ref_helper.cc @@ -21,8 +21,8 @@ namespace grpc { namespace testing { -grpc::string ToString(const grpc::string_ref& r) { - return grpc::string(r.data(), r.size()); +std::string ToString(const grpc::string_ref& r) { + return std::string(r.data(), r.size()); } } // namespace testing diff --git a/test/cpp/util/string_ref_helper.h b/test/cpp/util/string_ref_helper.h index 707767de07e..a9fb553e3a8 100644 --- a/test/cpp/util/string_ref_helper.h +++ b/test/cpp/util/string_ref_helper.h @@ -24,7 +24,7 @@ namespace grpc { namespace testing { -grpc::string ToString(const grpc::string_ref& r); +std::string ToString(const grpc::string_ref& r); } // namespace testing } // namespace grpc diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index fd796372c8c..43da2344739 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -40,11 +40,11 @@ namespace grpc { namespace testing { namespace { -grpc::string ReadFile(const grpc::string& src_path) { +std::string ReadFile(const std::string& src_path) { std::ifstream src; src.open(src_path, std::ifstream::in | std::ifstream::binary); - grpc::string contents; + std::string contents; src.seekg(0, std::ios::end); contents.reserve(src.tellg()); src.seekg(0, std::ios::beg); @@ -66,7 +66,7 @@ class DefaultCredentialsProvider : public CredentialsProvider { ~DefaultCredentialsProvider() override {} void AddSecureType( - const grpc::string& type, + const std::string& type, std::unique_ptr type_provider) override { // This clobbers any existing entry for type, except the defaults, which // can't be clobbered. @@ -83,7 +83,7 @@ class DefaultCredentialsProvider : public CredentialsProvider { } std::shared_ptr GetChannelCredentials( - const grpc::string& type, ChannelArguments* args) override { + const std::string& type, ChannelArguments* args) override { if (type == grpc::testing::kInsecureCredentialsType) { return InsecureChannelCredentials(); } else if (type == grpc::testing::kAltsCredentialsType) { @@ -109,7 +109,7 @@ class DefaultCredentialsProvider : public CredentialsProvider { } std::shared_ptr GetServerCredentials( - const grpc::string& type) override { + const std::string& type) override { if (type == grpc::testing::kInsecureCredentialsType) { return InsecureServerCredentials(); } else if (type == grpc::testing::kAltsCredentialsType) { @@ -140,8 +140,8 @@ class DefaultCredentialsProvider : public CredentialsProvider { ->GetServerCredentials(); } } - std::vector GetSecureCredentialsTypeList() override { - std::vector types; + std::vector GetSecureCredentialsTypeList() override { + std::vector types; types.push_back(grpc::testing::kTlsCredentialsType); std::unique_lock lock(mu_); for (auto it = added_secure_type_names_.begin(); @@ -153,11 +153,11 @@ class DefaultCredentialsProvider : public CredentialsProvider { private: std::mutex mu_; - std::vector added_secure_type_names_; + std::vector added_secure_type_names_; std::vector> added_secure_type_providers_; - grpc::string custom_server_key_; - grpc::string custom_server_cert_; + std::string custom_server_key_; + std::string custom_server_cert_; }; CredentialsProvider* g_provider = nullptr; diff --git a/test/cpp/util/test_credentials_provider.h b/test/cpp/util/test_credentials_provider.h index 0bc910dbc09..89827a0b120 100644 --- a/test/cpp/util/test_credentials_provider.h +++ b/test/cpp/util/test_credentials_provider.h @@ -53,21 +53,21 @@ class CredentialsProvider { // Add a secure type in addition to the defaults. The default provider has // (kInsecureCredentialsType, kTlsCredentialsType). virtual void AddSecureType( - const grpc::string& type, + const std::string& type, std::unique_ptr type_provider) = 0; // Provide channel credentials according to the given type. Alter the channel // arguments if needed. Return nullptr if type is not registered. virtual std::shared_ptr GetChannelCredentials( - const grpc::string& type, ChannelArguments* args) = 0; + const std::string& type, ChannelArguments* args) = 0; // Provide server credentials according to the given type. // Return nullptr if type is not registered. virtual std::shared_ptr GetServerCredentials( - const grpc::string& type) = 0; + const std::string& type) = 0; // Provide a list of secure credentials type. - virtual std::vector GetSecureCredentialsTypeList() = 0; + virtual std::vector GetSecureCredentialsTypeList() = 0; }; // Get the current provider. Create a default one if not set. From 40dbe0e28a0ab4142c94f6c8bdc29adbb41c70a2 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 29 Jun 2020 16:11:21 -0700 Subject: [PATCH 177/239] Removed grpc_artifact_protoc/Dockerfile --- .../grpc_artifact_protoc/Dockerfile | 63 ------------------- tools/run_tests/artifacts/artifact_targets.py | 6 +- 2 files changed, 4 insertions(+), 65 deletions(-) delete mode 100644 tools/dockerfile/grpc_artifact_protoc/Dockerfile diff --git a/tools/dockerfile/grpc_artifact_protoc/Dockerfile b/tools/dockerfile/grpc_artifact_protoc/Dockerfile deleted file mode 100644 index 44fde4f99f0..00000000000 --- a/tools/dockerfile/grpc_artifact_protoc/Dockerfile +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright 2016 gRPC authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Docker file for building protoc and gRPC protoc plugin artifacts. -# forked from https://github.com/google/protobuf/blob/master/protoc-artifacts/Dockerfile - -FROM centos:6.6 - -RUN yum install -y git \ - tar \ - wget \ - make \ - autoconf \ - curl-devel \ - unzip \ - automake \ - libtool \ - glibc-static.i686 \ - glibc-devel \ - glibc-devel.i686 - -# Install GCC 4.8 -RUN wget http://people.centos.org/tru/devtools-2/devtools-2.repo -P /etc/yum.repos.d -RUN bash -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-2.repo' -RUN bash -c "sed -e 's/\$basearch/i386/g' /etc/yum.repos.d/devtools-2.repo > /etc/yum.repos.d/devtools-i386-2.repo" -RUN sed -e 's/testing-/testing-i386-/g' -i /etc/yum.repos.d/devtools-i386-2.repo - -# We'll get and "Rpmdb checksum is invalid: dCDPT(pkg checksums)" error caused by -# docker issue when using overlay storage driver, but all the stuff we need -# will be installed, so for now we just ignore the error. -# https://github.com/docker/docker/issues/10180 -RUN yum install -y devtoolset-2-build \ - devtoolset-2-toolchain \ - devtoolset-2-binutils \ - devtoolset-2-gcc \ - devtoolset-2-gcc-c++ \ - devtoolset-2-libstdc++-devel \ - devtoolset-2-libstdc++-devel.i686 || true - -# Again, ignore the "Rpmdb checksum is invalid: dCDPT(pkg checksums)" error. -RUN yum install -y ca-certificates || true # renew certs to prevent download error for ius-release.rpm - -# TODO(jtattermusch): gRPC makefile uses "which" to detect the availability of gcc -RUN yum install -y which || true - -# Update Git to version >1.7 to allow cloning submodules with --reference arg. -RUN yum remove -y git && yum clean all -RUN yum install -y https://centos6.iuscommunity.org/ius-release.rpm && yum clean all -RUN yum install -y git2u && yum clean all - -# Start in devtoolset environment that uses GCC 4.8 -CMD ["scl", "enable", "devtoolset-2", "bash"] diff --git a/tools/run_tests/artifacts/artifact_targets.py b/tools/run_tests/artifacts/artifact_targets.py index c7e3d81fb44..f9ca7715479 100644 --- a/tools/run_tests/artifacts/artifact_targets.py +++ b/tools/run_tests/artifacts/artifact_targets.py @@ -253,7 +253,8 @@ class CSharpExtArtifact: cmake_arch_option = '-DOPENSSL_NO_ASM=ON' return create_docker_jobspec( self.name, - 'tools/dockerfile/grpc_artifact_centos6_%s' % self.arch, + 'tools/dockerfile/grpc_artifact_centos6_{}'.format( + self.arch), 'tools/run_tests/artifacts/build_artifact_csharp.sh', environ={'CMAKE_ARCH_OPTION': cmake_arch_option}) else: @@ -316,7 +317,8 @@ class ProtocArtifact: if self.platform == 'linux': return create_docker_jobspec( self.name, - 'tools/dockerfile/grpc_artifact_protoc', + 'tools/dockerfile/grpc_artifact_centos6_{}'.format( + self.arch), 'tools/run_tests/artifacts/build_artifact_protoc.sh', environ=environ) else: From d574f68d52a42741458b9c4b3443a4f24ed78e08 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 29 Jun 2020 19:56:26 -0700 Subject: [PATCH 178/239] Refactored AR in makefile --- Makefile | 66 +++++++++++++++++++----------------- src/ruby/ext/grpc/extconf.rb | 7 ++-- templates/Makefile.template | 14 ++++---- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index b2099d3b6ce..1e46800f872 100644 --- a/Makefile +++ b/Makefile @@ -270,26 +270,28 @@ ifeq ($(origin LD), default) LD = $(LD_$(CONFIG)) endif LDXX ?= $(LDXX_$(CONFIG)) +ARFLAGS ?= rcs ifeq ($(SYSTEM),Linux) ifeq ($(origin AR), default) -AR = ar rcs +AR = ar endif STRIP ?= strip --strip-unneeded else ifeq ($(SYSTEM),Darwin) ifeq ($(origin AR), default) -AR = libtool -no_warning_for_no_symbols -o +AR = libtool +ARFLAGS = -no_warning_for_no_symbols -o endif STRIP ?= strip -x else ifeq ($(SYSTEM),MINGW32) ifeq ($(origin AR), default) -AR = ar rcs +AR = ar endif STRIP ?= strip --strip-unneeded else ifeq ($(origin AR), default) -AR = ar rcs +AR = ar endif STRIP ?= strip endif @@ -455,7 +457,7 @@ endif # ifeq ($(GRPC_CROSS_COMPILE),true) LDFLAGS += $(GRPC_CROSS_LDOPTS) # e.g. -L/usr/local/lib -L/usr/local/cross/lib -AROPTS = $(GRPC_CROSS_AROPTS) # e.g., rc --target=elf32-little +ARFLAGS += $(GRPC_CROSS_AROPTS) # e.g., rc --target=elf32-little USE_BUILT_PROTOC = false endif @@ -3230,7 +3232,7 @@ $(LIBDIR)/$(CONFIG)/libaddress_sorting.a: $(LIBADDRESS_SORTING_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libaddress_sorting.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBADDRESS_SORTING_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBADDRESS_SORTING_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libaddress_sorting.a endif @@ -3359,7 +3361,7 @@ $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBEND2END_NOSEC_TESTS_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBEND2END_NOSEC_TESTS_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a endif @@ -3482,7 +3484,7 @@ $(LIBDIR)/$(CONFIG)/libend2end_tests.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_tests.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBEND2END_TESTS_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBEND2END_TESTS_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libend2end_tests.a endif @@ -3592,7 +3594,7 @@ $(LIBDIR)/$(CONFIG)/libgpr.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $( $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgpr.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBGPR_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBGPR_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgpr.a endif @@ -4142,7 +4144,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc.a endif @@ -4199,7 +4201,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a $(LIBGRPC_CSHARP_EXT_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a $(LIBGRPC_CSHARP_EXT_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a endif @@ -4274,7 +4276,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBGRPC_TEST_UTIL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBGRPC_TEST_UTIL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a endif @@ -4322,7 +4324,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADD $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBGRPC_TEST_UTIL_UNSECURE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBGRPC_TEST_UTIL_UNSECURE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a endif @@ -4768,7 +4770,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTI $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a endif @@ -4832,7 +4834,7 @@ $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_D $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a $(LIBBENCHMARK_HELPERS_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a $(LIBBENCHMARK_HELPERS_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a endif @@ -5138,7 +5140,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRE $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++.a endif @@ -5209,7 +5211,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $( $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a $(LIBGRPC++_ALTS_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a $(LIBGRPC++_ALTS_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a endif @@ -5281,7 +5283,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARE $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a $(LIBGRPC++_ERROR_DETAILS_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a $(LIBGRPC++_ERROR_DETAILS_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a endif @@ -5355,7 +5357,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_D $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBGRPC++_REFLECTION_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBGRPC++_REFLECTION_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a endif @@ -5429,7 +5431,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $( $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBGRPC++_TEST_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBGRPC++_TEST_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_test.a endif @@ -5478,7 +5480,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_ $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBGRPC++_TEST_CONFIG_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBGRPC++_TEST_CONFIG_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a endif @@ -5535,7 +5537,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DE $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBGRPC++_TEST_UTIL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBGRPC++_TEST_UTIL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a endif @@ -5823,7 +5825,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SOR $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a endif @@ -5884,7 +5886,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a $(LIBGRPC_PLUGIN_SUPPORT_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a $(LIBGRPC_PLUGIN_SUPPORT_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a endif @@ -5935,7 +5937,7 @@ $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a $(LIBGRPCPP_CHANNELZ_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a $(LIBGRPCPP_CHANNELZ_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a endif @@ -6254,7 +6256,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_D $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libboringssl.a $(LIBBORINGSSL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libboringssl.a $(LIBBORINGSSL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl.a endif @@ -6294,7 +6296,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBBORINGSSL_TEST_UTIL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBBORINGSSL_TEST_UTIL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a endif @@ -6349,7 +6351,7 @@ $(LIBDIR)/$(CONFIG)/libbenchmark.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_D $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libbenchmark.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBBENCHMARK_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBBENCHMARK_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libbenchmark.a endif @@ -6398,7 +6400,7 @@ $(LIBDIR)/$(CONFIG)/libupb.a: $(LIBUPB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libupb.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libupb.a $(LIBUPB_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libupb.a $(LIBUPB_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libupb.a endif @@ -6455,7 +6457,7 @@ $(LIBDIR)/$(CONFIG)/libz.a: $(LIBZ_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libz.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libz.a $(LIBZ_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libz.a $(LIBZ_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libz.a endif @@ -6531,7 +6533,7 @@ $(LIBDIR)/$(CONFIG)/libares.a: $(LIBARES_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libares.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libares.a $(LIBARES_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libares.a $(LIBARES_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libares.a endif @@ -6606,7 +6608,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a: $(LIBGRPC_ABSEIL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a $(LIBGRPC_ABSEIL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a $(LIBGRPC_ABSEIL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a endif diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index aa4d0b36eec..76b14684822 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -25,7 +25,7 @@ grpc_config = ENV['GRPC_CONFIG'] || 'opt' ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.7' if ENV['AR'].nil? || ENV['AR'].size == 0 - ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs' + ENV['AR'] = RbConfig::CONFIG['AR'] end if ENV['CC'].nil? || ENV['CC'].size == 0 ENV['CC'] = RbConfig::CONFIG['CC'] @@ -37,7 +37,10 @@ if ENV['LD'].nil? || ENV['LD'].size == 0 ENV['LD'] = ENV['CC'] end -ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/ +if RUBY_PLATFORM =~ /darwin/ + ENV['AR'] = 'libtool' + ENV['ARFLAGS'] = '-o' + end ENV['EMBED_OPENSSL'] = 'true' ENV['EMBED_ZLIB'] = 'true' diff --git a/templates/Makefile.template b/templates/Makefile.template index d62305f36f5..b687ef99e92 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -155,26 +155,28 @@ LD = $(LD_$(CONFIG)) endif LDXX ?= $(LDXX_$(CONFIG)) + ARFLAGS ?= rcs ifeq ($(SYSTEM),Linux) ifeq ($(origin AR), default) - AR = ar rcs + AR = ar endif STRIP ?= strip --strip-unneeded else ifeq ($(SYSTEM),Darwin) ifeq ($(origin AR), default) - AR = libtool -no_warning_for_no_symbols -o + AR = libtool + ARFLAGS = -no_warning_for_no_symbols -o endif STRIP ?= strip -x else ifeq ($(SYSTEM),MINGW32) ifeq ($(origin AR), default) - AR = ar rcs + AR = ar endif STRIP ?= strip --strip-unneeded else ifeq ($(origin AR), default) - AR = ar rcs + AR = ar endif STRIP ?= strip endif @@ -319,7 +321,7 @@ # ifeq ($(GRPC_CROSS_COMPILE),true) LDFLAGS += $(GRPC_CROSS_LDOPTS) # e.g. -L/usr/local/lib -L/usr/local/cross/lib - AROPTS = $(GRPC_CROSS_AROPTS) # e.g., rc --target=elf32-little + ARFLAGS += $(GRPC_CROSS_AROPTS) # e.g., rc --target=elf32-little USE_BUILT_PROTOC = false endif @@ -1607,7 +1609,7 @@ $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/lib${lib.name}.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(LIB${lib.name.upper()}_OBJS) \ + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(LIB${lib.name.upper()}_OBJS) \ % if lib.get('baselib', False): $(LIBGPR_OBJS) \ $(LIBGRPC_ABSEIL_OBJS) \ From e6249079a2b4a34494f91af8af1e401ad9d0918f Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 29 Jun 2020 20:58:40 -0700 Subject: [PATCH 179/239] Remove things_queued_ever counter from callback CQ --- src/core/lib/surface/completion_queue.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index a383f78690a..a9f65bd5310 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -327,10 +327,6 @@ struct cq_callback_data { Initial count is dropped by grpc_completion_queue_shutdown. */ grpc_core::Atomic pending_events{1}; - /** Counter of how many things have ever been queued on this completion queue - useful for avoiding locks to check the queue */ - grpc_core::Atomic things_queued_ever{0}; - /** 0 initially. 1 once we initiated shutdown */ bool shutdown_called = false; @@ -870,7 +866,6 @@ static void cq_end_op_for_callback( cq_check_tag(cq, tag, true); /* Used in debug builds only */ - cqd->things_queued_ever.FetchAdd(1, grpc_core::MemoryOrder::RELAXED); if (cqd->pending_events.FetchSub(1, grpc_core::MemoryOrder::ACQ_REL) == 1) { cq_finish_shutdown_callback(cq); } From 34027f60fcb3c90436b9f17767570bfeedefeb13 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 29 Jun 2020 19:56:26 -0700 Subject: [PATCH 180/239] Refactored AR in makefile --- Makefile | 66 +++++++++++++++++++----------------- src/ruby/ext/grpc/extconf.rb | 7 ++-- templates/Makefile.template | 14 ++++---- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/Makefile b/Makefile index b2099d3b6ce..1e46800f872 100644 --- a/Makefile +++ b/Makefile @@ -270,26 +270,28 @@ ifeq ($(origin LD), default) LD = $(LD_$(CONFIG)) endif LDXX ?= $(LDXX_$(CONFIG)) +ARFLAGS ?= rcs ifeq ($(SYSTEM),Linux) ifeq ($(origin AR), default) -AR = ar rcs +AR = ar endif STRIP ?= strip --strip-unneeded else ifeq ($(SYSTEM),Darwin) ifeq ($(origin AR), default) -AR = libtool -no_warning_for_no_symbols -o +AR = libtool +ARFLAGS = -no_warning_for_no_symbols -o endif STRIP ?= strip -x else ifeq ($(SYSTEM),MINGW32) ifeq ($(origin AR), default) -AR = ar rcs +AR = ar endif STRIP ?= strip --strip-unneeded else ifeq ($(origin AR), default) -AR = ar rcs +AR = ar endif STRIP ?= strip endif @@ -455,7 +457,7 @@ endif # ifeq ($(GRPC_CROSS_COMPILE),true) LDFLAGS += $(GRPC_CROSS_LDOPTS) # e.g. -L/usr/local/lib -L/usr/local/cross/lib -AROPTS = $(GRPC_CROSS_AROPTS) # e.g., rc --target=elf32-little +ARFLAGS += $(GRPC_CROSS_AROPTS) # e.g., rc --target=elf32-little USE_BUILT_PROTOC = false endif @@ -3230,7 +3232,7 @@ $(LIBDIR)/$(CONFIG)/libaddress_sorting.a: $(LIBADDRESS_SORTING_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libaddress_sorting.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBADDRESS_SORTING_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBADDRESS_SORTING_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libaddress_sorting.a endif @@ -3359,7 +3361,7 @@ $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBEND2END_NOSEC_TESTS_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBEND2END_NOSEC_TESTS_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a endif @@ -3482,7 +3484,7 @@ $(LIBDIR)/$(CONFIG)/libend2end_tests.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_tests.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBEND2END_TESTS_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBEND2END_TESTS_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libend2end_tests.a endif @@ -3592,7 +3594,7 @@ $(LIBDIR)/$(CONFIG)/libgpr.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $( $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgpr.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBGPR_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBGPR_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgpr.a endif @@ -4142,7 +4144,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc.a endif @@ -4199,7 +4201,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a $(LIBGRPC_CSHARP_EXT_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a $(LIBGRPC_CSHARP_EXT_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a endif @@ -4274,7 +4276,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBGRPC_TEST_UTIL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBGRPC_TEST_UTIL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a endif @@ -4322,7 +4324,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADD $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBGRPC_TEST_UTIL_UNSECURE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBGRPC_TEST_UTIL_UNSECURE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a endif @@ -4768,7 +4770,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTI $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a endif @@ -4832,7 +4834,7 @@ $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_D $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a $(LIBBENCHMARK_HELPERS_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a $(LIBBENCHMARK_HELPERS_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a endif @@ -5138,7 +5140,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRE $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++.a endif @@ -5209,7 +5211,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $( $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a $(LIBGRPC++_ALTS_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a $(LIBGRPC++_ALTS_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a endif @@ -5281,7 +5283,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARE $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a $(LIBGRPC++_ERROR_DETAILS_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a $(LIBGRPC++_ERROR_DETAILS_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a endif @@ -5355,7 +5357,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_D $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBGRPC++_REFLECTION_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBGRPC++_REFLECTION_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a endif @@ -5429,7 +5431,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $( $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBGRPC++_TEST_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_test.a $(LIBGRPC++_TEST_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_test.a endif @@ -5478,7 +5480,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_ $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBGRPC++_TEST_CONFIG_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBGRPC++_TEST_CONFIG_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a endif @@ -5535,7 +5537,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DE $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBGRPC++_TEST_UTIL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBGRPC++_TEST_UTIL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a endif @@ -5823,7 +5825,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SOR $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a endif @@ -5884,7 +5886,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a $(LIBGRPC_PLUGIN_SUPPORT_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a $(LIBGRPC_PLUGIN_SUPPORT_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a endif @@ -5935,7 +5937,7 @@ $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a $(LIBGRPCPP_CHANNELZ_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a $(LIBGRPCPP_CHANNELZ_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a endif @@ -6254,7 +6256,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_D $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libboringssl.a $(LIBBORINGSSL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libboringssl.a $(LIBBORINGSSL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl.a endif @@ -6294,7 +6296,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBBORINGSSL_TEST_UTIL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBBORINGSSL_TEST_UTIL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a endif @@ -6349,7 +6351,7 @@ $(LIBDIR)/$(CONFIG)/libbenchmark.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_D $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libbenchmark.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBBENCHMARK_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libbenchmark.a $(LIBBENCHMARK_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libbenchmark.a endif @@ -6398,7 +6400,7 @@ $(LIBDIR)/$(CONFIG)/libupb.a: $(LIBUPB_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libupb.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libupb.a $(LIBUPB_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libupb.a $(LIBUPB_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libupb.a endif @@ -6455,7 +6457,7 @@ $(LIBDIR)/$(CONFIG)/libz.a: $(LIBZ_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libz.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libz.a $(LIBZ_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libz.a $(LIBZ_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libz.a endif @@ -6531,7 +6533,7 @@ $(LIBDIR)/$(CONFIG)/libares.a: $(LIBARES_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libares.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libares.a $(LIBARES_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libares.a $(LIBARES_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libares.a endif @@ -6606,7 +6608,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a: $(LIBGRPC_ABSEIL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a $(LIBGRPC_ABSEIL_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a $(LIBGRPC_ABSEIL_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a endif diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index aa4d0b36eec..76b14684822 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -25,7 +25,7 @@ grpc_config = ENV['GRPC_CONFIG'] || 'opt' ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.7' if ENV['AR'].nil? || ENV['AR'].size == 0 - ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs' + ENV['AR'] = RbConfig::CONFIG['AR'] end if ENV['CC'].nil? || ENV['CC'].size == 0 ENV['CC'] = RbConfig::CONFIG['CC'] @@ -37,7 +37,10 @@ if ENV['LD'].nil? || ENV['LD'].size == 0 ENV['LD'] = ENV['CC'] end -ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/ +if RUBY_PLATFORM =~ /darwin/ + ENV['AR'] = 'libtool' + ENV['ARFLAGS'] = '-o' + end ENV['EMBED_OPENSSL'] = 'true' ENV['EMBED_ZLIB'] = 'true' diff --git a/templates/Makefile.template b/templates/Makefile.template index d62305f36f5..b687ef99e92 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -155,26 +155,28 @@ LD = $(LD_$(CONFIG)) endif LDXX ?= $(LDXX_$(CONFIG)) + ARFLAGS ?= rcs ifeq ($(SYSTEM),Linux) ifeq ($(origin AR), default) - AR = ar rcs + AR = ar endif STRIP ?= strip --strip-unneeded else ifeq ($(SYSTEM),Darwin) ifeq ($(origin AR), default) - AR = libtool -no_warning_for_no_symbols -o + AR = libtool + ARFLAGS = -no_warning_for_no_symbols -o endif STRIP ?= strip -x else ifeq ($(SYSTEM),MINGW32) ifeq ($(origin AR), default) - AR = ar rcs + AR = ar endif STRIP ?= strip --strip-unneeded else ifeq ($(origin AR), default) - AR = ar rcs + AR = ar endif STRIP ?= strip endif @@ -319,7 +321,7 @@ # ifeq ($(GRPC_CROSS_COMPILE),true) LDFLAGS += $(GRPC_CROSS_LDOPTS) # e.g. -L/usr/local/lib -L/usr/local/cross/lib - AROPTS = $(GRPC_CROSS_AROPTS) # e.g., rc --target=elf32-little + ARFLAGS += $(GRPC_CROSS_AROPTS) # e.g., rc --target=elf32-little USE_BUILT_PROTOC = false endif @@ -1607,7 +1609,7 @@ $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/lib${lib.name}.a - $(Q) $(AR) $(AROPTS) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(LIB${lib.name.upper()}_OBJS) \ + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(LIB${lib.name.upper()}_OBJS) \ % if lib.get('baselib', False): $(LIBGPR_OBJS) \ $(LIBGRPC_ABSEIL_OBJS) \ From cdc442876b8d9d9dd748fac2ad1580b0338fe11d Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 29 Jun 2020 17:51:33 -0700 Subject: [PATCH 181/239] Add abseil compiler options --- Makefile | 1 + build_handwritten.yaml | 2 ++ templates/Makefile.template | 1 + 3 files changed, 4 insertions(+) diff --git a/Makefile b/Makefile index b2099d3b6ce..810a5e08737 100644 --- a/Makefile +++ b/Makefile @@ -6601,6 +6601,7 @@ LIBGRPC_ABSEIL_SRC = \ LIBGRPC_ABSEIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_ABSEIL_SRC)))) +$(LIBGRPC_ABSEIL_OBJS): CPPFLAGS += -g -maes -msse4 -Ithird_party/abseil-cpp $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a: $(LIBGRPC_ABSEIL_OBJS) $(E) "[AR] Creating $@" diff --git a/build_handwritten.yaml b/build_handwritten.yaml index 15594c622da..2653646db23 100644 --- a/build_handwritten.yaml +++ b/build_handwritten.yaml @@ -195,6 +195,8 @@ configs: test_environ: UBSAN_OPTIONS: halt_on_error=1:print_stacktrace=1:suppressions=test/core/util/ubsan_suppressions.txt defaults: + abseil: + CPPFLAGS: -g -maes -msse4 -Ithird_party/abseil-cpp ares: CFLAGS: -g CPPFLAGS: -Ithird_party/cares -Ithird_party/cares/cares -fvisibility=hidden -D_GNU_SOURCE diff --git a/templates/Makefile.template b/templates/Makefile.template index d62305f36f5..94c5020ddd7 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1491,6 +1491,7 @@ "name": "grpc_abseil", "build": "private", "language": "c", + "defaults": "abseil", "src": sorted(used_abseil_srcs), "hdr": sorted(used_abseil_hdrs), "secure": False, From 2253b82fccdc83fa3141233cf03f59895d5d30a7 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 30 Jun 2020 08:30:29 +0200 Subject: [PATCH 182/239] unify Grpc.Tools projects with other csproj projects --- .../Grpc.Tools.Tests/Grpc.Tools.Tests.csproj | 11 +++----- src/csharp/Grpc.Tools/Common.cs | 2 -- src/csharp/Grpc.Tools/Grpc.Tools.csproj | 11 +++----- .../Grpc.Tools/Properties/AssemblyInfo.cs | 27 +++++++++++++++++++ 4 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 src/csharp/Grpc.Tools/Properties/AssemblyInfo.cs diff --git a/src/csharp/Grpc.Tools.Tests/Grpc.Tools.Tests.csproj b/src/csharp/Grpc.Tools.Tests/Grpc.Tools.Tests.csproj index b25bc8d953e..85b1cf04c34 100644 --- a/src/csharp/Grpc.Tools.Tests/Grpc.Tools.Tests.csproj +++ b/src/csharp/Grpc.Tools.Tests/Grpc.Tools.Tests.csproj @@ -1,20 +1,15 @@ + + net45;netcoreapp2.1 Exe + true - - - - all - runtime; build; native; contentfiles; analyzers - - - diff --git a/src/csharp/Grpc.Tools/Common.cs b/src/csharp/Grpc.Tools/Common.cs index 13cd6a32316..00708c41833 100644 --- a/src/csharp/Grpc.Tools/Common.cs +++ b/src/csharp/Grpc.Tools/Common.cs @@ -22,8 +22,6 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security; -[assembly: InternalsVisibleTo("Grpc.Tools.Tests")] - namespace Grpc.Tools { // Metadata names (MSBuild item attributes) that we refer to often. diff --git a/src/csharp/Grpc.Tools/Grpc.Tools.csproj b/src/csharp/Grpc.Tools/Grpc.Tools.csproj index e4d534768c2..f0c571e07f0 100644 --- a/src/csharp/Grpc.Tools/Grpc.Tools.csproj +++ b/src/csharp/Grpc.Tools/Grpc.Tools.csproj @@ -1,19 +1,16 @@ + + Protobuf.MSBuild $(GrpcCsharpVersion) net45;netstandard1.3 + true - - - - all - runtime; build; native; contentfiles; analyzers - - + diff --git a/src/csharp/Grpc.Tools/Properties/AssemblyInfo.cs b/src/csharp/Grpc.Tools/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..4c64e5b6dff --- /dev/null +++ b/src/csharp/Grpc.Tools/Properties/AssemblyInfo.cs @@ -0,0 +1,27 @@ + +#region Copyright notice and license + +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#endregion + +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Grpc.Tools.Tests,PublicKey=" + + "00240000048000009400000006020000002400005253413100040000010001002f5797a92c6fcde81bd4098f43" + + "0442bb8e12768722de0b0cb1b15e955b32a11352740ee59f2c94c48edc8e177d1052536b8ac651bce11ce5da3a" + + "27fc95aff3dc604a6971417453f9483c7b5e836756d5b271bf8f2403fe186e31956148c03d804487cf642f8cc0" + + "71394ee9672dfe5b55ea0f95dfd5a7f77d22c962ccf51320d3")] From 6562f41b5c2c5e65c3766cb45975afc22cdfb912 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 30 Jun 2020 09:27:06 -0700 Subject: [PATCH 183/239] Add missing include. --- src/core/tsi/ssl_transport_security.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/tsi/ssl_transport_security.cc b/src/core/tsi/ssl_transport_security.cc index dda3f3c3d4a..d2a5168c6c4 100644 --- a/src/core/tsi/ssl_transport_security.cc +++ b/src/core/tsi/ssl_transport_security.cc @@ -33,6 +33,8 @@ #include #endif +#include + #include #include #include From f8b7fef7538f3ae0677e541a1c91a529e54849bd Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 30 Jun 2020 13:33:46 -0700 Subject: [PATCH 184/239] Fix connect deadline issue in settings_timeout_test --- test/core/transport/chttp2/settings_timeout_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/transport/chttp2/settings_timeout_test.cc b/test/core/transport/chttp2/settings_timeout_test.cc index 8680f208b57..4790222f98c 100644 --- a/test/core/transport/chttp2/settings_timeout_test.cc +++ b/test/core/transport/chttp2/settings_timeout_test.cc @@ -111,7 +111,7 @@ class Client { EventState state; grpc_tcp_client_connect(state.closure(), &endpoint_, pollset_set, nullptr /* channel_args */, server_addresses->addrs, - 1000); + grpc_core::ExecCtx::Get()->Now() + 1000); ASSERT_TRUE(PollUntilDone( &state, grpc_timespec_to_millis_round_up(gpr_inf_future(GPR_CLOCK_MONOTONIC)))); From b6a5cbf8305af1d7cca4a3b2fa087b8e5290c73b Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 30 Jun 2020 14:56:30 -0700 Subject: [PATCH 185/239] Fix possible deadlock in RemoveExternalConnectivityWatcher --- .../ext/filters/client_channel/client_channel.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 8533be0fe2b..84e2b1e45a1 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -184,12 +184,16 @@ class ChannelData { void RemoveExternalConnectivityWatcher(grpc_closure* on_complete, bool cancel) { - MutexLock lock(&external_watchers_mu_); - auto it = external_watchers_.find(on_complete); - if (it != external_watchers_.end()) { - if (cancel) it->second->Cancel(); - external_watchers_.erase(it); + ExternalConnectivityWatcher* watcher = nullptr; + { + MutexLock lock(&external_watchers_mu_); + auto it = external_watchers_.find(on_complete); + if (it != external_watchers_.end()) { + watcher = it->second; + external_watchers_.erase(it); + } } + if (watcher != nullptr && cancel) watcher->Cancel(); } int NumExternalConnectivityWatchers() const { From 317fd2e13f002cce88d7fc5be2270510652d1f68 Mon Sep 17 00:00:00 2001 From: yulin-liang Date: Wed, 24 Jun 2020 10:07:15 -0700 Subject: [PATCH 186/239] Objc support PB runtime import override --- src/compiler/objective_c_plugin.cc | 24 +++++-- .../tests/run_plugin_option_tests.sh | 68 +++++++++++++++++++ tools/run_tests/run_tests.py | 7 ++ 3 files changed, 94 insertions(+), 5 deletions(-) create mode 100755 src/objective-c/tests/run_plugin_option_tests.sh diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 0aeab19b1ad..5a9c7e7d5a4 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -39,7 +39,8 @@ namespace { inline ::std::string ImportProtoHeaders( const grpc::protobuf::FileDescriptor* dep, const char* indent, - const ::std::string& framework) { + const ::std::string& framework, + const ::std::string& pb_runtime_import_prefix) { ::std::string header = grpc_objective_c_generator::MessageHeaderName(dep); if (!IsProtobufLibraryBundledProtoFile(dep)) { @@ -56,12 +57,16 @@ inline ::std::string ImportProtoHeaders( // create the import code snippet ::std::string framework_header = ::std::string(ProtobufLibraryFrameworkName) + "/" + file_name; + ::std::string local_header = file_name; + if (!pb_runtime_import_prefix.empty()) { + local_header = pb_runtime_import_prefix + "/" + file_name; + } static const ::std::string kFrameworkImportsCondition = "GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS"; return PreprocIfElse(kFrameworkImportsCondition, indent + SystemImport(framework_header), - indent + LocalImport(file_name)); + indent + LocalImport(local_header)); } } // namespace @@ -86,6 +91,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { } ::std::string framework; + ::std::string pb_runtime_import_prefix; std::vector<::std::string> params_list = grpc_generator::tokenize(parameter, ","); for (auto param_str = params_list.begin(); param_str != params_list.end(); @@ -104,6 +110,13 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { return false; } framework = param[1]; + } else if (param[0] == "runtime_import_prefix") { + if (param.size() != 2) { + *error = grpc::string("Format: runtime_import_prefix=dir/"); + return false; + } + pb_runtime_import_prefix = param[1]; + grpc_generator::StripSuffix(&pb_runtime_import_prefix, "/"); } } @@ -173,8 +186,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ::std::string class_imports; for (int i = 0; i < file->dependency_count(); i++) { - class_imports += - ImportProtoHeaders(file->dependency(i), " ", framework); + class_imports += ImportProtoHeaders( + file->dependency(i), " ", framework, pb_runtime_import_prefix); } ::std::string ng_protocols; @@ -228,7 +241,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ::std::string class_imports; for (int i = 0; i < file->dependency_count(); i++) { - class_imports += ImportProtoHeaders(file->dependency(i), "", framework); + class_imports += ImportProtoHeaders(file->dependency(i), "", framework, + pb_runtime_import_prefix); } ::std::string definitions; diff --git a/src/objective-c/tests/run_plugin_option_tests.sh b/src/objective-c/tests/run_plugin_option_tests.sh new file mode 100755 index 00000000000..2263f571d75 --- /dev/null +++ b/src/objective-c/tests/run_plugin_option_tests.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Don't run this script standalone. Instead, run from the repository root: +# ./tools/run_tests/run_tests.py -l objc + +set -ev + +cd $(dirname $0) + +# Run the tests server. + +ROOT_DIR=../../.. +BAZEL=$ROOT_DIR/tools/bazel +PROTOC=$ROOT_DIR/bazel-bin/external/com_google_protobuf/protoc +PLUGIN=$ROOT_DIR/bazel-bin/src/compiler/grpc_objective_c_plugin +RUNTIME_IMPORT_PREFIX=prefix/dir/ + +[ -f $PROTOC ] && [ -f $PLUGIN ] || { + BAZEL build @com_google_protobuf//:protoc //src/compiler:grpc_objective_c_plugin +} + +rm -rf RemoteTestClient/*pb* + +$PROTOC \ + --plugin=protoc-gen-grpc=$PLUGIN \ + --objc_out=RemoteTestClient \ + --grpc_out=runtime_import_prefix=$RUNTIME_IMPORT_PREFIX:RemoteTestClient \ + -I $ROOT_DIR \ + -I ../../../third_party/protobuf/src \ + $ROOT_DIR/src/objective-c/examples/RemoteTestClient/*.proto + +# Verify the output proto filename +[ -e ./RemoteTestClient/src/objective-c/examples/RemoteTestClient/Test.pbrpc.m ] || { + echo >&2 "protoc outputs wrong filename." + exit 1 +} + +# Verify paths of protobuf WKTs in generated code contain runtime import prefix. +[ "`cat RemoteTestClient/src/objective-c/examples/RemoteTestClient/Test.pbrpc.m | + egrep '#import "'"${RUNTIME_IMPORT_PREFIX}"'GPBEmpty\.pbobjc\.h'`" ] || { + echo >&2 "protoc generated import with wrong filename." + exit 1 +} + +# Verify paths of non WKTs protos in generated code don't contain runtime import prefix. +[ "`cat RemoteTestClient/src/objective-c/examples/RemoteTestClient/Test.pbrpc.m | + egrep '.*\Messages.pbobjc.h"$' | + egrep '#import "'"${RUNTIME_IMPORT_PREFIX}"`" ] && { + echo >&2 "protoc generated import with wrong filename." + exit 1 +} + +# Run one extra command to clear $? before exiting the script to prevent +# failing even when tests pass. +echo "Plugin option tests passed." diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index b1c56762bd1..38286345aac 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1149,6 +1149,13 @@ class ObjCLanguage(object): shortname='ios-test-plugintest', cpu_cost=1e6, environ=_FORCE_ENVIRON_FOR_WRAPPERS)) + out.append( + self.config.job_spec( + ['src/objective-c/tests/run_plugin_option_tests.sh'], + timeout_seconds=60 * 60, + shortname='ios-test-plugin-option-test', + cpu_cost=1e6, + environ=_FORCE_ENVIRON_FOR_WRAPPERS)) out.append( self.config.job_spec( ['test/core/iomgr/ios/CFStreamTests/build_and_run_tests.sh'], From 2c179f5b13dae815672a467b9bff1f96614496d2 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Tue, 30 Jun 2020 21:56:30 -0700 Subject: [PATCH 187/239] Removed GRPC_USE_ABSL --- include/grpc/impl/codegen/port_platform.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 7436e644504..185e4481d0e 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -27,13 +27,6 @@ * - some syscalls to be made directly */ -/* - * Defines GRPC_USE_ABSL to use Abseil Common Libraries (C++) - */ -#ifndef GRPC_USE_ABSL -#define GRPC_USE_ABSL 1 -#endif - /* * Defines GPR_ABSEIL_SYNC to use synchronization features from Abseil */ From a4bf196cc94ce5f77c521ab16b16a3e216a34bcd Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jul 2020 14:08:30 +0200 Subject: [PATCH 188/239] update submodule boringssl-with-bazel with origin/master-with-bazel --- third_party/boringssl-with-bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/boringssl-with-bazel b/third_party/boringssl-with-bazel index 3ab047a8e37..597b810379e 160000 --- a/third_party/boringssl-with-bazel +++ b/third_party/boringssl-with-bazel @@ -1 +1 @@ -Subproject commit 3ab047a8e377083a9b38dc908fe1612d5743a021 +Subproject commit 597b810379e126ae05d32c1d94b1a9464385acd0 From 0129e35e37109f52a3cfd78a84834656b6817a2c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jul 2020 14:15:34 +0200 Subject: [PATCH 189/239] update boringssl dependency to master-with-bazel commit SHA --- bazel/grpc_deps.bzl | 8 ++++---- tools/run_tests/sanity/check_submodules.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index c868438e93b..56386df8def 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -141,11 +141,11 @@ def grpc_deps(): name = "boringssl", # Use github mirror instead of https://boringssl.googlesource.com/boringssl # to obtain a boringssl archive with consistent sha256 - sha256 = "3909329105e28cfeedcd8028865c92f1081ae2524a0ad6c09eba5d91d9ae3869", - strip_prefix = "boringssl-3ab047a8e377083a9b38dc908fe1612d5743a021", + sha256 = "1ea42456c020daf0a9b0f9e8d8bc3a403c9314f4f54230c617257af996cd5fa6", + strip_prefix = "boringssl-597b810379e126ae05d32c1d94b1a9464385acd0", urls = [ - "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/3ab047a8e377083a9b38dc908fe1612d5743a021.tar.gz", - "https://github.com/google/boringssl/archive/3ab047a8e377083a9b38dc908fe1612d5743a021.tar.gz", + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/597b810379e126ae05d32c1d94b1a9464385acd0.tar.gz", + "https://github.com/google/boringssl/archive/597b810379e126ae05d32c1d94b1a9464385acd0.tar.gz", ], ) diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index e301924e83d..44a73f3a69d 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -29,7 +29,7 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" df3ea785d8c30a9503321a3d35ee7d35808f190d third_party/abseil-cpp (heads/master) 090faecb454fbd6e6e17a75ef8146acb037118d4 third_party/benchmark (v1.5.0) 73594cde8c9a52a102c4341c244c833aa61b9c06 third_party/bloaty (remotes/origin/wide-14-g73594cd) - 3ab047a8e377083a9b38dc908fe1612d5743a021 third_party/boringssl-with-bazel (remotes/origin/master-with-bazel) + 597b810379e126ae05d32c1d94b1a9464385acd0 third_party/boringssl-with-bazel (remotes/origin/master-with-bazel) e982924acee7f7313b4baa4ee5ec000c5e373c30 third_party/cares/cares (cares-1_15_0) 8dcc476be69437b505af181a6e8b167fdb101d7e third_party/envoy-api (heads/master) 28f50e0fed19872e0fd50dd23ce2ee8cd759338e third_party/gflags (v2.2.0-5-g30dbc81) From 162fca110c7a5ca213fc9ea70ae865b7227dcaa4 Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 1 Jul 2020 09:39:14 -0700 Subject: [PATCH 190/239] Fix message_allocator_e2e_test --- .../end2end/message_allocator_end2end_test.cc | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/test/cpp/end2end/message_allocator_end2end_test.cc b/test/cpp/end2end/message_allocator_end2end_test.cc index 3cae255d43e..b34a08ef281 100644 --- a/test/cpp/end2end/message_allocator_end2end_test.cc +++ b/test/cpp/end2end/message_allocator_end2end_test.cc @@ -143,7 +143,13 @@ class MessageAllocatorEnd2endTestBase builder.RegisterService(&callback_service_); server_ = builder.BuildAndStart(); - is_server_started_ = true; + } + + void DestroyServer() { + if (server_) { + server_->Shutdown(); + server_.reset(); + } } void ResetStub() { @@ -165,9 +171,7 @@ class MessageAllocatorEnd2endTestBase } void TearDown() override { - if (is_server_started_) { - server_->Shutdown(); - } + DestroyServer(); if (picked_port_ > 0) { grpc_recycle_unused_port(picked_port_); } @@ -206,7 +210,6 @@ class MessageAllocatorEnd2endTestBase } bool do_not_test_{false}; - bool is_server_started_{false}; int picked_port_{0}; std::shared_ptr channel_; std::unique_ptr stub_; @@ -280,6 +283,9 @@ TEST_P(SimpleAllocatorTest, SimpleRpc) { CreateServer(allocator.get()); ResetStub(); SendRpcs(kRpcCount); + // messages_deallocaton_count is updated in Release after server side OnDone. + // Destroy server to make sure it has been updated. + DestroyServer(); EXPECT_EQ(kRpcCount, allocator->allocation_count); EXPECT_EQ(kRpcCount, allocator->messages_deallocation_count); EXPECT_EQ(0, allocator->request_deallocation_count); @@ -302,6 +308,9 @@ TEST_P(SimpleAllocatorTest, RpcWithEarlyFreeRequest) { CreateServer(allocator.get()); ResetStub(); SendRpcs(kRpcCount); + // messages_deallocaton_count is updated in Release after server side OnDone. + // Destroy server to make sure it has been updated. + DestroyServer(); EXPECT_EQ(kRpcCount, allocator->allocation_count); EXPECT_EQ(kRpcCount, allocator->messages_deallocation_count); EXPECT_EQ(kRpcCount, allocator->request_deallocation_count); @@ -326,6 +335,9 @@ TEST_P(SimpleAllocatorTest, RpcWithReleaseRequest) { CreateServer(allocator.get()); ResetStub(); SendRpcs(kRpcCount); + // messages_deallocaton_count is updated in Release after server side OnDone. + // Destroy server to make sure it has been updated. + DestroyServer(); EXPECT_EQ(kRpcCount, allocator->allocation_count); EXPECT_EQ(kRpcCount, allocator->messages_deallocation_count); EXPECT_EQ(0, allocator->request_deallocation_count); From 62ac3f075a2632183f5462a72b2d2f67b8ece8c0 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 1 Jul 2020 11:11:27 -0700 Subject: [PATCH 191/239] Added call to grpc::testing::TestEnvironment in tests --- test/core/debug/stats_test.cc | 3 +++ test/core/handshake/client_ssl.cc | 3 ++- test/core/handshake/server_ssl.cc | 3 ++- test/core/security/tls_security_connector_test.cc | 1 + test/core/util/test_config.cc | 1 + test/cpp/grpclb/grpclb_api_test.cc | 3 +++ test/cpp/microbenchmarks/bm_alarm.cc | 1 + test/cpp/microbenchmarks/bm_byte_buffer.cc | 4 ++++ test/cpp/microbenchmarks/bm_channel.cc | 2 ++ test/cpp/microbenchmarks/bm_chttp2_hpack.cc | 2 ++ test/cpp/microbenchmarks/bm_chttp2_transport.cc | 2 ++ test/cpp/microbenchmarks/bm_metadata.cc | 2 ++ test/cpp/microbenchmarks/bm_timer.cc | 6 ++++-- 13 files changed, 29 insertions(+), 4 deletions(-) diff --git a/test/core/debug/stats_test.cc b/test/core/debug/stats_test.cc index f28133d1274..252dbd406e7 100644 --- a/test/core/debug/stats_test.cc +++ b/test/core/debug/stats_test.cc @@ -26,6 +26,8 @@ #include #include +#include "test/core/util/test_config.h" + namespace grpc { namespace testing { @@ -146,6 +148,7 @@ int main(int argc, char** argv) { * build. */ #if defined(GRPC_COLLECT_STATS) || !defined(NDEBUG) + grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv); grpc_init(); int ret = RUN_ALL_TESTS(); diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc index daeebee269c..632076d8ef1 100644 --- a/test/core/handshake/client_ssl.cc +++ b/test/core/handshake/client_ssl.cc @@ -309,7 +309,8 @@ static bool client_ssl_test(char* server_alpn_preferred) { return success; } -int main(int /*argc*/, char* /*argv*/[]) { +int main(int argc, char* argv[]) { + grpc::testing::TestEnvironment env(argc, argv); // Handshake succeeeds when the server has grpc-exp as the ALPN preference. GPR_ASSERT(client_ssl_test(const_cast("grpc-exp"))); // Handshake succeeeds when the server has h2 as the ALPN preference. This diff --git a/test/core/handshake/server_ssl.cc b/test/core/handshake/server_ssl.cc index 13e4f46cfdb..096cfaf94fa 100644 --- a/test/core/handshake/server_ssl.cc +++ b/test/core/handshake/server_ssl.cc @@ -36,7 +36,8 @@ #include "test/core/handshake/server_ssl_common.h" -int main(int /*argc*/, char* /*argv*/[]) { +int main(int argc, char* argv[]) { + grpc::testing::TestEnvironment env(argc, argv); // Handshake succeeeds when the client supplies the standard ALPN list. const char* full_alpn_list[] = {"grpc-exp", "h2"}; GPR_ASSERT(server_ssl_test(full_alpn_list, 2, "grpc-exp")); diff --git a/test/core/security/tls_security_connector_test.cc b/test/core/security/tls_security_connector_test.cc index ef2f94a80b8..694b6b66b1e 100644 --- a/test/core/security/tls_security_connector_test.cc +++ b/test/core/security/tls_security_connector_test.cc @@ -326,6 +326,7 @@ TEST_F(TlsSecurityConnectorTest, CreateServerSecurityConnectorFailInit) { } // namespace grpc int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv); grpc_init(); int ret = RUN_ALL_TESTS(); diff --git a/test/core/util/test_config.cc b/test/core/util/test_config.cc index c6ee9fc2400..b926b57280a 100644 --- a/test/core/util/test_config.cc +++ b/test/core/util/test_config.cc @@ -413,6 +413,7 @@ TestEnvironment::~TestEnvironment() { break; } } + gpr_log(GPR_INFO, "TestEnvironment ends"); } } // namespace testing diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index 94142bbf80f..80bbe1a12e7 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -28,6 +28,8 @@ #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/proto/grpc/lb/v1/load_balancer.pb.h" // C++ version +#include "test/core/util/test_config.h" + namespace grpc { namespace { @@ -135,6 +137,7 @@ TEST_F(GrpclbTest, ParseResponseServerList) { } // namespace grpc int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv); int ret = RUN_ALL_TESTS(); return ret; diff --git a/test/cpp/microbenchmarks/bm_alarm.cc b/test/cpp/microbenchmarks/bm_alarm.cc index 5411b222eab..3aaab53c57e 100644 --- a/test/cpp/microbenchmarks/bm_alarm.cc +++ b/test/cpp/microbenchmarks/bm_alarm.cc @@ -55,6 +55,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_byte_buffer.cc b/test/cpp/microbenchmarks/bm_byte_buffer.cc index 4dfa1326de9..3c416d87b4f 100644 --- a/test/cpp/microbenchmarks/bm_byte_buffer.cc +++ b/test/cpp/microbenchmarks/bm_byte_buffer.cc @@ -23,6 +23,8 @@ #include #include #include + +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -122,9 +124,11 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); + benchmark::RunTheBenchmarksNamespaced(); return 0; } diff --git a/test/cpp/microbenchmarks/bm_channel.cc b/test/cpp/microbenchmarks/bm_channel.cc index 224170b32e9..0e2bfc18020 100644 --- a/test/cpp/microbenchmarks/bm_channel.cc +++ b/test/cpp/microbenchmarks/bm_channel.cc @@ -20,6 +20,7 @@ #include #include +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -81,6 +82,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index 9bafcf1dcd3..063b7fca664 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -33,6 +33,7 @@ #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/timeout_encoding.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -937,6 +938,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_chttp2_transport.cc b/test/cpp/microbenchmarks/bm_chttp2_transport.cc index d7535248f09..cdb313b8e3a 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_transport.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_transport.cc @@ -33,6 +33,7 @@ #include "src/core/lib/iomgr/resource_quota.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/transport/static_metadata.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -684,6 +685,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_metadata.cc b/test/cpp/microbenchmarks/bm_metadata.cc index eeba309dfcb..b23918aa1f1 100644 --- a/test/cpp/microbenchmarks/bm_metadata.cc +++ b/test/cpp/microbenchmarks/bm_metadata.cc @@ -25,6 +25,7 @@ #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/static_metadata.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -295,6 +296,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_timer.cc b/test/cpp/microbenchmarks/bm_timer.cc index db6ab0a073e..1eb9f52c53e 100644 --- a/test/cpp/microbenchmarks/bm_timer.cc +++ b/test/cpp/microbenchmarks/bm_timer.cc @@ -24,10 +24,11 @@ #include #include #include -#include "test/cpp/microbenchmarks/helpers.h" -#include "test/cpp/util/test_config.h" #include "src/core/lib/iomgr/timer.h" +#include "test/core/util/test_config.h" +#include "test/cpp/microbenchmarks/helpers.h" +#include "test/cpp/util/test_config.h" namespace grpc { namespace testing { @@ -109,6 +110,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); From c736cf073c472a39e4ca13deb7800cfcb450bab6 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 1 Jul 2020 13:25:37 -0700 Subject: [PATCH 192/239] Added call to grpc::testing::TestEnvironment in more tests --- test/cpp/microbenchmarks/bm_arena.cc | 2 ++ test/cpp/microbenchmarks/bm_call_create.cc | 3 ++- test/cpp/microbenchmarks/bm_callback_streaming_ping_pong.cc | 2 ++ test/cpp/microbenchmarks/bm_callback_unary_ping_pong.cc | 2 ++ test/cpp/microbenchmarks/bm_closure.cc | 2 ++ test/cpp/microbenchmarks/bm_cq.cc | 6 ++++-- test/cpp/microbenchmarks/bm_cq_multiple_threads.cc | 6 ++++-- test/cpp/microbenchmarks/bm_error.cc | 2 ++ .../cpp/microbenchmarks/bm_fullstack_streaming_ping_pong.cc | 2 ++ test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc | 2 ++ test/cpp/microbenchmarks/bm_fullstack_trickle.cc | 2 ++ test/cpp/microbenchmarks/bm_fullstack_unary_ping_pong.cc | 2 ++ test/cpp/microbenchmarks/bm_pollset.cc | 2 ++ test/cpp/microbenchmarks/bm_threadpool.cc | 2 ++ test/cpp/server/server_builder_test.cc | 2 ++ test/cpp/server/server_builder_with_socket_mutator_test.cc | 2 ++ test/cpp/util/slice_test.cc | 3 +++ 17 files changed, 39 insertions(+), 5 deletions(-) diff --git a/test/cpp/microbenchmarks/bm_arena.cc b/test/cpp/microbenchmarks/bm_arena.cc index c0d76fa3d7d..90de5543661 100644 --- a/test/cpp/microbenchmarks/bm_arena.cc +++ b/test/cpp/microbenchmarks/bm_arena.cc @@ -20,6 +20,7 @@ #include #include "src/core/lib/gprpp/arena.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -66,6 +67,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); benchmark::RunTheBenchmarksNamespaced(); diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index b4a70272ea6..a43ed7354c2 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -41,9 +41,9 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/transport_impl.h" - #include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -825,6 +825,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_callback_streaming_ping_pong.cc b/test/cpp/microbenchmarks/bm_callback_streaming_ping_pong.cc index cde3eb2a241..bc02bb9c3e8 100644 --- a/test/cpp/microbenchmarks/bm_callback_streaming_ping_pong.cc +++ b/test/cpp/microbenchmarks/bm_callback_streaming_ping_pong.cc @@ -16,6 +16,7 @@ * */ +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/callback_streaming_ping_pong.h" #include "test/cpp/util/test_config.h" @@ -128,6 +129,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_callback_unary_ping_pong.cc b/test/cpp/microbenchmarks/bm_callback_unary_ping_pong.cc index 4ee77525bc6..93eef7c1fc3 100644 --- a/test/cpp/microbenchmarks/bm_callback_unary_ping_pong.cc +++ b/test/cpp/microbenchmarks/bm_callback_unary_ping_pong.cc @@ -16,6 +16,7 @@ * */ +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/callback_unary_ping_pong.h" #include "test/cpp/util/test_config.h" @@ -110,6 +111,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index 149f32b3069..440eac02362 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -27,6 +27,7 @@ #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -393,6 +394,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index 1e100ae56c0..c53eb2b9413 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -24,10 +24,11 @@ #include #include #include -#include "test/cpp/microbenchmarks/helpers.h" -#include "test/cpp/util/test_config.h" #include "src/core/lib/surface/completion_queue.h" +#include "test/core/util/test_config.h" +#include "test/cpp/microbenchmarks/helpers.h" +#include "test/cpp/util/test_config.h" namespace grpc { namespace testing { @@ -251,6 +252,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc index edb14116e8d..b89eafb9c2c 100644 --- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc +++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc @@ -23,12 +23,13 @@ #include #include #include -#include "test/cpp/microbenchmarks/helpers.h" -#include "test/cpp/util/test_config.h" #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/surface/completion_queue.h" +#include "test/core/util/test_config.h" +#include "test/cpp/microbenchmarks/helpers.h" +#include "test/cpp/util/test_config.h" struct grpc_pollset { gpr_mu mu; @@ -213,6 +214,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); gpr_mu_init(&g_mu); gpr_cv_init(&g_cv); ::benchmark::Initialize(&argc, argv); diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc index c58453be4f5..ce42f334ff1 100644 --- a/test/cpp/microbenchmarks/bm_error.cc +++ b/test/cpp/microbenchmarks/bm_error.cc @@ -24,6 +24,7 @@ #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/error_utils.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -316,6 +317,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_fullstack_streaming_ping_pong.cc b/test/cpp/microbenchmarks/bm_fullstack_streaming_ping_pong.cc index 60ca9a093ed..7096a84b2fe 100644 --- a/test/cpp/microbenchmarks/bm_fullstack_streaming_ping_pong.cc +++ b/test/cpp/microbenchmarks/bm_fullstack_streaming_ping_pong.cc @@ -18,6 +18,7 @@ /* Benchmark gRPC end2end in various configurations */ +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/fullstack_streaming_ping_pong.h" #include "test/cpp/util/test_config.h" @@ -119,6 +120,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc b/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc index d0df2417139..f0f57f2fc88 100644 --- a/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc +++ b/test/cpp/microbenchmarks/bm_fullstack_streaming_pump.cc @@ -18,6 +18,7 @@ /* Benchmark gRPC end2end in various configurations */ +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/fullstack_streaming_pump.h" #include "test/cpp/util/test_config.h" @@ -63,6 +64,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc index 2d733bcaa42..a27b77f4a1e 100644 --- a/test/cpp/microbenchmarks/bm_fullstack_trickle.cc +++ b/test/cpp/microbenchmarks/bm_fullstack_trickle.cc @@ -27,6 +27,7 @@ #include "src/core/lib/iomgr/timer_manager.h" #include "src/core/lib/profiling/timers.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" +#include "test/core/util/test_config.h" #include "test/core/util/trickle_endpoint.h" #include "test/cpp/microbenchmarks/fullstack_context_mutators.h" #include "test/cpp/microbenchmarks/fullstack_fixtures.h" @@ -462,6 +463,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_fullstack_unary_ping_pong.cc b/test/cpp/microbenchmarks/bm_fullstack_unary_ping_pong.cc index 3e8f9344021..c47476e7a95 100644 --- a/test/cpp/microbenchmarks/bm_fullstack_unary_ping_pong.cc +++ b/test/cpp/microbenchmarks/bm_fullstack_unary_ping_pong.cc @@ -18,6 +18,7 @@ /* Benchmark gRPC end2end in various configurations */ +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/fullstack_unary_ping_pong.h" #include "test/cpp/util/test_config.h" @@ -171,6 +172,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc index 53e5102941e..928b5877920 100644 --- a/test/cpp/microbenchmarks/bm_pollset.cc +++ b/test/cpp/microbenchmarks/bm_pollset.cc @@ -29,6 +29,7 @@ #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -258,6 +259,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/microbenchmarks/bm_threadpool.cc b/test/cpp/microbenchmarks/bm_threadpool.cc index e7e78346068..d403f8f0918 100644 --- a/test/cpp/microbenchmarks/bm_threadpool.cc +++ b/test/cpp/microbenchmarks/bm_threadpool.cc @@ -23,6 +23,7 @@ #include #include "src/core/lib/iomgr/executor/threadpool.h" +#include "test/core/util/test_config.h" #include "test/cpp/microbenchmarks/helpers.h" #include "test/cpp/util/test_config.h" @@ -320,6 +321,7 @@ void RunTheBenchmarksNamespaced() { RunSpecifiedBenchmarks(); } } // namespace benchmark int main(int argc, char* argv[]) { + grpc::testing::TestEnvironment env(argc, argv); LibraryInitializer libInit; ::benchmark::Initialize(&argc, argv); ::grpc::testing::InitTest(&argc, &argv, false); diff --git a/test/cpp/server/server_builder_test.cc b/test/cpp/server/server_builder_test.cc index df78708a83c..5d9fb06fd44 100644 --- a/test/cpp/server/server_builder_test.cc +++ b/test/cpp/server/server_builder_test.cc @@ -26,6 +26,7 @@ #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" +#include "test/core/util/test_config.h" namespace grpc { namespace { @@ -87,6 +88,7 @@ TEST_F(ServerBuilderTest, CreateServerRepeatedPortWithDisallowedReusePort) { } // namespace grpc int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv); int ret = RUN_ALL_TESTS(); return ret; diff --git a/test/cpp/server/server_builder_with_socket_mutator_test.cc b/test/cpp/server/server_builder_with_socket_mutator_test.cc index 25f10cd5fdb..c7d4382b756 100644 --- a/test/cpp/server/server_builder_with_socket_mutator_test.cc +++ b/test/cpp/server/server_builder_with_socket_mutator_test.cc @@ -28,6 +28,7 @@ #include "src/core/lib/iomgr/socket_mutator.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" +#include "test/core/util/test_config.h" /* This test does a sanity check that grpc_socket_mutator's * are used by servers. It's meant to protect code and end-to-end @@ -115,6 +116,7 @@ TEST_F(ServerBuilderWithSocketMutatorTest, CreateServerWithSocketMutator) { } // namespace grpc int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv); int ret = RUN_ALL_TESTS(); return ret; diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index 3b37ebe582c..b191e5eaa2a 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -23,6 +23,8 @@ #include #include +#include "test/core/util/test_config.h" + namespace grpc { static internal::GrpcLibraryInitializer g_gli_initializer; @@ -135,6 +137,7 @@ TEST_F(SliceTest, Cslice) { } // namespace grpc int main(int argc, char** argv) { + grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv); int ret = RUN_ALL_TESTS(); return ret; From 0009e7f86810e80f66adbb556e9ef081ad0dffe7 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Thu, 2 Jul 2020 16:12:51 -0700 Subject: [PATCH 193/239] Add comment --- src/core/ext/filters/client_channel/client_channel.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 84e2b1e45a1..921de985972 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -193,6 +193,8 @@ class ChannelData { external_watchers_.erase(it); } } + // watcher->Cancel() will hop into the WorkSerializer, so we have to unlock + // the mutex before calling it. if (watcher != nullptr && cancel) watcher->Cancel(); } From 8925e714574289aff0e80860be498f60dfd2b21f Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 6 Jul 2020 09:13:36 -0700 Subject: [PATCH 194/239] Passed the repo manager to veblush --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- .github/ISSUE_TEMPLATE/cleanup_request.md | 2 +- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/ISSUE_TEMPLATE/question.md | 2 +- .github/pull_request_template.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d103ec92af2..dbec90aefc9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Report a bug about: Create a report to help us improve labels: kind/bug, priority/P2 -assignees: nicolasnoble +assignees: veblush --- diff --git a/.github/ISSUE_TEMPLATE/cleanup_request.md b/.github/ISSUE_TEMPLATE/cleanup_request.md index 284797c9e59..d821fef2cf9 100644 --- a/.github/ISSUE_TEMPLATE/cleanup_request.md +++ b/.github/ISSUE_TEMPLATE/cleanup_request.md @@ -2,7 +2,7 @@ name: Request a cleanup about: Suggest a cleanup in our repository labels: kind/internal cleanup, priority/P2 -assignees: nicolasnoble +assignees: veblush --- diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index f538eae6194..5a2f61d118a 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -2,7 +2,7 @@ name: Request a feature about: Suggest an idea for this project labels: kind/enhancement, priority/P2 -assignees: nicolasnoble +assignees: veblush --- diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md index da5741aa267..68f5dfb29bf 100644 --- a/.github/ISSUE_TEMPLATE/question.md +++ b/.github/ISSUE_TEMPLATE/question.md @@ -2,7 +2,7 @@ name: Ask a question about: Ask a question labels: kind/question, priority/P3 -assignees: nicolasnoble +assignees: veblush --- diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 57af6c21597..366b68604df 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,4 +8,4 @@ If you know who should review your pull request, please remove the mentioning be --> -@nicolasnoble +@veblush From b92ca15356e0c67510cfddfab452f43a9fd345f3 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 6 Jul 2020 09:51:05 -0700 Subject: [PATCH 195/239] Increase size of a test to match internal guidance --- test/cpp/microbenchmarks/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/test/cpp/microbenchmarks/BUILD b/test/cpp/microbenchmarks/BUILD index d26815f40cc..82f9952675f 100644 --- a/test/cpp/microbenchmarks/BUILD +++ b/test/cpp/microbenchmarks/BUILD @@ -236,6 +236,7 @@ grpc_cc_library( grpc_cc_test( name = "bm_fullstack_unary_ping_pong", + size = "large", srcs = [ "bm_fullstack_unary_ping_pong.cc", ], From a4ca41960c8b1c4e1a5200393e349bbb1a6dcca0 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Mon, 6 Jul 2020 09:59:28 -0700 Subject: [PATCH 196/239] Pin isort to fix sanity test breakage --- tools/distrib/pylint_code.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/distrib/pylint_code.sh b/tools/distrib/pylint_code.sh index 5e6b818dc99..060c2b7ffd9 100755 --- a/tools/distrib/pylint_code.sh +++ b/tools/distrib/pylint_code.sh @@ -40,7 +40,9 @@ python3 -m virtualenv $VIRTUALENV -p $(which python3) PYTHON=$VIRTUALENV/bin/python $PYTHON -m pip install --upgrade pip==19.3.1 -$PYTHON -m pip install --upgrade astroid==2.3.3 pylint==2.2.2 + +# TODO(https://github.com/grpc/grpc/issues/23394): Update Pylint. +$PYTHON -m pip install --upgrade astroid==2.3.3 pylint==2.2.2 "isort>=4.3.0,<5.0.0" EXIT=0 for dir in "${DIRS[@]}"; do From 60b878d3a5c4a5c7cd9f3c75dd76cf873d31e148 Mon Sep 17 00:00:00 2001 From: Donna Dionne Date: Mon, 6 Jul 2020 10:54:22 -0700 Subject: [PATCH 197/239] New Matchers Implementation - All except for Regex (which will be submitted with RE2 import PR) --- BUILD | 38 +- Makefile | 4 +- .../lb_policy/xds/xds_routing.cc | 376 +++++++++++++++--- .../ext/filters/client_channel/xds/xds_api.cc | 335 +++++++++++++--- .../ext/filters/client_channel/xds/xds_api.h | 66 ++- .../filters/client_channel/xds/xds_client.cc | 114 +++++- src/proto/grpc/testing/xds/BUILD | 5 +- .../grpc/testing/xds/lds_rds_for_test.proto | 44 ++ test/cpp/end2end/xds_end2end_test.cc | 365 +++++++++++++---- 9 files changed, 1106 insertions(+), 241 deletions(-) diff --git a/BUILD b/BUILD index 5e2ba75504d..493356dc5c1 100644 --- a/BUILD +++ b/BUILD @@ -1290,6 +1290,24 @@ grpc_cc_library( ], ) +grpc_cc_library( + name = "grpc_xds_api_header", + hdrs = [ + "src/core/ext/filters/client_channel/xds/xds_api.h", + "src/core/ext/filters/client_channel/xds/xds_bootstrap.h", + "src/core/ext/filters/client_channel/xds/xds_client_stats.h", + ], + external_deps = [ + "upb_lib", + "upb_textformat_lib", + ], + language = "c++", + deps = [ + "envoy_ads_upbdefs", + "grpc_base", + ], +) + grpc_cc_library( name = "grpc_xds_client", srcs = [ @@ -1300,16 +1318,9 @@ grpc_cc_library( "src/core/ext/filters/client_channel/xds/xds_client_stats.cc", ], hdrs = [ - "src/core/ext/filters/client_channel/xds/xds_api.h", - "src/core/ext/filters/client_channel/xds/xds_bootstrap.h", "src/core/ext/filters/client_channel/xds/xds_channel.h", "src/core/ext/filters/client_channel/xds/xds_channel_args.h", "src/core/ext/filters/client_channel/xds/xds_client.h", - "src/core/ext/filters/client_channel/xds/xds_client_stats.h", - ], - external_deps = [ - "upb_lib", - "upb_textformat_lib", ], language = "c++", deps = [ @@ -1317,6 +1328,7 @@ grpc_cc_library( "envoy_ads_upbdefs", "grpc_base", "grpc_client_channel", + "grpc_xds_api_header", ], ) @@ -1330,16 +1342,9 @@ grpc_cc_library( "src/core/ext/filters/client_channel/xds/xds_client_stats.cc", ], hdrs = [ - "src/core/ext/filters/client_channel/xds/xds_api.h", - "src/core/ext/filters/client_channel/xds/xds_bootstrap.h", "src/core/ext/filters/client_channel/xds/xds_channel.h", "src/core/ext/filters/client_channel/xds/xds_channel_args.h", "src/core/ext/filters/client_channel/xds/xds_client.h", - "src/core/ext/filters/client_channel/xds/xds_client_stats.h", - ], - external_deps = [ - "upb_lib", - "upb_textformat_lib", ], language = "c++", deps = [ @@ -1348,6 +1353,7 @@ grpc_cc_library( "grpc_base", "grpc_client_channel", "grpc_secure", + "grpc_xds_api_header", ], ) @@ -1448,10 +1454,14 @@ grpc_cc_library( srcs = [ "src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc", ], + external_deps = [ + "absl/strings", + ], language = "c++", deps = [ "grpc_base", "grpc_client_channel", + "grpc_xds_api_header", ], ) diff --git a/Makefile b/Makefile index e3a9783b8d1..269e72075f1 100644 --- a/Makefile +++ b/Makefile @@ -2849,12 +2849,12 @@ $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc: protoc_dep_error $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc: src/proto/grpc/testing/xds/lds_rds_for_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc +$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc: src/proto/grpc/testing/xds/lds_rds_for_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc: src/proto/grpc/testing/xds/lds_rds_for_test.proto $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc +$(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.cc: src/proto/grpc/testing/xds/lds_rds_for_test.proto $(GENDIR)/src/proto/grpc/testing/xds/lds_rds_for_test.pb.cc $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/cds_for_test.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.pb.cc $(GENDIR)/src/proto/grpc/testing/xds/eds_for_test.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(PROTOC_PLUGINS_DIR)/grpc_cpp_plugin$(EXECUTABLE_SUFFIX) $< diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc index ea1007cb90c..59c423f0317 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc @@ -20,6 +20,8 @@ #include #include +#include "absl/strings/match.h" +#include "absl/strings/numbers.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" @@ -30,6 +32,7 @@ #include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h" #include "src/core/ext/filters/client_channel/lb_policy_factory.h" #include "src/core/ext/filters/client_channel/lb_policy_registry.h" +#include "src/core/ext/filters/client_channel/xds/xds_api.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/orphanable.h" @@ -50,12 +53,8 @@ constexpr char kXdsRouting[] = "xds_routing_experimental"; // Config for xds_routing LB policy. class XdsRoutingLbConfig : public LoadBalancingPolicy::Config { public: - struct Matcher { - std::string service; - std::string method; - }; struct Route { - Matcher matcher; + XdsApi::RdsUpdate::RdsRoute::Matchers matchers; std::string action; }; using RouteTable = std::vector; @@ -109,20 +108,24 @@ class XdsRoutingLb : public LoadBalancingPolicy { class RoutePicker : public SubchannelPicker { public: struct Route { - XdsRoutingLbConfig::Matcher matcher; + const XdsApi::RdsUpdate::RdsRoute::Matchers* matchers; RefCountedPtr picker; }; // Maintains an ordered xds route table as provided by RDS response. using RouteTable = std::vector; - explicit RoutePicker(RouteTable route_table) - : route_table_(std::move(route_table)) {} + explicit RoutePicker(RouteTable route_table, + RefCountedPtr config) + : route_table_(std::move(route_table)), config_(std::move(config)) {} PickResult Pick(PickArgs args) override; private: RouteTable route_table_; + // Take a reference to config so that we can use + // XdsApi::RdsUpdate::RdsRoute::Matchers from it. + RefCountedPtr config_; }; // Each XdsRoutingChild holds a ref to its parent XdsRoutingLb. @@ -214,27 +217,106 @@ class XdsRoutingLb : public LoadBalancingPolicy { // XdsRoutingLb::RoutePicker // -XdsRoutingLb::PickResult XdsRoutingLb::RoutePicker::Pick(PickArgs args) { - absl::string_view path; +absl::optional GetMetadataValue( + const std::string& key, + LoadBalancingPolicy::MetadataInterface* initial_metadata) { // TODO(roth): Using const auto& here trigger a warning in a macos or windows // build: //*(args.initial_metadata) is returning values not references. - for (const auto p : *(args.initial_metadata)) { - if (p.first == ":path") { - path = p.second; - break; + GPR_DEBUG_ASSERT(initial_metadata != nullptr); + for (const auto p : *(initial_metadata)) { + if (p.first == key) { + return p.second; } } - std::vector path_elements = - absl::StrSplit(path.substr(1), '/'); - for (const Route& route : route_table_) { - if ((path_elements[0] == route.matcher.service && - (path_elements[1] == route.matcher.method || - route.matcher.method.empty())) || - (route.matcher.service.empty() && route.matcher.method.empty())) { - return route.picker->Pick(args); + return absl::nullopt; +} + +bool PathMatch( + const absl::string_view& path, + const XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher& path_matcher) { + switch (path_matcher.type) { + case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType:: + PREFIX: + return absl::StartsWith(path, path_matcher.string_matcher); + case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType:: + PATH: + return path == path_matcher.string_matcher; + default: + return false; + } +} + +bool HeaderMatchHelper( + const XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher& header_matcher, + LoadBalancingPolicy::MetadataInterface* initial_metadata) { + auto value = GetMetadataValue(header_matcher.name, initial_metadata); + if (!value.has_value()) { + if (header_matcher.type == XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::PRESENT) { + return !header_matcher.present_match; + } else { + // For all other header matcher types, we need the header value to + // exist to consider matches. + return false; } } + switch (header_matcher.type) { + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::EXACT: + return value.value() == header_matcher.string_matcher; + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::RANGE: + int64_t int_value; + if (!absl::SimpleAtoi(value.value(), &int_value)) { + return false; + } + return int_value >= header_matcher.range_start && + int_value < header_matcher.range_end; + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::PREFIX: + return absl::StartsWith(value.value(), header_matcher.string_matcher); + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::SUFFIX: + return absl::EndsWith(value.value(), header_matcher.string_matcher); + default: + return false; + } +} + +bool HeadersMatch( + LoadBalancingPolicy::PickArgs args, + const std::vector& + header_matchers) { + for (const auto& header_matcher : header_matchers) { + bool match = HeaderMatchHelper(header_matcher, args.initial_metadata); + if (header_matcher.invert_match) match = !match; + if (!match) return false; + } + return true; +} + +bool UnderFraction(const uint32_t fraction_per_million) { + // Generate a random number in [0, 1000000). + const uint32_t random_number = rand() % 1000000; + return random_number < fraction_per_million; +} + +XdsRoutingLb::PickResult XdsRoutingLb::RoutePicker::Pick(PickArgs args) { + for (const Route& route : route_table_) { + // Path matching. + auto path = GetMetadataValue(":path", args.initial_metadata); + GPR_DEBUG_ASSERT(path.has_value()); + if (!PathMatch(path.value(), route.matchers->path_matcher)) continue; + // Header Matching. + if (!HeadersMatch(args, route.matchers->header_matchers)) continue; + // Match fraction check + if (route.matchers->fraction_per_million.has_value() && + !UnderFraction(route.matchers->fraction_per_million.value())) + continue; + // Found a match + return route.picker->Pick(args); + } PickResult result; result.type = PickResult::PICK_FAILED; result.error = @@ -358,7 +440,7 @@ void XdsRoutingLb::UpdateStateLocked() { RoutePicker::RouteTable route_table; for (const auto& config_route : config_->route_table()) { RoutePicker::Route route; - route.matcher = config_route.matcher; + route.matchers = &config_route.matchers; route.picker = actions_[config_route.action]->picker_wrapper(); if (route.picker == nullptr) { if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_routing_lb_trace)) { @@ -373,7 +455,7 @@ void XdsRoutingLb::UpdateStateLocked() { } route_table.push_back(std::move(route)); } - picker = absl::make_unique(std::move(route_table)); + picker = absl::make_unique(std::move(route_table), config_); break; } case GRPC_CHANNEL_CONNECTING: @@ -683,12 +765,6 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory { GRPC_ERROR_CREATE_FROM_STATIC_STRING("no valid routes configured"); error_list.push_back(error); } - if (!route_table.back().matcher.service.empty() || - !route_table.back().matcher.method.empty()) { - grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "default route must not contain service or method"); - error_list.push_back(error); - } if (!actions_to_be_used.empty()) { error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( "some actions were not referenced by any route")); @@ -731,62 +807,230 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory { return error_list; } - static std::vector ParseMethodName( - const Json& json, XdsRoutingLbConfig::Matcher* route_config) { + static std::vector ParseRoute( + const Json& json, const XdsRoutingLbConfig::ActionMap& action_map, + XdsRoutingLbConfig::Route* route, + std::set* actions_to_be_used) { std::vector error_list; if (json.type() != Json::Type::OBJECT) { error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( "value should be of type object")); return error_list; } - // Parse service - auto it = json.object_value().find("service"); + // Parse and ensure one and only one path matcher is set: prefix, path, or + // regex. + bool path_matcher_seen = false; + auto it = json.object_value().find("prefix"); if (it != json.object_value().end()) { if (it->second.type() != Json::Type::STRING) { error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "field:service error: should be string")); + "field:prefix error: should be string")); } else { - route_config->service = it->second.string_value(); + path_matcher_seen = true; + route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute:: + Matchers::PathMatcher::PathMatcherType::PREFIX; + route->matchers.path_matcher.string_matcher = it->second.string_value(); } } - // Parse method - it = json.object_value().find("method"); + it = json.object_value().find("path"); if (it != json.object_value().end()) { - if (it->second.type() != Json::Type::STRING) { + if (path_matcher_seen) { error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "field:method error: should be string")); + "field:path error: other path matcher already specified")); } else { - route_config->method = it->second.string_value(); + path_matcher_seen = true; + if (it->second.type() != Json::Type::STRING) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:path error: should be string")); + } else { + route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute:: + Matchers::PathMatcher::PathMatcherType::PATH; + route->matchers.path_matcher.string_matcher = + it->second.string_value(); + } } } - if (route_config->service.empty() && !route_config->method.empty()) { + if (!path_matcher_seen) { error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "service is empty when method is not")); + "one path matcher: prefix, path, or regex is required")); } - return error_list; - } - - static std::vector ParseRoute( - const Json& json, const XdsRoutingLbConfig::ActionMap& action_map, - XdsRoutingLbConfig::Route* route, - std::set* actions_to_be_used) { - std::vector error_list; - if (json.type() != Json::Type::OBJECT) { - error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "value should be of type object")); - return error_list; + // Parse Header Matcher: headers. + it = json.object_value().find("headers"); + if (it != json.object_value().end()) { + if (it->second.type() != Json::Type::ARRAY) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:headers error: should be array")); + } else { + const Json::Array& array = it->second.array_value(); + for (size_t i = 0; i < array.size(); ++i) { + const Json& header_json = array[i]; + if (header_json.type() != Json::Type::OBJECT) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "value should be of type object")); + } else { + route->matchers.header_matchers.emplace_back(); + XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher& + header_matcher = route->matchers.header_matchers.back(); + auto header_it = header_json.object_value().find("name"); + if (header_it == header_json.object_value().end()) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:name error:required field missing")); + } else { + if (header_it->second.type() != Json::Type::STRING) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:name error: should be string")); + } else { + header_matcher.name = header_it->second.string_value(); + } + } + header_it = header_json.object_value().find("invert_match"); + if (header_it != header_json.object_value().end()) { + if (header_it->second.type() == Json::Type::JSON_TRUE) { + header_matcher.invert_match = true; + } else if (header_it->second.type() == Json::Type::JSON_FALSE) { + header_matcher.invert_match = false; + } else { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:present_match error: should be boolean")); + } + } + // Parse and ensure one and only one header matcher is set per + // header matcher. + bool header_matcher_seen = false; + header_it = header_json.object_value().find("exact_match"); + if (header_it != header_json.object_value().end()) { + header_matcher_seen = true; + if (header_it->second.type() != Json::Type::STRING) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:exact_match error: should be string")); + } else { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::EXACT; + header_matcher.string_matcher = + header_it->second.string_value(); + } + } + header_it = header_json.object_value().find("range_match"); + if (header_it != header_json.object_value().end()) { + if (header_matcher_seen) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:range_match error: other header matcher already " + "specified")); + } else { + header_matcher_seen = true; + if (header_it->second.type() != Json::Type::OBJECT) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:range_match error: should be object")); + } else { + auto range_it = + header_it->second.object_value().find("start"); + if (range_it != header_it->second.object_value().end()) { + if (range_it->second.type() != Json::Type::NUMBER) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:start error: should be of number")); + } else { + header_matcher.range_start = gpr_parse_nonnegative_int( + range_it->second.string_value().c_str()); + } + } else { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:start missing")); + } + range_it = header_it->second.object_value().find("end"); + if (range_it != header_it->second.object_value().end()) { + if (range_it->second.type() != Json::Type::NUMBER) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:end error: should be of number")); + } else { + header_matcher.range_end = gpr_parse_nonnegative_int( + range_it->second.string_value().c_str()); + } + } else { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:end missing")); + } + if (header_matcher.range_end > header_matcher.range_start) { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute:: + Matchers::HeaderMatcher::HeaderMatcherType::RANGE; + route->matchers.header_matchers.emplace_back( + header_matcher); + } + } + } + } + header_it = header_json.object_value().find("present_match"); + if (header_it != header_json.object_value().end()) { + if (header_matcher_seen) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:present_match error: other header matcher already " + "specified")); + } else { + header_matcher_seen = true; + if (header_it->second.type() == Json::Type::JSON_TRUE) { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::PRESENT; + header_matcher.present_match = true; + } else if (header_it->second.type() == Json::Type::JSON_FALSE) { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::PRESENT; + header_matcher.present_match = false; + } else { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:present_match error: should be boolean")); + } + } + } + header_it = header_json.object_value().find("prefix_match"); + if (header_it != header_json.object_value().end()) { + if (header_matcher_seen) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:prefix_match error: other header matcher already " + "specified")); + } else { + header_matcher_seen = true; + if (header_it->second.type() != Json::Type::STRING) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:prefix_match error: should be string")); + } else { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::PREFIX; + header_matcher.string_matcher = + header_it->second.string_value(); + } + } + } + header_it = header_json.object_value().find("suffix_match"); + if (header_it != header_json.object_value().end()) { + if (header_matcher_seen) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:suffix_match error: other header matcher already " + "specified")); + } else { + header_matcher_seen = true; + if (header_it->second.type() != Json::Type::STRING) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:suffix_match error: should be string")); + } else { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::SUFFIX; + header_matcher.string_matcher = + header_it->second.string_value(); + } + } + } + } + } + } } - // Parse MethodName. - auto it = json.object_value().find("methodName"); - if (it == json.object_value().end()) { - error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "field:methodName error:required field missing")); - } else { - std::vector method_name_errors = - ParseMethodName(it->second, &route->matcher); - if (!method_name_errors.empty()) { - error_list.push_back(GRPC_ERROR_CREATE_FROM_VECTOR( - "field:methodName", &method_name_errors)); + // Parse Fraction numerator. + it = json.object_value().find("match_fraction"); + if (it != json.object_value().end()) { + if (it->second.type() != Json::Type::NUMBER) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:match_fraction error:must be of type number")); + } else { + route->matchers.fraction_per_million = + gpr_parse_nonnegative_int(it->second.string_value().c_str()); } } // Parse action. diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc index ae28e65f705..8296280b91e 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -23,6 +23,7 @@ #include #include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/str_split.h" @@ -62,7 +63,9 @@ #include "envoy/config/listener/v2/api_listener.upb.h" #include "envoy/service/load_stats/v2/lrs.upb.h" #include "envoy/service/load_stats/v2/lrs.upbdefs.h" +#include "envoy/type/matcher/regex.upb.h" #include "envoy/type/percent.upb.h" +#include "envoy/type/range.upb.h" #include "google/protobuf/any.upb.h" #include "google/protobuf/duration.upb.h" #include "google/protobuf/struct.upb.h" @@ -152,6 +155,84 @@ bool XdsRoutingEnabled() { } // namespace +std::string XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::ToString() + const { + std::string path_type_string; + switch (type) { + case PathMatcherType::PATH: + path_type_string = "path match"; + break; + case PathMatcherType::PREFIX: + path_type_string = "prefix match"; + break; + default: + break; + } + return absl::StrFormat("Path %s:/%s/", path_type_string, string_matcher); +} + +std::string XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher::ToString() + const { + switch (type) { + case HeaderMatcherType::EXACT: + return absl::StrFormat("Header exact match:%s %s:%s", + invert_match ? " not" : "", name, string_matcher); + case HeaderMatcherType::RANGE: + return absl::StrFormat("Header range match:%s %s:[%d, %d)", + invert_match ? " not" : "", name, range_start, + range_end); + case HeaderMatcherType::PRESENT: + return absl::StrFormat("Header present match:%s %s:%s", + invert_match ? " not" : "", name, + present_match ? "true" : "false"); + case HeaderMatcherType::PREFIX: + return absl::StrFormat("Header prefix match:%s %s:%s", + invert_match ? " not" : "", name, string_matcher); + case HeaderMatcherType::SUFFIX: + return absl::StrFormat("Header suffix match:%s %s:%s", + invert_match ? " not" : "", name, string_matcher); + default: + return ""; + } +} + +std::string XdsApi::RdsUpdate::RdsRoute::Matchers::ToString() const { + std::vector contents; + contents.push_back(path_matcher.ToString()); + for (const auto& header_it : header_matchers) { + contents.push_back(header_it.ToString()); + } + if (fraction_per_million.has_value()) { + contents.push_back(absl::StrFormat("Fraction Per Million %d", + fraction_per_million.value())); + } + return absl::StrJoin(contents, "\n"); +} + +std::string XdsApi::RdsUpdate::RdsRoute::ClusterWeight::ToString() const { + return absl::StrFormat("{cluster=%s, weight=%d}", name, weight); +} + +std::string XdsApi::RdsUpdate::RdsRoute::ToString() const { + std::vector contents; + contents.push_back(matchers.ToString()); + if (!cluster_name.empty()) { + contents.push_back(absl::StrFormat("Cluster name: %s", cluster_name)); + } + for (const auto& weighted_it : weighted_clusters) { + contents.push_back(weighted_it.ToString()); + } + return absl::StrJoin(contents, "\n"); +} + +std::string XdsApi::RdsUpdate::ToString() const { + std::vector contents; + for (const auto& route_it : routes) { + contents.push_back(route_it.ToString()); + } + return absl::StrJoin(contents, ",\n"); +} + XdsApi::XdsApi(XdsClient* client, TraceFlag* tracer, const XdsBootstrap::Node* node) : client_(client), @@ -465,8 +546,170 @@ MatchType DomainPatternMatchType(const std::string& domain_pattern) { return INVALID_MATCH; } +grpc_error* RoutePathMatchParse(const envoy_api_v2_route_RouteMatch* match, + XdsApi::RdsUpdate::RdsRoute* rds_route, + bool* ignore_route) { + if (envoy_api_v2_route_RouteMatch_has_prefix(match)) { + upb_strview prefix = envoy_api_v2_route_RouteMatch_prefix(match); + // Empty prefix "" is accepted. + if (prefix.size > 0) { + // Prefix "/" is accepted. + if (prefix.data[0] != '/') { + // Prefix which does not start with a / will never match anything, so + // ignore this route. + *ignore_route = true; + return GRPC_ERROR_NONE; + } + std::vector prefix_elements = + absl::StrSplit(absl::string_view(prefix.data, prefix.size).substr(1), + absl::MaxSplits('/', 2)); + if (prefix_elements.size() > 2) { + // Prefix cannot have more than 2 slashes. + *ignore_route = true; + return GRPC_ERROR_NONE; + } else if (prefix_elements.size() == 2 && prefix_elements[0].empty()) { + // Prefix contains empty string between the 2 slashes + *ignore_route = true; + return GRPC_ERROR_NONE; + } + } + rds_route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute:: + Matchers::PathMatcher::PathMatcherType::PREFIX; + rds_route->matchers.path_matcher.string_matcher = + UpbStringToStdString(prefix); + } else if (envoy_api_v2_route_RouteMatch_has_path(match)) { + upb_strview path = envoy_api_v2_route_RouteMatch_path(match); + if (path.size == 0) { + // Path that is empty will never match anything, so ignore this route. + *ignore_route = true; + return GRPC_ERROR_NONE; + } + if (path.data[0] != '/') { + // Path which does not start with a / will never match anything, so + // ignore this route. + *ignore_route = true; + return GRPC_ERROR_NONE; + } + std::vector path_elements = + absl::StrSplit(absl::string_view(path.data, path.size).substr(1), + absl::MaxSplits('/', 2)); + if (path_elements.size() != 2) { + // Path not in the required format of /service/method will never match + // anything, so ignore this route. + *ignore_route = true; + return GRPC_ERROR_NONE; + } else if (path_elements[0].empty()) { + // Path contains empty service name will never match anything, so ignore + // this route. + *ignore_route = true; + return GRPC_ERROR_NONE; + } else if (path_elements[1].empty()) { + // Path contains empty method name will never match anything, so ignore + // this route. + *ignore_route = true; + return GRPC_ERROR_NONE; + } + rds_route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute:: + Matchers::PathMatcher::PathMatcherType::PATH; + rds_route->matchers.path_matcher.string_matcher = + UpbStringToStdString(path); + } else { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Invalid route path specifier specified."); + } + return GRPC_ERROR_NONE; +} + +grpc_error* RouteHeaderMatchersParse(const envoy_api_v2_route_RouteMatch* match, + XdsApi::RdsUpdate::RdsRoute* rds_route) { + size_t size; + const envoy_api_v2_route_HeaderMatcher* const* headers = + envoy_api_v2_route_RouteMatch_headers(match, &size); + for (size_t i = 0; i < size; ++i) { + const envoy_api_v2_route_HeaderMatcher* header = headers[i]; + XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher header_matcher; + header_matcher.name = + UpbStringToStdString(envoy_api_v2_route_HeaderMatcher_name(header)); + if (envoy_api_v2_route_HeaderMatcher_has_exact_match(header)) { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::EXACT; + header_matcher.string_matcher = UpbStringToStdString( + envoy_api_v2_route_HeaderMatcher_exact_match(header)); + } else if (envoy_api_v2_route_HeaderMatcher_has_range_match(header)) { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::RANGE; + const envoy_type_Int64Range* range_matcher = + envoy_api_v2_route_HeaderMatcher_range_match(header); + header_matcher.range_start = envoy_type_Int64Range_start(range_matcher); + header_matcher.range_end = envoy_type_Int64Range_end(range_matcher); + if (header_matcher.range_end < header_matcher.range_start) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Invalid range header matcher specifier specified: end " + "cannot be smaller than start."); + } + } else if (envoy_api_v2_route_HeaderMatcher_has_present_match(header)) { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::PRESENT; + header_matcher.present_match = + envoy_api_v2_route_HeaderMatcher_present_match(header); + } else if (envoy_api_v2_route_HeaderMatcher_has_prefix_match(header)) { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::PREFIX; + header_matcher.string_matcher = UpbStringToStdString( + envoy_api_v2_route_HeaderMatcher_prefix_match(header)); + } else if (envoy_api_v2_route_HeaderMatcher_has_suffix_match(header)) { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::SUFFIX; + header_matcher.string_matcher = UpbStringToStdString( + envoy_api_v2_route_HeaderMatcher_suffix_match(header)); + } else { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Invalid route header matcher specified."); + } + header_matcher.invert_match = + envoy_api_v2_route_HeaderMatcher_invert_match(header); + rds_route->matchers.header_matchers.emplace_back(std::move(header_matcher)); + } + return GRPC_ERROR_NONE; +} + +grpc_error* RouteRuntimeFractionParse( + const envoy_api_v2_route_RouteMatch* match, + XdsApi::RdsUpdate::RdsRoute* rds_route) { + const envoy_api_v2_core_RuntimeFractionalPercent* runtime_fraction = + envoy_api_v2_route_RouteMatch_runtime_fraction(match); + if (runtime_fraction != nullptr) { + const envoy_type_FractionalPercent* fraction = + envoy_api_v2_core_RuntimeFractionalPercent_default_value( + runtime_fraction); + if (fraction != nullptr) { + uint32_t numerator = envoy_type_FractionalPercent_numerator(fraction); + const auto denominator = + static_cast( + envoy_type_FractionalPercent_denominator(fraction)); + // Normalize to million. + switch (denominator) { + case envoy_type_FractionalPercent_HUNDRED: + numerator *= 10000; + break; + case envoy_type_FractionalPercent_TEN_THOUSAND: + numerator *= 100; + break; + case envoy_type_FractionalPercent_MILLION: + break; + default: + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Unknown denominator type"); + } + rds_route->matchers.fraction_per_million = numerator; + } + } + return GRPC_ERROR_NONE; +} + grpc_error* RouteActionParse(const envoy_api_v2_route_Route* route, - XdsApi::RdsUpdate::RdsRoute* rds_route) { + XdsApi::RdsUpdate::RdsRoute* rds_route, + bool* ignore_route) { if (!envoy_api_v2_route_Route_has_route(route)) { return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "No RouteAction found in route."); @@ -529,8 +772,9 @@ grpc_error* RouteActionParse(const envoy_api_v2_route_Route* route, "RouteAction weighted_cluster has no valid clusters specified."); } } else { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "No cluster or weighted_clusters found in RouteAction."); + // No cluster or weighted_clusters found in RouteAction, ignore this route. + *ignore_route = true; + return GRPC_ERROR_NONE; } return GRPC_ERROR_NONE; } @@ -606,6 +850,8 @@ grpc_error* RouteConfigParse( const envoy_api_v2_route_RouteMatch* match = envoy_api_v2_route_Route_match(route); XdsApi::RdsUpdate::RdsRoute rds_route; + rds_route.matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute:: + Matchers::PathMatcher::PathMatcherType::PREFIX; // if xds routing is not enabled, we must be working on the default route; // in this case, we must have an empty or single slash prefix. if (!envoy_api_v2_route_RouteMatch_has_prefix(match)) { @@ -618,8 +864,13 @@ grpc_error* RouteConfigParse( return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Default route must have empty prefix."); } - grpc_error* error = RouteActionParse(route, &rds_route); + bool ignore_route = false; + grpc_error* error = RouteActionParse(route, &rds_route, &ignore_route); if (error != GRPC_ERROR_NONE) return error; + if (ignore_route) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Default route action is ignored."); + } rds_update->routes.emplace_back(std::move(rds_route)); return GRPC_ERROR_NONE; } @@ -628,6 +879,24 @@ grpc_error* RouteConfigParse( const envoy_api_v2_route_Route* route = routes[i]; const envoy_api_v2_route_RouteMatch* match = envoy_api_v2_route_Route_match(route); + size_t query_parameters_size; + static_cast(envoy_api_v2_route_RouteMatch_query_parameters( + match, &query_parameters_size)); + if (query_parameters_size > 0) { + continue; + } + XdsApi::RdsUpdate::RdsRoute rds_route; + bool ignore_route = false; + grpc_error* error = RoutePathMatchParse(match, &rds_route, &ignore_route); + if (error != GRPC_ERROR_NONE) return error; + if (ignore_route) continue; + error = RouteHeaderMatchersParse(match, &rds_route); + if (error != GRPC_ERROR_NONE) return error; + error = RouteRuntimeFractionParse(match, &rds_route); + if (error != GRPC_ERROR_NONE) return error; + error = RouteActionParse(route, &rds_route, &ignore_route); + if (error != GRPC_ERROR_NONE) return error; + if (ignore_route) continue; const google_protobuf_BoolValue* case_sensitive = envoy_api_v2_route_RouteMatch_case_sensitive(match); if (case_sensitive != nullptr && @@ -635,64 +904,6 @@ grpc_error* RouteConfigParse( return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "case_sensitive if set must be set to true."); } - XdsApi::RdsUpdate::RdsRoute rds_route; - if (envoy_api_v2_route_RouteMatch_has_prefix(match)) { - upb_strview prefix = envoy_api_v2_route_RouteMatch_prefix(match); - // Empty prefix "" is accepted. - if (prefix.size > 0) { - // Prefix "/" is accepted. - if (prefix.data[0] != '/') { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Prefix does not start with a /"); - } - if (prefix.size > 1) { - std::vector prefix_elements = absl::StrSplit( - absl::string_view(prefix.data, prefix.size).substr(1), - absl::MaxSplits('/', 1)); - if (prefix_elements.size() != 2) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Prefix not in the required format of /service/"); - } else if (!prefix_elements[1].empty()) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Prefix does not end with a /"); - } else if (prefix_elements[0].empty()) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Prefix contains empty service name"); - } - rds_route.service = std::string(prefix_elements[0]); - } - } - } else if (envoy_api_v2_route_RouteMatch_has_path(match)) { - upb_strview path = envoy_api_v2_route_RouteMatch_path(match); - if (path.size == 0) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Path if set cannot be empty"); - } - if (path.data[0] != '/') { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Path does not start with a /"); - } - std::vector path_elements = absl::StrSplit( - absl::string_view(path.data, path.size).substr(1), '/'); - if (path_elements.size() != 2) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Path not in the required format of /service/method"); - } else if (path_elements[0].empty()) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Path contains empty service name"); - } else if (path_elements[1].empty()) { - return GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "Path contains empty method name"); - } - rds_route.service = std::string(path_elements[0]); - rds_route.method = std::string(path_elements[1]); - } else { - // Path specifier types will be supported, ignore but not reject until - // they are implemented. - continue; - } - grpc_error* error = RouteActionParse(route, &rds_route); - if (error != GRPC_ERROR_NONE) return error; rds_update->routes.emplace_back(std::move(rds_route)); } if (rds_update->routes.empty()) { diff --git a/src/core/ext/filters/client_channel/xds/xds_api.h b/src/core/ext/filters/client_channel/xds/xds_api.h index aa4105a94c8..f67a3b1299c 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.h +++ b/src/core/ext/filters/client_channel/xds/xds_api.h @@ -48,12 +48,63 @@ class XdsApi { static const char* kEdsTypeUrl; struct RdsUpdate { + // TODO(donnadionne): When we can use absl::variant<>, consider using that + // for: PathMatcher, HeaderMatcher, cluster_name and weighted_clusters struct RdsRoute { - std::string service; - std::string method; - // TODO(donnadionne): When we can use absl::variant<>, consider using that - // here, to enforce the fact that only one of cluster_name and - // weighted_clusters can be set. + // Matchers for this route. + struct Matchers { + struct PathMatcher { + enum class PathMatcherType { + PATH, // path stored in string_matcher field + PREFIX, // prefix stored in string_matcher field + }; + PathMatcherType type; + std::string string_matcher; + bool operator==(const PathMatcher& other) const { + return (type == other.type && + string_matcher == other.string_matcher); + } + std::string ToString() const; + }; + struct HeaderMatcher { + enum class HeaderMatcherType { + EXACT, // value stored in string_matcher field + RANGE, // uses range_start and range_end fields + PRESENT, // uses present_match field + PREFIX, // prefix stored in string_matcher field + SUFFIX, // suffix stored in string_matcher field + }; + std::string name; + HeaderMatcherType type; + int64_t range_start; + int64_t range_end; + std::string string_matcher; + bool present_match; + // invert_match field may or may not exisit, so initialize it to + // false. + bool invert_match = false; + bool operator==(const HeaderMatcher& other) const { + return (name == other.name && type == other.type && + range_start == other.range_start && + range_end == other.range_end && + string_matcher == other.string_matcher && + present_match == other.present_match && + invert_match == other.invert_match); + } + std::string ToString() const; + }; + PathMatcher path_matcher; + std::vector header_matchers; + absl::optional fraction_per_million; + bool operator==(const Matchers& other) const { + return (path_matcher == other.path_matcher && + header_matchers == other.header_matchers && + fraction_per_million == other.fraction_per_million); + } + std::string ToString() const; + }; + Matchers matchers; + // Action for this route. std::string cluster_name; struct ClusterWeight { std::string name; @@ -62,14 +113,16 @@ class XdsApi { bool operator==(const ClusterWeight& other) const { return (name == other.name && weight == other.weight); } + std::string ToString() const; }; std::vector weighted_clusters; bool operator==(const RdsRoute& other) const { - return (service == other.service && method == other.method && + return (matchers == other.matchers && cluster_name == other.cluster_name && weighted_clusters == other.weighted_clusters); } + std::string ToString() const; }; std::vector routes; @@ -77,6 +130,7 @@ class XdsApi { bool operator==(const RdsUpdate& other) const { return routes == other.routes; } + std::string ToString() const; }; // TODO(roth): When we can use absl::variant<>, consider using that diff --git a/src/core/ext/filters/client_channel/xds/xds_client.cc b/src/core/ext/filters/client_channel/xds/xds_client.cc index db48084297f..655e3895df8 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.cc +++ b/src/core/ext/filters/client_channel/xds/xds_client.cc @@ -894,14 +894,12 @@ void XdsClient::ChannelState::AdsCallState::AcceptLdsUpdate( ? lds_update->route_config_name.c_str() : "")); if (lds_update->rds_update.has_value()) { - gpr_log(GPR_INFO, " RouteConfiguration contains %" PRIuPTR " routes", + gpr_log(GPR_INFO, "RouteConfiguration contains %" PRIuPTR " routes", lds_update->rds_update.value().routes.size()); - for (const auto& route : lds_update->rds_update.value().routes) { - gpr_log(GPR_INFO, - " route: { service=\"%s\", " - "method=\"%s\" }, cluster=\"%s\" }", - route.service.c_str(), route.method.c_str(), - route.cluster_name.c_str()); + for (size_t i = 0; i < lds_update->rds_update.value().routes.size(); + ++i) { + gpr_log(GPR_INFO, "Route %" PRIuPTR ":\n%s", i, + lds_update->rds_update.value().routes[i].ToString().c_str()); } } } @@ -959,12 +957,9 @@ void XdsClient::ChannelState::AdsCallState::AcceptRdsUpdate( "[xds_client %p] RDS update received; RouteConfiguration contains " "%" PRIuPTR " routes", this, rds_update.value().routes.size()); - for (const auto& route : rds_update.value().routes) { - gpr_log(GPR_INFO, - " route: { service=\"%s\", " - "method=\"%s\" }, cluster=\"%s\" }", - route.service.c_str(), route.method.c_str(), - route.cluster_name.c_str()); + for (size_t i = 0; i < rds_update.value().routes.size(); ++i) { + gpr_log(GPR_INFO, "Route %" PRIuPTR ":\n%s", i, + rds_update.value().routes[i].ToString().c_str()); } } auto& rds_state = state_map_[XdsApi::kRdsTypeUrl]; @@ -2024,17 +2019,92 @@ std::string CreateServiceConfigActionCluster(const std::string& cluster_name) { } std::string CreateServiceConfigRoute(const std::string& action_name, - const std::string& service, - const std::string& method) { + const XdsApi::RdsUpdate::RdsRoute& route) { + std::vector headers; + for (const auto& header : route.matchers.header_matchers) { + std::string header_matcher; + switch (header.type) { + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::EXACT: + header_matcher = absl::StrFormat(" \"exact_match\": \"%s\"", + header.string_matcher); + break; + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::RANGE: + header_matcher = absl::StrFormat( + " \"range_match\":{\n" + " \"start\":%d,\n" + " \"end\":%d\n" + " }", + header.range_start, header.range_end); + break; + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::PRESENT: + header_matcher = + absl::StrFormat(" \"present_match\": %s", + header.present_match ? "true" : "false"); + break; + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::PREFIX: + header_matcher = absl::StrFormat( + " \"prefix_match\": \"%s\"", header.string_matcher); + break; + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::SUFFIX: + header_matcher = absl::StrFormat( + " \"suffix_match\": \"%s\"", header.string_matcher); + break; + default: + break; + } + std::vector header_parts; + header_parts.push_back( + absl::StrFormat(" { \n" + " \"name\": \"%s\",\n", + header.name)); + header_parts.push_back(header_matcher); + if (header.invert_match) { + header_parts.push_back( + absl::StrFormat(",\n" + " \"invert_match\": true")); + } + header_parts.push_back( + absl::StrFormat("\n" + " }")); + headers.push_back(absl::StrJoin(header_parts, "")); + } + std::vector headers_service_config; + if (!headers.empty()) { + headers_service_config.push_back("\"headers\":[\n"); + headers_service_config.push_back(absl::StrJoin(headers, ",")); + headers_service_config.push_back(" ],\n"); + } + std::string path_match_str; + switch (route.matchers.path_matcher.type) { + case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType:: + PREFIX: + path_match_str = absl::StrFormat( + "\"prefix\": \"%s\",\n", route.matchers.path_matcher.string_matcher); + break; + case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType:: + PATH: + path_match_str = absl::StrFormat( + "\"path\": \"%s\",\n", route.matchers.path_matcher.string_matcher); + break; + } return absl::StrFormat( " { \n" - " \"methodName\": {\n" - " \"service\": \"%s\",\n" - " \"method\": \"%s\"\n" - " },\n" - " \"action\": \"%s\"\n" + " %s" + " %s" + " %s" + " \"action\": \"%s\"\n" " }", - service, method, action_name); + path_match_str, absl::StrJoin(headers_service_config, ""), + route.matchers.fraction_per_million.has_value() + ? absl::StrFormat("\"match_fraction\":%d,\n", + route.matchers.fraction_per_million.value()) + : "", + action_name); } // Create the service config for one weighted cluster. @@ -2216,7 +2286,7 @@ grpc_error* XdsClient::CreateServiceConfig( absl::StrFormat("%s:%s", route.weighted_clusters.empty() ? "cds" : "weighted", action_name), - route.service, route.method)); + route)); } std::vector config_parts; config_parts.push_back( diff --git a/src/proto/grpc/testing/xds/BUILD b/src/proto/grpc/testing/xds/BUILD index b0d69f8eb74..f6a884d6d4b 100644 --- a/src/proto/grpc/testing/xds/BUILD +++ b/src/proto/grpc/testing/xds/BUILD @@ -53,7 +53,10 @@ grpc_proto_library( ], has_services = True, well_known_protos = True, - deps = ["cds_for_test_proto"], + deps = [ + "cds_for_test_proto", + "eds_for_test_proto", + ], ) grpc_proto_library( diff --git a/src/proto/grpc/testing/xds/lds_rds_for_test.proto b/src/proto/grpc/testing/xds/lds_rds_for_test.proto index a4d48b28d1a..d5ba5bd32bc 100644 --- a/src/proto/grpc/testing/xds/lds_rds_for_test.proto +++ b/src/proto/grpc/testing/xds/lds_rds_for_test.proto @@ -28,20 +28,64 @@ package envoy.api.v2; import "google/protobuf/any.proto"; import "google/protobuf/wrappers.proto"; import "src/proto/grpc/testing/xds/cds_for_test.proto"; +import "src/proto/grpc/testing/xds/eds_for_test.proto"; + +message RegexMatcher { + message GoogleRE2 { + google.protobuf.UInt32Value max_program_size = 1; + } + oneof engine_type { + GoogleRE2 google_re2 = 1; + } + string regex = 2; +} + +message Int64Range { + // start of the range (inclusive) + int64 start = 1; + + // end of the range (exclusive) + int64 end = 2; +} message BoolValue { // The bool value. bool value = 1; } +message HeaderMatcher { + string name = 1; + oneof header_match_specifier { + string exact_match = 4; + RegexMatcher safe_regex_match = 11; + Int64Range range_match = 6; + bool present_match = 7; + string prefix_match = 9; + string suffix_match = 10; + } + bool invert_match = 8; +} + +message QueryParameterMatcher { + string name = 1; +} + +message RuntimeFractionalPercent { + FractionalPercent default_value = 1; +} + message RouteMatch { oneof path_specifier { // If specified, the route is a prefix rule meaning that the prefix must // match the beginning of the *:path* header. string prefix = 1; string path = 2; + RegexMatcher safe_regex = 10; } BoolValue case_sensitive = 4; + repeated QueryParameterMatcher query_parameters = 7; + RuntimeFractionalPercent runtime_fraction = 9; + repeated HeaderMatcher headers = 6; } message WeightedCluster { diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 055af310169..3f5eded4ace 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -1242,6 +1242,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam { int timeout_ms = 1000; bool wait_for_ready = false; bool server_fail = false; + std::vector> metadata; RpcOptions() {} @@ -1269,6 +1270,12 @@ class XdsEnd2endTest : public ::testing::TestWithParam { server_fail = rpc_server_fail; return *this; } + + RpcOptions& set_metadata( + std::vector> rpc_metadata) { + metadata = rpc_metadata; + return *this; + } }; template @@ -1463,6 +1470,9 @@ class XdsEnd2endTest : public ::testing::TestWithParam { if (local_response) response = new EchoResponse; EchoRequest request; ClientContext context; + for (const auto& metadata : rpc_options.metadata) { + context.AddMetadata(metadata.first, metadata.second); + } context.set_deadline( grpc_timeout_milliseconds_to_deadline(rpc_options.timeout_ms)); if (rpc_options.wait_for_ready) context.set_wait_for_ready(true); @@ -2417,11 +2427,7 @@ TEST_P(LdsRdsTest, RouteMatchHasCaseSensitiveFalse) { RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); route1->mutable_match()->mutable_case_sensitive()->set_value(false); - auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultResourceName); SetRouteConfiguration(0, route_config); SetNextResolution({}); SetNextResolutionForLbChannelAllBalancers(); @@ -2433,48 +2439,46 @@ TEST_P(LdsRdsTest, RouteMatchHasCaseSensitiveFalse) { gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has a prefix -// string with no "/". -TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixNonEmptyNoSlash) { +// Tests that LDS client should ignore route which has query_parameters. +TEST_P(LdsRdsTest, RouteMatchHasQueryParameters) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - route1->mutable_match()->set_prefix("grpc.testing.EchoTest1Service"); - auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultResourceName); + route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); + route1->mutable_match()->add_query_parameters(); SetRouteConfiguration(0, route_config); SetNextResolution({}); SetNextResolutionForLbChannelAllBalancers(); CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, "Prefix does not start with a /"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has a prefix -// string does not end with "/". -TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixNoEndingSlash) { +// Tests that LDS client should send a ACK if route match has a prefix +// that is either empty or a single slash +TEST_P(LdsRdsTest, RouteMatchHasValidPrefixEmptyOrSingleSlash) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service"); + route1->mutable_match()->set_prefix(""); + auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); + default_route->mutable_match()->set_prefix("/"); + default_route->mutable_route()->set_cluster(kDefaultResourceName); SetRouteConfiguration(0, route_config); SetNextResolution({}); SetNextResolutionForLbChannelAllBalancers(); - CheckRpcSendFailure(); + (void)SendRpc(); const auto& response_state = RouteConfigurationResponseState(0); - EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, - "Prefix not in the required format of /service/"); + EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has a prefix -// string does not start with "/". +// Tests that LDS client should ignore route which has a path +// prefix string does not start with "/". TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixNoLeadingSlash) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = @@ -2487,31 +2491,31 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixNoLeadingSlash) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, "Prefix does not start with a /"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has a prefix -// string with extra content outside of "/service/". +// Tests that LDS client should ignore route which has a prefix +// string with more than 2 slashes. TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixExtraContent) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/Echo1"); + route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/Echo1/"); SetRouteConfiguration(0, route_config); SetNextResolution({}); SetNextResolutionForLbChannelAllBalancers(); CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, "Prefix does not end with a /"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has a prefix +// Tests that LDS client should ignore route which has a prefix // string "//". -TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixNoContent) { +TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixDoubleSlash) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); @@ -2523,20 +2527,17 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixNoContent) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, "Prefix contains empty service name"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has path +// Tests that LDS client should ignore route which has path // but it's empty. TEST_P(LdsRdsTest, RouteMatchHasInvalidPathEmptyPath) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultResourceName); route1->mutable_match()->set_path(""); SetRouteConfiguration(0, route_config); SetNextResolution({}); @@ -2544,20 +2545,17 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPathEmptyPath) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, "Path if set cannot be empty"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has path +// Tests that LDS client should ignore route which has path // string does not start with "/". TEST_P(LdsRdsTest, RouteMatchHasInvalidPathNoLeadingSlash) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultResourceName); route1->mutable_match()->set_path("grpc.testing.EchoTest1Service/Echo1"); SetRouteConfiguration(0, route_config); SetNextResolution({}); @@ -2565,20 +2563,17 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPathNoLeadingSlash) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, "Path does not start with a /"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has path -// string that ends with "/". -TEST_P(LdsRdsTest, RouteMatchHasInvalidPathEndsWithSlash) { +// Tests that LDS client should ignore route which has path +// string that has too many slashes; for example, ends with "/". +TEST_P(LdsRdsTest, RouteMatchHasInvalidPathTooManySlashes) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultResourceName); route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service/Echo1/"); SetRouteConfiguration(0, route_config); SetNextResolution({}); @@ -2586,21 +2581,17 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPathEndsWithSlash) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, - "Path not in the required format of /service/method"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has path -// string that misses "/" between service and method. -TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingMiddleSlash) { +// Tests that LDS client should ignore route which has path +// string that has only 1 slash: missing "/" between service and method. +TEST_P(LdsRdsTest, RouteMatchHasInvalidPathOnlyOneSlash) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultResourceName); route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service.Echo1"); SetRouteConfiguration(0, route_config); SetNextResolution({}); @@ -2608,21 +2599,17 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingMiddleSlash) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, - "Path not in the required format of /service/method"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has path +// Tests that LDS client should ignore route which has path // string that is missing service. TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingService) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultResourceName); route1->mutable_match()->set_path("//Echo1"); SetRouteConfiguration(0, route_config); SetNextResolution({}); @@ -2630,20 +2617,17 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingService) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, "Path contains empty service name"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } -// Tests that LDS client should send a NACK if route match has path +// Tests that LDS client should ignore route which has path // string that is missing method. TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingMethod) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); RouteConfiguration route_config = balancers_[0]->ads_service()->default_route_config(); auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); - auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); - default_route->mutable_match()->set_prefix(""); - default_route->mutable_route()->set_cluster(kDefaultResourceName); route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service/"); SetRouteConfiguration(0, route_config); SetNextResolution({}); @@ -2651,7 +2635,7 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingMethod) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, "Path contains empty method name"); + EXPECT_EQ(response_state.error_message, "No valid routes specified."); gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } @@ -2686,8 +2670,7 @@ TEST_P(LdsRdsTest, RouteActionUnsupportedClusterSpecifier) { CheckRpcSendFailure(); const auto& response_state = RouteConfigurationResponseState(0); EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); - EXPECT_EQ(response_state.error_message, - "No cluster or weighted_clusters found in RouteAction."); + EXPECT_EQ(response_state.error_message, "Default route action is ignored."); } TEST_P(LdsRdsTest, RouteActionClusterHasEmptyClusterName) { @@ -2800,6 +2783,30 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetClusterHasNoWeight) { gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } +TEST_P(LdsRdsTest, RouteHeaderMatchInvalidRange) { + gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); + const char* kNewCluster1Name = "new_cluster_1"; + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); + route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); + auto* header_matcher1 = route1->mutable_match()->add_headers(); + header_matcher1->set_name("header1"); + header_matcher1->mutable_range_match()->set_start(1001); + header_matcher1->mutable_range_match()->set_end(1000); + route1->mutable_route()->set_cluster(kNewCluster1Name); + SetRouteConfiguration(0, route_config); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + const auto& response_state = RouteConfigurationResponseState(0); + EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); + EXPECT_EQ(response_state.error_message, + "Invalid range header matcher specifier specified: end " + "cannot be smaller than start."); + gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); +} + // Tests that LDS client times out when no response received. TEST_P(LdsRdsTest, Timeout) { ResetStub(0, "", 500); @@ -3410,6 +3417,228 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) { gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } +TEST_P(LdsRdsTest, XdsRoutingHeadersMatching) { + gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); + const char* kNewCluster1Name = "new_cluster_1"; + const size_t kNumEcho1Rpcs = 100; + const size_t kNumEchoRpcs = 5; + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + // Populate new EDS resources. + AdsServiceImpl::EdsResourceArgs args({ + {"locality0", GetBackendPorts(0, 1)}, + }); + AdsServiceImpl::EdsResourceArgs args1({ + {"locality0", GetBackendPorts(1, 2)}, + }); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args)); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args1, kNewCluster1Name)); + // Populate new CDS resources. + Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster(); + new_cluster1.set_name(kNewCluster1Name); + balancers_[0]->ads_service()->SetCdsResource(new_cluster1); + // Populating Route Configurations for LDS. + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); + route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); + auto* header_matcher1 = route1->mutable_match()->add_headers(); + header_matcher1->set_name("header1"); + header_matcher1->set_exact_match("POST"); + auto* header_matcher3 = route1->mutable_match()->add_headers(); + header_matcher3->set_name("header3"); + header_matcher3->mutable_range_match()->set_start(1); + header_matcher3->mutable_range_match()->set_end(1000); + auto* header_matcher4 = route1->mutable_match()->add_headers(); + header_matcher4->set_name("header4"); + header_matcher4->set_present_match(false); + auto* header_matcher5 = route1->mutable_match()->add_headers(); + header_matcher5->set_name("header5"); + header_matcher5->set_prefix_match("/grpc"); + auto* header_matcher6 = route1->mutable_match()->add_headers(); + header_matcher6->set_name("header6"); + header_matcher6->set_suffix_match(".cc"); + header_matcher6->set_invert_match(true); + route1->mutable_route()->set_cluster(kNewCluster1Name); + auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); + default_route->mutable_match()->set_prefix(""); + default_route->mutable_route()->set_cluster(kDefaultResourceName); + SetRouteConfiguration(0, route_config); + std::vector> metadata = { + {"header1", "POST"}, {"header2", "blah"}, + {"header3", "1"}, {"header5", "/grpc.testing.EchoTest1Service/"}, + {"header6", "grpc.java"}, + }; + const auto header_match_rpc_options = RpcOptions() + .set_rpc_service(SERVICE_ECHO1) + .set_rpc_method(METHOD_ECHO1) + .set_metadata(std::move(metadata)); + // Make sure all backends are up. + WaitForAllBackends(0, 1); + WaitForAllBackends(1, 2, true, header_match_rpc_options); + // Send RPCs. + CheckRpcSendOk(kNumEchoRpcs); + CheckRpcSendOk(kNumEcho1Rpcs, header_match_rpc_options); + EXPECT_EQ(kNumEchoRpcs, backends_[0]->backend_service()->request_count()); + EXPECT_EQ(0, backends_[0]->backend_service1()->request_count()); + EXPECT_EQ(0, backends_[0]->backend_service2()->request_count()); + EXPECT_EQ(0, backends_[1]->backend_service()->request_count()); + EXPECT_EQ(kNumEcho1Rpcs, backends_[1]->backend_service1()->request_count()); + EXPECT_EQ(0, backends_[1]->backend_service2()->request_count()); + const auto& response_state = RouteConfigurationResponseState(0); + EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED); + gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); +} + +TEST_P(LdsRdsTest, XdsRoutingRuntimeFractionMatching) { + gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); + const char* kNewCluster1Name = "new_cluster_1"; + const size_t kNumRpcs = 1000; + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + // Populate new EDS resources. + AdsServiceImpl::EdsResourceArgs args({ + {"locality0", GetBackendPorts(0, 1)}, + }); + AdsServiceImpl::EdsResourceArgs args1({ + {"locality0", GetBackendPorts(1, 2)}, + }); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args)); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args1, kNewCluster1Name)); + // Populate new CDS resources. + Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster(); + new_cluster1.set_name(kNewCluster1Name); + balancers_[0]->ads_service()->SetCdsResource(new_cluster1); + // Populating Route Configurations for LDS. + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); + route1->mutable_match() + ->mutable_runtime_fraction() + ->mutable_default_value() + ->set_numerator(25); + route1->mutable_route()->set_cluster(kNewCluster1Name); + auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); + default_route->mutable_match()->set_prefix(""); + default_route->mutable_route()->set_cluster(kDefaultResourceName); + SetRouteConfiguration(0, route_config); + WaitForAllBackends(0, 2); + CheckRpcSendOk(kNumRpcs); + const int default_backend_count = + backends_[0]->backend_service()->request_count(); + const int matched_backend_count = + backends_[1]->backend_service()->request_count(); + const double kErrorTolerance = 0.2; + EXPECT_THAT(default_backend_count, + ::testing::AllOf( + ::testing::Ge(kNumRpcs * 75 / 100 * (1 - kErrorTolerance)), + ::testing::Le(kNumRpcs * 75 / 100 * (1 + kErrorTolerance)))); + EXPECT_THAT(matched_backend_count, + ::testing::AllOf( + ::testing::Ge(kNumRpcs * 25 / 100 * (1 - kErrorTolerance)), + ::testing::Le(kNumRpcs * 25 / 100 * (1 + kErrorTolerance)))); + const auto& response_state = RouteConfigurationResponseState(0); + EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED); + gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); +} + +TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingUnmatchCases) { + gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); + const char* kNewCluster1Name = "new_cluster_1"; + const char* kNewCluster2Name = "new_cluster_2"; + const char* kNewCluster3Name = "new_cluster_3"; + const size_t kNumEcho1Rpcs = 100; + const size_t kNumEchoRpcs = 5; + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + // Populate new EDS resources. + AdsServiceImpl::EdsResourceArgs args({ + {"locality0", GetBackendPorts(0, 1)}, + }); + AdsServiceImpl::EdsResourceArgs args1({ + {"locality0", GetBackendPorts(1, 2)}, + }); + AdsServiceImpl::EdsResourceArgs args2({ + {"locality0", GetBackendPorts(2, 3)}, + }); + AdsServiceImpl::EdsResourceArgs args3({ + {"locality0", GetBackendPorts(3, 4)}, + }); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args)); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args1, kNewCluster1Name)); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args2, kNewCluster2Name)); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args3, kNewCluster3Name)); + // Populate new CDS resources. + Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster(); + new_cluster1.set_name(kNewCluster1Name); + balancers_[0]->ads_service()->SetCdsResource(new_cluster1); + Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster(); + new_cluster2.set_name(kNewCluster2Name); + balancers_[0]->ads_service()->SetCdsResource(new_cluster2); + Cluster new_cluster3 = balancers_[0]->ads_service()->default_cluster(); + new_cluster1.set_name(kNewCluster3Name); + balancers_[0]->ads_service()->SetCdsResource(new_cluster3); + // Populating Route Configurations for LDS. + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); + route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); + auto* header_matcher1 = route1->mutable_match()->add_headers(); + header_matcher1->set_name("header1"); + header_matcher1->set_exact_match("POST"); + route1->mutable_route()->set_cluster(kNewCluster1Name); + auto route2 = route_config.mutable_virtual_hosts(0)->add_routes(); + route2->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); + auto* header_matcher2 = route2->mutable_match()->add_headers(); + header_matcher2->set_name("header2"); + header_matcher2->mutable_range_match()->set_start(1); + header_matcher2->mutable_range_match()->set_end(1000); + route2->mutable_route()->set_cluster(kNewCluster2Name); + auto route3 = route_config.mutable_virtual_hosts(0)->add_routes(); + route3->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); + auto* header_matcher3 = route3->mutable_match()->add_headers(); + header_matcher3->set_name("header3"); + header_matcher3->set_suffix_match(".java"); + route3->mutable_route()->set_cluster(kNewCluster3Name); + auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); + default_route->mutable_match()->set_prefix(""); + default_route->mutable_route()->set_cluster(kDefaultResourceName); + SetRouteConfiguration(0, route_config); + // Send headers which will mismatch each route + std::vector> metadata = { + {"header1", "POST1"}, + {"header2", "1000"}, + {"header3", "grpc.cpp"}, + }; + WaitForAllBackends(0, 1); + CheckRpcSendOk(kNumEchoRpcs, RpcOptions().set_metadata(metadata)); + CheckRpcSendOk(kNumEcho1Rpcs, RpcOptions() + .set_rpc_service(SERVICE_ECHO1) + .set_rpc_method(METHOD_ECHO1) + .set_metadata(metadata)); + // Verify that only the default backend got RPCs since all previous routes + // were mismatched. + for (size_t i = 1; i < 4; ++i) { + EXPECT_EQ(0, backends_[i]->backend_service()->request_count()); + EXPECT_EQ(0, backends_[i]->backend_service1()->request_count()); + EXPECT_EQ(0, backends_[i]->backend_service2()->request_count()); + } + EXPECT_EQ(kNumEchoRpcs, backends_[0]->backend_service()->request_count()); + EXPECT_EQ(kNumEcho1Rpcs, backends_[0]->backend_service1()->request_count()); + EXPECT_EQ(0, backends_[0]->backend_service2()->request_count()); + const auto& response_state = RouteConfigurationResponseState(0); + EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED); + gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); +} + using CdsTest = BasicTest; // Tests that CDS client should send an ACK upon correct CDS response. From 6617b039e338522f835ca16c723ecf21f4fdbcc4 Mon Sep 17 00:00:00 2001 From: Marc Plano-Lesay Date: Sat, 4 Jul 2020 11:50:08 +1000 Subject: [PATCH 198/239] Add missing string include --- src/core/ext/filters/client_channel/xds/xds_client_stats.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/ext/filters/client_channel/xds/xds_client_stats.h b/src/core/ext/filters/client_channel/xds/xds_client_stats.h index 2dab43c49bf..b51da9cd2fa 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client_stats.h +++ b/src/core/ext/filters/client_channel/xds/xds_client_stats.h @@ -22,6 +22,7 @@ #include #include +#include #include "absl/strings/string_view.h" From 073c499e1880687265fb26b6628e9d27feb3d73a Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Mon, 6 Jul 2020 19:57:05 -0700 Subject: [PATCH 199/239] Added TCP_USER_TIMEOUT auto-detection --- src/core/lib/iomgr/port.h | 9 +- .../lib/iomgr/socket_utils_common_posix.cc | 146 +++++++++++------- test/cpp/interop/grpclb_fallback_test.cc | 10 +- 3 files changed, 100 insertions(+), 65 deletions(-) diff --git a/src/core/lib/iomgr/port.h b/src/core/lib/iomgr/port.h index 02f64f318a9..2a8d67b261c 100644 --- a/src/core/lib/iomgr/port.h +++ b/src/core/lib/iomgr/port.h @@ -77,11 +77,6 @@ #if __GLIBC_PREREQ(2, 10) #define GRPC_LINUX_SOCKETUTILS 1 #endif -#endif -#ifdef LINUX_VERSION_CODE -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) -#define GRPC_HAVE_TCP_USER_TIMEOUT -#ifdef __GLIBC_PREREQ #if !(__GLIBC_PREREQ(2, 17)) /* * TCP_USER_TIMEOUT wasn't imported to glibc until 2.17. Use Linux system @@ -89,9 +84,7 @@ */ #define GRPC_LINUX_TCP_H 1 #endif /* __GLIBC_PREREQ(2, 17) */ -#endif /* ifdef __GLIBC_PREREQ */ -#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) */ -#endif /* LINUX_VERSION_CODE */ +#endif #ifndef __GLIBC__ #define GRPC_LINUX_EPOLL 1 #define GRPC_LINUX_EPOLL_CREATE1 1 diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc index 60432d47162..798dcb8543f 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.cc +++ b/src/core/lib/iomgr/socket_utils_common_posix.cc @@ -260,6 +260,23 @@ static int g_default_server_tcp_user_timeout_ms = static bool g_default_client_tcp_user_timeout_enabled = false; static bool g_default_server_tcp_user_timeout_enabled = true; +#if GPR_LINUX == 1 +// For Linux, it will be detected to support TCP_USER_TIMEOUT +#ifndef TCP_USER_TIMEOUT +#define TCP_USER_TIMEOUT 18 +#endif +#define SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT 0 +#else +// For non-Linux, TCP_USER_TIMEOUT won't be used. +#define TCP_USER_TIMEOUT 0 +#define SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT -1 +#endif // GPR_LINUX == 1 + +// Whether the socket supports TCP_USER_TIMEOUT option. +// (0: don't know, 1: support, -1: not support) +static std::atomic g_socket_supports_tcp_user_timeout( + SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT); + void config_default_tcp_user_timeout(bool enable, int timeout, bool is_client) { if (is_client) { g_default_client_tcp_user_timeout_enabled = enable; @@ -281,68 +298,87 @@ grpc_error* grpc_set_socket_tcp_user_timeout( (void)fd; (void)channel_args; (void)is_client; -#ifdef GRPC_HAVE_TCP_USER_TIMEOUT - bool enable; - int timeout; - if (is_client) { - enable = g_default_client_tcp_user_timeout_enabled; - timeout = g_default_client_tcp_user_timeout_ms; - } else { - enable = g_default_server_tcp_user_timeout_enabled; - timeout = g_default_server_tcp_user_timeout_ms; - } - if (channel_args) { - for (unsigned int i = 0; i < channel_args->num_args; i++) { - if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) { - const int value = grpc_channel_arg_get_integer( - &channel_args->args[i], grpc_integer_options{0, 1, INT_MAX}); - /* Continue using default if value is 0 */ - if (value == 0) { - continue; + extern grpc_core::TraceFlag grpc_tcp_trace; + if (g_socket_supports_tcp_user_timeout.load() >= 0) { + bool enable; + int timeout; + if (is_client) { + enable = g_default_client_tcp_user_timeout_enabled; + timeout = g_default_client_tcp_user_timeout_ms; + } else { + enable = g_default_server_tcp_user_timeout_enabled; + timeout = g_default_server_tcp_user_timeout_ms; + } + if (channel_args) { + for (unsigned int i = 0; i < channel_args->num_args; i++) { + if (0 == + strcmp(channel_args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) { + const int value = grpc_channel_arg_get_integer( + &channel_args->args[i], grpc_integer_options{0, 1, INT_MAX}); + /* Continue using default if value is 0 */ + if (value == 0) { + continue; + } + /* Disable if value is INT_MAX */ + enable = value != INT_MAX; + } else if (0 == strcmp(channel_args->args[i].key, + GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) { + const int value = grpc_channel_arg_get_integer( + &channel_args->args[i], grpc_integer_options{0, 1, INT_MAX}); + /* Continue using default if value is 0 */ + if (value == 0) { + continue; + } + timeout = value; + } + } + } + if (enable) { + int newval; + socklen_t len = sizeof(newval); + // If this is the first time to use TCP_USER_TIMEOUT, try to check + // if it is available. + if (g_socket_supports_tcp_user_timeout.load() == 0) { + if (0 != getsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &newval, &len)) { + gpr_log(GPR_INFO, + "TCP_USER_TIMEOUT is not available. TCP_USER_TIMEOUT won't " + "be used thereafter"); + g_socket_supports_tcp_user_timeout.store(-1); + } else { + gpr_log(GPR_INFO, + "TCP_USER_TIMEOUT is available. TCP_USER_TIMEOUT will be " + "used thereafter"); + g_socket_supports_tcp_user_timeout.store(1); + } + } + if (g_socket_supports_tcp_user_timeout.load() > 0) { + if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { + gpr_log(GPR_INFO, "Enabling TCP_USER_TIMEOUT with a timeout of %d ms", + timeout); + } + if (0 != setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout, + sizeof(timeout))) { + gpr_log(GPR_ERROR, "setsockopt(TCP_USER_TIMEOUT) %s", + strerror(errno)); + return GRPC_ERROR_NONE; } - /* Disable if value is INT_MAX */ - enable = value != INT_MAX; - } else if (0 == strcmp(channel_args->args[i].key, - GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) { - const int value = grpc_channel_arg_get_integer( - &channel_args->args[i], grpc_integer_options{0, 1, INT_MAX}); - /* Continue using default if value is 0 */ - if (value == 0) { - continue; + if (0 != getsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &newval, &len)) { + gpr_log(GPR_ERROR, "getsockopt(TCP_USER_TIMEOUT) %s", + strerror(errno)); + return GRPC_ERROR_NONE; + } + if (newval != timeout) { + /* Do not fail on failing to set TCP_USER_TIMEOUT for now. */ + gpr_log(GPR_ERROR, "Failed to set TCP_USER_TIMEOUT"); + return GRPC_ERROR_NONE; } - timeout = value; } } - } - if (enable) { - extern grpc_core::TraceFlag grpc_tcp_trace; + } else { if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { - gpr_log(GPR_INFO, "Enabling TCP_USER_TIMEOUT with a timeout of %d ms", - timeout); - } - int newval; - socklen_t len = sizeof(newval); - if (0 != setsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &timeout, - sizeof(timeout))) { - gpr_log(GPR_ERROR, "setsockopt(TCP_USER_TIMEOUT) %s", strerror(errno)); - return GRPC_ERROR_NONE; + gpr_log(GPR_INFO, "TCP_USER_TIMEOUT not supported for this platform"); } - if (0 != getsockopt(fd, IPPROTO_TCP, TCP_USER_TIMEOUT, &newval, &len)) { - gpr_log(GPR_ERROR, "getsockopt(TCP_USER_TIMEOUT) %s", strerror(errno)); - return GRPC_ERROR_NONE; - } - if (newval != timeout) { - /* Do not fail on failing to set TCP_USER_TIMEOUT for now. */ - gpr_log(GPR_ERROR, "Failed to set TCP_USER_TIMEOUT"); - return GRPC_ERROR_NONE; - } - } -#else - extern grpc_core::TraceFlag grpc_tcp_trace; - if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { - gpr_log(GPR_INFO, "TCP_USER_TIMEOUT not supported for this platform"); } -#endif /* GRPC_HAVE_TCP_USER_TIMEOUT */ return GRPC_ERROR_NONE; } diff --git a/test/cpp/interop/grpclb_fallback_test.cc b/test/cpp/interop/grpclb_fallback_test.cc index d4c3a7c134d..cb3e62adde7 100644 --- a/test/cpp/interop/grpclb_fallback_test.cc +++ b/test/cpp/interop/grpclb_fallback_test.cc @@ -69,7 +69,13 @@ DEFINE_string( "slow_fallback_after_startup : fallback after startup due to LB/backend " "addresses becoming blackholed;\n"); -#ifdef GRPC_HAVE_TCP_USER_TIMEOUT +#ifdef LINUX_VERSION_CODE +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) +#define SOCKET_SUPPORTS_TCP_USER_TIMEOUT +#endif +#endif + +#ifdef SOCKET_SUPPORTS_TCP_USER_TIMEOUT using grpc::testing::GrpclbRouteType; using grpc::testing::SimpleRequest; using grpc::testing::SimpleResponse; @@ -281,4 +287,4 @@ int main(int argc, char** argv) { "This test requires TCP_USER_TIMEOUT, which isn't available"); abort(); } -#endif // GRPC_HAVE_TCP_USER_TIMEOUT +#endif // SOCKET_SUPPORTS_TCP_USER_TIMEOUT From 5e569a5d372f3e8442c648d9fbb0588e6078c3ad Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 1 Jul 2020 20:00:10 -0700 Subject: [PATCH 200/239] Fix inproc transport bugs on client WritesDone or Read after status --- .../ext/transport/inproc/inproc_transport.cc | 47 +++++++++++++------ 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/src/core/ext/transport/inproc/inproc_transport.cc b/src/core/ext/transport/inproc/inproc_transport.cc index 9370a441a4b..49b9bf093ba 100644 --- a/src/core/ext/transport/inproc/inproc_transport.cc +++ b/src/core/ext/transport/inproc/inproc_transport.cc @@ -267,6 +267,11 @@ struct inproc_stream { bool trailing_md_sent = false; bool initial_md_recvd = false; bool trailing_md_recvd = false; + // The following tracks if the server-side only pretends to have received + // trailing metadata since it no longer cares about the RPC. If that is the + // case, it is still ok for the client to send trailing metadata (in which + // case it will be ignored). + bool trailing_md_recvd_implicit_only = false; bool closed = false; @@ -617,7 +622,7 @@ void op_state_machine_locked(inproc_stream* s, grpc_error* error) { s->send_message_op->payload->send_message.send_message.reset(); complete_if_batch_end_locked( s, GRPC_ERROR_NONE, s->send_message_op, - "op_state_machine scheduling send-message-on-complete"); + "op_state_machine scheduling send-message-on-complete case 1"); s->send_message_op = nullptr; } } @@ -739,15 +744,25 @@ void op_state_machine_locked(inproc_stream* s, grpc_error* error) { } if (s->to_read_trailing_md_filled) { if (s->trailing_md_recvd) { - new_err = - GRPC_ERROR_CREATE_FROM_STATIC_STRING("Already recvd trailing md"); - INPROC_LOG( - GPR_INFO, - "op_state_machine %p scheduling on_complete errors for already " - "recvd trailing md %p", - s, new_err); - fail_helper_locked(s, GRPC_ERROR_REF(new_err)); - goto done; + if (s->trailing_md_recvd_implicit_only) { + INPROC_LOG(GPR_INFO, + "op_state_machine %p already implicitly received trailing " + "metadata, so ignoring new trailing metadata from client", + s); + grpc_metadata_batch_clear(&s->to_read_trailing_md); + s->to_read_trailing_md_filled = false; + s->trailing_md_recvd_implicit_only = false; + } else { + new_err = + GRPC_ERROR_CREATE_FROM_STATIC_STRING("Already recvd trailing md"); + INPROC_LOG( + GPR_INFO, + "op_state_machine %p scheduling on_complete errors for already " + "recvd trailing md %p", + s, new_err); + fail_helper_locked(s, GRPC_ERROR_REF(new_err)); + goto done; + } } if (s->recv_message_op != nullptr) { // This message needs to be wrapped up because it will never be @@ -770,7 +785,7 @@ void op_state_machine_locked(inproc_stream* s, grpc_error* error) { s->send_message_op->payload->send_message.stream_write_closed = true; complete_if_batch_end_locked( s, new_err, s->send_message_op, - "op_state_machine scheduling send-message-on-complete"); + "op_state_machine scheduling send-message-on-complete case 2"); s->send_message_op = nullptr; } if (s->recv_trailing_md_op != nullptr) { @@ -809,7 +824,7 @@ void op_state_machine_locked(inproc_stream* s, grpc_error* error) { "trailing-md-on-complete %p", s, new_err); } - } else { + } else if (!s->trailing_md_recvd) { INPROC_LOG( GPR_INFO, "op_state_machine %p has trailing md but not yet waiting for it", s); @@ -832,6 +847,9 @@ void op_state_machine_locked(inproc_stream* s, grpc_error* error) { "op_state_machine scheduling recv-trailing-md-on-complete"); s->trailing_md_recvd = true; s->recv_trailing_md_op = nullptr; + // Since we are only pretending to have received the trailing MD, it would + // be ok (not an error) if the client actually sends it later. + s->trailing_md_recvd_implicit_only = true; } if (s->trailing_md_recvd && s->recv_message_op) { // No further message will come on this stream, so finish off the @@ -847,14 +865,13 @@ void op_state_machine_locked(inproc_stream* s, grpc_error* error) { "op_state_machine scheduling recv-message-on-complete"); s->recv_message_op = nullptr; } - if (s->trailing_md_recvd && (s->trailing_md_sent || s->t->is_client) && - s->send_message_op) { + if (s->trailing_md_recvd && s->send_message_op && s->t->is_client) { // Nothing further will try to receive from this stream, so finish off // any outstanding send_message op s->send_message_op->payload->send_message.send_message.reset(); complete_if_batch_end_locked( s, new_err, s->send_message_op, - "op_state_machine scheduling send-message-on-complete"); + "op_state_machine scheduling send-message-on-complete case 3"); s->send_message_op = nullptr; } if (s->send_message_op || s->send_trailing_md_op || s->recv_initial_md_op || From 2b0f14d54de1bb26b9e9f289206fec5197a30344 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 7 Jul 2020 01:38:44 -0700 Subject: [PATCH 201/239] Don't drop message on WriteAndFinish with non-ok status --- .../grpcpp/impl/codegen/server_callback_handlers.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/include/grpcpp/impl/codegen/server_callback_handlers.h b/include/grpcpp/impl/codegen/server_callback_handlers.h index 0c651245777..dff38a890d8 100644 --- a/include/grpcpp/impl/codegen/server_callback_handlers.h +++ b/include/grpcpp/impl/codegen/server_callback_handlers.h @@ -579,11 +579,8 @@ class CallbackServerStreamingHandler : public ::grpc::internal::MethodHandler { void WriteAndFinish(const ResponseType* resp, ::grpc::WriteOptions options, ::grpc::Status s) override { // This combines the write into the finish callback - // Don't send any message if the status is bad - if (s.ok()) { - // TODO(vjpai): don't assert - GPR_CODEGEN_ASSERT(finish_ops_.SendMessagePtr(resp, options).ok()); - } + // TODO(vjpai): don't assert + GPR_CODEGEN_ASSERT(finish_ops_.SendMessagePtr(resp, options).ok()); Finish(std::move(s)); } @@ -784,11 +781,8 @@ class CallbackBidiHandler : public ::grpc::internal::MethodHandler { void WriteAndFinish(const ResponseType* resp, ::grpc::WriteOptions options, ::grpc::Status s) override { - // Don't send any message if the status is bad - if (s.ok()) { - // TODO(vjpai): don't assert - GPR_CODEGEN_ASSERT(finish_ops_.SendMessagePtr(resp, options).ok()); - } + // TODO(vjpai): don't assert + GPR_CODEGEN_ASSERT(finish_ops_.SendMessagePtr(resp, options).ok()); Finish(std::move(s)); } From 6c9176733887780f64e76c19736c416480a033fc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jul 2020 11:26:54 +0200 Subject: [PATCH 202/239] regenerate projects --- src/objective-c/BoringSSL-GRPC.podspec | 958 +++++++++++++------------ 1 file changed, 480 insertions(+), 478 deletions(-) diff --git a/src/objective-c/BoringSSL-GRPC.podspec b/src/objective-c/BoringSSL-GRPC.podspec index e0eaf376625..af07f5e3fd2 100644 --- a/src/objective-c/BoringSSL-GRPC.podspec +++ b/src/objective-c/BoringSSL-GRPC.podspec @@ -76,7 +76,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/google/boringssl.git', - :commit => "3ab047a8e377083a9b38dc908fe1612d5743a021", + :commit => "597b810379e126ae05d32c1d94b1a9464385acd0", } s.ios.deployment_target = '7.0' @@ -214,485 +214,487 @@ Pod::Spec.new do |s| # the correct location in BoringSSL. base64 -D < src/include/openssl/boringssl_prefix_symbols.h H4sICAAAAAAC/2JvcmluZ3NzbF9wcmVmaXhfc3ltYm9scy5oAKydXXPbuJZo3+dXuO683Kk6NRM7nW73 - fVNsJdG0Y/tIck9nXliUSNk8oUiFoOy4f/0FSIrEx94g94arTs10TK21SRDEF0Hgv/7r7DEt0iqu0+Rs - 89r/I9qUVVY8CpFHhyrdZT+jpzRO0uo/xdNZWZx9bI6uVjdn23K/z+r/d/Y+3rz75bf4Mn3/22/vLt/H - v2/eXybb399d7tLzX88vkg+//fI+fndx/m//9l//dXZVHl6r7PGpPvu/2/84u3h3fvmPs89l+ZinZ4ti - +5/yJ+pX92m1z4TIZLy6PDuK9B8y2uH1H2f7Msl28v/HRfJfZXWWZKKuss2xTs/qp0yciXJXv8RVeraT - B+PiVbkOx+pQivTsJavlBVTN/y+P9dkuTc8k8pRWqbr6Ki5kQvzj7FCVz1kik6R+imv5f9KzeFM+p8q0 - 7c+9KOtsm6qzaOMehvM9HToc0rg6y4qzOM8VmaXidHXrL/Oz1d2n9f/MlvOzxersfnn35+J6fn32f2Yr - +e//cza7vW5+NHtYf7lbnl0vVlc3s8XX1dns5uZMUsvZ7XoxXynX/yzWX86W88+zpUTuJCV9g/v26ubh - enH7uQEXX+9vFjLKIDi7+6QcX+fLqy/yL7OPi5vF+lsT/tNifTtfrf5TOs5u787mf85v12erL8qjndnH - +dnNYvbxZn72Sf5rdvtN6Vb386vF7OYf8ryX86v1P6Ti9F/yR1d3t6v5Px+kTv7m7Hr2dfZZnUhDn/7Z - XNiX2Xp1J+Mu5eWtHm7W6jI+Le++nt3crdSZnz2s5jLGbD1TtExDecqrf0huLk9wqc57Jv93tV7c3Sqf - BGTo9XKmzuN2/vlm8Xl+ezVX7F0DrO+W8rcPq475x9lsuVipoHcPa0XfKWeThe9ub+fNb9rUV+khz6U5 - i/lSJsTXWSP+ZN6N/2zy/8e7pXTKxyeaXV9H98v5p8VfZ4dY1Kk4q1/KM5n1ijrbZWklZOaRmb8sUnkT - apXFZKbeC/UHJcpq9bSqHFfuzvbxtirP0p+HuGgyofxfVouzuHo87qVPnG1SCadNIPn0/ue//Xsin+wi - BU/n/8b/ONv8B3goWshLX7Y/8Dr0H57FZ//+72eR+j+bfxuoxV20i2QpA5/D8Mf2D/8YgP8wHCKtqZYO - GTzX65tVtM0zmVTRPpXFQzJV55KWlaEDPSKtntOKozNIy6rKwmhz3O1kduO4Ad6M8HweXfBT1qUBO1OL - +tgp7dKOPSQl/OnwKPN0ne1TVbPRvBrpWJ9kDZenTLEJO25WIiBXH3LP/HdMlRVZkdVZnJ+uJEqOXclL - DYSrhrjz5TLKyziJlEG1bmRTbGogiB3Md/fzW3VAnQOlyLS5wXg//xpVaRdvJZsLqk6caIVYwLzJyiC7 - xZsRXipZi3L1Dgy5A04fFAwx1B+vFvey5RIlqdhW2YGSJWEatKvyIT7Kcr7IEoZex1H/RrVWeG6Fot5t - dpDt+4AzHwRojCR7TEUdEGMQoDHYbo/z+8+oiPcpU9zRXjv7rFsYde/jn5EssgUvv1sGPEpWhEYZDGiU - gFvgTf9DtQu4AR2N2qvdNuTMTzjqf47zI1fesLg56I767mYmoljWOAxzR2LWTV5uv3clEc+uG8AoopZt - tbhKuDfV4K0Id1/vozhJom25P1RpM0hCbKiNaIB4uypNgV8KckRMBMSU+eMdPf0MEra+yYUgHiRilrAC - ZAni4yYLlCrrv1Q+eBdtn2JZvm7TqiaZXRz0n4f5z8f8zRHjjsT5IyMQ6EEith3IqxkrzAmG3enPuorD - ksxxwJFEe5mcAB3qerdPqSwfD1X2rMa/v6evVLsjAGK0LUl5bY9VeTyQI5g44M/TuNJST5Aj2AIshn2f - mJEcDRZvXyYpL4QiMWvZ9HiY597Brjst4k2eRuVWHFSleMhlF5waAnKgkUT2WKRdKaAGFSSwPwhmSFiG - xq5zoe5fUaQ5tcbAJG6sXX4UT6dHl3xhJg3YZf1OdkrGNTWVuEq5bJdtZSlAtdo8FkE9Lzy3In1W3sNs - 80iEQ1zFe5a7ITFrW+IySmwLB/3tgyBq9eaErtdoxN7n+mi7YQXQBUiMptoQLHuLIt5TcyDKM1Gz9IYB - jiL/FB9z2R2NhXjhppIjmRgrOoq0SuI6fpOgvQ2Onv6MuKE6FPUW6YtsNiTpT6a857EIga0BUALHyopd - GW3jPN/E2++cOIYAjiELg7x8DIpiKeA4agiqKSG4D5AhwGMcqrIuWcMemASJJW9deCxbgsRitAhPHGxk - tgY1FPb+OGbqZfPTsU7KF1aSmAY4SvOmI36ijj45NGzvWk8yP8tuDjvtXQscjfiuEUARby5kKSN/s/3e - PqKsm+1a4Ggy+2a716BSxFJ44yTpoX4KCNLw3gjc267hrr95V9n9Ii+3MesZBCVurCKVPZt6f4iWK/IA - iM5C5he68MX1VOm+fE65Axwm7drVgSjebuWdpqo11OuNHssyCZA3vD9ClRbpY1lnjA4WokHitcXU7pjn - rDgDjvk30VNGbyzpLGYuZadgy7vJHes382+zLhiJEXqjAQ8SsemMNLdLZH/zgpkKT5zmhxt2jBb3+FVb - PcDf4h5/V8gEhOgNSBT2Q+F5ItTU3JRnbVHEWxz3G+IrORNFvCI8R4opOVKE5UgxliNFWI4UYzlSBOdI - MSFHdq1KXv45wZC7ftdNnYwOZcmoZkweicAaLxSe8cL22GnwRvDUPY74T21f9vgbbAGjnbPT6NyTRvLY - sXrmlDo96vWyhg1sHonAGqsdSMQqssc4f+QlSMf6zfwk0QVIjLB3HYACifMWOf98Ys6PZNeyfImOxfei - fFEvjg/d6AvnJuEyLHZgtCl+keaqEcipHWwDHKV9+87Sd6jHy73/o/e9OR44RIF5kIjN0G5cJJy3644A - jcF/nyLG36eIYT4os6TRccQf9F5FTHivov0mJPMaBiTKsarUj1QbiBvGVGBxZFbfd/mQF0UTwDGC30SJ - aW+ixJu+iRLEN1H677vH+hDXTyIkru5BIpaiKcllOdsMEPPS1pbAsdK4yl+b92Xd/ANOVQ5YkGi8t3rC - 91ZPHdzFuUjV3JCqq3bTJOo+a21qLU7AMSd8Jo9VGkssIC1NAxwleyxkXaYaUOfvI/Ua5LGKE1bNCJuQ - qCFvG8X420YR/rZRTHnbKELfNorxt43iLd42imlvG08/E6lsDeyq+FF94sqNZUiQWKFvNsW0N5uC+WZT - oG82myMiLHvp/HiEKK4eQ6MoBxypUO/e2lQMatlDnrGIIoqTZzU9S6RJcFhLBsduJgBWqTiUhWBlCkOA - xOC99xa+996i+YCknwrLmeyPWpBo4nvfIg3I6oAGj9d9Nhoaz9Ig8bolLDgxWhT2/jhm24Dbo+GoP2D2 - g5gw+0EEzX4QI7Mf2uO16nmWhWzxiaf44sOvUbnT+z+CF3XMip1N156WbVz5ZB/3KS+6bYGjnQrHYVYq - s+QDRVjM0NkmYuJsE/13qstfFrUsoEOiDRZ/NPXgJ08pd66LR4XEheZ1s5uCuA2PnhWP6sOUspI9in2z - rpDghgZUSNyqPqjqdpflKS+aLkBi1FW2DR4Wci1wtG7akfpYMKDYdi1YNHbu9OZGcxw8pO8Im9CoqvnV - 1rfqszJuUxUUTY0Z0lzAbf7odVwfRejV9pIpsXiVhO3wRhpm4IVFMzwTI4o3iSe80Y5qMEaWPwGhTgok - jiyzkyeWviF91rBsbirwOOmWf/6Kxc2ViLliiXq9wUmjO5BI1ZFXDTUg7OQPrvtG1btW6Bs0DGCTNypr - zqwYnTN7VF3uHdXbUoBNPsP3bS/4D/qLM5Mes0ez1e15WIhGMRpHtacC4ygFHGe5moUlmCGYEIOdbK5l - SjRu4rkWOFrAJ4wWPupnp5ztGI/Uvj7mph1sGo/6FvHwSKrr1y4XWb9GTxl9DByUmLG6ZacitfRp/zpo - eP1FiTiiguNqb9q28UE17zkhXQscjfo1sM5hxnIfbV5rWgfUpWF7++0teWEYAPf4eUMjiMIThz3cjVs8 - 0Q5pQJopeMStP8MiKJBhGovajiWGxWsdnkhvM5w0Uek5j7YvxY7Z4qif8/YewL1+1re5mAOPRJuwaJK4 - da9WLa6oE7pgAx6leV+2LXPOy1efB4/YddHzbJc2846oVeuYyxd5n/Ij7VO/mTiWB+C4P/DmeO/JUyxC - CzdLgcfhFykDDdsz0b5q4bZhdB6OQPwOUcNgXzOTmFd0dKjXG9KqsBRonJAyXIyV4eKNSicxuXQaRu+5 - cXw5VASUQMJbAomwEkiMlUBC9iXyJNqor52KxzxVPRtWIMADR6xLfqv+xPrN0a6sAm42oIHj0cerTNK0 - 0j8whr4rDljfz7u2X8C6ft41/dir63lW1lOHVN+/m8x/3Pwr3dZC3VfZNqYNH4+orLi5+pFaFLpbQZwU - yYZH3FFeBgZoDFCUpu/cDdWqijOv6XFcBxSpfj2k7LTS4BE3M61sgxmlnR/xlJESp4csl5q20i6QR7IN - mOULWZVxZEVG+lkC5xey4uLIaou8lQ+xVQ/ZKx56VjtkLDMAri6wPdb1U1UeH5+aVUzzlDbuDOCmP0nz - 9FHtcRVtq7QZ6IxzVa+T2rWoxIpVNpteyE7Gd9JF6JxllJUs42MgDTN97UhoP9N2W/9Ua2+lza5BqidG - CTLmgiI3Y7BtlU+7AwBu+QNX3hxfdfPNVtwkrLYZvNLmhFU206qSbUTmJhIObLl/Hsqqme6g6p+9fIQq - +eiQAoAGMwp13N4dr+83v1MTQZrl0ik+l7bt9Tv9c1Ja1ndpwK6/MlJVviBHcAxQFF5l518jtF3+fJiS - 3y/YQk8l0AJEY79rGHvHwFvrFFvnNPxtwpS3CMNv7FkUzFCOBojXzXuv0h9HWfDJYpC4lgQqAWOFTPJF - FFCcN3kvQnof8tgsX0BfMUznHGPUvSAmCk+Y62POKbBQwNtOmN280jcMAXDUz7iD+Fxe5qq86Iq8Yavx - jq3Eqx2vZAu13DPlLQy4uw+86S+xXdpjH7ZHYIcYFHicYQNOZpReAMZ4TomNP53DjNStOUzStZ6++2aM - 9wK469c6AurLYXpaOwIghmrUkr0KAlz0NxDo22PtQPTXh3e/R6v13XLezOXJkp/MEIAJjMp6V+1/R90t - /bwXkTgeVDOfrtZg170jPy074DmR/8jEU0p3dZxrZH9ZPrKGdXP4mVyvSMT19F2ZKE/Jz5gBu2721+gj + fVNsJdG0Y/tIck9nXliUSNk8oUiFoOy4f/0FSIrEx94g94arTs10LK61SRDEF0Hgv/7r7DEt0iqu0+Rs + 89r/I9qUVVY8CpFHhyrdZT+jpzRO0uo/xdNZWZx9bH5drW7OtuV+n9X/7+zD779tLs/fvf/t9/T84tc4 + ffcheX+xPU9+/2VzHv/+y6+/vL/8EG+Td//2b//1X2dX5eG1yh6f6rP/u/2Ps4t355f/OPtclo95erYo + tv8pD1FH3afVPhMik/Hq8uwo0n/IaIfXf5ztyyTbyf8fF8l/ldVZkom6yjbHOj2rnzJxJspd/RJX6dlO + /hgXr8p1OFaHUqRnL1ktL6Bq/n95rM92aXomkae0StXVV3EhE+IfZ4eqfM4SmST1U1zL/5OexZvyOVWm + bX/uRVln21SdRRv3MJzv6afDIY2rs6w4i/NckVkqTle3/jI/W919Wv/PbDk/W6zO7pd3fy6u59dn/2e2 + kv/+P2ez2+vmoNnD+svd8ux6sbq6mS2+rs5mNzdnklrObteL+Uq5/mex/nK2nH+eLSVyJynpG9y3VzcP + 14vbzw24+Hp/s5BRBsHZ3Sfl+DpfXn2Rf5l9XNws1t+a8J8W69v5avWf0nF2e3c2/3N+uz5bfVEe7cw+ + zs9uFrOPN/OzT/Jfs9tvSre6n18tZjf/kOe9nF+t/yEVp/+SB13d3a7m/3yQOnnM2fXs6+yzOpGGPv2z + ubAvs/XqTsZdystbPdys1WV8Wt59Pbu5W6kzP3tYzWWM2XqmaJmG8pRX/5DcXJ7gUp33TP7var24u1U+ + CcjQ6+VMncft/PPN4vP89mqu2LsGWN8t5bEPq475x9lsuVipoHcPa0XfKWeThe9ub+fNMW3qq/SQ59Kc + xXwpE+LrrBF/Mu/Gfzb5/+PdUjrl4xPNrq+j++X80+Kvs0Ms6lSc1S/lmcx6RZ3tsrQSMvPIzF8WqbwJ + tcpiMlPvhfqDEmW1elpVjit3Z/t4W5Vn6c9DXDSZUP4vq8VZXD0e99InzjaphNMmkHx6//Pf/j2RT3aR + gqfzf+N/nG3+A/wpWshLX7YHeB36gWfx2b//+1mk/s/m3wZqcRftIlnKwOcw/LH9wz8G4D8Mh0hrqqVD + Bs/1+mYVbfNMJlW0T2XxkEzVuaRlZehAj0ir57Ti6AzSsqqyMNocdzuZ3ThugDcjPJ9HF/yUdWnAztSi + PnZKu7RjD0kJfzo8yjxdZ/tU1Ww0r0Y61idZw+UpU2zCjpuVCMjVh9wz/x1TZUVWZHUW56criZJjV/JS + A+GqIe58uYzyMk4iZVCtG9kUmxoIYgfz3f38Vv2gzoFSZNrcYLyff42qtIu3ks0FVSdOtEIsYN5kZZDd + 4s0IL5WsRbl6B4bcAacPCoYY6o9Xi3vZcomSVGyr7EDJkjAN2lX5EB9lOV9kCUOv46h/o1orPLdCUe82 + O8j2fcCZDwI0RpI9pqIOiDEI0Bhst8f5/WdUxPuUKe5or5191i2Muvfxz0gW2YKX3y0DHiUrQqMMBjRK + wC3wpv+h2gXcgI5G7dVuG3LmJxz1P8f5kStvWNwcdEd9dzMTUSxrHIa5IzHrJi+337uSiGfXDWAUUcu2 + Wlwl3Jtq8FaEu6/3UZwk0bbcH6q0GSQhNtRGNEC8XZWmwJGCHBETATFl/nhHTz+DhK1vciGIB4mYJawA + WYL4uMkCpcr6L5UP3kXbp1iWr9u0qklmFwf952H+8zF/84txR+L8kREI9CAR2w7k1YwV5gTD7vRnXcVh + SeY44EiivUxOgA51vdunVJaPhyp7VuPf39NXqt0RADHalqS8tseqPB7IEUwc8OdpXGmpJ8gRbAEWw75P + zEiOBou3L5OUF0KRmLVsejzMc+9g150W8SZPo3IrDqpSPOSyC04NATnQSCJ7LNKuFFCDChLYHwQzJCxD + Y9e5UPevKNKcWmNgEjfWLj+Kp9OjS74wkwbssn4nOyXjmppKXKVctsu2shSgWm0ei6CeF55bkT4r72G2 + eSTCIa7iPcvdkJi1LXEZJbaFg/72QRC1enNC12s0Yu9zfbTdsALoAiRGU20Ilr1FEe+pORDlmahZesMA + R5F/io+57I7GQrxwU8mRTIwVHUVaJXEdv0nQ3gZHT39G3FAdinqL9EU2G5L0J1Pe81iEwNYAKIFjZcWu + jLZxnm/i7XdOHEMAx5CFQV4+BkWxFHAcNQTVlBDcB8gQ4DEOVVmXrGEPTILEkrcuPJYtQWIxWoQnDjYy + W4MaCnt/HDP1svnpWCflCytJTAMcpXnTET9RR58cGrZ3rSeZn2U3h532rgWORnzXCKCINxeylJHHbL+3 + jyjrZrsWOJrMvtnuNagUsRTeOEl6qJ8CgjS8NwL3tmu462/eVXZH5OU2Zj2DoMSNVaSyZ1PvD9FyRR4A + 0VnI/EIXvrieKt2Xzyl3gMOkXbv6IYq3W3mnqWoN9Xqjx7JMAuQN749QpUX6WNYZo4OFaJB4bTG1O+Y5 + K86AY/5N9JTRG0s6i5lL2SnY8m5yx/rN/NusC0ZihN5owINEbDojze0S2d+8YKbCE6c5cMOO0eIev2qr + B/hb3OPvCpmAEL0BicJ+KDxPhJqam/KsLYp4i+N+Q3wlZ6KIV4TnSDElR4qwHCnGcqQIy5FiLEeK4Bwp + JuTIrlXJyz8nGHLX77qpk9GhLBnVjMkjEVjjhcIzXtj+dhq8ETx1jyP+U9uXPf4GW8Bo5+w0Ovekkfzt + WD1zSp0e9XpZwwY2j0RgjdUOJGIV2WOcP/ISpGP9Zn6S6AIkRti7DkCBxHmLnH8+MedHsmtZvkTH4ntR + vqgXx4du9IVzk3AZFjsw2hS/SHPVCOTUDrYBjtK+fWfpO9Tj5d7/0fve/B44RIF5kIjN0G5cJJy3644A + jcF/nyLG36eIYT4os6TRccQf9F5FTHivoh0TknkNAxLlWFXqINUG4oYxFVgcmdX3XT7kRdEEcIzgN1Fi + 2pso8aZvogTxTZR+fPdYH+L6SYTE1T1IxFI0JbksZ5sBYl7a2hI4VhpX+Wvzvqybf8CpygELEo33Vk/4 + 3uqpH3dxLlI1N6Tqqt00ibrPWptaixNwzAmfyWOVxhILSEvTAEfJHgtZl6kG1Pn7SL0GeazihFUzwiYk + asjbRjH+tlGEv20UU942itC3jWL8baN4i7eNYtrbxtNhIpWtgV0VP6pPXLmxDAkSK/TNppj2ZlMw32wK + 9M1m84sIy146Px4hiqvH0CjKAUcq1Lu3NhWDWvaQZyyiiOLkWU3PEmkSHNaSwbGbCYBVKg5lIViZwhAg + MXjvvYXvvbdoPiDpp8JyJvujFiSa+N63SAOyOqDB43WfjYbGszRIvG4JC06MFoW9P47ZNuD2aDjqD5j9 + ICbMfhBBsx/EyOyH9vda9TzLQrb4xFN88eHXqNzp/R/Bizpmxc6ma0/LNq58so/7lBfdtsDRToXjMCuV + WfKBIixm6GwTMXG2iX6c6vKXRS0L6JBog8UfTT34yVPKneviUSFxoXnd7KYgbsOjZ8Wj+jClrGSPYt+s + KyS4oQEVEreqD6q63WV5youmC5AYdZVtg4eFXAscrZt2pD4WDCi2XQsWjZ07vbnRHAcP6TvCJjSqan61 + 9a36rIzbVAVFU2OGNBdwmz96HddHEXq1vWRKLF4lYTu8kYYZeGHRDM/EiOJN4glvtKMajJHlT0CokwKJ + I8vs5Imlb0ifNSybmwo8Trrln79icXMlYq5Yol5vcNLoDiRSdeRVQw0IO/mD675R9a4V+gYNA9jkjcqa + MytG58weVZd7R/W2FGCTz/B92wv+g/7izKTH7NFsdXseFqJRjMZR7anAOEoBx1muZmEJZggmxGAnm2uZ + Eo2beK4FjhbwCaOFj/rZKWc7xiO1r4+5aQebxqO+RTw8kur6tctF1q/RU0YfAwclZqxu2alILX3avw4a + Xn9RIo6o4Ljam7ZtfFDNe05I1wJHo34NrHOYsdxHm9ea1gF1adjefntLXhgGwD1+3tAIovDEYQ934xZP + tEMakGYKHnHrz7AICmSYxqK2Y4lh8VqHJ9LbDCdNVHrOo+1LsWO2OOrnvL0HcK+f9W0u5sAj0SYsmiRu + 3atViyvqhC7YgEdp3pdty5zz8tXnwSN2XfQ826XNvCNq1Trm8kXep/xI+9RvJo7lATjuD7w53nvyFIvQ + ws1S4HH4RcpAw/ZMtK9auG0YnYcjEL9D1DDY18wk5hUdHer1hrQqLAUaJ6QMF2NluHij0klMLp2G0Xtu + HF8OFQElkPCWQCKsBBJjJZCQfYk8iTbqa6fiMU9Vz4YVCPDAEeuS36o/sX5ztCurgJsNaOB49PEqkzSt + 9A+Moe+KA9b3867tF7Cun3dNP/bqep6V9dRPqu/fTeY/bv6Vbmuh7qtsG9OGj0dUVtxcHaQWhe5WECdF + suERd5SXgQEaAxSl6Tt3Q7Wq4sxrehzXAUWqXw8pO600eMTNTCvbYEZp50c8ZaTE6SHLpaattAvkkWwD + ZvlCVmUcWZGRfpbA+YWsuDiy2iJv5UNs1UP2ioee1Q4ZywyAqwtsj3X9VJXHx6dmFdM8pY07A7jpT9I8 + fVR7XEXbKm0GOuNc1eukdi0qsWKVzaYXspPxnXQROmcZZSXL+BhIw0xfOxLaz7Td1j/V2ltps2uQ6olR + goy5oMjNGGxb5dPuAIBb/sCVN8dX3XyzFTcJq20Gr7Q5YZXNtKpkG5G5iYQDW+6fh7Jqpjuo+mcvH6FK + PjqkAKDBjEIdt3fH6/vN79REkGa5dIrPpW17/U7/nJSW9V0asOuvjFSVL8gRHAMUhVfZ+dcIbZc/H6bk + 9wu20FMJtADR2O8axt4x8NY6xdY5DX+bMOUtwnCMPYuCGcrRAPG6ee9V+uMoCz5ZDBLXkkAlYKyQSb6I + AorzJu9FSO9DHpvlC+grhumcY4y6F8RE4Qlzfcw5BRYKeNsJs5tX+oYhAI76GXcQn8vLXJUXXZE3bDXe + sZV4td8r2UIt90x5CwPu7gNv+ktsl/bYh+0R2CEGBR5n2ICTGaUXgDGeU2LjT+cwI3VrDpN0rafvvhnj + vQDu+rWOgPpymJ7WjgCIoRq1ZK+CABf9DQT69lj7Ifrrw7vfo9X6bjlv5vJkyU9mCMAERmW9q/a/o+6W + ft6LSBwPqplPV2uw696Rn5Yd8JzIf2TiKaW7Os41sr8sH1nDuvn5mVyvSMT19F2ZKE/Jz5gBu2721+gj 614Hr3k9Yb3r4LWuJ6xzzVnjGl7ful3V8dQTiurye1pEG/koqs40p58yYnOjM0Yd0VW1m3kcp84Mfdk2 APf4mQ1Wm0cicAsVA8bcxzwPTSLLgURqvgCuZeNONIM0TRYQrHigCYmqOkdxfazSoYvJigl4oIht9ua1 - UE0asLM2MDFJwKpN6iV7NdZvJk+MAgVuDP5X42Pr5TcL0G6ykupUDGBifXfuW3G/PybUiEaxTVniEwy4 - 6Q2iCmoRiXSrnpphbWU1NMJswvlcUOR2BNT4NpceEpBAsdrRJVa/14BRt/qgi/HsmzRm5/TsBtJnbcaH - +eoGh/ysHjo6iiWe4kqNofEGW0watTNWNXVpyM4r/fByD6jsup2nyTFQ07SoqnPAykAe17TIrCcC8QAR - uesNPPrXGtDmEcePaSS+0+Z5AjjgZ79gdGnYfiyyH/Qh2oEErdr34v1LGUYISDMWj5ODXYMbJWBZ1tFd - Y0J2jPHvFhOwU4x3lxjtIH0SlwODbk6dg/baXxityxewdflCb6u9QG21F1lkpewGpUmb9qxgfglogI5T - W4iSKNVIxyp7zFSdQiyPiBL5DJM8LeJ4lJw1CGCzjrltZxGVLeS6gMpPLUBwENRE8JicqAHrfLq0azdG - rXiTDTwaM55qnxwPCXEcaaBMW55tqrh6JWdmnbOMavOs4QUgtTcF4IC/nSPUzkEVZL1Bm/Z9/Jht+zGW - fkmsmpT7UYkdSy0WGudRKR8UaqffgU03d28yfF8y4rdAzjdAxXFvdslJ982lTfshTUkNG/V729DcLpqk - QSxPVW7VPi3N8OOhFDVvAqdH48R7zpK0/SG13nRg090uxyhzWh872uXZ41NNfYPjFQExm1GnPH1Oc3KU - AQW8beODJ9ZY01wRH93KeVqZW5OhO5FpBzj5GsBtv7Bfe/+LOHMbUZhxukUehzl4lAgObLvVMs0yct5+ - 1kBTm6xtbgv8KqVOCjdJ28rZewnbdylgzyXvfkvNQeqAeA8BrqDda6bs2dT85oVzxi/QGZ+z7tE5co84 - ez6h+z2F7PXk3+epOQp90UAOAUmAWOT3zNheUtx9pPA9pIL2jxrZOypw36jRPaPC94uasleU4M0HFdh8 - 0GZnpXYXVjUORj1fgwXMvF2lvDtKqYP0EieCyhvOljvoXlFB+yqN7KkUsNeRd5+jsD2OxvY3ao53G7+y - MpcBA27uTkMjuwyF70wzZVea5jfFrqy2aTP00owyiPiRnEqgBIhFn/mIrrkgyLP5BDCb7232kpm6j0zQ - HjIj+8eow/9Kvp+fRy9l9T2uymNBTh2bdyOw5+mN7BgTvFvMhJ1igneJmbBDTPDuMBN2huHsCgPvCBOy - G4x/J5jQXWDGd4BpflEfydL66HrYH3+N7KnC3E8F3UslfB+VKXuovMH+KZP2TnmDfVMm7ZnC3C8F3Sul - 3+hEX0SS/hWZR4PE491udE+W/mDIdE1UAsZizmMZ2/eFv+eLb7+X9tgwlMYpc20eivCWu8lwdpIR9HmA - ApoHKHgztgQ2Yyt8N5YpO7E0v3lKE21oW/5ul5GrK1ACxeLlfzznv81HppR9XN5oD5fJ+7cE7d0ysm9L - u9sKo2eI9AjD9n+ZsvfL2+yYMnW3FG37iCf1Gos6Yw7i0QghM7fE1JlbInjmlpgwcytw547RXTt4O3Zg - u3UE7tQxuksHd4cOfHcO5s4c6K4coTtyjO/G0fzC/UCKXJhBDiASdc8PZL8P3l4f2D4fb7PHx9T9PUL2 - 9vDv6yFCZiEK/yxEQZ/rJ6C5fqyWBtzKINePQN2o/sRYFE/ncCN5KTwHNt11qV4O8+e7QLwZgb+Pi28P - l8D9W0b3bgnct2V0z5ag/VpG9moJ36dlyh4t4fuzTNmbJWBfFu+eLKH7sYzvxRK6I8r4bijBO6FM2AVF - ze+IntI8L1V3u3o9rThEDAM6zEiMMWRw1PglpiWC+r1lUBOoSAoFGI7ni/engQjyYJbDOmaWEnF1I4os - pcEO5vXNinfxDmg66TLIwrpgBzSdak+faHPc7WSGZJgB3PA/n0fn7BR1YdfNk2I2bgq7sO2+CEmFC38q - XDClmC0gFS78qRCQBt4U4AhhU8C1I1eeXGSRtgL7VKeFoT7KLBcAHbzZRcI5TwtDfZTzBNDBK2v9q+W3 - +/Vd9PHh06f5sunKtxuU7Y7FdmqMEc1YPLUa6RvE6zWeeEmaHpoTY4fqDZ4oarWn4pjn7CAngS/Gcc/X - H/ce8+EonthqBXvcYvoKyxDrMZMWQIRpw75aru/l7+/W86u1em7kf35a3Mw593ZMNS0u6X57LJOiEfOA - T2PGUzMiF/df+jJif6A++ZgCi6Pm6NYpL0DLoubjgak9HjCn/FPCkyoSs3IyrUujdlrWNEDMSc2AJolZ - qYWEjRreZtnA29nXOTsrIwZvFEbdjCl8cTh1MqZA4nDqYoBG7MQHyQQxJ2GZdQdEnIQPFW0ON1IfdhdG - 3IfywE+FE4y5aY+8CSLOZt5xyIOpC7AYhEWfHNB1hj1+Y08eN3Pg+YJW+p8Q18PNWniuEk/ZjnxnGsh1 - UWuOARpcs6sr2QmLruerq+Xifk3dcBnBvf7pn8mDsNdNKLlgWrPPV9HV19nVZF/3e9Ow3WyjtNhWr9M3 - YLMwy7fbnF9cspQGaVnrims1SNOapGRdh5iedLvhnJqGWT6GC/KU7HtReu6FaBbcbg5Qvh8CUNfbBeR4 - NdT0HouXKj5QlQOF2aJDnCTTJ1SBsOnmnCd8lgHniJ/h6vY8mt1+o5SPA2J5Pi7W0Wqtft9uukYy2jDu - JlUVAIubH5uP9WquvMNxP1/ts1KqHxfFvYQhKgD1ekNSWcCp/PWenT0MFPVSz1gDUSf51umkbb27u5nP - bsnn2WOWb3778HW+nK3n1/QktVjc/EjMYyaKezO21pcO1NtlorhX8FNB+FKhLqOPt1xzA1vuT8xM9gnN - ZZ/ntzLezeJ/59frhewKxsm/SGaAH4lAr5pAw0gU8iMDCUZiEG+Ci4/4qdkd4EciHCrCFB3cMBKF+ngB - /HgE4hTHEQ0cj1vDubjXz8tXWG1nHmbmKbTWW8w+cFPFRFEvMTV0EHVSU8Egbevtev5ZvQPaH2jOgUOM - hNc6NocY6fdIAxEntQmhcYgx4wkzzEe+2wOHGAXzmgV6zaroOcqi9NdfuOIOR/z0pohBWtbbh5sbembq - KchGvOkdA5mot/sEWa67j/89v1qr9ZQIE31dEraS007jYCMx/XoKtlHTcMBs39V63ncdb6/nn8gnCgh8 - MajFsA373NQC2YZ9bnqOsGmfPSTR/elNzikW7HNTi1kbttz38u/r2cebOTfJIcFIDGLCu/iIn5r8AI9F - CEgfb8qw08STGvx08KYA5QNVALW8q/k/H+a3V3POgK/FYmauFTCueae5Rs6wzW5t2sRJQrNasM+9zdO4 - IJbTkMAXg9rktWHYTa250DrrdIAwo8XmYCNlETGbQ4y8O5Vg94dcZOEl+fBS4R37wnsYdffb7O5j8Z0Z - wnDAkfK0eJz+Ha5L+qzkatqhYTu1SEdrtO4AfbBLBz3OaPpOvBDrN0e7Q4hc4rCfedPQu6WW9mUK36FG - tSP87eKa6e1o3B767IlJz579qygW27eIpjxwRNllf1h/uuQE6VDES20OaRxu5D7oJ9Yyr38951YGJop6 - iW0iHUSd1DQwSNvKfEu0Rt8SsV4NIe+DmC+B0Dc/zYEk2+3oOkVBNnrGQd4YcV4Twe+GWC+EkLdAzFc/ - 6Pse1kse5M1OyOsc/zuc5qgs3h7TIq3iPPs7TdRaW/QIrsOO9O1+Tm7NnyDIRc+PJwqyUXsvJwhykXNk - B0EuwTkvAZ+XWk+dJTu3bA+3iz/nyxX/3R8kGIlBLDBcfMRPvWkAb0dYX7GqCI1DjPSKwiAx6/7QLLQX - 1Tx1jyN+ei7RQMSZ8c41w86RnAsGDjHSqxSDRKzUYkHjcCOnenFxx//pkl1MmCxuJmcDjcSt9Mygo5b3 - z8VqETDK7uJePzFBbNjrpiaLQ1t22jbPGmJ52vZHLbs/arlTks9EMe/ze570+b1jrKNyQ9nlysIsX1an - +yi5yEi2E4S4KKsYOCDmJA7baBxopGccjQONR84JHsGzUxtFcG5JyyFGcrmhg4gzu0hYSskhRmoJoXGQ - kXfR2BWzLhe5VrV8B+s56UDMyXlOWg4yFvIvvMs+kaCVc5ORO3yIie3ZnoJsahlnuk1RmC3a1j95RkVC - 1mPBu+aWg4y0dVFtzjLuN91qlOT3ZQaJWQu+tgC8baUo0/tvWjmhcZZRtr33WZ09p/TCx0RRL/XxMUjb - eqyjtKSNn3cMYGK0TAbM8tXx4wX1s5qOAUxi+tbJOmOb0v0hb1ZrpN5ag8Ss1Burg5rzYf1F/n79LVrc - frqLuk90SWeMGsaiEO4Xwo9FoKQRJoBi/DH/trhmptLA4mZOypxI3MpKjR4dvB9nq8VVdHV3K7tas8Xt - mpZfYNpnn54aEOszE1IEhDX34i6KD4dmk6wsTykbBgCo6e33g9rWVU6xGqDlzNO4inZ5PH0LUQuDfO2S - rkyrBltutVRNsyVy8xOS2UQtLzU53VSUf2m6y812OsTlcFEBEqPdy/vxGFdxUacpK4zlACIRt962OdOY - lKe9JCm+gTJtabmjaOTPTV6t6UN6jW5AlisnrFPTA5ajot1Fq5zs/hLFeU61KMY0NTOZCBOtdMY1TV/I - fyAAy4FsObiWrMhqqkcxrmmvBmEYaXTiYONhemPTwlyfWp9H5tfpU6Ic0HUyy3QLxbyy3BPTF/qGWNdM - 3QPC5hwj9cKtq31KfybHPSkzd4jpUTeoIOXllrAtNbnmOzGmSWXDZnuxgpZCOmcb6ydysdhDgIvSwNMY - wNQsAUb6HAlAMS/xdhgg4kxkQ6IqX1najkXM1AfCABGn7NjznApEnBVhW0QHRJyk7QBc0rWW9BaJhpk+ - YmZ38rmqBDZZGR3irCKKes41MhqAGub6aG2LlgAshB04dAYwHcieg2tRZeLmuKOqOsz1iXL7PSUnekvZ - tp9Ez0/bcNxv0or8PGoY6FNPlKxDGMqONK2Mjg/Y5zmUpAwhf27xajoGKSO0hGWpK3K1cmIsE7Gjc3D6 - OdTC3S3TqVnHzTPtfreiOKdqGghwcUZ5DNB2Ctrj2gCW44V3Vi/IOQlO2S3gklsQy23hlNqCXGYLoMRW - e6rsaRIJ2A566SrAsrVpw+WEPboNCHDJpG92HKXmAQdG3KojcCCsdAvCiJvthZ3UnroARzMEeTRDAKMZ - zd+oPegeAlwHsujgWqgjIwIcGRHdgASx9aJhsC8td6qff6wKjnagXXtBmEqhM66pH4cg55CBxKzikG6z - OOeJOxhzk7sxFup6OWMuAh1z6TtM3U5YpFfuqMCK8VQe8ySS/RZOStsw6CZnjAFDfMTXHzoHGukZQeNs - Y3sn5TGasMcsX0FvCZ8Y01SnglH8DpRpO6rttUln1RKm5Zk6yvXsjnA9c5LoGU6jF0b35wXs/5CzFJCX - 2keX+GKjhyAXp2Fskpr1Nvp4s7i9br/XL55TQrvFRWEvKXtYHGzMiuc4zxLKACZIo3ZmMmSeVKCMaJmY - 4bta/xWl0zcCGQjHQrwtJ8TxED4DGwjHQkuejnAsoo4r6tk0jGH6PL+9+tjMOCCoBghwCVIa9Yxh+np3 - u25OmDIR0OZgIzErGBxspN1OHUN9qpARNeVTS1SAx9iVVbQvk2N+FNwomgKOQ8sMOob6olz1yBOmtqMN - e7wRUSail7KiWDXKtCUkS+LQ5BPpENMjthebgmJpAMOxyQqaowVMh/xLRnI0AOAgbiFgc4DxENNth9gx - bTcb1rkNnG1M0i1NJQHb8USYTXACbEeesi6sx2zf/pDRTBIwHM2MM4Ki+b1roCzlrzOAiVidDJDpIkwz - uDW/eG//TS0zTojpoVW2Th27LY+FKmBfor/TqlQJJkg6hzbsMo/TSqMWMB3ZM0WQPds0NZ1PiOk5Uu62 - 8f2Y/HdaPMXFNk2ifZbn6kVb3BRyVbaXLf36tekAE/RTdGb8H8c4ZzVQLNK0/qSkify1QROfQuf521Xl - XjZkivqx3KfVK0llkIb1cUvJKvLXJn36PlTdizQiFecOa5nrqNpt33+4+LX7wfmH97+S9JDAiXGcvjDz - QDgW4hN3QgyPrNtoZUcLGA7SsPutPeJ+q9qKskwjtogHyHYV6WOsvvehyU6UbStJjdYWcBwF8WQkYDsO - 5csFTaIIx0J/YjQKtu1iWWqpsUWeVsNtPzGDQ30O+TdVadIsijAseUp7SJrfmwbSro09ADjOyZJzw7KP - K/EkaxvS3AETs3ziO7VF0zOmqUyIfcSOgCzRj2M2/TtRm3OMtFq4IyDLRVMn0l0tBxmZQr+P1YyBBXgM - 4vPtsI65GXoV1FPuKMwWbXI17TjhWU80ai8TrrkEcj65nBkgxHXOkp1jNtZzabCIOUCMePfHnKiTBGTh - NaBd2HETGwUnxPGIHxVRIwnIUtM1br4Txw1Vc9xAFlaW6DnHyCiu3FLqkNGaEi1gOmj50s6TMktRr6RD - DA9tcN8e0y8KmTwUXv3eNVCfgAEyXcc9tQlzQkAPNYENzjW+yvYx1aYYw0TrhNg9kEOsahzV+IuOhVqf - g1QfArRp547ReEZjSOvHnX7vGihT0wbE9Ij0mJRRFZPe2GoUZlP/5zHlOVvWMBNP0Dkz1il5zqX9M61b - aXCmkdoyqtxWUUVuEVVAa4i4Ze5AOBbGUIeOOT7auJQAxqUEfVxKQONStBaJ3RohtkScVgitBWK3PlQL - gpoGHWJ46jKytnElGF0YdHf7sjHEHWlbWU1dgzOMR9qAwNEeDTjSXiAd7TdIR1pWONp54TnOjymx7u0Z - w0QcxrLGsPqf7I7Fts7KInoilEAgDdlFmu9odbiLat6HT9HX+dduMZHJSoNybaRXIhrjmh6r8oVqUgxs - avcK4vha0rVSmugD4nrUpznVMznROsz07dM95S1fT5gWUVdES0s4lnwb10SNQgAP4Q3xgDiegn5ZBXRd - RZ4WVE+uf0F49fFjMxxKGSbWGdgUbcoy5+gaEHGSNjp1ScRabmvyys6oAIuRJe170prwTSpuQKIc+Ql0 - RFKI1CU1INclDvE2pboayHUdz3+lmiQCek47Sh0qeejn9O6uRwHGyVOGOYeu/YJ8jyUCeoKv3VUAcd5f - kL3vL0APIw0VBLjoz8kRej7kHxnnpCDAdUkWXUKW4Jt66b+nxL0SNcT0UL5zPP3eMmTED4EMyHaJbVwl - 0fYpyxOaTwNNp/yPbPo36AMBWSjrE5uUZaOs/9UDgKOtOFSnfvrqZiBsuimTTE6/dw0ROecPlGkjtK+6 - n5s8sU2tIaaH0i08/V43rLrmVVqpXniSVtNlDgp5s7pbf/gpFpRRL9wARFGtIHkKtFaUy5pmtaJTnBWi - m3X5SilOINq2H16pzSidMm20MnPllJmrZnZYXLwS2/smhxujNE/3hLW+MB6OoHJgaBTbAUTipAycKvSe - kAUiTu71j153lO0PebbN6B0i3IFFonVWbBKxHvnaI+IlP7w95LryWNSkhp6Bub7yoEbpiLO8QHjEzcrG - rmEsCq8zPmYai8rLNJDDjUTqqfYI6OE37FEFGCdPGeY8BVwX5ES1eqr9H4Ov3d9T7X5E6an2COhhpKHd - U11Rp5BrCOhhnJPdU+3+TC7AoLIrpKeKGcwotL7EyulLrNQk4ebzcauJSpLCCjMOqZexsnsZq3blGPVx - CcXSQ6brkKbf25OtY9KVGqDpFN+zA0Wlfm8Z6unvYE6/tw2UdwkDoVnmy/Xi0+Jqtp7f390srhZz2g4C - GO+PQMjDIO23E94dIbjm/zq7In+0bkCAi5TAOgS4KBerMZbpU1YQHrSesCwLSuF0AizHkrL43kBYlocD - ZXENDdE8d7efoj9nNw+kHUJNyrI1X9Wngnb/bRBx5mW3niFL3NOWvZ39lmfT34pbmOZb3kTXi9U6ur8j - 71MCsbiZkAkdErdSMoGL6t5v9+u76OPDp0/zpfzF3Q0xKUDc6yedOkRj9jjPp29BBaCYlzQm5JCYlZ/M - vhRuRlll1cozn2jMTmlF2SDmZGcHT05oFg5RL3PZKaEbsCi09b4g1jF/fVjP/yK/AAJYxExqsNsg4lTL - nZAWtINpn532DgrGEf+xCDt/jfdH4F+DLnBiyIbiN1nDU1+FQTDqZuQaHUW9x6aRE23U5QlmAMPhRFqt - Z+vFVWBGhSUTYnFuOWLxR+NnYkwzKV7w9Xlz9vrLcj67XlxH22NVUQbjYRz3N8sFdxuicYPoDn+k4rhP - q2wbEqhT+OMcyqyoCW8hcYUTZ7vZnl9cqtVPqtcD9b6YMOZOiwB3B7vu3UYdPufaLRzzX4b5R88/yI66 - n2L5v+jiHVV74lxj2xJRbetmS3F6KxowuFHqKiBNDHjErf5JGL/GFU6cXVl9lw9ErbYCzh6LskqjfZw8 - Ry/ZIS2L5qhaBk/N6aaMjXLk7rmpTeF4t09HHe/jdq8SJibXWAOIOXnlkgmPuFl5AVJgcXj52YRH3CHX - 4M/P3Y9YTVKDxcxNP/V7+spzn2jMLqu+6Yt4ASjmpYz226DrVJsSvLbtp3YLMW4bxmPyRu32AnuLsLbK - G7c90fCghgeMyCv2NBKzkndjRHDQ3xTp3fJcWVkwQlgGMEqTepR1syEWNatZagG32FaAceqnZtcd+VvC - ywYYd/1PsZobSu83D6DjVLP2YrEnCjvKtbUNN3J7r+ccY1OsildB+foZQF1vs3HQLlMbVmZxHm2OlAnE - HocTKc82VVy9cu6bjjrefTO8zNFqpGtN94RvMg3IcakShVfaaaRrPe4jzthOzznGMqQHVPp7QGWxpRZm - CnE8hzJ/PX//7gOv/WPRuJ2RmwwWNx9prytB2rXLfoeQj/em/Mk6dQt3/FXCKHdaCHGp1Vrq7JCnl5Qd - jDwKN066a5eklV2CSP28Wb6PNBF9TITHzIotN4pEHa8aL1Ift4S0zkAHGOltWr6C0PIVb9fyFZSWr3ij - lq+Y3PIV7Jav8LR8my3CkpCz12jQHthuFFPajSKs3SjG2o285hPWcur+HmW7KH6Oszze5ClPbSicOHUu - zmUJTS0jT5jmWy+j6+XHz7RV2E0KsJ3WKiYLTyDgJNVhOgS41PdIhMmZJqb5nuIr1TInDuwY1GC7nq9O - Q1Xvp7p0xjSl2817arPN5hwjU4j4kvRCvUBgSS3WMb8PML/3mAv6/Tkxpqlgnl+Bnpsq6whDdBoCeqJj - sX1KKduygLDrLmWD4xBXWU0+1YHUrF+iJtJkV/d71xAdjhtSAlqcaSz3h6Ns3hB9A2XYKFOXup8bfL92 - PO10dAz2ybsR79M6rQRhsTNUYMWo30WPJKcCXAf1mlvE9RyolgPg+EG+IokAnip75lzYiQOM5MyvY67v - B9X0w3ZQ28QmBdnIo8AAanhPS4sPuZhgdmHDTZim1/7apInrgmqI4Wmn8rKuz0YNr6A/mQJ6MgX9qRLQ - UyVY+U0g+a3p2jTf8RBlLWS6CPvtdj83eNqkyR7QHc09FJQ9bnRGMy2W86v13fLbar2k7qwJsbh5elfB - JXEr5ZF0Ud27ur+ZfVvP/1oT08DkYCPl2nUKtpGu2cAMXzcZPrqdfZ1Tr9lhcTPp2i0St9LSwEZBLzMJ - 0KtnXThyzbzLxa60GQc7UF5cgrDmXs2i1YJYemiMa+pqYqqsw1wfJQEHxPU0NSjV1ECmq+2mqNWr4/pY - kYwWanqTMkTt0o5dHSEqFeJ4ntMq270STS1kuWTleP2FJGoI00LNuW6uZXXoLA4x8rp0qMGOQurU9QRg - IV+503o8/fVA9hwgyw/6dZmt0P6v1M6dDUJOYvfO4gDjD7Lrh2MhN7lNDPTRO3kAa5oDunkgjdjl3WM8 - 0gCO+I+bPNuy9T1t2ol1nVPPsTuYAAuaeanqwKCblaI2a5oFo2wTYNkmGKWSAEslwXtSBfakUqt1t04n - dYq735sGYre4J0wLvWEBtCoY3WsdGlzzK97Is83hxmiXHQRX28CGm9GSNynYVhJ3noFYyKxqMbpTUZgt - qni+qEKNgmkEr5jYM3JA2PmT8l2zA0JOQi1kQJCL1OuyMMgnWLlGILmmLrl5+0TaVmI/y4AAF61ItDDb - Rz8x6KwotcVA2BbOhblXFX3+1O0DKdssT9N3EnNJx1pkoj5cXPzCM1s0Yv/wa4i9p0H730H2vzH78u7h - PiJM3NUZwESopnUGMNGqPQ0CXG03ue2BlxXZauKYv6wIq+wCKOyVTYRdvGWedQ9j7mP1nKo8wpOfaK+d - MraJ4Ig/SR85eWRAES/7RqL3sX3wCAtnuyRgVf3xzWtIMjsGJAo/nxg0YG9SjPQuFkABrzit8rrLp3/m - BtOInV+cGDRib751Vx+JqC2B1cZMu7LasyKBJiPqH/Nv3Vgzrf9igYiT1NMyOccob3gms1LTDxHptpq+ - GBoqcGOQarCOcCzE2uuEOB7OUDaAer2c2+7wQARVaVYlOTkHEHYyxqwQHPGTx61gGrI3zyH1WXZY0JwW - 26a4Egxzz8Jm2uCWS2JW8mA0gjv+TETlIf5xpD6CPecY5f28IHx2Y1KO7TRszKq6YQEag/+4eMfOu9+Q - hhZOBGRht2RAHoxA7jyZoONsh6rZJ23jiJ8++I/gmJ+dPzxvAbpfcFthDguauWWp8JalIqAsFd6yVLDL - UuEpS5vWJKOa7TnQyM8VFg3buVWsCY+4o3inDsp7LbsKWRGTxgWn+ZwzoL04MSDD9XW+/nJ33S5/kKV5 - EtWvB0oBA/JGhHYKEWEbXp0BTM3XTtR2r41CXtLYVM9AJsIq1QYEuJJNTlZJBjId6ddn9zjos+YMCHA1 - u6Q42Z04BDCmAuJmqptak2O0GOQTUay+EFafr9f0u2/isF92qZtKnCM/sYB5f6TnMMkAJlobDZiv2P+1 - 3NYXzXgC2deTgLX5+8V2syFbexK1yrhMqyQBq3i750JQnou2zbI/VKkQafImsXEdEr8u+Q+SxRsRuiZw - llwUhLXUHRB0iloeSxjOFjSczT5Pxyyvs+6ppTQnXFhzX198+HD+u2pjHOJs+oCiiaG+03DX9G8VUYEb - g/QOUmNcE/ENokHptsX9bLn+Rp5K74CIc/pccgtDfJTS2eI04+3nxS3xegfE8ajM2r6iJfaZYRz0L0Ps - S9zd7NZwetLS4lEeEsQIkMKJQ7lvPeFYqvRRFjVqj8I8b0rkPK2ptxB0OJFE2D0VY/dUhNxTgd3T5TJa - zf6cN+s0E/O3i5petbRLWlVlReuRO6TPuuNrd6a37SM1hylODYN84lVmnD1Xq9Omvb0M2uZZNocbo4Lr - jArT2qwJ2x4SFKfOWcZjsWVfvgOb7mbcm3qreghxRbn6E0fYkD4r+cECcNdfpD+HXzXL3FFDuAYzivwj - +xbarGVWNcvHxR0nz9ksYFb/wTVrLGBezm6v2WodBtzNah0l227ipr/Zoo78yAwUZiM/NBbq9ZIfG4gH - IjS7yvISY0C9Xl6yWPx4BF4CQRIrVnlQndR9XH0n2QfM8lVq6kUTkpStdQ43RtsNVypRj3d3YHt3B8t7 - 5OS4I5jXqjQWZcEumAHc9u/LZ1WrE5bmsjnQ2C2xxhXruO0XtVpAn2HWQNMpYk4aDJRlk7Ut9XE6MZrp - z/toNp9dN/szxoRdZRwQcRJ3uIJYxEzqsdgg4lRNmOkrwgMo4qWsIeeAHmf0ktVPUZJV6ZayAviYB4lI - 6ZdbHGIsDynvpBXocUaPcf1EmGmK8EgEkRK+TLFBjzMS27iumaetC5AYdfxI+gAGYBEzZSVbBwSc6pUw - bR0bAAW86kseWfBXT5ySTocRNzeFNRYwF2r1aW566LDp/qg+ylmXfxCmChiUabta3H+ZL5ub2mzRRvv4 - BROgMbbZgfiAOzDuptdZLo3bKe/KXRT31lXO9UoU9XZrPlLahJgAjUGbEQSwuJnYSrBQ1Nu8ej8caP0l - XIHGobYcLBT3PjMKFIhHI/DKcFCAxtiXCffuKhT1Els6Jolbs4RrzRLUWlF2LodY1CzC87iYksfVj0JK - gJ73RgjOj6bEG+sQJwm/wNQMYJSg+nWkbuXeBzz9Q0oafykTdEdH7iSzZEFLFd6z7z739GYP1NZp/vYp - K+KcsNaSS0LWBbXC6inMxjrFDoScD6RdT2zONF6nW3nHP8Yi/fUXilHnQKN6ShlChUG+5o7RfQ0G+ah3 - eaAgG/2O6BxkTG7I5YIBOk7VguU8MBYKehmJecJQH+80waemO8a6SQNoObPHVNAuuiEgCz1vDxjq++vu - E1MpSdRKvSsGCVnJWaenMBvrFOF80xxaUWaxGRRmY97vHsW8vLQ8kZiV8dhYLGTmWnHjn7Q5ghaHG5l3 - S4NxN++ODSxu5qavTpv2ecGq1zUM8pFTV8MgHzVFBwqy0VNR5yAjo143QMfJrdctFPQyEhOu17UDvNME - y+fuGOsmYfX61+uAEWAHBt2M0dmvnveJp2PEUVkNQ33Ee2WSsLXZu44jbUDQ2W1Mx5B2JGiljrt+xd7N - fuW9Qf2KvT/tDuwThm2fgC7iaOFX5K1o93fyeJ7OgUbmc4g+gaQPJk3M8bFLCk8pQR7DOjGOSU2abr/0 - ZChN2HEzrhm8WsbdcO/E/cd5JEh7gpmUZfvjanV5cf/H/BvJ1lO2bf7tojlIs50o18Z6X2aAiDOh1Us6 - hxip5agBIs52NZXvtPe+Lu2zVyKOyjg9RHm8SXN+HNODR2x+uH/cnRMLdswxEqk5pcBInWMkEuNNAuYY - iyREJOK8Js5f8Hk8Efu9F0KSUZcgsYh1s87hxihLuNIow85UvNFzIyY/N83aF9t2HRP1lp4bzpBMiPWY - FsMHpsFBDZsnukoSWWqpn5MWxRvxTIt4OG7Sn4e3iNmaRqKGlIRiUkko3qAkFJNKQvEGJaGYVBIKrQTr - UjvwygwTIeob3D5XNz1+SDWA6ybEf6vA4xGD6x8xXv/EQhAHvzUM9UXXqxnTqVDc2y6Zw1W3NG5f8s96 - CZ71JhYppyLuOMjIqRaQOoCyto7GwCbOSmUwDvnVeFNIAJMHInQbhZPNHYcbyaNCDgy61UKmDKvCUB/3 - VHsWNzfThVLarBCIByIQ9wm3OdzISw4dBtysvjLST256n9N3XLM51MgoBU8g5mSW2xqLmZfcs11iZ3vO - TNNzNE3PuWl6jqfpeUCannvT9Jybpue+NK1zoZ4N9ZqLtoaU1wJHi6r4hbWGocfhi0RfzxBXAHEYDQiw - 7UBfF9chAWvbgCYrWwz18QpfjQXM+0y21YrHkIaEqwDicMZz4LEcNRgTmpcBhy8SPy+7CiDOaTiEbD+B - Hicvzxg0ZG++cG63FKPLNRh3t3eGK29p3N7cDq68gQG34NZqAq/VRECtJry1muDWagKv1cSb1GpiYq3W - rKBHfItmgJCT0/NH+v1NJ5j1/PUkaP2bccXOG8jmz6zUQ1KOuM6viQG+Z/LENg1Dfbz7obG4uUq36jNT - rrzDR/1BV6A7zEisGZrI3EzOrEx4Pubpr8QpORrm+ugTp7A5ncyZkugcSd7sSGxe5PB3YuoZIOSkpyA+ - v1It8dZ+1xvFeRaTmhM265oT8nz1gbJsasWROBXR+cVltN1sI/EUN7UUSY5JJsaKsv1Btj0y6moXk4Tj - 56B2zHuDK+40vnjbfbTJj2ldlrRJo7hlarTo8m3iRZe+iHUVPe3jU2rwI5oeT8TH7Z4dRbJ+s2xePIfY - FT8SQeaX84ugGI1hQpT3wVHeY1F+v+Dfh5ZFzOqJCi6TbMnEWMFlkk84fg4hZZKrGY/3/vKXt4jXaXzx - 3qCMADyeiNy82bF+M7uM0PiRCPwywjBMiPI+OApURmyfYvm/i3fRocxfz9+/+0CO4hiAKIk8kzRJ34cV - GKBlarSgImPUCJxFccxz/rUaNGD/GX7jfo7eub4FRXP3GOKrK5avrmBfSliB0cRgH7lIQlss7YFyxzo/ - iQE+WSVz7keLIT7G/Wgx2Me5Hy0G+zj3A265tAc496PFXF9Xu1J9HYb46Pejw2Af4350GOxj3A+ktm4P - MO5Hh5k+xsde4FdeqrAn3tMOcT3EtO8QwENbYaRDQM97hug9bOIk04lDjJwE6zjQyDxF9wzVhoKqUqbI - ToxpajaRbUaQNq+kDSsB1mOmva22UNfbjk/xzlhnPWb6GWso7i03/+J6JWp6n2LRFEBPcZW8xBUpJWzW - NJ+2eW1DR3H+WFZZ/UQqajEHHIn5Mtu/H63+A9YrbJe27Alp8Rz5c5v/QOM/OHzTLidKGsY0tRu3htxv - 2ABFYd5r396yw2HWfbZZ01xtL6Jf3lEL74FybQwV4PmF5rDyHjXfuHlGjadc/EJ0SMK10EZ3oHGcdkSJ - aJGEY/lAG0FpCcgS0a+qo0yb6tyrnn4zXXkfkzKOzcLm7plVr0arhKM3BHCM9tjpl+J4OJRVnbKiISos - brNgPuMbHNigRflrPb+9nl832/U+rGafiXtRwbjXT3gtCsFeN2V+GkgP9k+L+xVpHcIeABwRYVEBAxpc - n+e38+XsJlJ75K1IN8klMev0W2NzmJFwQxwQdlK+7bA5xEj4btzmECP39njuTju1u1QL498SOgwehS/O - c5wfA2I0OOLnZTI0j3GzmCeHNRMEWc6GRKyiT/yCe/9MhS8O//4Jz/1bPXxcL+e87K2zuJmeOQYStzKy - iIYO3i9/XE9el1D91iSj9OchLhKKoEMcT13F0/d/1hnN9HV2Ndkgf2uSnLWgbA4yEtaBMiDERZgyZXOA - kZLtDQhwUab/GRDgImRvnQFMpNWPTMqykabTDYRlWVBTaeGmEHHqnM5YJtqEOQ2xPJS5vz2gOZarlfqM - Mp7+5PWEZUkLqqUhLMtjWqQVcSzEAS0nf8gLwS0/d6AFhG13mb++lw/rc1rVNK8Ggs79MWcIJTXYFqvV - g/xpdL1Yrbs97CnlGoJ7/dOfYRD2ugllH0wP9q/Xk4de5E8Njlbc9YDpoBR2p9+bhnUVF2JXVnuKpodM - F62wGwjd8mE6/sHgqOn5wU3PD8T0/OCk5wdOen6A0/MDOT0/uOk5X3+5u6Z8njEQjuVY0D0NM5ia7sLV - 3e1qvZzJh2kVbZ/S6cvrwrTHTimlQNjjnp5RANTjJZROEKuZ5ZFPtCToCdvSrN1F27LQAUEnaetSm7ON - agtkmksRkCXaZCXdpCjbRrmdJ0BzzNerq9n9PFrd/yEbdaSb6aKol5CXbRB1Ui7cIWHrItr8+otqlBKG - WDHeF6H9+pAfoeWxCNybuPDcw0XzVMjWJaFZivFYBF4mWaB5ZMHNIgtfDhGB6SBG04HyoahLYlbaR48Q - q5nv1ourufwpLa8ZFGQj5ACNgUyUO69Dg+vu439H2424IMxX0RDLQxuU0hDLs6c59jZPWix8IExLQruS - xL4K+R+JyqpZomYzCIrLQlHv5jVE3dGmvXmHQNn3zoBMF22LsoGwLAU1c7aEaZF/uNhuNhRNh7ievKBq - 8sK1EGZyaYjrEeSzEdbZSC01iTvE9dQ/a6pHIqZHkO+4AO641FI1HeJ6iPeqQzTP/fxW/Uh9Gxvn+TC9 - SUTbspjcGRzRuPE2xyxXq4a168QKahwLd/1N8S1SqrfDEB+h3DUx2FeRam+XBKwyrbNHsrGhANvhKAtj - 2V5iXPeAul7OVcPX+7ivsz3Z1VKYTebhf/GMikStSbbbMbUKdb1PsXh6f0FVtpRry+L3F9v4EN1ThT0I - ONULk2Z5wJJsHVDX2/bEVQkgC4B9mRxzegECOdxIe1mWlVuqu6UwG+ktH4AC3nSf0B/RlnJtRcksRnrQ - dcpGLCchO8z1ibraxiKlNMcdErQy0rGlQFu+jWuGTmGIb/qbcAsDfQU/EQtfKha8ZCywdCwIC1BbmOur - y7x8mb6Wj4VpvvWX+ZI6+cyAIBepbjQoyEYoaDQGMhH68wakuQ5pATcRJ4tRAx6l/diGHaLDcX87V5ft - 73DX/yyjEsbiLQz1RcVxz3QqdPDez79Gs9XtuSqjJ/dkDAhxUQbmHRBwvsgckpKFDYXZWKfYk6b1rw/v - fo8Wt5/uyAlpkj4r9XxdGrOzkgPATf/mtU4F68xN0rTK/4y28pnbxNPfR9qcbfwuW2S7kmZrGctURk/y - pKfXSgZkutQ4v7ZfvUpoihXATf+hkg1RyuqCBmS6qHnezenNvb7+Qluv1AEh52p2336Q9cf0Nw0wDduj - +4ePhKU/ART2cpPiRALW+VVAUugw6OYmRE8CVrXL3G9kY0MhtkuW7RKzyZ8v/mw+M6E+oJgDisRLWDxV - +bnAmweWQc/acuRZU8ebWXlc+QmG3dxUXvqeY1VHko0KQlzR7OEvlk+BmPNqecNzShBzLuf/5DklCDiJ - 7Qe45XD6K7+e0WHMHfQMOAY8Cje/mjjuD0kiTx2kjgfVQ7YAjRGSQL46SR3n1Us96bFesq2XPmtgPYV4 - sIj8hPeneliuGc0zy+Bndznh2Q2qx2wBHiPkLizHygdWvXYCPU5W/abDPjenntNhn5tT3+mw6SYPdgDj - HG2nnFPVmSRo5T4oAI74GdnXZhEzO0HgWq09yK3SXBq2s5MDqcnag+RqTMMw3yXPd4n6QhLWEkyIQdk4 - 1ytBY/GrYlQCxmJmGE9uCbkR3nuwDCtPlmPlCbfKdWnEzk7tpbe0olazA4XZqBWsSaJWYtVqkqiVWKma - pM8a3c7/h29WNGQndlKRUfP+zwF1N95P1Y6HPXMjPVXjR+ynw9dXNX4RlFC+ej2kuwob8ChByeSt51ld - Vgv1eS/53kuvNzThJ9T/wM94bQBE5I0Z2haY1C/XfhqQwUZyV+iNGr1Hy/DyajmlvAprK/j758Zvgu7G - crRU5LUd4D66eYzXhsB76dZxVlsC76dbx1ltipGeunGc17awDVoU+XifX0T3H+dqtslks0E5NtoHLAbk - uChTnTTE8ag31t9lmRkXSbRNq+mTcTDeidAs7UC0Noxj6vZqIyx26ICm84O8VX9cf7qIKEv3OKDHGa2+ - zM7Z4oa27YdNesHaLx7BQT9nV3MEN/2/RZtjkeSpKjFIWc0AEafKf9ku28rnhefWBXYM6gP3G/C8/dY8 - LvRLP1GQTZVmPOOJxKz85IQMUJSwCGN2tb9wWATbYEehfOs6ELZFzexRu2ZTPs9zSdRK2ukPYjFz95Sn - CU/e47j/Oc3LA9/f4Zhf3QuuvGX95lmRzMMuwfWYEa0OCLmMgnh/BFp14NJ+O2GeNILb/q6mo1k7yHZ1 - GZbm6iDbdVpNq38IOKufT1DZcdt1tt4gqkfkxFTtQ/UtMTHCCQN9gucTlq9fqfh+vlzcXROfIIj22SlP - j8v6zKQnB4A199eP67s/5rfq9+1/kNIEpDX73c3i6hu9sDIx0EdIXB0CXZTkNCjb9s+H2Q3zag0U9VKv - WgNRJ/nqddK2slecQnCvn5oa6LpTwGFyquBrT3XHv87u7xVJP22NxKyctNZR1Ms9Wd+50tNWIzXr8u4v - mezz5bptEDQr0q8Wd8QyzGuZEo2QRB7HlEiUhPNJ7FhdKtOTTQMRJzVxegzxkZNg4AbjcnZ7HcmfpvHk - dpCGWB7CiOHp95ah+RSH5GgIyBK9ZPWTCpGpVebUxkuEbuaIxopHXOZBZyxT+khLQfl721DEmzyNdmX1 - PToWIt6l0ea426WUBfVGRVbMXSZ/SFmK3qQsWzsAUSTRPq2fSlp6WKxlbj7fV2FJzp6ybIdy+oZzPWA7 - RHpMSka210HLKdKUlmgKcBz8eyC890DUcX2kXWuLaJ6ryavryp8aXHNyhD6fhmge/cUeZV0tBzSdp7d4 - VKXOGcb/jc7fXfyiFqpQq/9H8fPPC4IXoA17dL9aRfez5ewrrX0LoKh3ep3pgKiTUG+6pGlVH2Qfvm/F - eXSo5F9/Urw2a5o32fQ3UqffW4Y8K9QOTdH078EtzPQ1i+rKcvBAOq+BgmyUJ1GHTBdxrEtDbM8uPuY1 - tcxzSNNKHD3TENOzy+NHUtI3gOUgPqbus6mvs0/YCgFAPV5qJnNg212/i7ZVHdHmbQEo4E3IugSy7A/n - dJGEQNcPjusH5ErJohSw7OJtXVb0hO84wJj92B/IOgUBLmIhdGIAU0H2FICFfmHQVf0gW344FvmU0npN - Jgb6ZB0ayRqGWnSYrGnORFQe4h9HUmbtIdMVsP8ugiN+8nYhMG3aiU0bpz2jEphe+w2Uaeu2iGxaOs2E - lOhuNr+P9o87Uvnk0YzFU2238HAny1i05u1lYKzWMSnSxRtEusAjFWWRciMoFja3Tbg3yA2gaDwm/x65 - lonRLt4kmnOnmDtHgzDoZpVQ+H5GzVHKdog94Dia02a0+i0U9jLa6xYKe5u2aVXuiYM9qAGPUpdhMerS - F6Gm7mQDwpa7zS+cW2qQoJVzQw0StAbcTkiAxmDdTBc3/YLfIxK+HpFgtvYF2toXjBa6AFvogteeFVh7 - ljIH7vR71xAdhCDXgQYIOKv4hayTjG36O6VZ/rbq/OOBssPUQJgW2g4YAwFZApqFoACMwbmjFgp6iXd1 - oAYbZVa2OQdb/Yu2ldpAWBbKZmo9YDnI26mZlGWjbaimIYbn4uIXgkL+2qbJ6dszjomYxifE8ZBTZoBM - 14dfKZIPv9o0PW1OjGOipk2HOB5OHjQ43PgxL7ffBdfb0o6dfi97yHC9v6Tkc/lrmybfy55xTMR7eUIc - DzltBshwfTi/IEjkr206oj0pHQFZyKlscKCRmNo6BvrIqW6CjpNzxfDVMq4UvEpOGWFwjpGVZk56Le6/ - zFZfIkKN1ROa5X72x/yCvJ+5hYE+wkCmSTm2/t3QXjwSlTrqeNXatKlqrpG1GqlZSVOw7NlX7b+py3+b - lGb763a+XtDmhOuMayI8TD3hWiiZYkAsTzM+mSXR4nY9/zxfkoQWi5hjsWVZJYcYj3k5ffKWS9pW8n2F - 7mrzToabjiaLmMnpOHCIkZGOOmlbibnazdPkHG3m5/XyYbWO2q8Nrm4W89v2thNGS3CDN8omfcyKKBPi - GBfbNCCYKZoQs0qTdH+g7Dc8QeWNK/+eiae3uFjLNCXqm1yu4/JHJhQOCO71E7I8THvtarROVFXgM6BZ - 4GiL1ephvgx52kyDNwr3jmi4168yZEiAhvdGYN7zgfbaVcZO9wEBWoE3hsoR+7SO1TBw4C23VaNxA/Kz - a4GjtXtf929pTqfHCYmo4Ljpz0NaZfu0qKPnd5xohmA8xnlojHM4BvcRxZ9NfUobx6zzcATmQ2k8jQ+r - +bLdiJmUBBYG+qY3rgwIdBEu1aQ02/rTpWoMTm6S9oDlOByJDgUMjr8uPnw4n7zSUvtrm1Z54hBnFc1y - ohxb97axeZfZPfZEM2DQonx49/uf79VXW2rRjnZ6CWWTWYwHI6j1kEIiGDwYgfCNlElhtijOs1jwnC2L - mvNs+gIaAIp6uak7mrLt0Uh8D5FLHPQTv/JySdCaXGQMo6RAG6UUtjDQJwswhk5SmI2y2KFLgtbsgmOU - FGjj5k08X7aZinfdPQuaSdOpbA43RrsDVypR0PvczIktGNqOdKzdDpayxhDpltJDxngngiwQzhmZ64RB - PvUpW5HElfqiqk4LNewq6HrIAkaTaXdMGf6Gw43RpixzrraBR9wR+Ql0eE8E+jNjsB7zcfsUV2x3Qzv2 - pgBgFOs95xiHTMMqQGzc8auyml6rdRRo4z3hGglba8o30Q4IOtnPhwl73PQbZrCOuZ2wy2jpDaDj7FKd - k211FPDW0bb+SVY2FGjj1PY95xqbjMG67IE0rdHs5vPdkvIhrElBNsrW0yYF2pIjx5YcYRs18TQM9FHW - 37Iw0Me5Edh9IIxLmBRoE7wrFdiVNgOVCc8oQdu5Xi8XHx/W82hFenUGwqh7Wx4LrrphcTNpDWMQHnFH - m9fodnEdFKJzTIh09/G/gyNJx4RI9c86OJJ0oJHI5Y9OolZ6OWSgqLf92pYwuI7x/gjl5l+yJg2J0Rr8 - USgbOmM8GoFdRnjKB3KJq5OoVRZ45yH3tOf9EYLuqWawojQrY80e/qJneYPErMTbqHGYkXoTdRBzkntC - Fmp7F7efGOl5oiAbNR1bBjKR06+DbNfyhr76rktiVur1DhxmJF+3BgLOr/P1F+LKqRCLmznnO6CAN06S - d1GVPpff04Rs1mHYfa7GBqgjZg4Mu9VRjlZxgLH9vFYcszrdkLU6DLmJvauOAUxJmqfqs1LGpQ8o5M12 - O7pRQqCLssy6hUG+Iz313Hac+ivrwUSeyKa1ItuhalF8slOHPW6RVlmcs+0tjvnzWNS0qeMYj0UoZF4L - iTDwWAT1nWJcHytmgB6H/azHrONwI6dT5+J+P7Ur5+J+/7bK6mzLy5q2wxOJ3nd3aI+dOCJts4hZLXtC - b/k7NGLvcyz17SFsAKIwGllg+2of19snsqqhABun4QO3eBjN+hOF2YhvRw0QcKrBMt7Ccx4FEqeZqVmR - VmrFeCRCQDVj4oif/7yJkeetGdXnV2EmjviJ3+dALGQmLERgQIiL+orFACFnyWgzKQhw0ZYUsDDAR1tc - wMIsX7+uOPltjUFi1oBRYsQxIRK1aYE40EjU1r5BolZyyx9b6d462Gy+xWkMwQpvHHIh5+JeP2MwERKg - MbiPgO8JoLYLkJX+rWMi/K6KKXdVhN1VMXZXRehdFdhd5Y3yYSN8rLE4ZBzu5u7uj4d7VcqQZ8HaLGqW - f3tMK3pLEjSgUbq2FWMQAHGgkcSRnkkcGrZv64p17oqDjZTV+m0OMVLzscbBxqdYyGZlVnGsJxY2U7Yh - tTnYSH3uBgz2iadjnZQvBUd6Yi1zMzNzfrteLubklpTFYuZvAY0pTDIlFrU5hUmmxKK+dsckeCxq481E - cS/5CbVY3MxqWAG8PwKjEgYNeJSMbfc9E9SywURxr0jZpyvS2usNupti9G6K4LspvHdTLYCwvJ3dsG6o - BkPu5uVXUVevdHOPer3swtM2jEZhFZu2YTQKq8C0DVAU6gvBEwS5Tu/1eDdWp0E7/WWexoFGTh2B1A5t - OtNfE9gw5ObVOVht007SSiu68UQiVu6N71HM2yyrz36ibcNoFNYTbRuwKDXzvRskGIvBvpAaffvW/ET1 - C+hiRWG2qMwTnlGRkJVTacF1FavlgbQ5yiLNs4LxMHcg5KR3/gcM9RG2z3FJn5X6hsqGITerDee23mRu - n1+135uqL5RqWSbRBm0gARyjKUnVHzj+Hkbd9LmvFgubs+Qnd4wGNMBRqrSusvQ5DQwFaEbi0d8TgwY4 - SvuWh9FAAHgrQrN3OLmN0FOQjVrmnSDb1W7qent3zSmmHNq2P3zkXfnAwUbih+UahvretUvSM7UdDdsz - 1slmyLmS73yPwT7BS0uBpaUISkuBp+Xy/m41p66AoXOIkbEyg80iZvLXYzrocdLnYDi0zy7C9MLvb141 - JFx9S/vtQeffCzwx6HWEQ3vsAYnjTZm6Ogr+WTc0YqcXIT1nGdUKOLz3hQaJWYklscZhRmpprIOAs5nK - Htd1RZb2pM/K6ddCgrEY1H4tJBiLQR1wgwRwDObyGgA+6idPzYQVQJz2MwPGFl+4AYjSDQmycqzGQmb6 - YOKAQT5iDd8xgKlPetbNM2jAzir4kDIvYN67i8P+8yjdx1nOcXco7OVlqRPocXKLQIsficApAC3eF4He - AHFxxG/kT8GKYSrG4gTGwPyH44ZT6A0o4uXPqgcNQBRGIwVsn3CaJnCrhD4y0FOYjTp8qYOoc3dgOndQ - OS/CnwYx5WkQ/NwqfLm1Wbe3HVejdxghARKDMy/dYiEzdV76CUJc5HnpOgg465I+PKxxgJExm3zAHN+f - d3/Mr/nf1UICPAb56zeLRczML1hdHPOT24Q9hxgZrbcBRJxNM0x9Or2N1eJW19QPTDweX8R2Hujtcb9J - K3483YJHY99i+AtK6yivyQcpxuPQG36QYjwOa8q5xzMSkdPgBAwjUahfWQI8EiHjnXyGnTG9bdVziFHV - hm/wkLsaT7zgR9yWWLFWi8/0EvEEAS7iXWwRwEO9ex1jm9Z3y3mzcxjnDYJDo3Z6Choo6m3KZ/KSBAA/ - EuEpzoqgEEowEuNYVWqHhS3xAwJcMy1e+8nEW4RsTf6o9JdqkGA0RpMCxMYyahmJVubZ9jWq+Tnc1vjj - ibqsgiI1An8MWc2pVyXENXIwiS/WeeizdT7+bJ0H5/HzCXk79ELGr2N4toMKPEPjjZdWVRmQai0/HkF2 - cg71U2ic1uKP9pM+Wx40jEWRFW07TzMsVK8ZiXeQRUdWd0VIUEjDhEYlf5RloqiX3KbRSdR6OFaHUqi1 - n59kM4974pYFjdZM/pCVr2DG6Xl/hJB6VIzXo83nvPxS5oT7/QHlpRgtL7UlQQJidIaRKPzSq+e9EULK - YTFaDovgklFMKBnVb3Z5/BjwXLS8N0L3lAbE6AzeKHW2DwmhcL+fPMsF4L0R2gHXaLsJiNI70Ehd+0/t - 1rH9zoxkONBIf6dVyQygUNCrxnWZZeAJxb2sTl5Hota8LL+zuvADDLqZvXe0566trswpDnQc93NryJFe - ZtvlkPeWeeYd7HHz2g49i5m5M90hARpDXRszc+s47m/m8wQEOPEjEZruXhIUpFWMxBmGOYNiDRo8Hnt8 - T6NRe7uoD/eudLTXzu7CmwI0Rlv8hTzZhmI0Dvsp1w1oFMZ7WBsecfPaDo+j7Ya8jFVd1OZmThKZAjAG - r5+J9TGb7pSsQTMVMM6DBs9QFxb5nF3PDTDmDinNxVhpLgJLczFamovw0lxMKc3F25TmYmppLoJKczFS - mutLaR7i+kkwYxgOTyRe39nfbw7pa/r7mSKorhMjdZ0IrevEeF0nwus6MaWuE8F1nZhQ14X1+cf6+yF9 - cX8/XITU0cJfR4f278f79ow1SHXQcrZ7q1O/iesp0MYpHw0StJK/hRsw1Eef1mixmJnxjZrFomb6TBqL - Rc30UttiUTP9ObZY0Ez9aqynMBtrzNqhLfufM8ZeECcIcBFfovwJrdCk/khth3eMbZovF5++Rfez5exr - u0cL40UYJhmNVccb4vqMiGMk0nn0VBIzMKzwxVGFX8V4CDGJLxY9Q9q0z04uqh16zE4vuGHFaJxDmlZv - EOukGYnHKNxhxVgcetMfVozFCczNWM1i/IjzahkS+GIwBvcB3heBXBxbsM+tRhv4ckWP2Rkf8SGO0Uhh - JXGvGI2THQKjZIcJMaJYbIPjKMlorLBSrFeMxmmq7iwVgbFOmpF4oSWZmFKSifCSTEwpydSPVN58g1i9 - ZiwepwOPScZikV/dg4bRKOTOBqzwxWkajayOLq6x4rG/vPJ8cdUcqtLmgzzGwrIuDvmbxGPrddq1k7/z - gb8Pa1bcpzdTBwz0kavZAbN8zewq/i6RLg76GSNJOug4Vbj4O3HYY8BA3zZm2LYx6KK3UTQONJLbIgMG - +ohtjhOEuMhtCx2EnfR3OZ43OGErjIytLtIdZ1RvBgla6VWMxtlG4vLM7srM8i/9tHJyFWvDgJvlBFzM - r3HRr3AZK7yAq7tQv+J1v95tSgj6oMqAWT75X4m2o0os/8XYmQW1INE4E5Qs1jZTUwRIi2b8hLnYh8VC - 5qKsZ7ua+MLPIBHrx3RH/VbIRCFvu1ZDtMlqUTNO2cAhP2+tH+86P83BeiPUD+L8kS4eWNfMGXhAVw5q - DpRbcaDrFOXa+vfwzWSMuEpjqtk1jEWhbgQECSbEiNLiOTiOkozFIu/ABBqmRAm/pJPFE+3UXgm5TZoD - iMT5mgD/uirom6qRL6k46zbA6zUErNPgXZ8hYF0G73oMoeswjK+/wF93wbfeAnedBXx9hX4priRNVCM+ - Oor4MeXILQUWp1lIiT7ABvBABO4Ox4/e3Y3VUX7S+FKEsWoUur7ZY8h6EI/+dSDC1k0bWzPtMWSdq0f/ - Glfy8J7dxtx72ph7fhtzj7cx96rbFsXJv2jOHrN8Ts+D3NsFDaNRyNuXwAo4jrrL3Os4sR4z99x7eMRN - 3ogFEtgxaFWM865VliZZQh+PHTDQRx6PHTDL10xrP82opjdJXRz1B7hRL/+U4bOlvqp2306r7pJMafqy - kDpoOQ9xJdJoV5X7aHPc7YilrUPb9naFkGYYjybWQNiZp89pfur7JynHbil8cdRxRqsQccCRmuPaOi6c - SLZjNBJ92hniGIv04xjn2S5LKxEWbfDAEdVqNPQRNBv2uJuzaO4oO8KgGIvDmhaAWsaiHWUt/kYhDZUn - bvtosJ8s22FHIheVYBnJWTkXWTWXu90XvtMXaw1eZP3dbqST8YrAIC1r9+67mWRJkuqg5eSuAIGv+yAC - eqLC2xNVR1mdGR2EnYyujEECVkbvFl0POWi1w5FVDoPWWR5ZY5m7vjK+tjJ5XWVgTWXWesrIWspDzz45 - EjtlJop66WWvxdpm7XaRO5I27HOTu5IOPWYndyZBgxPlcCgrte5IP+JGjOHwVgTWKAcyxnH6M7Va1Tjb - 2K7wrRbnphkHzjY2k6ro1ZbGWUbG3CFw1hDjOzzw67vTN3PUJWM0Djd2a9yJWj7Mj1y9ITFjxTVv3yad - w42MtyIA7vcT344AuN9P3KsJwB0/c+chk3Ss7Qbask3GSxUbh/ycU4b3tdEO8DKJd08b6zgrMbw5hL+b - jQOb7uf3nLmmA+XYeDOfDNBxMt6eDhRmY2QDB/a5iZnAgX1uzptU2IBGIWc0mx3M8UUWfZ7fzpezm2a3 - 6qlWmzONi3sJL+erFUXXQ4grur1i6SRnGrMD4UPzHtAcmyyqZa882sRJdCxe1NyzOt3Lxl5cTW5DeCX+ - WC9VWTzKRsxjJggd4HETEHWblxvZU4yq83fkOBrrNZ8HmM+95osA84XX/D7A/N5r/iXA/IvX/CHA/MFn - vuSLL33e3/ne333e+CdfHP/0mTcHvnlz8JoDznnjPedtgHnrNScZ35xkXnPAOSfecxYB5yx85/xzv+cX - oQr2u89D3Ocj7qATPx8787BTHzv3iyD7xYj9fZD9/Yj9lyD7LyP2D0H2D357ULKPpHpQoo+keVCSj6R4 - UIKPpPevIe5f/e7fQty/+d2XIe5Lv/v3EDfUgmg667LZ3K5ukmRVuq1P8zDJsXwyIHbzhXhYRFcBxKmr - eK/eBRcp2T+ggLfrcVRpfawKstqgcbuo4+kDryDsc5cHvrrUW3epOL+4fNzuRfYcyX9E3yfPDQBQrzdK - i2308zxA3xmQKEm6ZbklhxjT7aYJucnL6VOccAMWRR7fi8fo5y+8ED0+5r8M818i/u/JjiWWnGG8+PAr - Nx/aqNdLz4eIAYlCy4cGhxi5+RAxYFE4+RDCx/yXYf5LxE/LhwZnGKNtXTX1E2GmhIWZvqeXaLvZqguo - Xg81RWmSrrWu3l+cjrb3VlD1gMKJI3Mm48w7yrF1eZFh1EjXyjMitnYNnDZRiNnApUH7Kcl5do027UXJ - z202C5kDcxwqAWIxcp3OAUZumuDpEZBPIB6JwMwrEG9E6ArAp2bNnV9J26jBNG4Pko+5ZUP/9Xn6Wy6M - hyJ0h6KnsioI7zcQ3ohQZJH8ESObmyDkpGd0E9ScojiPkjKKk8nr7WiI5VFVOGX2tgEBLlKe0iHAVaWk - jUxtDjCK+JmuU5Dt+hltp39cqiGuJ7vYUj0SsTyPqczJcZ79nSbNhK26jOo9SQsanChq+4Ey26ayCMvT - bT19xzmMByLssjRPokNNd/ekZc3qdB9ty/1G/oWe2R3aslfprnlprh7+ZsSm6dlTdhsb0WDxVDVSFikv - SgdbbhF4h8XoHT7WW2YONcjBuknTY7QvE1mIqJnAafQcV5SlgDBei5CV3SickM0i6l6LMG3ad0kknspj - 3oxgTZ8jAKCmV62RJXOSmmaqkq07AfWnOElIV+A3mVHVQXoaDZRrUzPo5X9TdR2m+YooVsu0HDfygS5E - TconAGuakyR6KatEUIwnxjBty8MrWTVAhiuRDR7OtRqcYUx/HuR9J6hawHDsslrIB458kQZnGtU3kfuy - qB/LfUp4hBzSZ43EPs5zvrvljQiPcf2UVh8Izo4wLDJJqrh4TMkJaoKmU6gVmJoinWy1UNtbpXlcZ89p - /qq+PCDlS4A27P+Kt+UmIwhbwHDk2z3rmTE405gKEdVPcaFnhiVFDQqQGNTbZZGGdZ/leTOxRTZ/SI17 - iPWYa9n6pOyKhQqsGEUmH7noJUumL79sc6axTNo9Vhn5w2FBM/XuGZxjlIVvtIlls+aCfcqQAoyjsia5 - iHRhx921zN61jzs/DOrBIrKTzOHRCNTyz2FRs0i3VVoHBdAVTpxcPGU7taEsM40cHokQGMDj3x/zkMod - UzhxuO1NhwXNnPKi5xzj8fxX9rkarGWWj1rxjuRrCNMiE5tVQuqcY1Rd+/gXoq6FYNclx3UJuBh3Qecc - o0pTokwhoIfRcLVRx0t+AE+MY+LkEDd3lDLPFM2n0KrZWW6es/IoZKtT3rBDKWSLgxBh1GVGLppxDlZ/ - xmEN86F8od21FjAcler38/obNup6uzqn+Q1VrLOmOU2O21QmzZbkHCjMpjpQhzzmanvc8ovsb0baapjp - 62paslDnAOMpvZt/kL0GDdl5pwucrdjGdU3L9SfE9DRDmuTz0jHLV7N7KA7rmOmnCZ7jj+ryp8ymtdoZ - jFI4m6DtpNe6AwS7LjmuS8BFr3UNzjFSa7WecUzkO3pibNNP9i39id5TRksUboUadRc59QDasB+5nfcj - 3nM/chv4R7x1/0IeZn1xxllL9Q2/EGp1vIPawCXfNS+VJjsRfoiwvcii2er2PPq4WEertRJMlQMo4F3c - ruef50uytOMA493H/55frcnCFtN8m03TpVAjkcXkeYsm5dqOW3ERbVKqrsMAX717zxJ2HGi8ZNguTZN6 - Wav+GuVpQbHpnG5sdjsi3wudcm3ke2FggI98L0wONF4ybPq9eIrl/y6aBetez9+/+xCVB8IdAWmfXaTT - 6xuY1uxqUkzZzJDZ5qr/lhZq4tDkEhPjhwiJevivrtQn4tfz1dVycb9e3N1O9cO0ZeeVnYmv7BwOfr3n - ak8kZL27u5nPbunOlgOM89uHr/PlbD2/JksHFPB2yw8s/nd+vV5MX7kA4/EIzFQ2aMC+mH1gmnsSstJq - 1AStUfsjtw83N2SdggAXrXZOsNp5OHC1nrOfLh0G3Pfy7+vZxxt6zupJn5V50hYPRFjN//kwv72aR7Pb - b2S9DoPuNVO7RozrX8+ZKdGTkJVTICClwPrbPcMlIcD1cLv4c75cscsUi4cirK9YF99xoPHTJfd0exTw - /rlYLfjPgUFb9of1Fwmuv8lC7dNdV0mTAkACLMYf82+La569QS3vsS7v2411/pg+89wlTevH2WpxFV3d - 3crkmsnyg5QaDmy6r+bL9eLT4krW0vd3N4urxZxkB3DLv7yJrherdXR/Rz1zCzW9118OcRXvBUV4YmBT - RJjCZnOWcbGU9d3d8hv94bBQ27u6v5l9W8//WtOcPeb4usQl6joKs5GWogJQy7ua8R4pA/Q4yTfehn3u - 6QtRQ6xrPm7ybMtIiBPnGKP7h4+yJCP6OgqzMZJUI1ErOTEH0HWuFp+pNok4HkYxdIJM1/yKcVY9ZLvu - VYS0JuwvYHOOkfUQ6hxupOYXm/WYaXnGQm0v42HpIcRFv3T0SRkOUS8ae07m14v72XL9jVqg65xl/Gs9 - v72eX6vWU/Swmn2meR3atHPWQkzQtRDtIyuu0mq7LFarB0kw61+XNu238/XqanY/j1b3f8yuKGaTxK0L - rnRhOe/WC9mAnH8i+U6Q6bpbf5kvqbe9h0zX/R9Xq+krTw0EZKE+3gMF2mgPdg+5rt+ont8AB+fifoOv - 7ZJfGQC4309PxEtPrdAcVwM7fzalkupzkvUmPupnpZCrGI/DSCnHAEVhnT9yxpxzdM/qVJ9E9/Pl4u6a - prRgy636xd/I2aKnINs/H2Y3POOJtKzLu7++NZ359q419eyK+DoFlUCx2rOh61vOMpIbZVCLjNccw9pi - rIYY0grjtbyxdndAQesrY9nFq6dk5XR2kZ7ukjuKsMRHEZYhowhL/yjCMmAUYekdRVgyRxGW6CiCfoST - DDrrMdMTQUMdb3S/WkWykzL7uiJqNRKwksuiJTKasmSPpiw9oylL7mjKEh9NWf0lG/kUVwMADtpIfIeY - noeVbNE3XQSKaqBMm1p9n+JRv3cN0ezm892S6mkpzLbi6VaQb71eLj4+rOd05YmErA9/0X0PfwGmpkXB - 0Z1AyClbKHSfhCDX8oauWt7AJnL/wQARJ7H80DnESCs7NAzwsRqbJumzrvha6GmhjjH0EOKK5rfr5TeW - sUUBL70S0jDAR9hDTGdgEy+Hn0DEycnhHYcYGTm8xUDfn3d/0CZQ6RxgJL4mODGA6c8ZvfSSDGDi3AM4 - /Rlpb6S7iKNmTZp9Ov2jDQMaXOk2+vyp+/yZsO+MhcG+ZJNzfBKDfbs0T/fd9uOv9fQti30OX6T9MeeH - kLDPLX5UfLeEfe66DE2fkwGO8liVx0Mk/5xN3zkT430RKOs9wLTP3iwWdaymr8jmUcBx1BlEhypVH1ly - gug8HIGZQ9G8qSYiq7UWmNKG9Znr7RNfLWHcHZDMGu7xN33tsEvQHU4k+TDUau/PbZmk6vu/PK7UKjbU - hxjTOPFEtj/kzea40c9oW5ZVkhVxTb3ziAWLFliCIxZ/NGZpCDqwSAElImDwR3lklluwxB+LUQI7vD+C - eIurEWNX06wowrySlkXNIopVSa3uXP3KjGA4PJHKIiStNAEW41BmRd2s5cYLMfD+CPx8NfD+CCpLyKc2 - 7MaAKm9cEaU/jnEeEK4zGFHinfqvbq2wuCDHAHkoQvutON3ccpBRJtwpLF2rwaab2vnRGcO0yR6LY1O+ - NwU9wWeRiLWtgVnaFjW8AZW1t4ZWTZ9jnUYvt7NPFKeGGb620qR1J3sGMFHzu0YBNlbzw9vmaA8W6SNZ - KBnIJMtptfRutI/Fd7pTpwE7+SHXMch33NBlxw1gUs2sJv+TfT2JWFl3G2z1qZaT/iDJgoWsRx2jkcjl - CS4xYzXtqCJ9oahPjGF6isWTSrmmnREd3l/+Ev3cq1WC4w/nF5EQL8coqeJd/e43QqjpUt+5fLg4R7Bf - +efikYLn0vXJ7Gvgp4lf6D0H69z5aeEXGufAHBRBx0L6Ro08jbbZQLC68IibPACAKYw4h+/pK7U90zOm - qWmxNtXUsVBpVaVCpJR6GDEAUZr1z6jlkY16vdSxKJAfi0C7n7DAH4Oe2zHFSJxmfCkoTGOYEiU84dDR - sFOvi9hK0THQV58ewKE2FAw/pAHiMVodJmg62/vPSBUDNJxqzbqyaS42rUXyowzyRoTuTtM6AgMEuZpG - PXWTBQSH/KzOgcOiZvqSiqgAipEVz++CYlgCMIYg7S7igJDTXMeWrjZ5KAKtczZAkKtdQZGuaznISH6s - DQ40kjplAwS5GEWZRSLWkFuOrDGK/EBlbH6pgarMuO04oYh33VAeJZDNmuZ2fDD8Ifd5PBHfJCmnGfWz - aN9m/X3x4dcofv550a9kSegloQokDnWdYhBG3KQiyOQQo2x/hJ2xLvDEUCs5BsU4CZAYbcOH1EyA6DE7 - uX/okXhjJaVs24bEaQVIjFMe/sAK0NMj9t+C7NjzFZSTgFyUXHz4cP4744WADbpOeqfcBgenWubtsRks - kaXQVJ8BQa5m4Ti6rcEgn9odlK5TFGQTQqTv6boGs3zyfGtyyp0gyEVPuQGDfOSU6ynIRk+5ATN9zagZ - MeFODGAiJ9tAATZqovUQ4CIn2UANtuwiDlhxEaYtO2/FQQAFvMS19WwOMNLWw7MwwEdbL8jCdN+Wu3Yl - gAJeckpu0ZRMgnJUMpKjEn46JL50SJhreLokZKWt4WlzgJHzRCW+JyoJWsMT4/EIzFRG1vDsj5PX8HRJ - yEp9OhLf00Fdw9OAABe1zEqwMivhr+EJwoCbvIanS/qszJNG1/Dsf8FZwxOEQfeaqV0jRvIani4JWTkF - AlIKUNbwNCDAxVzDE+OhCLQ1PG0ONFLX8ARQwMtawxOmLXvIGp6oAItBWsMTQE0ve7VNEDbdAattIrjl - 5622CaCml7raps7AJsrXYjZnGXmrbQKo7SWvtmlhjo+42pdJYTbSF6kAank562Q4oMdJvvH4Ohnu4ekf - DkKsa6auk2FzjpH4aa5JYTZGkoLrQ1jHyIkJrQ9xOkT4YFVDHA+jGHJX21R/Jq+2aUC2i77aps05RtZD - CK+2aR+h5hd8tU3nKC3PoKtttgcZDwuw2qbxZ/qlo08KZ7VNm7OMjNU2bc4yslfbhGnTzllt0+Zw44qr - tNou/NU2Ydq081bbdEncuuBKF5aTutqmAZku8mqbBmS6aKttDgRkoT7e0Gqb2t9pDzaw2ubpz79RPb8B - Ds7F/QZfm7ae5aLYlRwzoBiPQ09Q1+CNEnglo1cRdgWjZ19kSegVdIrxOGFX0hqAKLyVUBF81M9KLd9K - qNiPGKnlWQl1+A3r/JEz5pyje1bMlVBB2HKTV0I1KchGXQnVJS1r6EqoXgkUi7YSqs1ZRnKDGWot85rK - WDuZ1UhGWsi8XhHWJwqoNnw1Bruy8NQTnIEIZBRiyR3hWeIjPMuQEZ6lf4RnGTDCs/SO8CyZIzxLdISH - uxIqxHrM9EQAV0LtDjJWQnVJwEoui5bISNeSPdK19Ix0LbkjXUt8pIu0EmoPAA7a+wxnJVT1R/pKqCZl - 2igroZ5+7xpoK6GaFGZb8XQryEddCdUlIev0pUt1BjBRV0J1QMhJWAnVgCDX8oauWt7AJnL/AVkJ1ThE - LD/glVCNI7SyA1wJtT/AamxiK6G6x1Z8LfS0UMd/gJVQjT/TVkIFUMBLr4TAlVD7A4SVUHUGNvFyuLsS - qnGIk8OdlVCNI4wcbq+Eqh0grYRqc4CR+ArHXQm1/ythJVSdAUycewCnPyPt/39rZ9DjugkE4Hv/SW/P - 2bdqz1WPlSp1q14RsUlixbFZwHnZ/fVliGN78ODnIXuLYr5vHBsIGAzxdTdqqnXcnjVAFaG0F+51pndA - aW+mM/J1MMjEb+QjbO6z+TMq7dqMysVBwZz4lhAQMdjzE21yfqJ9Zg6gXZ8D6PLmK7rUfMVr/lzg69pc - 4GvmONg1OQ52zR0Hu6bGwc5/dKZujz6177y8vRv374/NNRTFrpv/Uu0zco/P/H9r1cJhJW3XvjlI/ad0 - cnOABJ+K8J9s+u1v8lLsuplzbWh88jfqqprwzl3bVZtfp8NUbPMfc3QjNvOdRKUatX0VthHAjk42/nTN - kaN5MMh0MIpzLpAc8XVrGYtkjgByMFaQuqfGdH8RtVPbJ8DMGWQyypcEdeVcjwdCesR5+79rhCGfdQbe - cmOoBmKyXKrvYt905VlUvpzD67Vq86odFDs3vw5Hpb1k2Wl+itDdt6DltlcibPLpc2mLHdx/I13dtVbI - slTaScbrt2uORSR4tfO4vYrD1MKm90qotjQfmrckagLH/t/Evm8r3nV4MLFJS2OVOCnJyA1LElt/D+df - qXD+HCkCZ87L3nVn1Qp10998PvQ19mbrEk15y6ZWrQt3lL9UzAZVKq7PPpA/WRVR2pCKUlvbK/Mlv45U - peIanz/ywgCZstr62OZZgUxZ+/aJvDXAtLvIz7WFWPV+Wa4tOLm2eDrXFhtybRHWuPTtmc4IfyrON4Bz - Q0WaVLwvKyUFp5QU2aWkWCklRXYpKVZKSfFMKSmIUtL5f/4PUcrypO5t8YrRR6LplJ3Ril6ACadVLkvp - ubRRXKTWnMye4BcRQsMt4zKMHG1kdA0ibOGDjlhY0ZrvnKO0N+OXjxxtvHCWSlyAyPkh/nnn7PoyQyYP - LNwH9dzZF7Sw4tS+PxwUPDnwzUlo9m4utj83zaLm7Fpl6F2r4Gv/UcKyF8wWJIHSXn2fWCGc/5HW/8ZL - ToSFhI4FNakw8kdOiAebMn+qPOunwkb2ejgIQq5PUXzbfRdH6U7KvIaVuRhSgqbssK5VnvlBUtbW38Od - UVWmGuGU3x/bQaJMP8Ipvy2lc/kXHeGk/93kqgdyslrf7c95oh9zhDHniT4Jz9wnWWQ/mCFh5IYFsJ6w - Uzjyw3rdT/gpfOb3XyulWTvLzJnIxHnqOgKEQ2hn2B6AsKvXHEmvEX1gtJKH5JhnNFeG5IjnPfUdAeyw - wnbGKc4PGRlkYjTo7qljWrR90/AUAcGe7TtQ3FMjWnec/OBTxzT3nj4Q0uN7VBkqT2Fbv/2h9ZAc8Ywe - 0D11TIc2+6FvS55mxLDvVB9Y5wPpsaFjlRlIjvgrjHYxBCE9MnDWYB6ST7yDWxx6wtv3l5kzk+n6+FPk - jzsTKPbmjDvHXNr4lqt8SzsZhY1AZ94XIaHlXG+uUScCWxrHMTQO0fuyay2DD+mRofQdUI4hpMcG08D6 - wBVjuytMLWyM2n0iFhYTRq2ZojsUuyqeBd9h3yjx7S3/NUMyMsikbk6ce4bmDiCH/++wJ2Ud84TmGPLV - lWZofGpMt4eOg/vkEX+q97AaZvvBOo0ZhnxQQHsrj5ycPDLI1MoLbEDRWmckbBrIEMYo9lpRy1fR1JZT - b8yoyFYy2pYjgBxdaTWMyPocwrkHc2zpa7vypMoz1zdgyKfLmqHxqTE93l6hlak7TlWwYLF5eNyblUeW - MOUeHiBniB8kslpmcbWL8mrZ/5mW+M+0t1ZxMm1IPzNoqawo9+VjbH6zKgYXTmdeduOIf+htW6acMMRR - mM9TERS7sq5A4tdDa34IwxlOJGHK/bgqWe4ZPLlvmYuT35Jrkw9HfIlnLJaPIMoFI49h4JG7rcOKgoqj - C13Azg96xw8wsavmlyfML6T5Jez1B4NmGRd8TlP2+24YsHo33z2x62bWJmpJwU9i2AvMSGRudPZzExl1 - +842CKJcrmON3S/AhZM9SHJL7hkwHLElc7+hmJsZ4f2Bqj5CQzuMGsnm2JnanTb3h9IGOsrVt0sOH6y5 - bQk88msD22SEESZrBW/VtKQgigEHS3cLdYPl2TFKeCEo1AzuxvZOKPZC/zvUwP7gSbG8Ebrw+u/Ym0AR - 6MLbdN3Z+m7DWYnK9yGgZ8LUE4ZFlHuHh1EtYezXX/4HGHo/JLOABAA= + UE0asLM2MDFJwKpN6iV7NdZvJk+MAgVuDP5X42Pr5TcL0G6ykupUDGBifXfuW3G//02oEY1im7LEJxhw + 0xtEFdQiEulWPTXD2spqaITZhPO5oMjtCKjxbS49JCCBYrWjS6x+rwGjbvVBF+PZN2nMzunZDaTP2owP + 89UNDvlZPXR0FEs8xZUaQ+MNtpg0amesaurSkJ1X+uHlHlDZdTtPk2OgpmlRVeeAlYE8rmmRWU8E4gEi + ctcbePSvNaDNI44f00h8p83zBHDAz37B6NKw/VhkP+hDtAMJWrXvxfuXMowQkGYsHicHuwY3SsCyrKO7 + xoTsGOPfLSZgpxjvLjHaj/RJXA4Mujl1Dtprf2G0Ll/A1uULva32ArXVXmSRlbIblCZt2rOC+SWgATpO + bSFKolQjHavsMVN1CrE8IkrkM0zytIjjUXLWIIDNOua2nUVUtpDrAio/tQDBQVATwWNyogas8+nSrt0Y + teJNNvBozHiqfXI8JMRxpIEybXm2qeLqlZyZdc4yqs2zhheA1N4UgAP+do5QOwdVkPUGbdr38WO27cdY + +iWxalLuRyV2LLVYaJxHpXxQqJ1+Bzbd3L3J8H3JiN8COd8AFce92SUn3TeXNu2HNCU1bNTxtqG5XTRJ + g1ieqtyqfVqa4cdDKWreBE6PBo7XFlLqtdgpw9E/9RhzOZGfsyRtT5FaYzuw6W4XgpR5vL/qaJdnj081 + 9d2RVwTEbMa78vQ5zclRBhTwts0enlhjTXNFLDQqp5xgboqG7oGm/cB5ogDc9gv7hfu/iHPGEYUZp1te + cpj9R4ngwLZbLRAtI+ftBxU0tcna5vZprVLqdHSTtK2cXZ+wHZ8Cdnvy7vTU/Egdiu8hwBW0b86U3aKa + Y144Z/wCnfE56x6dI/eIs9sUutNUyC5T/h2mml+hbynIISAJEIv8hhvbxYq7gxW+e1XQzlUju1YF7lg1 + ultV+E5VU3apEryZqAKbidrs6dTu/6pG4Kjna7CAmbeflXcvK/UjvcSJoPKGs9kPuktV0I5OI7s5Beyy + 5N1hKWx3pbGdlZrfuy1nWZnLgAE3d4+jkf2NwvfEmbIfTnNMsSurbdoM+jTjGyJ+JKcSKAFi0edcoqs9 + CPI8QgHMI3ybXWym7mATtHvNyM416ud/Jd/Pz6OXsvoeV+WxIKeOzbsR2DMER/aqCd6nZsIeNcH700zY + myZ4X5oJe9Jw9qOB96IJ2YfGvwdN6P4z43vPNEfUR7K0Proe9mdnI7u5MHdyQXdxCd/BZcruLW+wc8uk + XVveYMeWSbu1MHdqQXdp6bdY0ZevpH+/5tEg8Xi3G90Npv8xZKIoKgFjMWfQjO04w99txrfTTPvbMJTG + KXNtHorwlvvYcPawEfQZiAKagSh4c8UENlcsfB+YKXvANMc8pYk2tC2P22Xk6gqUQLF4+R/P+W/zeStl + B5k32j1m8s4xQbvGjOwY0+7zwugZIj3CsJ1npuw68zZ7tUzdp0XbuOJJvUCjztWDeDRCyJwxMXXOmAie + MyYmzBkL3DNkdL8Q3l4h2D4hgXuEjO4Pwt0bBN8XhLknCLofSOheIOP7gDRHuJ9mkQszyAFEou42guw0 + wttlBNth5G12F5m6s0jIriL+HUVEyPxH4Z//KOizDAU0y5DV0oBbGeT6Eagb1Z8Yy/HpHG4kL8LnwKa7 + LtXLYf5MG4g3I/B3kPHtHhO4c8zorjGBO8aM7hYTtFPMyC4x4TvETNkdJnxnmCm7wgTsCOPdDSZ0J5jx + XWBC92IZ34cleA+WCfuvqPkd0VOa56Xqblevp7WOiGFAhxmJMYYMjhq/xLREUMdbBjWBiqRQgOF4vnh/ + GoggD2Y5rGNmKRFXN6LIUhrsYF7frHgX74Cmky6DLKwLdkDTqXYTijbH3U5mSIYZwA3/83l0zk5RF3bd + PClm46awC9vui5BUuPCnwgVTitkCUuHCnwoBaeBNAY4QNgVcO3LlyUUWaWu/T3VaGOqjzHIB0MGbXSSc + 87Qw1Ec5TwAdvLLWv1p+u1/fRR8fPn2aL5uufLs12u5YbKfGGNGMxVProL5BvF7jiZek6aE5MXao3uCJ + oibBF8c8Zwc5CXwxjnu+/rj3mA9H8cRWK9jjFtO/LYBYj5m09CJMG/bVcn0vj79bz6/W6rmR//lpcTPn + 3Nsx1bS4pPvtsUyKRswDPo0ZT82IXNx/6cuI/YH65GMKLI6ao1unvAAti5qPB6b2eMCc8k8JT6pIzMrJ + tC6N2mlZ0wAxJzUDmiRmpRYSNmp4mwULb2df5+ysjBi8URh1M6bwxeHUyZgCicOpiwEasRMfJBPEnIQF + 3h0QcRI+kbQ53Eh92F0YcR/KAz8VTjDmpj3yJog4m3nHIQ+mLsBiEJabckDXGfb4jT153MyB5wta6X9C + XA83a+G5SjxlO/KdaSDXRa05Bmhwza6uZCcsup6vrpaL+zV1q2cE9/qnf6APwl43oeSCac0+X0VXX2dX + k33d8aZhu9lGabGtXqdv/WZhlm+3Ob+4ZCkN0rLWFddqkKY1Scm6DjE96XbDOTUNs3wMF+Qp2fei9NwL + 0Sz13fxA+X4IQF1vF5Dj1VDTeyxeqvhAVQ4UZosOcZJMn1AFwqabc57wWQacI36Gq9vzaHb7jVI+Dojl + +bhYR6u1Or7d7o1ktGHcTaoqABY3PzYf69VceYfjfr7aZ6VUPy6KewlDVADq9YaksoBT+es9O3sYKOql + nrEGok7yrdNJ23p3dzOf3ZLPs8cs3/z24et8OVvPr+lJarG4+ZGYx0wU92ZsrS8dqLfLRHGv4KeC8KVC + XUYfb7nmBrbcn5iZ7BOayz7Pb2W8m8X/zq/XC9kVjJN/kcwAPxKBXjWBhpEo5EcGEozEIN4EFx/xU7M7 + wI9EOFSEKTq4YSQK9fEC+PEIxCmOIxo4HreGc3Gvn5evsNrO/JmZp9BabzH7wE0VE0W9xNTQQdRJTQWD + tK236/ln9Q5of6A5Bw4xEl7r2BxipN8jDUSc1CaExiHGjCfMMB/5bg8cYhTMaxboNaui5yiL0l9/4Yo7 + HPHTmyIGaVlvH25u6JmppyAb8aZ3DGSi3u4TZLnuPv73/Gqt1lMiTPR1SdhKTjuNg43E9Osp2EZNwwGz + fVfred91vL2efyKfKCDwxaAWwzbsc1MLZBv2uek5wqZ99pBE96c3OadYsM9NLWZt2HLfy7+vZx9v5twk + hwQjMYgJ7+IjfmryAzwWISB9vCnDThNPavDTwZsClA9UAdTyrub/fJjfXs05A74Wi5m5VsC45p3mGjnD + Nru1aRMnCc1qwT73Nk/jglhOQwJfDGqT14ZhN7XmQuus0w+EGS02Bxspi4jZHGLk3akEuz/kIgsvyYeX + Cu/YF97DqLvf4Hcfi+/MEIYDjpSnxeP073Bd0mclV9MODdupRTpao3U/0Ae7dNDjjKbvAQyxfnO0O4TI + JQ77mTcNvVtqaV+m8B1qVHvR3y6umd6Oxu2hz56Y9OzZR0Wx2L5FNOWBI8ou+8P60yUnSIciXmpzSONw + I/dBP7GWef3rObcyMFHUS2wT6SDqpKaBQdpW5luiNfqWiPVqCHkfxHwJhL75aX5Ist2OrlMUZKNnHOSN + Eec1EfxuiPVCCHkLxHz1g77vYb3kQd7shLzO8b/DaX6VxdtjWqRVnGd/p4laa4sewXXYkb7dz8mt+RME + uej58URBNmrv5QRBLnKO7CDIJTjnJeDzUuups2Tnlu3hdvHnfLniv/uDBCMxiAWGi4/4qTcN4O0I6ytW + FaFxiJFeURgkZt0fmoX2opqn7nHET88lGog4M965Ztg5knPBwCFGepVikIiVWixoHG7kVC8u7vg/XbKL + CZPFzeRsoJG4lZ4ZdNTy/rlYLQJG2V3c6ycmiA173dRkcWjLTttgWkMsT9v+qGX3Ry13SvKZKOZ9fs+T + Pr93jHVUbii7XFmY5cvqdB8lFxnJdoIQF2UVAwfEnMRhG40DjfSMo3Gg8cg5wSN4dmqjCM4taTnESC43 + dBBxZhcJSyk5xEgtITQOMvIuGrti1uUi16qW72A9Jx2IOTnPSctBxkL+hXfZJxK0cm4ycocPMbE921OQ + TS3jTLcpCrNF2/onz6hIyHoseNfccpCRti6qzVnG/aZbjZL8vswgMWvB1xaAt60UZXr/TSsnNM4yyrb3 + Pquz55Re+Jgo6qU+PgZpW491lJa08fOOAUyMlsmAWb46frygflbTMYBJTN+0WWdsU7o/5M1qjdRba5CY + lXpjdVBzPqy/yOPX36LF7ae7qPtEl3TGqGEsCuF+IfxYBEoaYQIoxh/zb4trZioNLG7mpMyJxK2s1OjR + wftxtlpcRVd3t7KrNVvcrmn5BaZ99umpAbE+MyFFQFhzL+6i+HBoNsnK8pSyYQCAmt5+P6htXeUUqwFa + zjyNq2iXx9O3ELUwyNcu6cq0arDlVkvVNFsiN4eQzCZqeanJ6aai/EvTXW620yEuh4sKkBjtXt6Px7iK + izpNWWEsBxCJuPW2zZnGpDztJUnxDZRpS8sdRSMPN3m1pg/pNboBWa6csE5ND1iOinYXrXKy+0sU5znV + ohjT1MxkIky00hnXNH0h/4EALAey5eBasiKrqR7FuKa9GoRhpNGJg42H6Y1NC3N9an0emV+nT4lyQNfJ + LNMtFPPKck9MX+gbYl0zdQ8Im3OM1Au3rvYp/Zkc96TM3CGmR92ggpSXW8K21OSa78SYJpUNm+3FCloK + 6ZxtrJ/IxWIPAS5KA09jAFOzBBjpcyQAxbzE22GAiDORDYmqfGVpOxYxUx8IA0ScsmPPcyoQcVaEbREd + EHGStgNwSdda0lskGmb6iJndyeeqEthkZXSIs4oo6jnXyGgAapjro7UtWgKwEHbg0BnAdCB7Dq5FlYmb + 446q6jDXJ8rt95Sc6C1l234SPT9tw3G/SSvy86hhoE89UbIOYSg70rQyOj5gn+dQkjKEPNzi1XQMUkZo + CctSV+Rq5cRYJmJH5+D0c6iFu1umU7OOm2fa/W5FcU7VNBDg4ozyGKDtFLTHtQEsxwvvrF6QcxKcslvA + JbcgltvCKbUFucwWQImt9lTZ0yQSsB300lWAZWvThssJe3QbEOCSSd/sOErNAw6MuFVH4EBY6RaEETfb + CzupPXUBjmYI8miGAEYzmr9Re9A9BLgOZNHBtVBHRgQ4MiK6AQli60XDYF9a7lQ//1gVHO1Au/aCMJVC + Z1xTPw5BziEDiVnFId1mcc4TdzDmJndjLNT1csZcBDrm0neYup2wSK/cUYEV46k85kkk+y2clLZh0E3O + GAOG+IivP3QONNIzgsbZxvZOyt9owh6zfAW9JXxiTFOdCkbxO1Cm7ai21yadVUuYlmfqKNezO8L1zEmi + ZziNXhjdnxew/0POUkBeah9d4ouNHoJcnIaxSWrW2+jjzeL2uv1ev3hOCe0WF4W9pOxhcbAxK57jPEso + A5ggjdqZyZB5UoEyomVihu9q/VeUTt8IZCAcC/G2nBDHQ/gMbCAcCy15OsKxiDquqGfTMIbp8/z26mMz + 44CgGiDAJUhp1DOG6evd7bo5YcpEQJuDjcSsYHCwkXY7dQz1qUJG1JRPLVEBHmNXVtG+TI75UXCjaAo4 + Di0z6Bjqi3LVI0+Y2o427PFGRJmIXsqKYtUo05aQLIlDk0+kQ0yP2F5sCoqlAQzHJitojhYwHfIvGcnR + AICDuIWAzQHGQ0y3HWLHtN1sWOc2cLYxSbc0lQRsxxNhNsEJsB15yrqwHrN9+0NGM0nAcDQzzgiK5njX + QFnKX2cAE7E6GSDTRZhmcGt+8d7+m1pmnBDTQ6tsnTp2Wx4LVcC+RH+nVakSTJB0Dm3YZR6nlUYtYDqy + Z4oge7ZpajqfENNzpNxt4/sx+e+0eIqLbZpE+yzP1Yu2uCnkqmwvW/r1a9MBJuin6Mz4P45xzmqgWKRp + /UlJE3m0QROfQuf521XlXjZkivqx3KfVK0llkIb1cUvJKvJokz59H6ruRRqRinOHtcx1VO227z9c/Nod + cP7h/a8kPSRwYhynL8w8EI6F+MSdEMMj6zZa2dEChoM07H5rj7jfqraiLNOILeIBsl1F+hir731oshNl + 20pSo7UFHEdBPBkJ2I5D+XJBkyjCsdCfGI2CbbtYllpqbJGn1XDbT8zgUJ9D/k1VmjSLIgxLntIekuZ4 + 00DatbEHAMc5WXJuWPZxJZ5kbUOaO2Bilk98p7ZoesY0lQmxj9gRkCX6ccymfydqc46RVgt3BGS5aOpE + uqvlICNT6PexmjGwAI9BfL4d1jE3Q6+CesodhdmiTa6mHSc864lG7WXCNZdAzieXMwOEuM5ZsnPMxnou + DRYxB4gR7/6YE3WSgCy8BrQLO25io+CEOB7xoyJqJAFZarrGzXfiuKFqjhvIwsoSPecYGcWVW0odMlpT + ogVMBy1f2nlSZinqlXSI4aEN7ttj+kUhk4fCq+NdA/UJGCDTddxTmzAnBPRQE9jgXOOrbB9TbYoxTLRO + iN0DOcSqxlGNv+hYqPU5SPUhQJt27hiNZzSGtH7c6XjXQJmaNiCmR6THpIyqmPTGVqMwm/o/jynP2bKG + mXiCzpmxTslzLu2fad1KgzON1JZR5baKKnKLqAJaQ8QtcwfCsTCGOnTM8dHGpQQwLiXo41ICGpeitUjs + 1gixJeK0QmgtELv1oVoQ1DToEMNTl5G1jSvB6MKgu9uXjSHuSNvKauoanGE80gYEjvZowJH2Aulov0E6 + 0rLC0c4Lz3F+TIl1b88YJuIwljWG1R+yOxbbOiuL6IlQAoE0ZBdpvqPV4S6qeR8+RV/nX7vFRCYrDcq1 + kV6JaIxreqzKF6pJMbCp3SuI42tJ10ppog+I61Gf5lTP5ETrMNO3T/eUt3w9YVpEXREtLeFY8m1cEzUK + ATyEN8QD4ngK+mUV0HUVeVpQPbn+BeHVx4/NcChlmFhnYFO0Kcuco2tAxEna6NQlEWu5rckrO6MCLEaW + tO9Ja8I3qbgBiXLkJ9ARSSFSl9SAXJc4xNuU6mog13U8/5VqkgjoOe0odajkTz+nd3c9CjBOnjLMOXTt + F+R7LBHQE3ztrgKI8/6C7H1/AXoYaaggwEV/To7Q8yH/yDgnBQGuS7LoErIE39RL/z0l7pWoIaaH8p3j + 6XjLkBE/BDIg2yW2cZVE26csT2g+DTSd8j+y6d+gDwRkoaxPbFKWjbL+Vw8AjrbiUJ366aubgbDppkwy + OR3vGiJyzh8o00ZoX3WHmzyxTa0hpofSLTwdrxtWXfMqrVQvPEmr6TIHhbxZ3a0//BQLyqgXbgCiqFaQ + PAVaK8plTbNa0SnOCtHNunylFCcQbdsPr9RmlE6ZNlqZuXLKzFUzOywuXontfZPDjVGap3vCWl8YD0dQ + OTA0iu0AInFSBk4Vek/IAhEn9/pHrzvK9oc822b0DhHuwCLROis2iViPfO0R8ZIf3h5yXXksalJDz8Bc + X3lQo3TEWV4gPOJmZWPXMBaF1xkfM41F5WUayOFGIvVUewT08Bv2qAKMk6cMc54Crgtyolo91f6Pwdfu + 76l2B1F6qj0CehhpaPdUV9Qp5BoCehjnZPdUuz+TCzCo7ArpqWIGMwqtL7Fy+hIrNUm4+XzcaqKSpLDC + jEPqZazsXsaqXTlGfVxCsfSQ6Tqk6ff2ZOuYdKUGaDrF9+xAUanjLUM9/R3M6XjbQHmXMBCaZb5cLz4t + rmbr+f3dzeJqMaftIIDx/giEPAzSfjvh3RGCa/6vsyvyR+sGBLhICaxDgItysRpjmT5lBeFB6wnLsqAU + TifAciwpi+8NhGV5OFAW19AQzXN3+yn6c3bzQNoh1KQsW/NVfSpo998GEWdedusZssQ9bdnb2W95Nv2t + uIVpvuVNdL1YraP7O/I+JRCLmwmZ0CFxKyUTuKju/Xa/vos+Pnz6NF/KI+5uiEkB4l4/6dQhGrPHeT59 + CyoAxbykMSGHxKz8ZPalcDPKKqtWnvlEY3ZKK8oGMSc7O3hyQrNwiHqZy04J3YBFoa33BbGO+evDev4X + +QUQwCJmUoPdBhGnWu6EtKAdTPvstHdQMI74j0XY+Wu8PwL/GnSBE0M2FL/JGp76KgyCUTcj1+go6j02 + jZxooy5PMAMYDifSaj1bL64CMyosmRCLc8sRiz8aPxNjmknxgq/Pm7PXX5bz2fXiOtoeq4oyGA/juL9Z + LrjbEI0bRHf4IxXHfVpl25BAncIf51BmRU14C4krnDjbzfb84lKtflK9Hqj3xYQxd1oEuDvYde826udz + rt3CMf9lmH/0/IPsqPsplv+LLt5RtSfONbYtEdW2brYUp7eiAYMbpa4C0sSAR9zqn4Txa1zhxNmV1Xf5 + QNRqK+DssSirNNrHyXP0kh3Ssmh+VcvgqTndlLFRjtw9N7UpHO/26ajjfdzuVcLE5BprADEnr1wy4RE3 + Ky9ACiwOLz+b8Ig75Br8+bk7iNUkNVjM3PRTv6evPPeJxuyy6pu+iBeAYl7KaL8Nuk61KcFr235qtxDj + tmE8Jm/Ubi+wtwhrq7xx2xMND2p4wIi8Yk8jMSt5N0YEB/1Nkd4tz5WVBSOEZQCjNKlHWTcbYlGzmqUW + cIttBRinfmp23ZHHEl42wLjrf4rV3FB6v3kAHaeatReLPVHYUa6tbbiR23s95xibYlW8CsrXzwDqepuN + g3aZ2rAyi/Noc6RMIPY4nEh5tqni6pVz33TU8e6b4WWOViNda7onfJNpQI5LlSi80k4jXetxH3HGdnrO + MZYhPaDS3wMqiy21MFOI4zmU+ev5+3cfeO0fi8btjNxksLj5SHtdCdKuXfY7hHy8N+VP1qlbuOOvEka5 + 00KIS63WUmeHPL2k7GDkUbhx0l27JK3sEkTq8Gb5PtJE9DERHjMrttwoEnW8arxIfdwS0joDHWCkt2n5 + CkLLV7xdy1dQWr7ijVq+YnLLV7BbvsLT8m22CEtCzl6jQXtgu1FMaTeKsHajGGs38ppPWMup+3uU7aL4 + Oc7yeJOnPLWhcOLUuTiXJTS1jDxhmm+9jK6XHz/TVmE3KcB2WquYLDyBgJNUh+kQ4FLfIxEmZ5qY5nuK + r1TLnDiwY1CD7Xq+Og1VvZ/q0hnTlG4376nNNptzjEwh4kvSC/UCgSW1WMf8PsD83mMu6PfnxJimgnl+ + BXpuqqwjDNFpCOiJjsX2KaVsywLCrruUDY5DXGU1+VQHUrN+iZpIk13d8a4hOhw3pAS0ONNY7g9H2bwh + +gbKsFGmLnWHG3y/djztdHQM9sm7Ee/TOq0EYbEzVGDFqN9FjySnAlwH9ZpbxPUcqJYD4PhBviKJAJ4q + e+Zc2IkDjOTMr2Ou7wfV9MN2UNvEJgXZyKPAAGp4T0uLD7mYYHZhw02YptcebdLEdUE1xPC0U3lZ12ej + hlfQn0wBPZmC/lQJ6KkSrPwmkPzWdG2a73iIshYyXYT9drvDDZ42abIHdEdzDwVljxud0UyL5fxqfbf8 + tlovqTtrQixunt5VcEncSnkkXVT3ru5vZt/W87/WxDQwOdhIuXadgm2kazYww9dNho9uZ1/n1Gt2WNxM + unaLxK20NLBR0MtMAvTqWReOXDPvcrErbcbBDpQXlyCsuVezaLUglh4a45q6mpgq6zDXR0nAAXE9TQ1K + NTWQ6Wq7KWr16rg+ViSjhZrepAxRu7RjV78QlQpxPM9ple1eiaYWslyycrz+QhI1hGmh5lw317I6dBaH + GHldOtRgRyF16noCsJCv3Gk9nv56IHsOkOUH/brMVmj/V2rnzgYhJ7F7Z3GA8QfZ9cOxkJvcJgb66J08 + gDXNAd08kEbs8u4xHmkAR/zHTZ5t2fqeNu3Eus6p59gdTIAFzbxUdWDQzUpRmzXNglG2CbBsE4xSSYCl + kuA9qQJ7UqnVulunkzrF3fGmgdgt7gnTQm9YAK0KRvdahwbX/Io38mxzuDHaZQfB1Taw4Wa05E0KtpXE + nWcgFjKrWozuVBRmiyqeL6pQo2AawSsm9owcEHb+pHzX7ICQk1ALGRDkIvW6LAzyCVauEUiuqUtu3j6R + tpXYzzIgwEUrEi3M9tFPDDorSm0xELaFc2HuVUWfP3X7QMo2y9P0ncRc0rEWmagPFxe/8MwWjdg//Bpi + 72nQ/neQ/W/Mvrx7uI8IE3d1BjARqmmdAUy0ak+DAFfbTW574GVFtpo45i8rwiq7AAp7ZRNhF2+ZZ93D + mPtYPacqj/DkJ9prp4xtIjjiT9JHTh4ZUMTLvpHofWwfPMLC2S4JWFV/fPMaksyOAYnCzycGDdibFCO9 + iwVQwCtOq7zu8umfucE0YucXJwaN2Jtv3dVHImpLYLUx066s9qxIoMmI+sf8WzfWTOu/WCDiJPW0TM4x + yhueyazU9ENEuq2mL4aGCtwYpBqsIxwLsfY6IY6HM5QNoF4v57Y7PBBBVZpVSU7OAYSdjDErBEf85HEr + mIbszXNIfZYdFjSnxbYprgTD3LOwmTa45ZKYlTwYjeCOPxNReYh/HKmPYM85Rnk/Lwif3ZiUYzsNG7Oq + bliAxuA/Lt6x8+4Y0tDCiYAs7JYMyIMRyJ0nE3Sc7VA1+6RtHPHTB/8RHPOz84fnLUB3BLcV5rCgmVuW + Cm9ZKgLKUuEtSwW7LBWesrRpTTKq2Z4DjfxcYdGwnVvFmvCIO4p36kd5r2VXISti0rjgNJ9zBrQXJwZk + uL7O11/urtvlD7I0T6L69UApYEDeiNBOISJsw6szgKn52ona7rVRyEsam+oZyERYpdqAAFeyyckqyUCm + I/367B4HfdacAQGuZpcUJ7sThwDGVEDcTHVTa3KMFoN8IorVF8Lq8/WafvdNHPbLLnVTiXPkJxYw74/0 + HCYZwERrowHzFfu/ltv6ohlPIPt6ErA2f7/YbjZka0+iVhmXaZUkYBVv91wIynPRtln2hyoVIk3eJDau + Q+LXJf9BsngjQtcEzpKLgrCWugOCTlHL3xKGswUNZ7PP0zHL66x7ainNCRfW3NcXHz6c/67aGIc4mz6g + aGKo7zTcNf1bRVTgxiC9g9QY10R8g2hQum1xP1uuv5Gn0jsg4pw+l9zCEB+ldLY4zXj7eXFLvN4BcTwq + s7avaIl9ZhgH/csQ+xJ3N7s1nJ60tHiUPwliBEjhxKHct55wLFX6KIsatUdhnjclcp7W1FsIOpxIIuye + irF7KkLuqcDu6XIZrWZ/zpt1mon520VNr1raJa2qsqL1yB3SZ93xtTvT2/aRmp8pTg2DfOJVZpw9V6vT + pr29DNrmWTaHG6OC64wK09qsCdv+JChOnbOMx2LLvnwHNt3NuDf1VvUQ4opy9SeOsCF9VvKDBeCuv0h/ + Dkc1y9xRQ7gGM4r8I/sW2qxlVjXLx8UdJ8/ZLGBW/8E1ayxgXs5ur9lqHQbczWodJdtu4qa/2aKO/MgM + FGYjPzQW6vWSHxuIByI0u8ryEmNAvV5eslj8eAReAkESK1Z5UJ3UfVx9J9kHzPJVaupFE5KUrXUON0bb + DVcqUY93d2B7dwfLe+TkuCOY16o0FmXBLpgB3Pbvy2dVqxOW5rI50NgtscYV67jtF7VaQJ9h1kDTKWJO + GgyUZZO1LfVxOjGa6c/7aDafXTf7M8aEXWUcEHESd7iCWMRM6rHYIOJUTZjpK8IDKOKlrCHngB5n9JLV + T1GSVemWsgL4mAeJSOmXWxxiLA8p76QV6HFGj3H9RJhpivBIBJESvkyxQY8zEtu4rpmnrQuQGHX8SPoA + BmARM2UlWwcEnOqVMG0dGwAFvOpLHlnwV0+ckk6HETc3hTUWMBdq9Wlueuiw6f6oPspZl38QpgoYlGm7 + Wtx/mS+bm9ps0Ub7+AUToDG22YH4gDsw7qbXWS6N2ynvyl0U99ZVzvVKFPV2az5S2oSYAI1BmxEEsLiZ + 2EqwUNTbvHo/HGj9JVyBxqG2HCwU9z4zChSIRyPwynBQgMbYlwn37ioU9RJbOiaJW7OEa80S1FpRdi6H + WNQswvO4mJLH1UEhJUDPeyME50dT4o11iJOEX2BqBjBKUP06Urdy7wOe/iEljb+UCbqjI3eSWbKgpQrv + 2Xefe3qzB2rrNH/7lBVxTlhrySUh64JaYfUUZmOdYgdCzgfSric2Zxqv06284x9jkf76C8Woc6BRPaUM + ocIgX3PH6L4Gg3zUuzxQkI1+R3QOMiY35HLBAB2nasFyHhgLBb2MxDxhqI93muBT0/3GukkDaDmzx1TQ + LrohIAs9bw8Y6vvr7hNTKUnUSr0rBglZyVmnpzAb6xThfNP8tKLMYjMozMa83z2KeXlpeSIxK+OxsVjI + zLXixj9pcwQtDjcy75YG427eHRtY3MxNX5027fOCVa9rGOQjp66GQT5qig4UZKOnos5BRka9boCOk1uv + WyjoZSQmXK9rP/BOEyyfu99YNwmr179eB4wAOzDoZozOfvW8Tzz9RhyV1TDUR7xXJglbm73rONIGBJ3d + xnQMaUeCVuq461fs3exX3hvUr9j70+6HfcKw7RPQRRwt/Iq8Fe3+Th7P0znQyHwO0SeQ9MGkiTk+dknh + KSXIY1gnxjGpSdPtl54MpQk7bsY1g1fLuBvunbj/OI8EaU8wk7Jsf1ytLi/u/5h/I9l6yrbNv100P9Js + J8q1sd6XGSDiTGj1ks4hRmo5aoCIs11N5Tvtva9L++yViKMyTg9RHm/SnB/H9OARmwP3j7tzYsGOOUYi + NacUGKlzjERivEnAHGORhIhEnNfE+Qs+jydiv/dCSDLqEiQWsW7WOdwYZQlXGmXYmYo3em7E5OemWfti + 265jot7Sc8MZkgmxHtNi+MA0OKhh80RXSSJLLXU4aVG8Ec+0iIfjJv15eIuYrWkkakhJKCaVhOINSkIx + qSQUb1ASikklodBKsC61A6/MMBGivsHtc3XT44dUA7huQvy3CjweMbj+EeP1TywEcfBbw1BfdL2aMZ0K + xb3tkjlcdUvj9iX/rJfgWW9ikXIq4o6DjJxqAakDKGvraAxs4qxUBuOQX403hQQweSBCt1E42dxxuJE8 + KuTAoFstZMqwKgz1cU+1Z3FzM10opc0KgXggAnGfcJvDjbzk0GHAzeorI/3kpvc5fcc1m0ONjFLwBGJO + ZrmtsZh5yT3bJXa258w0PUfT9Jybpud4mp4HpOm5N03PuWl67kvTOhfq2VCvuWhrSHktcLSoil9Yaxh6 + HL5I9PUMcQUQh9GAANsO9HVxHRKwtg1osrLFUB+v8NVYwLzPZFuteAxpSLgKIA5nPAcey1GDMaF5GXD4 + IvHzsqsA4pyGQ8j2E+hx8vKMQUP25gvndksxulyDcXd7Z7jylsbtze3gyhsYcAturSbwWk0E1GrCW6sJ + bq0m8FpNvEmtJibWas0KesS3aAYIOTk9f6Tf33SCWc9fT4LWvxlX7LyBbP7MSj0k5Yjr/JoY4HsmT2zT + MNTHux8ai5urdKs+M+XKO3zUH3QFusOMxJqhiczN5MzKhOdjnv5KnJKjYa6PPnEKm9PJnCmJzpHkzY7E + 5kUOfyemngFCTnoK4vMr1RJv7Xe9UZxnMak5YbOuOSHPVx8oy6ZWHIlTEZ1fXEbbzTYST3FTS5HkmGRi + rCjbH2TbI6OudjFJOH4Oase8N7jiTuOLt91Hm/yY1mVJmzSKW6ZGiy7fJl506YtYV9HTPj6lBj+i6fFE + fNzu2VEk6zfL5sVziF3xIxFkfjm/CIrRGCZEeR8c5T0W5fcL/n1oWcSsnqjgMsmWTIwVXCb5hOPnEFIm + uZrxeO8vf3mLeJ3GF+8NygjA44nIzZsd6zezywiNH4nALyMMw4Qo74OjQGXE9imW/7t4Fx3K/PX8/bsP + 5CiOAYiSyDNJk/R9WIEBWqZGCyoyRo3AWRTHPOdfq0ED9p/hN+7n6J3rW1A0d48hvrpi+eoK9qWEFRhN + DPaRiyS0xdL+UO5Y5ycxwCerZM79aDHEx7gfLQb7OPejxWAf537ALZf2B879aDHX19WuVF+HIT76/egw + 2Me4Hx0G+xj3A6mt2x8Y96PDTB/jYy/wKy9V2BPvaYe4HmLadwjgoa0w0iGg5z1D9B42cZLpxCFGToJ1 + HGhknqJ7hmpDQVUpU2QnxjQ1m8g2I0ibV9KGlQDrMdPeVluo623Hp3hnrLMeM/2MNRT3lpt/cb0SNb1P + sWgKoKe4Sl7iipQSNmuaT9u8tqGjOH8sq6x+IhW1mAOOxHyZ7d+PVj+A9QrbpS17Qlo8Rx5u8x9o/AeH + b9rlREnDmKZ249aQ+w0boCjMe+3bW3b4mXWfbdY0V9uL6Jd31MJ7oFwbQwV4fqE5rLxHzTdunlHjKRe/ + EB2ScC200R1oHKcdUSJaJOFYPtBGUFoCskT0q+oo06Y696qn30xX3sekjGOzsLl7ZtWr0Srh6A0BHKP9 + 7XSkOB4OZVWnrGiICovbLJjP+AYHNmhR/lrPb6/n1812vQ+r2WfiXlQw7vUTXotCsNdNmZ8G0oP90+J+ + RVqHsAcAR0RYVMCABtfn+e18ObuJ1B55K9JNcknMOv3W2BxmJNwQB4SdlG87bA4xEr4btznEyL09nrvT + Tu0u1cL4t4QOg0fhi/Mc58eAGA2O+HmZDM1j3CzmyWHNBEGWsyERq+gTv+DeP1Phi8O/f8Jz/1YPH9fL + OS976yxupmeOgcStjCyioYP3yx/Xk9clVMeaZJT+PMRFQhF0iOOpq3j6/s86o5m+zq4mG+SxJslZC8rm + ICNhHSgDQlyEKVM2Bxgp2d6AABdl+p8BAS5C9tYZwERa/cikLBtpOt1AWJYFNZUWbgoRp87pjGWiTZjT + EMtDmfvbA5pjuVqpzyjj6U9eT1iWtKBaGsKyPKZFWhHHQhzQcvKHvBDc8nMHWkDYdpf563v5sD6nVU3z + aiDo3B9zhlBSg22xWj3IQ6PrxWrd7WFPKdcQ3Ouf/gyDsNdNKPtgerB/vZ489CIPNThacdcDpoNS2J2O + Nw3rKi7Erqz2FE0PmS5aYTcQuuXDdPyDwVHT84Obnh+I6fnBSc8PnPT8AKfnB3J6fnDTc77+cndN+Txj + IBzLsaB7GmYwNd2Fq7vb1Xo5kw/TKto+pdOX14Vpj51SSoGwxz09owCox0sonSBWM8tfPtGSoCdsS7N2 + F23LQgcEnaStS23ONqotkGkuRUCWaJOVdJOibBvldp4AzTFfr65m9/Nodf+HbNSRbqaLol5CXrZB1Em5 + cIeErYto8+svqlFKGGLFeF+E9utDfoSWxyJwb+LCcw8XzVMhW5eEZinGYxF4mWSB5pEFN4ssfDlEBKaD + GE0HyoeiLolZaR89QqxmvlsvrubyUFpeMyjIRsgBGgOZKHdehwbX3cf/jrYbcUGYr6Ihloc2KKUhlmdP + c+xtnrRY+ECYloR2JYl9FfI/EpVVs0TNZhAUl4Wi3s1riLqjTXvzDoGy750BmS7aFmUDYVkKauZsCdMi + /3Cx3Wwomg5xPXlB1eSFayHM5NIQ1yPIZyOss5FaahJ3iOupf9ZUj0RMjyDfcQHccamlajrE9RDvVYdo + nvv5rTpIfRsb5/kwvUlE27KY3Bkc0bjxNscsV6uGtevECmocC3f9TfEtUqq3wxAfodw1MdhXkWpvlwSs + Mq2zR7KxoQDb4SgLY9leYlz3gLpezlXD1/u4r7M92dVSmE3m4X/xjIpErUm22zG1CnW9T7F4en9BVbaU + a8vi9xfb+BDdU4U9CDjVC5NmecCSbB1Q19v2xFUJIAuAfZkcc3oBAjncSHtZlpVbqrulMBvpLR+AAt50 + n9Af0ZZybUXJLEZ60HXKRiwnITvM9Ym62sYipTTHHRK0MtKxpUBbvo1rhk5hiG/6m3ALA30FPxELXyoW + vGQssHQsCAtQW5jrq8u8fJm+lo+Fab71l/mSOvnMgCAXqW40KMhGKGg0BjIR+vMGpLkOaQE3ESeLUQMe + pf3Yhh2iw3F/O1eX7e9w1/8soxLG4i0M9UXFcc90KnTw3s+/RrPV7bkqoyf3ZAwIcVEG5h0QcL7IHJKS + hQ2F2Vin2JOm9a8P736PFref7sgJaZI+K/V8XRqzs5IDwE3/5rVOBevMTdK0yv+MtvKZ28TT30fanG38 + Lltku5JmaxnLVEZP8qSn10oGZLrUOL+2X71KaIoVwE3/oZINUcrqggZkuqh53s3pzb2+/kJbr9QBIedq + dt9+kPXH9DcNMA3bo/uHj4SlPwEU9nKT4kQC1vlVQFLoMOjmJkRPAla1y9xvZGNDIbZLlu0Ss8nDF382 + n5lQH1DMAUXiJSyeqvxc4M0Dy6BnbTnyrKnfm1l5XPkJht3cVF76nmNVR5KNCkJc0ezhL5ZPgZjzannD + c0oQcy7n/+Q5JQg4ie0HuOVw+iu/ntFhzB30DDgGPAo3v5o47g9JIk8dpH4PqodsARojJIF8dZL6nVcv + 9aTHesm2XvqsgfUU4sEi8hPen+phuWY0zyyDn93lhGc3qB6zBXiMkLuwHCsfWPXaCfQ4WfWbDvvcnHpO + h31uTn2nw6abPNgBjHO0nXJOVWeSoJX7oAA44mdkX5tFzOwEgWu19kdulebSsJ2dHEhN1v5IrsY0DPNd + 8nyXqC8kYS3BhBiUjXO9EjQWvypGJWAsZobx5JaQG+G9B8uw8mQ5Vp5wq1yXRuzs1F56SytqNTtQmI1a + wZokaiVWrSaJWomVqkn6rNHt/H/4ZkVDdmInFRk17/8cUHfj/VTt97BnbqSnahzEfjp8fVXjiKCE8tXr + Id1V2IBHCUombz3P6rJaqM97yfdeer2hCT+h/gcO47UBEJE3ZmhbYFK/XDs0IION5K7QGzV6j5bh5dVy + SnkV1lbw98+NY4LuxnK0VOS1HeA+uvkbrw2B99Kt31ltCbyfbv3OalOM9NSN33ltC9ugRZGP9/lFdP9x + rmabTDYblGOjfcBiQI6LMtVJQxyPemP9XZaZcZFE27SaPhkH450IzdIORGvDOKZurzbCYocOaDo/yFv1 + x/Wni4iydI8DepzR6svsnC1uaNt+2KQXrP3iERz0c3Y1R3DT/1u0ORZJnqoSg5TVDBBxqvyX7bKtfF54 + bl1gx6A+cL8Bz9tvzeNCv/QTBdlUacYznkjMyk9OyABFCYswZlf7C4dFsA12FMq3rgNhW9TMHrVrNuXz + PJdEraSd/iAWM3dPeZrw5D2O+5/TvDzw/R2O+dW94Mpb1m+eFck87BJcjxnR6oCQyyiI90egVQcu7bcT + 5kkjuO3vajqatYNsV5dhaa4Osl2n1bT6h4Cz+vkElR23XWfrDaJ6RE5M1T5U3xITI5ww0Cd4PmH5+pWK + 7+fLxd018QmCaJ+d8vS4rM9MenIAWHN//bi++2N+q45v/4OUJiCt2e9uFlff6IWViYE+QuLqEOiiJKdB + 2bZ/PsxumFdroKiXetUaiDrJV6+TtpW94hSCe/3U1EDXnQJ+JqcKvvZU9/vX2f29IumnrZGYlZPWOop6 + uSfrO1d62mqkZl3e/SWTfb5ctw2CZkX61eKOWIZ5LVOiEZLI45gSiZJwPokdq0tlerJpIOKkJk6PIT5y + EgzcYFzObq8jeWgaT24HaYjlIYwYno63DM2nOCRHQ0CW6CWrn1SITK0ypzZeInQzRzRWPOIyDzpjmdJH + WgrK421DEW/yNNqV1ffoWIh4l0ab426XUhbUGxVZMXeZPJCyFL1JWbZ2AKJIon1aP5W09LBYy9x8vq/C + kpw9ZdkO5fQN53rAdoj0mJSMbK+DllOkKS3RFOA4+PdAeO+BqOP6SLvWFtE8V5NX15WHGlxzcoQ+n4Zo + Hv3FHmVdLQc0nae3eFSlzhnG/43O3138ohaqUKv/R/HzzwuCF6ANe3S/WkX3s+XsK619C6Cod3qd6YCo + k1BvuqRpVR9kH75vxXl0qORff1K8NmuaN9n0N1Kn4y1DnhVqh6Zo+vfgFmb6mkV1ZTl4IJ3XQEE2ypOo + Q6aLONalIbZnFx/zmlrmOaRpJY6eaYjp2eXxIynpG8ByEB9T99nU19knbIUAoB4vNZM5sO2u30Xbqo5o + 87YAFPAmZF0CWfaHc7pIQqDrB8f1A3KlZFEKWHbxti4resJ3HGDMfuwPZJ2CABexEDoxgKkgewrAQr8w + 6Kp+kC0/HIt8Smm9JhMDfbIOjWQNQy06TNY0ZyIqD/GPIymz9pDpCth/F8ERP3m7EJg27cSmjdOeUQlM + r/0GyrR1W0Q2LZ1mQkp0N5vfR/vHHal88mjG4qm2W3i4k2UsWvP2MjBW65gU6eINIl3gkYqySLkRFAub + 2ybcG+QGUDQek3+PXMvEaBdvEs25U8ydo0EYdLNKKHw/o+ZXynaIPeA4mtNmtPotFPYy2usWCnubtmlV + 7omDPagBj1KXYTHq0hehpu5kA8KWu80vnFtqkKCVc0MNErQG3E5IgMZg3UwXN/2C3yMSvh6RYLb2Bdra + F4wWugBb6ILXnhVYe5YyB+50vGuIDkKQ60ADBJxV/ELWScY2/Z3SLH9bdf7xQNlhaiBMC20HjIGALAHN + QlAAxuDcUQsFvcS7OlCDjTIr25yDrf5F20ptICwLZTO1HrAc5O3UTMqy0TZU0xDDc3HxC0Ehj7Zpcvr2 + jGMipvEJcTzklBkg0/XhV4rkw682TU+bE+OYqGnTIY6HkwcNDjd+zMvtd8H1trRjp9/LHjJc7y8p+Vwe + bdPke9kzjol4L0+I4yGnzQAZrg/nFwSJPNqmI9qT0hGQhZzKBgcaiamtY6CPnOom6Dg5VwxfLeNKwavk + lBEG5xhZaeak1+L+y2z1JSLUWD2hWe5nf8wvyPuZWxjoIwxkmpRj698N7cUjUamjjletTZuq5hpZq5Ga + lTQFy5591f6buvy3SWm2v27n6wVtTrjOuCbCw9QTroWSKQbE8jTjk1kSLW7X88/zJUlosYg5FluWVXKI + 8ZiX0ydvuaRtJd9X6K4272S46WiyiJmcjgOHGBnpqJO2lZir3TxNztFmfl4vH1brqP3a4OpmMb9tbzth + tAQ3eKNs0sesiDIhjnGxTQOCmaIJMas0SfcHyn7DE1TeuPLvmXh6i4u1TFOivsnlOi5/ZELhgOBePyHL + w7TXrkbrRFUFPgOaBY62WK0e5suQp800eKNw74iGe/0qQ4YEaHhvBOY9H2ivXWXsdB8QoBV4Y6gcsU/r + WA0DB95yWzUaNyA/uxY4Wrv3df+W5nR6nJCICo6b/jykVbZPizp6fseJZgjGY5yHxjiHY3AfUfzZ1Ke0 + ccw6D0dgPpTG0/iwmi/bjZhJSWBhoG9648qAQBfhUk1Ks60/XarG4OQmaQ9YjsOR6FDA4Pjr4sOH88kr + LbVH27TKE4c4q2iWE+XYureNzbvM7rEnmgGDFuXDu9//fK++2lKLdrTTSyibzGI8GEGthxQSweDBCIRv + pEwKs0VxnsWC52xZ1Jxn0xfQAFDUy03d0ZRtf43E9xC5xEE/8SsvlwStyUXGMEoKtFFKYQsDfbIAY+gk + hdkoix26JGjNLjhGSYE2bt7E82WbqXjX3bOgmTSdyuZwY7Q7cKUSBb3PzZzYgqHtSMfa7WApawyRbik9 + ZIx3IsgC4ZyRuU4Y5FOfshVJXKkvquq0UMOugq6HLGA0mXbHlOFvONwYbcoy52obeMQdkZ9Ah/dEoD8z + BusxH7dPccV2N7RjbwoARrHec45xyDSsAsTGHb8qq+m1WkeBNt4TrpGwtaZ8E+2AoJP9fJiwx02/YQbr + mNsJu4yW3gA6zi7VOdlWRwFvHW3rn2RlQ4E2Tm3fc66xyRisyx5I0xrNbj7fLSkfwpoUZKNsPW1SoC05 + cmzJEbZRE0/DQB9l/S0LA32cG4HdB8K4hEmBNsG7UoFdaTNQmfCMErSd6/Vy8fFhPY9WpFdnIIy6t+Wx + 4KobFjeT1jAG4RF3tHmNbhfXQSE6x4RIdx//OziSdEyIVP+sgyNJBxqJXP7oJGqll0MGinrbr20Jg+sY + 749Qbv4la9KQGK3BH4WyoTPGoxHYZYSnfCCXuDqJWmWBdx5yT3veHyHonmoGK0qzMtbs4S96ljdIzEq8 + jRqHGak3UQcxJ7knZKG2d3H7iZGeJwqyNT2P7LGI62PF0Bo45Kfep5aBTOT700GQq2lLlEm2y9KELtVp + 2768oa8d7JKYlZqaA4cZyamqgYDz63z9hbjuK8TiZs75DijgjZPkXVSlz+V3alawYNh9rkY2qON9Dgy7 + 1a8creIAY/txsDhmdboha3UYchP7hh0DmJI0T9VHsYxLH1DIm+12dKOEQBdlkXgLg3xHeuq5rVD1V9aD + iTyRTVtLtqLVkv5kpw573CKtsjhn21sc8+exqGkT3zEei1DIvBYSYeCxCMy628Fhf7Sc/3n3x/yaIz+x + iJnzAHccbuR0dl3c76d2cV3c799WWZ1teZnedngi0cc0HNpjJ47U2yxibuYEVixxiyLesIJgtBxolrGh + 9+QcGrGHFTKjZcxQRlDfNsMGJArxKxOIBcyMBjPYVt7H9faJrGoowMZpxMKtV0YH80RhNuJ7egMEnKqz + xFsC0aNA4rQPOWnNYIxHIgSUFGKspBBBJYUYKSlEWEkhxkoKEfAMC+8zTFkSw4AQF/VlnwFCzpLR/lUQ + 4KItbmFhgI+2zIWFWb5+hXvye0ODxKwB7ysQx4RI1MYc4kAjUXtuBolayb04bM8F68dmGzhO8xNWeOOQ + CzkX9/oZw9qQAI3BfQR8TwC1XYDsOWH9JsLvqphyV0XYXRVjd1WE3lWB3VXeiC02WssaV0XGVG/u7v54 + uFelDHk+ts2iZvm3x7SityRBAxqla1sxBnQQBxpJHOmZxKFh+7auWOeuONhI2TfC5hAjNR9rHGx8ioVs + VmYVx3piYTNlQ1ybg43U527AYJ94OtZJ+VJwpCfWMjdzhOe36+ViTm5JWSxm/hbQmMIkU2JRm1OYZEos + 6gQQTILHojbeTBT3kp9Qi8XNrIYVwPsjMCph0IBHydh23zNBLRtMFPeKlH26Iq293qC7KUbvpgi+m8J7 + N9VSHMvb2Q3rhmow5G5eZBZ19Uo396jXyy48bcNoFFaxaRtGo7AKTNsARaG+3D1BkOv0jpZ3Y3UatNNf + zGocaOTUEUjt0KYz/cWMDUNuXp2D1TbtdEHiqxiDRKzcG9+jmLfZ4IH9RNuG0SisJ9o2YFFq5ptOSDAW + g30hNfq+szlE9QvoYkVhtqjME55RkZCVU2nBdRWr5YG0OcoizbOC8TB3IOSkd/4HDPURNnJySZ+V+obK + hiE3qw3ntt5kbp9ftV8+q2/lalkm0QZtIAEcoylJ1R84/h5G3fRZ2BYLm7PkJ3eMBjTAUaq0rrL0OQ0M + BWhG4tHfE4MGOEr7lofRQAB4K0Kziz25jdBTkI1a5p0g29VuL3x7d80pphzatj985F35wMFG4hIHGob6 + 3rWbIzC1HQ3bM9bJZsi5ku98j8E+wUtLgaWlCEpLgafl8v5uNaeuxaJziJGxRojNImbyd4w66HHS52A4 + tM8uwvTC729eNSRcfUv77UHn3ws8Meh1hEN77AGJ402ZujoK/lk3NGKnFyE9ZxnVWky894UGiVmJJbHG + YUZqaayDgLP5LCGu64os7UmfldOvhQRjMaj9WkgwFoM64AYJ4BjMhV4AfNRPnvQJK4A47ScjjM3mcAMQ + pRsSZOVYjYXM9MHEAYN8xBq+YwBTn/Ssm2fQgJ1V8CFlXsA3DC4O+8+jdB9nOcfdobCXl6VOoMfJLQIt + fiQCpwC0eF8EegPExRG/kT8FK4apGIsTGAPzH44bTqE3oIiXP18fNGBR2vEQekMfEiAxOPOJLRYwM5pY + YOuK07CC21T0cY2ewmzUwVcdRJ27A9O5g2opEf4siynPsuA/a8L3rInQp0CMPwUi4CkQ3qeAPKv+BCEu + 8qx6HQScdUkf3NY4wMiYCz9gjq/5tpH/hTckwGOQv5a0WMTM/JbaxTE/uUXbc4iR0fYcQMTZNCLVR/zb + WC0Sd039PMbj8UVsZ7HeHvebtOLH0y14NPYthr+4tX7lNVghxXgcerMVUozHYU2Y93hGInKay4BhJAr1 + q1yARyJkvJPPsDOmt616DjGq2vANHnJX44kX/IjbEivWavGZXiKeIMBFvIstAniod69jbNP6bjlvduDj + vP9waNROT0EDRb1N+UxeHAPgRyI8xVkRFEIJRmIcq0rtVLIlfv6Aa6bFY3zw7zX5o9JfCUKC0RhNChAb + y6hlJFqZZ9vXqObncFvjjyfqsgqK1Aj8MWQ1p170EFdrwiS+WOehz9b5+LN1HpzHzyfk7dALGb+O4dkO + KvAMjTdeWlVlQKq1/HgE2ck51E+hcVqLP9pP+lx/0DAWRVa07SzTsFC9ZiTeQRYdWd0VIUEhDRMalfxJ + mYmiXnKbRidR6+FYHUqh1lB/ks087olbFjRaM3VFVr6CGafn/RFC6lExXo82HyPzS5kT7vcHlJditLzU + FjQJiNEZRqLwS6+e90YIKYfFaDksgktGMaFkVMfs8vgx4LloeW+E7ikNiNEZvFHqbB8SQuF+P3mODsB7 + I7QDrtF2ExCld6CRuvaf2vVm+50ZyXCgkf5Oq5IZQKGgV43rMsvAE4p7WZ28jkSteVl+Z3XhBxh0M3vv + aM9dW6WcUxzoOO7n1pAjvcy2yyHvLfPMO9jj5rUdehYzc+fpQwI0hro2ZubWcdzfzEYKCHDiRyI03b0k + KEirGIkzDHMGxRo0eDz2+J5Go/Z2SSLuXelor53dhTcFaIy2+At5sg3FaBz2U64b0CiM97A2POLmtR0e + R9sNeRmruqjNzZwkMgVgDF4/E+tjNt0pWYNmKmCcBw2eoS4s8jm7nhtgzB1Smoux0lwEluZitDQX4aW5 + mFKai7cpzcXU0lwEleZipDTXFwI9xPWTYMYwHJ5IvL6zv98c0tf09zNFUF0nRuo6EVrXifG6ToTXdWJK + XSeC6zoxoa4L6/OP9fdD+uL+frgIqaOFv44O7d+P9+0ZK6jqoOVcLx9W5N3VBwq0ccpHgwSt5C/5Bgz1 + 0ac1WixmZnxhZ7GomT6TxmJRM73UtljUTH+OLRY0U7956ynMxhqzdmjL/ueMsSvJCQJcxJcof0LrS6k/ + UtvhHWOb5svFp2/R/Ww5+9ruFsR4EYZJRmPV8Ya4uiTiGIl0Hj2VxAwMK3xxVOFXMR5CTOKLRc+QNu2z + k4tqhx6z0wtuWDEa55Cm1RvEOmlG4jEKd1gxFofe9IcVY3ECczNWsxgHcV4tQwJfDMbgPsD7IpCLYwv2 + udVoA1+u6DE74xNExDEaKawk7hWjcbJDYJTsMCFGFIttcBwlGY0VVor1itE4TdWdpSIw1kkzEi+0JBNT + SjIRXpKJKSWZOkjlzTeI1WvG4nE68JhkLBb51T1oGI1C7mzACl+cptHI6ujiGise+8srzxdXzU9V2nyQ + x1gW18Uhf5N4bL1Ou3bydz7w92HNfgH0ZuqAgT5yNTtglq+ZXcXfr9TFQT9jJEkHHacKF38nDnsMGOjb + xgzbNgZd9DaKxoFGcltkwEAfsc1xghAXuW2hg7CT/i7H8wYnbH2UsbVRut8Z1ZtBglZ6FaNxtpG4uLS7 + rrT8Sz+tnFzF2jDgZjkBF/NrXPQrXMb6NODaNNSveN2vd5sSgj6oMmCWT/5Xou0HE8t/MfaVQS1INM4E + JYu1zdQUAdKiGT9hLlVisZC5KOvZria+8DNIxPox3VG/FTJRyNuu1RBtslrUjFM2cMjPW6nIu0pR82O9 + EeqAOH+kiwfWNXMGHtB1j5ofyq040HWKcm2Rtqwm1amzgLmZ3pEVu5Ls7UnAepo30BwTV2lMtjuGsSjU + bZcgwYQYUVo8B8dRkrFY5P2uQMOUKOGXdLJ4op3aVyG3SXMAkThfP+BfgwV9Azby5RdnnQl4fYmAdSW8 + 60kErCPhXT8idN2I8fUi+OtE+NaH4K4Lga8H0S98lqSJ6nRERxE/phy5pcDiNAs/0QcEAR6IwN1P+tG7 + l7T6lZ80vhThNtY8bTV+U83XUuOsx4Wue/cYstLGo3+FjbD19MbW0gtaR29kDT3u+nn42nnylz07i+09 + eWzPz2R7PJftVRc7ipN/0Zw9ZvmcXiJ5ZAI0jEYhb5QDK+A4Kt9wr+PEeszcc+/hETd5yx9IYMegVa/O + e3FZPmUJfex8wEAfeex8wCxf8wnCafY7vTnu4qg/wI16+acMny11WoE7k0B1bWVK05fw1EHLeYgrkUa7 + qtxHm+NuRyxtHdq2t6u5NEOuNLEGws48fU7z0zhNknLslsIXR/3OaBEjDjhS87u25g4nku0YjUSfIog4 + xiL9OMZ5tstkdR8WbfDAEdXKQfTRThv2uJuzaO4oO8KgGIvDmsKBWsaiHWUt/kYhDZUnbvtosJ8s22FH + IheVYBnJWeUYWeGYu7Ecvqcca71kZK3kblSa8TrHIC1rN0+hmRBLkuqg5eSu1oGv0SECeuHC2wsX3P6y + wPvLgt1fFp7+MnP9anTt6qCVKUdWpAxaE3tkPWzuWtj4OtjkNbCB9a9Za18j614PYwXJkdgpM1HUSy97 + LdY2a7eL3JG0YZ+b3JV06DE7uTMJGpwoh0NZqTVi+tFGYgyHtyKwRjmQMY7Tn6nVqsbZxnY1drWQOs04 + cLaxmQBHr7Y0zjIy5nmBM7wY30yCX0qevm+kLu+jcbixW49Q1PJhfuTqDYkZK655O4TpHG5kvBECcL+f + +GYIwP1+4q5gAO74mXtcmaRjbbdql20yXqrYOOTnnDK8g5L2Ay+TeHdPsn5nJYY3h/D3TXJg0/38njMv + eKAcG2+WmgE6Tsab44HCbIxs4MA+NzETOLDPzXmLDBvQKOSMZrODOb7Ios/z2/lydtPsiz7VanOmcXEv + 4eV8taLoeghxRbdXLJ3kTGN2ICwK0AOaY5NFteyVR5s4iY7Fi5onWKd72diLq8ltCK/EH+ulKotH2Yh5 + zAShAzxuAqJu83Ije4pRdf6OHEdjvebzAPO513wRYL7wmt8HmN97zb8EmH/xmj8EmD/4zJd88aXP+zvf + +7vPG//ki+OfPvPmwDdvDl5zwDlvvOe8DTBvveYk45uTzGsOOOfEe84i4JyF75x/7vf8IlTBfvd5iPt8 + xB104udjZx526mPnfhFkvxixvw+yvx+x/xJk/2XE/iHI/sFvD0r2kVQPSvSRNA9K8pEUD0rwkfT+NcT9 + q9/9W4j7N7/7MsR96Xf/HuKGWhBNZ102m9uVaJKsSrf1aQ4qOZZPBsRuvuYPi+gqgDh1Fe/Vu+AiJfsH + FPB2PY4qrY9VQVYbNG4XdTx94BWEfe7ywFeXeusuFecXl4/bvcieI/mP6PvkuQEA6vVGabGNfp4H6DsD + EiVJtyy35BBjut00ITd5OX2KE27Aosjf9+Ix+vkLL0SPj/kvw/yXiP97smOJJWcYLz78ys2HNur10vMh + YkCi0PKhwSFGbj5EDFgUTj6E8DH/ZZj/EvHT8qHBGcZoW1dN/USYKWFhpu/pJdputuoCqtdDTVGapGut + q/cXp1/beyuoekDhxJE5k3HmHeXYurzIMGqka+UZEVu7XlGbKMRs4NKg/ZTkPLtGm/ai5Oc2m4XMgTkO + lQCxGLlO5wAjN03w9AjIJxCPRGDmFYg3InQF4FOzPtKvpC3vYBq3B8nH3LKh//o8/S0XxkMRup+ip7Iq + CO83EN6IUGSRPIiRzU0QctIzuglqTlGcR0kZxcnktZE0xPKoKpwye9uAABcpT+kQ4KpS0qazNgcYRfxM + 1ynIdv2MttM/rNUQ15NdbKkeiViex1Tm5DjP/k6TZsJWXUb1nqQFDU4UtVVEmW1TWYTl6baevjsgxgMR + dlmaJ9Ghprt70rJmdbqPtuV+I/9Cz+wObdmrdNe8NFcPfzNi0/TsKTvDjWiweKoaKYuUF6WDLbcIvMNi + 9A4f6y0zhxrkYN2k6THal4ksRNRM4DR6jivKsk0Yr0XIym4UTshmEXVfTJg27bskEk/lMW9GsKbPEQBQ + 06vWM5M5SU0zVcnWnYD6U5wkpCvwm8yo6kd6Gg2Ua1Mz6OV/U3UdpvmKKFZL6hw38oEuRE3KJwBrmpMk + eimrRFCMJ8YwbcvDK1k1QIYrkQ0ezrUanGFMfx7kfSeoWsBw7LJayAeOfJEGZxrVN5H7sqgfy31KeIQc + 0meNxD7Oc7675Y0Ij3H9lFYfCM6OMCwySaq4eEzJCWqCplOo1bKaIp1stVDbW6V5XGfPaf6qvjwg5UuA + Nuz/irflJiMIW8Bw5Ns965kxONOYChHVT3GhZ4YlRQ0KkBjU22WRhnWf5XkzsUU2f0iNe4j1mGvZ+qTs + YIYKrBhFJh+56CVLpi+VbXOmsUza/XAZ+cNhQTP17hmcY5SFb7SJZbPmgn3KkAKMo7ImuYh0Ycfdtcze + tY87PwzqwSKyk8zh0QjU8s9hUbNIt1VaBwXQFU6cXDxlO7X5LzONHB6JEBjA498f85DKHVM4cbjtTYcF + zZzyoucc4/H8V/a5Gqxllo9a8Y7kawjTIhObVULqnGNUXfv4F6KuhWDXJcd1CbgYd0HnHKNKU6JMIaCH + 0XC1UcdLfgBPjGPi5BA3d5QyzxTNp9Cq2VlunrPyKGSrU96wQylki4MQYdRlRi6acQ5Wf8ZhDfOhfKHd + tRYwHJXq9/P6Gzbqers6pzmGKtZZ05wmx20qk2ZLcg4UZlMdqEMec7U9bvlF9jcjbTXM9HU1LVmoc4Dx + lN7NP8heg4bsvNMFzlZs47qm5foTYnqaIU3yeemY5avZPRSHdcz00wTP8Ud1+VNm01rt4kYpnE3QdtJr + 3QGCXZcc1yXgote6BucYqbVazzgm8h09MbbpJ/uW/kTvKaMlCrdCjbqLnHoAbdiP3M77Ee+5H7kN/CPe + un8hD7O+OOOspfqGXwi1Ot5BbbaT75qXSpOdCD9E2F5k0Wx1ex59XKyj1VoJpsoBFPAubtfzz/MlWdpx + gPHu43/Pr9ZkYYtpvs2m6VKokchi8rxFk3Jtx624iDYpVddhgK/evWcJOw40XjJsl6ZJvaxVf43ytKDY + dE43NjtTke+FTrk28r0wMMBHvhcmBxovGTb9XjzF8n8XzYJ1r+fv332IygPhjoC0zy7S6fUNTGt2NSmm + bGbIbHPVf0sLNXFocomJ8UOERD38V1fqE/Hr+epqubhfL+5up/ph2rLzys7EV3YOP36952pPJGS9u7uZ + z27pzpYDjPPbh6/z5Ww9vyZLBxTwdssPLP53fr1eTF+5AOPxCMxUNmjAvph9YJp7ErLSatQErVH7X24f + bm7IOgUBLlrtnGC18/DD1XrOfrp0GHDfy7+vZx9v6DmrJ31W5klbPBBhNf/nw/z2ah7Nbr+R9ToMutdM + 7Roxrn89Z6ZET0JWToGAlALrb/cMl4QA18Pt4s/5csUuUyweirC+Yl18x4HGT5fc0+1RwPvnYrXgPwcG + bdkf1l8kuP4mC7VPd10lTQoACbAYf8y/La559ga1vMe6vG83Ffpj+sxzlzStH2erxVV0dXcrk2smyw9S + ajiw6b6aL9eLT4srWUvf390srhZzkh3ALf/yJrperNbR/R31zC3U9F5/OcRVvBcU4YmBTRFhCpvNWcbF + UtZ3d8tv9IfDQm3v6v5m9m09/2tNc/aY4+sSl6jrKMxGWooKQC3vasZ7pAzQ4yTfeBv2uacvRA2xrvm4 + ybMtIyFOnGMk7gJoUpiNkaQaiVrJiTmArnO1+Ey1ScTxMIqhE2S65leMs+oh23WvIqQ1YX8Bm3OMrIdQ + 53AjNb/YrMdMyzMWansZD0sPIS76paNPyvAT9aKx52R+vbifLdffqAW6zlnGv9bz2+v5tWo9RQ+r2Wea + 16FNO2ctxARdC9H+ZcVVWm2XxWr1IAlm/evSpv12vl5dze7n0er+j9kVxWySuHXBlS4s5916IRuQ808k + 3wkyXXfrL/Ml9bb3kOm6/+NqNX3lqYGALNTHe6BAG+3B7iHX9RvV8xvg4Fzcb/C1XfIrAwD3++mJeOmp + FZrf1cDOn02ppPqcZL2Jj/pZKeQqxuMwUsoxQFFY54+cMecc3bM61SfR/Xy5uLumKS3Ycqt+8Tdytugp + yPbPh9kNz3giLevy7q9vTWe+vWtNPbsivk5BJVCs9mzo+pazjORGGdQi4zXHsLYYqyGGtMJ4LW+s3R1Q + 0PrKWHbx6ilZOZ1dpKe75I4iLPFRhGXIKMLSP4qwDBhFWHpHEZbMUYQlOoqg/8JJBp31mOmJoKGON7pf + rSLZSZl9XRG1GglYyWXREhlNWbJHU5ae0ZQldzRliY+mrP6SjXyKqwEAB20kvkNMz8NKtuibLgJFNVCm + Ta2+T/Go411DNLv5fLekeloKs614uhXkW6+Xi48P6zldeSIh68NfdN/DX4CpaVFwdCcQcsoWCt0nIci1 + vKGrljewidx/MEDESSw/dA4x0soODQN8rMamSfqsK74WelqoYww9hLii+e16+Y1lbFHAS6+ENAzwEfYQ + 0xnYxMvhJxBxcnJ4xyFGRg5vMdD3590ftAlUOgcYia8JTgxg+nNGL70kA5g49wBOf0baG+ku4qhZk2af + Tv9ow4AGV7qNPn/qPn8m7DtjYbAv2eQcn8Rg3y7N0323/fhrPX3LYp/DF2l/zPkhJOxzix8V3y1hn7su + Q9PnZICjPFbl8RDJP2fTd87EeF8EynoPMO2zN4tFHavpK7J5FHAcdQbRoUrVR5acIDoPR2DmUDRvqonI + aq0FprRhfeZ6+8RXSxh3BySzhnv8TV877BJ0hxNJPgy12vtzWyap+v4vjyu1ig31IcY0TjyR7Q95szlu + 9DPalmWVZEVcU+88YsGiBZbgiMUfjVkagg4sUkCJCBj8UR6Z5RYs8cdilMAO748g3uJqxNjVNCuKMK+k + ZVGziGJVUqs7V78yIxgOT6SyCEkrTYDFOJRZUTdrufFCDLw/Aj9fDbw/gsoS8qkNuzGgyhtXROmPY5wH + hOsMRpR4p/6rWyssLsgxQB6K0H4rTje3HGSUCXcKS9dqsOmmdn50xjBtssfi2JTvTUFP8FkkYm1rYJa2 + RQ1vQGXtraFV0+dYp9HL7ewTxalhhq+tNGndyZ4BTNT8rlGAjdX88LY52h+L9JEslAxkkuW0Wno32sfi + O92p04Cd/JDrGOQ7buiy4wYwqWZWk//Jvp5ErKy7Dbb6VMtJf5BkwULWo47RSOTyBJeYsZp2VJG+UNQn + xjA9xeJJpVzTzogO7y9/iX7u1SrB8Yfzi0iIl2OUVPGufvcbIdR0qe9cPlycI9iv/HPxSMFz6fpk9jXw + 08Qv9J6Dde78tPALjXNgDoqgYyF9o0aeRttsIFhdeMRNHgDAFEacw/f0ldqe6RnT1LRYm2rqWKi0qlIh + Uko9jBiAKM36Z9TyyEa9XupYFMiPRaDdT1jgj0HP7ZhiJE4zvhQUpjFMiRKecOho2KnXRWyl6Bjoq08P + 4FAbCoYf0gDxGK0OEzSd7f1npIoBGk61Zl3ZNBeb1iL5UQZ5I0J3p2kdgQGCXE2jnrrJAoJDflbnwGFR + M31JRVQAxciK53dBMSwBGEOQdhdxQMhprmNLV5s8FIHWORsgyNWuoEjXtRxkJD/WBgcaSZ2yAYJcjKLM + IhFryC1H1hhFDlAZm19qoCozbjtOKOJdN5RHCWSzprkdHwx/yH0eT8Q3ScppRv0s2rdZf198+DWKn39e + 9CtZEnpJqAKJQ12nGIQRN6kIMjnEKNsfYWesCzwx1EqOQTFOAiRG2/AhNRMgesxO7h96JN5YSSnbtiFx + WgES45SHP7AC9PSI/bcgO/Z8BeUkIBclFx8+nP/OeCFgg66T3im3wcGplnl7bAZLZCk01WdAkKtZOI5u + azDIp3YHpesUBdmEEOl7uq7BLJ8835qccicIctFTbsAgHznlegqy0VNuwExfM2pGTLgTA5jIyTZQgI2a + aD0EuMhJNlCDLbuIA1ZchGnLzltxEEABL3FtPZsDjLT18CwM8NHWC7Iw3bflrl0JoICXnJJbNCWToByV + jOSohJ8OiS8dEuYani4JWWlreNocYOQ8UYnviUqC1vDEeDwCM5WRNTz738lreLokZKU+HYnv6aCu4WlA + gItaZiVYmZXw1/AEYcBNXsPTJX1W5kmja3j2R3DW8ARh0L1mateIkbyGp0tCVk6BgJQClDU8DQhwMdfw + xHgoAm0NT5sDjdQ1PAEU8LLW8IRpyx6yhicqwGKQ1vAEUNPLXm0ThE13wGqbCG75eattAqjppa62qTOw + ifK1mM1ZRt5qmwBqe8mrbVqY4yOu9mVSmI30RSqAWl7OOhkO6HGSbzy+Tob78/QPByHWNVPXybA5x0j8 + NNekMBsjScH1IazfyIkJrQ9x+onwwaqGOB5GMeSutqn+TF5t04BsF321TZtzjKyHEF5t0/6Fml/w1Tad + X2l5Bl1ts/2R8bAAq20af6ZfOvqkcFbbtDnLyFht0+YsI3u1TZg27ZzVNm0ON664Sqvtwl9tE6ZNO2+1 + TZfErQuudGE5qattGpDpIq+2aUCmi7ba5kBAFurjDa22qf2d9mADq22e/vwb1fMb4OBc3G/wtWnrWS6K + XckxA4rxOPQEdQ3eKIFXMnoVYVcwevZFloReQacYjxN2Ja0BiMJbCRXBR/2s1PKthIodxEgtz0qowzGs + 80fOmHOO7lkxV0IFYctNXgnVpCAbdSVUl7SsoSuheiVQLNpKqDZnGckNZqi1zGsqY+1kViMZaSHzekVY + nyig2vDVGOzKwlNPcAYikFGIJXeEZ4mP8CxDRniW/hGeZcAIz9I7wrNkjvAs0REe7kqoEOsx0xMBXAm1 + +5GxEqpLAlZyWbRERrqW7JGupWeka8kd6VriI12klVB7AHDQ3mc4K6GqP9JXQjUp00ZZCfV0vGugrYRq + UphtxdOtIB91JVSXhKzTly7VGcBEXQn1/7d2Bj2Om2AYvvef9Lae2VV7rnpcqdJO1StybJJYcWwv4Gxm + f33BcWw++Mj6JXMbDTwPjg0EDPmIQM4JREIlEOf69hVXffvKm+D5QyISKkkC+w8+EipJwfoONhLqkpA1 + 2ExFQo3T3vK1XGtB3/8wkVDJv7FIqAzKePEvITYS6pIAREL1Gd6UV8PjSKgkKaeGR5FQSUpGDQ8joXoJ + UCTUkGOM4BJOHAl1+S8QCdVnGFPOM+Dvf8a9D++7kmuvY3bQAlWA8l73rDO9M8p7M52Br3eLTPggn2C+ + T+fvqNSPdlRGiQLc+JYQMGXA+xN1cn+ifmYPoH68B9Dk7Vc0qf2Kl/y9wJdHe4Evmetgl+Q62CV3HeyS + Wgc7/dWrpjvY3Hby8vZdmX9/bO6hOPax+avsnpFb3PP/M8jOJctS992bcbn/Lk25uYAEnyrhv7Idt/+S + l2Mfm5F7w+Orv5UX2U6/uev6evPP6SgV2uyfOboF83xHUctWbo/CtgDU0ZetvVx1QDR3hpj2SiLX4rIT + vuk0ECRzAYgDiCB1y03p8SwaI7dvgPEZYlLStgR5Qe7HHWE94rT92zXAiE8b5X7lBqhmYrWc689i1/bV + SdS2nbuf18rNUTs41jd/mVNLfc6y8/xaQn87ghYdrwTY6htOlS5e3PNXpWn6TouyquRgSuDnt48cUUnu + p52H7V0cpSLbsJNCdpV6H7CQqAmc+v8Qu7GrsftwZ0LTUCotxVGWQG2ISWr9c7r+Wk7Xj0gJ6DnPO9Of + ZCfkdfhk66HtsTdbYzTlrdpGdmZ6oniomA2qVLm2+rj6CXVEaUOqlEbrUaoP+XSsKlWusvUjrxhHpqy6 + OXR5VkemrGP3RN2aYd5d5NfaQjz0flitLZBaWzxda4sNtbaYYlza8UyvhL0UYwfAuUUFmlR5H9ZKCqSV + FNmtpHjQSorsVlI8aCXFM62kYFpJb7/530VVVkd5G4vXwByJp1N2YBQdgQmnliZLabm0UZzLYUAqe4KP + SpgGbhm3YeF4IzA1CLDI5yZiU0Rr3OmjvDfjky8cbzwjoRIjkDjfxbfvyKkvHrJ6XOA+18+dbEObIk7t + xv1eujcHdjjphr2bm+2vTV6pOadWKf7UKvdv+2fpwl6AI0gG5b3DbWOFMPZDavsZzzklRBK+LNeTClX+ + yCnizqbMP2We9aekRjgeDoGI66coPr18FofSHKX6MkXmAqQMzdldXKs8853krJ19hi9K1plqgnN+m/bi + MmX6Cc75dVUak3/TCc76v6tc9UyuVm2n/Tlv9EOOMea80Wdhz30si+wXMyxM3C4A1hN2Did+F6/7CT+H + e377bykH6GQZnwlMyFvXBWAcYjAK9jiIusYBkYwDoffAKHnOTnlguDJnJzz21ncBqEML3SsjkQ+yMMQE + DOhuuUNadGPbYooJoZ7tJ1DcchN66JH6YHOHNPpM7wjrsTOqDJWlqG3c/tJ6zk54YAZ0yx3S05h9P3YV + plkw6js2e+h6XH5q6KE247IT/uJWuwDBlJ8YkBjMc/aVN+4RTzPh7efL+Mxquty/FPF1Zwal3px155BL + G99ylW9pJ9DYGNTzvorSjZybzT3qSlBLaxBDawi9q/pOA/yUnxgqOwFFDFN+alCtiw9cA8ddUSqyAb37 + SkQWNa1ag6IbFLpqzEKfsB2U2PGW/TcgWRhiklcjTiOguQHEYb879FFqA16QjxFfUw+AxuamdLfvEdxm + D/hjs3PRMLt36DI8jPhcAx11eUBq8sIQU1ee3QEUnTaqdIcGAsIQpV4tmvKLaBuN9BseFdgqYGy5AMTR + V3pwK7K2hiDPwMdiX9dXR1mdUN+MEd9QNYDG5qb08njFIFXTI11BxFLz/Lo3q47EMOeeXyBniO8ksWqw + ueqovWr4O1Mz35n62kmk0k75PcNQSi2qXXVfm9+sCsHIadTry7LiP822NShnDGEp4PtUAoWurDuQ+PRu + ND8XgywnsjDnvt+VLLcHr+5rZnDyazI2+ZxiWzwQLJ9AnMutPE4Lj+ixDg8UXDlDMRTu5IfhBS9gZR+a + X58wv7Lm1+msP7dolnHDfZqz307DcNG7cffKPjZDh6glBb8oQ5/djkTwoLNfm9hSt59sQyDOZXpo7T4C + Iye8SHJNnhkwp+gKPG8o5Dyj+/1A3RzcQHtaNSrbQ68ac9w8H0ob+FIudlyyf4f2tiXwwD8od0zGtMKk + tcCipiUFQRkusTLXqW/QmJ2ijNcV6noGc4W9K0q9bv499cA28Sghb4BG3tueATvdk51ugFcCCTzy2zLh + Q6YYNPK2fX/SdlpykqK2cxQ38wH1jCEq5TahAro9iv3+2/+Gg0MpgYYEAA== EOF # We are renaming openssl to openssl_grpc so that there is no conflict with openssl if it exists From d3144dc6b7c06bc910252a89cc33e4652c94d43d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jul 2020 11:27:25 +0200 Subject: [PATCH 203/239] generate boringssl prefix headers --- src/boringssl/boringssl_prefix_symbols.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/boringssl/boringssl_prefix_symbols.h b/src/boringssl/boringssl_prefix_symbols.h index 62120400a75..96939d2d726 100644 --- a/src/boringssl/boringssl_prefix_symbols.h +++ b/src/boringssl/boringssl_prefix_symbols.h @@ -1,4 +1,4 @@ -// generated by generate_boringssl_prefix_header.sh on BoringSSL commit: 3ab047a8e377083a9b38dc908fe1612d5743a021 +// generated by generate_boringssl_prefix_header.sh on BoringSSL commit: 597b810379e126ae05d32c1d94b1a9464385acd0 // Copyright (c) 2018, Google Inc. // @@ -401,6 +401,7 @@ #define SSL_peek BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, SSL_peek) #define SSL_pending BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, SSL_pending) #define SSL_process_quic_post_handshake BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, SSL_process_quic_post_handshake) +#define SSL_process_tls13_new_session_ticket BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, SSL_process_tls13_new_session_ticket) #define SSL_provide_quic_data BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, SSL_provide_quic_data) #define SSL_quic_max_handshake_flight_len BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, SSL_quic_max_handshake_flight_len) #define SSL_quic_read_level BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, SSL_quic_read_level) @@ -2199,8 +2200,10 @@ #define X509_CERT_AUX_new BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CERT_AUX_new) #define X509_CERT_AUX_print BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CERT_AUX_print) #define X509_CINF_free BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CINF_free) +#define X509_CINF_get_signature BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CINF_get_signature) #define X509_CINF_it BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CINF_it) #define X509_CINF_new BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CINF_new) +#define X509_CINF_set_modified BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CINF_set_modified) #define X509_CRL_INFO_free BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_INFO_free) #define X509_CRL_INFO_it BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_INFO_it) #define X509_CRL_INFO_new BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_INFO_new) @@ -2221,14 +2224,19 @@ #define X509_CRL_get0_lastUpdate BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get0_lastUpdate) #define X509_CRL_get0_nextUpdate BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get0_nextUpdate) #define X509_CRL_get0_signature BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get0_signature) +#define X509_CRL_get_REVOKED BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_REVOKED) #define X509_CRL_get_ext BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_ext) #define X509_CRL_get_ext_by_NID BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_ext_by_NID) #define X509_CRL_get_ext_by_OBJ BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_ext_by_OBJ) #define X509_CRL_get_ext_by_critical BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_ext_by_critical) #define X509_CRL_get_ext_count BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_ext_count) #define X509_CRL_get_ext_d2i BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_ext_d2i) +#define X509_CRL_get_issuer BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_issuer) +#define X509_CRL_get_lastUpdate BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_lastUpdate) #define X509_CRL_get_meth_data BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_meth_data) +#define X509_CRL_get_nextUpdate BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_nextUpdate) #define X509_CRL_get_signature_nid BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_signature_nid) +#define X509_CRL_get_version BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_get_version) #define X509_CRL_it BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_it) #define X509_CRL_match BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_match) #define X509_CRL_new BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_CRL_new) @@ -2363,6 +2371,8 @@ #define X509_REQ_get_extensions BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_REQ_get_extensions) #define X509_REQ_get_pubkey BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_REQ_get_pubkey) #define X509_REQ_get_signature_nid BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_REQ_get_signature_nid) +#define X509_REQ_get_subject_name BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_REQ_get_subject_name) +#define X509_REQ_get_version BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_REQ_get_version) #define X509_REQ_it BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_REQ_it) #define X509_REQ_new BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_REQ_new) #define X509_REQ_print BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_REQ_print) @@ -2552,6 +2562,8 @@ #define X509_get0_tbs_sigalg BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get0_tbs_sigalg) #define X509_get1_email BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get1_email) #define X509_get1_ocsp BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get1_ocsp) +#define X509_get_X509_PUBKEY BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_X509_PUBKEY) +#define X509_get_cert_info BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_cert_info) #define X509_get_default_cert_area BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_default_cert_area) #define X509_get_default_cert_dir BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_default_cert_dir) #define X509_get_default_cert_dir_env BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_default_cert_dir_env) @@ -2570,10 +2582,13 @@ #define X509_get_extension_flags BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_extension_flags) #define X509_get_issuer_name BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_issuer_name) #define X509_get_key_usage BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_key_usage) +#define X509_get_notAfter BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_notAfter) +#define X509_get_notBefore BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_notBefore) #define X509_get_pubkey BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_pubkey) #define X509_get_serialNumber BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_serialNumber) #define X509_get_signature_nid BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_signature_nid) #define X509_get_subject_name BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_subject_name) +#define X509_get_version BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_get_version) #define X509_getm_notAfter BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_getm_notAfter) #define X509_getm_notBefore BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_getm_notBefore) #define X509_gmtime_adj BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, X509_gmtime_adj) @@ -3359,6 +3374,7 @@ #define x509_rsa_ctx_to_pss BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, x509_rsa_ctx_to_pss) #define x509_rsa_pss_to_ctx BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, x509_rsa_pss_to_ctx) #define x509v3_bytes_to_hex BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, x509v3_bytes_to_hex) +#define x509v3_cache_extensions BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, x509v3_cache_extensions) #define x509v3_hex_to_bytes BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, x509v3_hex_to_bytes) #define x509v3_looks_like_dns_name BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, x509v3_looks_like_dns_name) #define x509v3_name_cmp BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, x509v3_name_cmp) From 84278dced4b46a93c64edbd37e1b234328cbebd8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jul 2020 11:28:33 +0200 Subject: [PATCH 204/239] fix nits in third_party/README.md --- third_party/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/README.md b/third_party/README.md index fc035cb814c..4294af5f02d 100644 --- a/third_party/README.md +++ b/third_party/README.md @@ -80,15 +80,15 @@ Rule 'boringssl' indicated that a canonical reproducible form can be obtained by - Update `bazel/grpc_deps.bzl` with the SHA value shown in the above debug msg. Commit again `git commit -m "Updated sha256"` - Run `tools/distrib/generate_boringssl_prefix_header.sh` - - Commit again `commit -m "generate boringssl prefix headers"` + - Commit again `git commit -m "generate boringssl prefix headers"` - Increment the boringssl podspec version number in `templates/src/objective-c/BoringSSL-GRPC.podspec.template` and `templates/gRPC-Core.podspec.template`. [example](https://github.com/grpc/grpc/pull/21527/commits/9d4411842f02f167209887f1f3d2b9ab5d14931a) - - Commit again `commit -m "Increment podspec version"` + - Commit again `git commit -m "Increment podspec version"` - Run `tools/buildgen/generate_projects.sh` (yes, again) - - Commit again `commit -m "Second regeneration"` + - Commit again `git commit -m "Second regeneration"` - Create a PR with all the above commits. From 2c2d926bfd4832d9678b6b8d47e9b6153ce53fd5 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jul 2020 11:32:39 +0200 Subject: [PATCH 205/239] Increment podspec version --- templates/gRPC-Core.podspec.template | 2 +- templates/src/objective-c/BoringSSL-GRPC.podspec.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 13347b78673..8a62d0376de 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -192,7 +192,7 @@ ss.header_mappings_dir = '.' ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version - ss.dependency 'BoringSSL-GRPC', '0.0.9' + ss.dependency 'BoringSSL-GRPC', '0.0.10' abseil_version = '1.20200225.0' % for abseil_spec in grpc_abseil_specs: ss.dependency '${abseil_spec}', abseil_version diff --git a/templates/src/objective-c/BoringSSL-GRPC.podspec.template b/templates/src/objective-c/BoringSSL-GRPC.podspec.template index d1cf8518fc6..aeaf0a508ab 100644 --- a/templates/src/objective-c/BoringSSL-GRPC.podspec.template +++ b/templates/src/objective-c/BoringSSL-GRPC.podspec.template @@ -69,7 +69,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.9' + version = '0.0.10' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: From b1ed4f1d9ee45e7df9930eacd094e84e287e63c0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jul 2020 11:34:30 +0200 Subject: [PATCH 206/239] regenerate projects --- gRPC-Core.podspec | 2 +- src/objective-c/BoringSSL-GRPC.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index a69e16086fb..44fda9ed545 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -172,7 +172,7 @@ Pod::Spec.new do |s| ss.header_mappings_dir = '.' ss.libraries = 'z' ss.dependency "#{s.name}/Interface", version - ss.dependency 'BoringSSL-GRPC', '0.0.9' + ss.dependency 'BoringSSL-GRPC', '0.0.10' abseil_version = '1.20200225.0' ss.dependency 'abseil/container/inlined_vector', abseil_version ss.dependency 'abseil/memory/memory', abseil_version diff --git a/src/objective-c/BoringSSL-GRPC.podspec b/src/objective-c/BoringSSL-GRPC.podspec index af07f5e3fd2..30155756a6d 100644 --- a/src/objective-c/BoringSSL-GRPC.podspec +++ b/src/objective-c/BoringSSL-GRPC.podspec @@ -39,7 +39,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL-GRPC' - version = '0.0.9' + version = '0.0.10' s.version = version s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google\'s needs.' # Adapted from the homepage: From 6905146faef3ce4e9b933be8fc1ae1dba9871eb2 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jul 2020 11:46:51 +0200 Subject: [PATCH 207/239] Update README.md --- third_party/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/README.md b/third_party/README.md index 4294af5f02d..9bf04831bcb 100644 --- a/third_party/README.md +++ b/third_party/README.md @@ -65,7 +65,7 @@ git commit -m "update submodule boringssl-with-bazel with origin/master-with-baz - Update boringssl dependency in `bazel/grpc_deps.bzl` to the same commit SHA as master-with-bazel branch - Update `http_archive(name = "boringssl",` section by updating the sha in `strip_prefix` and `urls` fields. - - Also, set `sha256` field to “” as the existing value is not valid. This will be added later once we know what that value is. + - Also, set `sha256` field to "" as the existing value is not valid. This will be added later once we know what that value is. - Update `tools/run_tests/sanity/check_submodules.sh` with the same commit From a2afea6ee0cb9389ecf2f050be3a5558911c83a9 Mon Sep 17 00:00:00 2001 From: Matthew Stevenson Date: Tue, 7 Jul 2020 06:05:39 -0700 Subject: [PATCH 208/239] Add TLS 1.2 and 1.3 specific tests to h2_tls fixture. --- .../tls/grpc_tls_credentials_options.h | 10 +++++ .../security/security_connector/ssl_utils.cc | 9 ++++- .../security/security_connector/ssl_utils.h | 5 ++- .../tls/tls_security_connector.cc | 11 ++++-- test/core/end2end/fixtures/h2_tls.cc | 38 ++++++++++++++++--- 5 files changed, 61 insertions(+), 12 deletions(-) diff --git a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h index a5f032abec4..52a1218d01e 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h @@ -264,6 +264,8 @@ struct grpc_tls_credentials_options grpc_tls_server_verification_option server_verification_option() const { return server_verification_option_; } + grpc_tls_version min_tls_version() const { return min_tls_version_; } + grpc_tls_version max_tls_version() const { return max_tls_version_; } grpc_tls_key_materials_config* key_materials_config() const { return key_materials_config_.get(); } @@ -284,6 +286,12 @@ struct grpc_tls_credentials_options const grpc_tls_server_verification_option server_verification_option) { server_verification_option_ = server_verification_option; } + void set_min_tls_version(grpc_tls_version min_tls_version) { + min_tls_version_ = min_tls_version; + } + void set_max_tls_version(grpc_tls_version max_tls_version) { + max_tls_version_ = max_tls_version; + } void set_key_materials_config( grpc_core::RefCountedPtr config) { key_materials_config_ = std::move(config); @@ -302,6 +310,8 @@ struct grpc_tls_credentials_options grpc_ssl_client_certificate_request_type cert_request_type_; grpc_tls_server_verification_option server_verification_option_ = GRPC_TLS_SERVER_VERIFICATION; + grpc_tls_version min_tls_version_ = grpc_tls_version::TLS1_2; + grpc_tls_version max_tls_version_ = grpc_tls_version::TLS1_3; grpc_core::RefCountedPtr key_materials_config_; grpc_core::RefCountedPtr credential_reload_config_; diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index dab4641b216..b6daaf9903a 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -391,8 +391,8 @@ void grpc_shallow_peer_destruct(tsi_peer* peer) { grpc_security_status grpc_ssl_tsi_client_handshaker_factory_init( tsi_ssl_pem_key_cert_pair* pem_key_cert_pair, const char* pem_root_certs, - bool skip_server_certificate_verification, - tsi_ssl_session_cache* ssl_session_cache, + bool skip_server_certificate_verification, tsi_tls_version min_tls_version, + tsi_tls_version max_tls_version, tsi_ssl_session_cache* ssl_session_cache, tsi_ssl_client_handshaker_factory** handshaker_factory) { const char* root_certs; const tsi_ssl_root_certs_store* root_store; @@ -424,6 +424,8 @@ grpc_security_status grpc_ssl_tsi_client_handshaker_factory_init( options.session_cache = ssl_session_cache; options.skip_server_certificate_verification = skip_server_certificate_verification; + options.min_tls_version = min_tls_version; + options.max_tls_version = max_tls_version; const tsi_result result = tsi_create_ssl_client_handshaker_factory_with_options(&options, handshaker_factory); @@ -440,6 +442,7 @@ grpc_security_status grpc_ssl_tsi_server_handshaker_factory_init( tsi_ssl_pem_key_cert_pair* pem_key_cert_pairs, size_t num_key_cert_pairs, const char* pem_root_certs, grpc_ssl_client_certificate_request_type client_certificate_request, + tsi_tls_version min_tls_version, tsi_tls_version max_tls_version, tsi_ssl_server_handshaker_factory** handshaker_factory) { size_t num_alpn_protocols = 0; const char** alpn_protocol_strings = @@ -453,6 +456,8 @@ grpc_security_status grpc_ssl_tsi_server_handshaker_factory_init( options.cipher_suites = grpc_get_ssl_cipher_suites(); options.alpn_protocols = alpn_protocol_strings; options.num_alpn_protocols = static_cast(num_alpn_protocols); + options.min_tls_version = min_tls_version; + options.max_tls_version = max_tls_version; const tsi_result result = tsi_create_ssl_server_handshaker_factory_with_options(&options, handshaker_factory); diff --git a/src/core/lib/security/security_connector/ssl_utils.h b/src/core/lib/security/security_connector/ssl_utils.h index 258b4059d3a..958f6e3525a 100644 --- a/src/core/lib/security/security_connector/ssl_utils.h +++ b/src/core/lib/security/security_connector/ssl_utils.h @@ -89,14 +89,15 @@ const char** grpc_fill_alpn_protocol_strings(size_t* num_alpn_protocols); /* Initialize TSI SSL server/client handshaker factory. */ grpc_security_status grpc_ssl_tsi_client_handshaker_factory_init( tsi_ssl_pem_key_cert_pair* key_cert_pair, const char* pem_root_certs, - bool skip_server_certificate_verification, - tsi_ssl_session_cache* ssl_session_cache, + bool skip_server_certificate_verification, tsi_tls_version min_tls_version, + tsi_tls_version max_tls_version, tsi_ssl_session_cache* ssl_session_cache, tsi_ssl_client_handshaker_factory** handshaker_factory); grpc_security_status grpc_ssl_tsi_server_handshaker_factory_init( tsi_ssl_pem_key_cert_pair* key_cert_pairs, size_t num_key_cert_pairs, const char* pem_root_certs, grpc_ssl_client_certificate_request_type client_certificate_request, + tsi_tls_version min_tls_version, tsi_tls_version max_tls_version, tsi_ssl_server_handshaker_factory** handshaker_factory); /* Exposed for testing only. */ diff --git a/src/core/lib/security/security_connector/tls/tls_security_connector.cc b/src/core/lib/security/security_connector/tls/tls_security_connector.cc index 6cc2d840e2b..85fe4aee5df 100644 --- a/src/core/lib/security/security_connector/tls/tls_security_connector.cc +++ b/src/core/lib/security/security_connector/tls/tls_security_connector.cc @@ -334,8 +334,10 @@ grpc_security_status TlsChannelSecurityConnector::ReplaceHandshakerFactory( key_materials_config_->pem_key_cert_pair_list()); grpc_security_status status = grpc_ssl_tsi_client_handshaker_factory_init( pem_key_cert_pair, key_materials_config_->pem_root_certs(), - skip_server_certificate_verification, ssl_session_cache, - &client_handshaker_factory_); + skip_server_certificate_verification, + grpc_get_tsi_tls_version(creds->options().min_tls_version()), + grpc_get_tsi_tls_version(creds->options().max_tls_version()), + ssl_session_cache, &client_handshaker_factory_); /* Free memory. */ grpc_tsi_ssl_pem_key_cert_pairs_destroy(pem_key_cert_pair, 1); return status; @@ -544,7 +546,10 @@ grpc_security_status TlsServerSecurityConnector::ReplaceHandshakerFactory() { grpc_security_status status = grpc_ssl_tsi_server_handshaker_factory_init( pem_key_cert_pairs, num_key_cert_pairs, key_materials_config_->pem_root_certs(), - creds->options().cert_request_type(), &server_handshaker_factory_); + creds->options().cert_request_type(), + grpc_get_tsi_tls_version(creds->options().min_tls_version()), + grpc_get_tsi_tls_version(creds->options().max_tls_version()), + &server_handshaker_factory_); /* Free memory. */ grpc_tsi_ssl_pem_key_cert_pairs_destroy(pem_key_cert_pairs, num_key_cert_pairs); diff --git a/test/core/end2end/fixtures/h2_tls.cc b/test/core/end2end/fixtures/h2_tls.cc index bacbf7efff4..8c719996474 100644 --- a/test/core/end2end/fixtures/h2_tls.cc +++ b/test/core/end2end/fixtures/h2_tls.cc @@ -52,22 +52,37 @@ struct fullstack_secure_fixture_data { } } std::string localaddr; + grpc_tls_version tls_version; ThreadList thd_list; }; static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( - grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) { + grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/, + grpc_tls_version tls_version) { grpc_end2end_test_fixture f; int port = grpc_pick_unused_port_or_die(); fullstack_secure_fixture_data* ffd = new fullstack_secure_fixture_data(); memset(&f, 0, sizeof(f)); ffd->localaddr = grpc_core::JoinHostPort("localhost", port); + ffd->tls_version = tls_version; f.fixture_data = ffd; f.cq = grpc_completion_queue_create_for_next(nullptr); f.shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr); return f; } +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack_tls1_2( + grpc_channel_args* client_args, grpc_channel_args* server_args) { + return chttp2_create_fixture_secure_fullstack(client_args, server_args, + grpc_tls_version::TLS1_2); +} + +static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack_tls1_3( + grpc_channel_args* client_args, grpc_channel_args* server_args) { + return chttp2_create_fixture_secure_fullstack(client_args, server_args, + grpc_tls_version::TLS1_3); +} + static void process_auth_failure(void* state, grpc_auth_context* /*ctx*/, const grpc_metadata* /*md*/, size_t /*md_count*/, @@ -217,6 +232,8 @@ static grpc_channel_credentials* create_tls_channel_credentials( fullstack_secure_fixture_data* ffd) { grpc_tls_credentials_options* options = grpc_tls_credentials_options_create(); options->set_server_verification_option(GRPC_TLS_SERVER_VERIFICATION); + options->set_min_tls_version(ffd->tls_version); + options->set_max_tls_version(ffd->tls_version); /* Set credential reload config. */ grpc_tls_credential_reload_config* reload_config = grpc_tls_credential_reload_config_create(nullptr, client_cred_reload_sync, @@ -235,8 +252,11 @@ static grpc_channel_credentials* create_tls_channel_credentials( } // Create a TLS server credential. -static grpc_server_credentials* create_tls_server_credentials() { +static grpc_server_credentials* create_tls_server_credentials( + fullstack_secure_fixture_data* ffd) { grpc_tls_credentials_options* options = grpc_tls_credentials_options_create(); + options->set_min_tls_version(ffd->tls_version); + options->set_max_tls_version(ffd->tls_version); /* Set credential reload config. */ grpc_tls_credential_reload_config* reload_config = grpc_tls_credential_reload_config_create(nullptr, server_cred_reload_sync, @@ -278,7 +298,8 @@ static int fail_server_auth_check(grpc_channel_args* server_args) { static void chttp2_init_server(grpc_end2end_test_fixture* f, grpc_channel_args* server_args) { - grpc_server_credentials* ssl_creds = create_tls_server_credentials(); + grpc_server_credentials* ssl_creds = create_tls_server_credentials( + static_cast(f->fixture_data)); if (fail_server_auth_check(server_args)) { grpc_auth_metadata_processor processor = {process_auth_failure, nullptr, nullptr}; @@ -289,12 +310,19 @@ static void chttp2_init_server(grpc_end2end_test_fixture* f, static grpc_end2end_test_config configs[] = { /* client sync reload async authz + server sync reload. */ - {"chttp2/simple_ssl_fullstack", + {"chttp2/simple_ssl_fullstack_tls1_2", + FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | + FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | + FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | + FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, + "foo.test.google.fr", chttp2_create_fixture_secure_fullstack_tls1_2, + chttp2_init_client, chttp2_init_server, chttp2_tear_down_secure_fullstack}, + {"chttp2/simple_ssl_fullstack_tls1_3", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION | FEATURE_MASK_SUPPORTS_PER_CALL_CREDENTIALS | FEATURE_MASK_SUPPORTS_CLIENT_CHANNEL | FEATURE_MASK_SUPPORTS_AUTHORITY_HEADER, - "foo.test.google.fr", chttp2_create_fixture_secure_fullstack, + "foo.test.google.fr", chttp2_create_fixture_secure_fullstack_tls1_3, chttp2_init_client, chttp2_init_server, chttp2_tear_down_secure_fullstack}, }; From 9cb284abef1e9149436d6e0f8c5bc280af4e233d Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Sat, 4 Jul 2020 19:46:11 -0700 Subject: [PATCH 209/239] Make pluing embed zlib --- tools/run_tests/artifacts/build_artifact_protoc.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/run_tests/artifacts/build_artifact_protoc.sh b/tools/run_tests/artifacts/build_artifact_protoc.sh index a5b6e2f3482..3b2a89f7c05 100755 --- a/tools/run_tests/artifacts/build_artifact_protoc.sh +++ b/tools/run_tests/artifacts/build_artifact_protoc.sh @@ -13,15 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Use devtoolset environment that has GCC 4.8 before set -ex -# shellcheck disable=SC1091 -source scl_source enable devtoolset-2 - set -ex cd "$(dirname "$0")/../../.." -make plugins +EMBED_ZLIB=true PROTOBUF_CONFIG_OPTS=--with-zlib=no make plugins mkdir -p "${ARTIFACTS_OUT}" cp bins/opt/protobuf/protoc bins/opt/*_plugin "${ARTIFACTS_OUT}"/ From e58e24afb9ce736c4f9f6850bc0c59b4aea75ea0 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Wed, 1 Jul 2020 11:19:55 -0700 Subject: [PATCH 210/239] Allows poller to bound to ephemeral loops in multiple threads --- .../grpc/_cython/_cygrpc/aio/common.pyx.pxi | 23 ++++----- .../_cygrpc/aio/completion_queue.pxd.pxi | 8 +++- .../_cygrpc/aio/completion_queue.pyx.pxi | 44 ++++++++++++++--- .../grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi | 7 +++ .../grpc/_cython/_cygrpc/aio/server.pyx.pxi | 3 ++ .../grpcio/grpc/experimental/aio/_server.py | 9 ++-- .../tests_aio/unit/outside_init_test.py | 48 +++++++++++++++---- 7 files changed, 108 insertions(+), 34 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi index bea1f09a564..f759fbbec0c 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/common.pyx.pxi @@ -170,20 +170,17 @@ async def generator_to_async_generator(object gen, object loop, object thread_po if PY_MAJOR_VERSION >= 3 and PY_MINOR_VERSION >= 7: - def get_working_loop(): - """Returns a running event loop.""" - return asyncio.get_running_loop() -else: def get_working_loop(): """Returns a running event loop. - + Due to a defect of asyncio.get_event_loop, its returned event loop might - not be set as the default event loop for the main thread. So, we will - raise RuntimeError if the returned event loop is not running. + not be set as the default event loop for the main thread. """ - loop = asyncio.get_event_loop() - if loop.is_running(): - return loop - else: - raise RuntimeError('No running event loop detected. This function ' - + 'must be called from inside of a running event loop.') + try: + return asyncio.get_running_loop() + except RuntimeError: + return asyncio.get_event_loop() +else: + def get_working_loop(): + """Returns a running event loop.""" + return asyncio.get_event_loop() diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi index e69200c7376..03d91025d0e 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi @@ -49,6 +49,12 @@ cdef class BaseCompletionQueue: cdef grpc_completion_queue* c_ptr(self) + +cdef class _EventLoopBound: + cdef readonly object loop + cdef readonly object read_socket + + cdef class PollerCompletionQueue(BaseCompletionQueue): cdef bint _shutdown cdef cpp_event_queue _queue @@ -57,7 +63,7 @@ cdef class PollerCompletionQueue(BaseCompletionQueue): cdef int _write_fd cdef object _read_socket cdef object _write_socket - cdef object _loop + cdef dict _loops cdef void _poll(self) nogil cdef shutdown(self) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi index 233fbb1de7e..e8e569fdd86 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi @@ -38,11 +38,25 @@ cdef class BaseCompletionQueue: return self._cq +cdef class _EventLoopBound: + + def __cinit__(self, object loop, object read_socket, object handler): + self.loop = loop + self.read_socket = read_socket + reader_function = functools.partial( + handler, + loop + ) + self.loop.add_reader(self.read_socket, reader_function) + + def close(self): + if self.loop: + self.loop.remove_reader(self.read_socket) + + cdef class PollerCompletionQueue(BaseCompletionQueue): def __cinit__(self): - - self._loop = get_working_loop() self._cq = grpc_completion_queue_create_for_next(NULL) self._shutdown = False self._poller_thread = threading.Thread(target=self._poll_wrapper, daemon=True) @@ -50,10 +64,21 @@ cdef class PollerCompletionQueue(BaseCompletionQueue): self._read_socket, self._write_socket = socket.socketpair() self._write_fd = self._write_socket.fileno() - self._loop.add_reader(self._read_socket, self._handle_events) + self._loops = {} + + # The read socket might be read by multiple threads. But only one of them will + # read the 1 byte sent by the poller thread. This setting is essential to allow + # multiple loops in multiple threads bound to the same poller. + self._read_socket.setblocking(False) self._queue = cpp_event_queue() + def bound_loop(self, object loop): + if loop in self._loops: + return + else: + self._loops[loop] = _EventLoopBound(loop, self._read_socket, self._handle_events) + cdef void _poll(self) nogil: cdef grpc_event event cdef CallbackContext *context @@ -79,14 +104,21 @@ cdef class PollerCompletionQueue(BaseCompletionQueue): self._poll() cdef shutdown(self): - self._loop.remove_reader(self._read_socket) + # Removes the socket hook from loops + for loop in self._loops: + self._loops.get(loop).close() + # TODO(https://github.com/grpc/grpc/issues/22365) perform graceful shutdown grpc_completion_queue_shutdown(self._cq) while not self._shutdown: self._poller_thread.join(timeout=_POLL_AWAKE_INTERVAL_S) grpc_completion_queue_destroy(self._cq) - def _handle_events(self): + # Clean up socket resources + self._read_socket.close() + self._write_socket.close() + + def _handle_events(self, object context_loop): cdef bytes data = self._read_socket.recv(1) cdef grpc_event event cdef CallbackContext *context @@ -103,7 +135,7 @@ cdef class PollerCompletionQueue(BaseCompletionQueue): context = event.tag loop = context.loop - if loop is self._loop: + if loop is context_loop: # Executes callbacks: complete the future CallbackWrapper.functor_run( event.tag, diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi index eaddb3952d0..548c564d757 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi @@ -111,6 +111,12 @@ cdef _actual_aio_shutdown(): raise ValueError('Unsupported engine type [%s]' % _global_aio_state.engine) +cdef _per_loop_initialization(): + cdef object loop = get_working_loop() + if _global_aio_state.engine is AsyncIOEngine.POLLER: + _global_aio_state.cq.bound_loop(loop) + + cpdef init_grpc_aio(): """Initializes the gRPC AsyncIO module. @@ -121,6 +127,7 @@ cpdef init_grpc_aio(): _global_aio_state.refcount += 1 if _global_aio_state.refcount == 1: _actual_aio_initialization() + _per_loop_initialization() cpdef shutdown_grpc_aio(): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi index f69100f5a56..760fef91cf0 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi @@ -1000,3 +1000,6 @@ cdef class AioServer: cdef thread_pool(self): """Access the thread pool instance.""" return self._thread_pool + + def is_running(self): + return self._status == AIO_SERVER_STATUS_RUNNING diff --git a/src/python/grpcio/grpc/experimental/aio/_server.py b/src/python/grpcio/grpc/experimental/aio/_server.py index 009d85d3767..00c53490c5d 100644 --- a/src/python/grpcio/grpc/experimental/aio/_server.py +++ b/src/python/grpcio/grpc/experimental/aio/_server.py @@ -162,10 +162,11 @@ class Server(_base_server.Server): be safe to slightly extend the underlying Cython object's life span. """ if hasattr(self, '_server'): - cygrpc.schedule_coro_threadsafe( - self._server.shutdown(None), - self._loop, - ) + if self._server.is_running(): + cygrpc.schedule_coro_threadsafe( + self._server.shutdown(None), + self._loop, + ) def server(migration_thread_pool: Optional[Executor] = None, diff --git a/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py b/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py index ca43f5727fd..879796cf0f5 100644 --- a/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py +++ b/src/python/grpcio_tests/tests_aio/unit/outside_init_test.py @@ -19,6 +19,11 @@ import unittest from grpc.experimental import aio import grpc +from tests_aio.unit._test_server import start_test_server +from src.proto.grpc.testing import messages_pb2, test_pb2_grpc + +_NUM_OF_LOOPS = 50 + class TestOutsideInit(unittest.TestCase): @@ -26,19 +31,42 @@ class TestOutsideInit(unittest.TestCase): # Ensures non-AsyncIO object can be initiated channel_creds = grpc.ssl_channel_credentials() - # Ensures AsyncIO API NOT working outside of AsyncIO - with self.assertRaises(RuntimeError): - aio.insecure_channel('') + # Ensures AsyncIO API not raising outside of AsyncIO. + # NOTE(lidiz) This behavior is bound with GAPIC generator, and required + # by test frameworks like pytest. In test frameworks, objects shared + # across cases need to be created outside of AsyncIO coroutines. + aio.insecure_channel('') + aio.secure_channel('', channel_creds) + aio.server() + aio.init_grpc_aio() + aio.shutdown_grpc_aio() + + def test_multi_ephemeral_loops(self): + # Initializes AIO module outside. It's part of the test. We especially + # want to ensure the closing of the default loop won't cause deadlocks. + aio.init_grpc_aio() + + async def ping_pong(): + address, server = await start_test_server() + channel = aio.insecure_channel(address) + stub = test_pb2_grpc.TestServiceStub(channel) + + await stub.UnaryCall(messages_pb2.SimpleRequest()) + + await channel.close() + await server.stop(None) + + for i in range(_NUM_OF_LOOPS): + old_loop = asyncio.get_event_loop() + old_loop.close() - with self.assertRaises(RuntimeError): - aio.secure_channel('', channel_creds) + loop = asyncio.new_event_loop() + loop.set_debug(True) + asyncio.set_event_loop(loop) - with self.assertRaises(RuntimeError): - aio.server() + loop.run_until_complete(ping_pong()) - # Ensures init_grpc_aio fail outside of AsyncIO - with self.assertRaises(RuntimeError): - aio.init_grpc_aio() + aio.shutdown_grpc_aio() if __name__ == "__main__": From b61fe7ab3323a9573cd99e470b164e521ca329bd Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 7 Jul 2020 10:17:16 -0700 Subject: [PATCH 211/239] Address comments --- .../grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi | 2 +- .../grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi | 6 +++--- src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi index 03d91025d0e..49848b62df2 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi @@ -50,7 +50,7 @@ cdef class BaseCompletionQueue: cdef grpc_completion_queue* c_ptr(self) -cdef class _EventLoopBound: +cdef class _BoundEventLoop: cdef readonly object loop cdef readonly object read_socket diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi index e8e569fdd86..1be10f9f2cb 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi @@ -38,7 +38,7 @@ cdef class BaseCompletionQueue: return self._cq -cdef class _EventLoopBound: +cdef class _BoundEventLoop: def __cinit__(self, object loop, object read_socket, object handler): self.loop = loop @@ -73,11 +73,11 @@ cdef class PollerCompletionQueue(BaseCompletionQueue): self._queue = cpp_event_queue() - def bound_loop(self, object loop): + def bind_loop(self, object loop): if loop in self._loops: return else: - self._loops[loop] = _EventLoopBound(loop, self._read_socket, self._handle_events) + self._loops[loop] = _BoundEventLoop(loop, self._read_socket, self._handle_events) cdef void _poll(self) nogil: cdef grpc_event event diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi index 548c564d757..06c92cac586 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi @@ -111,10 +111,10 @@ cdef _actual_aio_shutdown(): raise ValueError('Unsupported engine type [%s]' % _global_aio_state.engine) -cdef _per_loop_initialization(): +cdef _initialize_per_loop(): cdef object loop = get_working_loop() if _global_aio_state.engine is AsyncIOEngine.POLLER: - _global_aio_state.cq.bound_loop(loop) + _global_aio_state.cq.bind_loop(loop) cpdef init_grpc_aio(): @@ -127,7 +127,7 @@ cpdef init_grpc_aio(): _global_aio_state.refcount += 1 if _global_aio_state.refcount == 1: _actual_aio_initialization() - _per_loop_initialization() + _initialize_per_loop() cpdef shutdown_grpc_aio(): From e7f42f1ff994ecbd4f010af0b6db781f1c04075b Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 7 Jul 2020 10:45:11 -0700 Subject: [PATCH 212/239] Add type annotation in comments --- .../grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi index 49848b62df2..1c5fb8dd219 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi @@ -52,18 +52,18 @@ cdef class BaseCompletionQueue: cdef class _BoundEventLoop: cdef readonly object loop - cdef readonly object read_socket + cdef readonly object read_socket # socket.socket cdef class PollerCompletionQueue(BaseCompletionQueue): cdef bint _shutdown cdef cpp_event_queue _queue cdef mutex _queue_mutex - cdef object _poller_thread + cdef object _poller_thread # threading.Thread cdef int _write_fd - cdef object _read_socket - cdef object _write_socket - cdef dict _loops + cdef object _read_socket # socket.socket + cdef object _write_socket # socket.socket + cdef dict _loops # Mapping[asyncio.AbstractLoop, _BoundEventLoop] cdef void _poll(self) nogil cdef shutdown(self) From 9404f66f702294482ac4ac3cdd30b83c31a427fe Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 7 Jul 2020 11:27:08 -0700 Subject: [PATCH 213/239] Replace most uses of gpr_asprintf() with absl calls. --- .../client_channel/http_connect_handshaker.cc | 11 +-- .../ext/filters/client_channel/http_proxy.cc | 10 ++- .../client_channel/lb_policy/grpclb/grpclb.cc | 12 ++- .../lb_policy/subchannel_list.h | 10 +-- .../client_channel/lb_policy_registry.cc | 9 +-- .../dns/c_ares/grpc_ares_ev_driver.cc | 11 +-- .../dns/c_ares/grpc_ares_ev_driver_libuv.cc | 14 ++-- .../dns/c_ares/grpc_ares_ev_driver_posix.cc | 13 +-- .../dns/c_ares/grpc_ares_ev_driver_windows.cc | 14 ++-- .../resolver/dns/c_ares/grpc_ares_wrapper.cc | 79 ++++++++----------- .../client_channel/resolver_registry.cc | 27 +++---- .../client_channel/resolver_result_parsing.cc | 13 ++- .../ext/filters/client_channel/subchannel.cc | 2 +- .../client_channel/xds/xds_bootstrap.cc | 35 +++----- .../filters/client_channel/xds/xds_client.cc | 20 +++-- .../client_channel/xds/xds_client_stats.h | 19 +++-- .../filters/http/client/http_client_filter.cc | 10 +-- .../message_decompress_filter.cc | 15 ++-- .../server_load_reporting_filter.cc | 50 +++++------- .../server_load_reporting_filter.h | 7 +- .../message_size/message_size_filter.cc | 30 +++---- .../transport/chttp2/server/chttp2_server.cc | 6 +- .../server/insecure/server_chttp2_posix.cc | 12 ++- .../server/secure/server_secure_chttp2.cc | 13 ++- .../chttp2/transport/flow_control.cc | 49 ++++++------ .../transport/chttp2/transport/frame_data.cc | 21 +++-- .../chttp2/transport/frame_goaway.cc | 10 +-- .../transport/chttp2/transport/frame_ping.cc | 11 ++- .../chttp2/transport/frame_rst_stream.cc | 25 +++--- .../chttp2/transport/frame_settings.cc | 13 ++- .../chttp2/transport/frame_window_update.cc | 21 +++-- .../chttp2/transport/hpack_parser.cc | 54 ++++++------- .../transport/chttp2/transport/hpack_table.cc | 30 +++---- .../ext/transport/chttp2/transport/parsing.cc | 76 ++++++++---------- .../cronet/transport/cronet_transport.cc | 20 ++--- src/core/lib/channel/channel_trace.cc | 8 +- src/core/lib/channel/channelz.cc | 20 ++--- src/core/lib/gpr/log_linux.cc | 14 ++-- src/core/lib/gpr/log_posix.cc | 14 ++-- src/core/lib/gpr/string.cc | 19 ++--- src/core/lib/gpr/string.h | 6 +- src/core/lib/gprpp/global_config_env.cc | 14 ++-- src/core/lib/http/httpcli.cc | 23 +++--- .../lib/http/httpcli_security_connector.cc | 10 +-- src/core/lib/iomgr/endpoint_pair_posix.cc | 20 ++--- src/core/lib/iomgr/error_cfstream.cc | 17 ++-- src/core/lib/iomgr/ev_epoll1_linux.cc | 11 ++- src/core/lib/iomgr/ev_epollex_linux.cc | 30 +++---- src/core/lib/iomgr/ev_poll_posix.cc | 11 +-- src/core/lib/iomgr/resolve_address_custom.cc | 31 +++----- src/core/lib/iomgr/resolve_address_windows.cc | 16 ++-- src/core/lib/iomgr/resource_quota.cc | 57 ++++++------- src/core/lib/iomgr/sockaddr_utils.cc | 12 +-- src/core/lib/iomgr/sockaddr_utils.h | 2 +- src/core/lib/iomgr/socket_windows.cc | 9 +-- src/core/lib/iomgr/tcp_client_cfstream.cc | 20 +++-- src/core/lib/iomgr/tcp_client_custom.cc | 15 ++-- src/core/lib/iomgr/tcp_client_posix.cc | 63 +++++++-------- src/core/lib/iomgr/tcp_client_windows.cc | 18 ++--- src/core/lib/iomgr/tcp_custom.cc | 2 +- src/core/lib/iomgr/tcp_custom.h | 2 +- src/core/lib/iomgr/tcp_server_custom.cc | 14 +--- src/core/lib/iomgr/tcp_server_posix.cc | 44 +++++------ .../iomgr/tcp_server_utils_posix_common.cc | 12 ++- .../iomgr/tcp_server_utils_posix_ifaddrs.cc | 13 +-- src/core/lib/iomgr/tcp_server_windows.cc | 26 +++--- src/core/lib/iomgr/timer_generic.cc | 25 +++--- src/core/lib/iomgr/udp_server.cc | 9 ++- src/core/lib/iomgr/unix_sockets_posix.cc | 23 +++--- src/core/lib/iomgr/unix_sockets_posix.h | 4 +- src/core/lib/iomgr/unix_sockets_posix_noop.cc | 7 +- src/core/lib/json/json_reader.cc | 41 +++++----- .../lib/security/credentials/credentials.h | 8 +- .../google_default/credentials_generic.cc | 14 ++-- .../google_default_credentials.cc | 21 ++--- .../credentials/jwt/jwt_credentials.cc | 11 ++- .../credentials/oauth2/oauth2_credentials.cc | 47 +++++------ .../credentials/plugin/plugin_credentials.cc | 12 +-- .../fake/fake_security_connector.cc | 20 ++--- .../ssl/ssl_security_connector.cc | 20 +++-- .../security/security_connector/ssl_utils.cc | 16 ++-- .../tls/tls_security_connector.cc | 38 +++++---- .../security/transport/client_auth_filter.cc | 19 ++--- src/core/lib/security/util/json_util.cc | 25 +++--- src/core/lib/slice/slice.cc | 39 ++++++++- src/core/lib/slice/slice_internal.h | 1 + src/core/lib/surface/call.cc | 65 +++++++-------- src/core/lib/uri/uri_parser.cc | 23 ++---- .../parse_address_with_named_scope_id_test.cc | 16 ++-- .../resolvers/fake_resolver_test.cc | 13 +-- test/core/end2end/dualstack_socket_test.cc | 5 +- test/core/end2end/fixtures/h2_http_proxy.cc | 25 +++--- test/core/end2end/fixtures/h2_uds.cc | 31 ++++---- .../end2end/fixtures/http_proxy_fixture.cc | 12 +-- test/core/end2end/goaway_server_test.cc | 21 ++--- test/core/end2end/tests/compressed_payload.cc | 13 +-- test/core/end2end/tests/high_initial_seqno.cc | 13 +-- test/core/end2end/tests/hpack_size.cc | 13 +-- .../end2end/tests/invoke_large_request.cc | 15 ++-- test/core/end2end/tests/no_logging.cc | 11 +-- test/core/end2end/tests/retry_cancellation.cc | 12 +-- .../stream_compression_compressed_payload.cc | 13 +-- test/core/fling/fling_stream_test.cc | 18 ++--- test/core/fling/fling_test.cc | 19 ++--- test/core/handshake/client_ssl.cc | 13 +-- test/core/handshake/server_ssl_common.cc | 12 +-- test/core/handshake/verify_peer_options.cc | 20 ++--- test/core/http/parser_test.cc | 14 ++-- test/core/iomgr/resolve_address_posix_test.cc | 21 +++-- test/core/iomgr/sockaddr_utils_test.cc | 9 +-- test/core/security/credentials_test.cc | 52 ++++++------ .../surface/concurrent_connectivity_test.cc | 44 +++++------ test/core/surface/server_test.cc | 26 +++--- .../transport/chttp2/hpack_encoder_test.cc | 24 +++--- .../core/transport/chttp2/hpack_table_test.cc | 30 +++---- .../transport/chttp2/settings_timeout_test.cc | 22 +++--- test/core/transport/metadata_test.cc | 19 ++--- test/core/transport/timeout_encoding_test.cc | 35 ++++---- .../alts_concurrent_connectivity_test.cc | 10 +-- test/core/tsi/transport_security_test.cc | 25 +++--- test/core/util/mock_endpoint.cc | 14 ++-- test/core/util/passthru_endpoint.cc | 12 +-- test/cpp/client/client_channel_stress_test.cc | 10 +-- test/cpp/end2end/client_lb_end2end_test.cc | 10 +-- test/cpp/end2end/grpclb_end2end_test.cc | 17 ++-- .../end2end/service_config_end2end_test.cc | 10 +-- test/cpp/end2end/xds_end2end_test.cc | 9 +-- test/cpp/interop/interop_client.cc | 54 ++++++------- test/cpp/interop/interop_test.cc | 37 ++++----- test/cpp/naming/cancel_ares_query_test.cc | 25 +++--- test/cpp/naming/resolver_component_test.cc | 41 +++++----- 131 files changed, 1304 insertions(+), 1394 deletions(-) diff --git a/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/src/core/ext/filters/client_channel/http_connect_handshaker.cc index 6e8c84e4a63..3f60f0ff373 100644 --- a/src/core/ext/filters/client_channel/http_connect_handshaker.cc +++ b/src/core/ext/filters/client_channel/http_connect_handshaker.cc @@ -22,6 +22,8 @@ #include +#include "absl/strings/str_cat.h" + #include #include #include @@ -241,11 +243,10 @@ void HttpConnectHandshaker::OnReadDone(void* arg, grpc_error* error) { // Make sure we got a 2xx response. if (handshaker->http_response_.status < 200 || handshaker->http_response_.status >= 300) { - char* msg; - gpr_asprintf(&msg, "HTTP proxy returned response code %d", - handshaker->http_response_.status); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("HTTP proxy returned response code ", + handshaker->http_response_.status) + .c_str()); handshaker->HandshakeFailedLocked(error); goto done; } diff --git a/src/core/ext/filters/client_channel/http_proxy.cc b/src/core/ext/filters/client_channel/http_proxy.cc index d4900547bde..9bd3fe3e015 100644 --- a/src/core/ext/filters/client_channel/http_proxy.cc +++ b/src/core/ext/filters/client_channel/http_proxy.cc @@ -23,6 +23,8 @@ #include #include +#include "absl/strings/str_cat.h" + #include #include #include @@ -176,13 +178,13 @@ class HttpProxyMapper : public ProxyMapperInterface { /* Use base64 encoding for user credentials as stated in RFC 7617 */ char* encoded_user_cred = grpc_base64_encode(user_cred, strlen(user_cred), 0, 0); - char* header; - gpr_asprintf(&header, "Proxy-Authorization:Basic %s", encoded_user_cred); + std::string header = + absl::StrCat("Proxy-Authorization:Basic ", encoded_user_cred); gpr_free(encoded_user_cred); args_to_add[1] = grpc_channel_arg_string_create( - (char*)GRPC_ARG_HTTP_CONNECT_HEADERS, header); + const_cast(GRPC_ARG_HTTP_CONNECT_HEADERS), + const_cast(header.c_str())); *new_args = grpc_channel_args_copy_and_add(args, args_to_add, 2); - gpr_free(header); } else { *new_args = grpc_channel_args_copy_and_add(args, args_to_add, 1); } diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index c39bf8e28be..3f01a931a48 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -65,6 +65,7 @@ #include #include "absl/container/inlined_vector.h" +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" @@ -547,12 +548,10 @@ ServerAddressList GrpcLb::Serverlist::GetServerAddressList( memcpy(lb_token, server.load_balance_token, lb_token_length); lb_token[lb_token_length] = '\0'; } else { - char* uri = grpc_sockaddr_to_uri(&addr); gpr_log(GPR_INFO, "Missing LB token for backend address '%s'. The empty token will " "be used instead", - uri); - gpr_free(uri); + grpc_sockaddr_to_uri(&addr).c_str()); lb_token[0] = '\0'; } // Add address. @@ -1458,11 +1457,10 @@ void GrpcLb::ProcessAddressesAndChannelArgsLocked( balancer_addresses, response_generator_.get(), &args); // Create balancer channel if needed. if (lb_channel_ == nullptr) { - char* uri_str; - gpr_asprintf(&uri_str, "fake:///%s", server_name_); - lb_channel_ = CreateGrpclbBalancerChannel(uri_str, *lb_channel_args); + std::string uri_str = absl::StrCat("fake:///", server_name_); + lb_channel_ = + CreateGrpclbBalancerChannel(uri_str.c_str(), *lb_channel_args); GPR_ASSERT(lb_channel_ != nullptr); - gpr_free(uri_str); } // Propagate updates to the LB channel (pick_first) through the fake // resolver. diff --git a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h index 93c5deb7957..940bad02b9d 100644 --- a/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +++ b/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h @@ -390,23 +390,21 @@ SubchannelList::SubchannelList( if (subchannel == nullptr) { // Subchannel could not be created. if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) { - char* address_uri = grpc_sockaddr_to_uri(&addresses[i].address()); gpr_log(GPR_INFO, "[%s %p] could not create subchannel for address uri %s, " "ignoring", - tracer_->name(), policy_, address_uri); - gpr_free(address_uri); + tracer_->name(), policy_, + grpc_sockaddr_to_uri(&addresses[i].address()).c_str()); } continue; } if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) { - char* address_uri = grpc_sockaddr_to_uri(&addresses[i].address()); gpr_log(GPR_INFO, "[%s %p] subchannel list %p index %" PRIuPTR ": Created subchannel %p for address uri %s", tracer_->name(), policy_, this, subchannels_.size(), - subchannel.get(), address_uri); - gpr_free(address_uri); + subchannel.get(), + grpc_sockaddr_to_uri(&addresses[i].address()).c_str()); } subchannels_.emplace_back(this, addresses[i], std::move(subchannel)); } diff --git a/src/core/ext/filters/client_channel/lb_policy_registry.cc b/src/core/ext/filters/client_channel/lb_policy_registry.cc index 806d6b3d8b4..d0cfab6dfca 100644 --- a/src/core/ext/filters/client_channel/lb_policy_registry.cc +++ b/src/core/ext/filters/client_channel/lb_policy_registry.cc @@ -23,6 +23,7 @@ #include #include "absl/container/inlined_vector.h" +#include "absl/strings/str_format.h" #include "src/core/lib/gpr/string.h" @@ -168,11 +169,9 @@ LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(const Json& json, LoadBalancingPolicyFactory* factory = g_state->GetLoadBalancingPolicyFactory(policy->first.c_str()); if (factory == nullptr) { - char* msg; - gpr_asprintf(&msg, "Factory not found for policy \"%s\"", - policy->first.c_str()); - *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("Factory not found for policy \"%s\"", policy->first) + .c_str()); return nullptr; } // Parse load balancing config via factory. diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc index 7e546a38bfb..0b74f718e9e 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc @@ -23,6 +23,8 @@ #include #include +#include "absl/strings/str_cat.h" + #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h" #include @@ -155,11 +157,10 @@ grpc_error* grpc_ares_ev_driver_create_locked( grpc_ares_test_only_inject_config((*ev_driver)->channel); GRPC_CARES_TRACE_LOG("request:%p grpc_ares_ev_driver_create_locked", request); if (status != ARES_SUCCESS) { - char* err_msg; - gpr_asprintf(&err_msg, "Failed to init ares channel. C-ares error: %s", - ares_strerror(status)); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(err_msg); - gpr_free(err_msg); + grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Failed to init ares channel. C-ares error: ", + ares_strerror(status)) + .c_str()); gpr_free(*ev_driver); return err; } diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc index 3d293eea960..e5eea5c6a13 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc @@ -20,6 +20,8 @@ #include "src/core/lib/iomgr/port.h" #if GRPC_ARES == 1 && defined(GRPC_UV) +#include "absl/strings/str_format.h" + #include #include @@ -43,15 +45,14 @@ class GrpcPolledFdLibuv : public GrpcPolledFd { public: GrpcPolledFdLibuv(ares_socket_t as, std::shared_ptr work_serializer) - : as_(as), work_serializer_(std::move(work_serializer)) { - gpr_asprintf(&name_, "c-ares socket: %" PRIdPTR, (intptr_t)as); + : name_(absl::StrFormat("c-ares socket: %" PRIdPTR, (intptr_t)as)), + as_(as), + work_serializer_(std::move(work_serializer)) { handle_ = new uv_poll_t(); uv_poll_init_socket(uv_default_loop(), handle_, as); handle_->data = this; } - ~GrpcPolledFdLibuv() { gpr_free(name_); } - void RegisterForOnReadableLocked(grpc_closure* read_closure) override { GPR_ASSERT(read_closure_ == nullptr); GPR_ASSERT((poll_events_ & UV_READABLE) == 0); @@ -98,9 +99,10 @@ class GrpcPolledFdLibuv : public GrpcPolledFd { ares_socket_t GetWrappedAresSocketLocked() override { return as_; } - const char* GetName() override { return name_; } + const char* GetName() override { return name_.c_str(); } - char* name_; + // TODO(apolcyn): Data members should be private. + std::string name_; ares_socket_t as_; uv_poll_t* handle_; grpc_closure* read_closure_ = nullptr; diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc index a6ff49b58f2..e2424fcdcfa 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc @@ -24,6 +24,8 @@ #include #include +#include "absl/strings/str_cat.h" + #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h" #include @@ -41,15 +43,13 @@ namespace grpc_core { class GrpcPolledFdPosix : public GrpcPolledFd { public: GrpcPolledFdPosix(ares_socket_t as, grpc_pollset_set* driver_pollset_set) - : as_(as) { - gpr_asprintf(&name_, "c-ares fd: %d", (int)as); - fd_ = grpc_fd_create((int)as, name_, false); + : name_(absl::StrCat("c-ares fd: ", (int)as)), as_(as) { + fd_ = grpc_fd_create((int)as, name_.c_str(), false); driver_pollset_set_ = driver_pollset_set; grpc_pollset_set_add_fd(driver_pollset_set_, fd_); } ~GrpcPolledFdPosix() { - gpr_free(name_); grpc_pollset_set_del_fd(driver_pollset_set_, fd_); /* c-ares library will close the fd inside grpc_fd. This fd may be picked up immediately by another thread, and should not be closed by the following @@ -78,9 +78,10 @@ class GrpcPolledFdPosix : public GrpcPolledFd { ares_socket_t GetWrappedAresSocketLocked() override { return as_; } - const char* GetName() override { return name_; } + const char* GetName() override { return name_.c_str(); } - char* name_; + private: + std::string name_; ares_socket_t as_; grpc_fd* fd_; grpc_pollset_set* driver_pollset_set_; diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc index 1b5bfb0662b..5fce1c4e356 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc @@ -20,6 +20,8 @@ #include "src/core/lib/iomgr/port.h" #if GRPC_ARES == 1 && defined(GRPC_WINDOWS_SOCKET_ARES_EV_DRIVER) +#include "absl/strings/str_format.h" + #include #include @@ -100,14 +102,14 @@ class GrpcPolledFdWindows { GrpcPolledFdWindows(ares_socket_t as, std::shared_ptr work_serializer, int address_family, int socket_type) - : work_serializer_(std::move(work_serializer)), + : name_(absl::StrFormat("c-ares socket: %" PRIdPTR, as)), + work_serializer_(std::move(work_serializer)), read_buf_(grpc_empty_slice()), write_buf_(grpc_empty_slice()), tcp_write_state_(WRITE_IDLE), gotten_into_driver_list_(false), address_family_(address_family), socket_type_(socket_type) { - gpr_asprintf(&name_, "c-ares socket: %" PRIdPTR, as); // Closure Initialization GRPC_CLOSURE_INIT(&outer_read_closure_, &GrpcPolledFdWindows::OnIocpReadable, this, @@ -118,7 +120,7 @@ class GrpcPolledFdWindows { GRPC_CLOSURE_INIT(&on_tcp_connect_locked_, &GrpcPolledFdWindows::OnTcpConnect, this, grpc_schedule_on_exec_ctx); - winsocket_ = grpc_winsocket_create(as, name_); + winsocket_ = grpc_winsocket_create(as, name_.c_str()); } ~GrpcPolledFdWindows() { @@ -127,7 +129,6 @@ class GrpcPolledFdWindows { GPR_ASSERT(read_closure_ == nullptr); GPR_ASSERT(write_closure_ == nullptr); grpc_winsocket_destroy(winsocket_); - gpr_free(name_); } void ScheduleAndNullReadClosure(grpc_error* error) { @@ -260,7 +261,7 @@ class GrpcPolledFdWindows { return grpc_winsocket_wrapped_socket(winsocket_); } - const char* GetName() { return name_; } + const char* GetName() { return name_.c_str(); } ares_ssize_t RecvFrom(WSAErrorContext* wsa_error_ctx, void* data, ares_socket_t data_len, int flags, @@ -657,6 +658,7 @@ class GrpcPolledFdWindows { bool gotten_into_driver_list() const { return gotten_into_driver_list_; } void set_gotten_into_driver_list() { gotten_into_driver_list_ = true; } + private: std::shared_ptr work_serializer_; char recv_from_source_addr_[200]; ares_socklen_t recv_from_source_addr_len_; @@ -670,7 +672,7 @@ class GrpcPolledFdWindows { grpc_winsocket* winsocket_; // tcp_write_state_ is only used on TCP GrpcPolledFds WriteState tcp_write_state_; - char* name_ = nullptr; + std::string name_; bool gotten_into_driver_list_; int address_family_; int socket_type_; diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc index 2d4141c357d..611e73321a4 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc @@ -27,6 +27,8 @@ #include #include "absl/container/inlined_vector.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" #include #include @@ -277,15 +279,12 @@ static void on_hostbyname_done_locked(void* arg, int status, int /*timeouts*/, } } } else { - char* error_msg; - gpr_asprintf(&error_msg, - "C-ares status is not ARES_SUCCESS " - "qtype=%s name=%s is_balancer=%d: %s", - hr->qtype, hr->host, hr->is_balancer, ares_strerror(status)); + std::string error_msg = absl::StrFormat( + "C-ares status is not ARES_SUCCESS qtype=%s name=%s is_balancer=%d: %s", + hr->qtype, hr->host, hr->is_balancer, ares_strerror(status)); GRPC_CARES_TRACE_LOG("request:%p on_hostbyname_done_locked: %s", r, - error_msg); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg); - gpr_free(error_msg); + error_msg.c_str()); + grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg.c_str()); r->error = grpc_error_add_child(error, r->error); } destroy_hostbyname_request_locked(hr); @@ -326,15 +325,12 @@ static void on_srv_query_done_locked(void* arg, int status, int /*timeouts*/, ares_free_data(reply); } } else { - char* error_msg; - gpr_asprintf(&error_msg, - "C-ares status is not ARES_SUCCESS " - "qtype=SRV name=%s: %s", - q->name().c_str(), ares_strerror(status)); + std::string error_msg = absl::StrFormat( + "C-ares status is not ARES_SUCCESS qtype=SRV name=%s: %s", q->name(), + ares_strerror(status)); GRPC_CARES_TRACE_LOG("request:%p on_srv_query_done_locked: %s", r, - error_msg); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg); - gpr_free(error_msg); + error_msg.c_str()); + grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg.c_str()); r->error = grpc_error_add_child(error, r->error); } delete q; @@ -344,8 +340,8 @@ static const char g_service_config_attribute_prefix[] = "grpc_config="; static void on_txt_done_locked(void* arg, int status, int /*timeouts*/, unsigned char* buf, int len) { - char* error_msg; GrpcAresQuery* q = static_cast(arg); + std::unique_ptr query_deleter(q); grpc_ares_request* r = q->parent_request(); const size_t prefix_len = sizeof(g_service_config_attribute_prefix) - 1; struct ares_txt_ext* result = nullptr; @@ -386,18 +382,15 @@ static void on_txt_done_locked(void* arg, int status, int /*timeouts*/, } // Clean up. ares_free_data(reply); - goto done; + return; fail: - gpr_asprintf(&error_msg, - "C-ares status is not ARES_SUCCESS " - "qtype=TXT name=%s: %s", - q->name().c_str(), ares_strerror(status)); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg); - GRPC_CARES_TRACE_LOG("request:%p on_txt_done_locked %s", r, error_msg); - gpr_free(error_msg); + std::string error_msg = + absl::StrFormat("C-ares status is not ARES_SUCCESS qtype=TXT name=%s: %s", + q->name(), ares_strerror(status)); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg.c_str()); + GRPC_CARES_TRACE_LOG("request:%p on_txt_done_locked %s", r, + error_msg.c_str()); r->error = grpc_error_add_child(error, r->error); -done: - delete q; } void grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked( @@ -459,11 +452,10 @@ void grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked( } int status = ares_set_servers_ports(*channel, &r->dns_server_addr); if (status != ARES_SUCCESS) { - char* error_msg; - gpr_asprintf(&error_msg, "C-ares status is not ARES_SUCCESS: %s", - ares_strerror(status)); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg); - gpr_free(error_msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("C-ares status is not ARES_SUCCESS: ", + ares_strerror(status)) + .c_str()); goto error_cleanup; } } @@ -482,20 +474,16 @@ void grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked( hr); if (r->balancer_addresses_out != nullptr) { /* Query the SRV record */ - char* service_name; - gpr_asprintf(&service_name, "_grpclb._tcp.%s", host.c_str()); + std::string service_name = absl::StrCat("_grpclb._tcp.", host); GrpcAresQuery* srv_query = new GrpcAresQuery(r, service_name); - ares_query(*channel, service_name, ns_c_in, ns_t_srv, + ares_query(*channel, service_name.c_str(), ns_c_in, ns_t_srv, on_srv_query_done_locked, srv_query); - gpr_free(service_name); } if (r->service_config_json_out != nullptr) { - char* config_name; - gpr_asprintf(&config_name, "_grpc_config.%s", host.c_str()); + std::string config_name = absl::StrCat("_grpc_config.", host); GrpcAresQuery* txt_query = new GrpcAresQuery(r, config_name); - ares_search(*channel, config_name, ns_c_in, ns_t_txt, on_txt_done_locked, - txt_query); - gpr_free(config_name); + ares_search(*channel, config_name.c_str(), ns_c_in, ns_t_txt, + on_txt_done_locked, txt_query); } grpc_ares_ev_driver_start_locked(r->ev_driver); grpc_ares_request_unref_locked(r); @@ -709,12 +697,9 @@ void (*grpc_cancel_ares_request_locked)(grpc_ares_request* r) = grpc_error* grpc_ares_init(void) { int status = ares_library_init(ARES_LIB_INIT_ALL); if (status != ARES_SUCCESS) { - char* error_msg; - gpr_asprintf(&error_msg, "ares_library_init failed: %s", - ares_strerror(status)); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg); - gpr_free(error_msg); - return error; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("ares_library_init failed: ", ares_strerror(status)) + .c_str()); } return GRPC_ERROR_NONE; } diff --git a/src/core/ext/filters/client_channel/resolver_registry.cc b/src/core/ext/filters/client_channel/resolver_registry.cc index c7f78389ac8..d97fd8dfec6 100644 --- a/src/core/ext/filters/client_channel/resolver_registry.cc +++ b/src/core/ext/filters/client_channel/resolver_registry.cc @@ -23,6 +23,7 @@ #include #include "absl/container/inlined_vector.h" +#include "absl/strings/str_cat.h" #include #include @@ -65,22 +66,22 @@ class RegistryState { // If \a default_prefix_ needs to be prepended, sets \a canonical_target // to the canonical target string. ResolverFactory* FindResolverFactory(const char* target, grpc_uri** uri, - char** canonical_target) const { + std::string* canonical_target) const { GPR_ASSERT(uri != nullptr); *uri = grpc_uri_parse(target, 1); ResolverFactory* factory = *uri == nullptr ? nullptr : LookupResolverFactory((*uri)->scheme); if (factory == nullptr) { grpc_uri_destroy(*uri); - gpr_asprintf(canonical_target, "%s%s", default_prefix_.get(), target); - *uri = grpc_uri_parse(*canonical_target, 1); + *canonical_target = absl::StrCat(default_prefix_.get(), target); + *uri = grpc_uri_parse(canonical_target->c_str(), 1); factory = *uri == nullptr ? nullptr : LookupResolverFactory((*uri)->scheme); if (factory == nullptr) { grpc_uri_destroy(grpc_uri_parse(target, 0)); - grpc_uri_destroy(grpc_uri_parse(*canonical_target, 0)); + grpc_uri_destroy(grpc_uri_parse(canonical_target->c_str(), 0)); gpr_log(GPR_ERROR, "don't know how to resolve '%s' or '%s'", target, - *canonical_target); + canonical_target->c_str()); } } return factory; @@ -136,12 +137,11 @@ ResolverFactory* ResolverRegistry::LookupResolverFactory(const char* scheme) { bool ResolverRegistry::IsValidTarget(const char* target) { grpc_uri* uri = nullptr; - char* canonical_target = nullptr; + std::string canonical_target; ResolverFactory* factory = g_state->FindResolverFactory(target, &uri, &canonical_target); bool result = factory == nullptr ? false : factory->IsValidUri(uri); grpc_uri_destroy(uri); - gpr_free(canonical_target); return result; } @@ -152,7 +152,7 @@ OrphanablePtr ResolverRegistry::CreateResolver( std::unique_ptr result_handler) { GPR_ASSERT(g_state != nullptr); grpc_uri* uri = nullptr; - char* canonical_target = nullptr; + std::string canonical_target; ResolverFactory* factory = g_state->FindResolverFactory(target, &uri, &canonical_target); ResolverArgs resolver_args; @@ -165,7 +165,6 @@ OrphanablePtr ResolverRegistry::CreateResolver( factory == nullptr ? nullptr : factory->CreateResolver(std::move(resolver_args)); grpc_uri_destroy(uri); - gpr_free(canonical_target); return resolver; } @@ -173,13 +172,12 @@ grpc_core::UniquePtr ResolverRegistry::GetDefaultAuthority( const char* target) { GPR_ASSERT(g_state != nullptr); grpc_uri* uri = nullptr; - char* canonical_target = nullptr; + std::string canonical_target; ResolverFactory* factory = g_state->FindResolverFactory(target, &uri, &canonical_target); grpc_core::UniquePtr authority = factory == nullptr ? nullptr : factory->GetDefaultAuthority(uri); grpc_uri_destroy(uri); - gpr_free(canonical_target); return authority; } @@ -187,11 +185,12 @@ grpc_core::UniquePtr ResolverRegistry::AddDefaultPrefixIfNeeded( const char* target) { GPR_ASSERT(g_state != nullptr); grpc_uri* uri = nullptr; - char* canonical_target = nullptr; + std::string canonical_target; g_state->FindResolverFactory(target, &uri, &canonical_target); grpc_uri_destroy(uri); - return grpc_core::UniquePtr( - canonical_target == nullptr ? gpr_strdup(target) : canonical_target); + return grpc_core::UniquePtr(canonical_target.empty() + ? gpr_strdup(target) + : gpr_strdup(canonical_target.c_str())); } } // namespace grpc_core diff --git a/src/core/ext/filters/client_channel/resolver_result_parsing.cc b/src/core/ext/filters/client_channel/resolver_result_parsing.cc index e7afde9450b..5203748388d 100644 --- a/src/core/ext/filters/client_channel/resolver_result_parsing.cc +++ b/src/core/ext/filters/client_channel/resolver_result_parsing.cc @@ -24,6 +24,7 @@ #include #include +#include "absl/strings/str_cat.h" #include "absl/types/optional.h" #include @@ -353,13 +354,11 @@ ClientChannelServiceConfigParser::ParseGlobalParams(const Json& json, error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( "field:loadBalancingPolicy error:Unknown lb policy")); } else if (requires_config) { - char* error_msg; - gpr_asprintf(&error_msg, - "field:loadBalancingPolicy error:%s requires a config. " - "Please use loadBalancingConfig instead.", - lb_policy_name.c_str()); - error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg)); - gpr_free(error_msg); + error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("field:loadBalancingPolicy error:", lb_policy_name, + " requires a config. Please use loadBalancingConfig " + "instead.") + .c_str())); } } } diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc index f350b2ec36a..89a13a3ef74 100644 --- a/src/core/ext/filters/client_channel/subchannel.cc +++ b/src/core/ext/filters/client_channel/subchannel.cc @@ -872,7 +872,7 @@ grpc_arg Subchannel::CreateSubchannelAddressArg( const grpc_resolved_address* addr) { return grpc_channel_arg_string_create( (char*)GRPC_ARG_SUBCHANNEL_ADDRESS, - addr->len > 0 ? grpc_sockaddr_to_uri(addr) : gpr_strdup("")); + gpr_strdup(addr->len > 0 ? grpc_sockaddr_to_uri(addr).c_str() : "")); } const char* Subchannel::GetUriFromSubchannelAddressArg( diff --git a/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc b/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc index 25ce4a7f5d1..7372d70c043 100644 --- a/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +++ b/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc @@ -23,12 +23,11 @@ #include #include +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include "absl/strings/string_view.h" -#include - #include "src/core/lib/gpr/env.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/load_file.h" @@ -98,11 +97,9 @@ std::unique_ptr XdsBootstrap::ReadFromFile(XdsClient* client, Json json = Json::Parse(contents_str_view, error); grpc_slice_unref_internal(contents); if (*error != GRPC_ERROR_NONE) { - char* msg; - gpr_asprintf(&msg, "Failed to parse bootstrap file %s", path.get()); - grpc_error* error_out = - GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(msg, error, 1); - gpr_free(msg); + grpc_error* error_out = GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING( + absl::StrCat("Failed to parse bootstrap file ", path.get()).c_str(), + error, 1); GRPC_ERROR_UNREF(*error); *error = error_out; return nullptr; @@ -154,10 +151,8 @@ grpc_error* XdsBootstrap::ParseXdsServerList(Json* json) { for (size_t i = 0; i < json->mutable_array()->size(); ++i) { Json& child = json->mutable_array()->at(i); if (child.type() != Json::Type::OBJECT) { - char* msg; - gpr_asprintf(&msg, "array element %" PRIuPTR " is not an object", i); - error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg)); - gpr_free(msg); + error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("array element ", i, " is not an object").c_str())); } else { grpc_error* parse_error = ParseXdsServer(&child, i); if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error); @@ -194,10 +189,8 @@ grpc_error* XdsBootstrap::ParseXdsServer(Json* json, size_t idx) { // Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error // string is not static in this case. if (error_list.empty()) return GRPC_ERROR_NONE; - char* msg; - gpr_asprintf(&msg, "errors parsing index %" PRIuPTR, idx); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("errors parsing index ", idx).c_str()); for (size_t i = 0; i < error_list.size(); ++i) { error = grpc_error_add_child(error, error_list[i]); } @@ -210,10 +203,8 @@ grpc_error* XdsBootstrap::ParseChannelCredsArray(Json* json, for (size_t i = 0; i < json->mutable_array()->size(); ++i) { Json& child = json->mutable_array()->at(i); if (child.type() != Json::Type::OBJECT) { - char* msg; - gpr_asprintf(&msg, "array element %" PRIuPTR " is not an object", i); - error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg)); - gpr_free(msg); + error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("array element ", i, " is not an object").c_str())); } else { grpc_error* parse_error = ParseChannelCreds(&child, i, server); if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error); @@ -252,10 +243,8 @@ grpc_error* XdsBootstrap::ParseChannelCreds(Json* json, size_t idx, // Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error // string is not static in this case. if (error_list.empty()) return GRPC_ERROR_NONE; - char* msg; - gpr_asprintf(&msg, "errors parsing index %" PRIuPTR, idx); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("errors parsing index ", idx).c_str()); for (size_t i = 0; i < error_list.size(); ++i) { error = grpc_error_add_child(error, error_list[i]); } diff --git a/src/core/ext/filters/client_channel/xds/xds_client.cc b/src/core/ext/filters/client_channel/xds/xds_client.cc index 655e3895df8..6b4abf645c6 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.cc +++ b/src/core/ext/filters/client_channel/xds/xds_client.cc @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "src/core/ext/filters/client_channel/client_channel.h" @@ -180,13 +179,11 @@ class XdsClient::ChannelState::AdsCallState void OnTimerLocked(grpc_error* error) { if (error == GRPC_ERROR_NONE && timer_pending_) { timer_pending_ = false; - char* msg; - gpr_asprintf( - &msg, - "timeout obtaining resource {type=%s name=%s} from xds server", - type_url_.c_str(), name_.c_str()); - grpc_error* watcher_error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + grpc_error* watcher_error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat( + "timeout obtaining resource {type=%s name=%s} from xds server", + type_url_, name_) + .c_str()); if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) { gpr_log(GPR_INFO, "[xds_client %p] %s", ads_calld_->xds_client(), grpc_error_string(watcher_error)); @@ -1092,8 +1089,8 @@ void XdsClient::ChannelState::AdsCallState::AcceptEdsUpdate( "[xds_client %p] Priority %" PRIuPTR ", locality %" PRIuPTR " %s has weight %d, contains %" PRIuPTR " server addresses", xds_client(), priority, locality_count, - locality.name->AsHumanReadableString(), locality.lb_weight, - locality.serverlist.size()); + locality.name->AsHumanReadableString().c_str(), + locality.lb_weight, locality.serverlist.size()); for (size_t i = 0; i < locality.serverlist.size(); ++i) { std::string ipport = grpc_sockaddr_to_string( &locality.serverlist[i].address(), false); @@ -1101,7 +1098,8 @@ void XdsClient::ChannelState::AdsCallState::AcceptEdsUpdate( "[xds_client %p] Priority %" PRIuPTR ", locality %" PRIuPTR " %s, server address %" PRIuPTR ": %s", xds_client(), priority, locality_count, - locality.name->AsHumanReadableString(), i, ipport.c_str()); + locality.name->AsHumanReadableString().c_str(), i, + ipport.c_str()); } ++locality_count; } diff --git a/src/core/ext/filters/client_channel/xds/xds_client_stats.h b/src/core/ext/filters/client_channel/xds/xds_client_stats.h index b51da9cd2fa..4696935daad 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client_stats.h +++ b/src/core/ext/filters/client_channel/xds/xds_client_stats.h @@ -24,10 +24,10 @@ #include #include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" #include "absl/strings/string_view.h" -#include - #include "src/core/lib/gprpp/atomic.h" #include "src/core/lib/gprpp/memory.h" #include "src/core/lib/gprpp/ref_counted.h" @@ -80,21 +80,20 @@ class XdsLocalityName : public RefCounted { const std::string& zone() const { return zone_; } const std::string& sub_zone() const { return sub_zone_; } - const char* AsHumanReadableString() { - if (human_readable_string_ == nullptr) { - char* tmp; - gpr_asprintf(&tmp, "{region=\"%s\", zone=\"%s\", sub_zone=\"%s\"}", - region_.c_str(), zone_.c_str(), sub_zone_.c_str()); - human_readable_string_.reset(tmp); + const std::string& AsHumanReadableString() { + if (human_readable_string_.empty()) { + human_readable_string_ = + absl::StrFormat("{region=\"%s\", zone=\"%s\", sub_zone=\"%s\"}", + region_, zone_, sub_zone_); } - return human_readable_string_.get(); + return human_readable_string_; } private: std::string region_; std::string zone_; std::string sub_zone_; - UniquePtr human_readable_string_; + std::string human_readable_string_; }; // Drop stats for an xds cluster. diff --git a/src/core/ext/filters/http/client/http_client_filter.cc b/src/core/ext/filters/http/client/http_client_filter.cc index ef773b3a3ef..f09c60ce8f6 100644 --- a/src/core/ext/filters/http/client/http_client_filter.cc +++ b/src/core/ext/filters/http/client/http_client_filter.cc @@ -23,12 +23,12 @@ #include #include +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include #include -#include #include "src/core/ext/filters/http/client/http_client_filter.h" #include "src/core/lib/gpr/string.h" @@ -121,8 +121,8 @@ static grpc_error* client_filter_incoming_metadata(grpc_metadata_batch* b) { } else { char* val = grpc_dump_slice(GRPC_MDVALUE(b->idx.named.status->md), GPR_DUMP_ASCII); - char* msg; - gpr_asprintf(&msg, "Received http2 header with status: %s", val); + std::string msg = + absl::StrCat("Received http2 header with status: ", val); grpc_error* e = grpc_error_set_str( grpc_error_set_int( grpc_error_set_str( @@ -131,9 +131,9 @@ static grpc_error* client_filter_incoming_metadata(grpc_metadata_batch* b) { GRPC_ERROR_STR_VALUE, grpc_slice_from_copied_string(val)), GRPC_ERROR_INT_GRPC_STATUS, grpc_http2_status_to_grpc_status(atoi(val))), - GRPC_ERROR_STR_GRPC_MESSAGE, grpc_slice_from_copied_string(msg)); + GRPC_ERROR_STR_GRPC_MESSAGE, + grpc_slice_from_cpp_string(std::move(msg))); gpr_free(val); - gpr_free(msg); return e; } } diff --git a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc index c16ea66e7a3..4ab8a5638c5 100644 --- a/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +++ b/src/core/ext/filters/http/message_compress/message_decompress_filter.cc @@ -23,11 +23,12 @@ #include #include +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include "absl/strings/str_format.h" #include "src/core/ext/filters/message_size/message_size_filter.h" @@ -258,14 +259,12 @@ void CallData::FinishRecvMessage() { grpc_slice_buffer_init(&decompressed_slices); if (grpc_msg_decompress(algorithm_, &recv_slices_, &decompressed_slices) == 0) { - char* msg; - gpr_asprintf( - &msg, - "Unexpected error decompressing data for algorithm with enum value %d", - algorithm_); GPR_DEBUG_ASSERT(error_ == GRPC_ERROR_NONE); - error_ = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error_ = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Unexpected error decompressing data for algorithm with " + "enum value ", + algorithm_) + .c_str()); grpc_slice_buffer_destroy_internal(&decompressed_slices); } else { uint32_t recv_flags = diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc index 83c9f3aff29..01131c7a841 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.cc @@ -20,11 +20,14 @@ #include +#include + +#include "absl/strings/str_format.h" + #include #include #include #include -#include #include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h" #include "src/core/ext/filters/client_channel/parse_address.h" @@ -121,8 +124,7 @@ void ServerLoadReportingCallData::StartTransportStreamOpBatch( grpc_call_next_op(elem, op->op()); } -void ServerLoadReportingCallData::GetCensusSafeClientIpString( - char** client_ip_string, size_t* size) { +std::string ServerLoadReportingCallData::GetCensusSafeClientIpString() { // Find the client URI string. const char* client_uri_str = reinterpret_cast(gpr_atm_acq_load(peer_string_)); @@ -130,9 +132,7 @@ void ServerLoadReportingCallData::GetCensusSafeClientIpString( gpr_log(GPR_ERROR, "Unable to extract client URI string (peer string) from gRPC " "metadata."); - *client_ip_string = nullptr; - *size = 0; - return; + return ""; } // Parse the client URI string into grpc_uri. grpc_uri* client_uri = grpc_uri_parse(client_uri_str, true); @@ -140,9 +140,7 @@ void ServerLoadReportingCallData::GetCensusSafeClientIpString( gpr_log(GPR_ERROR, "Unable to parse the client URI string (peer string) to a client " "URI."); - *client_ip_string = nullptr; - *size = 0; - return; + return ""; } // Parse the client URI into grpc_resolved_address. grpc_resolved_address resolved_address; @@ -151,26 +149,23 @@ void ServerLoadReportingCallData::GetCensusSafeClientIpString( if (!success) { gpr_log(GPR_ERROR, "Unable to parse client URI into a grpc_resolved_address."); - *client_ip_string = nullptr; - *size = 0; - return; + return ""; } // Convert the socket address in the grpc_resolved_address into a hex string // according to the address family. grpc_sockaddr* addr = reinterpret_cast(resolved_address.addr); if (addr->sa_family == GRPC_AF_INET) { grpc_sockaddr_in* addr4 = reinterpret_cast(addr); - gpr_asprintf(client_ip_string, "%08x", grpc_ntohl(addr4->sin_addr.s_addr)); - *size = 8; + return absl::StrFormat("%08x", grpc_ntohl(addr4->sin_addr.s_addr)); } else if (addr->sa_family == GRPC_AF_INET6) { grpc_sockaddr_in6* addr6 = reinterpret_cast(addr); - *client_ip_string = static_cast(gpr_malloc(32 + 1)); + std::string client_ip; + client_ip.reserve(32); uint32_t* addr6_next_long = reinterpret_cast(&addr6->sin6_addr); for (size_t i = 0; i < 4; ++i) { - snprintf(*client_ip_string + 8 * i, 8 + 1, "%08x", - grpc_ntohl(*addr6_next_long++)); + absl::StrAppendFormat(&client_ip, "%08x", grpc_ntohl(*addr6_next_long++)); } - *size = 32; + return client_ip; } else { GPR_UNREACHABLE_CODE(); } @@ -178,31 +173,28 @@ void ServerLoadReportingCallData::GetCensusSafeClientIpString( void ServerLoadReportingCallData::StoreClientIpAndLrToken(const char* lr_token, size_t lr_token_len) { - char* client_ip; - size_t client_ip_len; - GetCensusSafeClientIpString(&client_ip, &client_ip_len); + std::string client_ip = GetCensusSafeClientIpString(); client_ip_and_lr_token_len_ = - kLengthPrefixSize + client_ip_len + lr_token_len; + kLengthPrefixSize + client_ip.size() + lr_token_len; client_ip_and_lr_token_ = static_cast( gpr_zalloc(client_ip_and_lr_token_len_ * sizeof(char))); char* cur_pos = client_ip_and_lr_token_; // Store the IP length prefix. - if (client_ip_len == 0) { + if (client_ip.size() == 0) { strncpy(cur_pos, kEmptyAddressLengthString, kLengthPrefixSize); - } else if (client_ip_len == 8) { + } else if (client_ip.size() == 8) { strncpy(cur_pos, kEncodedIpv4AddressLengthString, kLengthPrefixSize); - } else if (client_ip_len == 32) { + } else if (client_ip.size() == 32) { strncpy(cur_pos, kEncodedIpv6AddressLengthString, kLengthPrefixSize); } else { GPR_UNREACHABLE_CODE(); } cur_pos += kLengthPrefixSize; // Store the IP. - if (client_ip_len != 0) { - strncpy(cur_pos, client_ip, client_ip_len); + if (!client_ip.empty()) { + strncpy(cur_pos, client_ip.c_str(), client_ip.size()); } - gpr_free(client_ip); - cur_pos += client_ip_len; + cur_pos += client_ip.size(); // Store the LR token. if (lr_token_len != 0) { strncpy(cur_pos, lr_token, lr_token_len); diff --git a/src/core/ext/filters/load_reporting/server_load_reporting_filter.h b/src/core/ext/filters/load_reporting/server_load_reporting_filter.h index 10baf1f8332..3bfdc989059 100644 --- a/src/core/ext/filters/load_reporting/server_load_reporting_filter.h +++ b/src/core/ext/filters/load_reporting/server_load_reporting_filter.h @@ -21,6 +21,8 @@ #include +#include + #include "src/core/lib/channel/channel_stack.h" #include "src/cpp/common/channel_filter.h" @@ -54,9 +56,8 @@ class ServerLoadReportingCallData : public CallData { private: // From the peer_string_ in calld, extracts the client IP string (owned by - // caller), e.g., "01020a0b". Upon failure, set the output pointer to null and - // size to zero. - void GetCensusSafeClientIpString(char** client_ip_string, size_t* size); + // caller), e.g., "01020a0b". Upon failure, returns empty string. + std::string GetCensusSafeClientIpString(); // Concatenates the client IP address and the load reporting token, then // stores the result into the call data. diff --git a/src/core/ext/filters/message_size/message_size_filter.cc b/src/core/ext/filters/message_size/message_size_filter.cc index 89fdab6fae8..28dac7d7e49 100644 --- a/src/core/ext/filters/message_size/message_size_filter.cc +++ b/src/core/ext/filters/message_size/message_size_filter.cc @@ -21,10 +21,11 @@ #include #include +#include "absl/strings/str_format.h" + #include #include #include -#include #include "src/core/ext/filters/client_channel/service_config.h" #include "src/core/ext/filters/client_channel/service_config_call_data.h" @@ -198,17 +199,16 @@ static void recv_message_ready(void* user_data, grpc_error* error) { if (*calld->recv_message != nullptr && calld->limits.max_recv_size >= 0 && (*calld->recv_message)->length() > static_cast(calld->limits.max_recv_size)) { - char* message_string; - gpr_asprintf(&message_string, - "Received message larger than max (%u vs. %d)", - (*calld->recv_message)->length(), calld->limits.max_recv_size); grpc_error* new_error = grpc_error_set_int( - GRPC_ERROR_CREATE_FROM_COPIED_STRING(message_string), + GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("Received message larger than max (%u vs. %d)", + (*calld->recv_message)->length(), + calld->limits.max_recv_size) + .c_str()), GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED); error = grpc_error_add_child(GRPC_ERROR_REF(error), new_error); GRPC_ERROR_UNREF(calld->error); calld->error = GRPC_ERROR_REF(error); - gpr_free(message_string); } else { GRPC_ERROR_REF(error); } @@ -258,17 +258,17 @@ static void message_size_start_transport_stream_op_batch( if (op->send_message && calld->limits.max_send_size >= 0 && op->payload->send_message.send_message->length() > static_cast(calld->limits.max_send_size)) { - char* message_string; - gpr_asprintf(&message_string, "Sent message larger than max (%u vs. %d)", - op->payload->send_message.send_message->length(), - calld->limits.max_send_size); grpc_transport_stream_op_batch_finish_with_failure( op, - grpc_error_set_int(GRPC_ERROR_CREATE_FROM_COPIED_STRING(message_string), - GRPC_ERROR_INT_GRPC_STATUS, - GRPC_STATUS_RESOURCE_EXHAUSTED), + grpc_error_set_int( + GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat( + "Sent message larger than max (%u vs. %d)", + op->payload->send_message.send_message->length(), + calld->limits.max_send_size) + .c_str()), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED), calld->call_combiner); - gpr_free(message_string); return; } // Inject callback for receiving a message. diff --git a/src/core/ext/transport/chttp2/server/chttp2_server.cc b/src/core/ext/transport/chttp2/server/chttp2_server.cc index b173ba02499..d96479c4d03 100644 --- a/src/core/ext/transport/chttp2/server/chttp2_server.cc +++ b/src/core/ext/transport/chttp2/server/chttp2_server.cc @@ -24,15 +24,15 @@ #include #include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include #include #include -#include #include -#include "absl/strings/str_format.h" - #include "src/core/ext/filters/http/server/http_server_filter.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/internal.h" diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc index c29c1e58cd9..287bd3a878e 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc @@ -24,8 +24,9 @@ #ifdef GPR_SUPPORT_CHANNELS_FROM_FD +#include "absl/strings/str_cat.h" + #include -#include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" @@ -40,14 +41,11 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server* server, GPR_ASSERT(reserved == nullptr); grpc_core::ExecCtx exec_ctx; - char* name; - gpr_asprintf(&name, "fd:%d", fd); + std::string name = absl::StrCat("fd:", fd); grpc_endpoint* server_endpoint = - grpc_tcp_create(grpc_fd_create(fd, name, true), - grpc_server_get_channel_args(server), name); - - gpr_free(name); + grpc_tcp_create(grpc_fd_create(fd, name.c_str(), true), + grpc_server_get_channel_args(server), name.c_str()); const grpc_channel_args* server_args = grpc_server_get_channel_args(server); grpc_transport* transport = grpc_create_chttp2_transport( diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc index 6e203ed4e92..c3c4e39033b 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc @@ -22,9 +22,10 @@ #include +#include "absl/strings/str_cat.h" + #include #include -#include #include "src/core/ext/transport/chttp2/server/chttp2_server.h" @@ -56,12 +57,10 @@ int grpc_server_add_secure_http2_port(grpc_server* server, const char* addr, } sc = creds->create_security_connector(); if (sc == nullptr) { - char* msg; - gpr_asprintf(&msg, - "Unable to create secure server with credentials of type %s.", - creds->type()); - err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + err = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Unable to create secure server with credentials of type ", + creds->type()) + .c_str()); goto done; } // Create channel args. diff --git a/src/core/ext/transport/chttp2/transport/flow_control.cc b/src/core/ext/transport/chttp2/transport/flow_control.cc index babe564d39d..f2b2bbd3920 100644 --- a/src/core/ext/transport/chttp2/transport/flow_control.cc +++ b/src/core/ext/transport/chttp2/transport/flow_control.cc @@ -25,9 +25,12 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/gpr/string.h" @@ -43,27 +46,23 @@ static constexpr const int kTracePadding = 30; static constexpr const uint32_t kMaxWindowUpdateSize = (1u << 31) - 1; static char* fmt_int64_diff_str(int64_t old_val, int64_t new_val) { - char* str; + std::string str; if (old_val != new_val) { - gpr_asprintf(&str, "%" PRId64 " -> %" PRId64 "", old_val, new_val); + str = absl::StrFormat("%" PRId64 " -> %" PRId64 "", old_val, new_val); } else { - gpr_asprintf(&str, "%" PRId64 "", old_val); + str = absl::StrFormat("%" PRId64 "", old_val); } - char* str_lp = gpr_leftpad(str, ' ', kTracePadding); - gpr_free(str); - return str_lp; + return gpr_leftpad(str.c_str(), ' ', kTracePadding); } static char* fmt_uint32_diff_str(uint32_t old_val, uint32_t new_val) { - char* str; + std::string str; if (old_val != new_val) { - gpr_asprintf(&str, "%" PRIu32 " -> %" PRIu32 "", old_val, new_val); + str = absl::StrFormat("%" PRIu32 " -> %" PRIu32 "", old_val, new_val); } else { - gpr_asprintf(&str, "%" PRIu32 "", old_val); + str = absl::StrFormat("%" PRIu32 "", old_val); } - char* str_lp = gpr_leftpad(str, ' ', kTracePadding); - gpr_free(str); - return str_lp; + return gpr_leftpad(str.c_str(), ' ', kTracePadding); } } // namespace @@ -204,13 +203,11 @@ uint32_t TransportFlowControl::MaybeSendUpdate(bool writing_anyway) { grpc_error* TransportFlowControl::ValidateRecvData( int64_t incoming_frame_size) { if (incoming_frame_size > announced_window_) { - char* msg; - gpr_asprintf(&msg, - "frame of size %" PRId64 " overflows local window of %" PRId64, - incoming_frame_size, announced_window_); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("frame of size %" PRId64 + " overflows local window of %" PRId64, + incoming_frame_size, announced_window_) + .c_str()); } return GRPC_ERROR_NONE; } @@ -248,13 +245,11 @@ grpc_error* StreamFlowControl::RecvData(int64_t incoming_frame_size) { "See (for example) https://github.com/netty/netty/issues/6520.", incoming_frame_size, acked_stream_window, sent_stream_window); } else { - char* msg; - gpr_asprintf( - &msg, "frame of size %" PRId64 " overflows local window of %" PRId64, - incoming_frame_size, acked_stream_window); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("frame of size %" PRId64 + " overflows local window of %" PRId64, + incoming_frame_size, acked_stream_window) + .c_str()); } } diff --git a/src/core/ext/transport/chttp2/transport/frame_data.cc b/src/core/ext/transport/chttp2/transport/frame_data.cc index d815654c31c..0924a4b024c 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.cc +++ b/src/core/ext/transport/chttp2/transport/frame_data.cc @@ -22,9 +22,10 @@ #include +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/memory.h" @@ -44,13 +45,10 @@ grpc_error* grpc_chttp2_data_parser_begin_frame( grpc_chttp2_data_parser* /*parser*/, uint8_t flags, uint32_t stream_id, grpc_chttp2_stream* s) { if (flags & ~GRPC_CHTTP2_DATA_FLAG_END_STREAM) { - char* msg; - gpr_asprintf(&msg, "unsupported data flags: 0x%02x", flags); - grpc_error* err = grpc_error_set_int( - GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg), GRPC_ERROR_INT_STREAM_ID, - static_cast(stream_id)); - gpr_free(msg); - return err; + return grpc_error_set_int( + GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("unsupported data flags: 0x%02x", flags).c_str()), + GRPC_ERROR_INT_STREAM_ID, static_cast(stream_id)); } if (flags & GRPC_CHTTP2_DATA_FLAG_END_STREAM) { @@ -130,12 +128,11 @@ grpc_error* grpc_deframe_unprocessed_incoming_frames( p->is_frame_compressed = true; /* GPR_TRUE */ break; default: - char* msg; - gpr_asprintf(&msg, "Bad GRPC frame type 0x%02x", p->frame_type); - p->error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); + p->error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("Bad GRPC frame type 0x%02x", p->frame_type) + .c_str()); p->error = grpc_error_set_int(p->error, GRPC_ERROR_INT_STREAM_ID, static_cast(s->id)); - gpr_free(msg); p->error = grpc_error_set_str( p->error, GRPC_ERROR_STR_RAW_BYTES, grpc_slice_from_moved_string(grpc_core::UniquePtr( diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.cc b/src/core/ext/transport/chttp2/transport/frame_goaway.cc index c1916a1e115..64fd9c89d94 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.cc +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.cc @@ -23,9 +23,10 @@ #include +#include "absl/strings/str_format.h" + #include #include -#include void grpc_chttp2_goaway_parser_init(grpc_chttp2_goaway_parser* p) { p->debug_data = nullptr; @@ -39,11 +40,8 @@ grpc_error* grpc_chttp2_goaway_parser_begin_frame(grpc_chttp2_goaway_parser* p, uint32_t length, uint8_t /*flags*/) { if (length < 8) { - char* msg; - gpr_asprintf(&msg, "goaway frame too short (%d bytes)", length); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("goaway frame too short (%d bytes)", length).c_str()); } gpr_free(p->debug_data); diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.cc b/src/core/ext/transport/chttp2/transport/frame_ping.cc index 9ecd7a8caa4..984123284a3 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.cc +++ b/src/core/ext/transport/chttp2/transport/frame_ping.cc @@ -23,9 +23,10 @@ #include +#include "absl/strings/str_format.h" + #include #include -#include static bool g_disable_ping_ack = false; @@ -58,11 +59,9 @@ grpc_error* grpc_chttp2_ping_parser_begin_frame(grpc_chttp2_ping_parser* parser, uint32_t length, uint8_t flags) { if (flags & 0xfe || length != 8) { - char* msg; - gpr_asprintf(&msg, "invalid ping: length=%d, flags=%02x", length, flags); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return error; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("invalid ping: length=%d, flags=%02x", length, flags) + .c_str()); } parser->byte = 0; parser->is_ack = flags; diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc index 1350a967b9f..bcfcb173b66 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc @@ -21,9 +21,11 @@ #include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h" #include "src/core/ext/transport/chttp2/transport/internal.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/ext/transport/chttp2/transport/frame.h" #include "src/core/lib/gprpp/memory.h" @@ -69,12 +71,10 @@ void grpc_chttp2_add_rst_stream_to_next_write( grpc_error* grpc_chttp2_rst_stream_parser_begin_frame( grpc_chttp2_rst_stream_parser* parser, uint32_t length, uint8_t flags) { if (length != 4) { - char* msg; - gpr_asprintf(&msg, "invalid rst_stream: length=%d, flags=%02x", length, - flags); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("invalid rst_stream: length=%d, flags=%02x", length, + flags) + .c_str()); } parser->byte = 0; return GRPC_ERROR_NONE; @@ -106,13 +106,12 @@ grpc_error* grpc_chttp2_rst_stream_parser_parse(void* parser, ((static_cast(p->reason_bytes[3]))); grpc_error* error = GRPC_ERROR_NONE; if (reason != GRPC_HTTP2_NO_ERROR || s->metadata_buffer[1].size == 0) { - char* message; - gpr_asprintf(&message, "Received RST_STREAM with error code %d", reason); error = grpc_error_set_int( - grpc_error_set_str(GRPC_ERROR_CREATE_FROM_STATIC_STRING("RST_STREAM"), - GRPC_ERROR_STR_GRPC_MESSAGE, - grpc_slice_from_moved_string( - grpc_core::UniquePtr(message))), + grpc_error_set_str( + GRPC_ERROR_CREATE_FROM_STATIC_STRING("RST_STREAM"), + GRPC_ERROR_STR_GRPC_MESSAGE, + grpc_slice_from_cpp_string(absl::StrCat( + "Received RST_STREAM with error code ", reason))), GRPC_ERROR_INT_HTTP2_ERROR, static_cast(reason)); } grpc_chttp2_mark_stream_closed(t, s, true, true, error); diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.cc b/src/core/ext/transport/chttp2/transport/frame_settings.cc index 60432d26f26..647f52c10ef 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.cc +++ b/src/core/ext/transport/chttp2/transport/frame_settings.cc @@ -23,9 +23,10 @@ #include +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/ext/transport/chttp2/transport/frame.h" @@ -117,7 +118,6 @@ grpc_error* grpc_chttp2_settings_parser_parse(void* p, grpc_chttp2_transport* t, static_cast(p); const uint8_t* cur = GRPC_SLICE_START_PTR(slice); const uint8_t* end = GRPC_SLICE_END_PTR(slice); - char* msg; grpc_chttp2_setting_id id; if (parser->is_ack) { @@ -208,11 +208,10 @@ grpc_error* grpc_chttp2_settings_parser_parse(void* p, grpc_chttp2_transport* t, t->last_new_stream_id, sp->error_value, grpc_slice_from_static_string("HTTP2 settings error"), &t->qbuf); - gpr_asprintf(&msg, "invalid value %u passed for %s", - parser->value, sp->name); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("invalid value %u passed for %s", + parser->value, sp->name) + .c_str()); } } if (id == GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE && diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.cc b/src/core/ext/transport/chttp2/transport/frame_window_update.cc index 80e799f17f1..2027af69591 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.cc +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.cc @@ -21,9 +21,11 @@ #include "src/core/ext/transport/chttp2/transport/frame_window_update.h" #include "src/core/ext/transport/chttp2/transport/internal.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include -#include grpc_slice grpc_chttp2_window_update_create( uint32_t id, uint32_t window_update, grpc_transport_one_way_stats* stats) { @@ -54,12 +56,10 @@ grpc_slice grpc_chttp2_window_update_create( grpc_error* grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser* parser, uint32_t length, uint8_t flags) { if (flags || length != 4) { - char* msg; - gpr_asprintf(&msg, "invalid window update: length=%d, flags=%02x", length, - flags); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("invalid window update: length=%d, flags=%02x", length, + flags) + .c_str()); } parser->byte = 0; parser->amount = 0; @@ -91,11 +91,8 @@ grpc_error* grpc_chttp2_window_update_parser_parse(void* parser, // top bit is reserved and must be ignored. uint32_t received_update = p->amount & 0x7fffffffu; if (received_update == 0) { - char* msg; - gpr_asprintf(&msg, "invalid window update bytes: %d", p->amount); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("invalid window update bytes: ", p->amount).c_str()); } GPR_ASSERT(is_last); diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc index 19f02168620..14b58457cbb 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc @@ -25,9 +25,11 @@ #include #include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/lib/debug/stats.h" @@ -1087,10 +1089,8 @@ static grpc_error* still_parse_error(grpc_chttp2_hpack_parser* p, static grpc_error* parse_illegal_op(grpc_chttp2_hpack_parser* p, const uint8_t* cur, const uint8_t* end) { GPR_ASSERT(cur != end); - char* msg; - gpr_asprintf(&msg, "Illegal hpack op code %d", *cur); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Illegal hpack op code ", *cur).c_str()); return parse_error(p, cur, end, err); } @@ -1173,7 +1173,6 @@ static grpc_error* parse_value4(grpc_chttp2_hpack_parser* p, const uint8_t* cur, uint8_t c; uint32_t cur_value; uint32_t add_value; - char* msg; if (cur == end) { p->state = parse_value4; @@ -1200,12 +1199,12 @@ static grpc_error* parse_value4(grpc_chttp2_hpack_parser* p, const uint8_t* cur, } error: - gpr_asprintf(&msg, - "integer overflow in hpack integer decoding: have 0x%08x, " - "got byte 0x%02x on byte 5", - *p->parsing.value, *cur); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat( + "integer overflow in hpack integer decoding: have 0x%08x, " + "got byte 0x%02x on byte 5", + *p->parsing.value, *cur) + .c_str()); return parse_error(p, cur, end, err); } @@ -1227,13 +1226,12 @@ static grpc_error* parse_value5up(grpc_chttp2_hpack_parser* p, return parse_next(p, cur + 1, end); } - char* msg; - gpr_asprintf(&msg, - "integer overflow in hpack integer decoding: have 0x%08x, " - "got byte 0x%02x sometime after byte 5", - *p->parsing.value, *cur); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat( + "integer overflow in hpack integer decoding: have 0x%08x, " + "got byte 0x%02x sometime after byte 5", + *p->parsing.value, *cur) + .c_str()); return parse_error(p, cur, end, err); } @@ -1389,11 +1387,10 @@ static grpc_error* finish_str(grpc_chttp2_hpack_parser* p, const uint8_t* cur, case B64_BYTE2: bits = p->base64_buffer; if (bits & 0xffff) { - char* msg; - gpr_asprintf(&msg, "trailing bits in base64 encoding: 0x%04x", - bits & 0xffff); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("trailing bits in base64 encoding: 0x%04x", + bits & 0xffff) + .c_str()); return parse_error(p, cur, end, err); } decoded[0] = static_cast(bits >> 16); @@ -1402,11 +1399,10 @@ static grpc_error* finish_str(grpc_chttp2_hpack_parser* p, const uint8_t* cur, case B64_BYTE3: bits = p->base64_buffer; if (bits & 0xff) { - char* msg; - gpr_asprintf(&msg, "trailing bits in base64 encoding: 0x%02x", - bits & 0xff); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("trailing bits in base64 encoding: 0x%02x", + bits & 0xff) + .c_str()); return parse_error(p, cur, end, err); } decoded[0] = static_cast(bits >> 16); diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.cc b/src/core/ext/transport/chttp2/transport/hpack_table.cc index be03110edcf..78ee207c89b 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.cc +++ b/src/core/ext/transport/chttp2/transport/hpack_table.cc @@ -23,9 +23,10 @@ #include #include +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/lib/debug/trace.h" #include "src/core/lib/gpr/murmur_hash.h" @@ -119,13 +120,11 @@ grpc_error* grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl* tbl, return GRPC_ERROR_NONE; } if (bytes > tbl->max_bytes) { - char* msg; - gpr_asprintf(&msg, - "Attempt to make hpack table %d bytes when max is %d bytes", - bytes, tbl->max_bytes); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat( + "Attempt to make hpack table %d bytes when max is %d bytes", bytes, + tbl->max_bytes) + .c_str()); } if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace)) { gpr_log(GPR_INFO, "Update hpack parser table size to %d", bytes); @@ -153,15 +152,12 @@ grpc_error* grpc_chttp2_hptbl_add(grpc_chttp2_hptbl* tbl, grpc_mdelem md) { GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; if (tbl->current_table_bytes > tbl->max_bytes) { - char* msg; - gpr_asprintf( - &msg, - "HPACK max table size reduced to %d but not reflected by hpack " - "stream (still at %d)", - tbl->max_bytes, tbl->current_table_bytes); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat( + "HPACK max table size reduced to %d but not reflected by hpack " + "stream (still at %d)", + tbl->max_bytes, tbl->current_table_bytes) + .c_str()); } /* we can't add elements bigger than the max table size */ diff --git a/src/core/ext/transport/chttp2/transport/parsing.cc b/src/core/ext/transport/chttp2/transport/parsing.cc index 2cf2a7ee5a6..4bb53a74423 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.cc +++ b/src/core/ext/transport/chttp2/transport/parsing.cc @@ -22,9 +22,11 @@ #include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/lib/profiling/timers.h" #include "src/core/lib/slice/slice_string_helpers.h" @@ -85,18 +87,15 @@ grpc_error* grpc_chttp2_perform_read(grpc_chttp2_transport* t, case GRPC_DTS_CLIENT_PREFIX_23: while (cur != end && t->deframe_state != GRPC_DTS_FH_0) { if (*cur != GRPC_CHTTP2_CLIENT_CONNECT_STRING[t->deframe_state]) { - char* msg; - gpr_asprintf( - &msg, - "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " - "at byte %d", - GRPC_CHTTP2_CLIENT_CONNECT_STRING[t->deframe_state], - static_cast(static_cast( - GRPC_CHTTP2_CLIENT_CONNECT_STRING[t->deframe_state])), - *cur, static_cast(*cur), t->deframe_state); - err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat( + "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " + "at byte %d", + GRPC_CHTTP2_CLIENT_CONNECT_STRING[t->deframe_state], + static_cast(static_cast( + GRPC_CHTTP2_CLIENT_CONNECT_STRING[t->deframe_state])), + *cur, static_cast(*cur), t->deframe_state) + .c_str()); } ++cur; t->deframe_state = static_cast( @@ -194,14 +193,12 @@ grpc_error* grpc_chttp2_perform_read(grpc_chttp2_transport* t, t->incoming_frame_size > t->settings[GRPC_ACKED_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]) { - char* msg; - gpr_asprintf(&msg, "Frame size %d is larger than max frame size %d", - t->incoming_frame_size, - t->settings[GRPC_ACKED_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]); - err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("Frame size %d is larger than max frame size %d", + t->incoming_frame_size, + t->settings[GRPC_ACKED_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]) + .c_str()); } if (++cur == end) { return GRPC_ERROR_NONE; @@ -255,34 +252,27 @@ grpc_error* grpc_chttp2_perform_read(grpc_chttp2_transport* t, static grpc_error* init_frame_parser(grpc_chttp2_transport* t) { if (t->is_first_frame && t->incoming_frame_type != GRPC_CHTTP2_FRAME_SETTINGS) { - char* msg; - gpr_asprintf( - &msg, "Expected SETTINGS frame as the first frame, got frame type %d", - t->incoming_frame_type); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat( + "Expected SETTINGS frame as the first frame, got frame type ", + t->incoming_frame_type) + .c_str()); } t->is_first_frame = false; if (t->expect_continuation_stream_id != 0) { if (t->incoming_frame_type != GRPC_CHTTP2_FRAME_CONTINUATION) { - char* msg; - gpr_asprintf(&msg, "Expected CONTINUATION frame, got frame type %02x", - t->incoming_frame_type); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("Expected CONTINUATION frame, got frame type %02x", + t->incoming_frame_type) + .c_str()); } if (t->expect_continuation_stream_id != t->incoming_stream_id) { - char* msg; - gpr_asprintf( - &msg, - "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got " - "grpc_chttp2_stream %08x", - t->expect_continuation_stream_id, t->incoming_stream_id); - grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat( + "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got " + "grpc_chttp2_stream %08x", + t->expect_continuation_stream_id, t->incoming_stream_id) + .c_str()); } return init_header_frame_parser(t, 1); } diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.cc b/src/core/ext/transport/cronet/transport/cronet_transport.cc index fc0357bbc73..36016b6d8c7 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.cc +++ b/src/core/ext/transport/cronet/transport/cronet_transport.cc @@ -20,10 +20,13 @@ #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include -#include #include "src/core/ext/transport/chttp2/transport/bin_decoder.h" #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" @@ -728,7 +731,7 @@ static void create_grpc_frame(grpc_slice_buffer* write_slice_buffer, Convert metadata in a format that Cronet can consume */ static void convert_metadata_to_cronet_headers( - grpc_metadata_batch* metadata, const char* host, char** pp_url, + grpc_metadata_batch* metadata, const char* host, std::string* pp_url, bidirectional_stream_header** pp_headers, size_t* p_num_headers, const char** method) { grpc_linked_mdelem* curr = metadata->list.head; @@ -789,7 +792,7 @@ static void convert_metadata_to_cronet_headers( } if (grpc_slice_eq_static_interned(GRPC_MDKEY(mdelem), GRPC_MDSTR_PATH)) { /* Create URL by appending :path value to the hostname */ - gpr_asprintf(pp_url, "https://%s%s", host, value); + *pp_url = absl::StrCat("https://", host, value); gpr_free(key); gpr_free(value); continue; @@ -1051,7 +1054,7 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) { bidirectional_stream_disable_auto_flush(s->cbs, true); bidirectional_stream_delay_request_headers_until_flush(s->cbs, true); } - char* url = nullptr; + std::string url; const char* method = "POST"; s->header_array.headers = nullptr; convert_metadata_to_cronet_headers( @@ -1059,11 +1062,10 @@ static enum e_op_result execute_stream_op(struct op_and_state* oas) { t->host, &url, &s->header_array.headers, &s->header_array.count, &method); s->header_array.capacity = s->header_array.count; - CRONET_LOG(GPR_DEBUG, "bidirectional_stream_start(%p, %s)", s->cbs, url); - bidirectional_stream_start(s->cbs, url, 0, method, &s->header_array, false); - if (url) { - gpr_free(url); - } + CRONET_LOG(GPR_DEBUG, "bidirectional_stream_start(%p, %s)", s->cbs, + url.c_str()); + bidirectional_stream_start(s->cbs, url.c_str(), 0, method, &s->header_array, + false); unsigned int header_index; for (header_index = 0; header_index < s->header_array.count; header_index++) { diff --git a/src/core/lib/channel/channel_trace.cc b/src/core/lib/channel/channel_trace.cc index a26533f7f9f..d6d2e193504 100644 --- a/src/core/lib/channel/channel_trace.cc +++ b/src/core/lib/channel/channel_trace.cc @@ -146,14 +146,12 @@ const char* severity_string(ChannelTrace::Severity severity) { Json ChannelTrace::TraceEvent::RenderTraceEvent() const { char* description = grpc_slice_to_c_string(data_); - char* ts_str = gpr_format_timespec(timestamp_); Json::Object object = { {"description", description}, {"severity", severity_string(severity_)}, - {"timestamp", ts_str}, + {"timestamp", gpr_format_timespec(timestamp_)}, }; gpr_free(description); - gpr_free(ts_str); if (referenced_entity_ != nullptr) { const bool is_channel = (referenced_entity_->type() == BaseNode::EntityType::kTopLevelChannel || @@ -171,11 +169,9 @@ Json ChannelTrace::RenderJson() const { if (max_event_memory_ == 0) { return Json(); // JSON null } - char* ts_str = gpr_format_timespec(time_created_); Json::Object object = { - {"creationTimestamp", ts_str}, + {"creationTimestamp", gpr_format_timespec(time_created_)}, }; - gpr_free(ts_str); if (num_events_logged_ > 0) { object["numEventsLogged"] = std::to_string(num_events_logged_); } diff --git a/src/core/lib/channel/channelz.cc b/src/core/lib/channel/channelz.cc index fab9dd86c64..e42b1472487 100644 --- a/src/core/lib/channel/channelz.cc +++ b/src/core/lib/channel/channelz.cc @@ -156,9 +156,7 @@ void CallCountingHelper::PopulateCallCounts(Json::Object* object) { gpr_timespec ts = gpr_convert_clock_type( gpr_cycle_counter_to_time(data.last_call_started_cycle), GPR_CLOCK_REALTIME); - char* ts_str = gpr_format_timespec(ts); - (*object)["lastCallStartedTimestamp"] = ts_str; - gpr_free(ts_str); + (*object)["lastCallStartedTimestamp"] = gpr_format_timespec(ts); } if (data.calls_succeeded != 0) { (*object)["callsSucceeded"] = std::to_string(data.calls_succeeded); @@ -456,9 +454,7 @@ Json SocketNode::RenderJson() { ts = gpr_convert_clock_type( gpr_cycle_counter_to_time(last_local_stream_created_cycle), GPR_CLOCK_REALTIME); - char* ts_str = gpr_format_timespec(ts); - data["lastLocalStreamCreatedTimestamp"] = ts_str; - gpr_free(ts_str); + data["lastLocalStreamCreatedTimestamp"] = gpr_format_timespec(ts); } gpr_cycle_counter last_remote_stream_created_cycle = last_remote_stream_created_cycle_.Load(MemoryOrder::RELAXED); @@ -466,9 +462,7 @@ Json SocketNode::RenderJson() { ts = gpr_convert_clock_type( gpr_cycle_counter_to_time(last_remote_stream_created_cycle), GPR_CLOCK_REALTIME); - char* ts_str = gpr_format_timespec(ts); - data["lastRemoteStreamCreatedTimestamp"] = ts_str; - gpr_free(ts_str); + data["lastRemoteStreamCreatedTimestamp"] = gpr_format_timespec(ts); } } int64_t streams_succeeded = streams_succeeded_.Load(MemoryOrder::RELAXED); @@ -486,9 +480,7 @@ Json SocketNode::RenderJson() { gpr_cycle_counter_to_time( last_message_sent_cycle_.Load(MemoryOrder::RELAXED)), GPR_CLOCK_REALTIME); - char* ts_str = gpr_format_timespec(ts); - data["lastMessageSentTimestamp"] = ts_str; - gpr_free(ts_str); + data["lastMessageSentTimestamp"] = gpr_format_timespec(ts); } int64_t messages_received = messages_received_.Load(MemoryOrder::RELAXED); if (messages_received != 0) { @@ -497,9 +489,7 @@ Json SocketNode::RenderJson() { gpr_cycle_counter_to_time( last_message_received_cycle_.Load(MemoryOrder::RELAXED)), GPR_CLOCK_REALTIME); - char* ts_str = gpr_format_timespec(ts); - data["lastMessageReceivedTimestamp"] = ts_str; - gpr_free(ts_str); + data["lastMessageReceivedTimestamp"] = gpr_format_timespec(ts); } int64_t keepalives_sent = keepalives_sent_.Load(MemoryOrder::RELAXED); if (keepalives_sent != 0) { diff --git a/src/core/lib/gpr/log_linux.cc b/src/core/lib/gpr/log_linux.cc index 8b597b4cf2f..bf07822a213 100644 --- a/src/core/lib/gpr/log_linux.cc +++ b/src/core/lib/gpr/log_linux.cc @@ -30,7 +30,6 @@ #include #include -#include #include #include #include @@ -39,6 +38,8 @@ #include #include #include +#include +#include "absl/strings/str_format.h" static long sys_gettid(void) { return syscall(__NR_gettid); } @@ -63,7 +64,6 @@ void gpr_log(const char* file, int line, gpr_log_severity severity, void gpr_default_log(gpr_log_func_args* args) { const char* final_slash; - char* prefix; const char* display_file; char time_buffer[64]; time_t timer; @@ -86,12 +86,10 @@ void gpr_default_log(gpr_log_func_args* args) { strcpy(time_buffer, "error:strftime"); } - gpr_asprintf(&prefix, "%s%s.%09" PRId32 " %7ld %s:%d]", - gpr_log_severity_string(args->severity), time_buffer, - now.tv_nsec, tid, display_file, args->line); - - fprintf(stderr, "%-60s %s\n", prefix, args->message); - gpr_free(prefix); + std::string prefix = absl::StrFormat( + "%s%s.%09" PRId32 " %7ld %s:%d]", gpr_log_severity_string(args->severity), + time_buffer, now.tv_nsec, tid, display_file, args->line); + fprintf(stderr, "%-60s %s\n", prefix.c_str(), args->message); } #endif /* GPR_LINUX_LOG */ diff --git a/src/core/lib/gpr/log_posix.cc b/src/core/lib/gpr/log_posix.cc index 2f7c6ce3760..3fff01a624e 100644 --- a/src/core/lib/gpr/log_posix.cc +++ b/src/core/lib/gpr/log_posix.cc @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -30,6 +29,8 @@ #include #include #include +#include +#include "absl/strings/str_format.h" static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); } @@ -83,13 +84,10 @@ void gpr_default_log(gpr_log_func_args* args) { strcpy(time_buffer, "error:strftime"); } - char* prefix; - gpr_asprintf(&prefix, "%s%s.%09d %7" PRIdPTR " %s:%d]", - gpr_log_severity_string(args->severity), time_buffer, - (int)(now.tv_nsec), sys_gettid(), display_file, args->line); - - fprintf(stderr, "%-70s %s\n", prefix, args->message); - gpr_free(prefix); + std::string prefix = absl::StrFormat( + "%s%s.%09d %7" PRIdPTR " %s:%d]", gpr_log_severity_string(args->severity), + time_buffer, (int)(now.tv_nsec), sys_gettid(), display_file, args->line); + fprintf(stderr, "%-70s %s\n", prefix.c_str(), args->message); } #endif /* defined(GPR_POSIX_LOG) */ diff --git a/src/core/lib/gpr/string.cc b/src/core/lib/gpr/string.cc index d2c93c625b1..d303423c0d1 100644 --- a/src/core/lib/gpr/string.cc +++ b/src/core/lib/gpr/string.cc @@ -28,6 +28,8 @@ #include #include +#include "absl/strings/str_cat.h" + #include #include #include @@ -50,12 +52,7 @@ char* gpr_strdup(const char* src) { return dst; } -struct dump_out { - size_t capacity; - size_t length; - char* data; -}; -char* gpr_format_timespec(gpr_timespec tm) { +std::string gpr_format_timespec(gpr_timespec tm) { char time_buffer[35]; char ns_buffer[11]; // '.' + 9 digits of precision struct tm* tm_info = localtime((const time_t*)&tm.tv_sec); @@ -76,11 +73,15 @@ char* gpr_format_timespec(gpr_timespec tm) { break; } } - char* full_time_str; - gpr_asprintf(&full_time_str, "%s%sZ", time_buffer, ns_buffer); - return full_time_str; + return absl::StrCat(time_buffer, ns_buffer, "Z"); } +struct dump_out { + size_t capacity; + size_t length; + char* data; +}; + static dump_out dump_out_create(void) { dump_out r = {0, 0, nullptr}; return r; diff --git a/src/core/lib/gpr/string.h b/src/core/lib/gpr/string.h index b7d76986e5c..801f66c448e 100644 --- a/src/core/lib/gpr/string.h +++ b/src/core/lib/gpr/string.h @@ -26,6 +26,8 @@ #include #include +#include + /* String utility functions */ /* Flags for gpr_dump function. */ @@ -88,13 +90,13 @@ char* gpr_strjoin_sep(const char** strs, size_t nstrs, const char* sep, void gpr_string_split(const char* input, const char* sep, char*** strs, size_t* nstrs); -/* Returns an allocated string that represents tm according to RFC-3339, and, +/* Returns a string that represents tm according to RFC-3339, and, more specifically, follows: https://developers.google.com/protocol-buffers/docs/proto3#json Uses RFC 3339, where generated output will always be Z-normalized and uses 0, 3, 6 or 9 fractional digits. */ -char* gpr_format_timespec(gpr_timespec); +std::string gpr_format_timespec(gpr_timespec); /** Case insensitive string comparison... return <0 if lower(a)0 if lower(a)>lower(b) */ diff --git a/src/core/lib/gprpp/global_config_env.cc b/src/core/lib/gprpp/global_config_env.cc index 72148898532..d45d232dd7e 100644 --- a/src/core/lib/gprpp/global_config_env.cc +++ b/src/core/lib/gprpp/global_config_env.cc @@ -30,6 +30,10 @@ #include #include +#include + +#include "absl/strings/str_format.h" + namespace grpc_core { namespace { @@ -42,12 +46,10 @@ GlobalConfigEnvErrorFunctionType g_global_config_env_error_func = DefaultGlobalConfigEnvErrorFunction; void LogParsingError(const char* name, const char* value) { - char* error_message; - gpr_asprintf(&error_message, - "Illegal value '%s' specified for environment variable '%s'", - value, name); - (*g_global_config_env_error_func)(error_message); - gpr_free(error_message); + std::string error_message = absl::StrFormat( + "Illegal value '%s' specified for environment variable '%s'", value, + name); + (*g_global_config_env_error_func)(error_message.c_str()); } } // namespace diff --git a/src/core/lib/http/httpcli.cc b/src/core/lib/http/httpcli.cc index 5e723bc6c84..bf93552df7a 100644 --- a/src/core/lib/http/httpcli.cc +++ b/src/core/lib/http/httpcli.cc @@ -22,6 +22,10 @@ #include +#include + +#include "absl/strings/str_format.h" + #include #include #include @@ -112,11 +116,11 @@ static void append_error(internal_request* req, grpc_error* error) { GRPC_ERROR_CREATE_FROM_STATIC_STRING("Failed HTTP/1 client request"); } grpc_resolved_address* addr = &req->addresses->addrs[req->next_address - 1]; - grpc_core::UniquePtr addr_text(grpc_sockaddr_to_uri(addr)); + std::string addr_text = grpc_sockaddr_to_uri(addr); req->overall_error = grpc_error_add_child( req->overall_error, grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, - grpc_slice_from_moved_string(std::move(addr_text)))); + grpc_slice_from_cpp_string(std::move(addr_text)))); } static void do_read(internal_request* req) { @@ -266,15 +270,14 @@ void grpc_httpcli_get(grpc_httpcli_context* context, grpc_resource_quota* resource_quota, const grpc_httpcli_request* request, grpc_millis deadline, grpc_closure* on_done, grpc_httpcli_response* response) { - char* name; if (g_get_override && g_get_override(request, deadline, on_done, response)) { return; } - gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path); + std::string name = + absl::StrFormat("HTTP:GET:%s:%s", request->host, request->http.path); internal_request_begin(context, pollent, resource_quota, request, deadline, - on_done, response, name, + on_done, response, name.c_str(), grpc_httpcli_format_get_request(request)); - gpr_free(name); } void grpc_httpcli_post(grpc_httpcli_context* context, @@ -284,16 +287,16 @@ void grpc_httpcli_post(grpc_httpcli_context* context, const char* body_bytes, size_t body_size, grpc_millis deadline, grpc_closure* on_done, grpc_httpcli_response* response) { - char* name; if (g_post_override && g_post_override(request, body_bytes, body_size, deadline, on_done, response)) { return; } - gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path); + std::string name = + absl::StrFormat("HTTP:POST:%s:%s", request->host, request->http.path); internal_request_begin( context, pollent, resource_quota, request, deadline, on_done, response, - name, grpc_httpcli_format_post_request(request, body_bytes, body_size)); - gpr_free(name); + name.c_str(), + grpc_httpcli_format_post_request(request, body_bytes, body_size)); } void grpc_httpcli_set_override(grpc_httpcli_get_override get, diff --git a/src/core/lib/http/httpcli_security_connector.cc b/src/core/lib/http/httpcli_security_connector.cc index 6338bfdebf1..966a8fb6415 100644 --- a/src/core/lib/http/httpcli_security_connector.cc +++ b/src/core/lib/http/httpcli_security_connector.cc @@ -22,6 +22,7 @@ #include +#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include @@ -95,11 +96,10 @@ class grpc_httpcli_ssl_channel_security_connector final /* Check the peer name. */ if (secure_peer_name_ != nullptr && !tsi_ssl_peer_matches_name(&peer, secure_peer_name_)) { - char* msg; - gpr_asprintf(&msg, "Peer name %s is not in peer certificate", - secure_peer_name_); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Peer name ", secure_peer_name_, + " is not in peer certificate") + .c_str()); } grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_peer_checked, error); tsi_peer_destruct(&peer); diff --git a/src/core/lib/iomgr/endpoint_pair_posix.cc b/src/core/lib/iomgr/endpoint_pair_posix.cc index c646f71908c..a1a04ebf6ab 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.cc +++ b/src/core/lib/iomgr/endpoint_pair_posix.cc @@ -32,9 +32,12 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include -#include #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/tcp_posix.h" @@ -53,19 +56,16 @@ grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char* name, grpc_channel_args* args) { int sv[2]; grpc_endpoint_pair p; - char* final_name; create_sockets(sv); grpc_core::ExecCtx exec_ctx; - gpr_asprintf(&final_name, "%s:client", name); - p.client = grpc_tcp_create(grpc_fd_create(sv[1], final_name, false), args, - "socketpair-server"); - gpr_free(final_name); - gpr_asprintf(&final_name, "%s:server", name); - p.server = grpc_tcp_create(grpc_fd_create(sv[0], final_name, false), args, - "socketpair-client"); - gpr_free(final_name); + std::string final_name = absl::StrCat(name, ":client"); + p.client = grpc_tcp_create(grpc_fd_create(sv[1], final_name.c_str(), false), + args, "socketpair-server"); + final_name = absl::StrCat(name, ":server"); + p.server = grpc_tcp_create(grpc_fd_create(sv[0], final_name.c_str(), false), + args, "socketpair-client"); return p; } diff --git a/src/core/lib/iomgr/error_cfstream.cc b/src/core/lib/iomgr/error_cfstream.cc index d7af8c377f6..7bf286585ac 100644 --- a/src/core/lib/iomgr/error_cfstream.cc +++ b/src/core/lib/iomgr/error_cfstream.cc @@ -19,10 +19,13 @@ #include #ifdef GRPC_CFSTREAM +#include + +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/lib/iomgr/error.h" @@ -33,7 +36,6 @@ grpc_error* grpc_error_create_from_cferror(const char* file, int line, CFErrorRef error = static_cast(arg); char buf_domain[MAX_ERROR_DESCRIPTION]; char buf_desc[MAX_ERROR_DESCRIPTION]; - char* error_msg; CFErrorDomain domain = CFErrorGetDomain((error)); CFIndex code = CFErrorGetCode((error)); CFStringRef desc = CFErrorCopyDescription((error)); @@ -41,12 +43,11 @@ grpc_error* grpc_error_create_from_cferror(const char* file, int line, kCFStringEncodingUTF8); CFStringGetCString(desc, buf_desc, MAX_ERROR_DESCRIPTION, kCFStringEncodingUTF8); - gpr_asprintf(&error_msg, "%s (error domain:%s, code:%ld, description:%s)", - custom_desc, buf_domain, code, buf_desc); + std::string error_msg = + absl::StrFormat("%s (error domain:%s, code:%ld, description:%s)", + custom_desc, buf_domain, code, buf_desc); CFRelease(desc); - grpc_error* return_error = grpc_error_create( - file, line, grpc_slice_from_copied_string(error_msg), NULL, 0); - gpr_free(error_msg); - return return_error; + return grpc_error_create( + file, line, grpc_slice_from_copied_string(error_msg.c_str()), NULL, 0); } #endif /* GRPC_CFSTREAM */ diff --git a/src/core/lib/iomgr/ev_epoll1_linux.cc b/src/core/lib/iomgr/ev_epoll1_linux.cc index 04955e1505b..5114d1c1e4f 100644 --- a/src/core/lib/iomgr/ev_epoll1_linux.cc +++ b/src/core/lib/iomgr/ev_epoll1_linux.cc @@ -38,14 +38,15 @@ #include #include +#include #include +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include #include -#include #include "src/core/lib/debug/stats.h" #include "src/core/lib/gpr/string.h" @@ -351,16 +352,14 @@ static grpc_fd* fd_create(int fd, const char* name, bool track_err) { new_fd->freelist_next = nullptr; - char* fd_name; - gpr_asprintf(&fd_name, "%s fd=%d", name, fd); - grpc_iomgr_register_object(&new_fd->iomgr_object, fd_name); + std::string fd_name = absl::StrCat(name, " fd=", fd); + grpc_iomgr_register_object(&new_fd->iomgr_object, fd_name.c_str()); fork_fd_list_add_grpc_fd(new_fd); #ifndef NDEBUG if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_fd_refcount)) { - gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, new_fd, fd_name); + gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, new_fd, fd_name.c_str()); } #endif - gpr_free(fd_name); struct epoll_event ev; ev.events = static_cast(EPOLLIN | EPOLLOUT | EPOLLET); diff --git a/src/core/lib/iomgr/ev_epollex_linux.cc b/src/core/lib/iomgr/ev_epollex_linux.cc index ac7233e2322..574977d2cc9 100644 --- a/src/core/lib/iomgr/ev_epollex_linux.cc +++ b/src/core/lib/iomgr/ev_epollex_linux.cc @@ -38,10 +38,14 @@ #include #include -#include -#include +#include #include "absl/container/inlined_vector.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + +#include + #include "src/core/lib/debug/stats.h" #include "src/core/lib/gpr/spinlock.h" #include "src/core/lib/gpr/tls.h" @@ -124,11 +128,10 @@ static const char* pollable_type_string(pollable_type t) { return ""; } -static char* pollable_desc(pollable* p) { - char* out; - gpr_asprintf(&out, "type=%s epfd=%d wakeup=%d", pollable_type_string(p->type), - p->epfd, p->wakeup.read_fd); - return out; +static std::string pollable_desc(pollable* p) { + return absl::StrFormat("type=%s epfd=%d wakeup=%d", + pollable_type_string(p->type), p->epfd, + p->wakeup.read_fd); } /// Shared empty pollable - used by pollset to poll on until the first fd is @@ -170,15 +173,13 @@ struct grpc_fd { write_closure.InitEvent(); error_closure.InitEvent(); - char* fd_name; - gpr_asprintf(&fd_name, "%s fd=%d", name, fd); - grpc_iomgr_register_object(&iomgr_object, fd_name); + std::string fd_name = absl::StrCat(name, " fd=", fd); + grpc_iomgr_register_object(&iomgr_object, fd_name.c_str()); #ifndef NDEBUG if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_fd_refcount)) { - gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, this, fd_name); + gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, this, fd_name.c_str()); } #endif - gpr_free(fd_name); } // This is really the dtor, but the poller threads waking up from @@ -934,9 +935,8 @@ static grpc_error* pollable_epoll(pollable* p, grpc_millis deadline) { int timeout = poll_deadline_to_millis_timeout(deadline); if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) { - char* desc = pollable_desc(p); - gpr_log(GPR_INFO, "POLLABLE:%p[%s] poll for %dms", p, desc, timeout); - gpr_free(desc); + gpr_log(GPR_INFO, "POLLABLE:%p[%s] poll for %dms", p, + pollable_desc(p).c_str(), timeout); } if (timeout != 0) { diff --git a/src/core/lib/iomgr/ev_poll_posix.cc b/src/core/lib/iomgr/ev_poll_posix.cc index c094b0b6593..a6b944622bf 100644 --- a/src/core/lib/iomgr/ev_poll_posix.cc +++ b/src/core/lib/iomgr/ev_poll_posix.cc @@ -32,9 +32,12 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include -#include #include "src/core/lib/debug/stats.h" #include "src/core/lib/gpr/murmur_hash.h" @@ -381,10 +384,8 @@ static grpc_fd* fd_create(int fd, const char* name, bool track_err) { r->released = 0; gpr_atm_no_barrier_store(&r->pollhup, 0); - char* name2; - gpr_asprintf(&name2, "%s fd=%d", name, fd); - grpc_iomgr_register_object(&r->iomgr_object, name2); - gpr_free(name2); + std::string name2 = absl::StrCat(name, " fd=", fd); + grpc_iomgr_register_object(&r->iomgr_object, name2.c_str()); fork_fd_list_add_grpc_fd(r); return r; } diff --git a/src/core/lib/iomgr/resolve_address_custom.cc b/src/core/lib/iomgr/resolve_address_custom.cc index a19c5a78892..5ddd4523ce7 100644 --- a/src/core/lib/iomgr/resolve_address_custom.cc +++ b/src/core/lib/iomgr/resolve_address_custom.cc @@ -18,22 +18,24 @@ #include -#include "src/core/lib/iomgr/port.h" +#include "src/core/lib/iomgr/resolve_address_custom.h" -#include -#include +#include +#include + +#include "absl/strings/str_format.h" + +#include #include + #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" #include "src/core/lib/gprpp/host_port.h" - #include "src/core/lib/iomgr/iomgr_custom.h" -#include "src/core/lib/iomgr/resolve_address_custom.h" +#include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/sockaddr_utils.h" -#include - struct grpc_custom_resolver { grpc_closure* on_done = nullptr; grpc_resolved_addresses** addresses = nullptr; @@ -88,23 +90,16 @@ static grpc_error* try_split_host_port(const char* name, const char* default_port, std::string* host, std::string* port) { /* parse name, splitting it into host and port parts */ - grpc_error* error; grpc_core::SplitHostPort(name, host, port); if (host->empty()) { - char* msg; - gpr_asprintf(&msg, "unparseable host:port: '%s'", name); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return error; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("unparseable host:port: '%s'", name).c_str()); } if (port->empty()) { // TODO(murgatroid99): add tests for this case if (default_port == nullptr) { - char* msg; - gpr_asprintf(&msg, "no port in name '%s'", name); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return error; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("no port in name '%s'", name).c_str()); } *port = default_port; } diff --git a/src/core/lib/iomgr/resolve_address_windows.cc b/src/core/lib/iomgr/resolve_address_windows.cc index faf0f78616b..5d2d365d73a 100644 --- a/src/core/lib/iomgr/resolve_address_windows.cc +++ b/src/core/lib/iomgr/resolve_address_windows.cc @@ -29,6 +29,10 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include #include @@ -65,18 +69,14 @@ static grpc_error* windows_blocking_resolve_address( std::string port; grpc_core::SplitHostPort(name, &host, &port); if (host.empty()) { - char* msg; - gpr_asprintf(&msg, "unparseable host:port: '%s'", name); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("unparseable host:port: '%s'", name).c_str()); goto done; } if (port.empty()) { if (default_port == NULL) { - char* msg; - gpr_asprintf(&msg, "no port in name '%s'", name); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("no port in name '%s'", name).c_str()); goto done; } port = default_port; diff --git a/src/core/lib/iomgr/resource_quota.cc b/src/core/lib/iomgr/resource_quota.cc index de5b25a7827..dbe84e3466c 100644 --- a/src/core/lib/iomgr/resource_quota.cc +++ b/src/core/lib/iomgr/resource_quota.cc @@ -25,10 +25,13 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include -#include #include "src/core/lib/gpr/useful.h" #include "src/core/lib/iomgr/combiner.h" @@ -118,7 +121,7 @@ struct grpc_resource_user { grpc_resource_user_link links[GRPC_RULIST_COUNT]; /* The name of this resource user, for debugging/tracing */ - char* name; + std::string name; }; struct grpc_resource_quota { @@ -181,7 +184,7 @@ struct grpc_resource_quota { /* Roots of all resource user lists */ grpc_resource_user* roots[GRPC_RULIST_COUNT]; - char* name; + std::string name; }; static void ru_unref_by(grpc_resource_user* resource_user, gpr_atm amount); @@ -349,13 +352,13 @@ static bool rq_alloc(grpc_resource_quota* resource_quota) { gpr_log(GPR_INFO, "RQ %s %s: grant alloc %" PRId64 " bytes; rq_free_pool -> %" PRId64, - resource_quota->name, resource_user->name, amt, + resource_quota->name.c_str(), resource_user->name.c_str(), amt, resource_quota->free_pool); } } else if (GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace) && resource_user->free_pool >= 0) { gpr_log(GPR_INFO, "RQ %s %s: discard already satisfied alloc request", - resource_quota->name, resource_user->name); + resource_quota->name.c_str(), resource_user->name.c_str()); } if (resource_user->free_pool >= 0) { resource_user->allocating = false; @@ -388,7 +391,7 @@ static bool rq_reclaim_from_per_user_free_pool( gpr_log(GPR_INFO, "RQ %s %s: reclaim_from_per_user_free_pool %" PRId64 " bytes; rq_free_pool -> %" PRId64, - resource_quota->name, resource_user->name, amt, + resource_quota->name.c_str(), resource_user->name.c_str(), amt, resource_quota->free_pool); } gpr_mu_unlock(&resource_user->mu); @@ -398,7 +401,7 @@ static bool rq_reclaim_from_per_user_free_pool( gpr_log(GPR_INFO, "RQ %s %s: failed to reclaim_from_per_user_free_pool; " "free_pool = %" PRId64 "; rq_free_pool = %" PRId64, - resource_quota->name, resource_user->name, + resource_quota->name.c_str(), resource_user->name.c_str(), resource_user->free_pool, resource_quota->free_pool); } gpr_mu_unlock(&resource_user->mu); @@ -415,8 +418,9 @@ static bool rq_reclaim(grpc_resource_quota* resource_quota, bool destructive) { grpc_resource_user* resource_user = rulist_pop_head(resource_quota, list); if (resource_user == nullptr) return false; if (GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace)) { - gpr_log(GPR_INFO, "RQ %s %s: initiate %s reclamation", resource_quota->name, - resource_user->name, destructive ? "destructive" : "benign"); + gpr_log(GPR_INFO, "RQ %s %s: initiate %s reclamation", + resource_quota->name.c_str(), resource_user->name.c_str(), + destructive ? "destructive" : "benign"); } resource_quota->reclaiming = true; grpc_resource_quota_ref_internal(resource_quota); @@ -585,8 +589,7 @@ static void ru_destroy(void* ru, grpc_error* /*error*/) { } grpc_resource_quota_unref_internal(resource_user->resource_quota); gpr_mu_destroy(&resource_user->mu); - gpr_free(resource_user->name); - gpr_free(resource_user); + delete resource_user; } static void ru_alloc_slices( @@ -640,8 +643,7 @@ static void rq_reclamation_done(void* rq, grpc_error* /*error*/) { /* Public API */ grpc_resource_quota* grpc_resource_quota_create(const char* name) { - grpc_resource_quota* resource_quota = - static_cast(gpr_malloc(sizeof(*resource_quota))); + grpc_resource_quota* resource_quota = new grpc_resource_quota; gpr_ref_init(&resource_quota->refs, 1); resource_quota->combiner = grpc_combiner_create(); resource_quota->free_pool = INT64_MAX; @@ -655,10 +657,10 @@ grpc_resource_quota* grpc_resource_quota_create(const char* name) { resource_quota->reclaiming = false; gpr_atm_no_barrier_store(&resource_quota->memory_usage_estimation, 0); if (name != nullptr) { - resource_quota->name = gpr_strdup(name); + resource_quota->name = name; } else { - gpr_asprintf(&resource_quota->name, "anonymous_pool_%" PRIxPTR, - (intptr_t)resource_quota); + resource_quota->name = + absl::StrCat("anonymous_pool_", (intptr_t)resource_quota); } GRPC_CLOSURE_INIT(&resource_quota->rq_step_closure, rq_step, resource_quota, nullptr); @@ -675,9 +677,8 @@ void grpc_resource_quota_unref_internal(grpc_resource_quota* resource_quota) { // No outstanding thread quota GPR_ASSERT(resource_quota->num_threads_allocated == 0); GRPC_COMBINER_UNREF(resource_quota->combiner, "resource_quota"); - gpr_free(resource_quota->name); gpr_mu_destroy(&resource_quota->thread_count_mu); - gpr_free(resource_quota); + delete resource_quota; } } @@ -774,8 +775,7 @@ const grpc_arg_pointer_vtable* grpc_resource_quota_arg_vtable(void) { grpc_resource_user* grpc_resource_user_create( grpc_resource_quota* resource_quota, const char* name) { - grpc_resource_user* resource_user = - static_cast(gpr_malloc(sizeof(*resource_user))); + grpc_resource_user* resource_user = new grpc_resource_user; resource_user->resource_quota = grpc_resource_quota_ref_internal(resource_quota); GRPC_CLOSURE_INIT(&resource_user->allocate_closure, &ru_allocate, @@ -805,10 +805,10 @@ grpc_resource_user* grpc_resource_user_create( resource_user->links[i].next = resource_user->links[i].prev = nullptr; } if (name != nullptr) { - resource_user->name = gpr_strdup(name); + resource_user->name = name; } else { - gpr_asprintf(&resource_user->name, "anonymous_resource_user_%" PRIxPTR, - (intptr_t)resource_user); + resource_user->name = + absl::StrCat("anonymous_resource_user_", (intptr_t)resource_user); } return resource_user; } @@ -890,8 +890,8 @@ static bool resource_user_alloc_locked(grpc_resource_user* resource_user, resource_user->free_pool -= static_cast(size); if (GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace)) { gpr_log(GPR_INFO, "RQ %s %s: alloc %" PRIdPTR "; free_pool -> %" PRId64, - resource_user->resource_quota->name, resource_user->name, size, - resource_user->free_pool); + resource_user->resource_quota->name.c_str(), + resource_user->name.c_str(), size, resource_user->free_pool); } if (GPR_LIKELY(resource_user->free_pool >= 0)) return true; // Slow path: We need to wait for the free pool to refill. @@ -951,8 +951,8 @@ void grpc_resource_user_free(grpc_resource_user* resource_user, size_t size) { resource_user->free_pool += static_cast(size); if (GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace)) { gpr_log(GPR_INFO, "RQ %s %s: free %" PRIdPTR "; free_pool -> %" PRId64, - resource_user->resource_quota->name, resource_user->name, size, - resource_user->free_pool); + resource_user->resource_quota->name.c_str(), + resource_user->name.c_str(), size, resource_user->free_pool); } bool is_bigger_than_zero = resource_user->free_pool > 0; if (is_bigger_than_zero && was_zero_or_negative && @@ -977,7 +977,8 @@ void grpc_resource_user_post_reclaimer(grpc_resource_user* resource_user, void grpc_resource_user_finish_reclamation(grpc_resource_user* resource_user) { if (GRPC_TRACE_FLAG_ENABLED(grpc_resource_quota_trace)) { gpr_log(GPR_INFO, "RQ %s %s: reclamation complete", - resource_user->resource_quota->name, resource_user->name); + resource_user->resource_quota->name.c_str(), + resource_user->name.c_str()); } resource_user->resource_quota->combiner->Run( &resource_user->resource_quota->rq_reclamation_done_closure, diff --git a/src/core/lib/iomgr/sockaddr_utils.cc b/src/core/lib/iomgr/sockaddr_utils.cc index c1447508f3f..8d7db129400 100644 --- a/src/core/lib/iomgr/sockaddr_utils.cc +++ b/src/core/lib/iomgr/sockaddr_utils.cc @@ -24,11 +24,13 @@ #include #include +#include + +#include "absl/strings/str_cat.h" #include "absl/strings/str_format.h" #include #include -#include #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/host_port.h" @@ -212,8 +214,8 @@ void grpc_string_to_sockaddr(grpc_resolved_address* out, char* addr, int port) { grpc_sockaddr_set_port(out, port); } -char* grpc_sockaddr_to_uri(const grpc_resolved_address* resolved_addr) { - if (resolved_addr->len == 0) return nullptr; +std::string grpc_sockaddr_to_uri(const grpc_resolved_address* resolved_addr) { + if (resolved_addr->len == 0) return ""; grpc_resolved_address addr_normalized; if (grpc_sockaddr_is_v4mapped(resolved_addr, &addr_normalized)) { resolved_addr = &addr_normalized; @@ -224,9 +226,9 @@ char* grpc_sockaddr_to_uri(const grpc_resolved_address* resolved_addr) { } std::string path = grpc_sockaddr_to_string(resolved_addr, false /* normalize */); - char* uri_str = nullptr; + std::string uri_str; if (scheme != nullptr) { - gpr_asprintf(&uri_str, "%s:%s", scheme, path.c_str()); + uri_str = absl::StrCat(scheme, ":", path); } return uri_str; } diff --git a/src/core/lib/iomgr/sockaddr_utils.h b/src/core/lib/iomgr/sockaddr_utils.h index 4a844e9d017..ade9059a31a 100644 --- a/src/core/lib/iomgr/sockaddr_utils.h +++ b/src/core/lib/iomgr/sockaddr_utils.h @@ -69,7 +69,7 @@ std::string grpc_sockaddr_to_string(const grpc_resolved_address* addr, void grpc_string_to_sockaddr(grpc_resolved_address* out, char* addr, int port); /* Returns the URI string corresponding to \a addr */ -char* grpc_sockaddr_to_uri(const grpc_resolved_address* addr); +std::string grpc_sockaddr_to_uri(const grpc_resolved_address* addr); /* Returns the URI scheme corresponding to \a addr */ const char* grpc_sockaddr_get_uri_scheme(const grpc_resolved_address* addr); diff --git a/src/core/lib/iomgr/socket_windows.cc b/src/core/lib/iomgr/socket_windows.cc index 2890866f41f..9d804dda331 100644 --- a/src/core/lib/iomgr/socket_windows.cc +++ b/src/core/lib/iomgr/socket_windows.cc @@ -27,10 +27,11 @@ // must be included after winsock2.h #include +#include "absl/strings/str_format.h" + #include #include #include -#include #include "src/core/lib/iomgr/iocp_windows.h" #include "src/core/lib/iomgr/iomgr_internal.h" @@ -42,14 +43,12 @@ static DWORD s_wsa_socket_flags; grpc_winsocket* grpc_winsocket_create(SOCKET socket, const char* name) { - char* final_name; grpc_winsocket* r = (grpc_winsocket*)gpr_malloc(sizeof(grpc_winsocket)); memset(r, 0, sizeof(grpc_winsocket)); r->socket = socket; gpr_mu_init(&r->state_mu); - gpr_asprintf(&final_name, "%s:socket=0x%p", name, r); - grpc_iomgr_register_object(&r->iomgr_object, final_name); - gpr_free(final_name); + grpc_iomgr_register_object( + &r->iomgr_object, absl::StrFormat("%s:socket=0x%p", name, r).c_str()); grpc_iocp_add_socket(r); return r; } diff --git a/src/core/lib/iomgr/tcp_client_cfstream.cc b/src/core/lib/iomgr/tcp_client_cfstream.cc index 7461a75e658..d0be97ae1fb 100644 --- a/src/core/lib/iomgr/tcp_client_cfstream.cc +++ b/src/core/lib/iomgr/tcp_client_cfstream.cc @@ -46,7 +46,7 @@ extern grpc_core::TraceFlag grpc_tcp_trace; -typedef struct CFStreamConnect { +struct CFStreamConnect { gpr_mu mu; gpr_refcount refcount; @@ -65,9 +65,9 @@ typedef struct CFStreamConnect { grpc_closure* closure; grpc_endpoint** endpoint; int refs; - char* addr_name; + std::string addr_name; grpc_resource_quota* resource_quota; -} CFStreamConnect; +}; static void CFStreamConnectCleanup(CFStreamConnect* connect) { grpc_resource_quota_unref_internal(connect->resource_quota); @@ -75,8 +75,7 @@ static void CFStreamConnectCleanup(CFStreamConnect* connect) { CFRelease(connect->read_stream); CFRelease(connect->write_stream); gpr_mu_destroy(&connect->mu); - gpr_free(connect->addr_name); - gpr_free(connect); + delete connect; } static void OnAlarm(void* arg, grpc_error* error) { @@ -130,8 +129,9 @@ static void OnOpen(void* arg, grpc_error* error) { } if (error == GRPC_ERROR_NONE) { *endpoint = grpc_cfstream_endpoint_create( - connect->read_stream, connect->write_stream, connect->addr_name, - connect->resource_quota, connect->stream_handle); + connect->read_stream, connect->write_stream, + connect->addr_name.c_str(), connect->resource_quota, + connect->stream_handle); } } else { GRPC_ERROR_REF(error); @@ -157,9 +157,7 @@ static void CFStreamClientConnect(grpc_closure* closure, grpc_endpoint** ep, const grpc_channel_args* channel_args, const grpc_resolved_address* resolved_addr, grpc_millis deadline) { - CFStreamConnect* connect; - - connect = (CFStreamConnect*)gpr_zalloc(sizeof(CFStreamConnect)); + CFStreamConnect* connect = new CFStreamConnect(); connect->closure = closure; connect->endpoint = ep; connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); @@ -170,7 +168,7 @@ static void CFStreamClientConnect(grpc_closure* closure, grpc_endpoint** ep, if (grpc_tcp_trace.enabled()) { gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %p, %s: asynchronously connecting", - connect, connect->addr_name); + connect, connect->addr_name.c_str()); } grpc_resource_quota* resource_quota = grpc_resource_quota_create(NULL); diff --git a/src/core/lib/iomgr/tcp_client_custom.cc b/src/core/lib/iomgr/tcp_client_custom.cc index 0295d449ae2..5e8a3a1edd2 100644 --- a/src/core/lib/iomgr/tcp_client_custom.cc +++ b/src/core/lib/iomgr/tcp_client_custom.cc @@ -42,15 +42,14 @@ struct grpc_custom_tcp_connect { grpc_closure* closure; grpc_endpoint** endpoint; int refs; - char* addr_name; + std::string addr_name; grpc_resource_quota* resource_quota; }; static void custom_tcp_connect_cleanup(grpc_custom_tcp_connect* connect) { grpc_custom_socket* socket = connect->socket; grpc_resource_quota_unref_internal(connect->resource_quota); - gpr_free(connect->addr_name); - gpr_free(connect); + delete connect; socket->refs--; if (socket->refs == 0) { grpc_custom_socket_vtable->destroy(socket); @@ -67,7 +66,7 @@ static void on_alarm(void* acp, grpc_error* error) { if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { const char* str = grpc_error_string(error); gpr_log(GPR_INFO, "CLIENT_CONNECT: %s: on_alarm: error=%s", - connect->addr_name, str); + connect->addr_name.c_str(), str); } if (error == GRPC_ERROR_NONE) { /* error == NONE implies that the timer ran out, and wasn't cancelled. If @@ -89,7 +88,7 @@ static void custom_connect_callback_internal(grpc_custom_socket* socket, grpc_timer_cancel(&connect->alarm); if (error == GRPC_ERROR_NONE) { *connect->endpoint = custom_tcp_endpoint_create( - socket, connect->resource_quota, connect->addr_name); + socket, connect->resource_quota, connect->addr_name.c_str()); } done = (--connect->refs == 0); if (done) { @@ -120,7 +119,6 @@ static void tcp_connect(grpc_closure* closure, grpc_endpoint** ep, GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD(); (void)channel_args; (void)interested_parties; - grpc_custom_tcp_connect* connect; grpc_resource_quota* resource_quota = grpc_resource_quota_create(nullptr); if (channel_args != nullptr) { for (size_t i = 0; i < channel_args->num_args; i++) { @@ -135,8 +133,7 @@ static void tcp_connect(grpc_closure* closure, grpc_endpoint** ep, (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket)); socket->refs = 2; grpc_custom_socket_vtable->init(socket, GRPC_AF_UNSPEC); - connect = - (grpc_custom_tcp_connect*)gpr_malloc(sizeof(grpc_custom_tcp_connect)); + grpc_custom_tcp_connect* connect = new grpc_custom_tcp_connect(); connect->closure = closure; connect->endpoint = ep; connect->addr_name = grpc_sockaddr_to_uri(resolved_addr); @@ -149,7 +146,7 @@ static void tcp_connect(grpc_closure* closure, grpc_endpoint** ep, if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { gpr_log(GPR_INFO, "CLIENT_CONNECT: %p %s: asynchronously connecting", - socket, connect->addr_name); + socket, connect->addr_name.c_str()); } GRPC_CLOSURE_INIT(&connect->on_alarm, on_alarm, socket, diff --git a/src/core/lib/iomgr/tcp_client_posix.cc b/src/core/lib/iomgr/tcp_client_posix.cc index 7a673f411df..fb4149b35fc 100644 --- a/src/core/lib/iomgr/tcp_client_posix.cc +++ b/src/core/lib/iomgr/tcp_client_posix.cc @@ -29,9 +29,10 @@ #include #include +#include "absl/strings/str_cat.h" + #include #include -#include #include #include "src/core/lib/channel/channel_args.h" @@ -57,11 +58,12 @@ struct async_connect { int refs; grpc_closure write_closure; grpc_pollset_set* interested_parties; - char* addr_str; + std::string addr_str; grpc_endpoint** ep; grpc_closure* closure; grpc_channel_args* channel_args; }; + static grpc_error* prepare_socket(const grpc_resolved_address* addr, int fd, const grpc_channel_args* channel_args) { grpc_error* err = GRPC_ERROR_NONE; @@ -102,8 +104,8 @@ static void tc_on_alarm(void* acp, grpc_error* error) { async_connect* ac = static_cast(acp); if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { const char* str = grpc_error_string(error); - gpr_log(GPR_INFO, "CLIENT_CONNECT: %s: on_alarm: error=%s", ac->addr_str, - str); + gpr_log(GPR_INFO, "CLIENT_CONNECT: %s: on_alarm: error=%s", + ac->addr_str.c_str(), str); } gpr_mu_lock(&ac->mu); if (ac->fd != nullptr) { @@ -114,9 +116,8 @@ static void tc_on_alarm(void* acp, grpc_error* error) { gpr_mu_unlock(&ac->mu); if (done) { gpr_mu_destroy(&ac->mu); - gpr_free(ac->addr_str); grpc_channel_args_destroy(ac->channel_args); - gpr_free(ac); + delete ac; } } @@ -139,8 +140,8 @@ static void on_writable(void* acp, grpc_error* error) { if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { const char* str = grpc_error_string(error); - gpr_log(GPR_INFO, "CLIENT_CONNECT: %s: on_writable: error=%s", ac->addr_str, - str); + gpr_log(GPR_INFO, "CLIENT_CONNECT: %s: on_writable: error=%s", + ac->addr_str.c_str(), str); } gpr_mu_lock(&ac->mu); @@ -172,7 +173,8 @@ static void on_writable(void* acp, grpc_error* error) { switch (so_error) { case 0: grpc_pollset_set_del_fd(ac->interested_parties, fd); - *ep = grpc_tcp_client_create_from_fd(fd, ac->channel_args, ac->addr_str); + *ep = grpc_tcp_client_create_from_fd(fd, ac->channel_args, + ac->addr_str.c_str()); fd = nullptr; break; case ENOBUFS: @@ -214,19 +216,17 @@ finish: done = (--ac->refs == 0); // Create a copy of the data from "ac" to be accessed after the unlock, as // "ac" and its contents may be deallocated by the time they are read. - const grpc_slice addr_str_slice = grpc_slice_from_copied_string(ac->addr_str); + const grpc_slice addr_str_slice = grpc_slice_from_cpp_string(ac->addr_str); gpr_mu_unlock(&ac->mu); if (error != GRPC_ERROR_NONE) { - char* error_descr; grpc_slice str; bool ret = grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION, &str); GPR_ASSERT(ret); - char* desc = grpc_slice_to_c_string(str); - gpr_asprintf(&error_descr, "Failed to connect to remote host: %s", desc); - error = grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION, - grpc_slice_from_copied_string(error_descr)); - gpr_free(error_descr); - gpr_free(desc); + std::string description = absl::StrCat("Failed to connect to remote host: ", + grpc_core::StringViewFromSlice(str)); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION, + grpc_slice_from_cpp_string(std::move(description))); error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, addr_str_slice /* takes ownership */); } else { @@ -236,9 +236,8 @@ finish: // This is safe even outside the lock, because "done", the sentinel, is // populated *inside* the lock. gpr_mu_destroy(&ac->mu); - gpr_free(ac->addr_str); grpc_channel_args_destroy(ac->channel_args); - gpr_free(ac); + delete ac; } grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, error); } @@ -279,33 +278,25 @@ void grpc_tcp_client_create_from_prepared_fd( const grpc_channel_args* channel_args, const grpc_resolved_address* addr, grpc_millis deadline, grpc_endpoint** ep) { int err; - async_connect* ac; do { err = connect(fd, reinterpret_cast(addr->addr), addr->len); } while (err < 0 && errno == EINTR); - char* name; - char* addr_str; - addr_str = grpc_sockaddr_to_uri(addr); - gpr_asprintf(&name, "tcp-client:%s", addr_str); - grpc_fd* fdobj = grpc_fd_create(fd, name, true); - gpr_free(name); - gpr_free(addr_str); + std::string name = absl::StrCat("tcp-client:", grpc_sockaddr_to_uri(addr)); + grpc_fd* fdobj = grpc_fd_create(fd, name.c_str(), true); if (err >= 0) { - char* addr_str = grpc_sockaddr_to_uri(addr); - *ep = grpc_tcp_client_create_from_fd(fdobj, channel_args, addr_str); - gpr_free(addr_str); + *ep = grpc_tcp_client_create_from_fd(fdobj, channel_args, + grpc_sockaddr_to_uri(addr).c_str()); grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, GRPC_ERROR_NONE); return; } if (errno != EWOULDBLOCK && errno != EINPROGRESS) { grpc_error* error = GRPC_OS_ERROR(errno, "connect"); - char* addr_str = grpc_sockaddr_to_uri(addr); - error = grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, - grpc_slice_from_copied_string(addr_str)); - gpr_free(addr_str); + error = grpc_error_set_str( + error, GRPC_ERROR_STR_TARGET_ADDRESS, + grpc_slice_from_cpp_string(grpc_sockaddr_to_uri(addr))); grpc_fd_orphan(fdobj, nullptr, nullptr, "tcp_client_connect_error"); grpc_core::ExecCtx::Run(DEBUG_LOCATION, closure, error); return; @@ -313,7 +304,7 @@ void grpc_tcp_client_create_from_prepared_fd( grpc_pollset_set_add_fd(interested_parties, fdobj); - ac = static_cast(gpr_malloc(sizeof(async_connect))); + async_connect* ac = new async_connect(); ac->closure = closure; ac->ep = ep; ac->fd = fdobj; @@ -327,7 +318,7 @@ void grpc_tcp_client_create_from_prepared_fd( if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { gpr_log(GPR_INFO, "CLIENT_CONNECT: %s: asynchronously connecting fd %p", - ac->addr_str, fdobj); + ac->addr_str.c_str(), fdobj); } gpr_mu_lock(&ac->mu); diff --git a/src/core/lib/iomgr/tcp_client_windows.cc b/src/core/lib/iomgr/tcp_client_windows.cc index 3d310b1e3de..061e70393d6 100644 --- a/src/core/lib/iomgr/tcp_client_windows.cc +++ b/src/core/lib/iomgr/tcp_client_windows.cc @@ -39,6 +39,7 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/tcp_windows.h" #include "src/core/lib/iomgr/timer.h" +#include "src/core/lib/slice/slice_internal.h" struct async_connect { grpc_closure* on_done; @@ -46,12 +47,13 @@ struct async_connect { grpc_winsocket* socket; grpc_timer alarm; grpc_closure on_alarm; - char* addr_name; + std::string addr_name; int refs; grpc_closure on_connect; grpc_endpoint** endpoint; grpc_channel_args* channel_args; }; + static void async_connect_unlock_and_cleanup(async_connect* ac, grpc_winsocket* socket) { int done = (--ac->refs == 0); @@ -59,8 +61,7 @@ static void async_connect_unlock_and_cleanup(async_connect* ac, if (done) { grpc_channel_args_destroy(ac->channel_args); gpr_mu_destroy(&ac->mu); - gpr_free(ac->addr_name); - gpr_free(ac); + delete ac; } if (socket != NULL) grpc_winsocket_destroy(socket); } @@ -105,7 +106,7 @@ static void on_connect(void* acp, grpc_error* error) { error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx"); closesocket(socket->socket); } else { - *ep = grpc_tcp_create(socket, ac->channel_args, ac->addr_name); + *ep = grpc_tcp_create(socket, ac->channel_args, ac->addr_name.c_str()); socket = NULL; } } else { @@ -131,13 +132,13 @@ static void tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint, int status; grpc_resolved_address addr6_v4mapped; grpc_resolved_address local_address; - async_connect* ac; grpc_winsocket* socket = NULL; LPFN_CONNECTEX ConnectEx; GUID guid = WSAID_CONNECTEX; DWORD ioctl_num_bytes; grpc_winsocket_callback_info* info; grpc_error* error = GRPC_ERROR_NONE; + async_connect* ac = NULL; *endpoint = NULL; @@ -194,7 +195,7 @@ static void tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint, } } - ac = (async_connect*)gpr_malloc(sizeof(async_connect)); + ac = new async_connect(); ac->on_done = on_done; ac->socket = socket; gpr_mu_init(&ac->mu); @@ -211,13 +212,12 @@ static void tcp_connect(grpc_closure* on_done, grpc_endpoint** endpoint, failure: GPR_ASSERT(error != GRPC_ERROR_NONE); - char* target_uri = grpc_sockaddr_to_uri(addr); + std::string target_uri = grpc_sockaddr_to_uri(addr); grpc_error* final_error = grpc_error_set_str(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( "Failed to connect", &error, 1), GRPC_ERROR_STR_TARGET_ADDRESS, - grpc_slice_from_copied_string( - target_uri == nullptr ? "NULL" : target_uri)); + grpc_slice_from_cpp_string(std::move(target_uri))); GRPC_ERROR_UNREF(error); if (socket != NULL) { grpc_winsocket_destroy(socket); diff --git a/src/core/lib/iomgr/tcp_custom.cc b/src/core/lib/iomgr/tcp_custom.cc index 0688c5ecd46..6cf36f7d669 100644 --- a/src/core/lib/iomgr/tcp_custom.cc +++ b/src/core/lib/iomgr/tcp_custom.cc @@ -345,7 +345,7 @@ static grpc_endpoint_vtable vtable = {endpoint_read, grpc_endpoint* custom_tcp_endpoint_create(grpc_custom_socket* socket, grpc_resource_quota* resource_quota, - char* peer_string) { + const char* peer_string) { custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)gpr_malloc(sizeof(custom_tcp_endpoint)); grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; diff --git a/src/core/lib/iomgr/tcp_custom.h b/src/core/lib/iomgr/tcp_custom.h index fd2cb0313d9..d32ed2b4b61 100644 --- a/src/core/lib/iomgr/tcp_custom.h +++ b/src/core/lib/iomgr/tcp_custom.h @@ -79,6 +79,6 @@ void grpc_custom_close_server_callback(grpc_tcp_listener* listener); grpc_endpoint* custom_tcp_endpoint_create(grpc_custom_socket* socket, grpc_resource_quota* resource_quota, - char* peer_string); + const char* peer_string); #endif /* GRPC_CORE_LIB_IOMGR_TCP_CUSTOM_H */ diff --git a/src/core/lib/iomgr/tcp_server_custom.cc b/src/core/lib/iomgr/tcp_server_custom.cc index 49781ada7b1..6d58aab40b6 100644 --- a/src/core/lib/iomgr/tcp_server_custom.cc +++ b/src/core/lib/iomgr/tcp_server_custom.cc @@ -216,10 +216,9 @@ static void finish_accept(grpc_tcp_listener* sp, grpc_custom_socket* socket) { (grpc_tcp_server_acceptor*)gpr_malloc(sizeof(*acceptor)); grpc_endpoint* ep = nullptr; grpc_resolved_address peer_name; - char* peer_name_string; + std::string peer_name_string; grpc_error* err; - peer_name_string = nullptr; memset(&peer_name, 0, sizeof(grpc_resolved_address)); peer_name.len = GRPC_MAX_SOCKADDR_SIZE; err = grpc_custom_socket_vtable->getpeername( @@ -231,21 +230,16 @@ static void finish_accept(grpc_tcp_listener* sp, grpc_custom_socket* socket) { GRPC_ERROR_UNREF(err); } if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { - if (peer_name_string) { - gpr_log(GPR_INFO, "SERVER_CONNECT: %p accepted connection: %s", - sp->server, peer_name_string); - } else { - gpr_log(GPR_INFO, "SERVER_CONNECT: %p accepted connection", sp->server); - } + gpr_log(GPR_INFO, "SERVER_CONNECT: %p accepted connection: %s", sp->server, + peer_name_string.c_str()); } ep = custom_tcp_endpoint_create(socket, sp->server->resource_quota, - peer_name_string); + peer_name_string.c_str()); acceptor->from_server = sp->server; acceptor->port_index = sp->port_index; acceptor->fd_index = 0; acceptor->external_connection = false; sp->server->on_accept_cb(sp->server->on_accept_cb_arg, ep, nullptr, acceptor); - gpr_free(peer_name_string); } static void custom_accept_callback(grpc_custom_socket* socket, diff --git a/src/core/lib/iomgr/tcp_server_posix.cc b/src/core/lib/iomgr/tcp_server_posix.cc index 25dc7915adb..9fb2c1f5246 100644 --- a/src/core/lib/iomgr/tcp_server_posix.cc +++ b/src/core/lib/iomgr/tcp_server_posix.cc @@ -39,9 +39,11 @@ #include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include -#include #include #include @@ -196,8 +198,6 @@ static void on_read(void* arg, grpc_error* err) { /* loop until accept4 returns EAGAIN, and then re-arm notification */ for (;;) { grpc_resolved_address addr; - char* addr_str; - char* name; memset(&addr, 0, sizeof(addr)); addr.len = static_cast(sizeof(struct sockaddr_storage)); /* Note: If we ever decide to return this address to the user, remember to @@ -238,14 +238,14 @@ static void on_read(void* arg, grpc_error* err) { grpc_set_socket_no_sigpipe_if_possible(fd); - addr_str = grpc_sockaddr_to_uri(&addr); - gpr_asprintf(&name, "tcp-server-connection:%s", addr_str); - + std::string addr_str = grpc_sockaddr_to_uri(&addr); if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) { - gpr_log(GPR_INFO, "SERVER_CONNECT: incoming connection: %s", addr_str); + gpr_log(GPR_INFO, "SERVER_CONNECT: incoming connection: %s", + addr_str.c_str()); } - grpc_fd* fdobj = grpc_fd_create(fd, name, true); + std::string name = absl::StrCat("tcp-server-connection:", addr_str); + grpc_fd* fdobj = grpc_fd_create(fd, name.c_str(), true); read_notifier_pollset = sp->server->pollsets[static_cast(gpr_atm_no_barrier_fetch_add( @@ -264,11 +264,8 @@ static void on_read(void* arg, grpc_error* err) { sp->server->on_accept_cb( sp->server->on_accept_cb_arg, - grpc_tcp_create(fdobj, sp->server->channel_args, addr_str), + grpc_tcp_create(fdobj, sp->server->channel_args, addr_str.c_str()), read_notifier_pollset, acceptor); - - gpr_free(name); - gpr_free(addr_str); } GPR_UNREACHABLE_CODE(return ); @@ -352,7 +349,6 @@ static grpc_error* add_wildcard_addrs_to_server(grpc_tcp_server* s, static grpc_error* clone_port(grpc_tcp_listener* listener, unsigned count) { grpc_tcp_listener* sp = nullptr; std::string addr_str; - char* name; grpc_error* err; for (grpc_tcp_listener* l = listener->next; l && l->is_sibling; l = l->next) { @@ -371,7 +367,6 @@ static grpc_error* clone_port(grpc_tcp_listener* listener, unsigned count) { if (err != GRPC_ERROR_NONE) return err; listener->server->nports++; addr_str = grpc_sockaddr_to_string(&listener->addr, true); - gpr_asprintf(&name, "tcp-server-listener:%s/clone-%d", addr_str.c_str(), i); sp = static_cast(gpr_malloc(sizeof(grpc_tcp_listener))); sp->next = listener->next; listener->next = sp; @@ -382,7 +377,11 @@ static grpc_error* clone_port(grpc_tcp_listener* listener, unsigned count) { listener->sibling = sp; sp->server = listener->server; sp->fd = fd; - sp->emfd = grpc_fd_create(fd, name, true); + sp->emfd = grpc_fd_create( + fd, + absl::StrFormat("tcp-server-listener:%s/clone-%d", addr_str.c_str(), i) + .c_str(), + true); memcpy(&sp->addr, &listener->addr, sizeof(grpc_resolved_address)); sp->port = port; sp->port_index = listener->port_index; @@ -391,7 +390,6 @@ static grpc_error* clone_port(grpc_tcp_listener* listener, unsigned count) { while (listener->server->tail->next != nullptr) { listener->server->tail = listener->server->tail->next; } - gpr_free(name); } return GRPC_ERROR_NONE; @@ -577,8 +575,6 @@ class ExternalConnectionHandler : public grpc_core::TcpServerFdHandler { void Handle(int listener_fd, int fd, grpc_byte_buffer* buf) override { grpc_pollset* read_notifier_pollset; grpc_resolved_address addr; - char* addr_str; - char* name; memset(&addr, 0, sizeof(addr)); addr.len = static_cast(sizeof(struct sockaddr_storage)); grpc_core::ExecCtx exec_ctx; @@ -590,13 +586,13 @@ class ExternalConnectionHandler : public grpc_core::TcpServerFdHandler { return; } grpc_set_socket_no_sigpipe_if_possible(fd); - addr_str = grpc_sockaddr_to_uri(&addr); - gpr_asprintf(&name, "tcp-server-connection:%s", addr_str); + std::string addr_str = grpc_sockaddr_to_uri(&addr); if (grpc_tcp_trace.enabled()) { gpr_log(GPR_INFO, "SERVER_CONNECT: incoming external connection: %s", - addr_str); + addr_str.c_str()); } - grpc_fd* fdobj = grpc_fd_create(fd, name, true); + std::string name = absl::StrCat("tcp-server-connection:", addr_str); + grpc_fd* fdobj = grpc_fd_create(fd, name.c_str(), true); read_notifier_pollset = s_->pollsets[static_cast(gpr_atm_no_barrier_fetch_add( &s_->next_pollset_to_assign, 1)) % @@ -611,10 +607,8 @@ class ExternalConnectionHandler : public grpc_core::TcpServerFdHandler { acceptor->listener_fd = listener_fd; acceptor->pending_data = buf; s_->on_accept_cb(s_->on_accept_cb_arg, - grpc_tcp_create(fdobj, s_->channel_args, addr_str), + grpc_tcp_create(fdobj, s_->channel_args, addr_str.c_str()), read_notifier_pollset, acceptor); - gpr_free(name); - gpr_free(addr_str); } private: diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc index 6e9825622c4..bd7ff9b363e 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_common.cc @@ -31,9 +31,10 @@ #include +#include "absl/strings/str_cat.h" + #include #include -#include #include #include "src/core/lib/iomgr/error.h" @@ -85,15 +86,13 @@ static grpc_error* add_socket_to_server(grpc_tcp_server* s, int fd, grpc_tcp_listener** listener) { grpc_tcp_listener* sp = nullptr; int port = -1; - std::string addr_str; - char* name; grpc_error* err = grpc_tcp_server_prepare_socket(s, fd, addr, s->so_reuseport, &port); if (err == GRPC_ERROR_NONE) { GPR_ASSERT(port > 0); - addr_str = grpc_sockaddr_to_string(addr, true); - gpr_asprintf(&name, "tcp-server-listener:%s", addr_str.c_str()); + std::string addr_str = grpc_sockaddr_to_string(addr, true); + std::string name = absl::StrCat("tcp-server-listener:", addr_str); gpr_mu_lock(&s->mu); s->nports++; GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server"); @@ -107,7 +106,7 @@ static grpc_error* add_socket_to_server(grpc_tcp_server* s, int fd, s->tail = sp; sp->server = s; sp->fd = fd; - sp->emfd = grpc_fd_create(fd, name, true); + sp->emfd = grpc_fd_create(fd, name.c_str(), true); memcpy(&sp->addr, addr, sizeof(grpc_resolved_address)); sp->port = port; sp->port_index = port_index; @@ -116,7 +115,6 @@ static grpc_error* add_socket_to_server(grpc_tcp_server* s, int fd, sp->sibling = nullptr; GPR_ASSERT(sp->emfd); gpr_mu_unlock(&s->mu); - gpr_free(name); } *listener = sp; diff --git a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc index 9a6c1694a71..d591f789691 100644 --- a/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +++ b/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc @@ -31,9 +31,10 @@ #include +#include "absl/strings/str_cat.h" + #include #include -#include #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/sockaddr.h" @@ -145,14 +146,8 @@ grpc_error* grpc_tcp_server_add_all_local_addrs(grpc_tcp_server* s, } if ((err = grpc_tcp_server_add_addr(s, &addr, port_index, fd_index, &dsmode, &new_sp)) != GRPC_ERROR_NONE) { - char* err_str = nullptr; - grpc_error* root_err; - if (gpr_asprintf(&err_str, "Failed to add listener: %s", - addr_str.c_str()) < 0) { - err_str = gpr_strdup("Failed to add listener"); - } - root_err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(err_str); - gpr_free(err_str); + grpc_error* root_err = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Failed to add listener: ", addr_str).c_str()); err = grpc_error_add_child(root_err, err); break; } else { diff --git a/src/core/lib/iomgr/tcp_server_windows.cc b/src/core/lib/iomgr/tcp_server_windows.cc index 0052175ae46..a0b0e31efda 100644 --- a/src/core/lib/iomgr/tcp_server_windows.cc +++ b/src/core/lib/iomgr/tcp_server_windows.cc @@ -27,6 +27,8 @@ #include #include +#include "absl/strings/str_cat.h" + #include #include #include @@ -42,6 +44,7 @@ #include "src/core/lib/iomgr/socket_windows.h" #include "src/core/lib/iomgr/tcp_server.h" #include "src/core/lib/iomgr/tcp_windows.h" +#include "src/core/lib/slice/slice_internal.h" #define MIN_SAFE_ACCEPT_QUEUE_SIZE 100 @@ -222,14 +225,13 @@ static grpc_error* prepare_socket(SOCKET sock, failure: GPR_ASSERT(error != GRPC_ERROR_NONE); - char* tgtaddr = grpc_sockaddr_to_uri(addr); grpc_error_set_int( - grpc_error_set_str(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( - "Failed to prepare server socket", &error, 1), - GRPC_ERROR_STR_TARGET_ADDRESS, - grpc_slice_from_copied_string(tgtaddr)), + grpc_error_set_str( + GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING( + "Failed to prepare server socket", &error, 1), + GRPC_ERROR_STR_TARGET_ADDRESS, + grpc_slice_from_cpp_string(grpc_sockaddr_to_uri(addr))), GRPC_ERROR_INT_FD, (intptr_t)sock); - gpr_free(tgtaddr); GRPC_ERROR_UNREF(error); if (sock != INVALID_SOCKET) closesocket(sock); return error; @@ -301,8 +303,6 @@ static void on_accept(void* arg, grpc_error* error) { grpc_winsocket_callback_info* info = &sp->socket->read_info; grpc_endpoint* ep = NULL; grpc_resolved_address peer_name; - char* peer_name_string; - char* fd_name; DWORD transfered_bytes; DWORD flags; BOOL wsa_success; @@ -337,7 +337,6 @@ static void on_accept(void* arg, grpc_error* error) { closesocket(sock); } else { if (!sp->shutting_down) { - peer_name_string = NULL; err = setsockopt(sock, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, (char*)&sp->socket->socket, sizeof(sp->socket->socket)); if (err) { @@ -348,6 +347,7 @@ static void on_accept(void* arg, grpc_error* error) { int peer_name_len = (int)peer_name.len; err = getpeername(sock, (grpc_sockaddr*)peer_name.addr, &peer_name_len); peer_name.len = (size_t)peer_name_len; + std::string peer_name_string; if (!err) { peer_name_string = grpc_sockaddr_to_uri(&peer_name); } else { @@ -355,11 +355,9 @@ static void on_accept(void* arg, grpc_error* error) { gpr_log(GPR_ERROR, "getpeername error: %s", utf8_message); gpr_free(utf8_message); } - gpr_asprintf(&fd_name, "tcp_server:%s", peer_name_string); - ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name), - sp->server->channel_args, peer_name_string); - gpr_free(fd_name); - gpr_free(peer_name_string); + std::string fd_name = absl::StrCat("tcp_server:", peer_name_string); + ep = grpc_tcp_create(grpc_winsocket_create(sock, fd_name.c_str()), + sp->server->channel_args, peer_name_string.c_str()); } else { closesocket(sock); } diff --git a/src/core/lib/iomgr/timer_generic.cc b/src/core/lib/iomgr/timer_generic.cc index 3c28838c8f8..d21b3aab126 100644 --- a/src/core/lib/iomgr/timer_generic.cc +++ b/src/core/lib/iomgr/timer_generic.cc @@ -22,12 +22,15 @@ #include +#include + +#include "absl/strings/str_cat.h" + #include "src/core/lib/iomgr/timer.h" #include #include #include -#include #include #include "src/core/lib/debug/trace.h" @@ -706,38 +709,36 @@ static grpc_timer_check_result timer_check(grpc_millis* next) { // tracing if (GRPC_TRACE_FLAG_ENABLED(grpc_timer_check_trace)) { - char* next_str; + std::string next_str; if (next == nullptr) { - next_str = gpr_strdup("NULL"); + next_str = "NULL"; } else { - gpr_asprintf(&next_str, "%" PRId64, *next); + next_str = absl::StrCat(*next); } #if GPR_ARCH_64 gpr_log(GPR_INFO, "TIMER CHECK BEGIN: now=%" PRId64 " next=%s tls_min=%" PRId64 " glob_min=%" PRId64, - now, next_str, min_timer, + now, next_str.c_str(), min_timer, static_cast(gpr_atm_no_barrier_load( (gpr_atm*)(&g_shared_mutables.min_timer)))); #else gpr_log(GPR_INFO, "TIMER CHECK BEGIN: now=%" PRId64 " next=%s min=%" PRId64, - now, next_str, min_timer); + now, next_str.c_str(), min_timer); #endif - gpr_free(next_str); } // actual code grpc_timer_check_result r = run_some_expired_timers(now, next, shutdown_error); // tracing if (GRPC_TRACE_FLAG_ENABLED(grpc_timer_check_trace)) { - char* next_str; + std::string next_str; if (next == nullptr) { - next_str = gpr_strdup("NULL"); + next_str = "NULL"; } else { - gpr_asprintf(&next_str, "%" PRId64, *next); + next_str = absl::StrCat(*next); } - gpr_log(GPR_INFO, "TIMER CHECK END: r=%d; next=%s", r, next_str); - gpr_free(next_str); + gpr_log(GPR_INFO, "TIMER CHECK END: r=%d; next=%s", r, next_str.c_str()); } return r; } diff --git a/src/core/lib/iomgr/udp_server.cc b/src/core/lib/iomgr/udp_server.cc index 461f543d675..6ddc06c6188 100644 --- a/src/core/lib/iomgr/udp_server.cc +++ b/src/core/lib/iomgr/udp_server.cc @@ -44,7 +44,10 @@ #include #include +#include + #include "absl/container/inlined_vector.h" +#include "absl/strings/str_cat.h" #include #include @@ -148,13 +151,11 @@ GrpcUdpListener::GrpcUdpListener(grpc_udp_server* server, int fd, server_(server), orphan_notified_(false), already_shutdown_(false) { - char* name; std::string addr_str = grpc_sockaddr_to_string(addr, true); - gpr_asprintf(&name, "udp-server-listener:%s", addr_str.c_str()); - emfd_ = grpc_fd_create(fd, name, true); + std::string name = absl::StrCat("udp-server-listener:", addr_str); + emfd_ = grpc_fd_create(fd, name.c_str(), true); memcpy(&addr_, addr, sizeof(grpc_resolved_address)); GPR_ASSERT(emfd_); - gpr_free(name); gpr_mu_init(&mutex_); } diff --git a/src/core/lib/iomgr/unix_sockets_posix.cc b/src/core/lib/iomgr/unix_sockets_posix.cc index 22fcaf57fc0..804989399cd 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.cc +++ b/src/core/lib/iomgr/unix_sockets_posix.cc @@ -28,6 +28,8 @@ #include #include +#include "absl/strings/str_cat.h" + #include "src/core/lib/iomgr/unix_sockets_posix.h" #include @@ -44,14 +46,10 @@ grpc_error* grpc_resolve_unix_domain_address(const char* name, struct sockaddr_un* un; if (strlen(name) > GPR_ARRAY_SIZE(((struct sockaddr_un*)nullptr)->sun_path) - 1) { - char* err_msg; - grpc_error* err; - gpr_asprintf(&err_msg, - "Path name should not have more than %" PRIuPTR " characters.", - GPR_ARRAY_SIZE(un->sun_path) - 1); - err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(err_msg); - gpr_free(err_msg); - return err; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Path name should not have more than ", + GPR_ARRAY_SIZE(un->sun_path) - 1, " characters") + .c_str()); } *addrs = static_cast( gpr_malloc(sizeof(grpc_resolved_addresses))); @@ -88,17 +86,14 @@ void grpc_unlink_if_unix_domain_socket( } } -char* grpc_sockaddr_to_uri_unix_if_possible( +std::string grpc_sockaddr_to_uri_unix_if_possible( const grpc_resolved_address* resolved_addr) { const grpc_sockaddr* addr = reinterpret_cast(resolved_addr->addr); if (addr->sa_family != AF_UNIX) { - return nullptr; + return ""; } - - char* result; - gpr_asprintf(&result, "unix:%s", ((struct sockaddr_un*)addr)->sun_path); - return result; + return absl::StrCat("unix:", ((struct sockaddr_un*)addr)->sun_path); } #endif diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index 917d0327a96..423daa52d36 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -21,6 +21,8 @@ #include +#include + #include "src/core/lib/iomgr/port.h" #include @@ -37,7 +39,7 @@ int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr); void grpc_unlink_if_unix_domain_socket( const grpc_resolved_address* resolved_addr); -char* grpc_sockaddr_to_uri_unix_if_possible( +std::string grpc_sockaddr_to_uri_unix_if_possible( const grpc_resolved_address* resolved_addr); #endif /* GRPC_CORE_LIB_IOMGR_UNIX_SOCKETS_POSIX_H */ diff --git a/src/core/lib/iomgr/unix_sockets_posix_noop.cc b/src/core/lib/iomgr/unix_sockets_posix_noop.cc index dfab3e0acbc..0c144ce05d8 100644 --- a/src/core/lib/iomgr/unix_sockets_posix_noop.cc +++ b/src/core/lib/iomgr/unix_sockets_posix_noop.cc @@ -22,6 +22,8 @@ #ifndef GRPC_HAVE_UNIX_SOCKET +#include + #include void grpc_create_socketpair_if_unix(int sv[2]) { @@ -42,8 +44,9 @@ int grpc_is_unix_socket(const grpc_resolved_address* addr) { return false; } void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address* addr) {} -char* grpc_sockaddr_to_uri_unix_if_possible(const grpc_resolved_address* addr) { - return NULL; +std::string grpc_sockaddr_to_uri_unix_if_possible( + const grpc_resolved_address* addr) { + return ""; } #endif diff --git a/src/core/lib/json/json_reader.cc b/src/core/lib/json/json_reader.cc index 208e9721db4..f4806de0ca3 100644 --- a/src/core/lib/json/json_reader.cc +++ b/src/core/lib/json/json_reader.cc @@ -20,8 +20,12 @@ #include +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include -#include #include "src/core/lib/json/json.h" @@ -176,11 +180,10 @@ Json* JsonReader::CreateAndLinkValue() { if (errors_.size() == GRPC_JSON_MAX_ERRORS) { truncated_errors_ = true; } else { - char* msg; - gpr_asprintf(&msg, "duplicate key \"%s\" at index %" PRIuPTR, - key_.c_str(), CurrentIndex()); - errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg)); - gpr_free(msg); + errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("duplicate key \"%s\" at index %" PRIuPTR, key_, + CurrentIndex()) + .c_str())); } } value = &(*parent->mutable_object())[std::move(key_)]; @@ -198,11 +201,10 @@ bool JsonReader::StartContainer(Json::Type type) { if (errors_.size() == GRPC_JSON_MAX_ERRORS) { truncated_errors_ = true; } else { - char* msg; - gpr_asprintf(&msg, "exceeded max stack depth (%d) at index %" PRIuPTR, - GRPC_JSON_MAX_DEPTH, CurrentIndex()); - errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg)); - gpr_free(msg); + errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("exceeded max stack depth (%d) at index %" PRIuPTR, + GRPC_JSON_MAX_DEPTH, CurrentIndex()) + .c_str())); } return false; } @@ -824,17 +826,14 @@ grpc_error* JsonReader::Parse(absl::string_view input, Json* output) { "errors and try again to see additional errors")); } if (status == Status::GRPC_JSON_INTERNAL_ERROR) { - char* msg; - gpr_asprintf(&msg, "internal error in JSON parser at index %" PRIuPTR, - reader.CurrentIndex()); - reader.errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg)); - gpr_free(msg); + reader.errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("internal error in JSON parser at index ", + reader.CurrentIndex()) + .c_str())); } else if (status == Status::GRPC_JSON_PARSE_ERROR) { - char* msg; - gpr_asprintf(&msg, "JSON parse error at index %" PRIuPTR, - reader.CurrentIndex()); - reader.errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg)); - gpr_free(msg); + reader.errors_.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("JSON parse error at index ", reader.CurrentIndex()) + .c_str())); } if (!reader.errors_.empty()) { return GRPC_ERROR_CREATE_FROM_VECTOR("JSON parsing failed", diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 7aff8f24a1e..1cc6e2d65f5 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -23,6 +23,8 @@ #include +#include + #include #include #include @@ -79,13 +81,13 @@ typedef enum { /* --- Google utils --- */ /* It is the caller's responsibility to gpr_free the result if not NULL. */ -char* grpc_get_well_known_google_credentials_file_path(void); +std::string grpc_get_well_known_google_credentials_file_path(void); /* Implementation function for the different platforms. */ -char* grpc_get_well_known_google_credentials_file_path_impl(void); +std::string grpc_get_well_known_google_credentials_file_path_impl(void); /* Override for testing only. Not thread-safe */ -typedef char* (*grpc_well_known_credentials_path_getter)(void); +typedef std::string (*grpc_well_known_credentials_path_getter)(void); void grpc_override_well_known_credentials_path_getter( grpc_well_known_credentials_path_getter getter); diff --git a/src/core/lib/security/credentials/google_default/credentials_generic.cc b/src/core/lib/security/credentials/google_default/credentials_generic.cc index 10ff0f620f9..8716edeca61 100644 --- a/src/core/lib/security/credentials/google_default/credentials_generic.cc +++ b/src/core/lib/security/credentials/google_default/credentials_generic.cc @@ -20,22 +20,24 @@ #include "src/core/lib/security/credentials/google_default/google_default_credentials.h" +#include + +#include "absl/strings/str_cat.h" + #include #include -#include #include "src/core/lib/gpr/env.h" -#include "src/core/lib/gpr/string.h" -char* grpc_get_well_known_google_credentials_file_path_impl(void) { - char* result = nullptr; +std::string grpc_get_well_known_google_credentials_file_path_impl(void) { char* base = gpr_getenv(GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR); if (base == nullptr) { gpr_log(GPR_ERROR, "Could not get " GRPC_GOOGLE_CREDENTIALS_PATH_ENV_VAR " environment variable."); - return nullptr; + return ""; } - gpr_asprintf(&result, "%s/%s", base, GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX); + std::string result = + absl::StrCat(base, "/", GRPC_GOOGLE_CREDENTIALS_PATH_SUFFIX); gpr_free(base); return result; } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/src/core/lib/security/credentials/google_default/google_default_credentials.cc index f7dc85ec106..4edbd86037f 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.cc +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.cc @@ -216,18 +216,19 @@ static int is_metadata_server_reachable() { /* Takes ownership of creds_path if not NULL. */ static grpc_error* create_default_creds_from_path( - char* creds_path, grpc_core::RefCountedPtr* creds) { + const std::string& creds_path, + grpc_core::RefCountedPtr* creds) { grpc_auth_json_key key; grpc_auth_refresh_token token; grpc_core::RefCountedPtr result; grpc_slice creds_data = grpc_empty_slice(); grpc_error* error = GRPC_ERROR_NONE; Json json; - if (creds_path == nullptr) { + if (creds_path.empty()) { error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("creds_path unset"); goto end; } - error = grpc_load_file(creds_path, 0, &creds_data); + error = grpc_load_file(creds_path.c_str(), 0, &creds_data); if (error != GRPC_ERROR_NONE) goto end; json = Json::Parse(grpc_core::StringViewFromSlice(creds_data), &error); if (error != GRPC_ERROR_NONE) goto end; @@ -267,7 +268,6 @@ static grpc_error* create_default_creds_from_path( end: GPR_ASSERT((result == nullptr) + (error == GRPC_ERROR_NONE) == 1); - if (creds_path != nullptr) gpr_free(creds_path); grpc_slice_unref_internal(creds_data); *creds = result; return error; @@ -286,10 +286,13 @@ grpc_channel_credentials* grpc_google_default_credentials_create() { gpr_once_init(&g_once, init_default_credentials); /* First, try the environment variable. */ - err = create_default_creds_from_path( - gpr_getenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR), &call_creds); - if (err == GRPC_ERROR_NONE) goto end; - error = grpc_error_add_child(error, err); + char* path_from_env = gpr_getenv(GRPC_GOOGLE_CREDENTIALS_ENV_VAR); + if (path_from_env != nullptr) { + err = create_default_creds_from_path(path_from_env, &call_creds); + gpr_free(path_from_env); + if (err == GRPC_ERROR_NONE) goto end; + error = grpc_error_add_child(error, err); + } /* Then the well-known file. */ err = create_default_creds_from_path( @@ -372,7 +375,7 @@ void grpc_flush_cached_google_default_credentials(void) { static grpc_well_known_credentials_path_getter creds_path_getter = nullptr; -char* grpc_get_well_known_google_credentials_file_path(void) { +std::string grpc_get_well_known_google_credentials_file_path(void) { if (creds_path_getter != nullptr) return creds_path_getter(); return grpc_get_well_known_google_credentials_file_path_impl(); } diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.cc b/src/core/lib/security/credentials/jwt/jwt_credentials.cc index bed594e5d92..e5edc052e3b 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.cc +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.cc @@ -23,8 +23,13 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include "src/core/lib/gprpp/ref_counted.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" +#include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/surface/api_trace.h" #include @@ -81,16 +86,14 @@ bool grpc_service_account_jwt_access_credentials::get_request_metadata( jwt = grpc_jwt_encode_and_sign(&key_, context.service_url, jwt_lifetime_, nullptr); if (jwt != nullptr) { - char* md_value; - gpr_asprintf(&md_value, "Bearer %s", jwt); + std::string md_value = absl::StrCat("Bearer ", jwt); gpr_free(jwt); cached_.jwt_expiration = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), jwt_lifetime_); cached_.service_url = gpr_strdup(context.service_url); cached_.jwt_md = grpc_mdelem_from_slices( grpc_slice_from_static_string(GRPC_AUTHORIZATION_METADATA_KEY), - grpc_slice_from_copied_string(md_value)); - gpr_free(md_value); + grpc_slice_from_cpp_string(std::move(md_value))); jwt_md = GRPC_MDELEM_REF(cached_.jwt_md); } gpr_mu_unlock(&cache_mu_); diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc index 550aa0cb544..322156c92fc 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc @@ -24,6 +24,8 @@ #include #include "absl/container/inlined_vector.h" +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" #include "absl/strings/str_join.h" #include @@ -33,7 +35,6 @@ #include #include -#include "absl/strings/str_format.h" #include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/ref_counted_ptr.h" #include "src/core/lib/iomgr/error.h" @@ -136,7 +137,6 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response( const grpc_http_response* response, grpc_mdelem* token_md, grpc_millis* token_lifetime) { char* null_terminated_body = nullptr; - char* new_access_token = nullptr; grpc_credentials_status status = GRPC_CREDENTIALS_OK; Json json; @@ -202,12 +202,12 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response( goto end; } expires_in = it->second.string_value().c_str(); - gpr_asprintf(&new_access_token, "%s %s", token_type, access_token); *token_lifetime = strtol(expires_in, nullptr, 10) * GPR_MS_PER_SEC; if (!GRPC_MDISNULL(*token_md)) GRPC_MDELEM_UNREF(*token_md); *token_md = grpc_mdelem_from_slices( grpc_core::ExternallyManagedSlice(GRPC_AUTHORIZATION_METADATA_KEY), - grpc_core::UnmanagedMemorySlice(new_access_token)); + grpc_slice_from_cpp_string( + absl::StrCat(token_type, " ", access_token))); status = GRPC_CREDENTIALS_OK; } @@ -216,8 +216,7 @@ end: GRPC_MDELEM_UNREF(*token_md); *token_md = GRPC_MDNULL; } - if (null_terminated_body != nullptr) gpr_free(null_terminated_body); - if (new_access_token != nullptr) gpr_free(new_access_token); + gpr_free(null_terminated_body); return status; } @@ -442,10 +441,9 @@ void grpc_google_refresh_token_credentials::fetch_oauth2( const_cast("Content-Type"), const_cast("application/x-www-form-urlencoded")}; grpc_httpcli_request request; - char* body = nullptr; - gpr_asprintf(&body, GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING, - refresh_token_.client_id, refresh_token_.client_secret, - refresh_token_.refresh_token); + std::string body = absl::StrFormat( + GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING, refresh_token_.client_id, + refresh_token_.client_secret, refresh_token_.refresh_token); memset(&request, 0, sizeof(grpc_httpcli_request)); request.host = (char*)GRPC_GOOGLE_OAUTH2_SERVICE_HOST; request.http.path = (char*)GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH; @@ -457,13 +455,12 @@ void grpc_google_refresh_token_credentials::fetch_oauth2( extreme memory pressure. */ grpc_resource_quota* resource_quota = grpc_resource_quota_create("oauth2_credentials_refresh"); - grpc_httpcli_post(httpcli_context, pollent, resource_quota, &request, body, - strlen(body), deadline, + grpc_httpcli_post(httpcli_context, pollent, resource_quota, &request, + body.c_str(), body.size(), deadline, GRPC_CLOSURE_INIT(&http_post_cb_closure_, response_cb, metadata_req, grpc_schedule_on_exec_ctx), &metadata_req->response); grpc_resource_quota_unref_internal(resource_quota); - gpr_free(body); } grpc_google_refresh_token_credentials::grpc_google_refresh_token_credentials( @@ -487,16 +484,15 @@ std::string grpc_google_refresh_token_credentials::debug_string() { grpc_oauth2_token_fetcher_credentials::debug_string()); } -static char* create_loggable_refresh_token(grpc_auth_refresh_token* token) { +static std::string create_loggable_refresh_token( + grpc_auth_refresh_token* token) { if (strcmp(token->type, GRPC_AUTH_JSON_TYPE_INVALID) == 0) { - return gpr_strdup(""); + return ""; } - char* loggable_token = nullptr; - gpr_asprintf(&loggable_token, - "{\n type: %s\n client_id: %s\n client_secret: " - "\n refresh_token: \n}", - token->type, token->client_id); - return loggable_token; + return absl::StrFormat( + "{\n type: %s\n client_id: %s\n client_secret: " + "\n refresh_token: \n}", + token->type, token->client_id); } grpc_call_credentials* grpc_google_refresh_token_credentials_create( @@ -504,12 +500,10 @@ grpc_call_credentials* grpc_google_refresh_token_credentials_create( grpc_auth_refresh_token token = grpc_auth_refresh_token_create_from_string(json_refresh_token); if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace)) { - char* loggable_token = create_loggable_refresh_token(&token); gpr_log(GPR_INFO, "grpc_refresh_token_credentials_create(json_refresh_token=%s, " "reserved=%p)", - loggable_token, reserved); - gpr_free(loggable_token); + create_loggable_refresh_token(&token).c_str(), reserved); } GPR_ASSERT(reserved == nullptr); return grpc_refresh_token_credentials_create_from_auth_refresh_token(token) @@ -744,13 +738,10 @@ void grpc_access_token_credentials::cancel_get_request_metadata( grpc_access_token_credentials::grpc_access_token_credentials( const char* access_token) : grpc_call_credentials(GRPC_CALL_CREDENTIALS_TYPE_OAUTH2) { - char* token_md_value; - gpr_asprintf(&token_md_value, "Bearer %s", access_token); grpc_core::ExecCtx exec_ctx; access_token_md_ = grpc_mdelem_from_slices( grpc_core::ExternallyManagedSlice(GRPC_AUTHORIZATION_METADATA_KEY), - grpc_core::UnmanagedMemorySlice(token_md_value)); - gpr_free(token_md_value); + grpc_slice_from_cpp_string(absl::StrCat("Bearer ", access_token))); } std::string grpc_access_token_credentials::debug_string() { diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/src/core/lib/security/credentials/plugin/plugin_credentials.cc index ebe59212f82..9cb8b815442 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.cc +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.cc @@ -22,10 +22,11 @@ #include +#include "absl/strings/str_cat.h" + #include #include #include -#include #include #include "src/core/lib/slice/slice_internal.h" @@ -86,11 +87,10 @@ static grpc_error* process_plugin_result( size_t num_md, grpc_status_code status, const char* error_details) { grpc_error* error = GRPC_ERROR_NONE; if (status != GRPC_STATUS_OK) { - char* msg; - gpr_asprintf(&msg, "Getting metadata from plugin failed with error: %s", - error_details); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Getting metadata from plugin failed with error: ", + error_details) + .c_str()); } else { bool seen_illegal_header = false; for (size_t i = 0; i < num_md; ++i) { diff --git a/src/core/lib/security/security_connector/fake/fake_security_connector.cc b/src/core/lib/security/security_connector/fake/fake_security_connector.cc index f0f515c53e1..48ac99d7a50 100644 --- a/src/core/lib/security/security_connector/fake/fake_security_connector.cc +++ b/src/core/lib/security/security_connector/fake/fake_security_connector.cc @@ -22,6 +22,8 @@ #include +#include "absl/strings/str_cat.h" + #include #include #include @@ -227,11 +229,10 @@ static void fake_check_peer( prop_name = peer.properties[0].name; if (prop_name == nullptr || strcmp(prop_name, TSI_CERTIFICATE_TYPE_PEER_PROPERTY)) { - char* msg; - gpr_asprintf(&msg, "Unexpected property in fake peer: %s.", - prop_name == nullptr ? "" : prop_name); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Unexpected property in fake peer: ", + prop_name == nullptr ? "" : prop_name) + .c_str()); goto end; } if (strncmp(peer.properties[0].value.data, TSI_FAKE_CERTIFICATE_TYPE, @@ -243,11 +244,10 @@ static void fake_check_peer( prop_name = peer.properties[1].name; if (prop_name == nullptr || strcmp(prop_name, TSI_SECURITY_LEVEL_PEER_PROPERTY) != 0) { - char* msg; - gpr_asprintf(&msg, "Unexpected property in fake peer: %s.", - prop_name == nullptr ? "" : prop_name); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Unexpected property in fake peer: ", + prop_name == nullptr ? "" : prop_name) + .c_str()); goto end; } if (strncmp(peer.properties[1].value.data, TSI_FAKE_SECURITY_LEVEL, diff --git a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc index ef97c028109..7d4574e2581 100644 --- a/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +++ b/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc @@ -22,11 +22,12 @@ #include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include #include -#include #include "src/core/ext/transport/chttp2/alpn/alpn.h" #include "src/core/lib/channel/handshaker.h" @@ -53,11 +54,9 @@ grpc_error* ssl_check_peer( } /* Check the peer name if specified. */ if (peer_name != nullptr && !grpc_ssl_host_matches_name(peer, peer_name)) { - char* msg; - gpr_asprintf(&msg, "Peer name %s is not in peer certificate", peer_name); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return error; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Peer name ", peer_name, " is not in peer certificate") + .c_str()); } *auth_context = grpc_ssl_peer_to_auth_context(peer, GRPC_SSL_TRANSPORT_SECURITY_TYPE); @@ -163,11 +162,10 @@ class grpc_ssl_channel_security_connector final verify_options_->verify_peer_callback_userdata); gpr_free(peer_pem); if (callback_status) { - char* msg; - gpr_asprintf(&msg, "Verify peer callback returned a failure (%d)", - callback_status); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrFormat("Verify peer callback returned a failure (%d)", + callback_status) + .c_str()); } } } diff --git a/src/core/lib/security/security_connector/ssl_utils.cc b/src/core/lib/security/security_connector/ssl_utils.cc index dab4641b216..af95b235ca4 100644 --- a/src/core/lib/security/security_connector/ssl_utils.cc +++ b/src/core/lib/security/security_connector/ssl_utils.cc @@ -20,12 +20,13 @@ #include "src/core/lib/security/security_connector/ssl_utils.h" +#include + +#include "absl/strings/str_cat.h" + #include #include #include -#include - -#include #include "src/core/ext/transport/chttp2/alpn/alpn.h" #include "src/core/lib/channel/channel_args.h" @@ -170,12 +171,9 @@ grpc_error* grpc_ssl_check_peer_name(absl::string_view peer_name, const tsi_peer* peer) { /* Check the peer name if specified. */ if (!peer_name.empty() && !grpc_ssl_host_matches_name(peer, peer_name)) { - char* msg; - gpr_asprintf(&msg, "Peer name %s is not in peer certificate", - peer_name.data()); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return error; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Peer name ", peer_name, " is not in peer certificate") + .c_str()); } return GRPC_ERROR_NONE; } diff --git a/src/core/lib/security/security_connector/tls/tls_security_connector.cc b/src/core/lib/security/security_connector/tls/tls_security_connector.cc index 6cc2d840e2b..69321fd45a5 100644 --- a/src/core/lib/security/security_connector/tls/tls_security_connector.cc +++ b/src/core/lib/security/security_connector/tls/tls_security_connector.cc @@ -23,6 +23,7 @@ #include #include +#include "absl/strings/str_cat.h" #include "absl/strings/string_view.h" #include @@ -130,11 +131,9 @@ grpc_status_code TlsFetchKeyMaterials( grpc_error* TlsCheckHostName(const char* peer_name, const tsi_peer* peer) { /* Check the peer name if specified. */ if (peer_name != nullptr && !grpc_ssl_host_matches_name(peer, peer_name)) { - char* msg; - gpr_asprintf(&msg, "Peer name %s is not in peer certificate", peer_name); - grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); - return error; + return GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Peer name ", peer_name, " is not in peer certificate") + .c_str()); } return GRPC_ERROR_NONE; } @@ -402,31 +401,30 @@ void TlsChannelSecurityConnector::ServerAuthorizationCheckDone( grpc_error* TlsChannelSecurityConnector::ProcessServerAuthorizationCheckResult( grpc_tls_server_authorization_check_arg* arg) { grpc_error* error = GRPC_ERROR_NONE; - char* msg = nullptr; /* Server authorization check is cancelled by caller. */ if (arg->status == GRPC_STATUS_CANCELLED) { - gpr_asprintf(&msg, - "Server authorization check is cancelled by the caller with " - "error: %s", - arg->error_details->error_details().c_str()); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Server authorization check is cancelled by the caller " + "with error: ", + arg->error_details->error_details()) + .c_str()); } else if (arg->status == GRPC_STATUS_OK) { /* Server authorization check completed successfully but returned check * failure. */ if (!arg->success) { - gpr_asprintf(&msg, "Server authorization check failed with error: %s", - arg->error_details->error_details().c_str()); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Server authorization check failed with error: ", + arg->error_details->error_details()) + .c_str()); } /* Server authorization check did not complete correctly. */ } else { - gpr_asprintf( - &msg, - "Server authorization check did not finish correctly with error: %s", - arg->error_details->error_details().c_str()); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat( + "Server authorization check did not finish correctly with error: ", + arg->error_details->error_details()) + .c_str()); } - gpr_free(msg); return error; } diff --git a/src/core/lib/security/transport/client_auth_filter.cc b/src/core/lib/security/transport/client_auth_filter.cc index ed24b4f6622..c155be81230 100644 --- a/src/core/lib/security/transport/client_auth_filter.cc +++ b/src/core/lib/security/transport/client_auth_filter.cc @@ -22,6 +22,10 @@ #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include @@ -331,18 +335,15 @@ static void on_host_checked(void* arg, grpc_error* error) { if (error == GRPC_ERROR_NONE) { send_security_metadata(elem, batch); } else { - char* error_msg; - char* host = grpc_slice_to_c_string(calld->host); - gpr_asprintf(&error_msg, "Invalid host %s set in :authority metadata.", - host); - gpr_free(host); + std::string error_msg = absl::StrCat( + "Invalid host ", grpc_core::StringViewFromSlice(calld->host), + " set in :authority metadata."); grpc_transport_stream_op_batch_finish_with_failure( batch, - grpc_error_set_int(GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg), - GRPC_ERROR_INT_GRPC_STATUS, - GRPC_STATUS_UNAUTHENTICATED), + grpc_error_set_int( + GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg.c_str()), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAUTHENTICATED), calld->call_combiner); - gpr_free(error_msg); } GRPC_CALL_STACK_UNREF(calld->owning_call, "check_call_host"); } diff --git a/src/core/lib/security/util/json_util.cc b/src/core/lib/security/util/json_util.cc index 458f805bc06..ff2fbc80324 100644 --- a/src/core/lib/security/util/json_util.cc +++ b/src/core/lib/security/util/json_util.cc @@ -18,14 +18,16 @@ #include -#include "src/core/lib/iomgr/error.h" -#include "src/core/lib/security/util/json_util.h" - #include +#include "absl/strings/str_cat.h" + #include #include +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/security/util/json_util.h" + const char* grpc_json_get_string_property(const grpc_core::Json& json, const char* prop_name, grpc_error** error) { @@ -39,21 +41,18 @@ const char* grpc_json_get_string_property(const grpc_core::Json& json, auto it = json.object_value().find(prop_name); if (it == json.object_value().end()) { if (error != nullptr) { - char* error_msg; - gpr_asprintf(&error_msg, "Property %s not found in JSON object.", - prop_name); - *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg); - gpr_free(error_msg); + *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Property ", prop_name, " not found in JSON object.") + .c_str()); } return nullptr; } if (it->second.type() != grpc_core::Json::Type::STRING) { if (error != nullptr) { - char* error_msg; - gpr_asprintf(&error_msg, "Property %s in JSON object is not a string.", - prop_name); - *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_msg); - gpr_free(error_msg); + *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Property ", prop_name, + " n JSON object is not a string.") + .c_str()); } return nullptr; } diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc index c0e21648f74..0dacbfef3e2 100644 --- a/src/core/lib/slice/slice.cc +++ b/src/core/lib/slice/slice.cc @@ -156,7 +156,7 @@ class NewWithLenSliceRefcount { /** grpc_slice_from_moved_(string|buffer) ref count .*/ class MovedStringSliceRefCount { public: - MovedStringSliceRefCount(grpc_core::UniquePtr&& str) + explicit MovedStringSliceRefCount(grpc_core::UniquePtr&& str) : base_(grpc_slice_refcount::Type::REGULAR, &refs_, Destroy, this, &base_), str_(std::move(str)) {} @@ -173,6 +173,26 @@ class MovedStringSliceRefCount { grpc_core::UniquePtr str_; }; +// grpc_slice_from_cpp_string() ref count. +class MovedCppStringSliceRefCount { + public: + explicit MovedCppStringSliceRefCount(std::string&& str) + : base_(grpc_slice_refcount::Type::REGULAR, &refs_, Destroy, this, + &base_), + str_(std::move(str)) {} + + grpc_slice_refcount* base_refcount() { return &base_; } + + private: + static void Destroy(void* arg) { + delete static_cast(arg); + } + + grpc_slice_refcount base_; + grpc_core::RefCount refs_; + std::string str_; +}; + } // namespace grpc_core grpc_slice grpc_slice_new_with_len(void* p, size_t len, @@ -232,6 +252,23 @@ grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr p) { return grpc_slice_from_moved_buffer(std::move(p), len); } +grpc_slice grpc_slice_from_cpp_string(std::string str) { + grpc_slice slice; + if (str.size() <= sizeof(slice.data.inlined.bytes)) { + slice.refcount = nullptr; + slice.data.inlined.length = str.size(); + memcpy(GRPC_SLICE_START_PTR(slice), str.data(), str.size()); + } else { + slice.data.refcounted.bytes = + reinterpret_cast(const_cast(str.data())); + slice.data.refcounted.length = str.size(); + slice.refcount = + (new grpc_core::MovedCppStringSliceRefCount(std::move(str))) + ->base_refcount(); + } + return slice; +} + namespace { class MallocRefCount { diff --git a/src/core/lib/slice/slice_internal.h b/src/core/lib/slice/slice_internal.h index 5148aad5055..0ff8e58eeb0 100644 --- a/src/core/lib/slice/slice_internal.h +++ b/src/core/lib/slice/slice_internal.h @@ -338,6 +338,7 @@ inline uint32_t grpc_slice_hash_internal(const grpc_slice& s) { grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr p, size_t len); grpc_slice grpc_slice_from_moved_string(grpc_core::UniquePtr p); +grpc_slice grpc_slice_from_cpp_string(std::string str); // Returns the memory used by this slice, not counting the slice structure // itself. This means that inlined and slices from static strings will return diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc index f8848011a76..31f1559d72d 100644 --- a/src/core/lib/surface/call.cc +++ b/src/core/lib/surface/call.cc @@ -24,6 +24,11 @@ #include #include +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include #include @@ -1051,14 +1056,12 @@ static void recv_trailing_filter(void* args, grpc_metadata_batch* b, grpc_get_status_code_from_metadata(b->idx.named.grpc_status->md); grpc_error* error = GRPC_ERROR_NONE; if (status_code != GRPC_STATUS_OK) { - char* peer_msg = nullptr; char* peer = grpc_call_get_peer(call); - gpr_asprintf(&peer_msg, "Error received from peer %s", peer); - error = grpc_error_set_int(GRPC_ERROR_CREATE_FROM_COPIED_STRING(peer_msg), - GRPC_ERROR_INT_GRPC_STATUS, - static_cast(status_code)); + error = grpc_error_set_int( + GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("Error received from peer ", peer).c_str()), + GRPC_ERROR_INT_GRPC_STATUS, static_cast(status_code)); gpr_free(peer); - gpr_free(peer_msg); } if (b->idx.named.grpc_message != nullptr) { error = grpc_error_set_str( @@ -1369,49 +1372,41 @@ static void receiving_stream_ready_in_call_combiner(void* bctlp, static void GPR_ATTRIBUTE_NOINLINE handle_both_stream_and_msg_compression_set(grpc_call* call) { - char* error_msg = nullptr; - gpr_asprintf(&error_msg, - "Incoming stream has both stream compression (%d) and message " - "compression (%d).", - call->incoming_stream_compression_algorithm, - call->incoming_message_compression_algorithm); - gpr_log(GPR_ERROR, "%s", error_msg); - cancel_with_status(call, GRPC_STATUS_INTERNAL, error_msg); - gpr_free(error_msg); + std::string error_msg = absl::StrFormat( + "Incoming stream has both stream compression (%d) and message " + "compression (%d).", + call->incoming_stream_compression_algorithm, + call->incoming_message_compression_algorithm); + gpr_log(GPR_ERROR, "%s", error_msg.c_str()); + cancel_with_status(call, GRPC_STATUS_INTERNAL, error_msg.c_str()); } static void GPR_ATTRIBUTE_NOINLINE handle_error_parsing_compression_algorithm(grpc_call* call) { - char* error_msg = nullptr; - gpr_asprintf(&error_msg, - "Error in incoming message compression (%d) or stream " - "compression (%d).", - call->incoming_stream_compression_algorithm, - call->incoming_message_compression_algorithm); - cancel_with_status(call, GRPC_STATUS_INTERNAL, error_msg); - gpr_free(error_msg); + std::string error_msg = absl::StrFormat( + "Error in incoming message compression (%d) or stream " + "compression (%d).", + call->incoming_stream_compression_algorithm, + call->incoming_message_compression_algorithm); + cancel_with_status(call, GRPC_STATUS_INTERNAL, error_msg.c_str()); } static void GPR_ATTRIBUTE_NOINLINE handle_invalid_compression( grpc_call* call, grpc_compression_algorithm compression_algorithm) { - char* error_msg = nullptr; - gpr_asprintf(&error_msg, "Invalid compression algorithm value '%d'.", - compression_algorithm); - gpr_log(GPR_ERROR, "%s", error_msg); - cancel_with_status(call, GRPC_STATUS_UNIMPLEMENTED, error_msg); - gpr_free(error_msg); + std::string error_msg = absl::StrFormat( + "Invalid compression algorithm value '%d'.", compression_algorithm); + gpr_log(GPR_ERROR, "%s", error_msg.c_str()); + cancel_with_status(call, GRPC_STATUS_UNIMPLEMENTED, error_msg.c_str()); } static void GPR_ATTRIBUTE_NOINLINE handle_compression_algorithm_disabled( grpc_call* call, grpc_compression_algorithm compression_algorithm) { - char* error_msg = nullptr; const char* algo_name = nullptr; grpc_compression_algorithm_name(compression_algorithm, &algo_name); - gpr_asprintf(&error_msg, "Compression algorithm '%s' is disabled.", - algo_name); - gpr_log(GPR_ERROR, "%s", error_msg); - cancel_with_status(call, GRPC_STATUS_UNIMPLEMENTED, error_msg); - gpr_free(error_msg); + std::string error_msg = + absl::StrFormat("Compression algorithm '%s' is disabled.", algo_name); + gpr_log(GPR_ERROR, "%s", error_msg.c_str()); + cancel_with_status(call, GRPC_STATUS_UNIMPLEMENTED, error_msg.c_str()); } static void GPR_ATTRIBUTE_NOINLINE handle_compression_algorithm_not_accepted( diff --git a/src/core/lib/uri/uri_parser.cc b/src/core/lib/uri/uri_parser.cc index f212c7d2c01..c76452284a1 100644 --- a/src/core/lib/uri/uri_parser.cc +++ b/src/core/lib/uri/uri_parser.cc @@ -22,10 +22,13 @@ #include +#include + +#include "absl/strings/str_format.h" + #include #include #include -#include #include "src/core/lib/gpr/string.h" #include "src/core/lib/slice/percent_encoding.h" @@ -37,22 +40,12 @@ static grpc_uri* bad_uri(const char* uri_text, size_t pos, const char* section, bool suppress_errors) { - char* line_prefix; - size_t pfx_len; - if (!suppress_errors) { - gpr_asprintf(&line_prefix, "bad uri.%s: '", section); - pfx_len = strlen(line_prefix) + pos; - gpr_log(GPR_ERROR, "%s%s'", line_prefix, uri_text); - gpr_free(line_prefix); - - line_prefix = static_cast(gpr_malloc(pfx_len + 1)); - memset(line_prefix, ' ', pfx_len); - line_prefix[pfx_len] = 0; - gpr_log(GPR_ERROR, "%s^ here", line_prefix); - gpr_free(line_prefix); + std::string line_prefix = absl::StrFormat("bad uri.%s: '", section); + gpr_log(GPR_ERROR, "%s%s'", line_prefix.c_str(), uri_text); + size_t pfx_len = line_prefix.size() + pos; + gpr_log(GPR_ERROR, "%s^ here", std::string(pfx_len, ' ').c_str()); } - return nullptr; } diff --git a/test/core/client_channel/parse_address_with_named_scope_id_test.cc b/test/core/client_channel/parse_address_with_named_scope_id_test.cc index fedbc25ace3..43c231e19b1 100644 --- a/test/core/client_channel/parse_address_with_named_scope_id_test.cc +++ b/test/core/client_channel/parse_address_with_named_scope_id_test.cc @@ -26,9 +26,10 @@ #include #endif +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/gprpp/memory.h" @@ -108,18 +109,17 @@ int main(int argc, char** argv) { } } GPR_ASSERT(strlen(arbitrary_interface_name) > 0); - char* target = nullptr; - gpr_asprintf(&target, "ipv6:[fe80::1234%%%s]:12345", - arbitrary_interface_name); + std::string target = + absl::StrFormat("ipv6:[fe80::1234%%%s]:12345", arbitrary_interface_name); struct sockaddr_in6 result_from_getaddrinfo = - resolve_with_gettaddrinfo(target); + resolve_with_gettaddrinfo(target.c_str()); // Run the test gpr_log(GPR_DEBUG, "Run test_grpc_parse_ipv6_parity_with_getaddrinfo with target: %s", - target); - test_grpc_parse_ipv6_parity_with_getaddrinfo(target, result_from_getaddrinfo); + target.c_str()); + test_grpc_parse_ipv6_parity_with_getaddrinfo(target.c_str(), + result_from_getaddrinfo); // Cleanup - gpr_free(target); gpr_free(arbitrary_interface_name); grpc_shutdown(); } diff --git a/test/core/client_channel/resolvers/fake_resolver_test.cc b/test/core/client_channel/resolvers/fake_resolver_test.cc index fb1e3e2dc1d..92590be5d99 100644 --- a/test/core/client_channel/resolvers/fake_resolver_test.cc +++ b/test/core/client_channel/resolvers/fake_resolver_test.cc @@ -18,9 +18,12 @@ #include +#include + +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/ext/filters/client_channel/parse_address.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" @@ -85,13 +88,12 @@ static grpc_core::OrphanablePtr build_fake_resolver( static grpc_core::Resolver::Result create_new_resolver_result() { static size_t test_counter = 0; const size_t num_addresses = 2; - char* uri_string; // Create address list. grpc_core::Resolver::Result result; for (size_t i = 0; i < num_addresses; ++i) { - gpr_asprintf(&uri_string, "ipv4:127.0.0.1:100%" PRIuPTR, - test_counter * num_addresses + i); - grpc_uri* uri = grpc_uri_parse(uri_string, true); + std::string uri_string = absl::StrFormat("ipv4:127.0.0.1:100%" PRIuPTR, + test_counter * num_addresses + i); + grpc_uri* uri = grpc_uri_parse(uri_string.c_str(), true); grpc_resolved_address address; GPR_ASSERT(grpc_parse_uri(uri, &address)); absl::InlinedVector args_to_add; @@ -99,7 +101,6 @@ static grpc_core::Resolver::Result create_new_resolver_result() { address.addr, address.len, grpc_channel_args_copy_and_add(nullptr, nullptr, 0)); grpc_uri_destroy(uri); - gpr_free(uri_string); } ++test_counter; return result; diff --git a/test/core/end2end/dualstack_socket_test.cc b/test/core/end2end/dualstack_socket_test.cc index d13639e5062..0364fe15d62 100644 --- a/test/core/end2end/dualstack_socket_test.cc +++ b/test/core/end2end/dualstack_socket_test.cc @@ -66,9 +66,8 @@ static void log_resolved_addrs(const char* label, const char* hostname) { return; } for (size_t i = 0; i < res->naddrs; ++i) { - char* addr_str = grpc_sockaddr_to_uri(&res->addrs[i]); - gpr_log(GPR_INFO, "%s: %s", label, addr_str); - gpr_free(addr_str); + gpr_log(GPR_INFO, "%s: %s", label, + grpc_sockaddr_to_uri(&res->addrs[i]).c_str()); } grpc_resolved_addresses_destroy(res); } diff --git a/test/core/end2end/fixtures/h2_http_proxy.cc b/test/core/end2end/fixtures/h2_http_proxy.cc index 949356cab2a..957beb3ec84 100644 --- a/test/core/end2end/fixtures/h2_http_proxy.cc +++ b/test/core/end2end/fixtures/h2_http_proxy.cc @@ -20,9 +20,12 @@ #include +#include + +#include "absl/strings/str_format.h" + #include #include -#include #include #include "src/core/ext/filters/client_channel/client_channel.h" @@ -66,21 +69,19 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { fullstack_fixture_data* ffd = static_cast(f->fixture_data); - char* proxy_uri; - /* If testing for proxy auth, add credentials to proxy uri */ - const grpc_arg* proxy_auth_arg = - grpc_channel_args_find(client_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); - const char* proxy_auth_str = grpc_channel_arg_get_string(proxy_auth_arg); + const char* proxy_auth_str = grpc_channel_args_find_string( + client_args, GRPC_ARG_HTTP_PROXY_AUTH_CREDS); + std::string proxy_uri; if (proxy_auth_str == nullptr) { - gpr_asprintf(&proxy_uri, "http://%s", - grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); + proxy_uri = absl::StrFormat( + "http://%s", grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); } else { - gpr_asprintf(&proxy_uri, "http://%s@%s", proxy_auth_str, - grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); + proxy_uri = + absl::StrFormat("http://%s@%s", proxy_auth_str, + grpc_end2end_http_proxy_get_proxy_name(ffd->proxy)); } - gpr_setenv("http_proxy", proxy_uri); - gpr_free(proxy_uri); + gpr_setenv("http_proxy", proxy_uri.c_str()); f->client = grpc_insecure_channel_create(ffd->server_addr.c_str(), client_args, nullptr); GPR_ASSERT(f->client); diff --git a/test/core/end2end/fixtures/h2_uds.cc b/test/core/end2end/fixtures/h2_uds.cc index 25063cce913..928c1f006d5 100644 --- a/test/core/end2end/fixtures/h2_uds.cc +++ b/test/core/end2end/fixtures/h2_uds.cc @@ -22,9 +22,12 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include -#include #include #include "src/core/ext/filters/client_channel/client_channel.h" @@ -37,22 +40,20 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" -typedef struct fullstack_fixture_data { - char* localaddr; -} fullstack_fixture_data; +struct fullstack_fixture_data { + std::string localaddr; +}; static int unique = 1; static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( grpc_channel_args* /*client_args*/, grpc_channel_args* /*server_args*/) { + fullstack_fixture_data* ffd = new fullstack_fixture_data; + ffd->localaddr = absl::StrFormat("unix:/tmp/grpc_fullstack_test.%d.%d", + getpid(), unique++); + grpc_end2end_test_fixture f; - fullstack_fixture_data* ffd = static_cast( - gpr_malloc(sizeof(fullstack_fixture_data))); memset(&f, 0, sizeof(f)); - - gpr_asprintf(&ffd->localaddr, "unix:/tmp/grpc_fullstack_test.%d.%d", getpid(), - unique++); - f.fixture_data = ffd; f.cq = grpc_completion_queue_create_for_next(nullptr); f.shutdown_cq = grpc_completion_queue_create_for_pluck(nullptr); @@ -64,8 +65,8 @@ void chttp2_init_client_fullstack(grpc_end2end_test_fixture* f, grpc_channel_args* client_args) { fullstack_fixture_data* ffd = static_cast(f->fixture_data); - f->client = - grpc_insecure_channel_create(ffd->localaddr, client_args, nullptr); + f->client = grpc_insecure_channel_create(ffd->localaddr.c_str(), client_args, + nullptr); } void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f, @@ -77,15 +78,15 @@ void chttp2_init_server_fullstack(grpc_end2end_test_fixture* f, } f->server = grpc_server_create(server_args, nullptr); grpc_server_register_completion_queue(f->server, f->cq, nullptr); - GPR_ASSERT(grpc_server_add_insecure_http2_port(f->server, ffd->localaddr)); + GPR_ASSERT( + grpc_server_add_insecure_http2_port(f->server, ffd->localaddr.c_str())); grpc_server_start(f->server); } void chttp2_tear_down_fullstack(grpc_end2end_test_fixture* f) { fullstack_fixture_data* ffd = static_cast(f->fixture_data); - gpr_free(ffd->localaddr); - gpr_free(ffd); + delete ffd; } /* All test configurations */ diff --git a/test/core/end2end/fixtures/http_proxy_fixture.cc b/test/core/end2end/fixtures/http_proxy_fixture.cc index b827f58e795..d23db2b51a4 100644 --- a/test/core/end2end/fixtures/http_proxy_fixture.cc +++ b/test/core/end2end/fixtures/http_proxy_fixture.cc @@ -22,12 +22,13 @@ #include +#include "absl/strings/str_cat.h" + #include #include #include #include #include -#include #include #include "src/core/lib/channel/channel_args.h" @@ -492,11 +493,10 @@ static void on_read_request_done_locked(void* arg, grpc_error* error) { } // Make sure we got a CONNECT request. if (strcmp(conn->http_request.method, "CONNECT") != 0) { - char* msg; - gpr_asprintf(&msg, "HTTP proxy got request method %s", - conn->http_request.method); - error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(msg); - gpr_free(msg); + error = GRPC_ERROR_CREATE_FROM_COPIED_STRING( + absl::StrCat("HTTP proxy got request method ", + conn->http_request.method) + .c_str()); proxy_connection_failed(conn, SETUP_FAILED, "HTTP proxy read request", GRPC_ERROR_REF(error)); GRPC_ERROR_UNREF(error); diff --git a/test/core/end2end/goaway_server_test.cc b/test/core/end2end/goaway_server_test.cc index 1e32cad8dc6..6c76c243b21 100644 --- a/test/core/end2end/goaway_server_test.cc +++ b/test/core/end2end/goaway_server_test.cc @@ -23,11 +23,16 @@ #include "src/core/lib/iomgr/sockaddr.h" #include "src/core/lib/iomgr/socket_utils.h" +#include + +#include + +#include "absl/strings/str_cat.h" + #include #include #include -#include -#include + #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" #include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/lib/iomgr/resolve_address.h" @@ -185,7 +190,7 @@ int main(int argc, char** argv) { int port1 = grpc_pick_unused_port_or_die(); int port2 = grpc_pick_unused_port_or_die(); - char* addr; + std::string addr; grpc_channel_args client_args; grpc_arg arg_array[2]; @@ -242,10 +247,9 @@ int main(int argc, char** argv) { /* bring a server up on the first port */ grpc_server* server1 = grpc_server_create(nullptr, nullptr); - gpr_asprintf(&addr, "127.0.0.1:%d", port1); - grpc_server_add_insecure_http2_port(server1, addr); + addr = absl::StrCat("127.0.0.1:", port1); + grpc_server_add_insecure_http2_port(server1, addr.c_str()); grpc_server_register_completion_queue(server1, cq, nullptr); - gpr_free(addr); grpc_server_start(server1); /* request a call to the server */ @@ -319,10 +323,9 @@ int main(int argc, char** argv) { /* and bring up second server */ set_resolve_port(port2); grpc_server* server2 = grpc_server_create(nullptr, nullptr); - gpr_asprintf(&addr, "127.0.0.1:%d", port2); - grpc_server_add_insecure_http2_port(server2, addr); + addr = absl::StrCat("127.0.0.1:", port2); + grpc_server_add_insecure_http2_port(server2, addr.c_str()); grpc_server_register_completion_queue(server2, cq, nullptr); - gpr_free(addr); grpc_server_start(server2); /* request a call to the server */ diff --git a/test/core/end2end/tests/compressed_payload.cc b/test/core/end2end/tests/compressed_payload.cc index 5400a425219..c703449282f 100644 --- a/test/core/end2end/tests/compressed_payload.cc +++ b/test/core/end2end/tests/compressed_payload.cc @@ -21,12 +21,15 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include #include #include #include -#include #include #include "src/core/lib/channel/channel_args.h" @@ -246,12 +249,10 @@ static void request_for_disabled_algorithm( const char* algo_name = nullptr; GPR_ASSERT(grpc_compression_algorithm_name(algorithm_to_disable, &algo_name)); - char* expected_details = nullptr; - gpr_asprintf(&expected_details, "Compression algorithm '%s' is disabled.", - algo_name); + std::string expected_details = + absl::StrFormat("Compression algorithm '%s' is disabled.", algo_name); /* and we expect a specific reason for it */ - GPR_ASSERT(0 == grpc_slice_str_cmp(details, expected_details)); - gpr_free(expected_details); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, expected_details.c_str())); GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo")); grpc_slice_unref(details); diff --git a/test/core/end2end/tests/high_initial_seqno.cc b/test/core/end2end/tests/high_initial_seqno.cc index 7db5c63b0f8..30ccc83dfbc 100644 --- a/test/core/end2end/tests/high_initial_seqno.cc +++ b/test/core/end2end/tests/high_initial_seqno.cc @@ -21,11 +21,14 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include #include "src/core/lib/gpr/string.h" @@ -205,7 +208,6 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config, grpc_end2end_test_fixture f; grpc_arg client_arg; grpc_channel_args client_args; - char* name; client_arg.type = GRPC_ARG_INTEGER; client_arg.key = const_cast(GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER); @@ -214,16 +216,15 @@ static void test_invoke_10_simple_requests(grpc_end2end_test_config config, client_args.num_args = 1; client_args.args = &client_arg; - gpr_asprintf(&name, "test_invoke_requests first_seqno=%d", - initial_sequence_number); - f = begin_test(config, name, &client_args, nullptr); + std::string name = absl::StrCat("test_invoke_requests first_seqno=", + initial_sequence_number); + f = begin_test(config, name.c_str(), &client_args, nullptr); for (i = 0; i < 10; i++) { simple_request_body(config, f); gpr_log(GPR_INFO, "Running test: Passed simple request %d", i); } end_test(&f); config.tear_down_data(&f); - gpr_free(name); } void high_initial_seqno(grpc_end2end_test_config config) { diff --git a/test/core/end2end/tests/hpack_size.cc b/test/core/end2end/tests/hpack_size.cc index e9abf1420b8..8dfb9ebdd68 100644 --- a/test/core/end2end/tests/hpack_size.cc +++ b/test/core/end2end/tests/hpack_size.cc @@ -21,11 +21,14 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include #include #include -#include #include #include "src/core/lib/gpr/string.h" @@ -355,7 +358,6 @@ static void test_size(grpc_end2end_test_config config, int encode_size, grpc_channel_args server_args; grpc_arg client_arg; grpc_channel_args client_args; - char* name; server_arg.type = GRPC_ARG_INTEGER; server_arg.key = const_cast(GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER); @@ -369,15 +371,16 @@ static void test_size(grpc_end2end_test_config config, int encode_size, client_args.num_args = 1; client_args.args = &client_arg; - gpr_asprintf(&name, "test_size:e=%d:d=%d", encode_size, decode_size); - f = begin_test(config, name, encode_size != 4096 ? &client_args : nullptr, + std::string name = + absl::StrFormat("test_size:e=%d:d=%d", encode_size, decode_size); + f = begin_test(config, name.c_str(), + encode_size != 4096 ? &client_args : nullptr, decode_size != 4096 ? &server_args : nullptr); for (i = 0; i < 4 * GPR_ARRAY_SIZE(hobbits); i++) { simple_request_body(config, f, i); } end_test(&f); config.tear_down_data(&f); - gpr_free(name); } void hpack_size(grpc_end2end_test_config config) { diff --git a/test/core/end2end/tests/invoke_large_request.cc b/test/core/end2end/tests/invoke_large_request.cc index cf25575ab23..2ac09a36d93 100644 --- a/test/core/end2end/tests/invoke_large_request.cc +++ b/test/core/end2end/tests/invoke_large_request.cc @@ -21,10 +21,13 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include #include -#include #include #include "src/core/lib/gpr/useful.h" @@ -90,10 +93,9 @@ static grpc_slice large_slice(void) { static void test_invoke_large_request(grpc_end2end_test_config config, int max_frame_size, int lookahead_bytes) { - char* name; - gpr_asprintf(&name, - "test_invoke_large_request:max_frame_size=%d:lookahead_bytes=%d", - max_frame_size, lookahead_bytes); + std::string name = absl::StrFormat( + "test_invoke_large_request:max_frame_size=%d:lookahead_bytes=%d", + max_frame_size, lookahead_bytes); grpc_arg args[2]; args[0].type = GRPC_ARG_INTEGER; @@ -105,8 +107,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config, grpc_channel_args channel_args = {GPR_ARRAY_SIZE(args), args}; grpc_end2end_test_fixture f = - begin_test(config, name, &channel_args, &channel_args); - gpr_free(name); + begin_test(config, name.c_str(), &channel_args, &channel_args); grpc_slice request_payload_slice = large_slice(); grpc_slice response_payload_slice = large_slice(); diff --git a/test/core/end2end/tests/no_logging.cc b/test/core/end2end/tests/no_logging.cc index 2b92e4fa949..8341501af2a 100644 --- a/test/core/end2end/tests/no_logging.cc +++ b/test/core/end2end/tests/no_logging.cc @@ -21,11 +21,14 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/error.h" @@ -38,11 +41,9 @@ static void* tag(intptr_t t) { return (void*)t; } void gpr_default_log(gpr_log_func_args* args); static void test_no_log(gpr_log_func_args* args) { - char* message = nullptr; - gpr_asprintf(&message, "Unwanted log: %s", args->message); - args->message = message; + std::string message = absl::StrCat("Unwanted log: ", args->message); + args->message = message.c_str(); gpr_default_log(args); - gpr_free(message); abort(); } diff --git a/test/core/end2end/tests/retry_cancellation.cc b/test/core/end2end/tests/retry_cancellation.cc index f6150f292ff..86a835303fd 100644 --- a/test/core/end2end/tests/retry_cancellation.cc +++ b/test/core/end2end/tests/retry_cancellation.cc @@ -21,11 +21,14 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include #include "src/core/lib/channel/channel_args.h" @@ -138,10 +141,9 @@ static void test_retry_cancellation(grpc_end2end_test_config config, " } ]\n" "}"); grpc_channel_args client_args = {1, &arg}; - char* name; - gpr_asprintf(&name, "retry_cancellation/%s", mode.name); - grpc_end2end_test_fixture f = begin_test(config, name, &client_args, nullptr); - gpr_free(name); + std::string name = absl::StrCat("retry_cancellation/%s", mode.name); + grpc_end2end_test_fixture f = + begin_test(config, name.c_str(), &client_args, nullptr); cq_verifier* cqv = cq_verifier_create(f.cq); diff --git a/test/core/end2end/tests/stream_compression_compressed_payload.cc b/test/core/end2end/tests/stream_compression_compressed_payload.cc index 5861d8ee1eb..8fa7af50567 100644 --- a/test/core/end2end/tests/stream_compression_compressed_payload.cc +++ b/test/core/end2end/tests/stream_compression_compressed_payload.cc @@ -21,12 +21,15 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include #include #include -#include #include #include "src/core/lib/channel/channel_args.h" @@ -231,12 +234,10 @@ static void request_for_disabled_algorithm( const char* algo_name = nullptr; GPR_ASSERT(grpc_compression_algorithm_name(algorithm_to_disable, &algo_name)); - char* expected_details = nullptr; - gpr_asprintf(&expected_details, "Compression algorithm '%s' is disabled.", - algo_name); + std::string expected_details = + absl::StrCat("Compression algorithm '", algo_name, "' is disabled."); /* and we expect a specific reason for it */ - GPR_ASSERT(0 == grpc_slice_str_cmp(details, expected_details)); - gpr_free(expected_details); + GPR_ASSERT(0 == grpc_slice_str_cmp(details, expected_details.c_str())); GPR_ASSERT(0 == grpc_slice_str_cmp(call_details.method, "/foo")); grpc_slice_unref(details); diff --git a/test/core/fling/fling_stream_test.cc b/test/core/fling/fling_stream_test.cc index b4565eced6f..54ce02d94c6 100644 --- a/test/core/fling/fling_stream_test.cc +++ b/test/core/fling/fling_stream_test.cc @@ -19,10 +19,10 @@ #include #include -#include -#include +#include + +#include "absl/strings/str_cat.h" -#include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/host_port.h" #include "test/core/util/port.h" #include "test/core/util/subprocess.h" @@ -43,18 +43,19 @@ int main(int /*argc*/, char** argv) { strcpy(root, "."); } /* start the server */ - gpr_asprintf(&args[0], "%s/fling_server%s", root, - gpr_subprocess_binary_extension()); + std::string command = + absl::StrCat(root, "/fling_server", gpr_subprocess_binary_extension()); + args[0] = const_cast(command.c_str()); args[1] = const_cast("--bind"); std::string joined = grpc_core::JoinHostPort("::", port); args[2] = const_cast(joined.c_str()); args[3] = const_cast("--no-secure"); svr = gpr_subprocess_create(4, (const char**)args); - gpr_free(args[0]); /* start the client */ - gpr_asprintf(&args[0], "%s/fling_client%s", root, - gpr_subprocess_binary_extension()); + command = + absl::StrCat(root, "/fling_client", gpr_subprocess_binary_extension()); + args[0] = const_cast(command.c_str()); args[1] = const_cast("--target"); joined = grpc_core::JoinHostPort("127.0.0.1", port); args[2] = const_cast(joined.c_str()); @@ -62,7 +63,6 @@ int main(int /*argc*/, char** argv) { args[4] = const_cast("--no-secure"); args[5] = nullptr; cli = gpr_subprocess_create(6, (const char**)args); - gpr_free(args[0]); /* wait for completion */ printf("waiting for client\n"); diff --git a/test/core/fling/fling_test.cc b/test/core/fling/fling_test.cc index 717bccd8544..f1c67288863 100644 --- a/test/core/fling/fling_test.cc +++ b/test/core/fling/fling_test.cc @@ -19,12 +19,13 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include -#include -#include "src/core/lib/gpr/string.h" #include "src/core/lib/gprpp/host_port.h" -#include "src/core/lib/gprpp/memory.h" #include "test/core/util/port.h" #include "test/core/util/subprocess.h" @@ -44,18 +45,19 @@ int main(int /*argc*/, const char** argv) { strcpy(root, "."); } /* start the server */ - gpr_asprintf(&args[0], "%s/fling_server%s", root, - gpr_subprocess_binary_extension()); + std::string command = + absl::StrCat(root, "/fling_server", gpr_subprocess_binary_extension()); + args[0] = const_cast(command.c_str()); args[1] = const_cast("--bind"); std::string joined = grpc_core::JoinHostPort("::", port); args[2] = const_cast(joined.c_str()); args[3] = const_cast("--no-secure"); svr = gpr_subprocess_create(4, (const char**)args); - gpr_free(args[0]); /* start the client */ - gpr_asprintf(&args[0], "%s/fling_client%s", root, - gpr_subprocess_binary_extension()); + command = + absl::StrCat(root, "/fling_client", gpr_subprocess_binary_extension()); + args[0] = const_cast(command.c_str()); args[1] = const_cast("--target"); joined = grpc_core::JoinHostPort("127.0.0.1", port); args[2] = const_cast(joined.c_str()); @@ -63,7 +65,6 @@ int main(int /*argc*/, const char** argv) { args[4] = const_cast("--no-secure"); args[5] = nullptr; cli = gpr_subprocess_create(6, (const char**)args); - gpr_free(args[0]); /* wait for completion */ printf("waiting for client\n"); diff --git a/test/core/handshake/client_ssl.cc b/test/core/handshake/client_ssl.cc index 632076d8ef1..e7faa69f964 100644 --- a/test/core/handshake/client_ssl.cc +++ b/test/core/handshake/client_ssl.cc @@ -29,11 +29,14 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/load_file.h" @@ -256,8 +259,7 @@ static bool client_ssl_test(char* server_alpn_preferred) { // Establish a channel pointing at the TLS server. Since the gRPC runtime is // lazy, this won't necessarily establish a connection yet. - char* target; - gpr_asprintf(&target, "127.0.0.1:%d", port); + std::string target = absl::StrCat("127.0.0.1:", port); grpc_arg ssl_name_override = { GRPC_ARG_STRING, const_cast(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG), @@ -265,10 +267,9 @@ static bool client_ssl_test(char* server_alpn_preferred) { grpc_channel_args grpc_args; grpc_args.num_args = 1; grpc_args.args = &ssl_name_override; - grpc_channel* channel = - grpc_secure_channel_create(ssl_creds, target, &grpc_args, nullptr); + grpc_channel* channel = grpc_secure_channel_create(ssl_creds, target.c_str(), + &grpc_args, nullptr); GPR_ASSERT(channel); - gpr_free(target); // Initially the channel will be idle, the // grpc_channel_check_connectivity_state triggers an attempt to connect. diff --git a/test/core/handshake/server_ssl_common.cc b/test/core/handshake/server_ssl_common.cc index 1493094e3c3..aa9836713b5 100644 --- a/test/core/handshake/server_ssl_common.cc +++ b/test/core/handshake/server_ssl_common.cc @@ -25,11 +25,14 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include #include "src/core/lib/gprpp/sync.h" @@ -117,11 +120,10 @@ void server_thread(void* arg) { ca_cert, &pem_key_cert_pair, 1, 0, nullptr); // Start server listening on local port. - char* addr; - gpr_asprintf(&addr, "127.0.0.1:%d", port); + std::string addr = absl::StrCat("127.0.0.1:", port); grpc_server* server = grpc_server_create(nullptr, nullptr); - GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds)); - free(addr); + GPR_ASSERT( + grpc_server_add_secure_http2_port(server, addr.c_str(), ssl_creds)); grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); diff --git a/test/core/handshake/verify_peer_options.cc b/test/core/handshake/verify_peer_options.cc index d726de830fc..04dccf952a7 100644 --- a/test/core/handshake/verify_peer_options.cc +++ b/test/core/handshake/verify_peer_options.cc @@ -29,11 +29,14 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/load_file.h" @@ -69,11 +72,10 @@ static void server_thread(void* arg) { ca_cert, &pem_key_cert_pair, 1, 0, nullptr); // Start server listening on local port. - char* addr; - gpr_asprintf(&addr, "127.0.0.1:%d", port); + std::string addr = absl::StrCat("127.0.0.1:", port); grpc_server* server = grpc_server_create(nullptr, nullptr); - GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, ssl_creds)); - free(addr); + GPR_ASSERT( + grpc_server_add_secure_http2_port(server, addr.c_str(), ssl_creds)); grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); @@ -144,8 +146,7 @@ static bool verify_peer_options_test(verify_peer_options* verify_options) { // Establish a channel pointing at the TLS server. Since the gRPC runtime is // lazy, this won't necessarily establish a connection yet. - char* target; - gpr_asprintf(&target, "127.0.0.1:%d", port); + std::string target = absl::StrCat("127.0.0.1:", port); grpc_arg ssl_name_override = { GRPC_ARG_STRING, const_cast(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG), @@ -153,10 +154,9 @@ static bool verify_peer_options_test(verify_peer_options* verify_options) { grpc_channel_args grpc_args; grpc_args.num_args = 1; grpc_args.args = &ssl_name_override; - grpc_channel* channel = - grpc_secure_channel_create(ssl_creds, target, &grpc_args, nullptr); + grpc_channel* channel = grpc_secure_channel_create(ssl_creds, target.c_str(), + &grpc_args, nullptr); GPR_ASSERT(channel); - gpr_free(target); // Initially the channel will be idle, the // grpc_channel_check_connectivity_state triggers an attempt to connect. diff --git a/test/core/http/parser_test.cc b/test/core/http/parser_test.cc index d3b2cb4060c..04afdd2b9d1 100644 --- a/test/core/http/parser_test.cc +++ b/test/core/http/parser_test.cc @@ -21,10 +21,13 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include #include -#include #include "src/core/lib/gpr/useful.h" #include "test/core/util/slice_splitter.h" @@ -216,7 +219,6 @@ int main(int argc, char** argv) { size_t i; const grpc_slice_split_mode split_modes[] = {GRPC_SLICE_SPLIT_IDENTITY, GRPC_SLICE_SPLIT_ONE_BYTE}; - char *tmp1, *tmp2; grpc::testing::TestEnvironment env(argc, argv); grpc_init(); @@ -293,14 +295,14 @@ int main(int argc, char** argv) { test_request_fails(split_modes[i], "GET / HTTP/1.2\r\n"); test_request_fails(split_modes[i], "GET / HTTP/1.0\n"); - tmp1 = + char* tmp1 = static_cast(gpr_malloc(2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH)); memset(tmp1, 'a', 2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH - 1); tmp1[2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH - 1] = 0; - gpr_asprintf(&tmp2, "HTTP/1.0 200 OK\r\nxyz: %s\r\n\r\n", tmp1); - test_fails(split_modes[i], tmp2); + std::string tmp2 = + absl::StrFormat("HTTP/1.0 200 OK\r\nxyz: %s\r\n\r\n", tmp1); gpr_free(tmp1); - gpr_free(tmp2); + test_fails(split_modes[i], tmp2.c_str()); } grpc_shutdown(); diff --git a/test/core/iomgr/resolve_address_posix_test.cc b/test/core/iomgr/resolve_address_posix_test.cc index cf7c4f60ddc..ead3679b69c 100644 --- a/test/core/iomgr/resolve_address_posix_test.cc +++ b/test/core/iomgr/resolve_address_posix_test.cc @@ -22,10 +22,13 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include #include -#include #include #include @@ -200,19 +203,15 @@ static void test_named_and_numeric_scope_ids(void) { GPR_ASSERT(strlen(arbitrary_interface_name) > 0); // Test resolution of an ipv6 address with a named scope ID gpr_log(GPR_DEBUG, "test resolution with a named scope ID"); - char* target_with_named_scope_id = nullptr; - gpr_asprintf(&target_with_named_scope_id, "fe80::1234%%%s", - arbitrary_interface_name); - resolve_address_must_succeed(target_with_named_scope_id); - gpr_free(target_with_named_scope_id); + std::string target_with_named_scope_id = + absl::StrFormat("fe80::1234%%%s", arbitrary_interface_name); + resolve_address_must_succeed(target_with_named_scope_id.c_str()); gpr_free(arbitrary_interface_name); // Test resolution of an ipv6 address with a numeric scope ID gpr_log(GPR_DEBUG, "test resolution with a numeric scope ID"); - char* target_with_numeric_scope_id = nullptr; - gpr_asprintf(&target_with_numeric_scope_id, "fe80::1234%%%d", - interface_index); - resolve_address_must_succeed(target_with_numeric_scope_id); - gpr_free(target_with_numeric_scope_id); + std::string target_with_numeric_scope_id = + absl::StrFormat("fe80::1234%%%d", interface_index); + resolve_address_must_succeed(target_with_numeric_scope_id.c_str()); } int main(int argc, char** argv) { diff --git a/test/core/iomgr/sockaddr_utils_test.cc b/test/core/iomgr/sockaddr_utils_test.cc index bd92426bfc2..b21f9dc7455 100644 --- a/test/core/iomgr/sockaddr_utils_test.cc +++ b/test/core/iomgr/sockaddr_utils_test.cc @@ -182,12 +182,9 @@ static void expect_sockaddr_str(const char* expected, static void expect_sockaddr_uri(const char* expected, grpc_resolved_address* addr) { - char* str; gpr_log(GPR_INFO, " expect_sockaddr_uri(%s)", expected); - str = grpc_sockaddr_to_uri(addr); - GPR_ASSERT(str != nullptr); - GPR_ASSERT(strcmp(expected, str) == 0); - gpr_free(str); + std::string actual = grpc_sockaddr_to_uri(addr); + GPR_ASSERT(actual == expected); } static void test_sockaddr_to_string(void) { @@ -235,7 +232,7 @@ static void test_sockaddr_to_string(void) { dummy_addr->sa_family = 123; expect_sockaddr_str("(sockaddr family=123)", &dummy, 0); expect_sockaddr_str("(sockaddr family=123)", &dummy, 1); - GPR_ASSERT(grpc_sockaddr_to_uri(&dummy) == nullptr); + GPR_ASSERT(grpc_sockaddr_to_uri(&dummy).empty()); } static void test_sockaddr_set_get_port(void) { diff --git a/test/core/security/credentials_test.cc b/test/core/security/credentials_test.cc index 75eb00ec83d..eb07947597c 100644 --- a/test/core/security/credentials_test.cc +++ b/test/core/security/credentials_test.cc @@ -24,6 +24,11 @@ #include #include +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include #include @@ -670,16 +675,14 @@ static void test_compute_engine_creds_failure(void) { static void validate_refresh_token_http_request( const grpc_httpcli_request* request, const char* body, size_t body_size) { /* The content of the assertion is tested extensively in json_token_test. */ - char* expected_body = nullptr; GPR_ASSERT(body != nullptr); GPR_ASSERT(body_size != 0); - gpr_asprintf(&expected_body, GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING, - "32555999999.apps.googleusercontent.com", - "EmssLNjJy1332hD4KFsecret", - "1/Blahblasj424jladJDSGNf-u4Sua3HDA2ngjd42"); - GPR_ASSERT(strlen(expected_body) == body_size); - GPR_ASSERT(memcmp(expected_body, body, body_size) == 0); - gpr_free(expected_body); + std::string expected_body = absl::StrFormat( + GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING, + "32555999999.apps.googleusercontent.com", "EmssLNjJy1332hD4KFsecret", + "1/Blahblasj424jladJDSGNf-u4Sua3HDA2ngjd42"); + GPR_ASSERT(expected_body.size() == body_size); + GPR_ASSERT(memcmp(expected_body.data(), body, body_size) == 0); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, GRPC_GOOGLE_OAUTH2_SERVICE_HOST) == 0); GPR_ASSERT( @@ -891,9 +894,9 @@ static void validate_sts_token_http_request(const grpc_httpcli_request* request, GPR_ASSERT(body != nullptr); GPR_ASSERT(body_size != 0); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); - char* get_url_equivalent; - gpr_asprintf(&get_url_equivalent, "%s?%s", test_sts_endpoint_url, body); - grpc_uri* url = grpc_uri_parse(get_url_equivalent, false); + std::string get_url_equivalent = + absl::StrFormat("%s?%s", test_sts_endpoint_url, body); + grpc_uri* url = grpc_uri_parse(get_url_equivalent.c_str(), false); GPR_ASSERT(strcmp(grpc_uri_get_query_arg(url, "resource"), "resource") == 0); GPR_ASSERT(strcmp(grpc_uri_get_query_arg(url, "audience"), "audience") == 0); GPR_ASSERT(strcmp(grpc_uri_get_query_arg(url, "scope"), "scope") == 0); @@ -913,7 +916,6 @@ static void validate_sts_token_http_request(const grpc_httpcli_request* request, GPR_ASSERT(grpc_uri_get_query_arg(url, "actor_token_type") == nullptr); } grpc_uri_destroy(url); - gpr_free(get_url_equivalent); // Check the rest of the request. GPR_ASSERT(strcmp(request->host, "foo.com:5555") == 0); @@ -1268,9 +1270,8 @@ static void test_jwt_creds_success(void) { grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; - char* expected_md_value; - gpr_asprintf(&expected_md_value, "Bearer %s", test_signed_jwt); - expected_md emd[] = {{"authorization", expected_md_value}}; + std::string expected_md_value = absl::StrCat("Bearer ", test_signed_jwt); + expected_md emd[] = {{"authorization", expected_md_value.c_str()}}; grpc_call_credentials* creds = grpc_service_account_jwt_access_credentials_create( json_key_string, grpc_max_auth_token_lifetime(), nullptr); @@ -1304,7 +1305,6 @@ static void test_jwt_creds_success(void) { creds->Unref(); gpr_free(json_key_string); - gpr_free(expected_md_value); grpc_jwt_encode_and_sign_set_override(nullptr); } @@ -1409,7 +1409,7 @@ static int default_creds_metadata_server_detection_httpcli_get_success_override( return 1; } -static char* null_well_known_creds_path_getter(void) { return nullptr; } +static std::string null_well_known_creds_path_getter(void) { return ""; } static bool test_gce_tenancy_checker(void) { g_test_gce_tenancy_checker_called = true; @@ -1636,13 +1636,10 @@ static void test_metadata_plugin_failure(void) { grpc_core::ExecCtx exec_ctx; grpc_auth_metadata_context auth_md_ctx = {test_service_url, test_method, nullptr, nullptr}; - char* expected_error; - gpr_asprintf(&expected_error, - "Getting metadata from plugin failed with error: %s", - plugin_error_details); + std::string expected_error = absl::StrCat( + "Getting metadata from plugin failed with error: ", plugin_error_details); request_metadata_state* md_state = make_request_metadata_state( - GRPC_ERROR_CREATE_FROM_COPIED_STRING(expected_error), nullptr, 0); - gpr_free(expected_error); + GRPC_ERROR_CREATE_FROM_COPIED_STRING(expected_error.c_str()), nullptr, 0); plugin.state = &state; plugin.get_metadata = plugin_get_metadata_failure; @@ -1662,7 +1659,6 @@ static void test_metadata_plugin_failure(void) { } static void test_get_well_known_google_credentials_file_path(void) { - char* path; char* home = gpr_getenv("HOME"); bool restore_home_env = false; #if defined(GRPC_BAZEL_BUILD) && \ @@ -1673,15 +1669,13 @@ static void test_get_well_known_google_credentials_file_path(void) { gpr_setenv("HOME", "/fake/home/for/bazel"); #endif /* defined(GRPC_BAZEL_BUILD) && (defined(GPR_POSIX_ENV) || \ defined(GPR_LINUX_ENV)) */ - path = grpc_get_well_known_google_credentials_file_path(); - GPR_ASSERT(path != nullptr); - gpr_free(path); + std::string path = grpc_get_well_known_google_credentials_file_path(); + GPR_ASSERT(!path.empty()); #if defined(GPR_POSIX_ENV) || defined(GPR_LINUX_ENV) restore_home_env = true; gpr_unsetenv("HOME"); path = grpc_get_well_known_google_credentials_file_path(); - GPR_ASSERT(path == nullptr); - gpr_free(path); + GPR_ASSERT(path.empty()); #endif /* GPR_POSIX_ENV || GPR_LINUX_ENV */ if (restore_home_env) { if (home) { diff --git a/test/core/surface/concurrent_connectivity_test.cc b/test/core/surface/concurrent_connectivity_test.cc index 591c52c6f8f..175359312f1 100644 --- a/test/core/surface/concurrent_connectivity_test.cc +++ b/test/core/surface/concurrent_connectivity_test.cc @@ -25,10 +25,13 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include -#include #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/exec_ctx.h" @@ -91,13 +94,13 @@ void create_loop_destroy(void* addr) { } struct server_thread_args { - char* addr; - grpc_server* server; - grpc_completion_queue* cq; - grpc_pollset* pollset; - gpr_mu* mu; + std::string addr; + grpc_server* server = nullptr; + grpc_completion_queue* cq = nullptr; + grpc_pollset* pollset = nullptr; + gpr_mu* mu = nullptr; gpr_event ready; - gpr_atm stop; + gpr_atm stop = 0; }; void server_thread(void* vargs) { @@ -141,7 +144,7 @@ void bad_server_thread(void* vargs) { error = grpc_tcp_server_add_port(s, &resolved_addr, &port); GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_tcp_server_add_port", error)); GPR_ASSERT(port > 0); - gpr_asprintf(&args->addr, "localhost:%d", port); + args->addr = absl::StrCat("localhost:", port); grpc_tcp_server_start(s, &args->pollset, 1, on_connect, args); gpr_event_set(&args->ready, (void*)1); @@ -163,8 +166,6 @@ void bad_server_thread(void* vargs) { gpr_mu_unlock(args->mu); grpc_tcp_server_unref(s); - - gpr_free(args->addr); } static void done_pollset_shutdown(void* pollset, grpc_error* /*error*/) { @@ -174,32 +175,31 @@ static void done_pollset_shutdown(void* pollset, grpc_error* /*error*/) { int run_concurrent_connectivity_test() { struct server_thread_args args; - memset(&args, 0, sizeof(args)); grpc_init(); /* First round, no server */ { gpr_log(GPR_DEBUG, "Wave 1"); - char* localhost = gpr_strdup("localhost:54321"); grpc_core::Thread threads[NUM_THREADS]; + args.addr = "localhost:54321"; for (auto& th : threads) { - th = grpc_core::Thread("grpc_wave_1", create_loop_destroy, localhost); + th = grpc_core::Thread("grpc_wave_1", create_loop_destroy, + const_cast(args.addr.c_str())); th.Start(); } for (auto& th : threads) { th.Join(); } - gpr_free(localhost); } { /* Second round, actual grpc server */ gpr_log(GPR_DEBUG, "Wave 2"); int port = grpc_pick_unused_port_or_die(); - gpr_asprintf(&args.addr, "localhost:%d", port); + args.addr = absl::StrCat("localhost:", port); args.server = grpc_server_create(nullptr, nullptr); - grpc_server_add_insecure_http2_port(args.server, args.addr); + grpc_server_add_insecure_http2_port(args.server, args.addr.c_str()); args.cq = grpc_completion_queue_create_for_next(nullptr); grpc_server_register_completion_queue(args.server, args.cq, nullptr); grpc_server_start(args.server); @@ -208,7 +208,8 @@ int run_concurrent_connectivity_test() { grpc_core::Thread threads[NUM_THREADS]; for (auto& th : threads) { - th = grpc_core::Thread("grpc_wave_2", create_loop_destroy, args.addr); + th = grpc_core::Thread("grpc_wave_2", create_loop_destroy, + const_cast(args.addr.c_str())); th.Start(); } for (auto& th : threads) { @@ -219,7 +220,6 @@ int run_concurrent_connectivity_test() { server2.Join(); grpc_server_destroy(args.server); grpc_completion_queue_destroy(args.cq); - gpr_free(args.addr); } { @@ -234,7 +234,8 @@ int run_concurrent_connectivity_test() { grpc_core::Thread threads[NUM_THREADS]; for (auto& th : threads) { - th = grpc_core::Thread("grpc_wave_3", create_loop_destroy, args.addr); + th = grpc_core::Thread("grpc_wave_3", create_loop_destroy, + const_cast(args.addr.c_str())); th.Start(); } for (auto& th : threads) { @@ -290,17 +291,14 @@ int run_concurrent_watches_with_short_timeouts_test() { grpc_core::Thread threads[NUM_THREADS]; - char* localhost = gpr_strdup("localhost:54321"); - for (auto& th : threads) { th = grpc_core::Thread("grpc_short_watches", watches_with_short_timeouts, - localhost); + const_cast("localhost:54321")); th.Start(); } for (auto& th : threads) { th.Join(); } - gpr_free(localhost); grpc_shutdown(); return 0; diff --git a/test/core/surface/server_test.cc b/test/core/surface/server_test.cc index e53d7eb90fa..0e829c2cf84 100644 --- a/test/core/surface/server_test.cc +++ b/test/core/surface/server_test.cc @@ -16,11 +16,14 @@ * */ +#include + +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include "src/core/lib/gprpp/host_port.h" #include "src/core/lib/iomgr/resolve_address.h" @@ -72,26 +75,26 @@ void test_request_call_on_no_server_cq(void) { // GRPC_ARG_ALLOW_REUSEPORT isn't supported for custom servers #ifndef GRPC_UV void test_bind_server_twice(void) { - grpc_arg a; - a.type = GRPC_ARG_INTEGER; - a.key = const_cast(GRPC_ARG_ALLOW_REUSEPORT); - a.value.integer = 0; + grpc_arg a = grpc_channel_arg_integer_create( + const_cast(GRPC_ARG_ALLOW_REUSEPORT), 0); grpc_channel_args args = {1, &a}; - char* addr; grpc_server* server1 = grpc_server_create(&args, nullptr); grpc_server* server2 = grpc_server_create(&args, nullptr); grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); int port = grpc_pick_unused_port_or_die(); - gpr_asprintf(&addr, "[::]:%d", port); + std::string addr = absl::StrCat("[::]:", port); grpc_server_register_completion_queue(server1, cq, nullptr); grpc_server_register_completion_queue(server2, cq, nullptr); - GPR_ASSERT(0 == grpc_server_add_secure_http2_port(server2, addr, nullptr)); - GPR_ASSERT(port == grpc_server_add_insecure_http2_port(server1, addr)); - GPR_ASSERT(0 == grpc_server_add_insecure_http2_port(server2, addr)); + GPR_ASSERT(0 == + grpc_server_add_secure_http2_port(server2, addr.c_str(), nullptr)); + GPR_ASSERT(port == + grpc_server_add_insecure_http2_port(server1, addr.c_str())); + GPR_ASSERT(0 == grpc_server_add_insecure_http2_port(server2, addr.c_str())); grpc_server_credentials* fake_creds = grpc_fake_transport_security_server_credentials_create(); - GPR_ASSERT(0 == grpc_server_add_secure_http2_port(server2, addr, fake_creds)); + GPR_ASSERT(0 == grpc_server_add_secure_http2_port(server2, addr.c_str(), + fake_creds)); grpc_server_credentials_release(fake_creds); grpc_server_shutdown_and_notify(server1, cq, nullptr); grpc_server_shutdown_and_notify(server2, cq, nullptr); @@ -100,7 +103,6 @@ void test_bind_server_twice(void) { grpc_server_destroy(server1); grpc_server_destroy(server2); grpc_completion_queue_destroy(cq); - gpr_free(addr); } #endif diff --git a/test/core/transport/chttp2/hpack_encoder_test.cc b/test/core/transport/chttp2/hpack_encoder_test.cc index 8099b4fe021..2ed16fe21f5 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.cc +++ b/test/core/transport/chttp2/hpack_encoder_test.cc @@ -21,9 +21,13 @@ #include #include +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/lib/gpr/string.h" @@ -305,7 +309,6 @@ static void test_decode_table_overflow() { grpc_chttp2_hpack_compressor_set_max_table_size(&g_compressor, 1024); int i; char key[3], value[3]; - char* expect; verify_params params = { false, @@ -318,17 +321,16 @@ static void test_decode_table_overflow() { encode_int_to_str(i + 1, value); if (i == 0) { // 3fe107 corresponds to the table size update. - gpr_asprintf(&expect, - "00000a 0104 deadbeef 3fe107 40 02%02x%02x 02%02x%02x", - key[0], key[1], value[0], value[1]); - verify(params, expect, 1, key, value); + std::string expect = absl::StrFormat( + "00000a 0104 deadbeef 3fe107 40 02%02x%02x 02%02x%02x", key[0], + key[1], value[0], value[1]); + verify(params, expect.c_str(), 1, key, value); } else { - gpr_asprintf(&expect, - "000008 0104 deadbeef %02x 40 02%02x%02x 02%02x%02x", - 0x80 + 61 + i, key[0], key[1], value[0], value[1]); - verify(params, expect, 2, "aa", "ba", key, value); + std::string expect = + absl::StrFormat("000008 0104 deadbeef %02x 40 02%02x%02x 02%02x%02x", + 0x80 + 61 + i, key[0], key[1], value[0], value[1]); + verify(params, expect.c_str(), 2, "aa", "ba", key, value); } - gpr_free(expect); } /* if the above passes, then we must have just knocked this pair out of the diff --git a/test/core/transport/chttp2/hpack_table_test.cc b/test/core/transport/chttp2/hpack_table_test.cc index 8a0015ee503..c8410c61866 100644 --- a/test/core/transport/chttp2/hpack_table_test.cc +++ b/test/core/transport/chttp2/hpack_table_test.cc @@ -21,13 +21,17 @@ #include #include +#include + +#include "absl/strings/str_cat.h" + #include #include #include -#include #include "src/core/lib/gpr/string.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/slice/slice_internal.h" #include "test/core/util/test_config.h" #define LOG_TEST(x) gpr_log(GPR_INFO, "%s", x) @@ -117,8 +121,6 @@ static void test_static_lookup(void) { static void test_many_additions(void) { grpc_chttp2_hptbl tbl; int i; - char* key; - char* value; LOG_TEST("test_many_additions"); @@ -126,21 +128,19 @@ static void test_many_additions(void) { for (i = 0; i < 100000; i++) { grpc_mdelem elem; - gpr_asprintf(&key, "K:%d", i); - gpr_asprintf(&value, "VALUE:%d", i); - elem = grpc_mdelem_from_slices(grpc_slice_from_copied_string(key), - grpc_slice_from_copied_string(value)); + std::string key = absl::StrCat("K:", i); + std::string value = absl::StrCat("VALUE:", i); + elem = grpc_mdelem_from_slices(grpc_slice_from_cpp_string(key), + grpc_slice_from_cpp_string(value)); GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem) == GRPC_ERROR_NONE); GRPC_MDELEM_UNREF(elem); - assert_index(&tbl, 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY, key, value); - gpr_free(key); - gpr_free(value); + assert_index(&tbl, 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY, key.c_str(), + value.c_str()); if (i) { - gpr_asprintf(&key, "K:%d", i - 1); - gpr_asprintf(&value, "VALUE:%d", i - 1); - assert_index(&tbl, 2 + GRPC_CHTTP2_LAST_STATIC_ENTRY, key, value); - gpr_free(key); - gpr_free(value); + std::string key = absl::StrCat("K:", i - 1); + std::string value = absl::StrCat("VALUE:", i - 1); + assert_index(&tbl, 2 + GRPC_CHTTP2_LAST_STATIC_ENTRY, key.c_str(), + value.c_str()); } } diff --git a/test/core/transport/chttp2/settings_timeout_test.cc b/test/core/transport/chttp2/settings_timeout_test.cc index 4790222f98c..af11dea6aa4 100644 --- a/test/core/transport/chttp2/settings_timeout_test.cc +++ b/test/core/transport/chttp2/settings_timeout_test.cc @@ -16,17 +16,19 @@ * */ -#include -#include -#include -#include - #include #include +#include #include #include +#include "absl/strings/str_cat.h" + +#include +#include +#include + #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/error.h" #include "src/core/lib/iomgr/pollset.h" @@ -220,15 +222,14 @@ class Client { TEST(SettingsTimeout, Basic) { // Construct server address string. const int server_port = grpc_pick_unused_port_or_die(); - char* server_address_string; - gpr_asprintf(&server_address_string, "localhost:%d", server_port); + std::string server_address_string = absl::StrCat("localhost:", server_port); // Start server. - gpr_log(GPR_INFO, "starting server on %s", server_address_string); - ServerThread server_thread(server_address_string); + gpr_log(GPR_INFO, "starting server on %s", server_address_string.c_str()); + ServerThread server_thread(server_address_string.c_str()); server_thread.Start(); // Create client and connect to server. gpr_log(GPR_INFO, "starting client connect"); - Client client(server_address_string); + Client client(server_address_string.c_str()); client.Connect(); // Client read. Should fail due to server dropping connection. gpr_log(GPR_INFO, "starting client read"); @@ -240,7 +241,6 @@ TEST(SettingsTimeout, Basic) { gpr_log(GPR_INFO, "shutting down server"); server_thread.Shutdown(); // Clean up. - gpr_free(server_address_string); } } // namespace diff --git a/test/core/transport/metadata_test.cc b/test/core/transport/metadata_test.cc index 0786d78d7f9..f0f6c8d2eba 100644 --- a/test/core/transport/metadata_test.cc +++ b/test/core/transport/metadata_test.cc @@ -21,10 +21,13 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include #include -#include #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_table.h" @@ -217,7 +220,6 @@ static void test_identity_laws(bool intern_keys, bool intern_values) { static void test_things_stick_around(void) { size_t i, j; - char* buffer; size_t nstrs = 1000; grpc_slice* strs = static_cast(gpr_malloc(sizeof(grpc_slice) * nstrs)); @@ -230,10 +232,10 @@ static void test_things_stick_around(void) { grpc_core::ExecCtx exec_ctx; for (i = 0; i < nstrs; i++) { - gpr_asprintf(&buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%" PRIuPTR "x", i); - strs[i] = grpc_slice_intern(grpc_slice_from_static_string(buffer)); + std::string buffer = + absl::StrFormat("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%" PRIuPTR "x", i); + strs[i] = grpc_slice_intern(grpc_slice_from_static_string(buffer.c_str())); shuf[i] = i; - gpr_free(buffer); } for (i = 0; i < nstrs; i++) { @@ -252,12 +254,11 @@ static void test_things_stick_around(void) { for (i = 0; i < nstrs; i++) { grpc_slice_unref_internal(strs[shuf[i]]); for (j = i + 1; j < nstrs; j++) { - gpr_asprintf(&buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%" PRIuPTR "x", - shuf[j]); - test = grpc_slice_intern(grpc_slice_from_static_string(buffer)); + std::string buffer = absl::StrFormat( + "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%" PRIuPTR "x", shuf[j]); + test = grpc_slice_intern(grpc_slice_from_static_string(buffer.c_str())); GPR_ASSERT(grpc_slice_is_equivalent(test, strs[shuf[j]])); grpc_slice_unref_internal(test); - gpr_free(buffer); } } diff --git a/test/core/transport/timeout_encoding_test.cc b/test/core/transport/timeout_encoding_test.cc index 61c3061d0c1..5f6d38c7f87 100644 --- a/test/core/transport/timeout_encoding_test.cc +++ b/test/core/transport/timeout_encoding_test.cc @@ -21,9 +21,12 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include -#include #include "src/core/lib/gpr/murmur_hash.h" #include "src/core/lib/gpr/string.h" @@ -84,24 +87,18 @@ void decode_suite(char ext, grpc_millis (*answer)(int64_t x)) { long test_vals[] = {1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 98765432, 9876543, 987654, 98765, 9876, 987, 98, 9}; - unsigned i; - char* input; - for (i = 0; i < GPR_ARRAY_SIZE(test_vals); i++) { - gpr_asprintf(&input, "%ld%c", test_vals[i], ext); - assert_decodes_as(input, answer(test_vals[i])); - gpr_free(input); - - gpr_asprintf(&input, " %ld%c", test_vals[i], ext); - assert_decodes_as(input, answer(test_vals[i])); - gpr_free(input); - - gpr_asprintf(&input, "%ld %c", test_vals[i], ext); - assert_decodes_as(input, answer(test_vals[i])); - gpr_free(input); - - gpr_asprintf(&input, "%ld %c ", test_vals[i], ext); - assert_decodes_as(input, answer(test_vals[i])); - gpr_free(input); + for (unsigned i = 0; i < GPR_ARRAY_SIZE(test_vals); i++) { + std::string input = absl::StrFormat("%ld%c", test_vals[i], ext); + assert_decodes_as(input.c_str(), answer(test_vals[i])); + + input = absl::StrFormat(" %ld%c", test_vals[i], ext); + assert_decodes_as(input.c_str(), answer(test_vals[i])); + + input = absl::StrFormat("%ld %c", test_vals[i], ext); + assert_decodes_as(input.c_str(), answer(test_vals[i])); + + input = absl::StrFormat("%ld %c ", test_vals[i], ext); + assert_decodes_as(input.c_str(), answer(test_vals[i])); } } diff --git a/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc b/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc index 521cabdf932..4ec5a612d76 100644 --- a/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc +++ b/test/core/tsi/alts/handshaker/alts_concurrent_connectivity_test.cc @@ -31,6 +31,8 @@ #include #include +#include "absl/strings/str_cat.h" + #include #include #include @@ -337,9 +339,7 @@ class FakeTcpServer { : process_read_cb_(process_read_cb) { port_ = grpc_pick_unused_port_or_die(); accept_socket_ = socket(AF_INET6, SOCK_STREAM, 0); - char* addr_str; - GPR_ASSERT(gpr_asprintf(&addr_str, "[::]:%d", port_)); - address_ = grpc_core::UniquePtr(addr_str); + address_ = absl::StrCat("[::]:", port_); GPR_ASSERT(accept_socket_ != -1); if (accept_socket_ == -1) { gpr_log(GPR_ERROR, "Failed to create socket: %d", errno); @@ -388,7 +388,7 @@ class FakeTcpServer { "thread complete"); } - const char* address() { return address_.get(); } + const char* address() { return address_.c_str(); } static ProcessReadResult CloseSocketUponReceivingBytesFromPeer( int bytes_received_size, int read_error, int s) { @@ -479,7 +479,7 @@ class FakeTcpServer { int accept_socket_; int port_; gpr_event stop_ev_; - grpc_core::UniquePtr address_; + std::string address_; std::unique_ptr run_server_loop_thd_; std::function process_read_cb_; }; diff --git a/test/core/tsi/transport_security_test.cc b/test/core/tsi/transport_security_test.cc index 150e5745a8d..eb88eaf4912 100644 --- a/test/core/tsi/transport_security_test.cc +++ b/test/core/tsi/transport_security_test.cc @@ -20,6 +20,10 @@ #include +#include + +#include "absl/strings/str_format.h" + #include #include #include @@ -291,16 +295,13 @@ static tsi_peer peer_from_cert_name_test_entry( return peer; } -char* cert_name_test_entry_to_string(const cert_name_test_entry* entry) { - char* s; - gpr_asprintf(&s, - "{ success = %s, host_name = %s, common_name = %s, dns_names = " - "%s, ip_names = %s}", - entry->expected ? "true" : "false", entry->host_name, - entry->common_name, - entry->dns_names != nullptr ? entry->dns_names : "", - entry->ip_names != nullptr ? entry->ip_names : ""); - return s; +std::string cert_name_test_entry_to_string(const cert_name_test_entry* entry) { + return absl::StrFormat( + "{ success = %s, host_name = %s, common_name = %s, dns_names = " + "%s, ip_names = %s}", + entry->expected ? "true" : "false", entry->host_name, entry->common_name, + entry->dns_names != nullptr ? entry->dns_names : "", + entry->ip_names != nullptr ? entry->ip_names : ""); } static void test_peer_matches_name(void) { @@ -310,9 +311,7 @@ static void test_peer_matches_name(void) { tsi_peer peer = peer_from_cert_name_test_entry(entry); int result = tsi_ssl_peer_matches_name(&peer, entry->host_name); if (result != entry->expected) { - char* entry_str = cert_name_test_entry_to_string(entry); - gpr_log(GPR_ERROR, "%s", entry_str); - gpr_free(entry_str); + gpr_log(GPR_ERROR, "%s", cert_name_test_entry_to_string(entry).c_str()); GPR_ASSERT(0); /* Unexpected result. */ } tsi_peer_destruct(&peer); diff --git a/test/core/util/mock_endpoint.cc b/test/core/util/mock_endpoint.cc index 1a9d7ad2101..b001fd764a7 100644 --- a/test/core/util/mock_endpoint.cc +++ b/test/core/util/mock_endpoint.cc @@ -22,10 +22,14 @@ headers. Therefore, sockaddr.h must always be included first */ #include "src/core/lib/iomgr/sockaddr.h" -#include "test/core/util/mock_endpoint.h" - #include +#include + +#include "absl/strings/str_format.h" + +#include "test/core/util/mock_endpoint.h" + #include #include #include "src/core/lib/iomgr/sockaddr.h" @@ -123,10 +127,8 @@ grpc_endpoint* grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice), grpc_resource_quota* resource_quota) { mock_endpoint* m = static_cast(gpr_malloc(sizeof(*m))); m->base.vtable = &vtable; - char* name; - gpr_asprintf(&name, "mock_endpoint_%" PRIxPTR, (intptr_t)m); - m->resource_user = grpc_resource_user_create(resource_quota, name); - gpr_free(name); + std::string name = absl::StrFormat("mock_endpoint_%" PRIxPTR, (intptr_t)m); + m->resource_user = grpc_resource_user_create(resource_quota, name.c_str()); grpc_slice_buffer_init(&m->read_buffer); gpr_mu_init(&m->mu); m->on_write = on_write; diff --git a/test/core/util/passthru_endpoint.cc b/test/core/util/passthru_endpoint.cc index c9dbd7c3f4e..0b14c55c73e 100644 --- a/test/core/util/passthru_endpoint.cc +++ b/test/core/util/passthru_endpoint.cc @@ -27,6 +27,10 @@ #include #include +#include + +#include "absl/strings/str_format.h" + #include #include #include "src/core/lib/iomgr/sockaddr.h" @@ -185,11 +189,9 @@ static void half_init(half* m, passthru_endpoint* parent, m->parent = parent; grpc_slice_buffer_init(&m->read_buffer); m->on_read = nullptr; - char* name; - gpr_asprintf(&name, "passthru_endpoint_%s_%" PRIxPTR, half_name, - (intptr_t)parent); - m->resource_user = grpc_resource_user_create(resource_quota, name); - gpr_free(name); + std::string name = absl::StrFormat("passthru_endpoint_%s_%" PRIxPTR, + half_name, (intptr_t)parent); + m->resource_user = grpc_resource_user_create(resource_quota, name.c_str()); } void grpc_passthru_endpoint_create(grpc_endpoint** client, diff --git a/test/cpp/client/client_channel_stress_test.cc b/test/cpp/client/client_channel_stress_test.cc index 61e109bd67c..f2ef30ef9ff 100644 --- a/test/cpp/client/client_channel_stress_test.cc +++ b/test/cpp/client/client_channel_stress_test.cc @@ -21,12 +21,14 @@ #include #include #include +#include #include +#include "absl/strings/str_cat.h" + #include #include #include -#include #include #include #include @@ -221,9 +223,8 @@ class ClientChannelStressTest { const std::vector& address_data) { grpc_core::ServerAddressList addresses; for (const auto& addr : address_data) { - char* lb_uri_str; - gpr_asprintf(&lb_uri_str, "ipv4:127.0.0.1:%d", addr.port); - grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str, true); + std::string lb_uri_str = absl::StrCat("ipv4:127.0.0.1:", addr.port); + grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true); GPR_ASSERT(lb_uri != nullptr); grpc_resolved_address address; GPR_ASSERT(grpc_parse_uri(lb_uri, &address)); @@ -233,7 +234,6 @@ class ClientChannelStressTest { grpc_channel_args_copy_and_add(nullptr, &arg, 1); addresses.emplace_back(address.addr, address.len, args); grpc_uri_destroy(lb_uri); - gpr_free(lb_uri_str); } return addresses; } diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index 174c09cd79d..5dafacd4703 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -21,13 +21,15 @@ #include #include #include +#include #include +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include #include #include @@ -186,16 +188,14 @@ class FakeResolverResponseGeneratorWrapper { const char* service_config_json = nullptr) { grpc_core::Resolver::Result result; for (const int& port : ports) { - char* lb_uri_str; - gpr_asprintf(&lb_uri_str, "ipv4:127.0.0.1:%d", port); - grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str, true); + std::string lb_uri_str = absl::StrCat("ipv4:127.0.0.1:", port); + grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true); GPR_ASSERT(lb_uri != nullptr); grpc_resolved_address address; GPR_ASSERT(grpc_parse_uri(lb_uri, &address)); result.addresses.emplace_back(address.addr, address.len, nullptr /* args */); grpc_uri_destroy(lb_uri); - gpr_free(lb_uri_str); } if (service_config_json != nullptr) { result.service_config = grpc_core::ServiceConfig::Create( diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index a6a7d3697b6..6d85f17b0c1 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -21,12 +21,15 @@ #include #include #include +#include #include +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include #include -#include #include #include #include @@ -328,10 +331,8 @@ class BalancerServiceImpl : public BalancerService { server->set_ip_address(Ip4ToPackedString("127.0.0.1")); server->set_port(backend_port); static int token_count = 0; - char* token; - gpr_asprintf(&token, "token%03d", ++token_count); - server->set_load_balance_token(token); - gpr_free(token); + server->set_load_balance_token( + absl::StrFormat("token%03d", ++token_count)); } return response; } @@ -537,9 +538,8 @@ class GrpclbEnd2endTest : public ::testing::Test { const std::vector& address_data) { grpc_core::ServerAddressList addresses; for (const auto& addr : address_data) { - char* lb_uri_str; - gpr_asprintf(&lb_uri_str, "ipv4:127.0.0.1:%d", addr.port); - grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str, true); + std::string lb_uri_str = absl::StrCat("ipv4:127.0.0.1:", addr.port); + grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true); GPR_ASSERT(lb_uri != nullptr); grpc_resolved_address address; GPR_ASSERT(grpc_parse_uri(lb_uri, &address)); @@ -549,7 +549,6 @@ class GrpclbEnd2endTest : public ::testing::Test { grpc_channel_args_copy_and_add(nullptr, &arg, 1); addresses.emplace_back(address.addr, address.len, args); grpc_uri_destroy(lb_uri); - gpr_free(lb_uri_str); } return addresses; } diff --git a/test/cpp/end2end/service_config_end2end_test.cc b/test/cpp/end2end/service_config_end2end_test.cc index feabb30bbde..6c538c738d1 100644 --- a/test/cpp/end2end/service_config_end2end_test.cc +++ b/test/cpp/end2end/service_config_end2end_test.cc @@ -21,13 +21,15 @@ #include #include #include +#include #include +#include "absl/strings/str_cat.h" + #include #include #include #include -#include #include #include #include @@ -167,16 +169,14 @@ class ServiceConfigEnd2endTest : public ::testing::Test { grpc_core::Resolver::Result BuildFakeResults(const std::vector& ports) { grpc_core::Resolver::Result result; for (const int& port : ports) { - char* lb_uri_str; - gpr_asprintf(&lb_uri_str, "ipv4:127.0.0.1:%d", port); - grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str, true); + std::string lb_uri_str = absl::StrCat("ipv4:127.0.0.1:", port); + grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true); GPR_ASSERT(lb_uri != nullptr); grpc_resolved_address address; GPR_ASSERT(grpc_parse_uri(lb_uri, &address)); result.addresses.emplace_back(address.addr, address.len, nullptr /* args */); grpc_uri_destroy(lb_uri); - gpr_free(lb_uri_str); } return result; } diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 3f5eded4ace..b9d0d2e8e91 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -26,10 +26,11 @@ #include #include +#include "absl/strings/str_cat.h" + #include #include #include -#include #include #include #include @@ -1378,15 +1379,13 @@ class XdsEnd2endTest : public ::testing::TestWithParam { const std::vector& ports) { grpc_core::ServerAddressList addresses; for (int port : ports) { - char* lb_uri_str; - gpr_asprintf(&lb_uri_str, "ipv4:127.0.0.1:%d", port); - grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str, true); + std::string lb_uri_str = absl::StrCat("ipv4:127.0.0.1:", port); + grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true); GPR_ASSERT(lb_uri != nullptr); grpc_resolved_address address; GPR_ASSERT(grpc_parse_uri(lb_uri, &address)); addresses.emplace_back(address.addr, address.len, nullptr); grpc_uri_destroy(lb_uri); - gpr_free(lb_uri_str); } return addresses; } diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index c7782a408d9..25f1695795f 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -19,9 +19,12 @@ #include #include #include +#include #include #include +#include "absl/strings/str_format.h" + #include #include #include @@ -350,22 +353,22 @@ bool InteropClient::DoClientCompressedUnary() { const std::vector compressions = {true, false}; for (size_t i = 0; i < compressions.size(); i++) { - char* log_suffix; - gpr_asprintf(&log_suffix, "(compression=%s)", - compressions[i] ? "true" : "false"); + std::string log_suffix = + absl::StrFormat("(compression=%s)", compressions[i] ? "true" : "false"); - gpr_log(GPR_DEBUG, "Sending compressed unary request %s.", log_suffix); + gpr_log(GPR_DEBUG, "Sending compressed unary request %s.", + log_suffix.c_str()); SimpleRequest request; SimpleResponse response; request.mutable_expect_compressed()->set_value(compressions[i]); if (!PerformLargeUnary(&request, &response, UnaryCompressionChecks)) { - gpr_log(GPR_ERROR, "Compressed unary request failed %s", log_suffix); - gpr_free(log_suffix); + gpr_log(GPR_ERROR, "Compressed unary request failed %s", + log_suffix.c_str()); return false; } - gpr_log(GPR_DEBUG, "Compressed unary request failed %s", log_suffix); - gpr_free(log_suffix); + gpr_log(GPR_DEBUG, "Compressed unary request failed %s", + log_suffix.c_str()); } return true; @@ -374,24 +377,23 @@ bool InteropClient::DoClientCompressedUnary() { bool InteropClient::DoServerCompressedUnary() { const std::vector compressions = {true, false}; for (size_t i = 0; i < compressions.size(); i++) { - char* log_suffix; - gpr_asprintf(&log_suffix, "(compression=%s)", - compressions[i] ? "true" : "false"); + std::string log_suffix = + absl::StrFormat("(compression=%s)", compressions[i] ? "true" : "false"); gpr_log(GPR_DEBUG, "Sending unary request for compressed response %s.", - log_suffix); + log_suffix.c_str()); SimpleRequest request; SimpleResponse response; request.mutable_response_compressed()->set_value(compressions[i]); if (!PerformLargeUnary(&request, &response, UnaryCompressionChecks)) { - gpr_log(GPR_ERROR, "Request for compressed unary failed %s", log_suffix); - gpr_free(log_suffix); + gpr_log(GPR_ERROR, "Request for compressed unary failed %s", + log_suffix.c_str()); return false; } - gpr_log(GPR_DEBUG, "Request for compressed unary failed %s", log_suffix); - gpr_free(log_suffix); + gpr_log(GPR_DEBUG, "Request for compressed unary failed %s", + log_suffix.c_str()); } return true; @@ -551,12 +553,11 @@ bool InteropClient::DoServerCompressedStreaming() { GPR_ASSERT(compressions.size() == sizes.size()); for (size_t i = 0; i < sizes.size(); i++) { - char* log_suffix; - gpr_asprintf(&log_suffix, "(compression=%s; size=%d)", - compressions[i] ? "true" : "false", sizes[i]); + std::string log_suffix = + absl::StrFormat("(compression=%s; size=%d)", + compressions[i] ? "true" : "false", sizes[i]); - gpr_log(GPR_DEBUG, "Sending request streaming rpc %s.", log_suffix); - gpr_free(log_suffix); + gpr_log(GPR_DEBUG, "Sending request streaming rpc %s.", log_suffix.c_str()); ResponseParameters* const response_parameter = request.add_response_parameters(); @@ -1090,13 +1091,10 @@ InteropClient::PerformOneSoakTestIteration( if (!s.ok()) { return std::make_tuple(false, elapsed_ms, context.debug_error_string()); } else if (elapsed_ms > max_acceptable_per_iteration_latency_ms) { - char* out; - GPR_ASSERT(gpr_asprintf( - &out, "%d ms exceeds max acceptable latency: %d ms.", - elapsed_ms, max_acceptable_per_iteration_latency_ms) != -1); - std::string debug_string(out); - gpr_free(out); - return std::make_tuple(false, elapsed_ms, debug_string); + std::string debug_string = + absl::StrFormat("%d ms exceeds max acceptable latency: %d ms.", + elapsed_ms, max_acceptable_per_iteration_latency_ms); + return std::make_tuple(false, elapsed_ms, std::move(debug_string)); } else { return std::make_tuple(true, elapsed_ms, ""); } diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index e0bacb3cfd6..b16a0da11d0 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -25,10 +25,14 @@ #include #include +#include +#include + +#include "absl/strings/str_cat.h" + #include #include #include -#include #include "test/core/util/port.h" #include "test/cpp/util/test_config.h" @@ -42,15 +46,9 @@ int test_client(const char* root, const char* host, int port) { pid_t cli; cli = fork(); if (cli == 0) { - char* binary_path; - char* port_arg; - gpr_asprintf(&binary_path, "%s/interop_client", root); - gpr_asprintf(&port_arg, "--server_port=%d", port); - - execl(binary_path, binary_path, port_arg, NULL); - - gpr_free(binary_path); - gpr_free(port_arg); + std::string binary_path = absl::StrCat(root, "/interop_client"); + std::string port_arg = absl::StrCat("--server_port=", port); + execl(binary_path.c_str(), binary_path.c_str(), port_arg.c_str(), NULL); return 1; } /* wait for client */ @@ -88,19 +86,16 @@ int main(int argc, char** argv) { /* start the server */ svr = fork(); if (svr == 0) { - const size_t num_args = 3 + !FLAGS_extra_server_flags.empty(); - char** args = (char**)gpr_malloc(sizeof(char*) * num_args); - memset(args, 0, sizeof(char*) * num_args); - gpr_asprintf(&args[0], "%s/interop_server", root); - gpr_asprintf(&args[1], "--port=%d", port); + std::vector args; + std::string command = absl::StrCat(root, "/interop_server"); + args.push_back(const_cast(command.c_str())); + std::string port_arg = absl::StrCat("--port=", port); + args.push_back(const_cast(port_arg.c_str())); if (!FLAGS_extra_server_flags.empty()) { - args[2] = gpr_strdup(FLAGS_extra_server_flags.c_str()); - } - execv(args[0], args); - for (size_t i = 0; i < num_args - 1; ++i) { - gpr_free(args[i]); + args.push_back(const_cast(FLAGS_extra_server_flags.c_str())); } - gpr_free(args); + args.push_back(nullptr); + execv(args[0], args.data()); return 1; } /* wait a little */ diff --git a/test/cpp/naming/cancel_ares_query_test.cc b/test/cpp/naming/cancel_ares_query_test.cc index c367dfdb2e7..6de84f10a5b 100644 --- a/test/cpp/naming/cancel_ares_query_test.cc +++ b/test/cpp/naming/cancel_ares_query_test.cc @@ -19,6 +19,11 @@ #include #include +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include @@ -27,7 +32,7 @@ #include #include #include -#include "include/grpc/support/string_util.h" + #include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.h" #include "src/core/ext/filters/client_channel/resolver_registry.h" @@ -154,18 +159,15 @@ class AssertFailureResultHandler : public grpc_core::Resolver::ResultHandler { void TestCancelActiveDNSQuery(ArgsStruct* args) { int fake_dns_port = grpc_pick_unused_port_or_die(); grpc::testing::FakeNonResponsiveDNSServer fake_dns_server(fake_dns_port); - char* client_target; - GPR_ASSERT(gpr_asprintf( - &client_target, + std::string client_target = absl::StrFormat( "dns://[::1]:%d/dont-care-since-wont-be-resolved.test.com:1234", - fake_dns_port)); + fake_dns_port); // create resolver and resolve grpc_core::OrphanablePtr resolver = grpc_core::ResolverRegistry::CreateResolver( - client_target, nullptr, args->pollset_set, args->lock, + client_target.c_str(), nullptr, args->pollset_set, args->lock, std::unique_ptr( new AssertFailureResultHandler(args))); - gpr_free(client_target); resolver->StartLocked(); // Without resetting and causing resolver shutdown, the // PollPollsetUntilRequestDone call should never finish. @@ -278,11 +280,9 @@ void TestCancelDuringActiveQuery( int fake_dns_port = grpc_pick_unused_port_or_die(); grpc::testing::FakeNonResponsiveDNSServer fake_dns_server(fake_dns_port); // Create a call that will try to use the fake DNS server - char* client_target = nullptr; - GPR_ASSERT(gpr_asprintf( - &client_target, + std::string client_target = absl::StrFormat( "dns://[::1]:%d/dont-care-since-wont-be-resolved.test.com:1234", - fake_dns_port)); + fake_dns_port); gpr_log(GPR_DEBUG, "TestCancelActiveDNSQuery. query timeout setting: %d", query_timeout_setting); grpc_channel_args* client_args = nullptr; @@ -309,8 +309,7 @@ void TestCancelDuringActiveQuery( abort(); } grpc_channel* client = - grpc_insecure_channel_create(client_target, client_args, nullptr); - gpr_free(client_target); + grpc_insecure_channel_create(client_target.c_str(), client_args, nullptr); grpc_completion_queue* cq = grpc_completion_queue_create_for_next(nullptr); cq_verifier* cqv = cq_verifier_create(cq); gpr_timespec deadline = grpc_timeout_milliseconds_to_deadline(100); diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index cb065a3cb75..a1d52d5a669 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -18,23 +18,27 @@ #include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "absl/strings/str_cat.h" +#include "absl/strings/str_format.h" + #include #include #include #include -#include #include #include -#include - -#include -#include -#include -#include -#include -#include - #include "test/cpp/util/subprocess.h" #include "test/cpp/util/test_config.h" @@ -578,7 +582,7 @@ void RunResolvesRelevantRecordsTest( args.expected_service_config_error = FLAGS_expected_service_config_error; args.expected_lb_policy = FLAGS_expected_lb_policy; // maybe build the address with an authority - char* whole_uri = nullptr; + std::string whole_uri; gpr_log(GPR_DEBUG, "resolver_component_test: --inject_broken_nameserver_list: %s", FLAGS_inject_broken_nameserver_list.c_str()); @@ -590,14 +594,12 @@ void RunResolvesRelevantRecordsTest( new grpc::testing::FakeNonResponsiveDNSServer( g_fake_non_responsive_dns_server_port)); grpc_ares_test_only_inject_config = InjectBrokenNameServerList; - GPR_ASSERT( - gpr_asprintf(&whole_uri, "dns:///%s", FLAGS_target_name.c_str())); + whole_uri = absl::StrCat("dns:///", FLAGS_target_name); } else if (FLAGS_inject_broken_nameserver_list == "False") { gpr_log(GPR_INFO, "Specifying authority in uris to: %s", FLAGS_local_dns_server_address.c_str()); - GPR_ASSERT(gpr_asprintf(&whole_uri, "dns://%s/%s", - FLAGS_local_dns_server_address.c_str(), - FLAGS_target_name.c_str())); + whole_uri = absl::StrFormat("dns://%s/%s", FLAGS_local_dns_server_address, + FLAGS_target_name); } else { gpr_log(GPR_DEBUG, "Invalid value for --inject_broken_nameserver_list."); abort(); @@ -639,11 +641,10 @@ void RunResolvesRelevantRecordsTest( } // create resolver and resolve grpc_core::OrphanablePtr resolver = - grpc_core::ResolverRegistry::CreateResolver(whole_uri, resolver_args, - args.pollset_set, args.lock, - CreateResultHandler(&args)); + grpc_core::ResolverRegistry::CreateResolver( + whole_uri.c_str(), resolver_args, args.pollset_set, args.lock, + CreateResultHandler(&args)); grpc_channel_args_destroy(resolver_args); - gpr_free(whole_uri); auto* resolver_ptr = resolver.get(); args.lock->Run([resolver_ptr]() { StartResolvingLocked(resolver_ptr); }, DEBUG_LOCATION); From a80bb13fd020116db9f352459cf1c9a60fb92f7a Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 7 Jul 2020 12:32:52 -0700 Subject: [PATCH 214/239] Fix FailHijackedRecvMessage for generic async APIs --- include/grpcpp/impl/codegen/call_op_set.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpcpp/impl/codegen/call_op_set.h b/include/grpcpp/impl/codegen/call_op_set.h index 46073746604..3d06a44889c 100644 --- a/include/grpcpp/impl/codegen/call_op_set.h +++ b/include/grpcpp/impl/codegen/call_op_set.h @@ -548,7 +548,7 @@ class CallOpGenericRecvMessage { } void FinishOp(bool* status) { - if (!deserialize_ || hijacked_) return; + if (!deserialize_) return; if (recv_buf_.Valid()) { if (*status) { got_message = true; From 3c2354f62a1f1f0163a415a40d1fbbdab1940979 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Fri, 13 Mar 2020 14:40:32 -0700 Subject: [PATCH 215/239] Update grpclb with optional field "name" --- .../client_channel/lb_policy/grpclb/grpclb.cc | 42 +++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index c39bf8e28be..9ee850dcea2 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -130,16 +130,20 @@ constexpr char kGrpclb[] = "grpclb"; class GrpcLbConfig : public LoadBalancingPolicy::Config { public: - explicit GrpcLbConfig(RefCountedPtr child_policy) - : child_policy_(std::move(child_policy)) {} + GrpcLbConfig(RefCountedPtr child_policy, + const std::string& target_name) + : child_policy_(std::move(child_policy)), target_name_(target_name) {} const char* name() const override { return kGrpclb; } RefCountedPtr child_policy() const { return child_policy_; } + const std::string& target_name() const { return target_name_; } + private: RefCountedPtr child_policy_; + std::string target_name_; }; class GrpcLb : public LoadBalancingPolicy { @@ -369,6 +373,9 @@ class GrpcLb : public LoadBalancingPolicy { // Who the client is trying to communicate with. const char* server_name_ = nullptr; + // The target name from configuration; if set, it overrides server_name_ in + // the balancer requests. + const char* target_name_ = nullptr; // Current channel args from the resolver. grpc_channel_args* args_ = nullptr; @@ -761,8 +768,9 @@ GrpcLb::BalancerCallState::BalancerCallState( nullptr, deadline, nullptr); // Init the LB call request payload. upb::Arena arena; - grpc_slice request_payload_slice = - GrpcLbRequestCreate(grpclb_policy()->server_name_, arena.ptr()); + grpc_slice request_payload_slice = GrpcLbRequestCreate( + grpclb_policy()->target_name_ ?: grpclb_policy()->server_name_, + arena.ptr()); send_message_payload_ = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_slice_unref_internal(request_payload_slice); @@ -1344,6 +1352,7 @@ GrpcLb::GrpcLb(Args args) GrpcLb::~GrpcLb() { gpr_free((void*)server_name_); + if (target_name_ != nullptr) gpr_free((void*)target_name_); grpc_channel_args_destroy(args_); } @@ -1391,8 +1400,14 @@ void GrpcLb::UpdateLocked(UpdateArgs args) { auto* grpclb_config = static_cast(args.config.get()); if (grpclb_config != nullptr) { child_policy_config_ = grpclb_config->child_policy(); + if (grpclb_config->target_name().length() > 0) { + target_name_ = gpr_strdup(grpclb_config->target_name().c_str()); + } else { + target_name_ = nullptr; + } } else { child_policy_config_ = nullptr; + target_name_ = nullptr; } ProcessAddressesAndChannelArgsLocked(args.addresses, *args.args); // Update the existing child policy. @@ -1678,12 +1693,23 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory { const Json& json, grpc_error** error) const override { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); if (json.type() == Json::Type::JSON_NULL) { - return MakeRefCounted(nullptr); + return MakeRefCounted(nullptr, nullptr); } std::vector error_list; Json child_policy_config_json_tmp; const Json* child_policy_config_json; - auto it = json.object_value().find("childPolicy"); + const std::string* target_name_ptr = nullptr; + auto it = json.object_value().find("targetName"); + if (it != json.object_value().end()) { + const Json& target_name_json = it->second; + if (target_name_json.type() != Json::Type::STRING) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "targetname filed is not string")); + } else { + target_name_ptr = &target_name_json.string_value(); + } + } + it = json.object_value().find("childPolicy"); if (it == json.object_value().end()) { child_policy_config_json_tmp = Json::Array{Json::Object{ {"round_robin", Json::Object()}, @@ -1703,7 +1729,9 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory { GRPC_ERROR_CREATE_FROM_VECTOR("field:childPolicy", &child_errors)); } if (error_list.empty()) { - return MakeRefCounted(std::move(child_policy_config)); + return MakeRefCounted( + std::move(child_policy_config), + target_name_ptr == nullptr ? std::string() : *target_name_ptr); } else { *error = GRPC_ERROR_CREATE_FROM_VECTOR("GrpcLb Parser", &error_list); return nullptr; From 3f684093d75fc620ea0008d5adeccf91b65269cb Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 6 May 2020 17:33:27 -0700 Subject: [PATCH 216/239] Add test for the new config field --- test/cpp/end2end/grpclb_end2end_test.cc | 61 +++++++++++++++++++------ 1 file changed, 48 insertions(+), 13 deletions(-) diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index a6a7d3697b6..0ed90e85673 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -212,7 +212,11 @@ struct ClientStats { class BalancerServiceImpl : public BalancerService { public: using Stream = ServerReaderWriter; - using ResponseDelayPair = std::pair; + struct ResponseConfig { + LoadBalanceResponse response; + int delay_ms; + std::string for_target; + }; explicit BalancerServiceImpl(int client_load_reporting_interval_seconds) : client_load_reporting_interval_seconds_( @@ -229,10 +233,15 @@ class BalancerServiceImpl : public BalancerService { EXPECT_EQ(context->client_metadata().find(g_kCallCredsMdKey), context->client_metadata().end()); LoadBalanceRequest request; - std::vector responses_and_delays; + std::string target; + std::vector response_configs; if (!stream->Read(&request)) { goto done; + } else { + if (request.has_initial_request()) { + target = request.initial_request().name(); + } } IncreaseRequestCount(); gpr_log(GPR_INFO, "LB[%p]: received initial message '%s'", this, @@ -249,11 +258,14 @@ class BalancerServiceImpl : public BalancerService { { grpc::internal::MutexLock lock(&mu_); - responses_and_delays = responses_and_delays_; + response_configs = response_configs_; } - for (const auto& response_and_delay : responses_and_delays) { - SendResponse(stream, response_and_delay.first, - response_and_delay.second); + for (const auto& response_config : response_configs) { + if (response_config.for_target.empty() || + response_config.for_target == target) { + SendResponse(stream, response_config.response, + response_config.delay_ms); + } } { grpc::internal::MutexLock lock(&mu_); @@ -295,16 +307,16 @@ class BalancerServiceImpl : public BalancerService { return Status::OK; } - void add_response(const LoadBalanceResponse& response, int send_after_ms) { + void add_response(const LoadBalanceResponse& response, int send_after_ms, + std::string for_target = "") { grpc::internal::MutexLock lock(&mu_); - responses_and_delays_.push_back(std::make_pair(response, send_after_ms)); + response_configs_.push_back({response, send_after_ms, for_target}); } void Start() { grpc::internal::MutexLock lock(&mu_); serverlist_done_ = false; - responses_and_delays_.clear(); - load_report_queue_.clear(); + response_configs_.clear(); } void Shutdown() { @@ -372,7 +384,7 @@ class BalancerServiceImpl : public BalancerService { } const int client_load_reporting_interval_seconds_; - std::vector responses_and_delays_; + std::vector response_configs_; grpc::internal::Mutex mu_; grpc::internal::CondVar serverlist_cond_; @@ -613,8 +625,8 @@ class GrpclbEnd2endTest : public ::testing::Test { void ScheduleResponseForBalancer(size_t i, const LoadBalanceResponse& response, - int delay_ms) { - balancers_[i]->service_.add_response(response, delay_ms); + int delay_ms, std::string target = "") { + balancers_[i]->service_.add_response(response, delay_ms, target); } Status SendRpc(EchoResponse* response = nullptr, int timeout_ms = 1000, @@ -1383,6 +1395,29 @@ TEST_F(SingleBalancerTest, BackendsRestart) { EXPECT_EQ(1U, balancers_[0]->service_.response_count()); } +TEST_F(SingleBalancerTest, TargetFromLbPolicyConfig) { + constexpr char kServiceConfigWithTarget[] = + "{\n" + " \"loadBalancingConfig\":[\n" + " { \"grpclb\":{\n" + " \"targetName\":\"test_target\"\n" + " }}\n" + " ]\n" + "}"; + + SetNextResolutionAllBalancers(kServiceConfigWithTarget); + const size_t kNumRpcsPerAddress = 1; + ScheduleResponseForBalancer( + 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), + 0, "test_target"); + // Make sure that trying to connect works without a call. + channel_->GetState(true /* try_to_connect */); + // We need to wait for all backends to come online. + WaitForAllBackends(); + // Send kNumRpcsPerAddress RPCs per server. + CheckRpcSendOk(kNumRpcsPerAddress * num_backends_); +} + class UpdatesTest : public GrpclbEnd2endTest { public: UpdatesTest() : GrpclbEnd2endTest(4, 3, 0) {} From ec2cd96426725c8682a08485435ac31bbfa61db9 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 7 May 2020 10:22:49 -0700 Subject: [PATCH 217/239] Address comments --- .../client_channel/lb_policy/grpclb/grpclb.cc | 43 ++++++++----------- test/cpp/end2end/grpclb_end2end_test.cc | 2 +- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 9ee850dcea2..66ad37db134 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -131,8 +131,9 @@ constexpr char kGrpclb[] = "grpclb"; class GrpcLbConfig : public LoadBalancingPolicy::Config { public: GrpcLbConfig(RefCountedPtr child_policy, - const std::string& target_name) - : child_policy_(std::move(child_policy)), target_name_(target_name) {} + std::string target_name) + : child_policy_(std::move(child_policy)), + target_name_(std::move(target_name)) {} const char* name() const override { return kGrpclb; } RefCountedPtr child_policy() const { @@ -375,7 +376,7 @@ class GrpcLb : public LoadBalancingPolicy { const char* server_name_ = nullptr; // The target name from configuration; if set, it overrides server_name_ in // the balancer requests. - const char* target_name_ = nullptr; + std::string target_name_; // Current channel args from the resolver. grpc_channel_args* args_ = nullptr; @@ -768,9 +769,11 @@ GrpcLb::BalancerCallState::BalancerCallState( nullptr, deadline, nullptr); // Init the LB call request payload. upb::Arena arena; - grpc_slice request_payload_slice = GrpcLbRequestCreate( - grpclb_policy()->target_name_ ?: grpclb_policy()->server_name_, - arena.ptr()); + grpc_slice request_payload_slice = + GrpcLbRequestCreate(grpclb_policy()->target_name_.empty() + ? grpclb_policy()->server_name_ + : grpclb_policy()->target_name_.c_str(), + arena.ptr()); send_message_payload_ = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_slice_unref_internal(request_payload_slice); @@ -1352,7 +1355,6 @@ GrpcLb::GrpcLb(Args args) GrpcLb::~GrpcLb() { gpr_free((void*)server_name_); - if (target_name_ != nullptr) gpr_free((void*)target_name_); grpc_channel_args_destroy(args_); } @@ -1398,17 +1400,9 @@ void GrpcLb::ResetBackoffLocked() { void GrpcLb::UpdateLocked(UpdateArgs args) { const bool is_initial_update = lb_channel_ == nullptr; auto* grpclb_config = static_cast(args.config.get()); - if (grpclb_config != nullptr) { - child_policy_config_ = grpclb_config->child_policy(); - if (grpclb_config->target_name().length() > 0) { - target_name_ = gpr_strdup(grpclb_config->target_name().c_str()); - } else { - target_name_ = nullptr; - } - } else { - child_policy_config_ = nullptr; - target_name_ = nullptr; - } + GPR_ASSERT(grpclb_config != nullptr); + child_policy_config_ = grpclb_config->child_policy(); + target_name_ = grpclb_config->target_name(); ProcessAddressesAndChannelArgsLocked(args.addresses, *args.args); // Update the existing child policy. if (child_policy_ != nullptr) CreateOrUpdateChildPolicyLocked(); @@ -1698,15 +1692,15 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory { std::vector error_list; Json child_policy_config_json_tmp; const Json* child_policy_config_json; - const std::string* target_name_ptr = nullptr; - auto it = json.object_value().find("targetName"); + std::string target_name; + auto it = json.object_value().find("serviceName"); if (it != json.object_value().end()) { const Json& target_name_json = it->second; if (target_name_json.type() != Json::Type::STRING) { error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( - "targetname filed is not string")); + "field:serviceName error:type should be string")); } else { - target_name_ptr = &target_name_json.string_value(); + target_name = target_name_json.string_value(); } } it = json.object_value().find("childPolicy"); @@ -1729,9 +1723,8 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory { GRPC_ERROR_CREATE_FROM_VECTOR("field:childPolicy", &child_errors)); } if (error_list.empty()) { - return MakeRefCounted( - std::move(child_policy_config), - target_name_ptr == nullptr ? std::string() : *target_name_ptr); + return MakeRefCounted(std::move(child_policy_config), + target_name); } else { *error = GRPC_ERROR_CREATE_FROM_VECTOR("GrpcLb Parser", &error_list); return nullptr; diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 0ed90e85673..0572edf1f4c 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -1400,7 +1400,7 @@ TEST_F(SingleBalancerTest, TargetFromLbPolicyConfig) { "{\n" " \"loadBalancingConfig\":[\n" " { \"grpclb\":{\n" - " \"targetName\":\"test_target\"\n" + " \"serviceName\":\"test_target\"\n" " }}\n" " ]\n" "}"; From 8dd0cb47128739ddc24842a530066e0b3e32c6f0 Mon Sep 17 00:00:00 2001 From: Donna Dionne Date: Tue, 7 Jul 2020 13:17:25 -0700 Subject: [PATCH 218/239] Add support for xDS regex matchers. --- .clang_complete | 1 + .gitmodules | 3 + BUILD | 1 + CMakeLists.txt | 330 +++++++++++++++++- Makefile | 264 +++++++++----- bazel/grpc_deps.bzl | 16 + build_handwritten.yaml | 5 +- cmake/gRPCConfig.cmake.in | 1 + cmake/re2.cmake | 54 +++ config.m4 | 1 + config.w32 | 1 + .../cmake_externalproject/CMakeLists.txt | 14 +- gRPC-C++.podspec | 57 ++- gRPC-Core.podspec | 80 ++++- grpc.gyp | 34 ++ setup.py | 3 +- .../lb_policy/xds/xds_routing.cc | 46 ++- .../ext/filters/client_channel/xds/xds_api.cc | 40 ++- .../ext/filters/client_channel/xds/xds_api.h | 16 +- .../filters/client_channel/xds/xds_client.cc | 11 + src/python/grpcio/grpc_core_dependencies.py | 23 ++ src/re2/gen_build_yaml.py | 49 +++ templates/CMakeLists.txt.template | 11 +- templates/Makefile.template | 17 +- templates/config.m4.template | 1 + templates/config.w32.template | 1 + templates/gRPC-C++.podspec.template | 12 +- templates/gRPC-Core.podspec.template | 12 +- test/cpp/end2end/xds_end2end_test.cc | 120 ++++++- test/distrib/cpp/run_distrib_test_cmake.bat | 8 + test/distrib/cpp/run_distrib_test_cmake.sh | 8 + .../cpp/run_distrib_test_cmake_pkgconfig.sh | 8 + third_party/re2 | 1 + tools/buildgen/generate_build_additions.sh | 1 + .../run_tests/sanity/check_bazel_workspace.py | 1 + tools/run_tests/sanity/check_submodules.sh | 1 + 36 files changed, 1133 insertions(+), 119 deletions(-) create mode 100644 cmake/re2.cmake create mode 100755 src/re2/gen_build_yaml.py create mode 160000 third_party/re2 diff --git a/.clang_complete b/.clang_complete index 4da3376ace6..2769e899722 100644 --- a/.clang_complete +++ b/.clang_complete @@ -15,5 +15,6 @@ -Ithird_party/googletest/googletest/include -Ithird_party/googletest/include -Ithird_party/protobuf/src +-Ithird_party/re2 -Ithird_party/upb -Ithird_party/zlib diff --git a/.gitmodules b/.gitmodules index aefc8f9442f..dbcc0ae579f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,6 +20,9 @@ [submodule "third_party/boringssl-with-bazel"] path = third_party/boringssl-with-bazel url = https://github.com/google/boringssl.git +[submodule "third_party/re2"] + path = third_party/re2 + url = git://github.com/google/re2.git [submodule "third_party/cares/cares"] path = third_party/cares/cares url = https://github.com/c-ares/c-ares.git diff --git a/BUILD b/BUILD index 493356dc5c1..48fa1dfdb4a 100644 --- a/BUILD +++ b/BUILD @@ -1300,6 +1300,7 @@ grpc_cc_library( external_deps = [ "upb_lib", "upb_textformat_lib", + "re2", ], language = "c++", deps = [ diff --git a/CMakeLists.txt b/CMakeLists.txt index 317450d55b1..61842a31b40 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,9 @@ set_property(CACHE gRPC_ZLIB_PROVIDER PROPERTY STRINGS "module" "package") set(gRPC_CARES_PROVIDER "module" CACHE STRING "Provider of c-ares library") set_property(CACHE gRPC_CARES_PROVIDER PROPERTY STRINGS "module" "package") +set(gRPC_RE2_PROVIDER "module" CACHE STRING "Provider of re2 library") +set_property(CACHE gRPC_RE2_PROVIDER PROPERTY STRINGS "module" "package") + set(gRPC_SSL_PROVIDER "module" CACHE STRING "Provider of ssl library") set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package") @@ -222,6 +225,7 @@ include(cmake/benchmark.cmake) include(cmake/cares.cmake) include(cmake/gflags.cmake) include(cmake/protobuf.cmake) +include(cmake/re2.cmake) include(cmake/ssl.cmake) include(cmake/upb.cmake) include(cmake/zlib.cmake) @@ -888,6 +892,7 @@ target_include_directories(address_sorting PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -1023,6 +1028,7 @@ target_include_directories(end2end_nosec_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -1155,6 +1161,7 @@ target_include_directories(end2end_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -1239,6 +1246,7 @@ target_include_directories(gpr PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -1827,6 +1835,7 @@ target_include_directories(grpc PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -1839,6 +1848,7 @@ target_link_libraries(grpc ${_gRPC_ZLIB_LIBRARIES} ${_gRPC_CARES_LIBRARIES} ${_gRPC_ADDRESS_SORTING_LIBRARIES} + ${_gRPC_RE2_LIBRARIES} ${_gRPC_UPB_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} gpr @@ -1911,6 +1921,7 @@ target_include_directories(grpc_csharp_ext PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -1973,6 +1984,7 @@ target_include_directories(grpc_test_util PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -2038,6 +2050,7 @@ target_include_directories(grpc_test_util_unsecure PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -2491,6 +2504,7 @@ target_include_directories(grpc_unsecure PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -2502,6 +2516,7 @@ target_link_libraries(grpc_unsecure ${_gRPC_ZLIB_LIBRARIES} ${_gRPC_CARES_LIBRARIES} ${_gRPC_ADDRESS_SORTING_LIBRARIES} + ${_gRPC_RE2_LIBRARIES} ${_gRPC_UPB_LIBRARIES} ${_gRPC_ALLTARGETS_LIBRARIES} gpr @@ -2587,6 +2602,7 @@ target_include_directories(benchmark_helpers PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -2687,6 +2703,7 @@ target_include_directories(grpc++ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -2957,6 +2974,7 @@ target_include_directories(grpc++_alts PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3026,6 +3044,7 @@ target_include_directories(grpc++_error_details PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3099,6 +3118,7 @@ target_include_directories(grpc++_reflection PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3167,6 +3187,7 @@ target_include_directories(grpc++_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3232,6 +3253,7 @@ target_include_directories(grpc++_test_config PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3287,6 +3309,7 @@ target_include_directories(grpc++_test_util PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3377,6 +3400,7 @@ target_include_directories(grpc++_unsecure PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3652,6 +3676,7 @@ target_include_directories(grpc_plugin_support PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3719,6 +3744,7 @@ target_include_directories(grpcpp_channelz PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3807,6 +3833,7 @@ target_include_directories(upb PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3838,6 +3865,7 @@ target_include_directories(check_epollexclusive ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3862,6 +3890,7 @@ target_include_directories(gen_hpack_tables ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3888,6 +3917,7 @@ target_include_directories(gen_legal_metadata_characters ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3912,6 +3942,7 @@ target_include_directories(gen_percent_encoding_tables ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3937,6 +3968,7 @@ target_include_directories(algorithm_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3966,6 +3998,7 @@ target_include_directories(alloc_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -3995,6 +4028,7 @@ target_include_directories(alpn_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4025,6 +4059,7 @@ target_include_directories(alts_counter_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4055,6 +4090,7 @@ target_include_directories(alts_crypt_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4085,6 +4121,7 @@ target_include_directories(alts_crypter_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4116,6 +4153,7 @@ target_include_directories(alts_frame_protector_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4146,6 +4184,7 @@ target_include_directories(alts_grpc_record_protocol_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4176,6 +4215,7 @@ target_include_directories(alts_handshaker_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4206,6 +4246,7 @@ target_include_directories(alts_iovec_record_protocol_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4235,6 +4276,7 @@ target_include_directories(alts_security_connector_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4265,6 +4307,7 @@ target_include_directories(alts_tsi_handshaker_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4295,6 +4338,7 @@ target_include_directories(alts_tsi_utils_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4325,6 +4369,7 @@ target_include_directories(alts_zero_copy_grpc_protector_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4354,6 +4399,7 @@ target_include_directories(arena_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4383,6 +4429,7 @@ target_include_directories(auth_context_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4412,6 +4459,7 @@ target_include_directories(avl_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4441,6 +4489,7 @@ target_include_directories(b64_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4471,6 +4520,7 @@ target_include_directories(bad_server_response_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4502,6 +4552,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4534,6 +4585,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4564,6 +4616,7 @@ target_include_directories(bin_decoder_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4593,6 +4646,7 @@ target_include_directories(bin_encoder_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4622,6 +4676,7 @@ target_include_directories(buffer_list_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4651,6 +4706,7 @@ target_include_directories(channel_args_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4680,6 +4736,7 @@ target_include_directories(channel_create_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4709,6 +4766,7 @@ target_include_directories(channel_stack_builder_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4738,6 +4796,7 @@ target_include_directories(channel_stack_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4767,6 +4826,7 @@ target_include_directories(check_gcp_environment_linux_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4796,6 +4856,7 @@ target_include_directories(check_gcp_environment_windows_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4826,6 +4887,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4856,6 +4918,7 @@ target_include_directories(cmdline_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4886,6 +4949,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4916,6 +4980,7 @@ target_include_directories(completion_queue_threading_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4945,6 +5010,7 @@ target_include_directories(compression_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -4974,6 +5040,7 @@ target_include_directories(concurrent_connectivity_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5004,6 +5071,7 @@ target_include_directories(connection_refused_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5033,6 +5101,7 @@ target_include_directories(cpu_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5062,6 +5131,7 @@ target_include_directories(dns_resolver_connectivity_using_ares_resolver_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5091,6 +5161,7 @@ target_include_directories(dns_resolver_connectivity_using_native_resolver_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5120,6 +5191,7 @@ target_include_directories(dns_resolver_cooldown_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5149,6 +5221,7 @@ target_include_directories(dns_resolver_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5180,6 +5253,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5211,6 +5285,7 @@ target_include_directories(endpoint_pair_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5240,6 +5315,7 @@ target_include_directories(env_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5270,6 +5346,7 @@ target_include_directories(error_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5300,6 +5377,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5330,6 +5408,7 @@ target_include_directories(fake_resolver_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5360,6 +5439,7 @@ target_include_directories(fake_transport_security_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5390,6 +5470,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5421,6 +5502,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5456,6 +5538,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5491,6 +5574,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5522,6 +5606,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5556,6 +5641,7 @@ target_include_directories(format_request_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5586,6 +5672,7 @@ target_include_directories(frame_handler_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5616,6 +5703,7 @@ target_include_directories(goaway_server_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5645,6 +5733,7 @@ target_include_directories(grpc_alts_credentials_options_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5674,6 +5763,7 @@ target_include_directories(grpc_byte_buffer_reader_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5703,6 +5793,7 @@ target_include_directories(grpc_completion_queue_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5732,6 +5823,7 @@ target_include_directories(grpc_ipv6_loopback_available_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5763,6 +5855,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5794,6 +5887,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5824,6 +5918,7 @@ target_include_directories(histogram_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5853,6 +5948,7 @@ target_include_directories(host_port_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5882,6 +5978,7 @@ target_include_directories(hpack_encoder_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5911,6 +6008,7 @@ target_include_directories(hpack_parser_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5940,6 +6038,7 @@ target_include_directories(hpack_table_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -5974,6 +6073,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6009,6 +6109,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6039,6 +6140,7 @@ target_include_directories(init_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6068,6 +6170,7 @@ target_include_directories(inproc_callback_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6099,6 +6202,7 @@ target_include_directories(invalid_call_argument_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6128,6 +6232,7 @@ target_include_directories(json_token_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6157,6 +6262,7 @@ target_include_directories(jwt_verifier_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6187,6 +6293,7 @@ target_include_directories(lame_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6216,6 +6323,7 @@ target_include_directories(load_file_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6245,6 +6353,7 @@ target_include_directories(log_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6274,6 +6383,7 @@ target_include_directories(manual_constructor_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6303,6 +6413,7 @@ target_include_directories(message_compress_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6332,6 +6443,7 @@ target_include_directories(metadata_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6361,6 +6473,7 @@ target_include_directories(minimal_stack_is_minimal_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6390,6 +6503,7 @@ target_include_directories(mpmcqueue_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6420,6 +6534,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6451,6 +6566,7 @@ target_include_directories(multiple_server_queues_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6480,6 +6596,7 @@ target_include_directories(murmur_hash_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6510,6 +6627,7 @@ target_include_directories(no_server_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6539,6 +6657,7 @@ target_include_directories(num_external_connectivity_watchers_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6568,6 +6687,7 @@ target_include_directories(parse_address_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6598,6 +6718,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6632,6 +6753,7 @@ target_include_directories(parser_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6661,6 +6783,7 @@ target_include_directories(percent_encoding_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6690,6 +6813,7 @@ target_include_directories(public_headers_must_be_c89 ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6720,6 +6844,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6750,6 +6875,7 @@ target_include_directories(resolve_address_using_ares_resolver_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6780,6 +6906,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6810,6 +6937,7 @@ target_include_directories(resolve_address_using_native_resolver_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6839,6 +6967,7 @@ target_include_directories(resource_quota_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6868,6 +6997,7 @@ target_include_directories(secure_channel_create_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6898,6 +7028,7 @@ target_include_directories(secure_endpoint_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6927,6 +7058,7 @@ target_include_directories(security_connector_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6956,6 +7088,7 @@ target_include_directories(sequential_connectivity_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -6987,6 +7120,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7017,6 +7151,7 @@ target_include_directories(server_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7046,6 +7181,7 @@ target_include_directories(slice_buffer_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7075,6 +7211,7 @@ target_include_directories(slice_string_helpers_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7104,6 +7241,7 @@ target_include_directories(sockaddr_resolver_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7133,6 +7271,7 @@ target_include_directories(sockaddr_utils_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7163,6 +7302,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7193,6 +7333,7 @@ target_include_directories(spinlock_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7222,6 +7363,7 @@ target_include_directories(ssl_credentials_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7253,6 +7395,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7283,6 +7426,7 @@ target_include_directories(status_conversion_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7312,6 +7456,7 @@ target_include_directories(stream_compression_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7341,6 +7486,7 @@ target_include_directories(stream_map_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7370,6 +7516,7 @@ target_include_directories(stream_owned_slice_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7399,6 +7546,7 @@ target_include_directories(string_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7428,6 +7576,7 @@ target_include_directories(sync_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7458,6 +7607,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7490,6 +7640,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7521,6 +7672,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7551,6 +7703,7 @@ target_include_directories(test_core_gpr_time_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7580,6 +7733,7 @@ target_include_directories(test_core_security_credentials_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7609,6 +7763,7 @@ target_include_directories(test_core_slice_slice_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7638,6 +7793,7 @@ target_include_directories(thd_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7667,6 +7823,7 @@ target_include_directories(threadpool_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7696,6 +7853,7 @@ target_include_directories(time_averaged_stats_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7725,6 +7883,7 @@ target_include_directories(timeout_encoding_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7754,6 +7913,7 @@ target_include_directories(timer_heap_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7783,6 +7943,7 @@ target_include_directories(timer_list_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7812,6 +7973,7 @@ target_include_directories(tls_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7841,6 +8003,7 @@ target_include_directories(transport_security_common_api_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7870,6 +8033,7 @@ target_include_directories(transport_security_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7900,6 +8064,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7930,6 +8095,7 @@ target_include_directories(uri_parser_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7959,6 +8125,7 @@ target_include_directories(useful_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -7988,6 +8155,7 @@ target_include_directories(varint_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8020,6 +8188,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8066,6 +8235,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8108,6 +8278,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8159,6 +8330,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8199,6 +8371,7 @@ target_include_directories(alts_util_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8260,6 +8433,7 @@ target_include_directories(async_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8300,6 +8474,7 @@ target_include_directories(auth_property_iterator_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8340,6 +8515,7 @@ target_include_directories(backoff_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8380,6 +8556,7 @@ target_include_directories(bad_streaming_id_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8420,6 +8597,7 @@ target_include_directories(badreq_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8459,6 +8637,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8499,6 +8678,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8543,6 +8723,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8587,6 +8768,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8631,6 +8813,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8679,6 +8862,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8727,6 +8911,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8771,6 +8956,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8815,6 +9001,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8859,6 +9046,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8903,6 +9091,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8947,6 +9136,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -8991,6 +9181,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9035,6 +9226,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9079,6 +9271,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9123,6 +9316,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9167,6 +9361,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9211,6 +9406,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9255,6 +9451,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9299,6 +9496,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9343,6 +9541,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9387,6 +9586,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9430,6 +9630,7 @@ target_include_directories(byte_buffer_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9470,6 +9671,7 @@ target_include_directories(byte_stream_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9510,6 +9712,7 @@ target_include_directories(cancel_ares_query_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9564,6 +9767,7 @@ target_include_directories(cfstream_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9604,6 +9808,7 @@ target_include_directories(channel_arguments_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9643,6 +9848,7 @@ target_include_directories(channel_filter_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9687,6 +9893,7 @@ target_include_directories(channel_trace_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9726,6 +9933,7 @@ target_include_directories(channelz_registry_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9778,6 +9986,7 @@ target_include_directories(channelz_service_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9824,6 +10033,7 @@ target_include_directories(channelz_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9885,6 +10095,7 @@ target_include_directories(cli_call_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -9939,6 +10150,7 @@ target_include_directories(client_callback_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10001,6 +10213,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10056,6 +10269,7 @@ target_include_directories(client_interceptors_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10119,6 +10333,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10160,6 +10375,7 @@ target_include_directories(codegen_test_full ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10199,6 +10415,7 @@ target_include_directories(codegen_test_minimal ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10240,6 +10457,7 @@ target_include_directories(connection_prefix_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10278,6 +10496,7 @@ target_include_directories(connectivity_state_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10316,6 +10535,7 @@ target_include_directories(context_list_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10367,6 +10587,7 @@ target_include_directories(delegating_channel_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10407,6 +10628,7 @@ target_include_directories(destroy_grpclb_channel_with_active_connect_stress_tes ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10449,6 +10671,7 @@ target_include_directories(duplicate_header_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10505,6 +10728,7 @@ target_include_directories(end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10550,6 +10774,7 @@ target_include_directories(error_details_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10590,6 +10815,7 @@ target_include_directories(eventmanager_libuv_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10640,6 +10866,7 @@ target_include_directories(exception_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10696,6 +10923,7 @@ target_include_directories(filter_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10749,6 +10977,7 @@ target_include_directories(flaky_network_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10805,6 +11034,7 @@ target_include_directories(generic_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10846,6 +11076,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10885,6 +11116,7 @@ target_include_directories(global_config_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10933,6 +11165,7 @@ target_include_directories(grpc_cli ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -10970,6 +11203,7 @@ target_include_directories(grpc_cpp_plugin ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11007,6 +11241,7 @@ target_include_directories(grpc_csharp_plugin ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11044,6 +11279,7 @@ target_include_directories(grpc_node_plugin ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11081,6 +11317,7 @@ target_include_directories(grpc_objective_c_plugin ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11118,6 +11355,7 @@ target_include_directories(grpc_php_plugin ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11155,6 +11393,7 @@ target_include_directories(grpc_python_plugin ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11192,6 +11431,7 @@ target_include_directories(grpc_ruby_plugin ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11231,6 +11471,7 @@ target_include_directories(grpc_tls_credentials_options_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11288,6 +11529,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11334,6 +11576,7 @@ target_include_directories(grpclb_api_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11396,6 +11639,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11437,6 +11681,7 @@ target_include_directories(h2_ssl_session_reuse_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11478,6 +11723,7 @@ target_include_directories(head_of_line_blocking_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11518,6 +11764,7 @@ target_include_directories(headers_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11578,6 +11825,7 @@ target_include_directories(health_service_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11630,6 +11878,7 @@ target_include_directories(http2_client ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11688,6 +11937,7 @@ target_include_directories(hybrid_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11730,6 +11980,7 @@ target_include_directories(initial_settings_frame_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11783,6 +12034,7 @@ target_include_directories(interop_client ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11838,6 +12090,7 @@ target_include_directories(interop_server ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11880,6 +12133,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11922,6 +12176,7 @@ target_include_directories(json_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -11962,6 +12217,7 @@ target_include_directories(large_metadata_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12004,6 +12260,7 @@ target_include_directories(lb_get_cpu_stats_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12044,6 +12301,7 @@ target_include_directories(lb_load_data_store_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12083,6 +12341,7 @@ target_include_directories(linux_system_roots_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12134,6 +12393,7 @@ target_include_directories(message_allocator_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12190,6 +12450,7 @@ target_include_directories(mock_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12243,6 +12504,7 @@ target_include_directories(nonblocking_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12283,6 +12545,7 @@ target_include_directories(noop-benchmark ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12322,6 +12585,7 @@ target_include_directories(orphanable_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12362,6 +12626,7 @@ target_include_directories(out_of_bounds_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12400,6 +12665,7 @@ target_include_directories(pid_controller_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12451,6 +12717,7 @@ target_include_directories(port_sharing_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12509,6 +12776,7 @@ target_include_directories(proto_server_reflection_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12550,6 +12818,7 @@ target_include_directories(proto_utils_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12635,6 +12904,7 @@ target_include_directories(qps_json_driver ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12714,6 +12984,7 @@ target_include_directories(qps_worker ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12772,6 +13043,7 @@ target_include_directories(raw_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12812,6 +13084,7 @@ target_include_directories(ref_counted_ptr_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12850,6 +13123,7 @@ target_include_directories(ref_counted_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12888,6 +13162,7 @@ target_include_directories(retry_throttle_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12926,6 +13201,7 @@ target_include_directories(secure_auth_context_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -12983,6 +13259,7 @@ target_include_directories(server_builder_plugin_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13036,6 +13313,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13089,6 +13367,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13129,6 +13408,7 @@ target_include_directories(server_chttp2_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13167,6 +13447,7 @@ target_include_directories(server_context_test_spouse_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13220,6 +13501,7 @@ target_include_directories(server_early_return_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13274,6 +13556,7 @@ target_include_directories(server_interceptors_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13316,6 +13599,7 @@ target_include_directories(server_registered_method_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13367,6 +13651,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13424,6 +13709,7 @@ target_include_directories(service_config_end2end_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13464,6 +13750,7 @@ target_include_directories(service_config_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13502,6 +13789,7 @@ target_include_directories(settings_timeout_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13556,6 +13844,7 @@ target_include_directories(shutdown_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13598,6 +13887,7 @@ target_include_directories(simple_request_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13636,6 +13926,7 @@ target_include_directories(slice_hash_table_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13674,6 +13965,7 @@ target_include_directories(slice_weak_hash_table_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13712,6 +14004,7 @@ target_include_directories(static_metadata_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13750,6 +14043,7 @@ target_include_directories(stats_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13788,6 +14082,7 @@ target_include_directories(status_metadata_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13826,6 +14121,7 @@ target_include_directories(status_util_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13881,6 +14177,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13922,6 +14219,7 @@ target_include_directories(string_ref_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -13961,6 +14259,7 @@ target_include_directories(test_cpp_client_credentials_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14000,6 +14299,7 @@ target_include_directories(test_cpp_util_slice_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14040,6 +14340,7 @@ target_include_directories(test_cpp_util_time_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14080,6 +14381,7 @@ target_include_directories(thread_manager_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14138,6 +14440,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14180,6 +14483,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14220,6 +14524,7 @@ target_include_directories(timer_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14259,6 +14564,7 @@ target_include_directories(tls_security_connector_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14298,6 +14604,7 @@ target_include_directories(too_many_pings_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14341,6 +14648,7 @@ target_include_directories(unknown_frame_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14381,6 +14689,7 @@ target_include_directories(window_overflow_bad_client_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14420,6 +14729,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14492,6 +14802,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14531,6 +14842,7 @@ target_include_directories(xds_bootstrap_test ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14607,6 +14919,7 @@ if(_gRPC_PLATFORM_LINUX OR _gRPC_PLATFORM_MAC OR _gRPC_PLATFORM_POSIX) ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14660,6 +14973,7 @@ target_include_directories(xds_interop_client ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14712,6 +15026,7 @@ target_include_directories(xds_interop_server ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14753,6 +15068,7 @@ target_include_directories(alts_credentials_fuzzer_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14793,6 +15109,7 @@ target_include_directories(client_fuzzer_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14833,6 +15150,7 @@ target_include_directories(hpack_parser_fuzzer_test_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14873,6 +15191,7 @@ target_include_directories(http_request_fuzzer_test_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14913,6 +15232,7 @@ target_include_directories(http_response_fuzzer_test_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14953,6 +15273,7 @@ target_include_directories(json_fuzzer_test_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -14993,6 +15314,7 @@ target_include_directories(nanopb_fuzzer_response_test_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -15033,6 +15355,7 @@ target_include_directories(nanopb_fuzzer_serverlist_test_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -15073,6 +15396,7 @@ target_include_directories(percent_decode_fuzzer_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -15113,6 +15437,7 @@ target_include_directories(percent_encode_fuzzer_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -15153,6 +15478,7 @@ target_include_directories(server_fuzzer_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -15193,6 +15519,7 @@ target_include_directories(ssl_server_fuzzer_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -15233,6 +15560,7 @@ target_include_directories(uri_fuzzer_test_one_entry ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include ${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + ${_gRPC_RE2_INCLUDE_DIR} ${_gRPC_SSL_INCLUDE_DIR} ${_gRPC_UPB_GENERATED_DIR} ${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -15327,7 +15655,7 @@ generate_pkgconfig( "high performance general RPC framework" "${gRPC_CORE_VERSION}" "gpr openssl" - "-lgrpc -laddress_sorting -lupb -lcares -lz -labsl_bad_optional_access -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" + "-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz -labsl_bad_optional_access -labsl_str_format_internal -labsl_time -labsl_time_zone -labsl_civil_time -labsl_strings -labsl_strings_internal -labsl_throw_delegate -labsl_int128 -labsl_base -labsl_spinlock_wait -labsl_raw_logging_internal -labsl_log_severity -labsl_dynamic_annotations" "" "grpc.pc") diff --git a/Makefile b/Makefile index 269e72075f1..0cc937ebd15 100644 --- a/Makefile +++ b/Makefile @@ -365,7 +365,7 @@ CXXFLAGS += -stdlib=libc++ LDFLAGS += -framework CoreFoundation endif CFLAGS += -g -CPPFLAGS += -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/abseil-cpp -Ithird_party/upb -Isrc/core/ext/upb-generated +CPPFLAGS += -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/abseil-cpp -Ithird_party/re2 -Ithird_party/upb -Isrc/core/ext/upb-generated COREFLAGS += -fno-exceptions LDFLAGS += -g @@ -725,6 +725,10 @@ CPPFLAGS := -Ithird_party/address_sorting/include $(CPPFLAGS) GRPC_ABSEIL_DEP = $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a GRPC_ABSEIL_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a +RE2_DEP = $(LIBDIR)/$(CONFIG)/libre2.a +RE2_MERGE_OBJS = $(LIBRE2_OBJS) +RE2_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libre2.a + UPB_DEP = $(LIBDIR)/$(CONFIG)/libupb.a UPB_MERGE_OBJS = $(LIBUPB_OBJS) UPB_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libupb.a @@ -1350,7 +1354,7 @@ $(LIBDIR)/$(CONFIG)/protobuf/libprotobuf.a: third_party/protobuf/configure static: static_c static_cxx -static_c: pc_c pc_c_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libupb.a +static_c: pc_c pc_c_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libre2.a $(LIBDIR)/$(CONFIG)/libupb.a static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a @@ -1358,7 +1362,7 @@ static_csharp: static_c shared: shared_c shared_cxx -shared_c: pc_c pc_c_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) +shared_c: pc_c pc_c_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) shared_csharp: shared_c @@ -2406,6 +2410,8 @@ ifeq ($(CONFIG),opt) $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a $(E) "[STRIP] Stripping libgrpc_unsecure.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a + $(E) "[STRIP] Stripping libre2.a" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libre2.a $(E) "[STRIP] Stripping libupb.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libupb.a endif @@ -2438,6 +2444,8 @@ ifeq ($(CONFIG),opt) $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) + $(E) "[STRIP] Stripping $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(E) "[STRIP] Stripping $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) endif @@ -3012,6 +3020,9 @@ install-static_c: static_c strip-static_c install-pkg-config_c $(E) "[INSTALL] Installing libgrpc_unsecure.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(prefix)/lib/libgrpc_unsecure.a + $(E) "[INSTALL] Installing libre2.a" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libre2.a $(prefix)/lib/libre2.a $(E) "[INSTALL] Installing libupb.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libupb.a $(prefix)/lib/libupb.a @@ -3083,6 +3094,15 @@ ifeq ($(SYSTEM),MINGW32) else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so.11 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libgrpc_unsecure.so +endif + $(E) "[INSTALL] Installing $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/$(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) +ifeq ($(SYSTEM),MINGW32) + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE)-dll.a $(prefix)/lib/libre2.a +else ifneq ($(SYSTEM),Darwin) + $(Q) ln -sf $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libre2.so.11 + $(Q) ln -sf $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(prefix)/lib/libre2.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE)" $(Q) $(INSTALL) -d $(prefix)/lib @@ -3240,18 +3260,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBADDRESS_SORTING_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) +$(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBADDRESS_SORTING_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBADDRESS_SORTING_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) +$(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBADDRESS_SORTING_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.11 -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libaddress_sorting.so.11 -o $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBADDRESS_SORTING_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting$(SHARED_VERSION_CORE).so endif @@ -3357,7 +3377,7 @@ PUBLIC_HEADERS_C += \ LIBEND2END_NOSEC_TESTS_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBEND2END_NOSEC_TESTS_SRC)))) -$(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBEND2END_NOSEC_TESTS_OBJS) +$(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBEND2END_NOSEC_TESTS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a @@ -3480,7 +3500,7 @@ $(LIBDIR)/$(CONFIG)/libend2end_tests.a: openssl_dep_error else -$(LIBDIR)/$(CONFIG)/libend2end_tests.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBEND2END_TESTS_OBJS) +$(LIBDIR)/$(CONFIG)/libend2end_tests.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBEND2END_TESTS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libend2end_tests.a @@ -3590,7 +3610,7 @@ PUBLIC_HEADERS_C += \ LIBGPR_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_SRC)))) -$(LIBDIR)/$(CONFIG)/libgpr.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGPR_OBJS) +$(LIBDIR)/$(CONFIG)/libgpr.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGPR_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgpr.a @@ -3602,18 +3622,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) +$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) +$(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGPR_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.11 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgpr.so.11 -o $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGPR_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr$(SHARED_VERSION_CORE).so endif @@ -4140,11 +4160,11 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE else -$(LIBDIR)/$(CONFIG)/libgrpc.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc.a - $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBGRPC_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) $(OPENSSL_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc.a endif @@ -4152,18 +4172,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc$(SHARED_VERSION_CORE).so endif @@ -4197,7 +4217,7 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHAR else -$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_CSHARP_EXT_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_CSHARP_EXT_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext.a @@ -4209,18 +4229,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_CSHARP_EXT_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_csharp_ext.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_CSHARP_EXT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_csharp_ext$(SHARED_VERSION_CORE).so endif @@ -4272,7 +4292,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a: openssl_dep_error else -$(LIBDIR)/$(CONFIG)/libgrpc_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_TEST_UTIL_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_TEST_UTIL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a @@ -4320,7 +4340,7 @@ PUBLIC_HEADERS_C += \ LIBGRPC_TEST_UTIL_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_UNSECURE_SRC)))) -$(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_TEST_UTIL_UNSECURE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_TEST_UTIL_UNSECURE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a @@ -4766,11 +4786,11 @@ PUBLIC_HEADERS_C += \ LIBGRPC_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_UNSECURE_SRC)))) -$(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a - $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBGRPC_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a endif @@ -4778,18 +4798,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a +$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a +$(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBGRPC_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc_unsecure.so.11 -o $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBGRPC_UNSECURE_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libaddress_sorting.a $(LIBDIR)/$(CONFIG)/libupb.a $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure$(SHARED_VERSION_CORE).so endif @@ -4830,7 +4850,7 @@ $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBBENCHMARK_HELPERS_OBJS) +$(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBBENCHMARK_HELPERS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libbenchmark_helpers.a @@ -5136,11 +5156,11 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP else -$(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++.a - $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBGRPC++_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++.a endif @@ -5148,18 +5168,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc -lgpr -laddress_sorting -lupb else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc -lgpr -laddress_sorting -lupb $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION_CPP).so endif @@ -5207,11 +5227,11 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EX else -$(LIBDIR)/$(CONFIG)/libgrpc++_alts.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_ALTS_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_alts.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_ALTS_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a - $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a $(LIBGRPC++_ALTS_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a $(LIBGRPC++_ALTS_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_alts.a endif @@ -5219,18 +5239,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_ALTS_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_ALTS_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_alts$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ALTS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++$(SHARED_VERSION_CPP)-dll -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_alts$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ALTS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++$(SHARED_VERSION_CPP)-dll -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_ALTS_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_ALTS_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ALTS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ALTS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_alts.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ALTS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_alts.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ALTS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb $(Q) ln -sf $(SHARED_PREFIX)grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_alts$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_alts$(SHARED_VERSION_CPP).so endif @@ -5279,7 +5299,7 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$( else -$(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_ERROR_DETAILS_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_ERROR_DETAILS_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_error_details.a @@ -5291,18 +5311,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_error_details$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++$(SHARED_VERSION_CPP)-dll -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_error_details$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++$(SHARED_VERSION_CPP)-dll -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_error_details.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_error_details.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_ERROR_DETAILS_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb $(Q) ln -sf $(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_error_details$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_error_details$(SHARED_VERSION_CPP).so endif @@ -5353,7 +5373,7 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHA else -$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_REFLECTION_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_REFLECTION_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a @@ -5365,18 +5385,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++$(SHARED_VERSION_CPP)-dll -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++$(SHARED_VERSION_CPP)-dll -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION_CPP).so endif @@ -5427,7 +5447,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libgrpc++_test.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_TEST_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_test.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_TEST_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test.a @@ -5476,7 +5496,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_TEST_CONFIG_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_TEST_CONFIG_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a @@ -5533,7 +5553,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_TEST_UTIL_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_TEST_UTIL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a @@ -5821,11 +5841,11 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARE else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a - $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(UPB_MERGE_OBJS) + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(LIBGRPC++_UNSECURE_OBJS) $(LIBGPR_OBJS) $(LIBGRPC_ABSEIL_OBJS) $(ZLIB_MERGE_OBJS) $(CARES_MERGE_OBJS) $(ADDRESS_SORTING_MERGE_OBJS) $(RE2_MERGE_OBJS) $(UPB_MERGE_OBJS) ifeq ($(SYSTEM),Darwin) $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a endif @@ -5833,18 +5853,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) +$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc_unsecure$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc_unsecure$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc_unsecure$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc_unsecure -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc_unsecure -lgpr -laddress_sorting -lupb else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc_unsecure -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc_unsecure -lgpr -laddress_sorting -lupb $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION_CPP).so endif @@ -5882,7 +5902,7 @@ $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC_PLUGIN_SUPPORT_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPC_PLUGIN_SUPPORT_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc_plugin_support.a @@ -5933,7 +5953,7 @@ $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARE else -$(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPCPP_CHANNELZ_OBJS) +$(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBGRPCPP_CHANNELZ_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz.a @@ -5945,18 +5965,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/grpc$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/gpr$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/address_sorting$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpcpp_channelz$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++$(SHARED_VERSION_CPP)-dll -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpcpp_channelz$(SHARED_VERSION_CPP).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP)-dll.a -o $(LIBDIR)/$(CONFIG)/grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++$(SHARED_VERSION_CPP)-dll -lgrpc$(SHARED_VERSION_CORE)-dll -lgpr$(SHARED_VERSION_CORE)-dll -laddress_sorting$(SHARED_VERSION_CORE)-dll -lupb$(SHARED_VERSION_CORE)-dll else -$(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP): $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libaddress_sorting.$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb.$(SHARED_EXT_CORE) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpcpp_channelz.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpcpp_channelz.so.1 -o $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBGRPCPP_CHANNELZ_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) -lgrpc++ -lgrpc -lgpr -laddress_sorting -lupb $(Q) ln -sf $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP).so.1 $(Q) ln -sf $(SHARED_PREFIX)grpcpp_channelz$(SHARED_VERSION_CPP).$(SHARED_EXT_CPP) $(LIBDIR)/$(CONFIG)/libgrpcpp_channelz$(SHARED_VERSION_CPP).so endif @@ -6252,7 +6272,7 @@ $(LIBBORINGSSL_OBJS): CPPFLAGS += -Ithird_party/boringssl-with-bazel/src/include $(LIBBORINGSSL_OBJS): CXXFLAGS += -fno-exceptions $(LIBBORINGSSL_OBJS): CFLAGS += -g -$(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBBORINGSSL_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(LIBBORINGSSL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl.a @@ -6292,7 +6312,7 @@ $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_TEST_UTIL_OBJS) +$(LIBDIR)/$(CONFIG)/libboringssl_test_util.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBBORINGSSL_TEST_UTIL_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a @@ -6347,7 +6367,7 @@ $(LIBDIR)/$(CONFIG)/libbenchmark.a: protobuf_dep_error else -$(LIBDIR)/$(CONFIG)/libbenchmark.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBBENCHMARK_OBJS) +$(LIBDIR)/$(CONFIG)/libbenchmark.a: $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(PROTOBUF_DEP) $(LIBBENCHMARK_OBJS) $(E) "[AR] Creating $@" $(Q) mkdir -p `dirname $@` $(Q) rm -f $(LIBDIR)/$(CONFIG)/libbenchmark.a @@ -6366,6 +6386,70 @@ ifneq ($(NO_DEPS),true) endif +LIBRE2_SRC = \ + third_party/re2/re2/bitstate.cc \ + third_party/re2/re2/compile.cc \ + third_party/re2/re2/dfa.cc \ + third_party/re2/re2/filtered_re2.cc \ + third_party/re2/re2/mimics_pcre.cc \ + third_party/re2/re2/nfa.cc \ + third_party/re2/re2/onepass.cc \ + third_party/re2/re2/parse.cc \ + third_party/re2/re2/perl_groups.cc \ + third_party/re2/re2/prefilter.cc \ + third_party/re2/re2/prefilter_tree.cc \ + third_party/re2/re2/prog.cc \ + third_party/re2/re2/re2.cc \ + third_party/re2/re2/regexp.cc \ + third_party/re2/re2/set.cc \ + third_party/re2/re2/simplify.cc \ + third_party/re2/re2/stringpiece.cc \ + third_party/re2/re2/tostring.cc \ + third_party/re2/re2/unicode_casefold.cc \ + third_party/re2/re2/unicode_groups.cc \ + third_party/re2/util/pcre.cc \ + third_party/re2/util/rune.cc \ + third_party/re2/util/strutil.cc \ + +PUBLIC_HEADERS_C += \ + +LIBRE2_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBRE2_SRC)))) + + +$(LIBDIR)/$(CONFIG)/libre2.a: $(LIBRE2_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libre2.a + $(Q) $(AR) $(ARFLAGS) $(LIBDIR)/$(CONFIG)/libre2.a $(LIBRE2_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libre2.a +endif + + + +ifeq ($(SYSTEM),MINGW32) +$(LIBDIR)/$(CONFIG)/re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBRE2_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/re2$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBRE2_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) +else +$(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBRE2_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` +ifeq ($(SYSTEM),Darwin) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBRE2_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) +else + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libre2.so.11 -o $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBRE2_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) ln -sf $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).so.11 + $(Q) ln -sf $(SHARED_PREFIX)re2$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libre2$(SHARED_VERSION_CORE).so +endif +endif + +ifneq ($(NO_DEPS),true) +-include $(LIBRE2_OBJS:.o=.dep) +endif + + LIBUPB_SRC = \ third_party/upb/upb/decode.c \ third_party/upb/upb/encode.c \ @@ -6408,18 +6492,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBUPB_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) +$(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBUPB_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,--output-def=$(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE)-dll.a -o $(LIBDIR)/$(CONFIG)/upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else -$(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBUPB_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) +$(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE): $(LIBUPB_OBJS) $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb.so.11 -o $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libupb.so.11 -o $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBUPB_OBJS) $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS) $(LDLIBS) $(Q) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).so.11 $(Q) ln -sf $(SHARED_PREFIX)upb$(SHARED_VERSION_CORE).$(SHARED_EXT_CORE) $(LIBDIR)/$(CONFIG)/libupb$(SHARED_VERSION_CORE).so endif diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl index c868438e93b..16e7600bbfe 100644 --- a/bazel/grpc_deps.bzl +++ b/bazel/grpc_deps.bzl @@ -81,6 +81,11 @@ def grpc_deps(): actual = "@com_github_google_benchmark//:benchmark", ) + native.bind( + name = "re2", + actual = "@com_github_google_re2//:re2", + ) + native.bind( name = "gflags", actual = "@com_github_gflags_gflags//:gflags", @@ -218,6 +223,17 @@ def grpc_deps(): ], ) + if "com_github_google_re2" not in native.existing_rules(): + http_archive( + name = "com_github_google_re2", + sha256 = "9f385e146410a8150b6f4cb1a57eab7ec806ced48d427554b1e754877ff26c3e", + strip_prefix = "re2-aecba11114cf1fac5497aeb844b6966106de3eb6", + urls = [ + "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz", + "https://github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz", + ], + ) + if "com_github_cares_cares" not in native.existing_rules(): http_archive( name = "com_github_cares_cares", diff --git a/build_handwritten.yaml b/build_handwritten.yaml index 2653646db23..51d58924f96 100644 --- a/build_handwritten.yaml +++ b/build_handwritten.yaml @@ -214,8 +214,8 @@ defaults: global: CFLAGS: -g COREFLAGS: -fno-exceptions - CPPFLAGS: -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/abseil-cpp -Ithird_party/upb - -Isrc/core/ext/upb-generated + CPPFLAGS: -g -Wall -Wextra -DOSATOMIC_USE_INLINED=1 -Ithird_party/abseil-cpp -Ithird_party/re2 + -Ithird_party/upb -Isrc/core/ext/upb-generated LDFLAGS: -g zlib: CFLAGS: -fvisibility=hidden @@ -255,6 +255,7 @@ python_dependencies: - address_sorting - ares - boringssl + - re2 - z ruby_gem: deps: diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in index 5bfa73c291e..3623f4aa5ed 100644 --- a/cmake/gRPCConfig.cmake.in +++ b/cmake/gRPCConfig.cmake.in @@ -7,6 +7,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules) @_gRPC_FIND_SSL@ @_gRPC_FIND_CARES@ @_gRPC_FIND_ABSL@ +@_gRPC_FIND_RE2@ # Targets include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake) diff --git a/cmake/re2.cmake b/cmake/re2.cmake new file mode 100644 index 00000000000..383d64faa72 --- /dev/null +++ b/cmake/re2.cmake @@ -0,0 +1,54 @@ +# Copyright 2017 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# The CMakeLists.txt for re2 doesn't propagate include directories +# transitively so `_gRPC_RE2_INCLUDE_DIR` should be set for gRPC +# to find header files. + +if(gRPC_RE2_PROVIDER STREQUAL "module") + if(NOT RE2_ROOT_DIR) + set(RE2_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/re2) + endif() + if(EXISTS "${RE2_ROOT_DIR}/CMakeLists.txt") + include_directories("${RE2_ROOT_DIR}") + add_subdirectory(${RE2_ROOT_DIR} third_party/re2) + + if(TARGET re2) + set(_gRPC_RE2_LIBRARIES re2) + set(_gRPC_RE2_INCLUDE_DIR "${RE2_ROOT_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/third_party/re2") + if(gRPC_INSTALL AND _gRPC_INSTALL_SUPPORTED_FROM_MODULE) + install(TARGETS re2 EXPORT gRPCTargets + RUNTIME DESTINATION ${gRPC_INSTALL_BINDIR} + LIBRARY DESTINATION ${gRPC_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}) + endif() + endif() + else() + message(WARNING "gRPC_RE2_PROVIDER is \"module\" but RE2_ROOT_DIR(${RE2_ROOT_DIR}) is wrong") + endif() + if(gRPC_INSTALL AND NOT _gRPC_INSTALL_SUPPORTED_FROM_MODULE) + message(WARNING "gRPC_INSTALL will be forced to FALSE because gRPC_RE2_PROVIDER is \"module\" and CMake version (${CMAKE_VERSION}) is less than 3.13.") + set(gRPC_INSTALL FALSE) + endif() +elseif(gRPC_RE2_PROVIDER STREQUAL "package") + find_package(re2 REQUIRED CONFIG) + + if(TARGET re2::re2) + set(_gRPC_RE2_LIBRARIES re2::re2) + else() + set(_gRPC_RE2_LIBRARIES ${RE2_LIBRARIES}) + endif() + set(_gRPC_RE2_INCLUDE_DIR ${RE2_INCLUDE_DIRS}) + set(_gRPC_FIND_RE2 "if(NOT re2_FOUND)\n find_package(re2)\nendif()") +endif() diff --git a/config.m4 b/config.m4 index deb3e6f0548..8fa0096a584 100644 --- a/config.m4 +++ b/config.m4 @@ -11,6 +11,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/abseil-cpp) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/address_sorting/include) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/boringssl-with-bazel/src/include) + PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/re2) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/upb) LIBS="-lpthread $LIBS" diff --git a/config.w32 b/config.w32 index 5f80e228165..05114b382f3 100644 --- a/config.w32 +++ b/config.w32 @@ -896,6 +896,7 @@ if (PHP_GRPC != "no") { "/I"+configure_module_dirname+"\\third_party\\abseil-cpp "+ "/I"+configure_module_dirname+"\\third_party\\address_sorting\\include "+ "/I"+configure_module_dirname+"\\third_party\\boringssl-with-bazel\\src\\include "+ + "/I"+configure_module_dirname+"\\third_party\\re2 "+ "/I"+configure_module_dirname+"\\third_party\\upb "+ "/I"+configure_module_dirname+"\\third_party\\zlib "); diff --git a/examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt b/examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt index dd646bf5da5..f2371789c52 100644 --- a/examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt +++ b/examples/cpp/helloworld/cmake_externalproject/CMakeLists.txt @@ -62,6 +62,15 @@ ExternalProject_Add(protobuf -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/protobuf ) +# Builds re2 project from the git submodule. +ExternalProject_Add(re2 + PREFIX re2 + SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../../third_party/re2" + CMAKE_CACHE_ARGS + -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=TRUE + -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/re2 +) + # Builds zlib project from the git submodule. ExternalProject_Add(zlib PREFIX zlib @@ -94,6 +103,8 @@ ExternalProject_Add(grpc -DgRPC_PROTOBUF_PROVIDER:STRING=package -DgRPC_PROTOBUF_PACKAGE_TYPE:STRING=CONFIG -DProtobuf_DIR:PATH=${_FINDPACKAGE_PROTOBUF_CONFIG_DIR} + -DgRPC_RE2_PROVIDER:STRING=package + -Dre2_DIR:STRING=${CMAKE_CURRENT_BINARY_DIR}/re2/lib/cmake/re2 -DgRPC_ZLIB_PROVIDER:STRING=package -DZLIB_ROOT:STRING=${CMAKE_CURRENT_BINARY_DIR}/zlib -DgRPC_ABSL_PROVIDER:STRING=package @@ -103,7 +114,7 @@ ExternalProject_Add(grpc -DgRPC_SSL_PROVIDER:STRING=package ${_CMAKE_ARGS_OPENSSL_ROOT_DIR} -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/grpc - DEPENDS c-ares protobuf zlib absl + DEPENDS c-ares protobuf re2 zlib absl ) # Build the helloworld projects itself using a CMakeLists.txt that assumes all the dependencies @@ -121,6 +132,7 @@ ExternalProject_Add(helloworld CMAKE_CACHE_ARGS -DProtobuf_DIR:PATH=${_FINDPACKAGE_PROTOBUF_CONFIG_DIR} -Dc-ares_DIR:PATH=${CMAKE_CURRENT_BINARY_DIR}/c-ares/lib/cmake/c-ares + -Dre2_DIR:STRING=${CMAKE_CURRENT_BINARY_DIR}/re2/lib/cmake/re2 -DZLIB_ROOT:STRING=${CMAKE_CURRENT_BINARY_DIR}/zlib -Dabsl_DIR:STRING=${CMAKE_CURRENT_BINARY_DIR}/absl/lib/cmake/absl ${_CMAKE_ARGS_OPENSSL_ROOT_DIR} diff --git a/gRPC-C++.podspec b/gRPC-C++.podspec index 2fbcd6ad028..7d0d152eff6 100644 --- a/gRPC-C++.podspec +++ b/gRPC-C++.podspec @@ -64,7 +64,7 @@ Pod::Spec.new do |s| } s.libraries = 'c++' - s.compiler_flags = '-Wno-comma' + s.compiler_flags = '-Wno-comma -Wno-unreachable-code -Wno-shorten-64-to-32' s.default_subspecs = 'Interface', 'Implementation' @@ -736,6 +736,32 @@ Pod::Spec.new do |s| 'src/cpp/util/status.cc', 'src/cpp/util/string_ref.cc', 'src/cpp/util/time_cc.cc', + 'third_party/re2/re2/bitmap256.h', + 'third_party/re2/re2/filtered_re2.h', + 'third_party/re2/re2/pod_array.h', + 'third_party/re2/re2/prefilter.h', + 'third_party/re2/re2/prefilter_tree.h', + 'third_party/re2/re2/prog.h', + 'third_party/re2/re2/re2.h', + 'third_party/re2/re2/regexp.h', + 'third_party/re2/re2/set.h', + 'third_party/re2/re2/sparse_array.h', + 'third_party/re2/re2/sparse_set.h', + 'third_party/re2/re2/stringpiece.h', + 'third_party/re2/re2/unicode_casefold.h', + 'third_party/re2/re2/unicode_groups.h', + 'third_party/re2/re2/walker-inl.h', + 'third_party/re2/util/benchmark.h', + 'third_party/re2/util/flags.h', + 'third_party/re2/util/logging.h', + 'third_party/re2/util/malloc_counter.h', + 'third_party/re2/util/mix.h', + 'third_party/re2/util/mutex.h', + 'third_party/re2/util/pcre.h', + 'third_party/re2/util/strutil.h', + 'third_party/re2/util/test.h', + 'third_party/re2/util/utf.h', + 'third_party/re2/util/util.h', 'third_party/upb/upb/decode.h', 'third_party/upb/upb/def.h', 'third_party/upb/upb/encode.h', @@ -1220,6 +1246,32 @@ Pod::Spec.new do |s| 'src/cpp/server/secure_server_credentials.h', 'src/cpp/server/thread_pool_interface.h', 'src/cpp/thread_manager/thread_manager.h', + 'third_party/re2/re2/bitmap256.h', + 'third_party/re2/re2/filtered_re2.h', + 'third_party/re2/re2/pod_array.h', + 'third_party/re2/re2/prefilter.h', + 'third_party/re2/re2/prefilter_tree.h', + 'third_party/re2/re2/prog.h', + 'third_party/re2/re2/re2.h', + 'third_party/re2/re2/regexp.h', + 'third_party/re2/re2/set.h', + 'third_party/re2/re2/sparse_array.h', + 'third_party/re2/re2/sparse_set.h', + 'third_party/re2/re2/stringpiece.h', + 'third_party/re2/re2/unicode_casefold.h', + 'third_party/re2/re2/unicode_groups.h', + 'third_party/re2/re2/walker-inl.h', + 'third_party/re2/util/benchmark.h', + 'third_party/re2/util/flags.h', + 'third_party/re2/util/logging.h', + 'third_party/re2/util/malloc_counter.h', + 'third_party/re2/util/mix.h', + 'third_party/re2/util/mutex.h', + 'third_party/re2/util/pcre.h', + 'third_party/re2/util/strutil.h', + 'third_party/re2/util/test.h', + 'third_party/re2/util/utf.h', + 'third_party/re2/util/util.h', 'third_party/upb/upb/decode.h', 'third_party/upb/upb/def.h', 'third_party/upb/upb/encode.h', @@ -1267,5 +1319,8 @@ Pod::Spec.new do |s| find src/core/ src/cpp/ third_party/upb/ -type f -name '*.grpc_back' -print0 | xargs -0 rm find src/core/ src/cpp/ -type f \\( -name '*.h' -or -name '*.c' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(.*).upb.h";#if COCOAPODS==1\\\n #include "src/core/ext/upb-generated/\\1.upb.h"\\\n#else\\\n #include "\\1.upb.h"\\\n#endif;g' find src/core/ src/cpp/ -type f -name '*.grpc_back' -print0 | xargs -0 rm + find third_party/re2/re2/ third_party/re2/util/ -type f \\( -name '*.h' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "re2/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/re2/\\1"\\\n#else\\\n #include "re2/\\1"\\\n#endif;g;s;#include "util/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/util/\\1"\\\n#else\\\n #include "util/\\1"\\\n#endif;g' + find src/core/ -type f \\( -name '*.h' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "re2/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/re2/\\1"\\\n#else\\\n #include "re2/\\1"\\\n#endif;g' + find src/core/ third_party/re2/ -type f -name '*.grpc_back' -print0 | xargs -0 rm END_OF_COMMAND end diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index a69e16086fb..e4dd69c0d5d 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -180,7 +180,7 @@ Pod::Spec.new do |s| ss.dependency 'abseil/strings/strings', abseil_version ss.dependency 'abseil/time/time', abseil_version ss.dependency 'abseil/types/optional', abseil_version - ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC' + ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC -Wno-unreachable-code -Wno-shorten-64-to-32' ss.source_files = 'src/core/ext/filters/census/grpc_context.cc', 'src/core/ext/filters/client_channel/backend_metric.cc', @@ -1169,6 +1169,55 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security_grpc.cc', 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', + 'third_party/re2/re2/bitmap256.h', + 'third_party/re2/re2/bitstate.cc', + 'third_party/re2/re2/compile.cc', + 'third_party/re2/re2/dfa.cc', + 'third_party/re2/re2/filtered_re2.cc', + 'third_party/re2/re2/filtered_re2.h', + 'third_party/re2/re2/mimics_pcre.cc', + 'third_party/re2/re2/nfa.cc', + 'third_party/re2/re2/onepass.cc', + 'third_party/re2/re2/parse.cc', + 'third_party/re2/re2/perl_groups.cc', + 'third_party/re2/re2/pod_array.h', + 'third_party/re2/re2/prefilter.cc', + 'third_party/re2/re2/prefilter.h', + 'third_party/re2/re2/prefilter_tree.cc', + 'third_party/re2/re2/prefilter_tree.h', + 'third_party/re2/re2/prog.cc', + 'third_party/re2/re2/prog.h', + 'third_party/re2/re2/re2.cc', + 'third_party/re2/re2/re2.h', + 'third_party/re2/re2/regexp.cc', + 'third_party/re2/re2/regexp.h', + 'third_party/re2/re2/set.cc', + 'third_party/re2/re2/set.h', + 'third_party/re2/re2/simplify.cc', + 'third_party/re2/re2/sparse_array.h', + 'third_party/re2/re2/sparse_set.h', + 'third_party/re2/re2/stringpiece.cc', + 'third_party/re2/re2/stringpiece.h', + 'third_party/re2/re2/tostring.cc', + 'third_party/re2/re2/unicode_casefold.cc', + 'third_party/re2/re2/unicode_casefold.h', + 'third_party/re2/re2/unicode_groups.cc', + 'third_party/re2/re2/unicode_groups.h', + 'third_party/re2/re2/walker-inl.h', + 'third_party/re2/util/benchmark.h', + 'third_party/re2/util/flags.h', + 'third_party/re2/util/logging.h', + 'third_party/re2/util/malloc_counter.h', + 'third_party/re2/util/mix.h', + 'third_party/re2/util/mutex.h', + 'third_party/re2/util/pcre.cc', + 'third_party/re2/util/pcre.h', + 'third_party/re2/util/rune.cc', + 'third_party/re2/util/strutil.cc', + 'third_party/re2/util/strutil.h', + 'third_party/re2/util/test.h', + 'third_party/re2/util/utf.h', + 'third_party/re2/util/util.h', 'third_party/upb/upb/decode.c', 'third_party/upb/upb/decode.h', 'third_party/upb/upb/def.c', @@ -1650,6 +1699,32 @@ Pod::Spec.new do |s| 'src/core/tsi/transport_security.h', 'src/core/tsi/transport_security_grpc.h', 'src/core/tsi/transport_security_interface.h', + 'third_party/re2/re2/bitmap256.h', + 'third_party/re2/re2/filtered_re2.h', + 'third_party/re2/re2/pod_array.h', + 'third_party/re2/re2/prefilter.h', + 'third_party/re2/re2/prefilter_tree.h', + 'third_party/re2/re2/prog.h', + 'third_party/re2/re2/re2.h', + 'third_party/re2/re2/regexp.h', + 'third_party/re2/re2/set.h', + 'third_party/re2/re2/sparse_array.h', + 'third_party/re2/re2/sparse_set.h', + 'third_party/re2/re2/stringpiece.h', + 'third_party/re2/re2/unicode_casefold.h', + 'third_party/re2/re2/unicode_groups.h', + 'third_party/re2/re2/walker-inl.h', + 'third_party/re2/util/benchmark.h', + 'third_party/re2/util/flags.h', + 'third_party/re2/util/logging.h', + 'third_party/re2/util/malloc_counter.h', + 'third_party/re2/util/mix.h', + 'third_party/re2/util/mutex.h', + 'third_party/re2/util/pcre.h', + 'third_party/re2/util/strutil.h', + 'third_party/re2/util/test.h', + 'third_party/re2/util/utf.h', + 'third_party/re2/util/util.h', 'third_party/upb/upb/decode.h', 'third_party/upb/upb/def.h', 'third_party/upb/upb/encode.h', @@ -1836,5 +1911,8 @@ Pod::Spec.new do |s| find src/core/ src/cpp/ third_party/upb/ -type f \\( -name '*.h' -or -name '*.c' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(.*).upb.h";#if COCOAPODS==1\\\n #include "src/core/ext/upb-generated/\\1.upb.h"\\\n#else\\\n #include "\\1.upb.h"\\\n#endif;g' find src/core/ src/cpp/ third_party/upb/ -type f \\( -name '*.h' -or -name '*.c' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(.*).upbdefs.h";#if COCOAPODS==1\\\n #include "src/core/ext/upb-generated/\\1.upbdefs.h"\\\n#else\\\n #include "\\1.upbdefs.h"\\\n#endif;g' find src/core/ src/cpp/ third_party/upb/ -type f -name '*.grpc_back' -print0 | xargs -0 rm + find third_party/re2/re2/ third_party/re2/util/ -type f \\( -name '*.h' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "re2/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/re2/\\1"\\\n#else\\\n #include "re2/\\1"\\\n#endif;g;s;#include "util/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/util/\\1"\\\n#else\\\n #include "util/\\1"\\\n#endif;g' + find src/core/ -type f \\( -name '*.h' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "re2/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/re2/\\1"\\\n#else\\\n #include "re2/\\1"\\\n#endif;g' + find src/core/ third_party/re2/ -type f -name '*.grpc_back' -print0 | xargs -0 rm END_OF_COMMAND end diff --git a/grpc.gyp b/grpc.gyp index 8bd3c35adcb..cd20a0470f1 100644 --- a/grpc.gyp +++ b/grpc.gyp @@ -56,6 +56,7 @@ '-Wextra', '-DOSATOMIC_USE_INLINED=1', '-Ithird_party/abseil-cpp', + '-Ithird_party/re2', '-Ithird_party/upb', '-Isrc/core/ext/upb-generated', ], @@ -133,6 +134,7 @@ '-Wextra', '-DOSATOMIC_USE_INLINED=1', '-Ithird_party/abseil-cpp', + '-Ithird_party/re2', '-Ithird_party/upb', '-Isrc/core/ext/upb-generated', ], @@ -142,6 +144,7 @@ '-Wextra', '-DOSATOMIC_USE_INLINED=1', '-Ithird_party/abseil-cpp', + '-Ithird_party/re2', '-Ithird_party/upb', '-Isrc/core/ext/upb-generated', '-stdlib=libc++', @@ -1987,6 +1990,37 @@ 'third_party/benchmark/src/timers.cc', ], }, + { + 'target_name': 're2', + 'type': 'static_library', + 'dependencies': [ + ], + 'sources': [ + 'third_party/re2/re2/bitstate.cc', + 'third_party/re2/re2/compile.cc', + 'third_party/re2/re2/dfa.cc', + 'third_party/re2/re2/filtered_re2.cc', + 'third_party/re2/re2/mimics_pcre.cc', + 'third_party/re2/re2/nfa.cc', + 'third_party/re2/re2/onepass.cc', + 'third_party/re2/re2/parse.cc', + 'third_party/re2/re2/perl_groups.cc', + 'third_party/re2/re2/prefilter.cc', + 'third_party/re2/re2/prefilter_tree.cc', + 'third_party/re2/re2/prog.cc', + 'third_party/re2/re2/re2.cc', + 'third_party/re2/re2/regexp.cc', + 'third_party/re2/re2/set.cc', + 'third_party/re2/re2/simplify.cc', + 'third_party/re2/re2/stringpiece.cc', + 'third_party/re2/re2/tostring.cc', + 'third_party/re2/re2/unicode_casefold.cc', + 'third_party/re2/re2/unicode_groups.cc', + 'third_party/re2/util/pcre.cc', + 'third_party/re2/util/rune.cc', + 'third_party/re2/util/strutil.cc', + ], + }, { 'target_name': 'upb', 'type': 'static_library', diff --git a/setup.py b/setup.py index 3f27ebd4c14..2fb0296506e 100644 --- a/setup.py +++ b/setup.py @@ -55,6 +55,7 @@ if 'linux' in sys.platform: CARES_INCLUDE += (os.path.join('third_party', 'cares', 'config_linux'),) if 'openbsd' in sys.platform: CARES_INCLUDE += (os.path.join('third_party', 'cares', 'config_openbsd'),) +RE2_INCLUDE = (os.path.join('third_party', 're2'),) SSL_INCLUDE = (os.path.join('third_party', 'boringssl-with-bazel', 'src', 'include'),) UPB_INCLUDE = (os.path.join('third_party', 'upb'),) @@ -232,7 +233,7 @@ if BUILD_WITH_SYSTEM_CARES: EXTENSION_INCLUDE_DIRECTORIES = ((PYTHON_STEM,) + CORE_INCLUDE + ABSL_INCLUDE + ADDRESS_SORTING_INCLUDE + CARES_INCLUDE + - SSL_INCLUDE + UPB_INCLUDE + + RE2_INCLUDE + SSL_INCLUDE + UPB_INCLUDE + UPB_GRPC_GENERATED_INCLUDE + ZLIB_INCLUDE) EXTENSION_LIBRARIES = () diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc index 59c423f0317..1daa5e0e17d 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc @@ -25,6 +25,7 @@ #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" #include "absl/strings/string_view.h" +#include "re2/re2.h" #include @@ -242,6 +243,9 @@ bool PathMatch( case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType:: PATH: return path == path_matcher.string_matcher; + case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType:: + REGEX: + return RE2::FullMatch(path.data(), *path_matcher.regex_matcher); default: return false; } @@ -265,6 +269,9 @@ bool HeaderMatchHelper( case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: HeaderMatcherType::EXACT: return value.value() == header_matcher.string_matcher; + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::REGEX: + return RE2::FullMatch(value.value().data(), *header_matcher.regex_match); case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: HeaderMatcherType::RANGE: int64_t int_value; @@ -850,6 +857,24 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory { } } } + it = json.object_value().find("regex"); + if (it != json.object_value().end()) { + if (path_matcher_seen) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:regex error: other path matcher already specified")); + } else { + path_matcher_seen = true; + if (it->second.type() != Json::Type::STRING) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:regex error: should be string")); + } else { + route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute:: + Matchers::PathMatcher::PathMatcherType::REGEX; + route->matchers.path_matcher.regex_matcher = + absl::make_unique(it->second.string_value()); + } + } + } if (!path_matcher_seen) { error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( "one path matcher: prefix, path, or regex is required")); @@ -910,6 +935,25 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory { header_it->second.string_value(); } } + header_it = header_json.object_value().find("regex_match"); + if (header_it != header_json.object_value().end()) { + if (header_matcher_seen) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:regex_match error: other header matcher already " + "specified")); + } else { + header_matcher_seen = true; + if (header_it->second.type() != Json::Type::STRING) { + error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "field:regex_match error: should be string")); + } else { + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::REGEX; + header_matcher.regex_match = + absl::make_unique(header_it->second.string_value()); + } + } + } header_it = header_json.object_value().find("range_match"); if (header_it != header_json.object_value().end()) { if (header_matcher_seen) { @@ -952,8 +996,6 @@ class XdsRoutingLbFactory : public LoadBalancingPolicyFactory { if (header_matcher.range_end > header_matcher.range_start) { header_matcher.type = XdsApi::RdsUpdate::RdsRoute:: Matchers::HeaderMatcher::HeaderMatcherType::RANGE; - route->matchers.header_matchers.emplace_back( - header_matcher); } } } diff --git a/src/core/ext/filters/client_channel/xds/xds_api.cc b/src/core/ext/filters/client_channel/xds/xds_api.cc index 8296280b91e..0c6e7033e64 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.cc +++ b/src/core/ext/filters/client_channel/xds/xds_api.cc @@ -165,10 +165,16 @@ std::string XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::ToString() case PathMatcherType::PREFIX: path_type_string = "prefix match"; break; + case PathMatcherType::REGEX: + path_type_string = "regex match"; + break; default: break; } - return absl::StrFormat("Path %s:/%s/", path_type_string, string_matcher); + return absl::StrFormat("Path %s:/%s/", path_type_string, + type == PathMatcherType::REGEX + ? regex_matcher->pattern() + : string_matcher); } std::string XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher::ToString() @@ -177,6 +183,10 @@ std::string XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher::ToString() case HeaderMatcherType::EXACT: return absl::StrFormat("Header exact match:%s %s:%s", invert_match ? " not" : "", name, string_matcher); + case HeaderMatcherType::REGEX: + return absl::StrFormat("Header regex match:%s %s:%s", + invert_match ? " not" : "", name, + regex_match->pattern()); case HeaderMatcherType::RANGE: return absl::StrFormat("Header range match:%s %s:[%d, %d)", invert_match ? " not" : "", name, range_start, @@ -613,6 +623,20 @@ grpc_error* RoutePathMatchParse(const envoy_api_v2_route_RouteMatch* match, Matchers::PathMatcher::PathMatcherType::PATH; rds_route->matchers.path_matcher.string_matcher = UpbStringToStdString(path); + } else if (envoy_api_v2_route_RouteMatch_has_safe_regex(match)) { + const envoy_type_matcher_RegexMatcher* regex_matcher = + envoy_api_v2_route_RouteMatch_safe_regex(match); + GPR_ASSERT(regex_matcher != nullptr); + const std::string matcher = UpbStringToStdString( + envoy_type_matcher_RegexMatcher_regex(regex_matcher)); + std::unique_ptr regex = absl::make_unique(matcher); + if (!regex->ok()) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Invalid regex string specified in path matcher."); + } + rds_route->matchers.path_matcher.type = XdsApi::RdsUpdate::RdsRoute:: + Matchers::PathMatcher::PathMatcherType::REGEX; + rds_route->matchers.path_matcher.regex_matcher = std::move(regex); } else { return GRPC_ERROR_CREATE_FROM_STATIC_STRING( "Invalid route path specifier specified."); @@ -635,6 +659,20 @@ grpc_error* RouteHeaderMatchersParse(const envoy_api_v2_route_RouteMatch* match, HeaderMatcher::HeaderMatcherType::EXACT; header_matcher.string_matcher = UpbStringToStdString( envoy_api_v2_route_HeaderMatcher_exact_match(header)); + } else if (envoy_api_v2_route_HeaderMatcher_has_safe_regex_match(header)) { + const envoy_type_matcher_RegexMatcher* regex_matcher = + envoy_api_v2_route_HeaderMatcher_safe_regex_match(header); + GPR_ASSERT(regex_matcher != nullptr); + const std::string matcher = UpbStringToStdString( + envoy_type_matcher_RegexMatcher_regex(regex_matcher)); + std::unique_ptr regex = absl::make_unique(matcher); + if (!regex->ok()) { + return GRPC_ERROR_CREATE_FROM_STATIC_STRING( + "Invalid regex string specified in header matcher."); + } + header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: + HeaderMatcher::HeaderMatcherType::REGEX; + header_matcher.regex_match = std::move(regex); } else if (envoy_api_v2_route_HeaderMatcher_has_range_match(header)) { header_matcher.type = XdsApi::RdsUpdate::RdsRoute::Matchers:: HeaderMatcher::HeaderMatcherType::RANGE; diff --git a/src/core/ext/filters/client_channel/xds/xds_api.h b/src/core/ext/filters/client_channel/xds/xds_api.h index f67a3b1299c..014848216d1 100644 --- a/src/core/ext/filters/client_channel/xds/xds_api.h +++ b/src/core/ext/filters/client_channel/xds/xds_api.h @@ -32,6 +32,7 @@ #include +#include "re2/re2.h" #include "src/core/ext/filters/client_channel/server_address.h" #include "src/core/ext/filters/client_channel/xds/xds_bootstrap.h" #include "src/core/ext/filters/client_channel/xds/xds_client_stats.h" @@ -57,18 +58,28 @@ class XdsApi { enum class PathMatcherType { PATH, // path stored in string_matcher field PREFIX, // prefix stored in string_matcher field + REGEX, // regex stored in regex_matcher field }; PathMatcherType type; std::string string_matcher; + std::unique_ptr regex_matcher; bool operator==(const PathMatcher& other) const { - return (type == other.type && - string_matcher == other.string_matcher); + if (type != other.type) return false; + if (type == PathMatcherType::REGEX) { + // Should never be null. + if (regex_matcher == nullptr || other.regex_matcher == nullptr) { + return false; + } + return regex_matcher->pattern() == other.regex_matcher->pattern(); + } + return string_matcher == other.string_matcher; } std::string ToString() const; }; struct HeaderMatcher { enum class HeaderMatcherType { EXACT, // value stored in string_matcher field + REGEX, // uses regex_match field RANGE, // uses range_start and range_end fields PRESENT, // uses present_match field PREFIX, // prefix stored in string_matcher field @@ -79,6 +90,7 @@ class XdsApi { int64_t range_start; int64_t range_end; std::string string_matcher; + std::unique_ptr regex_match; bool present_match; // invert_match field may or may not exisit, so initialize it to // false. diff --git a/src/core/ext/filters/client_channel/xds/xds_client.cc b/src/core/ext/filters/client_channel/xds/xds_client.cc index 655e3895df8..2f50919b701 100644 --- a/src/core/ext/filters/client_channel/xds/xds_client.cc +++ b/src/core/ext/filters/client_channel/xds/xds_client.cc @@ -2029,6 +2029,11 @@ std::string CreateServiceConfigRoute(const std::string& action_name, header_matcher = absl::StrFormat(" \"exact_match\": \"%s\"", header.string_matcher); break; + case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: + HeaderMatcherType::REGEX: + header_matcher = absl::StrFormat(" \"regex_match\": \"%s\"", + header.regex_match->pattern()); + break; case XdsApi::RdsUpdate::RdsRoute::Matchers::HeaderMatcher:: HeaderMatcherType::RANGE: header_matcher = absl::StrFormat( @@ -2091,6 +2096,12 @@ std::string CreateServiceConfigRoute(const std::string& action_name, path_match_str = absl::StrFormat( "\"path\": \"%s\",\n", route.matchers.path_matcher.string_matcher); break; + case XdsApi::RdsUpdate::RdsRoute::Matchers::PathMatcher::PathMatcherType:: + REGEX: + path_match_str = + absl::StrFormat("\"regex\": \"%s\",\n", + route.matchers.path_matcher.regex_matcher->pattern()); + break; } return absl::StrFormat( " { \n" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index ad96f353a23..6512c493673 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -910,6 +910,29 @@ CORE_SOURCE_FILES = [ 'third_party/cares/cares/inet_net_pton.c', 'third_party/cares/cares/inet_ntop.c', 'third_party/cares/cares/windows_port.c', + 'third_party/re2/re2/bitstate.cc', + 'third_party/re2/re2/compile.cc', + 'third_party/re2/re2/dfa.cc', + 'third_party/re2/re2/filtered_re2.cc', + 'third_party/re2/re2/mimics_pcre.cc', + 'third_party/re2/re2/nfa.cc', + 'third_party/re2/re2/onepass.cc', + 'third_party/re2/re2/parse.cc', + 'third_party/re2/re2/perl_groups.cc', + 'third_party/re2/re2/prefilter.cc', + 'third_party/re2/re2/prefilter_tree.cc', + 'third_party/re2/re2/prog.cc', + 'third_party/re2/re2/re2.cc', + 'third_party/re2/re2/regexp.cc', + 'third_party/re2/re2/set.cc', + 'third_party/re2/re2/simplify.cc', + 'third_party/re2/re2/stringpiece.cc', + 'third_party/re2/re2/tostring.cc', + 'third_party/re2/re2/unicode_casefold.cc', + 'third_party/re2/re2/unicode_groups.cc', + 'third_party/re2/util/pcre.cc', + 'third_party/re2/util/rune.cc', + 'third_party/re2/util/strutil.cc', 'third_party/upb/upb/decode.c', 'third_party/upb/upb/def.c', 'third_party/upb/upb/encode.c', diff --git a/src/re2/gen_build_yaml.py b/src/re2/gen_build_yaml.py new file mode 100755 index 00000000000..39f4a00ab95 --- /dev/null +++ b/src/re2/gen_build_yaml.py @@ -0,0 +1,49 @@ +#!/usr/bin/env python2.7 + +# Copyright 2015 gRPC authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import print_function +import os +import sys +import glob +import yaml + +os.chdir(os.path.dirname(sys.argv[0]) + '/../..') + +out = {} + +out['libs'] = [{ + #TODO @donnadionne: extracting the list of source files from bazel build to reduce duplication + 'name': + 're2', + 'build': + 'all', + 'language': + 'c', + 'secure': + False, + 'src': + sorted( + glob.glob('third_party/re2/re2/*.cc') + [ + "third_party/re2/util/pcre.cc", "third_party/re2/util/rune.cc", + "third_party/re2/util/strutil.cc" + ]), + 'headers': + sorted( + glob.glob('third_party/re2/re2/*.h') + + glob.glob('third_party/re2/util/*.h')), +}] + +print(yaml.dump(out)) diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index a836f025b76..c7f2556dc92 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -61,6 +61,7 @@ deps.append("${_gRPC_ZLIB_LIBRARIES}") deps.append("${_gRPC_CARES_LIBRARIES}") deps.append("${_gRPC_ADDRESS_SORTING_LIBRARIES}") + deps.append("${_gRPC_RE2_LIBRARIES}") deps.append("${_gRPC_UPB_LIBRARIES}") deps.append("${_gRPC_ALLTARGETS_LIBRARIES}") for d in target_dict.get('deps', []): @@ -185,6 +186,9 @@ set(gRPC_CARES_PROVIDER "module" CACHE STRING "Provider of c-ares library") set_property(CACHE gRPC_CARES_PROVIDER PROPERTY STRINGS "module" "package") + set(gRPC_RE2_PROVIDER "module" CACHE STRING "Provider of re2 library") + set_property(CACHE gRPC_RE2_PROVIDER PROPERTY STRINGS "module" "package") + set(gRPC_SSL_PROVIDER "module" CACHE STRING "Provider of ssl library") set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package") @@ -313,6 +317,7 @@ include(cmake/cares.cmake) include(cmake/gflags.cmake) include(cmake/protobuf.cmake) + include(cmake/re2.cmake) include(cmake/ssl.cmake) include(cmake/upb.cmake) include(cmake/zlib.cmake) @@ -455,7 +460,7 @@ for lib in libs: if lib.build not in ["all", "protoc", "tool", "test", "private"] or lib.boringssl: continue if lib.get('build_system', []) and 'cmake' not in lib.get('build_system', []): continue - if lib.name in ['ares', 'benchmark', 'z']: continue # we build these using CMake instead + if lib.name in ['ares', 'benchmark', 're2', 'z']: continue # we build these using CMake instead if is_absl_lib(lib.name): continue # we build these using CMake instead cmake_libs.append(lib) %> @@ -563,6 +568,7 @@ PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR} <%text>${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + <%text>${_gRPC_RE2_INCLUDE_DIR} <%text>${_gRPC_SSL_INCLUDE_DIR} <%text>${_gRPC_UPB_GENERATED_DIR} <%text>${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -642,6 +648,7 @@ <%text>${CMAKE_CURRENT_SOURCE_DIR} <%text>${CMAKE_CURRENT_SOURCE_DIR}/include <%text>${_gRPC_ADDRESS_SORTING_INCLUDE_DIR} + <%text>${_gRPC_RE2_INCLUDE_DIR} <%text>${_gRPC_SSL_INCLUDE_DIR} <%text>${_gRPC_UPB_GENERATED_DIR} <%text>${_gRPC_UPB_GRPC_GENERATED_DIR} @@ -739,7 +746,7 @@ "high performance general RPC framework" "<%text>${gRPC_CORE_VERSION}" "gpr openssl" - "${" ".join(("-l" + l) for l in ["grpc", "address_sorting", "upb", "cares", "z"] + list_absl_lib_files_for("grpc"))}" + "${" ".join(("-l" + l) for l in ["grpc", "address_sorting", "re2", "upb", "cares", "z"] + list_absl_lib_files_for("grpc"))}" "" "grpc.pc") diff --git a/templates/Makefile.template b/templates/Makefile.template index f1b019ed01b..8e405b45fda 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -619,6 +619,10 @@ GRPC_ABSEIL_DEP = $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a GRPC_ABSEIL_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libgrpc_abseil.a + RE2_DEP = $(LIBDIR)/$(CONFIG)/libre2.a + RE2_MERGE_OBJS = $(LIBRE2_OBJS) + RE2_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libre2.a + UPB_DEP = $(LIBDIR)/$(CONFIG)/libupb.a UPB_MERGE_OBJS = $(LIBUPB_OBJS) UPB_MERGE_LIBS = $(LIBDIR)/$(CONFIG)/libupb.a @@ -1565,7 +1569,7 @@ else % endif - $(LIBDIR)/$(CONFIG)/lib${lib.name}.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) \ + $(LIBDIR)/$(CONFIG)/lib${lib.name}.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP) \ ## The else here corresponds to the if secure earlier. % else: % if lib.language == 'c++': @@ -1583,10 +1587,11 @@ % endif $(LIBDIR)/$(CONFIG)/lib${lib.name}.a: \ - % if lib.name not in ['z', 'ares', 'address_sorting', 'upb', 'grpc_abseil']: + % if lib.name not in ['z', 'ares', 'address_sorting', 're2', 'upb', 'grpc_abseil']: $(ZLIB_DEP) \ $(CARES_DEP) \ $(ADDRESS_SORTING_DEP) \ + $(RE2_DEP) \ $(UPB_DEP) \ $(GRPC_ABSEIL_DEP) \ % endif @@ -1601,6 +1606,7 @@ $(ZLIB_MERGE_OBJS) \ $(CARES_MERGE_OBJS) \ $(ADDRESS_SORTING_MERGE_OBJS) \ + $(RE2_MERGE_OBJS) \ $(UPB_MERGE_OBJS) \ % if lib.get('secure', 'check') == True: $(OPENSSL_MERGE_OBJS) \ @@ -1617,6 +1623,7 @@ $(ZLIB_MERGE_OBJS) \ $(CARES_MERGE_OBJS) \ $(ADDRESS_SORTING_MERGE_OBJS) \ + $(RE2_MERGE_OBJS) \ $(UPB_MERGE_OBJS) \ % if lib.get('secure', 'check') == True: $(OPENSSL_MERGE_OBJS) \ @@ -1640,9 +1647,9 @@ common = '$(LIB' + lib.name.upper() + '_OBJS)' link_libs = '' - lib_deps = ' $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP)' + lib_deps = ' $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP)' mingw_libs = '' - mingw_lib_deps = ' $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP)' + mingw_lib_deps = ' $(ZLIB_DEP) $(CARES_DEP) $(ADDRESS_SORTING_DEP) $(RE2_DEP) $(UPB_DEP) $(GRPC_ABSEIL_DEP)' if lib.language == 'c++': lib_deps += ' $(PROTOBUF_DEP)' mingw_lib_deps += ' $(PROTOBUF_DEP)' @@ -1669,7 +1676,7 @@ security = lib.get('secure', 'check') if security == True: common = common + ' $(OPENSSL_MERGE_LIBS) $(LDLIBS_SECURE)' - common = common + ' $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS)' + common = common + ' $(ZLIB_MERGE_LIBS) $(CARES_MERGE_LIBS) $(ADDRESS_SORTING_MERGE_LIBS) $(RE2_MERGE_LIBS) $(UPB_MERGE_LIBS) $(GRPC_ABSEIL_MERGE_LIBS)' if security in [True, 'check']: for src in lib.src: diff --git a/templates/config.m4.template b/templates/config.m4.template index 8bfa6f03fca..040a60389cc 100644 --- a/templates/config.m4.template +++ b/templates/config.m4.template @@ -13,6 +13,7 @@ PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/abseil-cpp) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/address_sorting/include) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/boringssl-with-bazel/src/include) + PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/re2) PHP_ADD_INCLUDE(PHP_EXT_SRCDIR()/third_party/upb) LIBS="-lpthread $LIBS" diff --git a/templates/config.w32.template b/templates/config.w32.template index 84589544b7a..f113d29b496 100644 --- a/templates/config.w32.template +++ b/templates/config.w32.template @@ -34,6 +34,7 @@ "/I"+configure_module_dirname+"\\third_party\\abseil-cpp "+ "/I"+configure_module_dirname+"\\third_party\\address_sorting\\include "+ "/I"+configure_module_dirname+"\\third_party\\boringssl-with-bazel\\src\\include "+ + "/I"+configure_module_dirname+"\\third_party\\re2 "+ "/I"+configure_module_dirname+"\\third_party\\upb "+ "/I"+configure_module_dirname+"\\third_party\\zlib "); <% diff --git a/templates/gRPC-C++.podspec.template b/templates/gRPC-C++.podspec.template index 1c13a8becd9..e4ea0030a06 100644 --- a/templates/gRPC-C++.podspec.template +++ b/templates/gRPC-C++.podspec.template @@ -66,9 +66,10 @@ # ObjectiveC doesn't use c-ares so we don't need address_sorting files at all address_sorting_unwanted_files = list_lib_files("address_sorting", ("public_headers", "headers", "src")) - grpc_private_files = list(sorted(set(list_lib_files("grpc", ("headers", "src"))) - set(address_sorting_unwanted_files))) - grpc_public_headers = list(sorted(set(list_lib_files("grpc", ("public_headers",))) - set(address_sorting_unwanted_files))) - grpc_private_headers = list(sorted(set(list_lib_files("grpc", ("headers",))) - set(address_sorting_unwanted_files))) + # ObjectiveC needs to obtain re2 explicitly unlike other languages; TODO @donnadionne make ObjC more consistent with others + grpc_private_files = list(sorted((set(list_lib_files("grpc", ("headers", "src"))) - set(address_sorting_unwanted_files)) | set(list_lib_files("re2", ("headers", "src"))))) + grpc_public_headers = list(sorted((set(list_lib_files("grpc", ("public_headers",))) - set(address_sorting_unwanted_files)) | set(list_lib_files("re2", ("public_headers",))))) + grpc_private_headers = list(sorted((set(list_lib_files("grpc", ("headers",))) - set(address_sorting_unwanted_files)) | set(list_lib_files("re2", ("headers",))))) # TODO(jtattermusch): build.yaml no longer has filegroups, so the files here are just hand-listed # This template shouldn't be touching the filegroups anyway, so this is only a bit more fragile. @@ -145,7 +146,7 @@ } s.libraries = 'c++' - s.compiler_flags = '-Wno-comma' + s.compiler_flags = '-Wno-comma -Wno-unreachable-code -Wno-shorten-64-to-32' s.default_subspecs = 'Interface', 'Implementation' @@ -205,5 +206,8 @@ find src/core/ src/cpp/ third_party/upb/ -type f -name '*.grpc_back' -print0 | xargs -0 rm find src/core/ src/cpp/ -type f \\( -name '*.h' -or -name '*.c' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(.*).upb.h";#if COCOAPODS==1\\\n #include "src/core/ext/upb-generated/\\1.upb.h"\\\n#else\\\n #include "\\1.upb.h"\\\n#endif;g' find src/core/ src/cpp/ -type f -name '*.grpc_back' -print0 | xargs -0 rm + find third_party/re2/re2/ third_party/re2/util/ -type f \\( -name '*.h' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "re2/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/re2/\\1"\\\n#else\\\n #include "re2/\\1"\\\n#endif;g;s;#include "util/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/util/\\1"\\\n#else\\\n #include "util/\\1"\\\n#endif;g' + find src/core/ -type f \\( -name '*.h' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "re2/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/re2/\\1"\\\n#else\\\n #include "re2/\\1"\\\n#endif;g' + find src/core/ third_party/re2/ -type f -name '*.grpc_back' -print0 | xargs -0 rm END_OF_COMMAND end diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 13347b78673..3686b45c0df 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -62,9 +62,10 @@ # ObjectiveC doesn't use c-ares so we don't need address_sorting files at all address_sorting_unwanted_files = list_lib_files("address_sorting", ("public_headers", "headers", "src")) - grpc_private_files = list(sorted(set(list_lib_files("grpc", ("headers", "src"))) - set(address_sorting_unwanted_files))) - grpc_public_headers = list(sorted(set(list_lib_files("grpc", ("public_headers",))) - set(address_sorting_unwanted_files))) - grpc_private_headers = list(sorted(set(list_lib_files("grpc", ("headers",))) - set(address_sorting_unwanted_files))) + # ObjectiveC needs to obtain re2 explicitly unlike other languages; TODO @donnadionne make ObjC more consistent with others + grpc_private_files = list(sorted((set(list_lib_files("grpc", ("headers", "src"))) - set(address_sorting_unwanted_files)) | set(list_lib_files("re2", ("headers", "src"))))) + grpc_public_headers = list(sorted((set(list_lib_files("grpc", ("public_headers",))) - set(address_sorting_unwanted_files)) | set(list_lib_files("re2", ("public_headers",))))) + grpc_private_headers = list(sorted((set(list_lib_files("grpc", ("headers",))) - set(address_sorting_unwanted_files)) | set(list_lib_files("re2", ("headers",))))) grpc_abseil_specs = list_abseil_specs("grpc") @@ -197,7 +198,7 @@ % for abseil_spec in grpc_abseil_specs: ss.dependency '${abseil_spec}', abseil_version % endfor - ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC' + ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC -Wno-unreachable-code -Wno-shorten-64-to-32' ss.source_files = ${ruby_multiline_list(grpc_private_files, 22)} ss.private_header_files = ${ruby_multiline_list(grpc_private_headers, 30)} @@ -240,5 +241,8 @@ find src/core/ src/cpp/ third_party/upb/ -type f \\( -name '*.h' -or -name '*.c' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(.*).upb.h";#if COCOAPODS==1\\\n #include "src/core/ext/upb-generated/\\1.upb.h"\\\n#else\\\n #include "\\1.upb.h"\\\n#endif;g' find src/core/ src/cpp/ third_party/upb/ -type f \\( -name '*.h' -or -name '*.c' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "(.*).upbdefs.h";#if COCOAPODS==1\\\n #include "src/core/ext/upb-generated/\\1.upbdefs.h"\\\n#else\\\n #include "\\1.upbdefs.h"\\\n#endif;g' find src/core/ src/cpp/ third_party/upb/ -type f -name '*.grpc_back' -print0 | xargs -0 rm + find third_party/re2/re2/ third_party/re2/util/ -type f \\( -name '*.h' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "re2/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/re2/\\1"\\\n#else\\\n #include "re2/\\1"\\\n#endif;g;s;#include "util/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/util/\\1"\\\n#else\\\n #include "util/\\1"\\\n#endif;g' + find src/core/ -type f \\( -name '*.h' -or -name '*.cc' \\) -print0 | xargs -0 -L1 sed -E -i'.grpc_back' 's;#include "re2/(.*)";#if COCOAPODS==1\\\n #include "third_party/re2/re2/\\1"\\\n#else\\\n #include "re2/\\1"\\\n#endif;g' + find src/core/ third_party/re2/ -type f -name '*.grpc_back' -print0 | xargs -0 rm END_OF_COMMAND end diff --git a/test/cpp/end2end/xds_end2end_test.cc b/test/cpp/end2end/xds_end2end_test.cc index 3f5eded4ace..3395c0401c0 100644 --- a/test/cpp/end2end/xds_end2end_test.cc +++ b/test/cpp/end2end/xds_end2end_test.cc @@ -2639,6 +2639,26 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingMethod) { gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } +// Test that LDS client should reject route which has invalid path regex. +TEST_P(LdsRdsTest, RouteMatchHasInvalidPathRegex) { + gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); + const char* kNewCluster1Name = "new_cluster_1"; + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); + route1->mutable_match()->mutable_safe_regex()->set_regex("a[z-a]"); + route1->mutable_route()->set_cluster(kNewCluster1Name); + SetRouteConfiguration(0, route_config); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + const auto& response_state = RouteConfigurationResponseState(0); + EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); + EXPECT_EQ(response_state.error_message, + "Invalid regex string specified in path matcher."); + gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); +} + // Tests that LDS client should send a NACK if route has an action other than // RouteAction in the LDS response. TEST_P(LdsRdsTest, RouteHasNoRouteAction) { @@ -2783,6 +2803,28 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetClusterHasNoWeight) { gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } +TEST_P(LdsRdsTest, RouteHeaderMatchInvalidRegex) { + gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); + const char* kNewCluster1Name = "new_cluster_1"; + RouteConfiguration route_config = + balancers_[0]->ads_service()->default_route_config(); + auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0); + route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); + auto* header_matcher1 = route1->mutable_match()->add_headers(); + header_matcher1->set_name("header1"); + header_matcher1->mutable_safe_regex_match()->set_regex("a[z-a]"); + route1->mutable_route()->set_cluster(kNewCluster1Name); + SetRouteConfiguration(0, route_config); + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + CheckRpcSendFailure(); + const auto& response_state = RouteConfigurationResponseState(0); + EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED); + EXPECT_EQ(response_state.error_message, + "Invalid regex string specified in header matcher."); + gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); +} + TEST_P(LdsRdsTest, RouteHeaderMatchInvalidRange) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); const char* kNewCluster1Name = "new_cluster_1"; @@ -2965,6 +3007,77 @@ TEST_P(LdsRdsTest, XdsRoutingPrefixMatching) { gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); } +TEST_P(LdsRdsTest, XdsRoutingPathRegexMatching) { + gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); + const char* kNewCluster1Name = "new_cluster_1"; + const char* kNewCluster2Name = "new_cluster_2"; + const size_t kNumEcho1Rpcs = 10; + const size_t kNumEcho2Rpcs = 20; + const size_t kNumEchoRpcs = 30; + SetNextResolution({}); + SetNextResolutionForLbChannelAllBalancers(); + // Populate new EDS resources. + AdsServiceImpl::EdsResourceArgs args({ + {"locality0", GetBackendPorts(0, 2)}, + }); + AdsServiceImpl::EdsResourceArgs args1({ + {"locality0", GetBackendPorts(2, 3)}, + }); + AdsServiceImpl::EdsResourceArgs args2({ + {"locality0", GetBackendPorts(3, 4)}, + }); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args)); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args1, kNewCluster1Name)); + balancers_[0]->ads_service()->SetEdsResource( + AdsServiceImpl::BuildEdsResource(args2, kNewCluster2Name)); + // Populate new CDS resources. + Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster(); + new_cluster1.set_name(kNewCluster1Name); + balancers_[0]->ads_service()->SetCdsResource(new_cluster1); + Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster(); + new_cluster2.set_name(kNewCluster2Name); + balancers_[0]->ads_service()->SetCdsResource(new_cluster2); + // Populating Route Configurations for LDS. + RouteConfiguration new_route_config = + balancers_[0]->ads_service()->default_route_config(); + auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0); + // Will match "/grpc.testing.EchoTest1Service/" + route1->mutable_match()->mutable_safe_regex()->set_regex(".*1.*"); + route1->mutable_route()->set_cluster(kNewCluster1Name); + auto* route2 = new_route_config.mutable_virtual_hosts(0)->add_routes(); + // Will match "/grpc.testing.EchoTest2Service/" + route2->mutable_match()->mutable_safe_regex()->set_regex(".*2.*"); + route2->mutable_route()->set_cluster(kNewCluster2Name); + auto* default_route = new_route_config.mutable_virtual_hosts(0)->add_routes(); + default_route->mutable_match()->set_prefix(""); + default_route->mutable_route()->set_cluster(kDefaultResourceName); + SetRouteConfiguration(0, new_route_config); + WaitForAllBackends(0, 2); + CheckRpcSendOk(kNumEchoRpcs, RpcOptions().set_wait_for_ready(true)); + CheckRpcSendOk( + kNumEcho1Rpcs, + RpcOptions().set_rpc_service(SERVICE_ECHO1).set_wait_for_ready(true)); + CheckRpcSendOk( + kNumEcho2Rpcs, + RpcOptions().set_rpc_service(SERVICE_ECHO2).set_wait_for_ready(true)); + // Make sure RPCs all go to the correct backend. + for (size_t i = 0; i < 2; ++i) { + EXPECT_EQ(kNumEchoRpcs / 2, + backends_[i]->backend_service()->request_count()); + EXPECT_EQ(0, backends_[i]->backend_service1()->request_count()); + EXPECT_EQ(0, backends_[i]->backend_service2()->request_count()); + } + EXPECT_EQ(0, backends_[2]->backend_service()->request_count()); + EXPECT_EQ(kNumEcho1Rpcs, backends_[2]->backend_service1()->request_count()); + EXPECT_EQ(0, backends_[2]->backend_service2()->request_count()); + EXPECT_EQ(0, backends_[3]->backend_service()->request_count()); + EXPECT_EQ(0, backends_[3]->backend_service1()->request_count()); + EXPECT_EQ(kNumEcho2Rpcs, backends_[3]->backend_service2()->request_count()); + gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); +} + TEST_P(LdsRdsTest, XdsRoutingWeightedCluster) { gpr_setenv("GRPC_XDS_EXPERIMENTAL_ROUTING", "true"); const char* kNewCluster1Name = "new_cluster_1"; @@ -3447,6 +3560,9 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatching) { auto* header_matcher1 = route1->mutable_match()->add_headers(); header_matcher1->set_name("header1"); header_matcher1->set_exact_match("POST"); + auto* header_matcher2 = route1->mutable_match()->add_headers(); + header_matcher2->set_name("header2"); + header_matcher2->mutable_safe_regex_match()->set_regex("[a-z]*"); auto* header_matcher3 = route1->mutable_match()->add_headers(); header_matcher3->set_name("header3"); header_matcher3->mutable_range_match()->set_start(1); @@ -3606,7 +3722,7 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingUnmatchCases) { route3->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/"); auto* header_matcher3 = route3->mutable_match()->add_headers(); header_matcher3->set_name("header3"); - header_matcher3->set_suffix_match(".java"); + header_matcher3->mutable_safe_regex_match()->set_regex("[a-z]*"); route3->mutable_route()->set_cluster(kNewCluster3Name); auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes(); default_route->mutable_match()->set_prefix(""); @@ -3616,7 +3732,7 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingUnmatchCases) { std::vector> metadata = { {"header1", "POST1"}, {"header2", "1000"}, - {"header3", "grpc.cpp"}, + {"header3", "123"}, }; WaitForAllBackends(0, 1); CheckRpcSendOk(kNumEchoRpcs, RpcOptions().set_metadata(metadata)); diff --git a/test/distrib/cpp/run_distrib_test_cmake.bat b/test/distrib/cpp/run_distrib_test_cmake.bat index 184d4ce6fa6..9ebc0324224 100644 --- a/test/distrib/cpp/run_distrib_test_cmake.bat +++ b/test/distrib/cpp/run_distrib_test_cmake.bat @@ -50,6 +50,13 @@ cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% -DZLIB_ROOT=%INSTALL_DIR% -Dprotobuf_ cmake --build . --config Release --target install || goto :error popd +@rem Install re2 +mkdir third_party\re2\cmake\build +pushd third_party\re2\cmake\build +cmake -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR% ..\.. +cmake --build . --config Release --target install || goto :error +popd + @rem Install zlib mkdir third_party\zlib\cmake\build pushd third_party\zlib\cmake\build @@ -74,6 +81,7 @@ cmake ^ -DgRPC_ABSL_PROVIDER=package ^ -DgRPC_CARES_PROVIDER=package ^ -DgRPC_PROTOBUF_PROVIDER=package ^ + -DgRPC_RE2_PROVIDER=package ^ -DgRPC_SSL_PROVIDER=package ^ -DgRPC_ZLIB_PROVIDER=package ^ ../.. || goto :error diff --git a/test/distrib/cpp/run_distrib_test_cmake.sh b/test/distrib/cpp/run_distrib_test_cmake.sh index dd3d7fc7a52..247914d901d 100755 --- a/test/distrib/cpp/run_distrib_test_cmake.sh +++ b/test/distrib/cpp/run_distrib_test_cmake.sh @@ -44,6 +44,13 @@ cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release .. make -j4 install popd +# Install re2 +mkdir -p "third_party/re2/cmake/build" +pushd "third_party/re2/cmake/build" +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ../.. +make -j4 install +popd + # Install zlib mkdir -p "third_party/zlib/cmake/build" pushd "third_party/zlib/cmake/build" @@ -66,6 +73,7 @@ cmake \ -DgRPC_CARES_PROVIDER=package \ -DgRPC_ABSL_PROVIDER=package \ -DgRPC_PROTOBUF_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package \ ../.. diff --git a/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh b/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh index 2eef3181b4e..3d02f6e43ef 100755 --- a/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh +++ b/test/distrib/cpp/run_distrib_test_cmake_pkgconfig.sh @@ -41,6 +41,13 @@ cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release .. make -j4 install popd +# Install re2 +mkdir -p "third_party/re2/cmake/build" +pushd "third_party/re2/cmake/build" +cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE ../.. +make -j4 install +popd + # Install zlib mkdir -p "third_party/zlib/cmake/build" pushd "third_party/zlib/cmake/build" @@ -64,6 +71,7 @@ cmake \ -DgRPC_ABSL_PROVIDER=package \ -DgRPC_CARES_PROVIDER=package \ -DgRPC_PROTOBUF_PROVIDER=package \ + -DgRPC_RE2_PROVIDER=package \ -DgRPC_SSL_PROVIDER=package \ -DgRPC_ZLIB_PROVIDER=package \ ../.. diff --git a/third_party/re2 b/third_party/re2 new file mode 160000 index 00000000000..aecba11114c --- /dev/null +++ b/third_party/re2 @@ -0,0 +1 @@ +Subproject commit aecba11114cf1fac5497aeb844b6966106de3eb6 diff --git a/tools/buildgen/generate_build_additions.sh b/tools/buildgen/generate_build_additions.sh index e873789e9a9..84252ddde73 100755 --- a/tools/buildgen/generate_build_additions.sh +++ b/tools/buildgen/generate_build_additions.sh @@ -20,6 +20,7 @@ gen_build_yaml_dirs=" \ src/boringssl \ src/benchmark \ src/proto \ + src/re2 \ src/upb \ src/zlib \ src/c-ares \ diff --git a/tools/run_tests/sanity/check_bazel_workspace.py b/tools/run_tests/sanity/check_bazel_workspace.py index 9e53dff1b79..69afd0860e3 100755 --- a/tools/run_tests/sanity/check_bazel_workspace.py +++ b/tools/run_tests/sanity/check_bazel_workspace.py @@ -65,6 +65,7 @@ _GRPC_DEP_NAMES = [ 'build_bazel_rules_apple', 'build_bazel_apple_support', 'libuv', + 'com_github_google_re2', ] _GRPC_BAZEL_ONLY_DEPS = [ diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index e301924e83d..174debcc5b7 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -38,6 +38,7 @@ cat << EOF | awk '{ print $1 }' | sort > "$want_submodules" 15ae750151ac9341e5945eb38f8982d59fb99201 third_party/libuv (v1.34.0) 678da4f76eb9168c9965afc2149944a66cd48546 third_party/protobuf (v3.12.2) 0f2bc6c0fdac9113e3863ea6e30e5b2bd33e3b40 third_party/protoc-gen-validate (v0.0.10) + aecba11114cf1fac5497aeb844b6966106de3eb6 third_party/re2 (heads/master) e8cd3a4bb307e2c810cffff99f93e96e6d7fee85 third_party/udpa (heads/master) cacf7f1d4e3d44d871b605da3b647f07d718623f third_party/zlib (v1.2.11) EOF From 0ab6db4fe88c14e8115190cc6682faca4391bfb1 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 7 Jul 2020 13:49:11 -0700 Subject: [PATCH 219/239] Make sure that some ops don't start concurrently with Finish --- test/cpp/end2end/test_service_impl.cc | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index a45f4cfe353..bd12d76fd51 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -502,12 +502,20 @@ CallbackTestServiceImpl::ResponseStream( if (num_msgs_sent_ == server_responses_to_send_ - 1 && server_coalescing_api_ != 0) { num_msgs_sent_++; - StartWriteLast(&response_, WriteOptions()); + { + std::lock_guard l(finish_mu_); + if (!finished_) { + StartWriteLast(&response_, WriteOptions()); + } + } // If we use WriteLast, we shouldn't wait before attempting Finish FinishOnce(Status::OK); } else { num_msgs_sent_++; - StartWrite(&response_); + std::lock_guard l(finish_mu_); + if (!finished_) { + StartWrite(&response_); + } } } experimental::CallbackServerContext* const ctx_; @@ -571,12 +579,15 @@ CallbackTestServiceImpl::BidiStream( if (ok) { num_msgs_read_++; response_.set_message(request_.message()); - if (num_msgs_read_ == server_write_last_) { - StartWriteLast(&response_, WriteOptions()); - // If we use WriteLast, we shouldn't wait before attempting Finish - } else { - StartWrite(&response_); - return; + std::lock_guard l(finish_mu_); + if (!finished_) { + if (num_msgs_read_ == server_write_last_) { + StartWriteLast(&response_, WriteOptions()); + // If we use WriteLast, we shouldn't wait before attempting Finish + } else { + StartWrite(&response_); + return; + } } } From 702dd6fd74f4bbe5dc08fa944c80a78f1b6f8999 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 7 Jul 2020 16:49:06 -0700 Subject: [PATCH 220/239] Store ref to the ExternalConnectivityWatcher in external_watchers_ map. --- .../filters/client_channel/client_channel.cc | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 921de985972..f652a6113e6 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -171,12 +171,13 @@ class ChannelData { grpc_connectivity_state* state, grpc_closure* on_complete, grpc_closure* watcher_timer_init) { - auto* watcher = new ExternalConnectivityWatcher( + auto watcher = MakeRefCounted( this, pollent, state, on_complete, watcher_timer_init); { MutexLock lock(&external_watchers_mu_); // Will be deleted when the watch is complete. GPR_ASSERT(external_watchers_[on_complete] == nullptr); + // Pass a ref to the external_watchers_ map. external_watchers_[on_complete] = watcher; } watcher->Start(); @@ -184,12 +185,12 @@ class ChannelData { void RemoveExternalConnectivityWatcher(grpc_closure* on_complete, bool cancel) { - ExternalConnectivityWatcher* watcher = nullptr; + RefCountedPtr watcher; { MutexLock lock(&external_watchers_mu_); auto it = external_watchers_.find(on_complete); if (it != external_watchers_.end()) { - watcher = it->second; + watcher = std::move(it->second); external_watchers_.erase(it); } } @@ -360,7 +361,8 @@ class ChannelData { // synchronously via grpc_channel_num_external_connectivity_watchers(). // mutable Mutex external_watchers_mu_; - std::map external_watchers_; + std::map> + external_watchers_; }; // @@ -1181,8 +1183,14 @@ ChannelData::ExternalConnectivityWatcher::~ExternalConnectivityWatcher() { } void ChannelData::ExternalConnectivityWatcher::Start() { - chand_->work_serializer_->Run([this]() { AddWatcherLocked(); }, - DEBUG_LOCATION); + // Ref owned by the lambda + Ref(DEBUG_LOCATION, "Start").release(); + chand_->work_serializer_->Run( + [this]() { + AddWatcherLocked(); + Unref(DEBUG_LOCATION, "Start"); + }, + DEBUG_LOCATION); } void ChannelData::ExternalConnectivityWatcher::Notify( @@ -1222,7 +1230,8 @@ void ChannelData::ExternalConnectivityWatcher::AddWatcherLocked() { Closure::Run(DEBUG_LOCATION, watcher_timer_init_, GRPC_ERROR_NONE); // Add new watcher. chand_->state_tracker_.AddWatcher( - initial_state_, OrphanablePtr(this)); + initial_state_, + OrphanablePtr(Ref().release())); } void ChannelData::ExternalConnectivityWatcher::RemoveWatcherLocked() { From 4d0269f0fdfe64912855f22481d77a5d710fb876 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Tue, 7 Jul 2020 18:36:41 -0700 Subject: [PATCH 221/239] Add comment --- src/core/ext/filters/client_channel/client_channel.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index f652a6113e6..43a3688e2ab 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -177,7 +177,9 @@ class ChannelData { MutexLock lock(&external_watchers_mu_); // Will be deleted when the watch is complete. GPR_ASSERT(external_watchers_[on_complete] == nullptr); - // Pass a ref to the external_watchers_ map. + // Pass a ref to the external_watchers_ map. We are taking an additional + // ref on the watcher so that we can maintain lifetime guarantees when + // watcher->Start() is called after the critical section. external_watchers_[on_complete] = watcher; } watcher->Start(); From f9111b2a82b03906e59e8b32d2b92874dff89f9a Mon Sep 17 00:00:00 2001 From: miyucy Date: Wed, 8 Jul 2020 15:06:51 +0900 Subject: [PATCH 222/239] Fix ruby 2.7 keyword arguments deprecation Similar to https://github.com/grpc/grpc/pull/22915 --- src/ruby/lib/grpc/generic/interceptors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby/lib/grpc/generic/interceptors.rb b/src/ruby/lib/grpc/generic/interceptors.rb index ace22205cad..0f50ff3dc62 100644 --- a/src/ruby/lib/grpc/generic/interceptors.rb +++ b/src/ruby/lib/grpc/generic/interceptors.rb @@ -172,7 +172,7 @@ module GRPC i = @interceptors.pop return yield unless i - i.send(type, args) do + i.send(type, **args) do if @interceptors.any? intercept!(type, args) do yield From fe2e9d68034a0a055669939b974e2f58153156f9 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 8 Jul 2020 09:06:47 -0700 Subject: [PATCH 223/239] Properly count messages sent --- test/cpp/end2end/test_service_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index bd12d76fd51..3ef49e6612a 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -501,19 +501,19 @@ CallbackTestServiceImpl::ResponseStream( std::to_string(num_msgs_sent_)); if (num_msgs_sent_ == server_responses_to_send_ - 1 && server_coalescing_api_ != 0) { - num_msgs_sent_++; { std::lock_guard l(finish_mu_); if (!finished_) { + num_msgs_sent_++; StartWriteLast(&response_, WriteOptions()); } } // If we use WriteLast, we shouldn't wait before attempting Finish FinishOnce(Status::OK); } else { - num_msgs_sent_++; std::lock_guard l(finish_mu_); if (!finished_) { + num_msgs_sent_++; StartWrite(&response_); } } From b96edd3072a1063eda61d3dc5c27b78568cc9ef6 Mon Sep 17 00:00:00 2001 From: Richard Belleville Date: Wed, 8 Jul 2020 10:52:32 -0700 Subject: [PATCH 224/239] Stop trying to handle SIGSEGV --- src/python/grpcio_tests/tests/_runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/python/grpcio_tests/tests/_runner.py b/src/python/grpcio_tests/tests/_runner.py index 9caa297942b..39da0399b02 100644 --- a/src/python/grpcio_tests/tests/_runner.py +++ b/src/python/grpcio_tests/tests/_runner.py @@ -183,7 +183,6 @@ class Runner(object): pass try_set_handler('SIGINT', sigint_handler) - try_set_handler('SIGSEGV', fault_handler) try_set_handler('SIGBUS', fault_handler) try_set_handler('SIGABRT', fault_handler) try_set_handler('SIGFPE', fault_handler) From 7c3fefea3f79710d17e064395ccfe34434ba46e7 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 7 Jul 2020 15:25:36 -0700 Subject: [PATCH 225/239] Make request path more easily visible to LB policies. --- .../filters/client_channel/client_channel.cc | 14 +- .../ext/filters/client_channel/lb_policy.h | 2 + .../lb_policy/xds/xds_routing.cc | 4 +- test/core/util/test_lb_policies.cc | 182 +++++++++++++----- test/core/util/test_lb_policies.h | 24 ++- test/cpp/end2end/client_lb_end2end_test.cc | 98 +++++++++- 6 files changed, 266 insertions(+), 58 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 921de985972..b0788a9d2ba 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -413,7 +413,8 @@ class CallData { iterator begin() const override { static_assert(sizeof(grpc_linked_mdelem*) <= sizeof(intptr_t), "iterator size too large"); - return iterator(this, reinterpret_cast(batch_->list.head)); + return iterator( + this, reinterpret_cast(MaybeSkipEntry(batch_->list.head))); } iterator end() const override { static_assert(sizeof(grpc_linked_mdelem*) <= sizeof(intptr_t), @@ -430,11 +431,19 @@ class CallData { } private: + grpc_linked_mdelem* MaybeSkipEntry(grpc_linked_mdelem* entry) const { + if (entry != nullptr && batch_->idx.named.path == entry) { + return entry->next; + } + return entry; + } + intptr_t IteratorHandleNext(intptr_t handle) const override { grpc_linked_mdelem* linked_mdelem = reinterpret_cast(handle); - return reinterpret_cast(linked_mdelem->next); + return reinterpret_cast(MaybeSkipEntry(linked_mdelem->next)); } + std::pair IteratorHandleGet( intptr_t handle) const override { grpc_linked_mdelem* linked_mdelem = @@ -4024,6 +4033,7 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem, // subchannel's copy of the metadata batch (which is copied for each // attempt) to the LB policy instead the one from the parent channel. LoadBalancingPolicy::PickArgs pick_args; + pick_args.path = StringViewFromSlice(path_); pick_args.call_state = &lb_call_state_; Metadata initial_metadata(this, initial_metadata_batch); pick_args.initial_metadata = &initial_metadata; diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 7a775af82f6..6a290a3f51b 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -190,6 +190,8 @@ class LoadBalancingPolicy : public InternallyRefCounted { /// Arguments used when picking a subchannel for a call. struct PickArgs { + /// The path of the call. Indicates the RPC service and method name. + absl::string_view path; /// Initial metadata associated with the picking call. /// The LB policy may use the existing metadata to influence its routing /// decision, and it may add new metadata elements to be sent with the diff --git a/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc b/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc index 59c423f0317..9d9865563e2 100644 --- a/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +++ b/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc @@ -305,9 +305,7 @@ bool UnderFraction(const uint32_t fraction_per_million) { XdsRoutingLb::PickResult XdsRoutingLb::RoutePicker::Pick(PickArgs args) { for (const Route& route : route_table_) { // Path matching. - auto path = GetMetadataValue(":path", args.initial_metadata); - GPR_DEBUG_ASSERT(path.has_value()); - if (!PathMatch(path.value(), route.matchers->path_matcher)) continue; + if (!PathMatch(args.path, route.matchers->path_matcher)) continue; // Header Matching. if (!HeadersMatch(args, route.matchers->header_matchers)) continue; // Match fraction check diff --git a/test/core/util/test_lb_policies.cc b/test/core/util/test_lb_policies.cc index eae25bc4265..56978b97949 100644 --- a/test/core/util/test_lb_policies.cc +++ b/test/core/util/test_lb_policies.cc @@ -39,8 +39,6 @@ namespace grpc_core { -TraceFlag grpc_trace_forwarding_lb(false, "forwarding_lb"); - namespace { // @@ -80,6 +78,117 @@ class ForwardingLoadBalancingPolicy : public LoadBalancingPolicy { OrphanablePtr delegate_; }; +// +// CopyMetadataToVector() +// + +MetadataVector CopyMetadataToVector( + LoadBalancingPolicy::MetadataInterface* metadata) { + MetadataVector result; + for (const auto& p : *metadata) { + result.push_back({std::string(p.first), std::string(p.second)}); + } + return result; +} + +// +// TestPickArgsLb +// + +constexpr char kTestPickArgsLbPolicyName[] = "test_pick_args_lb"; + +class TestPickArgsLb : public ForwardingLoadBalancingPolicy { + public: + TestPickArgsLb(Args args, TestPickArgsCallback cb) + : ForwardingLoadBalancingPolicy( + absl::make_unique(RefCountedPtr(this), cb), + std::move(args), + /*delegate_lb_policy_name=*/"pick_first", + /*initial_refcount=*/2) {} + + ~TestPickArgsLb() override = default; + + const char* name() const override { return kTestPickArgsLbPolicyName; } + + private: + class Picker : public SubchannelPicker { + public: + Picker(std::unique_ptr delegate_picker, + TestPickArgsCallback cb) + : delegate_picker_(std::move(delegate_picker)), cb_(std::move(cb)) {} + + PickResult Pick(PickArgs args) override { + // Report args seen. + PickArgsSeen args_seen; + args_seen.path = std::string(args.path); + args_seen.metadata = CopyMetadataToVector(args.initial_metadata); + cb_(args_seen); + // Do pick. + return delegate_picker_->Pick(args); + } + + private: + std::unique_ptr delegate_picker_; + TestPickArgsCallback cb_; + }; + + class Helper : public ChannelControlHelper { + public: + Helper(RefCountedPtr parent, TestPickArgsCallback cb) + : parent_(std::move(parent)), cb_(std::move(cb)) {} + + RefCountedPtr CreateSubchannel( + const grpc_channel_args& args) override { + return parent_->channel_control_helper()->CreateSubchannel(args); + } + + void UpdateState(grpc_connectivity_state state, + std::unique_ptr picker) override { + parent_->channel_control_helper()->UpdateState( + state, absl::make_unique(std::move(picker), cb_)); + } + + void RequestReresolution() override { + parent_->channel_control_helper()->RequestReresolution(); + } + + void AddTraceEvent(TraceSeverity severity, + absl::string_view message) override { + parent_->channel_control_helper()->AddTraceEvent(severity, message); + } + + private: + RefCountedPtr parent_; + TestPickArgsCallback cb_; + }; +}; + +class TestPickArgsLbConfig : public LoadBalancingPolicy::Config { + public: + const char* name() const override { return kTestPickArgsLbPolicyName; } +}; + +class TestPickArgsLbFactory : public LoadBalancingPolicyFactory { + public: + explicit TestPickArgsLbFactory(TestPickArgsCallback cb) + : cb_(std::move(cb)) {} + + OrphanablePtr CreateLoadBalancingPolicy( + LoadBalancingPolicy::Args args) const override { + return MakeOrphanable(std::move(args), cb_); + } + + const char* name() const override { return kTestPickArgsLbPolicyName; } + + RefCountedPtr ParseLoadBalancingConfig( + const Json& /*json*/, grpc_error** /*error*/) const override { + return MakeRefCounted(); + } + + private: + TestPickArgsCallback cb_; +}; + // // InterceptRecvTrailingMetadataLoadBalancingPolicy // @@ -91,12 +200,12 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy : public ForwardingLoadBalancingPolicy { public: InterceptRecvTrailingMetadataLoadBalancingPolicy( - Args args, InterceptRecvTrailingMetadataCallback cb, void* user_data) + Args args, InterceptRecvTrailingMetadataCallback cb) : ForwardingLoadBalancingPolicy( - std::unique_ptr(new Helper( + absl::make_unique( RefCountedPtr( this), - cb, user_data)), + std::move(cb)), std::move(args), /*delegate_lb_policy_name=*/"pick_first", /*initial_refcount=*/2) {} @@ -110,24 +219,18 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy private: class Picker : public SubchannelPicker { public: - explicit Picker(std::unique_ptr delegate_picker, - InterceptRecvTrailingMetadataCallback cb, void* user_data) - : delegate_picker_(std::move(delegate_picker)), - cb_(cb), - user_data_(user_data) {} + Picker(std::unique_ptr delegate_picker, + InterceptRecvTrailingMetadataCallback cb) + : delegate_picker_(std::move(delegate_picker)), cb_(std::move(cb)) {} PickResult Pick(PickArgs args) override { - // Check that we can read initial metadata. - gpr_log(GPR_INFO, "initial metadata:"); - InterceptRecvTrailingMetadataLoadBalancingPolicy::LogMetadata( - args.initial_metadata); // Do pick. PickResult result = delegate_picker_->Pick(args); // Intercept trailing metadata. if (result.type == PickResult::PICK_COMPLETE && result.subchannel != nullptr) { new (args.call_state->Alloc(sizeof(TrailingMetadataHandler))) - TrailingMetadataHandler(&result, cb_, user_data_); + TrailingMetadataHandler(&result, cb_); } return result; } @@ -135,15 +238,14 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy private: std::unique_ptr delegate_picker_; InterceptRecvTrailingMetadataCallback cb_; - void* user_data_; }; class Helper : public ChannelControlHelper { public: Helper( RefCountedPtr parent, - InterceptRecvTrailingMetadataCallback cb, void* user_data) - : parent_(std::move(parent)), cb_(cb), user_data_(user_data) {} + InterceptRecvTrailingMetadataCallback cb) + : parent_(std::move(parent)), cb_(std::move(cb)) {} RefCountedPtr CreateSubchannel( const grpc_channel_args& args) override { @@ -153,8 +255,7 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy void UpdateState(grpc_connectivity_state state, std::unique_ptr picker) override { parent_->channel_control_helper()->UpdateState( - state, std::unique_ptr( - new Picker(std::move(picker), cb_, user_data_))); + state, absl::make_unique(std::move(picker), cb_)); } void RequestReresolution() override { @@ -169,15 +270,13 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy private: RefCountedPtr parent_; InterceptRecvTrailingMetadataCallback cb_; - void* user_data_; }; class TrailingMetadataHandler { public: TrailingMetadataHandler(PickResult* result, - InterceptRecvTrailingMetadataCallback cb, - void* user_data) - : cb_(cb), user_data_(user_data) { + InterceptRecvTrailingMetadataCallback cb) + : cb_(std::move(cb)) { result->recv_trailing_metadata_ready = [this](grpc_error* error, MetadataInterface* metadata, CallState* call_state) { @@ -189,25 +288,16 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy void RecordRecvTrailingMetadata(grpc_error* /*error*/, MetadataInterface* recv_trailing_metadata, CallState* call_state) { + TrailingMetadataArgsSeen args_seen; + args_seen.backend_metric_data = call_state->GetBackendMetricData(); GPR_ASSERT(recv_trailing_metadata != nullptr); - gpr_log(GPR_INFO, "trailing metadata:"); - InterceptRecvTrailingMetadataLoadBalancingPolicy::LogMetadata( - recv_trailing_metadata); - cb_(user_data_, call_state->GetBackendMetricData()); + args_seen.metadata = CopyMetadataToVector(recv_trailing_metadata); + cb_(args_seen); this->~TrailingMetadataHandler(); } InterceptRecvTrailingMetadataCallback cb_; - void* user_data_; }; - - static void LogMetadata(MetadataInterface* metadata) { - for (const auto& p : *metadata) { - gpr_log(GPR_INFO, " \"%.*s\"=>\"%.*s\"", - static_cast(p.first.size()), p.first.data(), - static_cast(p.second.size()), p.second.data()); - } - } }; class InterceptTrailingConfig : public LoadBalancingPolicy::Config { @@ -219,14 +309,13 @@ class InterceptTrailingConfig : public LoadBalancingPolicy::Config { class InterceptTrailingFactory : public LoadBalancingPolicyFactory { public: - explicit InterceptTrailingFactory(InterceptRecvTrailingMetadataCallback cb, - void* user_data) - : cb_(cb), user_data_(user_data) {} + explicit InterceptTrailingFactory(InterceptRecvTrailingMetadataCallback cb) + : cb_(std::move(cb)) {} OrphanablePtr CreateLoadBalancingPolicy( LoadBalancingPolicy::Args args) const override { return MakeOrphanable( - std::move(args), cb_, user_data_); + std::move(args), cb_); } const char* name() const override { @@ -240,16 +329,19 @@ class InterceptTrailingFactory : public LoadBalancingPolicyFactory { private: InterceptRecvTrailingMetadataCallback cb_; - void* user_data_; }; } // namespace +void RegisterTestPickArgsLoadBalancingPolicy(TestPickArgsCallback cb) { + LoadBalancingPolicyRegistry::Builder::RegisterLoadBalancingPolicyFactory( + absl::make_unique(std::move(cb))); +} + void RegisterInterceptRecvTrailingMetadataLoadBalancingPolicy( - InterceptRecvTrailingMetadataCallback cb, void* user_data) { + InterceptRecvTrailingMetadataCallback cb) { LoadBalancingPolicyRegistry::Builder::RegisterLoadBalancingPolicyFactory( - std::unique_ptr( - new InterceptTrailingFactory(cb, user_data))); + absl::make_unique(std::move(cb))); } } // namespace grpc_core diff --git a/test/core/util/test_lb_policies.h b/test/core/util/test_lb_policies.h index 3652515e57e..ffb079181ea 100644 --- a/test/core/util/test_lb_policies.h +++ b/test/core/util/test_lb_policies.h @@ -23,14 +23,32 @@ namespace grpc_core { -typedef void (*InterceptRecvTrailingMetadataCallback)( - void*, const LoadBalancingPolicy::BackendMetricData*); +using MetadataVector = std::vector>; + +struct PickArgsSeen { + std::string path; + MetadataVector metadata; +}; + +using TestPickArgsCallback = std::function; + +// Registers an LB policy called "test_pick_args_lb" that checks the args +// passed to SubchannelPicker::Pick(). +void RegisterTestPickArgsLoadBalancingPolicy(TestPickArgsCallback cb); + +struct TrailingMetadataArgsSeen { + const LoadBalancingPolicy::BackendMetricData* backend_metric_data; + MetadataVector metadata; +}; + +using InterceptRecvTrailingMetadataCallback = + std::function; // Registers an LB policy called "intercept_trailing_metadata_lb" that // invokes cb with argument user_data when trailing metadata is received // for each call. void RegisterInterceptRecvTrailingMetadataLoadBalancingPolicy( - InterceptRecvTrailingMetadataCallback cb, void* user_data); + InterceptRecvTrailingMetadataCallback cb); } // namespace grpc_core diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index 174c09cd79d..0a4aa4a15a3 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -295,9 +295,13 @@ class ClientLbEnd2endTest : public ::testing::Test { if (local_response) response = new EchoResponse; EchoRequest request; request.set_message(kRequestMessage_); + request.mutable_param()->set_echo_metadata(true); ClientContext context; context.set_deadline(grpc_timeout_milliseconds_to_deadline(timeout_ms)); if (wait_for_ready) context.set_wait_for_ready(true); + context.AddMetadata("foo", "1"); + context.AddMetadata("bar", "2"); + context.AddMetadata("baz", "3"); Status status = stub->Echo(&context, request, response); if (result != nullptr) *result = status; if (local_response) delete response; @@ -1632,19 +1636,82 @@ TEST_F(ClientLbEnd2endTest, ChannelIdleness) { EXPECT_EQ(channel->GetState(false), GRPC_CHANNEL_READY); } -class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest { +class ClientLbPickArgsTest : public ClientLbEnd2endTest { protected: void SetUp() override { ClientLbEnd2endTest::SetUp(); current_test_instance_ = this; } - void TearDown() override { ClientLbEnd2endTest::TearDown(); } + static void SetUpTestCase() { + grpc_init(); + grpc_core::RegisterTestPickArgsLoadBalancingPolicy(SavePickArgs); + } + + static void TearDownTestCase() { grpc_shutdown_blocking(); } + + const std::vector& args_seen_list() { + grpc::internal::MutexLock lock(&mu_); + return args_seen_list_; + } + + private: + static void SavePickArgs(const grpc_core::PickArgsSeen& args_seen) { + ClientLbPickArgsTest* self = current_test_instance_; + grpc::internal::MutexLock lock(&self->mu_); + self->args_seen_list_.emplace_back(args_seen); + } + + static ClientLbPickArgsTest* current_test_instance_; + grpc::internal::Mutex mu_; + std::vector args_seen_list_; +}; + +ClientLbPickArgsTest* ClientLbPickArgsTest::current_test_instance_ = nullptr; + +TEST_F(ClientLbPickArgsTest, Basic) { + const int kNumServers = 1; + StartServers(kNumServers); + auto response_generator = BuildResolverResponseGenerator(); + auto channel = BuildChannel("test_pick_args_lb", response_generator); + auto stub = BuildStub(channel); + response_generator.SetNextResolution(GetServersPorts()); + CheckRpcSendOk(stub, DEBUG_LOCATION, /*wait_for_ready=*/true); + // Check LB policy name for the channel. + EXPECT_EQ("test_pick_args_lb", channel->GetLoadBalancingPolicyName()); + // There will be two entries, one for the pick tried in state + // CONNECTING and another for the pick tried in state READY. + EXPECT_THAT(args_seen_list(), + ::testing::ElementsAre( + ::testing::AllOf( + ::testing::Field(&grpc_core::PickArgsSeen::path, + "/grpc.testing.EchoTestService/Echo"), + ::testing::Field(&grpc_core::PickArgsSeen::metadata, + ::testing::UnorderedElementsAre( + ::testing::Pair("foo", "1"), + ::testing::Pair("bar", "2"), + ::testing::Pair("baz", "3")))), + ::testing::AllOf( + ::testing::Field(&grpc_core::PickArgsSeen::path, + "/grpc.testing.EchoTestService/Echo"), + ::testing::Field(&grpc_core::PickArgsSeen::metadata, + ::testing::UnorderedElementsAre( + ::testing::Pair("foo", "1"), + ::testing::Pair("bar", "2"), + ::testing::Pair("baz", "3")))))); +} + +class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest { + protected: + void SetUp() override { + ClientLbEnd2endTest::SetUp(); + current_test_instance_ = this; + } static void SetUpTestCase() { grpc_init(); grpc_core::RegisterInterceptRecvTrailingMetadataLoadBalancingPolicy( - ReportTrailerIntercepted, nullptr); + ReportTrailerIntercepted); } static void TearDownTestCase() { grpc_shutdown_blocking(); } @@ -1654,6 +1721,11 @@ class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest { return trailers_intercepted_; } + const grpc_core::MetadataVector& trailing_metadata() { + grpc::internal::MutexLock lock(&mu_); + return trailing_metadata_; + } + const udpa::data::orca::v1::OrcaLoadReport* backend_load_report() { grpc::internal::MutexLock lock(&mu_); return load_report_.get(); @@ -1661,11 +1733,12 @@ class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest { private: static void ReportTrailerIntercepted( - void* arg, const grpc_core::LoadBalancingPolicy::BackendMetricData* - backend_metric_data) { + const grpc_core::TrailingMetadataArgsSeen& args_seen) { + const auto* backend_metric_data = args_seen.backend_metric_data; ClientLbInterceptTrailingMetadataTest* self = current_test_instance_; grpc::internal::MutexLock lock(&self->mu_); self->trailers_intercepted_++; + self->trailing_metadata_ = args_seen.metadata; if (backend_metric_data != nullptr) { self->load_report_.reset(new udpa::data::orca::v1::OrcaLoadReport); self->load_report_->set_cpu_utilization( @@ -1689,6 +1762,7 @@ class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest { static ClientLbInterceptTrailingMetadataTest* current_test_instance_; grpc::internal::Mutex mu_; int trailers_intercepted_ = 0; + grpc_core::MetadataVector trailing_metadata_; std::unique_ptr load_report_; }; @@ -1711,6 +1785,13 @@ TEST_F(ClientLbInterceptTrailingMetadataTest, InterceptsRetriesDisabled) { EXPECT_EQ("intercept_trailing_metadata_lb", channel->GetLoadBalancingPolicyName()); EXPECT_EQ(kNumRpcs, trailers_intercepted()); + EXPECT_THAT(trailing_metadata(), + ::testing::UnorderedElementsAre( + // TODO(roth): Should grpc-status be visible here? + ::testing::Pair("grpc-status", "0"), + ::testing::Pair("user-agent", ::testing::_), + ::testing::Pair("foo", "1"), ::testing::Pair("bar", "2"), + ::testing::Pair("baz", "3"))); EXPECT_EQ(nullptr, backend_load_report()); } @@ -1746,6 +1827,13 @@ TEST_F(ClientLbInterceptTrailingMetadataTest, InterceptsRetriesEnabled) { EXPECT_EQ("intercept_trailing_metadata_lb", channel->GetLoadBalancingPolicyName()); EXPECT_EQ(kNumRpcs, trailers_intercepted()); + EXPECT_THAT(trailing_metadata(), + ::testing::UnorderedElementsAre( + // TODO(roth): Should grpc-status be visible here? + ::testing::Pair("grpc-status", "0"), + ::testing::Pair("user-agent", ::testing::_), + ::testing::Pair("foo", "1"), ::testing::Pair("bar", "2"), + ::testing::Pair("baz", "3"))); EXPECT_EQ(nullptr, backend_load_report()); } From 98684b59f954bf6ffae89dbe95cc27fcf60fa7d5 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 8 Jul 2020 15:03:37 -0700 Subject: [PATCH 226/239] Reviewer comments --- .../filters/client_channel/client_channel.cc | 86 +++++++++++++------ 1 file changed, 61 insertions(+), 25 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 43a3688e2ab..72d351fb915 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -171,34 +171,22 @@ class ChannelData { grpc_connectivity_state* state, grpc_closure* on_complete, grpc_closure* watcher_timer_init) { - auto watcher = MakeRefCounted( + auto watcher = new ExternalConnectivityWatcher( this, pollent, state, on_complete, watcher_timer_init); { MutexLock lock(&external_watchers_mu_); - // Will be deleted when the watch is complete. - GPR_ASSERT(external_watchers_[on_complete] == nullptr); - // Pass a ref to the external_watchers_ map. We are taking an additional - // ref on the watcher so that we can maintain lifetime guarantees when - // watcher->Start() is called after the critical section. - external_watchers_[on_complete] = watcher; + // Store a ref to the watcher in the external_watchers_ map. + watcher->AddWatcherToExternalWatchersMapLocked(&external_watchers_, + on_complete); } + // Pass the ref from creating the object to Start(). watcher->Start(); } void RemoveExternalConnectivityWatcher(grpc_closure* on_complete, bool cancel) { - RefCountedPtr watcher; - { - MutexLock lock(&external_watchers_mu_); - auto it = external_watchers_.find(on_complete); - if (it != external_watchers_.end()) { - watcher = std::move(it->second); - external_watchers_.erase(it); - } - } - // watcher->Cancel() will hop into the WorkSerializer, so we have to unlock - // the mutex before calling it. - if (watcher != nullptr && cancel) watcher->Cancel(); + ExternalConnectivityWatcher::RemoveWatcherFromExternalWatchersMap( + &external_watchers_mu_, &external_watchers_, on_complete, cancel); } int NumExternalConnectivityWatchers() const { @@ -229,6 +217,22 @@ class ChannelData { ~ExternalConnectivityWatcher(); + // Adds the watcher to the external_watchers_ map. Synchronized by + // external_watchers_mu_ + void AddWatcherToExternalWatchersMapLocked( + std::map>* + external_watchers, + grpc_closure* on_complete); + + // Removes the watcher from the external_watchers_ map. + static void RemoveWatcherFromExternalWatchersMap( + Mutex* external_watchers_mu, + std::map>* + external_watchers, + grpc_closure* on_complete, bool cancel); + + // Starts the watch. Consumes the ref from the creation of the + // ExternalConnectivityWatcher object. void Start(); void Notify(grpc_connectivity_state state) override; @@ -236,6 +240,8 @@ class ChannelData { void Cancel(); private: + // Adds the watcher to state_tracker_. Consumes the ref that is passed to it + // from Start(). void AddWatcherLocked(); void RemoveWatcherLocked(); @@ -1184,13 +1190,44 @@ ChannelData::ExternalConnectivityWatcher::~ExternalConnectivityWatcher() { "ExternalConnectivityWatcher"); } +void ChannelData::ExternalConnectivityWatcher:: + AddWatcherToExternalWatchersMapLocked( + std::map>* + external_watchers, + grpc_closure* on_complete) { + // Will be deleted when the watch is complete. + GPR_ASSERT((*external_watchers)[on_complete] == nullptr); + (*external_watchers)[on_complete] = + Ref(DEBUG_LOCATION, "AddWatcherToExternalWatchersMapLocked"); +} + +void ChannelData::ExternalConnectivityWatcher:: + RemoveWatcherFromExternalWatchersMap( + Mutex* external_watchers_mu, + std::map>* + external_watchers, + grpc_closure* on_complete, bool cancel) { + RefCountedPtr watcher; + { + MutexLock lock(external_watchers_mu); + auto it = (*external_watchers).find(on_complete); + if (it != (*external_watchers).end()) { + watcher = std::move(it->second); + (*external_watchers).erase(it); + } + } + if (watcher != nullptr && cancel) { + watcher->Cancel(); + } +} + void ChannelData::ExternalConnectivityWatcher::Start() { - // Ref owned by the lambda - Ref(DEBUG_LOCATION, "Start").release(); + // No need to take a ref since Start() consumes the ref from the + // creation of the object. chand_->work_serializer_->Run( [this]() { + // The ref is passed to AddWatcherLocked(). AddWatcherLocked(); - Unref(DEBUG_LOCATION, "Start"); }, DEBUG_LOCATION); } @@ -1230,10 +1267,9 @@ void ChannelData::ExternalConnectivityWatcher::Cancel() { void ChannelData::ExternalConnectivityWatcher::AddWatcherLocked() { Closure::Run(DEBUG_LOCATION, watcher_timer_init_, GRPC_ERROR_NONE); - // Add new watcher. + // Add new watcher. Pass the ref of the object from creation to OrphanablePtr. chand_->state_tracker_.AddWatcher( - initial_state_, - OrphanablePtr(Ref().release())); + initial_state_, OrphanablePtr(this)); } void ChannelData::ExternalConnectivityWatcher::RemoveWatcherLocked() { From 7ee2bc6db5a9255ad85f68598ba34610756fb03f Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 7 Jul 2020 07:07:26 -0700 Subject: [PATCH 227/239] EM-agnostic callback completion queue --- src/core/lib/iomgr/ev_posix.cc | 2 + src/core/lib/iomgr/iomgr.cc | 14 + src/core/lib/iomgr/iomgr.h | 10 + src/core/lib/surface/completion_queue.cc | 282 +++++++++++++++++- src/core/lib/surface/completion_queue.h | 8 + src/core/lib/surface/init.cc | 2 + .../end2end/client_callback_end2end_test.cc | 8 +- test/cpp/end2end/end2end_test.cc | 10 +- .../end2end/message_allocator_end2end_test.cc | 12 +- test/cpp/microbenchmarks/bm_cq.cc | 62 +++- 10 files changed, 383 insertions(+), 27 deletions(-) diff --git a/src/core/lib/iomgr/ev_posix.cc b/src/core/lib/iomgr/ev_posix.cc index 3d32359be46..f0cb416447f 100644 --- a/src/core/lib/iomgr/ev_posix.cc +++ b/src/core/lib/iomgr/ev_posix.cc @@ -37,6 +37,7 @@ #include "src/core/lib/iomgr/ev_epollex_linux.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/iomgr/internal_errqueue.h" +#include "src/core/lib/iomgr/iomgr.h" GPR_GLOBAL_CONFIG_DEFINE_STRING( grpc_poll_strategy, "all", @@ -107,6 +108,7 @@ const grpc_event_engine_vtable* init_non_polling(bool explicit_request) { auto ret = grpc_init_poll_posix(explicit_request); real_poll_function = grpc_poll_function; grpc_poll_function = dummy_poll; + grpc_iomgr_mark_non_polling_internal(); return ret; } diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc index 802e3bdcb4d..d7da7c9151d 100644 --- a/src/core/lib/iomgr/iomgr.cc +++ b/src/core/lib/iomgr/iomgr.cc @@ -50,6 +50,7 @@ static gpr_cv g_rcv; static int g_shutdown; static grpc_iomgr_object g_root_object; static bool g_grpc_abort_on_leaks; +static bool g_iomgr_non_polling; void grpc_iomgr_init() { grpc_core::ExecCtx exec_ctx; @@ -192,3 +193,16 @@ void grpc_iomgr_unregister_object(grpc_iomgr_object* obj) { } bool grpc_iomgr_abort_on_leaks(void) { return g_grpc_abort_on_leaks; } + +bool grpc_iomgr_non_polling() { + gpr_mu_lock(&g_mu); + bool ret = g_iomgr_non_polling; + gpr_mu_unlock(&g_mu); + return ret; +} + +void grpc_iomgr_mark_non_polling_internal() { + gpr_mu_lock(&g_mu); + g_iomgr_non_polling = true; + gpr_mu_unlock(&g_mu); +} diff --git a/src/core/lib/iomgr/iomgr.h b/src/core/lib/iomgr/iomgr.h index e02f15e551c..cb9f3eb35c8 100644 --- a/src/core/lib/iomgr/iomgr.h +++ b/src/core/lib/iomgr/iomgr.h @@ -45,6 +45,16 @@ void grpc_iomgr_shutdown_background_closure(); */ bool grpc_iomgr_run_in_background(); +/* Returns true if polling engine is non-polling, false otherwise. + * Currently only 'none' is non-polling. + */ +bool grpc_iomgr_non_polling(); + +/* Mark the polling engine as non-polling. For internal use only. + * Currently only 'none' is non-polling. + */ +void grpc_iomgr_mark_non_polling_internal(); + /** Returns true if the caller is a worker thread for any background poller. */ bool grpc_iomgr_is_any_background_poller_thread(); diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc index a9f65bd5310..c59e329fabe 100644 --- a/src/core/lib/surface/completion_queue.cc +++ b/src/core/lib/surface/completion_queue.cc @@ -39,6 +39,7 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/tls.h" #include "src/core/lib/gprpp/atomic.h" +#include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/executor.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/timer.h" @@ -208,6 +209,9 @@ struct cq_vtable { void* reserved); grpc_event (*pluck)(grpc_completion_queue* cq, void* tag, gpr_timespec deadline, void* reserved); + // TODO(vjpai): Remove proxy_pollset once callback_alternative no longer + // needed. + grpc_pollset* (*proxy_pollset)(grpc_completion_queue* cq); }; namespace { @@ -309,7 +313,7 @@ struct cq_pluck_data { }; struct cq_callback_data { - cq_callback_data( + explicit cq_callback_data( grpc_experimental_completion_queue_functor* shutdown_callback) : shutdown_callback(shutdown_callback) {} @@ -334,6 +338,81 @@ struct cq_callback_data { grpc_experimental_completion_queue_functor* shutdown_callback; }; +// TODO(vjpai): Remove all callback_alternative variants when event manager is +// the only supported poller. +struct cq_callback_alternative_data { + explicit cq_callback_alternative_data( + grpc_experimental_completion_queue_functor* shutdown_callback) + : implementation(SharedNextableCQ()), + shutdown_callback(shutdown_callback) {} + + /* This just points to a single shared nextable CQ */ + grpc_completion_queue* const implementation; + + /** Number of outstanding events (+1 if not shut down) + Initial count is dropped by grpc_completion_queue_shutdown */ + grpc_core::Atomic pending_events{1}; + + /** 0 initially. 1 once we initiated shutdown */ + bool shutdown_called = false; + + /** A callback that gets invoked when the CQ completes shutdown */ + grpc_experimental_completion_queue_functor* shutdown_callback; + + static grpc_completion_queue* SharedNextableCQ() { + grpc_core::MutexLock lock(&*shared_cq_next_mu); + + if (shared_cq_next == nullptr) { + shared_cq_next = grpc_completion_queue_create_for_next(nullptr); + int num_nexting_threads = GPR_CLAMP(gpr_cpu_num_cores(), 2, 32); + threads_remaining.Store(num_nexting_threads, + grpc_core::MemoryOrder::RELEASE); + for (int i = 0; i < num_nexting_threads; i++) { + grpc_core::Executor::Run( + GRPC_CLOSURE_CREATE( + [](void* arg, grpc_error* /*error*/) { + grpc_completion_queue* cq = + static_cast(arg); + while (true) { + grpc_event event = grpc_completion_queue_next( + cq, gpr_inf_future(GPR_CLOCK_REALTIME), nullptr); + if (event.type == GRPC_QUEUE_SHUTDOWN) { + break; + } + GPR_DEBUG_ASSERT(event.type == GRPC_OP_COMPLETE); + // We can always execute the callback inline rather than + // pushing it to another Executor thread because this + // thread is definitely running on an executor, does not + // hold any application locks before executing the callback, + // and cannot be entered recursively. + auto* functor = static_cast< + grpc_experimental_completion_queue_functor*>(event.tag); + functor->functor_run(functor, event.success); + } + if (threads_remaining.FetchSub( + 1, grpc_core::MemoryOrder::ACQ_REL) == 1) { + grpc_completion_queue_destroy(cq); + } + }, + shared_cq_next, nullptr), + GRPC_ERROR_NONE, grpc_core::ExecutorType::DEFAULT, + grpc_core::ExecutorJobType::LONG); + } + } + return shared_cq_next; + } + // Use manually-constructed Mutex to avoid static construction issues + static grpc_core::ManualConstructor shared_cq_next_mu; + static grpc_completion_queue* + shared_cq_next; // GUARDED_BY(shared_cq_next_mu) + static grpc_core::Atomic threads_remaining; +}; + +grpc_core::ManualConstructor + cq_callback_alternative_data::shared_cq_next_mu; +grpc_completion_queue* cq_callback_alternative_data::shared_cq_next = nullptr; +grpc_core::Atomic cq_callback_alternative_data::threads_remaining{0}; + } // namespace /* Completion queue structure */ @@ -346,6 +425,12 @@ struct grpc_completion_queue { const cq_vtable* vtable; const cq_poller_vtable* poller_vtable; + // The pollset entry is allowed to enable proxy CQs like the + // callback_alternative. + // TODO(vjpai): Consider removing pollset and reverting to previous + // calculation of pollset once callback_alternative is no longer needed. + grpc_pollset* pollset; + #ifndef NDEBUG void** outstanding_tags; size_t outstanding_tag_count; @@ -360,13 +445,17 @@ struct grpc_completion_queue { static void cq_finish_shutdown_next(grpc_completion_queue* cq); static void cq_finish_shutdown_pluck(grpc_completion_queue* cq); static void cq_finish_shutdown_callback(grpc_completion_queue* cq); +static void cq_finish_shutdown_callback_alternative(grpc_completion_queue* cq); static void cq_shutdown_next(grpc_completion_queue* cq); static void cq_shutdown_pluck(grpc_completion_queue* cq); static void cq_shutdown_callback(grpc_completion_queue* cq); +static void cq_shutdown_callback_alternative(grpc_completion_queue* cq); static bool cq_begin_op_for_next(grpc_completion_queue* cq, void* tag); static bool cq_begin_op_for_pluck(grpc_completion_queue* cq, void* tag); static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* tag); +static bool cq_begin_op_for_callback_alternative(grpc_completion_queue* cq, + void* tag); // A cq_end_op function is called when an operation on a given CQ with // a given tag has completed. The storage argument is a reference to the @@ -389,12 +478,20 @@ static void cq_end_op_for_callback( void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, grpc_cq_completion* storage, bool internal); +static void cq_end_op_for_callback_alternative( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal); + static grpc_event cq_next(grpc_completion_queue* cq, gpr_timespec deadline, void* reserved); static grpc_event cq_pluck(grpc_completion_queue* cq, void* tag, gpr_timespec deadline, void* reserved); +static grpc_pollset* cq_proxy_pollset_for_callback_alternative( + grpc_completion_queue* cq); + // Note that cq_init_next and cq_init_pluck do not use the shutdown_callback static void cq_init_next( void* data, grpc_experimental_completion_queue_functor* shutdown_callback); @@ -402,29 +499,39 @@ static void cq_init_pluck( void* data, grpc_experimental_completion_queue_functor* shutdown_callback); static void cq_init_callback( void* data, grpc_experimental_completion_queue_functor* shutdown_callback); +// poller becomes only option. +static void cq_init_callback_alternative( + void* data, grpc_experimental_completion_queue_functor* shutdown_callback); static void cq_destroy_next(void* data); static void cq_destroy_pluck(void* data); static void cq_destroy_callback(void* data); +static void cq_destroy_callback_alternative(void* data); /* Completion queue vtables based on the completion-type */ -static const cq_vtable g_cq_vtable[] = { +// TODO(vjpai): Make this const again once we stop needing callback_alternative +static cq_vtable g_polling_cq_vtable[] = { /* GRPC_CQ_NEXT */ {GRPC_CQ_NEXT, sizeof(cq_next_data), cq_init_next, cq_shutdown_next, cq_destroy_next, cq_begin_op_for_next, cq_end_op_for_next, cq_next, - nullptr}, + nullptr, nullptr}, /* GRPC_CQ_PLUCK */ {GRPC_CQ_PLUCK, sizeof(cq_pluck_data), cq_init_pluck, cq_shutdown_pluck, cq_destroy_pluck, cq_begin_op_for_pluck, cq_end_op_for_pluck, nullptr, - cq_pluck}, + cq_pluck, nullptr}, /* GRPC_CQ_CALLBACK */ {GRPC_CQ_CALLBACK, sizeof(cq_callback_data), cq_init_callback, cq_shutdown_callback, cq_destroy_callback, cq_begin_op_for_callback, - cq_end_op_for_callback, nullptr, nullptr}, + cq_end_op_for_callback, nullptr, nullptr, nullptr}, }; +// Separate vtable for non-polling cqs, assign at init +static cq_vtable g_nonpolling_cq_vtable[sizeof(g_polling_cq_vtable) / + sizeof(g_polling_cq_vtable[0])]; + #define DATA_FROM_CQ(cq) ((void*)(cq + 1)) -#define POLLSET_FROM_CQ(cq) \ +#define INLINE_POLLSET_FROM_CQ(cq) \ ((grpc_pollset*)(cq->vtable->data_size + (char*)DATA_FROM_CQ(cq))) +#define POLLSET_FROM_CQ(cq) (cq->pollset) grpc_core::TraceFlag grpc_cq_pluck_trace(false, "queue_pluck"); @@ -443,6 +550,46 @@ static void on_pollset_shutdown_done(void* cq, grpc_error* error); void grpc_cq_global_init() { gpr_tls_init(&g_cached_event); gpr_tls_init(&g_cached_cq); + g_nonpolling_cq_vtable[GRPC_CQ_NEXT] = g_polling_cq_vtable[GRPC_CQ_NEXT]; + g_nonpolling_cq_vtable[GRPC_CQ_PLUCK] = g_polling_cq_vtable[GRPC_CQ_PLUCK]; + g_nonpolling_cq_vtable[GRPC_CQ_CALLBACK] = + g_polling_cq_vtable[GRPC_CQ_CALLBACK]; +} + +// TODO(vjpai): Remove when callback_alternative is no longer needed +void grpc_cq_init() { + // If the iomgr runs in the background, we can use the preferred callback CQ. + // If the iomgr is non-polling, we cannot use the alternative callback CQ. + if (!grpc_iomgr_run_in_background() && !grpc_iomgr_non_polling()) { + cq_callback_alternative_data::shared_cq_next_mu.Init(); + g_polling_cq_vtable[GRPC_CQ_CALLBACK] = { + GRPC_CQ_CALLBACK, + sizeof(cq_callback_alternative_data), + cq_init_callback_alternative, + cq_shutdown_callback_alternative, + cq_destroy_callback_alternative, + cq_begin_op_for_callback_alternative, + cq_end_op_for_callback_alternative, + nullptr, + nullptr, + cq_proxy_pollset_for_callback_alternative}; + } +} + +// TODO(vjpai): Remove when callback_alternative is no longer needed +void grpc_cq_shutdown() { + if (!grpc_iomgr_run_in_background() && !grpc_iomgr_non_polling()) { + { + grpc_core::MutexLock lock( + &*cq_callback_alternative_data::shared_cq_next_mu); + if (cq_callback_alternative_data::shared_cq_next != nullptr) { + grpc_completion_queue_shutdown( + cq_callback_alternative_data::shared_cq_next); + } + cq_callback_alternative_data::shared_cq_next = nullptr; + } + cq_callback_alternative_data::shared_cq_next_mu.Destroy(); + } } void grpc_completion_queue_thread_local_cache_init(grpc_completion_queue* cq) { @@ -521,7 +668,9 @@ grpc_completion_queue* grpc_completion_queue_create_internal( "polling_type=%d)", 2, (completion_type, polling_type)); - const cq_vtable* vtable = &g_cq_vtable[completion_type]; + const cq_vtable* vtable = (polling_type == GRPC_CQ_NON_POLLING) + ? &g_nonpolling_cq_vtable[completion_type] + : &g_polling_cq_vtable[completion_type]; const cq_poller_vtable* poller_vtable = &g_poller_vtable_by_poller_type[polling_type]; @@ -538,9 +687,18 @@ grpc_completion_queue* grpc_completion_queue_create_internal( /* One for destroy(), one for pollset_shutdown */ new (&cq->owning_refs) grpc_core::RefCount(2); - poller_vtable->init(POLLSET_FROM_CQ(cq), &cq->mu); vtable->init(DATA_FROM_CQ(cq), shutdown_callback); + // TODO(vjpai): When callback_alternative is no longer needed, cq->pollset can + // be removed and the nullptr proxy_pollset value below can be the definition + // of POLLSET_FROM_CQ. + cq->pollset = cq->vtable->proxy_pollset == nullptr + ? INLINE_POLLSET_FROM_CQ(cq) + : cq->vtable->proxy_pollset(cq); + // Init the inline pollset. If a proxy CQ is used, the proxy pollset will be + // init'ed in its CQ init. + cq->poller_vtable->init(INLINE_POLLSET_FROM_CQ(cq), &cq->mu); + GRPC_CLOSURE_INIT(&cq->pollset_shutdown_done, on_pollset_shutdown_done, cq, grpc_schedule_on_exec_ctx); return cq; @@ -578,6 +736,17 @@ static void cq_destroy_callback(void* data) { cqd->~cq_callback_data(); } +static void cq_init_callback_alternative( + void* data, grpc_experimental_completion_queue_functor* shutdown_callback) { + new (data) cq_callback_alternative_data(shutdown_callback); +} + +static void cq_destroy_callback_alternative(void* data) { + cq_callback_alternative_data* cqd = + static_cast(data); + cqd->~cq_callback_alternative_data(); +} + grpc_cq_completion_type grpc_get_cq_completion_type(grpc_completion_queue* cq) { return cq->vtable->cq_completion_type; } @@ -618,7 +787,9 @@ void grpc_cq_internal_unref(grpc_completion_queue* cq) { #endif if (GPR_UNLIKELY(cq->owning_refs.Unref(debug_location, reason))) { cq->vtable->destroy(DATA_FROM_CQ(cq)); - cq->poller_vtable->destroy(POLLSET_FROM_CQ(cq)); + // Only destroy the inlined pollset. If a proxy CQ is used, the proxy + // pollset will be destroyed by the proxy CQ. + cq->poller_vtable->destroy(INLINE_POLLSET_FROM_CQ(cq)); #ifndef NDEBUG gpr_free(cq->outstanding_tags); #endif @@ -669,6 +840,14 @@ static bool cq_begin_op_for_callback(grpc_completion_queue* cq, void* /*tag*/) { return cqd->pending_events.IncrementIfNonzero(); } +static bool cq_begin_op_for_callback_alternative(grpc_completion_queue* cq, + void* tag) { + cq_callback_alternative_data* cqd = + static_cast DATA_FROM_CQ(cq); + return grpc_cq_begin_op(cqd->implementation, tag) && + cqd->pending_events.IncrementIfNonzero(); +} + bool grpc_cq_begin_op(grpc_completion_queue* cq, void* tag) { #ifndef NDEBUG gpr_mu_lock(cq->mu); @@ -832,7 +1011,7 @@ static void cq_end_op_for_pluck( GRPC_ERROR_UNREF(error); } -static void functor_callback(void* arg, grpc_error* error) { +void functor_callback(void* arg, grpc_error* error) { auto* functor = static_cast(arg); functor->functor_run(functor, error == GRPC_ERROR_NONE); } @@ -892,6 +1071,40 @@ static void cq_end_op_for_callback( GRPC_CLOSURE_CREATE(functor_callback, functor, nullptr), error); } +static void cq_end_op_for_callback_alternative( + grpc_completion_queue* cq, void* tag, grpc_error* error, + void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, + grpc_cq_completion* storage, bool internal) { + GPR_TIMER_SCOPE("cq_end_op_for_callback_alternative", 0); + + cq_callback_alternative_data* cqd = + static_cast DATA_FROM_CQ(cq); + + if (GRPC_TRACE_FLAG_ENABLED(grpc_api_trace) || + (GRPC_TRACE_FLAG_ENABLED(grpc_trace_operation_failures) && + error != GRPC_ERROR_NONE)) { + const char* errmsg = grpc_error_string(error); + GRPC_API_TRACE( + "cq_end_op_for_callback_alternative(cq=%p, tag=%p, error=%s, " + "done=%p, done_arg=%p, storage=%p)", + 6, (cq, tag, errmsg, done, done_arg, storage)); + if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_operation_failures) && + error != GRPC_ERROR_NONE) { + gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg); + } + } + + // Pass through the actual work to the internal nextable CQ + grpc_cq_end_op(cqd->implementation, tag, error, done, done_arg, storage, + internal); + + cq_check_tag(cq, tag, true); /* Used in debug builds only */ + + if (cqd->pending_events.FetchSub(1, grpc_core::MemoryOrder::ACQ_REL) == 1) { + cq_finish_shutdown_callback_alternative(cq); + } +} + void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, void (*done)(void* done_arg, grpc_cq_completion* storage), void* done_arg, grpc_cq_completion* storage, @@ -899,6 +1112,13 @@ void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error, cq->vtable->end_op(cq, tag, error, done, done_arg, storage, internal); } +static grpc_pollset* cq_proxy_pollset_for_callback_alternative( + grpc_completion_queue* cq) { + cq_callback_alternative_data* cqd = + static_cast(DATA_FROM_CQ(cq)); + return POLLSET_FROM_CQ(cqd->implementation); +} + struct cq_is_finished_arg { gpr_atm last_seen_things_queued_ever; grpc_completion_queue* cq; @@ -1379,6 +1599,21 @@ static void cq_finish_shutdown_callback(grpc_completion_queue* cq) { GRPC_ERROR_NONE); } +static void cq_finish_shutdown_callback_alternative(grpc_completion_queue* cq) { + cq_callback_alternative_data* cqd = + static_cast DATA_FROM_CQ(cq); + auto* callback = cqd->shutdown_callback; + + GPR_ASSERT(cqd->shutdown_called); + + // Shutdown the non-proxy pollset + cq->poller_vtable->shutdown(INLINE_POLLSET_FROM_CQ(cq), + &cq->pollset_shutdown_done); + grpc_core::Executor::Run( + GRPC_CLOSURE_CREATE(functor_callback, callback, nullptr), + GRPC_ERROR_NONE); +} + static void cq_shutdown_callback(grpc_completion_queue* cq) { cq_callback_data* cqd = static_cast DATA_FROM_CQ(cq); @@ -1405,6 +1640,33 @@ static void cq_shutdown_callback(grpc_completion_queue* cq) { GRPC_CQ_INTERNAL_UNREF(cq, "shutting_down (callback cq)"); } +static void cq_shutdown_callback_alternative(grpc_completion_queue* cq) { + cq_callback_alternative_data* cqd = + static_cast DATA_FROM_CQ(cq); + + /* Need an extra ref for cq here because: + * We call cq_finish_shutdown_callback() below, which calls pollset shutdown. + * Pollset shutdown decrements the cq ref count which can potentially destroy + * the cq (if that happens to be the last ref). + * Creating an extra ref here prevents the cq from getting destroyed while + * this function is still active */ + GRPC_CQ_INTERNAL_REF(cq, "shutting_down (callback cq)"); + gpr_mu_lock(cq->mu); + if (cqd->shutdown_called) { + gpr_mu_unlock(cq->mu); + GRPC_CQ_INTERNAL_UNREF(cq, "shutting_down (callback cq)"); + return; + } + cqd->shutdown_called = true; + if (cqd->pending_events.FetchSub(1, grpc_core::MemoryOrder::ACQ_REL) == 1) { + gpr_mu_unlock(cq->mu); + cq_finish_shutdown_callback_alternative(cq); + } else { + gpr_mu_unlock(cq->mu); + } + GRPC_CQ_INTERNAL_UNREF(cq, "shutting_down (callback cq)"); +} + /* Shutdown simply drops a ref that we reserved at creation time; if we drop to zero here, then enter shutdown mode and wake up any waiters */ void grpc_completion_queue_shutdown(grpc_completion_queue* cq) { diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 4a114be8285..002f7b0728b 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -69,6 +69,14 @@ void grpc_cq_internal_unref(grpc_completion_queue* cc); /* Initializes global variables used by completion queues */ void grpc_cq_global_init(); +// Completion queue initializations that must be done after iomgr +// TODO(vjpai): Remove when callback_alternative is no longer needed. +void grpc_cq_init(); + +// Completion queue shutdowns that must be done before iomgr shutdown. +// TODO(vjpai): Remove when callback_alternative is no longer needed. +void grpc_cq_shutdown(); + /* Flag that an operation is beginning: the completion channel will not finish shutdown until a corrensponding grpc_cq_end_* call is made. \a tag is currently used only in debug builds. Return true on success, and diff --git a/src/core/lib/surface/init.cc b/src/core/lib/surface/init.cc index d8bc4e4dd32..3bbd7dc53d6 100644 --- a/src/core/lib/surface/init.cc +++ b/src/core/lib/surface/init.cc @@ -144,6 +144,7 @@ void grpc_init(void) { grpc_core::ApplicationCallbackExecCtx::GlobalInit(); grpc_core::ExecCtx::GlobalInit(); grpc_iomgr_init(); + grpc_cq_init(); gpr_timers_global_init(); grpc_core::HandshakerRegistry::Init(); grpc_security_init(); @@ -169,6 +170,7 @@ void grpc_shutdown_internal_locked(void) { int i; { grpc_core::ExecCtx exec_ctx(0); + grpc_cq_shutdown(); grpc_iomgr_shutdown_background_closure(); { grpc_timer_manager_set_threading(false); // shutdown timer_manager thread diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index 5387e5f0af9..63e726d0cde 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -130,10 +130,10 @@ class ClientCallbackEnd2endTest server_ = builder.BuildAndStart(); is_server_started_ = true; - if (GetParam().protocol == Protocol::TCP && - !grpc_iomgr_run_in_background()) { - do_not_test_ = true; - } + // if (GetParam().protocol == Protocol::TCP && + // !grpc_iomgr_run_in_background()) { + // do_not_test_ = true; + // } } void ResetStub() { diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index f157d20cc6f..e6538344b03 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -328,11 +328,11 @@ class End2endTest : public ::testing::TestWithParam { } void SetUp() override { - if (GetParam().callback_server && !GetParam().inproc && - !grpc_iomgr_run_in_background()) { - do_not_test_ = true; - return; - } + // if (GetParam().callback_server && !GetParam().inproc && + // !grpc_iomgr_run_in_background()) { + // do_not_test_ = true; + // return; + // } } void TearDown() override { diff --git a/test/cpp/end2end/message_allocator_end2end_test.cc b/test/cpp/end2end/message_allocator_end2end_test.cc index b34a08ef281..a54e03a744a 100644 --- a/test/cpp/end2end/message_allocator_end2end_test.cc +++ b/test/cpp/end2end/message_allocator_end2end_test.cc @@ -118,12 +118,12 @@ class MessageAllocatorEnd2endTestBase protected: MessageAllocatorEnd2endTestBase() { GetParam().Log(); - if (GetParam().protocol == Protocol::TCP) { - if (!grpc_iomgr_run_in_background()) { - do_not_test_ = true; - return; - } - } + // if (GetParam().protocol == Protocol::TCP) { + // if (!grpc_iomgr_run_in_background()) { + // do_not_test_ = true; + // return; + // } + // } } ~MessageAllocatorEnd2endTestBase() = default; diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index c53eb2b9413..1640c4d52f0 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -69,6 +69,11 @@ BENCHMARK(BM_CreateDestroyCore); static void DoneWithCompletionOnStack(void* /*arg*/, grpc_cq_completion* /*completion*/) {} +static void DoneWithCompletionOnHeap(void* /*arg*/, + grpc_cq_completion* completion) { + delete completion; +} + class DummyTag final : public internal::CompletionQueueTag { public: bool FinalizeResult(void** /*tag*/, bool* /*status*/) override { @@ -205,8 +210,15 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { gpr_cv_init(&shutdown_cv); bool got_shutdown = false; ShutdownCallback shutdown_cb(&got_shutdown); - grpc_completion_queue* cc = - grpc_completion_queue_create_for_callback(&shutdown_cb, nullptr); + // This test with stack-allocated completions only works for non-polling or + // EM-polling callback core CQs. For generality, test with non-polling. + grpc_completion_queue_attributes attr; + attr.version = 2; + attr.cq_completion_type = GRPC_CQ_CALLBACK; + attr.cq_polling_type = GRPC_CQ_NON_POLLING; + attr.cq_shutdown_cb = &shutdown_cb; + grpc_completion_queue* cc = grpc_completion_queue_create( + grpc_completion_queue_factory_lookup(&attr), &attr, nullptr); for (auto _ : state) { grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; grpc_core::ExecCtx exec_ctx; @@ -240,7 +252,53 @@ static void BM_Callback_CQ_Pass1Core(benchmark::State& state) { gpr_cv_destroy(&shutdown_cv); gpr_mu_destroy(&shutdown_mu); } +static void BM_Callback_CQ_Pass1CoreHeapCompletion(benchmark::State& state) { + TrackCounters track_counters; + int iteration = 0, current_iterations = 0; + TagCallback tag_cb(&iteration); + gpr_mu_init(&mu); + gpr_cv_init(&cv); + gpr_mu_init(&shutdown_mu); + gpr_cv_init(&shutdown_cv); + bool got_shutdown = false; + ShutdownCallback shutdown_cb(&got_shutdown); + grpc_completion_queue* cc = + grpc_completion_queue_create_for_callback(&shutdown_cb, nullptr); + for (auto _ : state) { + grpc_core::ApplicationCallbackExecCtx callback_exec_ctx; + grpc_core::ExecCtx exec_ctx; + grpc_cq_completion* completion = new grpc_cq_completion; + GPR_ASSERT(grpc_cq_begin_op(cc, &tag_cb)); + grpc_cq_end_op(cc, &tag_cb, GRPC_ERROR_NONE, DoneWithCompletionOnHeap, + nullptr, completion); + } + shutdown_and_destroy(cc); + + gpr_mu_lock(&mu); + current_iterations = static_cast(state.iterations()); + while (current_iterations != iteration) { + // Wait for all the callbacks to complete. + gpr_cv_wait(&cv, &mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&mu); + + gpr_mu_lock(&shutdown_mu); + while (!got_shutdown) { + // Wait for the shutdown callback to complete. + gpr_cv_wait(&shutdown_cv, &shutdown_mu, gpr_inf_future(GPR_CLOCK_REALTIME)); + } + gpr_mu_unlock(&shutdown_mu); + + GPR_ASSERT(got_shutdown); + GPR_ASSERT(iteration == static_cast(state.iterations())); + track_counters.Finish(state); + gpr_cv_destroy(&cv); + gpr_mu_destroy(&mu); + gpr_cv_destroy(&shutdown_cv); + gpr_mu_destroy(&shutdown_mu); +} BENCHMARK(BM_Callback_CQ_Pass1Core); +BENCHMARK(BM_Callback_CQ_Pass1CoreHeapCompletion); } // namespace testing } // namespace grpc From 00af8fb0eede3bf14d18180119159b76641abfcf Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Wed, 8 Jul 2020 16:53:17 -0700 Subject: [PATCH 228/239] Fix TCP_USER_TIMEOUT definition --- src/core/lib/iomgr/socket_utils_common_posix.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/socket_utils_common_posix.cc b/src/core/lib/iomgr/socket_utils_common_posix.cc index 798dcb8543f..fa7f893f72c 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.cc +++ b/src/core/lib/iomgr/socket_utils_common_posix.cc @@ -267,9 +267,13 @@ static bool g_default_server_tcp_user_timeout_enabled = true; #endif #define SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT 0 #else -// For non-Linux, TCP_USER_TIMEOUT won't be used. +// For non-Linux, TCP_USER_TIMEOUT will be used if TCP_USER_TIMEOUT is defined. +#ifdef TCP_USER_TIMEOUT +#define SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT 0 +#else #define TCP_USER_TIMEOUT 0 #define SOCKET_SUPPORTS_TCP_USER_TIMEOUT_DEFAULT -1 +#endif // TCP_USER_TIMEOUT #endif // GPR_LINUX == 1 // Whether the socket supports TCP_USER_TIMEOUT option. From fa28bab4562f2dafaf0e92ebc87580ee2dce2f23 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 8 Jul 2020 16:56:21 -0700 Subject: [PATCH 229/239] Address comments --- .../client_channel/lb_policy/grpclb/grpclb.cc | 45 +++++++--------- test/cpp/end2end/grpclb_end2end_test.cc | 54 +++++++++---------- 2 files changed, 47 insertions(+), 52 deletions(-) diff --git a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc index 66ad37db134..da3b29e5826 100644 --- a/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +++ b/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc @@ -131,20 +131,20 @@ constexpr char kGrpclb[] = "grpclb"; class GrpcLbConfig : public LoadBalancingPolicy::Config { public: GrpcLbConfig(RefCountedPtr child_policy, - std::string target_name) + std::string service_name) : child_policy_(std::move(child_policy)), - target_name_(std::move(target_name)) {} + service_name_(std::move(service_name)) {} const char* name() const override { return kGrpclb; } RefCountedPtr child_policy() const { return child_policy_; } - const std::string& target_name() const { return target_name_; } + const std::string& service_name() const { return service_name_; } private: RefCountedPtr child_policy_; - std::string target_name_; + std::string service_name_; }; class GrpcLb : public LoadBalancingPolicy { @@ -374,9 +374,8 @@ class GrpcLb : public LoadBalancingPolicy { // Who the client is trying to communicate with. const char* server_name_ = nullptr; - // The target name from configuration; if set, it overrides server_name_ in - // the balancer requests. - std::string target_name_; + // Configurations for the policy. + RefCountedPtr config_; // Current channel args from the resolver. grpc_channel_args* args_ = nullptr; @@ -422,8 +421,6 @@ class GrpcLb : public LoadBalancingPolicy { // The child policy to use for the backends. OrphanablePtr child_policy_; - // The child policy config. - RefCountedPtr child_policy_config_; // Child policy in state READY. bool child_policy_ready_ = false; }; @@ -769,11 +766,11 @@ GrpcLb::BalancerCallState::BalancerCallState( nullptr, deadline, nullptr); // Init the LB call request payload. upb::Arena arena; - grpc_slice request_payload_slice = - GrpcLbRequestCreate(grpclb_policy()->target_name_.empty() - ? grpclb_policy()->server_name_ - : grpclb_policy()->target_name_.c_str(), - arena.ptr()); + grpc_slice request_payload_slice = GrpcLbRequestCreate( + grpclb_policy()->config_->service_name().empty() + ? grpclb_policy()->server_name_ + : grpclb_policy()->config_->service_name().c_str(), + arena.ptr()); send_message_payload_ = grpc_raw_byte_buffer_create(&request_payload_slice, 1); grpc_slice_unref_internal(request_payload_slice); @@ -1399,10 +1396,8 @@ void GrpcLb::ResetBackoffLocked() { void GrpcLb::UpdateLocked(UpdateArgs args) { const bool is_initial_update = lb_channel_ == nullptr; - auto* grpclb_config = static_cast(args.config.get()); - GPR_ASSERT(grpclb_config != nullptr); - child_policy_config_ = grpclb_config->child_policy(); - target_name_ = grpclb_config->target_name(); + config_ = args.config; + GPR_ASSERT(config_ != nullptr); ProcessAddressesAndChannelArgsLocked(args.addresses, *args.args); // Update the existing child policy. if (child_policy_ != nullptr) CreateOrUpdateChildPolicyLocked(); @@ -1657,7 +1652,7 @@ void GrpcLb::CreateOrUpdateChildPolicyLocked() { update_args.args = CreateChildPolicyArgsLocked(is_backend_from_grpclb_load_balancer); GPR_ASSERT(update_args.args != nullptr); - update_args.config = child_policy_config_; + update_args.config = config_->child_policy(); // Create child policy if needed. if (child_policy_ == nullptr) { child_policy_ = CreateChildPolicyLocked(update_args.args); @@ -1687,20 +1682,20 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory { const Json& json, grpc_error** error) const override { GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE); if (json.type() == Json::Type::JSON_NULL) { - return MakeRefCounted(nullptr, nullptr); + return MakeRefCounted(nullptr, ""); } std::vector error_list; Json child_policy_config_json_tmp; const Json* child_policy_config_json; - std::string target_name; + std::string service_name; auto it = json.object_value().find("serviceName"); if (it != json.object_value().end()) { - const Json& target_name_json = it->second; - if (target_name_json.type() != Json::Type::STRING) { + const Json& service_name_json = it->second; + if (service_name_json.type() != Json::Type::STRING) { error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING( "field:serviceName error:type should be string")); } else { - target_name = target_name_json.string_value(); + service_name = service_name_json.string_value(); } } it = json.object_value().find("childPolicy"); @@ -1724,7 +1719,7 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory { } if (error_list.empty()) { return MakeRefCounted(std::move(child_policy_config), - target_name); + std::move(service_name)); } else { *error = GRPC_ERROR_CREATE_FROM_VECTOR("GrpcLb Parser", &error_list); return nullptr; diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 0572edf1f4c..9b109c89dda 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -212,11 +212,7 @@ struct ClientStats { class BalancerServiceImpl : public BalancerService { public: using Stream = ServerReaderWriter; - struct ResponseConfig { - LoadBalanceResponse response; - int delay_ms; - std::string for_target; - }; + using ResponseDelayPair = std::pair; explicit BalancerServiceImpl(int client_load_reporting_interval_seconds) : client_load_reporting_interval_seconds_( @@ -233,14 +229,14 @@ class BalancerServiceImpl : public BalancerService { EXPECT_EQ(context->client_metadata().find(g_kCallCredsMdKey), context->client_metadata().end()); LoadBalanceRequest request; - std::string target; - std::vector response_configs; + std::vector responses_and_delays; if (!stream->Read(&request)) { goto done; } else { if (request.has_initial_request()) { - target = request.initial_request().name(); + grpc::internal::MutexLock lock(&mu_); + service_names_.push_back(request.initial_request().name()); } } IncreaseRequestCount(); @@ -258,14 +254,11 @@ class BalancerServiceImpl : public BalancerService { { grpc::internal::MutexLock lock(&mu_); - response_configs = response_configs_; + responses_and_delays = responses_and_delays_; } - for (const auto& response_config : response_configs) { - if (response_config.for_target.empty() || - response_config.for_target == target) { - SendResponse(stream, response_config.response, - response_config.delay_ms); - } + for (const auto& response_and_delay : responses_and_delays) { + SendResponse(stream, response_and_delay.first, + response_and_delay.second); } { grpc::internal::MutexLock lock(&mu_); @@ -307,16 +300,16 @@ class BalancerServiceImpl : public BalancerService { return Status::OK; } - void add_response(const LoadBalanceResponse& response, int send_after_ms, - std::string for_target = "") { + void add_response(const LoadBalanceResponse& response, int send_after_ms) { grpc::internal::MutexLock lock(&mu_); - response_configs_.push_back({response, send_after_ms, for_target}); + responses_and_delays_.push_back(std::make_pair(response, send_after_ms)); } void Start() { grpc::internal::MutexLock lock(&mu_); serverlist_done_ = false; - response_configs_.clear(); + responses_and_delays_.clear(); + load_report_queue_.clear(); } void Shutdown() { @@ -370,6 +363,11 @@ class BalancerServiceImpl : public BalancerService { } } + std::vector service_names() { + grpc::internal::MutexLock lock(&mu_); + return service_names_; + } + private: void SendResponse(Stream* stream, const LoadBalanceResponse& response, int delay_ms) { @@ -384,7 +382,8 @@ class BalancerServiceImpl : public BalancerService { } const int client_load_reporting_interval_seconds_; - std::vector response_configs_; + std::vector responses_and_delays_; + std::vector service_names_; grpc::internal::Mutex mu_; grpc::internal::CondVar serverlist_cond_; @@ -625,8 +624,8 @@ class GrpclbEnd2endTest : public ::testing::Test { void ScheduleResponseForBalancer(size_t i, const LoadBalanceResponse& response, - int delay_ms, std::string target = "") { - balancers_[i]->service_.add_response(response, delay_ms, target); + int delay_ms) { + balancers_[i]->service_.add_response(response, delay_ms); } Status SendRpc(EchoResponse* response = nullptr, int timeout_ms = 1000, @@ -1395,12 +1394,12 @@ TEST_F(SingleBalancerTest, BackendsRestart) { EXPECT_EQ(1U, balancers_[0]->service_.response_count()); } -TEST_F(SingleBalancerTest, TargetFromLbPolicyConfig) { +TEST_F(SingleBalancerTest, ServiceNameFromLbPolicyConfig) { constexpr char kServiceConfigWithTarget[] = "{\n" " \"loadBalancingConfig\":[\n" " { \"grpclb\":{\n" - " \"serviceName\":\"test_target\"\n" + " \"serviceName\":\"test_service\"\n" " }}\n" " ]\n" "}"; @@ -1409,13 +1408,14 @@ TEST_F(SingleBalancerTest, TargetFromLbPolicyConfig) { const size_t kNumRpcsPerAddress = 1; ScheduleResponseForBalancer( 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), - 0, "test_target"); + 0); // Make sure that trying to connect works without a call. channel_->GetState(true /* try_to_connect */); // We need to wait for all backends to come online. WaitForAllBackends(); - // Send kNumRpcsPerAddress RPCs per server. - CheckRpcSendOk(kNumRpcsPerAddress * num_backends_); + // Send an RPC to trigger load balancing. + CheckRpcSendOk(); + EXPECT_EQ(balancers_[0]->service_.service_names().back(), "test_service"); } class UpdatesTest : public GrpclbEnd2endTest { From e03b0b6deba187f1431f338cb9d93d22da2aa865 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 8 Jul 2020 19:09:14 -0700 Subject: [PATCH 230/239] Another comment --- src/core/ext/filters/client_channel/client_channel.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 72d351fb915..75d8c9e369a 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -1216,9 +1216,9 @@ void ChannelData::ExternalConnectivityWatcher:: (*external_watchers).erase(it); } } - if (watcher != nullptr && cancel) { - watcher->Cancel(); - } + // watcher->Cancel() will hop into the WorkSerializer, so we have to unlock + // the mutex before calling it. + if (watcher != nullptr && cancel) watcher->Cancel(); } void ChannelData::ExternalConnectivityWatcher::Start() { From c6c05910c2d85184b4b193938e6ec50f64933bcd Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 8 Jul 2020 22:13:43 -0700 Subject: [PATCH 231/239] Fix data race in RpcWithEarlyFreeRequest by using atomics --- test/cpp/end2end/message_allocator_end2end_test.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/cpp/end2end/message_allocator_end2end_test.cc b/test/cpp/end2end/message_allocator_end2end_test.cc index b34a08ef281..c15066794bc 100644 --- a/test/cpp/end2end/message_allocator_end2end_test.cc +++ b/test/cpp/end2end/message_allocator_end2end_test.cc @@ -17,6 +17,7 @@ */ #include +#include #include #include #include @@ -235,8 +236,8 @@ class SimpleAllocatorTest : public MessageAllocatorEnd2endTestBase { class MessageHolderImpl : public experimental::MessageHolder { public: - MessageHolderImpl(int* request_deallocation_count, - int* messages_deallocation_count) + MessageHolderImpl(std::atomic_int* request_deallocation_count, + std::atomic_int* messages_deallocation_count) : request_deallocation_count_(request_deallocation_count), messages_deallocation_count_(messages_deallocation_count) { set_request(new EchoRequest); @@ -261,8 +262,8 @@ class SimpleAllocatorTest : public MessageAllocatorEnd2endTestBase { } private: - int* request_deallocation_count_; - int* messages_deallocation_count_; + std::atomic_int* const request_deallocation_count_; + std::atomic_int* const messages_deallocation_count_; }; experimental::MessageHolder* AllocateMessages() override { @@ -271,8 +272,8 @@ class SimpleAllocatorTest : public MessageAllocatorEnd2endTestBase { &messages_deallocation_count); } int allocation_count = 0; - int request_deallocation_count = 0; - int messages_deallocation_count = 0; + std::atomic_int request_deallocation_count{0}; + std::atomic_int messages_deallocation_count{0}; }; }; From 407fdc3a3612933da66e7532124ab58f1d63071e Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 8 Jul 2020 22:13:43 -0700 Subject: [PATCH 232/239] Fix data race in RpcWithEarlyFreeRequest by using atomics --- test/cpp/end2end/message_allocator_end2end_test.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/cpp/end2end/message_allocator_end2end_test.cc b/test/cpp/end2end/message_allocator_end2end_test.cc index a54e03a744a..95bf7f4faa1 100644 --- a/test/cpp/end2end/message_allocator_end2end_test.cc +++ b/test/cpp/end2end/message_allocator_end2end_test.cc @@ -17,6 +17,7 @@ */ #include +#include #include #include #include @@ -235,8 +236,8 @@ class SimpleAllocatorTest : public MessageAllocatorEnd2endTestBase { class MessageHolderImpl : public experimental::MessageHolder { public: - MessageHolderImpl(int* request_deallocation_count, - int* messages_deallocation_count) + MessageHolderImpl(std::atomic_int* request_deallocation_count, + std::atomic_int* messages_deallocation_count) : request_deallocation_count_(request_deallocation_count), messages_deallocation_count_(messages_deallocation_count) { set_request(new EchoRequest); @@ -261,8 +262,8 @@ class SimpleAllocatorTest : public MessageAllocatorEnd2endTestBase { } private: - int* request_deallocation_count_; - int* messages_deallocation_count_; + std::atomic_int* const request_deallocation_count_; + std::atomic_int* const messages_deallocation_count_; }; experimental::MessageHolder* AllocateMessages() override { @@ -271,8 +272,8 @@ class SimpleAllocatorTest : public MessageAllocatorEnd2endTestBase { &messages_deallocation_count); } int allocation_count = 0; - int request_deallocation_count = 0; - int messages_deallocation_count = 0; + std::atomic_int request_deallocation_count{0}; + std::atomic_int messages_deallocation_count{0}; }; }; From 45d92f26ca533fc5fd9b863dca78913a36a62cb3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jul 2020 13:34:57 +0200 Subject: [PATCH 233/239] add Grpc.Tools test for generating for .proto with the same name --- test/distrib/csharp/DistribTest/Program.cs | 8 +++++++ .../duplicate_proto/testcodegen.proto | 23 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 test/distrib/csharp/DistribTest/duplicate_proto/testcodegen.proto diff --git a/test/distrib/csharp/DistribTest/Program.cs b/test/distrib/csharp/DistribTest/Program.cs index bda7b2104d6..79c10ac3a99 100644 --- a/test/distrib/csharp/DistribTest/Program.cs +++ b/test/distrib/csharp/DistribTest/Program.cs @@ -53,6 +53,14 @@ namespace TestGrpcPackage server.ShutdownAsync().Wait(); } } + + // Test that codegen works well in case the .csproj has .proto files + // of the same name, but under different directories (see #17672). + // This method doesn't need to be used, it is enough to check that it builds. + private static object CheckDuplicateProtoFilesAreOk() + { + return new DuplicateProto.MessageFromDuplicateProto(); + } } class GreeterImpl : Greeter.GreeterBase diff --git a/test/distrib/csharp/DistribTest/duplicate_proto/testcodegen.proto b/test/distrib/csharp/DistribTest/duplicate_proto/testcodegen.proto new file mode 100644 index 00000000000..cb767cb8055 --- /dev/null +++ b/test/distrib/csharp/DistribTest/duplicate_proto/testcodegen.proto @@ -0,0 +1,23 @@ +// Copyright 2019 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Test that codegen works well in case the .csproj has .proto files +// of the same name, but under different directories (see #17672). +syntax = "proto3"; + +package duplicate_proto; + +message MessageFromDuplicateProto { + string name = 1; +} From 232756e7bf112489c771253c4788b8ed4e660331 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 9 Jul 2020 09:37:05 -0700 Subject: [PATCH 234/239] Remove unnecessary RPC --- test/cpp/end2end/grpclb_end2end_test.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 9b109c89dda..49cbcf00d3e 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -1413,8 +1413,6 @@ TEST_F(SingleBalancerTest, ServiceNameFromLbPolicyConfig) { channel_->GetState(true /* try_to_connect */); // We need to wait for all backends to come online. WaitForAllBackends(); - // Send an RPC to trigger load balancing. - CheckRpcSendOk(); EXPECT_EQ(balancers_[0]->service_.service_names().back(), "test_service"); } From e1a45fb237e767e49c8db4d8ec1301a591ddf1fb Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 9 Jul 2020 02:54:05 -0700 Subject: [PATCH 235/239] Remove references to skipping callback API tests --- .../end2end/client_callback_end2end_test.cc | 62 +------------ test/cpp/end2end/end2end_test.cc | 86 +------------------ .../end2end/message_allocator_end2end_test.cc | 33 +------ 3 files changed, 4 insertions(+), 177 deletions(-) diff --git a/test/cpp/end2end/client_callback_end2end_test.cc b/test/cpp/end2end/client_callback_end2end_test.cc index 63e726d0cde..8a2d469ddf6 100644 --- a/test/cpp/end2end/client_callback_end2end_test.cc +++ b/test/cpp/end2end/client_callback_end2end_test.cc @@ -45,17 +45,6 @@ #include "test/cpp/util/string_ref_helper.h" #include "test/cpp/util/test_credentials_provider.h" -// MAYBE_SKIP_TEST is a macro to determine if this particular test configuration -// should be skipped based on a decision made at SetUp time. In particular, any -// callback tests can only be run if the iomgr can run in the background or if -// the transport is in-process. -#define MAYBE_SKIP_TEST \ - do { \ - if (do_not_test_) { \ - return; \ - } \ - } while (0) - namespace grpc { namespace testing { namespace { @@ -130,10 +119,6 @@ class ClientCallbackEnd2endTest server_ = builder.BuildAndStart(); is_server_started_ = true; - // if (GetParam().protocol == Protocol::TCP && - // !grpc_iomgr_run_in_background()) { - // do_not_test_ = true; - // } } void ResetStub() { @@ -367,7 +352,6 @@ class ClientCallbackEnd2endTest rpc.Await(); } } - bool do_not_test_{false}; bool is_server_started_{false}; int picked_port_{0}; std::shared_ptr channel_; @@ -380,13 +364,11 @@ class ClientCallbackEnd2endTest }; TEST_P(ClientCallbackEnd2endTest, SimpleRpc) { - MAYBE_SKIP_TEST; ResetStub(); SendRpcs(1, false); } TEST_P(ClientCallbackEnd2endTest, SimpleRpcExpectedError) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; @@ -421,7 +403,6 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpcExpectedError) { } TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLockNested) { - MAYBE_SKIP_TEST; ResetStub(); std::mutex mu1, mu2, mu3; std::condition_variable cv; @@ -472,7 +453,6 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLockNested) { } TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLock) { - MAYBE_SKIP_TEST; ResetStub(); std::mutex mu; std::condition_variable cv; @@ -500,19 +480,16 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLock) { } TEST_P(ClientCallbackEnd2endTest, SequentialRpcs) { - MAYBE_SKIP_TEST; ResetStub(); SendRpcs(10, false); } TEST_P(ClientCallbackEnd2endTest, SequentialRpcsRawReq) { - MAYBE_SKIP_TEST; ResetStub(); SendRpcsRawReq(10); } TEST_P(ClientCallbackEnd2endTest, SendClientInitialMetadata) { - MAYBE_SKIP_TEST; ResetStub(); SimpleRequest request; SimpleResponse response; @@ -539,51 +516,43 @@ TEST_P(ClientCallbackEnd2endTest, SendClientInitialMetadata) { } TEST_P(ClientCallbackEnd2endTest, SimpleRpcWithBinaryMetadata) { - MAYBE_SKIP_TEST; ResetStub(); SendRpcs(1, true); } TEST_P(ClientCallbackEnd2endTest, SequentialRpcsWithVariedBinaryMetadataValue) { - MAYBE_SKIP_TEST; ResetStub(); SendRpcs(10, true); } TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcs) { - MAYBE_SKIP_TEST; ResetStub(); SendRpcsGeneric(10, false); } TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcsAsBidi) { - MAYBE_SKIP_TEST; ResetStub(); SendGenericEchoAsBidi(10, 1, /*do_writes_done=*/true); } TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcsAsBidiWithReactorReuse) { - MAYBE_SKIP_TEST; ResetStub(); SendGenericEchoAsBidi(10, 10, /*do_writes_done=*/true); } TEST_P(ClientCallbackEnd2endTest, GenericRpcNoWritesDone) { - MAYBE_SKIP_TEST; ResetStub(); SendGenericEchoAsBidi(1, 1, /*do_writes_done=*/false); } #if GRPC_ALLOW_EXCEPTIONS TEST_P(ClientCallbackEnd2endTest, ExceptingRpc) { - MAYBE_SKIP_TEST; ResetStub(); SendRpcsGeneric(10, true); } #endif TEST_P(ClientCallbackEnd2endTest, MultipleRpcsWithVariedBinaryMetadataValue) { - MAYBE_SKIP_TEST; ResetStub(); std::vector threads; threads.reserve(10); @@ -596,7 +565,6 @@ TEST_P(ClientCallbackEnd2endTest, MultipleRpcsWithVariedBinaryMetadataValue) { } TEST_P(ClientCallbackEnd2endTest, MultipleRpcs) { - MAYBE_SKIP_TEST; ResetStub(); std::vector threads; threads.reserve(10); @@ -609,7 +577,6 @@ TEST_P(ClientCallbackEnd2endTest, MultipleRpcs) { } TEST_P(ClientCallbackEnd2endTest, CancelRpcBeforeStart) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -638,7 +605,6 @@ TEST_P(ClientCallbackEnd2endTest, CancelRpcBeforeStart) { } TEST_P(ClientCallbackEnd2endTest, RequestEchoServerCancel) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -769,7 +735,6 @@ class WriteClient : public grpc::experimental::ClientWriteReactor { }; TEST_P(ClientCallbackEnd2endTest, RequestStream) { - MAYBE_SKIP_TEST; ResetStub(); WriteClient test{stub_.get(), DO_NOT_CANCEL, 3}; test.Await(); @@ -780,7 +745,6 @@ TEST_P(ClientCallbackEnd2endTest, RequestStream) { } TEST_P(ClientCallbackEnd2endTest, ClientCancelsRequestStream) { - MAYBE_SKIP_TEST; ResetStub(); WriteClient test{stub_.get(), DO_NOT_CANCEL, 3, ClientCancelInfo{2}}; test.Await(); @@ -792,7 +756,6 @@ TEST_P(ClientCallbackEnd2endTest, ClientCancelsRequestStream) { // Server to cancel before doing reading the request TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelBeforeReads) { - MAYBE_SKIP_TEST; ResetStub(); WriteClient test{stub_.get(), CANCEL_BEFORE_PROCESSING, 1}; test.Await(); @@ -804,7 +767,6 @@ TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelBeforeReads) { // Server to cancel while reading a request from the stream in parallel TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelDuringRead) { - MAYBE_SKIP_TEST; ResetStub(); WriteClient test{stub_.get(), CANCEL_DURING_PROCESSING, 10}; test.Await(); @@ -817,7 +779,6 @@ TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelDuringRead) { // Server to cancel after reading all the requests but before returning to the // client TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelAfterReads) { - MAYBE_SKIP_TEST; ResetStub(); WriteClient test{stub_.get(), CANCEL_AFTER_PROCESSING, 4}; test.Await(); @@ -828,7 +789,6 @@ TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelAfterReads) { } TEST_P(ClientCallbackEnd2endTest, UnaryReactor) { - MAYBE_SKIP_TEST; ResetStub(); class UnaryClient : public grpc::experimental::ClientUnaryReactor { public: @@ -887,7 +847,6 @@ TEST_P(ClientCallbackEnd2endTest, UnaryReactor) { } TEST_P(ClientCallbackEnd2endTest, GenericUnaryReactor) { - MAYBE_SKIP_TEST; ResetStub(); const std::string kMethodName("/grpc.testing.EchoTestService/Echo"); class UnaryClient : public grpc::experimental::ClientUnaryReactor { @@ -1053,7 +1012,6 @@ class ReadClient : public grpc::experimental::ClientReadReactor { }; TEST_P(ClientCallbackEnd2endTest, ResponseStream) { - MAYBE_SKIP_TEST; ResetStub(); ReadClient test{stub_.get(), DO_NOT_CANCEL}; test.Await(); @@ -1064,7 +1022,6 @@ TEST_P(ClientCallbackEnd2endTest, ResponseStream) { } TEST_P(ClientCallbackEnd2endTest, ClientCancelsResponseStream) { - MAYBE_SKIP_TEST; ResetStub(); ReadClient test{stub_.get(), DO_NOT_CANCEL, ClientCancelInfo{2}}; test.Await(); @@ -1074,7 +1031,6 @@ TEST_P(ClientCallbackEnd2endTest, ClientCancelsResponseStream) { // Server to cancel before sending any response messages TEST_P(ClientCallbackEnd2endTest, ResponseStreamServerCancelBefore) { - MAYBE_SKIP_TEST; ResetStub(); ReadClient test{stub_.get(), CANCEL_BEFORE_PROCESSING}; test.Await(); @@ -1086,7 +1042,6 @@ TEST_P(ClientCallbackEnd2endTest, ResponseStreamServerCancelBefore) { // Server to cancel while writing a response to the stream in parallel TEST_P(ClientCallbackEnd2endTest, ResponseStreamServerCancelDuring) { - MAYBE_SKIP_TEST; ResetStub(); ReadClient test{stub_.get(), CANCEL_DURING_PROCESSING}; test.Await(); @@ -1099,7 +1054,6 @@ TEST_P(ClientCallbackEnd2endTest, ResponseStreamServerCancelDuring) { // Server to cancel after writing all the respones to the stream but before // returning to the client TEST_P(ClientCallbackEnd2endTest, ResponseStreamServerCancelAfter) { - MAYBE_SKIP_TEST; ResetStub(); ReadClient test{stub_.get(), CANCEL_AFTER_PROCESSING}; test.Await(); @@ -1264,7 +1218,6 @@ class BidiClient }; TEST_P(ClientCallbackEnd2endTest, BidiStream) { - MAYBE_SKIP_TEST; ResetStub(); BidiClient test(stub_.get(), DO_NOT_CANCEL, kServerDefaultResponseStreamsToSend, @@ -1277,7 +1230,6 @@ TEST_P(ClientCallbackEnd2endTest, BidiStream) { } TEST_P(ClientCallbackEnd2endTest, BidiStreamFirstWriteAsync) { - MAYBE_SKIP_TEST; ResetStub(); BidiClient test(stub_.get(), DO_NOT_CANCEL, kServerDefaultResponseStreamsToSend, @@ -1290,7 +1242,6 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamFirstWriteAsync) { } TEST_P(ClientCallbackEnd2endTest, BidiStreamCorked) { - MAYBE_SKIP_TEST; ResetStub(); BidiClient test(stub_.get(), DO_NOT_CANCEL, kServerDefaultResponseStreamsToSend, @@ -1303,7 +1254,6 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamCorked) { } TEST_P(ClientCallbackEnd2endTest, BidiStreamCorkedFirstWriteAsync) { - MAYBE_SKIP_TEST; ResetStub(); BidiClient test(stub_.get(), DO_NOT_CANCEL, kServerDefaultResponseStreamsToSend, @@ -1316,7 +1266,6 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamCorkedFirstWriteAsync) { } TEST_P(ClientCallbackEnd2endTest, ClientCancelsBidiStream) { - MAYBE_SKIP_TEST; ResetStub(); BidiClient test(stub_.get(), DO_NOT_CANCEL, kServerDefaultResponseStreamsToSend, @@ -1331,7 +1280,6 @@ TEST_P(ClientCallbackEnd2endTest, ClientCancelsBidiStream) { // Server to cancel before reading/writing any requests/responses on the stream TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelBefore) { - MAYBE_SKIP_TEST; ResetStub(); BidiClient test(stub_.get(), CANCEL_BEFORE_PROCESSING, /*num_msgs_to_send=*/2, /*cork_metadata=*/false, /*first_write_async=*/false); @@ -1345,7 +1293,6 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelBefore) { // Server to cancel while reading/writing requests/responses on the stream in // parallel TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelDuring) { - MAYBE_SKIP_TEST; ResetStub(); BidiClient test(stub_.get(), CANCEL_DURING_PROCESSING, /*num_msgs_to_send=*/10, /*cork_metadata=*/false, @@ -1360,7 +1307,6 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelDuring) { // Server to cancel after reading/writing all requests/responses on the stream // but before returning to the client TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelAfter) { - MAYBE_SKIP_TEST; ResetStub(); BidiClient test(stub_.get(), CANCEL_AFTER_PROCESSING, /*num_msgs_to_send=*/5, /*cork_metadata=*/false, /*first_write_async=*/false); @@ -1372,7 +1318,6 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelAfter) { } TEST_P(ClientCallbackEnd2endTest, SimultaneousReadAndWritesDone) { - MAYBE_SKIP_TEST; ResetStub(); class Client : public grpc::experimental::ClientBidiReactor { @@ -1420,7 +1365,6 @@ TEST_P(ClientCallbackEnd2endTest, SimultaneousReadAndWritesDone) { } TEST_P(ClientCallbackEnd2endTest, UnimplementedRpc) { - MAYBE_SKIP_TEST; ChannelArguments args; const auto& channel_creds = GetCredentialsProvider()->GetChannelCredentials( GetParam().credentials_type, &args); @@ -1455,7 +1399,6 @@ TEST_P(ClientCallbackEnd2endTest, UnimplementedRpc) { TEST_P(ClientCallbackEnd2endTest, ResponseStreamExtraReactionFlowReadsUntilDone) { - MAYBE_SKIP_TEST; ResetStub(); class ReadAllIncomingDataClient : public grpc::experimental::ClientReadReactor { @@ -1584,8 +1527,5 @@ INSTANTIATE_TEST_SUITE_P(ClientCallbackEnd2endTest, ClientCallbackEnd2endTest, int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); grpc::testing::TestEnvironment env(argc, argv); - grpc_init(); - int ret = RUN_ALL_TESTS(); - grpc_shutdown(); - return ret; + return RUN_ALL_TESTS(); } diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index e6538344b03..82fbb0f2a6c 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -62,17 +62,6 @@ using grpc::testing::EchoResponse; using grpc::testing::kTlsCredentialsType; using std::chrono::system_clock; -// MAYBE_SKIP_TEST is a macro to determine if this particular test configuration -// should be skipped based on a decision made at SetUp time. In particular, -// tests that use the callback server can only be run if the iomgr can run in -// the background or if the transport is in-process. -#define MAYBE_SKIP_TEST \ - do { \ - if (do_not_test_) { \ - return; \ - } \ - } while (0) - namespace grpc { namespace testing { namespace { @@ -327,14 +316,6 @@ class End2endTest : public ::testing::TestWithParam { GetParam().Log(); } - void SetUp() override { - // if (GetParam().callback_server && !GetParam().inproc && - // !grpc_iomgr_run_in_background()) { - // do_not_test_ = true; - // return; - // } - } - void TearDown() override { if (is_server_started_) { server_->Shutdown(); @@ -469,7 +450,6 @@ class End2endTest : public ::testing::TestWithParam { DummyInterceptor::Reset(); } - bool do_not_test_{false}; bool is_server_started_; std::shared_ptr channel_; std::unique_ptr stub_; @@ -525,7 +505,6 @@ class End2endServerTryCancelTest : public End2endTest { // NOTE: Do not call this function with server_try_cancel == DO_NOT_CANCEL. void TestRequestStreamServerCancel( ServerTryCancelRequestPhase server_try_cancel, int num_msgs_to_send) { - MAYBE_SKIP_TEST; RestartServer(std::shared_ptr()); ResetStub(); EchoRequest request; @@ -604,7 +583,6 @@ class End2endServerTryCancelTest : public End2endTest { // NOTE: Do not call this function with server_try_cancel == DO_NOT_CANCEL. void TestResponseStreamServerCancel( ServerTryCancelRequestPhase server_try_cancel) { - MAYBE_SKIP_TEST; RestartServer(std::shared_ptr()); ResetStub(); EchoRequest request; @@ -686,7 +664,6 @@ class End2endServerTryCancelTest : public End2endTest { // NOTE: Do not call this function with server_try_cancel == DO_NOT_CANCEL. void TestBidiStreamServerCancel(ServerTryCancelRequestPhase server_try_cancel, int num_messages) { - MAYBE_SKIP_TEST; RestartServer(std::shared_ptr()); ResetStub(); EchoRequest request; @@ -762,7 +739,6 @@ class End2endServerTryCancelTest : public End2endTest { }; TEST_P(End2endServerTryCancelTest, RequestEchoServerCancel) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -825,7 +801,6 @@ TEST_P(End2endServerTryCancelTest, BidiStreamServerCancelAfter) { } TEST_P(End2endTest, SimpleRpcWithCustomUserAgentPrefix) { - MAYBE_SKIP_TEST; // User-Agent is an HTTP header for HTTP transports only if (GetParam().inproc) { return; @@ -849,7 +824,6 @@ TEST_P(End2endTest, SimpleRpcWithCustomUserAgentPrefix) { } TEST_P(End2endTest, MultipleRpcsWithVariedBinaryMetadataValue) { - MAYBE_SKIP_TEST; ResetStub(); std::vector threads; threads.reserve(10); @@ -862,7 +836,6 @@ TEST_P(End2endTest, MultipleRpcsWithVariedBinaryMetadataValue) { } TEST_P(End2endTest, MultipleRpcs) { - MAYBE_SKIP_TEST; ResetStub(); std::vector threads; threads.reserve(10); @@ -875,7 +848,6 @@ TEST_P(End2endTest, MultipleRpcs) { } TEST_P(End2endTest, ManyStubs) { - MAYBE_SKIP_TEST; ResetStub(); ChannelTestPeer peer(channel_.get()); int registered_calls_pre = peer.registered_calls(); @@ -888,7 +860,6 @@ TEST_P(End2endTest, ManyStubs) { } TEST_P(End2endTest, EmptyBinaryMetadata) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -901,7 +872,6 @@ TEST_P(End2endTest, EmptyBinaryMetadata) { } TEST_P(End2endTest, ReconnectChannel) { - MAYBE_SKIP_TEST; if (GetParam().inproc) { return; } @@ -929,7 +899,6 @@ TEST_P(End2endTest, ReconnectChannel) { } TEST_P(End2endTest, RequestStreamOneRequest) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -946,7 +915,6 @@ TEST_P(End2endTest, RequestStreamOneRequest) { } TEST_P(End2endTest, RequestStreamOneRequestWithCoalescingApi) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -962,7 +930,6 @@ TEST_P(End2endTest, RequestStreamOneRequestWithCoalescingApi) { } TEST_P(End2endTest, RequestStreamTwoRequests) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -979,7 +946,6 @@ TEST_P(End2endTest, RequestStreamTwoRequests) { } TEST_P(End2endTest, RequestStreamTwoRequestsWithWriteThrough) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -996,7 +962,6 @@ TEST_P(End2endTest, RequestStreamTwoRequestsWithWriteThrough) { } TEST_P(End2endTest, RequestStreamTwoRequestsWithCoalescingApi) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1013,7 +978,6 @@ TEST_P(End2endTest, RequestStreamTwoRequestsWithCoalescingApi) { } TEST_P(End2endTest, ResponseStream) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1032,7 +996,6 @@ TEST_P(End2endTest, ResponseStream) { } TEST_P(End2endTest, ResponseStreamWithCoalescingApi) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1054,7 +1017,6 @@ TEST_P(End2endTest, ResponseStreamWithCoalescingApi) { // This was added to prevent regression from issue: // https://github.com/grpc/grpc/issues/11546 TEST_P(End2endTest, ResponseStreamWithEverythingCoalesced) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1076,7 +1038,6 @@ TEST_P(End2endTest, ResponseStreamWithEverythingCoalesced) { } TEST_P(End2endTest, BidiStream) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1101,7 +1062,6 @@ TEST_P(End2endTest, BidiStream) { } TEST_P(End2endTest, BidiStreamWithCoalescingApi) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1137,7 +1097,6 @@ TEST_P(End2endTest, BidiStreamWithCoalescingApi) { // This was added to prevent regression from issue: // https://github.com/grpc/grpc/issues/11546 TEST_P(End2endTest, BidiStreamWithEverythingCoalesced) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1163,7 +1122,6 @@ TEST_P(End2endTest, BidiStreamWithEverythingCoalesced) { // Talk to the two services with the same name but different package names. // The two stubs are created on the same channel. TEST_P(End2endTest, DiffPackageServices) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1192,7 +1150,6 @@ void CancelRpc(ClientContext* context, int delay_us, ServiceType* service) { } TEST_P(End2endTest, CancelRpcBeforeStart) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1208,7 +1165,6 @@ TEST_P(End2endTest, CancelRpcBeforeStart) { } TEST_P(End2endTest, CancelRpcAfterStart) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1245,7 +1201,6 @@ TEST_P(End2endTest, CancelRpcAfterStart) { // Client cancels request stream after sending two messages TEST_P(End2endTest, ClientCancelsRequestStream) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1269,7 +1224,6 @@ TEST_P(End2endTest, ClientCancelsRequestStream) { // Client cancels server stream after sending some messages TEST_P(End2endTest, ClientCancelsResponseStream) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1305,7 +1259,6 @@ TEST_P(End2endTest, ClientCancelsResponseStream) { // Client cancels bidi stream after sending some messages TEST_P(End2endTest, ClientCancelsBidi) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1341,7 +1294,6 @@ TEST_P(End2endTest, ClientCancelsBidi) { } TEST_P(End2endTest, RpcMaxMessageSize) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1364,7 +1316,6 @@ void ReaderThreadFunc(ClientReaderWriter* stream, // Run a Read and a WritesDone simultaneously. TEST_P(End2endTest, SimultaneousReadWritesDone) { - MAYBE_SKIP_TEST; ResetStub(); ClientContext context; gpr_event ev; @@ -1379,7 +1330,6 @@ TEST_P(End2endTest, SimultaneousReadWritesDone) { } TEST_P(End2endTest, ChannelState) { - MAYBE_SKIP_TEST; if (GetParam().inproc) { return; } @@ -1430,7 +1380,6 @@ TEST_P(End2endTest, ChannelStateTimeout) { // Talking to a non-existing service. TEST_P(End2endTest, NonExistingService) { - MAYBE_SKIP_TEST; ResetChannel(); std::unique_ptr stub; stub = grpc::testing::UnimplementedEchoService::NewStub(channel_); @@ -1448,7 +1397,6 @@ TEST_P(End2endTest, NonExistingService) { // Ask the server to send back a serialized proto in trailer. // This is an example of setting error details. TEST_P(End2endTest, BinaryTrailerTest) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1475,7 +1423,6 @@ TEST_P(End2endTest, BinaryTrailerTest) { } TEST_P(End2endTest, ExpectErrorTest) { - MAYBE_SKIP_TEST; ResetStub(); std::vector expected_status; @@ -1527,13 +1474,11 @@ class ProxyEnd2endTest : public End2endTest { }; TEST_P(ProxyEnd2endTest, SimpleRpc) { - MAYBE_SKIP_TEST; ResetStub(); SendRpc(stub_.get(), 1, false); } TEST_P(ProxyEnd2endTest, SimpleRpcWithEmptyMessages) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1544,7 +1489,6 @@ TEST_P(ProxyEnd2endTest, SimpleRpcWithEmptyMessages) { } TEST_P(ProxyEnd2endTest, MultipleRpcs) { - MAYBE_SKIP_TEST; ResetStub(); std::vector threads; threads.reserve(10); @@ -1558,7 +1502,6 @@ TEST_P(ProxyEnd2endTest, MultipleRpcs) { // Set a 10us deadline and make sure proper error is returned. TEST_P(ProxyEnd2endTest, RpcDeadlineExpires) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1584,7 +1527,6 @@ TEST_P(ProxyEnd2endTest, RpcDeadlineExpires) { // Set a long but finite deadline. TEST_P(ProxyEnd2endTest, RpcLongDeadline) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1601,7 +1543,6 @@ TEST_P(ProxyEnd2endTest, RpcLongDeadline) { // Ask server to echo back the deadline it sees. TEST_P(ProxyEnd2endTest, EchoDeadline) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1627,7 +1568,6 @@ TEST_P(ProxyEnd2endTest, EchoDeadline) { // Ask server to echo back the deadline it sees. The rpc has no deadline. TEST_P(ProxyEnd2endTest, EchoDeadlineForNoDeadlineRpc) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1643,7 +1583,6 @@ TEST_P(ProxyEnd2endTest, EchoDeadlineForNoDeadlineRpc) { } TEST_P(ProxyEnd2endTest, UnimplementedRpc) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1659,7 +1598,6 @@ TEST_P(ProxyEnd2endTest, UnimplementedRpc) { // Client cancels rpc after 10ms TEST_P(ProxyEnd2endTest, ClientCancelsRpc) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1694,7 +1632,6 @@ TEST_P(ProxyEnd2endTest, ClientCancelsRpc) { // Server cancels rpc after 1ms TEST_P(ProxyEnd2endTest, ServerCancelsRpc) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1709,7 +1646,6 @@ TEST_P(ProxyEnd2endTest, ServerCancelsRpc) { // Make the response larger than the flow control window. TEST_P(ProxyEnd2endTest, HugeResponse) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1727,7 +1663,6 @@ TEST_P(ProxyEnd2endTest, HugeResponse) { } TEST_P(ProxyEnd2endTest, Peer) { - MAYBE_SKIP_TEST; // Peer is not meaningful for inproc if (GetParam().inproc) { return; @@ -1756,7 +1691,6 @@ class SecureEnd2endTest : public End2endTest { }; TEST_P(SecureEnd2endTest, SimpleRpcWithHost) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; @@ -1788,7 +1722,6 @@ bool MetadataContains( } TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorSuccess) { - MAYBE_SKIP_TEST; auto* processor = new TestAuthMetadataProcessor(true); StartServer(std::shared_ptr(processor)); ResetStub(); @@ -1814,7 +1747,6 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorSuccess) { } TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorFailure) { - MAYBE_SKIP_TEST; auto* processor = new TestAuthMetadataProcessor(true); StartServer(std::shared_ptr(processor)); ResetStub(); @@ -1830,7 +1762,6 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorFailure) { } TEST_P(SecureEnd2endTest, SetPerCallCredentials) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1881,7 +1812,6 @@ class CredentialsInterceptorFactory }; TEST_P(SecureEnd2endTest, CallCredentialsInterception) { - MAYBE_SKIP_TEST; if (!GetParam().use_interceptors) { return; } @@ -1911,7 +1841,6 @@ TEST_P(SecureEnd2endTest, CallCredentialsInterception) { } TEST_P(SecureEnd2endTest, CallCredentialsInterceptionWithSetCredentials) { - MAYBE_SKIP_TEST; if (!GetParam().use_interceptors) { return; } @@ -1946,7 +1875,6 @@ TEST_P(SecureEnd2endTest, CallCredentialsInterceptionWithSetCredentials) { } TEST_P(SecureEnd2endTest, OverridePerCallCredentials) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -1984,7 +1912,6 @@ TEST_P(SecureEnd2endTest, OverridePerCallCredentials) { } TEST_P(SecureEnd2endTest, AuthMetadataPluginKeyFailure) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -2005,7 +1932,6 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginKeyFailure) { } TEST_P(SecureEnd2endTest, AuthMetadataPluginValueFailure) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -2025,7 +1951,6 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginValueFailure) { } TEST_P(SecureEnd2endTest, AuthMetadataPluginWithDeadline) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; request.mutable_param()->set_skip_cancelled_check(true); @@ -2051,7 +1976,6 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginWithDeadline) { } TEST_P(SecureEnd2endTest, AuthMetadataPluginWithCancel) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; request.mutable_param()->set_skip_cancelled_check(true); @@ -2080,7 +2004,6 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginWithCancel) { } TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginFailure) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -2104,7 +2027,6 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginFailure) { } TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorSuccess) { - MAYBE_SKIP_TEST; auto* processor = new TestAuthMetadataProcessor(false); StartServer(std::shared_ptr(processor)); ResetStub(); @@ -2133,7 +2055,6 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorSuccess) { } TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorFailure) { - MAYBE_SKIP_TEST; auto* processor = new TestAuthMetadataProcessor(false); StartServer(std::shared_ptr(processor)); ResetStub(); @@ -2152,7 +2073,6 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorFailure) { } TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -2176,7 +2096,6 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) { } TEST_P(SecureEnd2endTest, CompositeCallCreds) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -2209,7 +2128,6 @@ TEST_P(SecureEnd2endTest, CompositeCallCreds) { } TEST_P(SecureEnd2endTest, ClientAuthContext) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; EchoResponse response; @@ -2254,7 +2172,6 @@ class ResourceQuotaEnd2endTest : public End2endTest { }; TEST_P(ResourceQuotaEnd2endTest, SimpleRequest) { - MAYBE_SKIP_TEST; ResetStub(); EchoRequest request; @@ -2352,6 +2269,5 @@ INSTANTIATE_TEST_SUITE_P( int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); ::testing::InitGoogleTest(&argc, argv); - int ret = RUN_ALL_TESTS(); - return ret; + return RUN_ALL_TESTS(); } diff --git a/test/cpp/end2end/message_allocator_end2end_test.cc b/test/cpp/end2end/message_allocator_end2end_test.cc index 95bf7f4faa1..a21ea41eb63 100644 --- a/test/cpp/end2end/message_allocator_end2end_test.cc +++ b/test/cpp/end2end/message_allocator_end2end_test.cc @@ -45,17 +45,6 @@ #include "test/core/util/test_config.h" #include "test/cpp/util/test_credentials_provider.h" -// MAYBE_SKIP_TEST is a macro to determine if this particular test configuration -// should be skipped based on a decision made at SetUp time. In particular, any -// callback tests can only be run if the iomgr can run in the background or if -// the transport is in-process. -#define MAYBE_SKIP_TEST \ - do { \ - if (do_not_test_) { \ - return; \ - } \ - } while (0) - namespace grpc { namespace testing { namespace { @@ -117,15 +106,7 @@ void TestScenario::Log() const { class MessageAllocatorEnd2endTestBase : public ::testing::TestWithParam { protected: - MessageAllocatorEnd2endTestBase() { - GetParam().Log(); - // if (GetParam().protocol == Protocol::TCP) { - // if (!grpc_iomgr_run_in_background()) { - // do_not_test_ = true; - // return; - // } - // } - } + MessageAllocatorEnd2endTestBase() { GetParam().Log(); } ~MessageAllocatorEnd2endTestBase() = default; @@ -210,7 +191,6 @@ class MessageAllocatorEnd2endTestBase } } - bool do_not_test_{false}; int picked_port_{0}; std::shared_ptr channel_; std::unique_ptr stub_; @@ -222,7 +202,6 @@ class MessageAllocatorEnd2endTestBase class NullAllocatorTest : public MessageAllocatorEnd2endTestBase {}; TEST_P(NullAllocatorTest, SimpleRpc) { - MAYBE_SKIP_TEST; CreateServer(nullptr); ResetStub(); SendRpcs(1); @@ -278,7 +257,6 @@ class SimpleAllocatorTest : public MessageAllocatorEnd2endTestBase { }; TEST_P(SimpleAllocatorTest, SimpleRpc) { - MAYBE_SKIP_TEST; const int kRpcCount = 10; std::unique_ptr allocator(new SimpleAllocator); CreateServer(allocator.get()); @@ -293,7 +271,6 @@ TEST_P(SimpleAllocatorTest, SimpleRpc) { } TEST_P(SimpleAllocatorTest, RpcWithEarlyFreeRequest) { - MAYBE_SKIP_TEST; const int kRpcCount = 10; std::unique_ptr allocator(new SimpleAllocator); auto mutator = [](experimental::RpcAllocatorState* allocator_state, @@ -318,7 +295,6 @@ TEST_P(SimpleAllocatorTest, RpcWithEarlyFreeRequest) { } TEST_P(SimpleAllocatorTest, RpcWithReleaseRequest) { - MAYBE_SKIP_TEST; const int kRpcCount = 10; std::unique_ptr allocator(new SimpleAllocator); std::vector released_requests; @@ -378,7 +354,6 @@ class ArenaAllocatorTest : public MessageAllocatorEnd2endTestBase { }; TEST_P(ArenaAllocatorTest, SimpleRpc) { - MAYBE_SKIP_TEST; const int kRpcCount = 10; std::unique_ptr allocator(new ArenaAllocator); CreateServer(allocator.get()); @@ -429,10 +404,6 @@ INSTANTIATE_TEST_SUITE_P(ArenaAllocatorTest, ArenaAllocatorTest, int main(int argc, char** argv) { grpc::testing::TestEnvironment env(argc, argv); - // The grpc_init is to cover the MAYBE_SKIP_TEST. - grpc_init(); ::testing::InitGoogleTest(&argc, argv); - int ret = RUN_ALL_TESTS(); - grpc_shutdown(); - return ret; + return RUN_ALL_TESTS(); } From 01f992f9d6d9e48c512f9bfc32e12273b0ef6644 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Thu, 9 Jul 2020 11:58:33 -0700 Subject: [PATCH 236/239] Reviewer comments --- .../filters/client_channel/client_channel.cc | 86 ++++++------------- 1 file changed, 28 insertions(+), 58 deletions(-) diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 75d8c9e369a..3bfd12280cf 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -171,22 +171,14 @@ class ChannelData { grpc_connectivity_state* state, grpc_closure* on_complete, grpc_closure* watcher_timer_init) { - auto watcher = new ExternalConnectivityWatcher( - this, pollent, state, on_complete, watcher_timer_init); - { - MutexLock lock(&external_watchers_mu_); - // Store a ref to the watcher in the external_watchers_ map. - watcher->AddWatcherToExternalWatchersMapLocked(&external_watchers_, - on_complete); - } - // Pass the ref from creating the object to Start(). - watcher->Start(); + new ExternalConnectivityWatcher(this, pollent, state, on_complete, + watcher_timer_init); } void RemoveExternalConnectivityWatcher(grpc_closure* on_complete, bool cancel) { ExternalConnectivityWatcher::RemoveWatcherFromExternalWatchersMap( - &external_watchers_mu_, &external_watchers_, on_complete, cancel); + this, on_complete, cancel); } int NumExternalConnectivityWatchers() const { @@ -217,23 +209,10 @@ class ChannelData { ~ExternalConnectivityWatcher(); - // Adds the watcher to the external_watchers_ map. Synchronized by - // external_watchers_mu_ - void AddWatcherToExternalWatchersMapLocked( - std::map>* - external_watchers, - grpc_closure* on_complete); - // Removes the watcher from the external_watchers_ map. - static void RemoveWatcherFromExternalWatchersMap( - Mutex* external_watchers_mu, - std::map>* - external_watchers, - grpc_closure* on_complete, bool cancel); - - // Starts the watch. Consumes the ref from the creation of the - // ExternalConnectivityWatcher object. - void Start(); + static void RemoveWatcherFromExternalWatchersMap(ChannelData* chand, + grpc_closure* on_complete, + bool cancel); void Notify(grpc_connectivity_state state) override; @@ -1181,6 +1160,21 @@ ChannelData::ExternalConnectivityWatcher::ExternalConnectivityWatcher( grpc_polling_entity_add_to_pollset_set(&pollent_, chand_->interested_parties_); GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "ExternalConnectivityWatcher"); + { + MutexLock lock(&chand_->external_watchers_mu_); + // Will be deleted when the watch is complete. + GPR_ASSERT(chand->external_watchers_[on_complete] == nullptr); + // Store a ref to the watcher in the external_watchers_ map. + chand->external_watchers_[on_complete] = + Ref(DEBUG_LOCATION, "AddWatcherToExternalWatchersMapLocked"); + } + // Pass the ref from creating the object to Start(). + chand_->work_serializer_->Run( + [this]() { + // The ref is passed to AddWatcherLocked(). + AddWatcherLocked(); + }, + DEBUG_LOCATION); } ChannelData::ExternalConnectivityWatcher::~ExternalConnectivityWatcher() { @@ -1191,29 +1185,16 @@ ChannelData::ExternalConnectivityWatcher::~ExternalConnectivityWatcher() { } void ChannelData::ExternalConnectivityWatcher:: - AddWatcherToExternalWatchersMapLocked( - std::map>* - external_watchers, - grpc_closure* on_complete) { - // Will be deleted when the watch is complete. - GPR_ASSERT((*external_watchers)[on_complete] == nullptr); - (*external_watchers)[on_complete] = - Ref(DEBUG_LOCATION, "AddWatcherToExternalWatchersMapLocked"); -} - -void ChannelData::ExternalConnectivityWatcher:: - RemoveWatcherFromExternalWatchersMap( - Mutex* external_watchers_mu, - std::map>* - external_watchers, - grpc_closure* on_complete, bool cancel) { + RemoveWatcherFromExternalWatchersMap(ChannelData* chand, + grpc_closure* on_complete, + bool cancel) { RefCountedPtr watcher; { - MutexLock lock(external_watchers_mu); - auto it = (*external_watchers).find(on_complete); - if (it != (*external_watchers).end()) { + MutexLock lock(&chand->external_watchers_mu_); + auto it = chand->external_watchers_.find(on_complete); + if (it != chand->external_watchers_.end()) { watcher = std::move(it->second); - (*external_watchers).erase(it); + chand->external_watchers_.erase(it); } } // watcher->Cancel() will hop into the WorkSerializer, so we have to unlock @@ -1221,17 +1202,6 @@ void ChannelData::ExternalConnectivityWatcher:: if (watcher != nullptr && cancel) watcher->Cancel(); } -void ChannelData::ExternalConnectivityWatcher::Start() { - // No need to take a ref since Start() consumes the ref from the - // creation of the object. - chand_->work_serializer_->Run( - [this]() { - // The ref is passed to AddWatcherLocked(). - AddWatcherLocked(); - }, - DEBUG_LOCATION); -} - void ChannelData::ExternalConnectivityWatcher::Notify( grpc_connectivity_state state) { bool done = false; From 5596a9d55b29cf61d37e2b0b11d16ce6078d70c3 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 9 Jul 2020 14:51:11 -0700 Subject: [PATCH 237/239] Stop using mutex for non-polling engine marker --- src/core/lib/iomgr/iomgr.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/core/lib/iomgr/iomgr.cc b/src/core/lib/iomgr/iomgr.cc index d7da7c9151d..9c97823dd6f 100644 --- a/src/core/lib/iomgr/iomgr.cc +++ b/src/core/lib/iomgr/iomgr.cc @@ -31,6 +31,7 @@ #include "src/core/lib/gpr/string.h" #include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/atomic.h" #include "src/core/lib/gprpp/global_config.h" #include "src/core/lib/gprpp/thd.h" #include "src/core/lib/iomgr/buffer_list.h" @@ -50,7 +51,7 @@ static gpr_cv g_rcv; static int g_shutdown; static grpc_iomgr_object g_root_object; static bool g_grpc_abort_on_leaks; -static bool g_iomgr_non_polling; +static grpc_core::Atomic g_iomgr_non_polling{false}; void grpc_iomgr_init() { grpc_core::ExecCtx exec_ctx; @@ -195,14 +196,9 @@ void grpc_iomgr_unregister_object(grpc_iomgr_object* obj) { bool grpc_iomgr_abort_on_leaks(void) { return g_grpc_abort_on_leaks; } bool grpc_iomgr_non_polling() { - gpr_mu_lock(&g_mu); - bool ret = g_iomgr_non_polling; - gpr_mu_unlock(&g_mu); - return ret; + return g_iomgr_non_polling.Load(grpc_core::MemoryOrder::SEQ_CST); } void grpc_iomgr_mark_non_polling_internal() { - gpr_mu_lock(&g_mu); - g_iomgr_non_polling = true; - gpr_mu_unlock(&g_mu); + g_iomgr_non_polling.Store(true, grpc_core::MemoryOrder::SEQ_CST); } From d03daab50913a48bf4f2993ac7c4e3c0cd9d00d1 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 9 Jul 2020 16:28:14 -0700 Subject: [PATCH 238/239] Remove unused variable (fixes builder error) --- test/cpp/end2end/grpclb_end2end_test.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index 862e7306f9e..97ea12df7ea 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -1404,7 +1404,6 @@ TEST_F(SingleBalancerTest, ServiceNameFromLbPolicyConfig) { "}"; SetNextResolutionAllBalancers(kServiceConfigWithTarget); - const size_t kNumRpcsPerAddress = 1; ScheduleResponseForBalancer( 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}), 0); From 03056001db417de73cdcfd957f4a5d31f5780530 Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 10 Jul 2020 11:27:29 -0700 Subject: [PATCH 239/239] Fix initialization order --- .../resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc index 5fce1c4e356..9b6a0d5023a 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc @@ -102,11 +102,11 @@ class GrpcPolledFdWindows { GrpcPolledFdWindows(ares_socket_t as, std::shared_ptr work_serializer, int address_family, int socket_type) - : name_(absl::StrFormat("c-ares socket: %" PRIdPTR, as)), - work_serializer_(std::move(work_serializer)), + : work_serializer_(std::move(work_serializer)), read_buf_(grpc_empty_slice()), write_buf_(grpc_empty_slice()), tcp_write_state_(WRITE_IDLE), + name_(absl::StrFormat("c-ares socket: %" PRIdPTR, as)), gotten_into_driver_list_(false), address_family_(address_family), socket_type_(socket_type) {